Download the PHP package serafim/ffi-sdl without Composer
On this page you can find all versions of the php package serafim/ffi-sdl. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download serafim/ffi-sdl
More information about serafim/ffi-sdl
Files in serafim/ffi-sdl
Package ffi-sdl
Short Description SDL FFI bindings for the PHP language
License MIT
Homepage https://github.com/SerafimArts/ffi-sdl
Informations about the package ffi-sdl
FFI SDL Bindings
A SDL FFI bindings for the PHP language.
- System Requirements
- Installation
- Extensions
- Documentation
- Initialization
- Example
Requirements
- PHP ^8.1
- ext-ffi
- Windows, Linux, BSD or MacOS
- Android, iOS or something else are not supported yet
- SDL >= 2.0
Installation
Library is available as composer repository and can be installed using the following command in a root of your project.
Additional dependencies:
- Debian-based Linux:
sudo apt install libsdl2-2.0-0 -y
- MacOS:
brew install sdl2
- Window: Can be downloaded from here
Extensions
Documentation
The library API completely supports and repeats the analogue in the C language.
- API not yet fully documented and may not work in places.
- Low level and inline functions (such as
SDL_malloc
orSDL_memcpy
) have been removed.
Initialization
To specify a library pathname explicitly, you can add the library
argument to
the Serafim\SDL\SDL
constructor.
By default, the library will try to resolve the binary's pathname automatically.
You can explicitly specify the platform (OS) that will be used as the basis for compiling headers.
By default, the library will try to resolve the platform automatically.
You can also specify the library version explicitly. Depending on this version, the corresponding functions of the SDL will be available.
By default, the library will try to resolve SDL version automatically.
To speed up the header compiler, you can use any PSR-16 compatible cache driver.
In addition, you can control other preprocessor directives explicitly:
Example
All versions of ffi-sdl with dependencies
ext-ffi Version *
ffi-headers/contracts Version ^1.0
ffi/env Version ^1.0
ffi/location Version ^1.0
ffi/preprocessor Version ^0.2
ffi/proxy Version ^1.0
psr/simple-cache Version ^1.0|^2.0|^3.0