sdl3-bindgen-sys
Safe HaskellNone
LanguageGHC2021

SDL3.Sys.Bindgen.Loadso.Unsafe

Synopsis

Documentation

sDL_LoadObject Source #

Arguments

:: PtrConst CChar
sofile
a system-dependent name of the object file.
-> IO (Ptr SDL_SharedObject) 

Dynamically load a shared object.

Returns
an opaque pointer to the object handle or NULL on failure; call SDL_GetError() for more information.
Thread safety
It is safe to call this function from any thread.
See also
sDL_LoadFunction, sDL_UnloadObject
C declaration
SDL_LoadObject, defined at SDL3/SDL_loadso.h 93:48

Since: 3.2.0

sDL_LoadFunction Source #

Arguments

:: Ptr SDL_SharedObject
handle
a valid shared object handle returned by SDL_LoadObject().
-> PtrConst CChar
name
the name of the function to look up.
-> IO SDL_FunctionPointer 

Look up the address of the named function in a shared object.

This function pointer is no longer valid after calling SDL_UnloadObject().

This function can only look up C function names. Other languages may have name mangling and intrinsic language support that varies from compiler to compiler.

Make sure you declare your function pointers with the same calling convention as the actual library function. Your code will crash mysteriously if you do not do this.

If the requested function doesn't exist, NULL is returned.

Returns
a pointer to the function or NULL on failure; call SDL_GetError() for more information.
Thread safety
It is safe to call this function from any thread.
See also
sDL_LoadObject
C declaration
SDL_LoadFunction, defined at SDL3/SDL_loadso.h 121:49

Since: 3.2.0

sDL_UnloadObject Source #

Arguments

:: Ptr SDL_SharedObject
handle
a valid shared object handle returned by SDL_LoadObject().
-> IO () 

Unload a shared object from memory.

Note that any pointers from this object looked up through SDL_LoadFunction() will no longer be valid.

Thread safety
It is safe to call this function from any thread.
See also
sDL_LoadObject
C declaration
SDL_UnloadObject, defined at SDL3/SDL_loadso.h 137:34

Since: 3.2.0