Banjo API 1.0.0-rc.2
Low-level C99 game development API
Loading...
Searching...
No Matches
system.h
Go to the documentation of this file.
1
70#ifndef BJ_SYSTEM_H
71#define BJ_SYSTEM_H
72
73#include <banjo/api.h>
74#include <banjo/error.h>
75
76#include <stddef.h> /* size_t */
77
84
97 int systems,
98 struct bj_error** error
99);
100
130 const char** p_names,
131 size_t cap
132);
133
142 void
143);
144
180 enum bj_system system,
181 const char* backend_name,
182 struct bj_error** error
183);
184
198 enum bj_system system,
199 struct bj_error** error
200);
201
234 const char* path,
235 struct bj_error** error
236);
237
263 void* handle
264);
265
297 void* handle,
298 const char* name,
299 struct bj_error** error
300);
301
302#endif
General-purpose definitions for Banjo API.
Recoverable error handling.
struct bj_error bj_error
Definition api.h:333
#define BANJO_EXPORT
Definition api.h:163
uint32_t bj_bool
Boolean type used throughout the Banjo API.
Definition api.h:257
bj_bool bj_begin(int systems, struct bj_error **error)
Initialises the system.
void bj_end_system(enum bj_system system, struct bj_error **error)
De-initialises a single system with reference counting.
void * bj_load_library(const char *path, struct bj_error **error)
Load the provided dynamic library and returns and opaque handle to it.
size_t bj_video_backends(const char **p_names, size_t cap)
Enumerate the video backends compiled into this build.
void bj_end(void)
De-initialises the system.
bj_system
Definition system.h:78
bj_bool bj_begin_system(enum bj_system system, const char *backend_name, struct bj_error **error)
Initialise one subsystem (refcounted), optionally pinning a backend.
void * bj_library_symbol(void *handle, const char *name, struct bj_error **error)
Get the address of a function exported by handle given its name.
void bj_unload_library(void *handle)
Unload a library loaded with bj_load_library from memory.
@ BJ_VIDEO_SYSTEM
Definition system.h:81
@ BJ_NETWORK_SYSTEM
Definition system.h:82
@ BJ_AUDIO_SYSTEM
Definition system.h:80
@ BJ_NO_SYSTEM
Definition system.h:79