{"id":13490267,"url":"https://github.com/f1sty/sdl-elixir","last_synced_at":"2025-03-28T06:30:42.620Z","repository":{"id":185046212,"uuid":"672909245","full_name":"f1sty/sdl-elixir","owner":"f1sty","description":"SDL2 bindings for Elixir (experimental)","archived":false,"fork":false,"pushed_at":"2023-08-02T21:54:18.000Z","size":63,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-31T03:35:32.715Z","etag":null,"topics":["c","elixir","graphics","graphics-programming","hacking","nif","porting","sdl2"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/f1sty.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-07-31T12:46:57.000Z","updated_at":"2024-04-19T13:46:43.000Z","dependencies_parsed_at":"2024-01-16T09:05:31.317Z","dependency_job_id":"1b857960-d26b-43de-8af7-dd1ae17986e8","html_url":"https://github.com/f1sty/sdl-elixir","commit_stats":null,"previous_names":["f1sty/sdl-elixir"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f1sty%2Fsdl-elixir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f1sty%2Fsdl-elixir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f1sty%2Fsdl-elixir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f1sty%2Fsdl-elixir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/f1sty","download_url":"https://codeload.github.com/f1sty/sdl-elixir/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245984241,"owners_count":20704787,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","elixir","graphics","graphics-programming","hacking","nif","porting","sdl2"],"created_at":"2024-07-31T19:00:43.887Z","updated_at":"2025-03-28T06:30:42.303Z","avatar_url":"https://github.com/f1sty.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# SDL-Elixir (status: WIP)\n\n[SDL2](https://www.libsdl.org/) development library wrapper for Elixir empowered by\n[NIFs](https://www.erlang.org/doc/man/erl_nif.html)\n\n\n## Details\n\nThis library is the second iteration of my [sdl bindings](https://github.com/f1sty/sexdl) attempt.\n\n## Run examples\n\nTo compile NIFs and launch example programs, run:\n\n```bash\n$ mix do deps.get, compile\n$ iex -S mix\n```\n\nfollowed by:\n\n```elixir\niex\u003e Sdl.Examples.Image.run(\"/full/path/to/a/picture.png\")\n```\n\nor:\n\n```elixir\niex\u003e Sdl.Examples.Simple.run()\n```\n\nWindow with an image should appear in the first case. In the second one you should see regular\nwindow with a pleasant bluish colour. If you ran second example, you also can close the window by\npressing `q`.\n\n## Implemented functions (so far):\n\nname, arity **notes**\n\n- `SDL_Init`, 1\n- `SDL_InitSubSystem`, 1\n- `SDL_QuitSubSystem`, 1\n- `SDL_WasInit`, 1\n- `SDL_Quit`, 0\n- `SDL_CreateRgbSurface`, 8\n- `SDL_CreateRgbSurfaceWithFormat`, 5\n- `SDL_CreateRgbSurfaceFrom`, 9\n- `SDL_CreateRgbSurfaceWithFormatFrom`, 6\n- `SDL_FreeSurface`, 1\n- `SDL_SetSurfacePalette`, 2\n- `SDL_LockSurface`, 1\n- `SDL_UnlockSurface`, 1\n- `SDL_LoadBmpRW`, 2\n- `SDL_LoadBmp`, 1\n- `SDL_SaveBmpRW`, 3\n- `SDL_SaveBmp`, 2\n- `SDL_SetSurfaceRLE`, 2\n- `SDL_HasSurfaceRLE`, 1\n- `SDL_SetColorKey`, 3\n- `SDL_HasColorKey`, 1\n- `SDL_GetColorKey`, 1 **instead of 2**\n- `SDL_SetSurfaceColorMod`, 4\n- `SDL_GetSurfaceColorMod`, 1 **instead of 4**\n- `SDL_SetSurfaceAlphaMod`, 2\n- `SDL_GetSurfaceAlphaMod`, 1 **instead of 2**\n- `SDL_SetSurfaceBlendMode`, 2\n- `SDL_GetSurfaceBlendMode`, 1 **instead of 2**\n- `SDL_UpperBlit`, 4\n- `SDL_GetVideoDriver`, 1\n- `SDL_VideoInit`, 1\n- `SDL_CreateWindow`, 6\n- `SDL_GetWindowSurface`, 1\n- `SDL_DestroyWindow`, 1\n- `SDL_CreateRenderer`, 3\n- `SDL_CreateTextureFromSurface`, 2\n- `IMG_Load`, 1\n- `SDL_QueryTexture`, 1 **instead of 5**\n- `SDL_RenderClear`, 1\n- `SDL_RenderCopy`, 4\n- `SDL_RenderPresent`, 1\n- `SDL_PollEvent`, 0 **instead of 1**\n- `SDL_DestroyTexture`, 1\n- `SDL_DestroyRenderer`, 1\n- `SDL_SetRenderDrawColor`, 5\n- `SDL_Delay`, 1\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ff1sty%2Fsdl-elixir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ff1sty%2Fsdl-elixir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ff1sty%2Fsdl-elixir/lists"}