Banjo API 0.0.1
C99 game development API
|
Functions | |
bj_bool | bj_initialize (bj_error **p_error) |
void | bj_shutdown (bj_error **p_error) |
void * | bj_load_library (const char *p_path) |
void | bj_unload_library (void *p_handle) |
void * | bj_library_symbol (void *p_handle, const char *p_name) |
Abstraction to usual system calls such as library loading and time.
Initializes the system.
p_error | An optional location to an error object. |
The initialization process will iteratively try to initialize a subsystem among the ones available and returns on the first that succeeded.
void * bj_library_symbol | ( | void * | p_handle, |
const char * | p_name ) |
Get the address of a function exported by p_handle given its name.
This function is an abstraction over the platform specific function like dlsym and GetProcAddress.
p_handle | A library handle provided by bj_load_library. |
p_name | C-String name of the function to retrieve |
The caller is responsible for release the loaded function using bj_unload_library with p_handle.
void * bj_load_library | ( | const char * | p_path | ) |
Load the provided dynamic library and returns and opaque handle to it.
This function is an abstraction over the platform specific function like dlopen and LoadLibrary. The provided pointer can be used with bj_library_symbol to get a function from the loaded library.
p_path | A C-string path to the library to load. |
The caller is responsible for release the loaded library using bj_unload_library.
void bj_shutdown | ( | bj_error ** | p_error | ) |
De-initializes the system.
p_error | An optional location to an error object. |
void bj_unload_library | ( | void * | p_handle | ) |
Unload a library loaded with bj_load_library from memory.
This function is an abstraction over the platform specific function like dlclose and FreeLibrary.
p_handle | The library to unload. |
The caller is responsible for release the loaded library using bj_unload_library.