{"id":15950101,"url":"https://github.com/mgrojo/asfml","last_synced_at":"2025-03-16T07:31:41.815Z","repository":{"id":48021413,"uuid":"298900902","full_name":"mgrojo/ASFML","owner":"mgrojo","description":"Ada binding to the SFML library","archived":false,"fork":false,"pushed_at":"2024-09-04T18:34:51.000Z","size":11078,"stargazers_count":33,"open_issues_count":2,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-08T12:58:00.121Z","etag":null,"topics":["ada","audio","binding","cross-platform","games","graphics","multimedia","opengl","sfml"],"latest_commit_sha":null,"homepage":"","language":"Ada","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mgrojo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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-09-26T21:16:42.000Z","updated_at":"2024-09-04T18:34:54.000Z","dependencies_parsed_at":"2024-05-03T01:53:06.874Z","dependency_job_id":"07f609b2-78f0-4052-94ad-bac64a29afbe","html_url":"https://github.com/mgrojo/ASFML","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgrojo%2FASFML","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgrojo%2FASFML/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgrojo%2FASFML/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgrojo%2FASFML/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mgrojo","download_url":"https://codeload.github.com/mgrojo/ASFML/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243841127,"owners_count":20356440,"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":["ada","audio","binding","cross-platform","games","graphics","multimedia","opengl","sfml"],"created_at":"2024-10-07T12:58:05.575Z","updated_at":"2025-03-16T07:31:41.800Z","avatar_url":"https://github.com/mgrojo.png","language":"Ada","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![ASFML logo](images/ASFML_Logo.png)](https://www.sfml-dev.org)\n![Ada (GNAT)](https://github.com/mgrojo/ASFML/workflows/Build/badge.svg)\n[![Alire](https://img.shields.io/endpoint?url=https://alire.ada.dev/badges/asfml.json)](https://alire.ada.dev/crates/asfml.html)\n[![Alire CI/CD](https://img.shields.io/endpoint?url=https://alire-crate-ci.ada.dev/badges/asfml.json)](https://alire-crate-ci.ada.dev/crates/asfml.html)\n[![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/ada-lang/Lobby)\n[![Mentioned in Awesome Ada](https://awesome.re/mentioned-badge.svg)](https://github.com/ohenley/awesome-ada)\n\n# ASFML — Ada's Simple and Fast Multimedia Library\n\nASFML is an Ada semi-thick binding to the [SFML](https://www.sfml-dev.org/)\nlibrary. It uses Ada types and portable defined types which eliminates the inclusion of Ada interface libraries, but most of the functions are directly imported.\n\nIt is written in standard Ada without the use of any specific GNAT extensions, but some indirect dependency could exist through the representation of some types.\n\n## State\n\nThe binding is considered complete. Several versions of [CSFML](https://github.com/SFML/CSFML)\n have been bound: 1.6, 2.4, 2.5 and 2.6 (see [Releases](https://github.com/mgrojo/ASFML/releases/)). The API is considered stable, changes would only be made to fix errors or to upgrade to a new SFML version.\n\nThe library has been tested with several GNAT versions and on Windows 10 and Ubuntu Linux 20.04 LTS and 22.04.\n\n## API Documentation\n\nGenerated API documentation can be consulted [online](https://mgrojo.github.io/ASFML/doc/).\n\nThe Ada API follows the [CSFML](https://26.customprotocol.com/csfml/index.htm) interface, but\nwith some changes and additions to ease the use:\n* Prefixes in C are converted to simple names inside hierarchical packages. For example, the\nfunction `sfMusic_createFromFile` in `SFML/Audio/Music.h` is transformed into the `createFromFile`\nfunction in the `Sf.Audio.Music` package.\n* Basic data types from `SFML/Config.h` are defined in the `Sf` package.\n* General types at `SFML/Module/Types.h` are moved to the package `Sf.Module`, where `Module`\nis Audio, System, Graphics, Window and Network.\n* Defaults are applied to parameters when useful and to approximate the C++ API.\n* Functions with `char*` parameters are wrapped to do the conversion to standard Ada `String`\n  parameters.\n* Unicode is supported using `Wide_Wide_String` in Ada where the C API uses `sfUint32*`\n\n## Compatibility with CSFML releases\nThe versioning scheme of ASFML follows the one of CSFML for the major\nand minor numbers; while the patch number is, in principle,\nindependent. This means, for example, that 2.4.x releases are expected\nto be compatible with all 2.4.x releases of CSFML. Note, however, that\nsome CSFML releases change the API to fix problems with the binding to\nSFML and they release them as a patch. Consequently, there are cases,\nlike CSFML 2.5.2, which requires a specific patch level of ASFML, in this\ncase, ASFML 2.5.5. When this happens, the Alire dependencies reflect\nthe requirement.\n\nNevertheless, the usual problems that can be found when doing an\nheterogeneous linking are only spotted when calling one of the\nfunctions having changed between the releases. Otherwise, the\nincompatibility will be latent.\n\n## How to build with Alire\n\nThis library is available in [Alire](https://alire.ada.dev/) so building is as easy as installing Alire and then executing:\n`alr build asfml`\n\n## How to build without Alire\n\nInstall CSFML following instructions of your platform. For example, under Ubuntu or Debian:\n`sudo apt-get install gnat gprbuild libcsfml-dev libglu1-mesa-dev`\n\nOpen a terminal and run this command:\n`gprbuild asfml.gpr`\n\n## How to use\n\nTo compile your program you need to \"with\" the `asfml.gpr` project. Then\nyou can build using gprbuild.\n\nUse `asfml_opengl.gpr` if you are using OpenGL.\n\nUnder Windows, you might need to update the path to your libraries in the\nprovided GPR files.\n\nUsing Alire, you can add this library to your project as simply as:\n`alr with asfml`\n\n## Examples\nYou can see simple test examples in the [`tests`](./tests/) directory. For some demo games,\nyou can review the project [16-Games](https://github.com/mgrojo/16-Games).\n\nLinks to projects using ASFML can be found in the\n[Wiki](https://github.com/mgrojo/ASFML/wiki#list-of-projects-using-asfml).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgrojo%2Fasfml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmgrojo%2Fasfml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgrojo%2Fasfml/lists"}