{"id":13534850,"url":"https://github.com/PascalGameDevelopment/SDL2-for-Pascal","last_synced_at":"2025-04-02T00:31:07.174Z","repository":{"id":36993846,"uuid":"280430888","full_name":"PascalGameDevelopment/SDL2-for-Pascal","owner":"PascalGameDevelopment","description":"Unit files for building Free Pascal and Delphi applications using the SDL2 library","archived":false,"fork":false,"pushed_at":"2024-08-04T00:28:18.000Z","size":1566,"stargazers_count":91,"open_issues_count":10,"forks_count":17,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-08-04T02:35:11.261Z","etag":null,"topics":["delphi","free-pascal","game-development","object-pascal","pascal","sdl2","simple-direct-media-layer"],"latest_commit_sha":null,"homepage":"https://pascalgamedevelopment.github.io/SDL2-for-Pascal/","language":"Pascal","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PascalGameDevelopment.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-17T13:26:12.000Z","updated_at":"2024-08-04T00:28:22.000Z","dependencies_parsed_at":"2023-11-15T23:30:28.129Z","dependency_job_id":"8791c8b9-f930-4be5-9f7f-02c5644679b5","html_url":"https://github.com/PascalGameDevelopment/SDL2-for-Pascal","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PascalGameDevelopment%2FSDL2-for-Pascal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PascalGameDevelopment%2FSDL2-for-Pascal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PascalGameDevelopment%2FSDL2-for-Pascal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PascalGameDevelopment%2FSDL2-for-Pascal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PascalGameDevelopment","download_url":"https://codeload.github.com/PascalGameDevelopment/SDL2-for-Pascal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222784453,"owners_count":17037192,"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":["delphi","free-pascal","game-development","object-pascal","pascal","sdl2","simple-direct-media-layer"],"created_at":"2024-08-01T08:00:43.903Z","updated_at":"2025-04-02T00:31:07.128Z","avatar_url":"https://github.com/PascalGameDevelopment.png","language":"Pascal","funding_links":[],"categories":["Bindings"],"sub_categories":[],"readme":"# SDL2-for-Pascal\n\nUnit files for building\n[Free Pascal](https://freepascal.org/) / [Delphi](https://www.embarcadero.com/products/delphi) applications\nusing the [SDL2 library](https://libsdl.org).\n\nThe [SDL2-for-Pascal](https://github.com/PascalGameDevelopment/SDL2-for-Pascal) repository is a community-maintained fork of the [Pascal-SDL-2-Headers](https://github.com/ev1313/Pascal-SDL-2-Headers) repository.\n\n## Installation\n\nSimply add the units to your include path. You can achieve this by:\n - (FPC) using the `{$UNITPATH XXX}` directive in your source code;\n - (FPC) using the `-FuXXX` command-line argument to the compiler;\n - just copying \u0026 pasting the units into the same directory as your main source code.\n\nUse the `sdl2` unit for the main SDL2 library (should be always needed). Units for the other SDL2 libraries are also provided:\n - [`sdl2_gfx`](https://www.ferzkopp.net/wordpress/2016/01/02/sdl_gfx-sdl2_gfx/)\n - [`sdl2_image`](https://github.com/libsdl-org/SDL_image)\n - [`sdl2_mixer`](https://github.com/libsdl-org/SDL_mixer)\n - [`sdl2_net`](https://github.com/libsdl-org/SDL_net)\n - [`sdl2_ttf`](https://github.com/libsdl-org/SDL_ttf)\n\n## Documentation\n\n[Official SDL2-for-Pascal Documentation](https://pascalgamedevelopment.github.io/SDL2-for-Pascal)\n\n### Further Resources\n\n[Free Pascal meets SDL](https://www.freepascal-meets-sdl.net)\n\n[PGD SDL2 Forum](https://www.pascalgamedevelopment.com/forumdisplay.php?26-SDL-SDL-2)\n\n## Bugs / Contributions / ToDos\n\nIf you have any contributions or bugfixes, feel free to drop a pull request or send in a patch.\nPlease use the GitHub [issue tracker](https://github.com/PascalGameDevelopment/SDL2-for-Pascal/issues).\n\n\n### ToDos\n\n- (Continously) Update files by new SDL2 functions and types which are present in more recent SDL2 versions.\n- (Continously atm.) Translate integer aliases into typed enums.\nSee part Enums on the [Cheat sheet](CHEATSHEET.md) for reference.\n- (Continously) improve Delphi-compatibility (and even more important, DO NOT break it)\n- (Continously) Adapt comments to [PasDoc format](https://pasdoc.github.io). (See issue [#22](https://github.com/PascalGameDevelopment/SDL2-for-Pascal/issues/22))\n\n### Code style guidelines\n\nThe main principle is to stay as tight as possible at the names in the C headers.\nThese guidelines aim to have better consistency in this community project and make\nit easier to find certain code parts in the C headers/Pascal includes. Feel free\nto discuss or extend these guidelines, use the issue tracker.\n\n1. Names of C defines (constants) and function parameters shall not be modified or \"pascalified\"\nEx: `SDL_INIT_VIDEO` does not change into `SDLInitVideo`.\n\n2. Names corresponding to reserved key words are kept and an underscore is added.\nEx.: `type` in C function `SDL_HasEvent(Uint32 type)` changes into `type_`\nin Pascal function `SDL_HasEvent(type_: TSDL_EventType)`.\n\n3. Use C data types like `cuint8`, `cuint16`, `cuint32`, `cint8`, `cint16`,\n`cint32`, `cfloat` and so on if native C data types are used  in the\noriginal code. Note: For FPC you need to add the unit `ctypes` to use these C\ndata types. For Delphi we have a temporary solution provided. (see issue [#67](https://github.com/PascalGameDevelopment/SDL2-for-Pascal/issues/67))\n\n**Example:** Use `cuint32` (if `Uint32` is used in\nthe original code) instead of `UInt32`, `Cardinal`, `LongWord` or `DWord`.\nException: Replace `*char` by `PAnsiChar`! (see issue [#26](https://github.com/PascalGameDevelopment/SDL2-for-Pascal/issues/26))\n\n**Hint:** Use `TSDL_Bool` to translate `SDL_bool`. For [macro functions](CHEATSHEET.md) use `Boolean`. (see issue [#30](https://github.com/PascalGameDevelopment/SDL2-for-Pascal/issues/30)).\n\n4. If an identifier or a function declaration is gone, mark them as `deprecated`. (see issue [#34](https://github.com/PascalGameDevelopment/SDL2-for-Pascal/issues/34))\n\n5. For convenience we encourage to add single and double pointers for any SDL type. (see issue [#105](https://github.com/PascalGameDevelopment/SDL2-for-Pascal/issues/105))\n\n6. Have a look at our [Translation Cheat Sheet](CHEATSHEET.md) for reference.\n\n## Versions\n\nThe version tag (see [tags](https://github.com/PascalGameDevelopment/SDL2-for-Pascal/tags)) refers to the version of this translation package [SDL2 for Pascal](https://github.com/PascalGameDevelopment/SDL2-for-Pascal), not the `SDL2 library`.\n\n### v2.x (work in progress)\n\n- updates\n\n### v2.3 Stable (16/03/2025)\n\n- updates sdl2_mixer unit to v2.8.1\n- updates sdl2_ttf unit to v2.24.0\n- major update of sdlthreads.inc\n- update of sdlvideo.inc\n- update of sdlrenderer.inc\n- update of sdlgamecontroller.inc\n- patches, cleanups and bugfixes in many other inc files\n- bugfixes in sdl2_gfx unit\n- deletes obsolete files\n- improve CI workflow\n- improve Delphi compatibility\n\n### v2.2 Stable (02/01/2024)\n\n- SDL2 unit is up-to-date with _at least_ version 2.0.14 of the `SDL2 library`\n- many aliases got replaced by typed enums\n- add single and double pointers for all types (thanks furious-programming)\n- update SDL_ttf.pas to latest version 2.21.0\n- replace data types by c data types (see PR [#29](https://github.com/PascalGameDevelopment/SDL2-for-Pascal/pull/29))\n- add folder structure (see PR [#27](https://github.com/PascalGameDevelopment/SDL2-for-Pascal/pull/27))\n- many bugfixes\n\n### v2.1 Compatibility Release (25/09/2021)\n\n- This release has all commits until the change of the project folder structure (see PR [#27](https://github.com/PascalGameDevelopment/SDL2-for-Pascal/pull/27)). Compare the disucssion in issue #22.\n- Moving the units to a new location may (1) raise difficulties in committing new changes if the branch was started before and (2) make updates of project research pathes necessary.\n- updates of SDL2_Mixer, SDL2_Image, SDL2_TTF and some include files\n- introduce float point types\n- bugfixes\n\n### v2.0\n\n- first official release of the PGD community fork of the [Pascal-SDL-2-Headers](https://github.com/ev1313/Pascal-SDL-2-Headers)\n  - its latest version git tag is 1.72, in the sdl2.pas it goes even up to version 1.80; hence starting with v2.0 for this fork is a senseful distinction\n- this ia a highly Delphi-compatible and stable fallback package\n- loosely is up-to-date with version 2.0.4 of the `SDL2 library`\n\n## License\n\nYou may license the Pascal SDL2 units either\nwith the [MPL license](blob/master/MPL-LICENSE) or\nwith the [zlib license](blob/master/zlib-LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPascalGameDevelopment%2FSDL2-for-Pascal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPascalGameDevelopment%2FSDL2-for-Pascal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPascalGameDevelopment%2FSDL2-for-Pascal/lists"}