21#if defined(__EMSCRIPTEN__)
22# define BJ_OS_EMSCRIPTEN
23#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
25#elif defined(__linux__) || defined(__gnu_linux__)
29# include <TargetConditionals.h>
32# elif TARGET_IPHONE_SIMULATOR
34# define BJ_OS_IOS_SIMULATOR
39# define BJ_OS_APPLE_UNKNOWN
49#if defined(BJ_OS_UNIX)
51# if defined(_POSIX_VERSION)
62#if defined(BJ_COMPILER_DOXYGEN)
63# define BJ_COMPILER_NAME "Doxygen"
64# define BJ_COMPILER_VERSION 0
65#elif defined(__EMSCRIPTEN__)
66# include <emscripten/version.h>
67# define BJ_COMPILER_EMSCRIPTEN
68# define BJ_COMPILER_NAME "Emscripten"
69# define BJ_COMPILER_VERSION __EMSCRIPTEN_major__
70#elif defined(__GNUC__) && !defined(__clang__)
71# define BJ_COMPILER_GCC
72# define BJ_COMPILER_NAME "GCC"
73# define BJ_COMPILER_VERSION __GNUC__
74#elif defined(__clang__)
75# define BJ_COMPILER_CLANG
76# define BJ_COMPILER_NAME "Clang"
77# define BJ_COMPILER_VERSION __clang_major__
78#elif defined(_MSC_VER)
79# define BJ_COMPILER_MSVC
80# define BJ_COMPILER_NAME "MSVC"
81# define BJ_COMPILER_VERSION _MSC_VER
82#elif defined(__MINGW32__)
83# define BJ_COMPILER_MINGW
84# define BJ_COMPILER_NAME "MinGW"
85# define BJ_COMPILER_VERSION 0
87# define BJ_COMPILER_UNKNOWN
88# define BJ_COMPILER_NAME "Unknown"
89# define BJ_COMPILER_VERSION 0
98#if defined(NDEBUG) || defined(BJ_COMPILER_DOXYGEN)
99# define BJ_BUILD_RELEASE
103#if !defined(NDEBUG) || defined(BJ_COMPILER_DOXYGEN)
104# define BJ_BUILD_DEBUG
112#if defined(BANJO_STATIC) || defined(BJ_COMPILER_DOXYGEN)
114# define BANJO_NO_EXPORT
119# define BANJO_EXPORT __declspec(dllexport)
121# define BANJO_EXPORT __declspec( dllexport )
124# ifndef BANJO_NO_EXPORT
125# define BANJO_NO_EXPORT
130# define BANJO_EXPORT __attribute__((visibility("default")))
132# define BANJO_EXPORT __attribute__((visibility("default")))
135# ifndef BANJO_NO_EXPORT
136# define BANJO_NO_EXPORT __attribute__((visibility("hidden")))
146#if defined(__cplusplus)
147 #if defined(__GNUC__) || defined(__clang__)
148 #define BJ_RESTRICT __restrict__
149 #elif defined(_MSC_VER)
150 #define BJ_RESTRICT __restrict
156 #if defined(BJ_COMPILER_DOXYGEN) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
157 #define BJ_RESTRICT restrict
158 #elif defined(__GNUC__) || defined(__clang__)
159 #define BJ_RESTRICT __restrict__
160 #elif defined(_MSC_VER)
161 #define BJ_RESTRICT __restrict
174 #if defined(BJ_API_FORCE_INLINE)
175 #define BJ_INLINE __forceinline
177 #if !defined(__cplusplus) && !defined(inline)
178 #define BJ_INLINE __inline
180 #define BJ_INLINE inline
183#elif defined(__GNUC__) || defined(__clang__)
184 #if defined(BJ_API_FORCE_INLINE)
185 #define BJ_INLINE inline __attribute__((always_inline))
187 #define BJ_INLINE inline
190 #if defined(BJ_COMPILER_DOXYGEN) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
191 #define BJ_INLINE inline
216#define BJ_FALSE ((bj_bool)0)
225#define BJ_TRUE ((bj_bool)1)
Describe properties of an audio device.
Definition audio.h:108
Parser context and argument list descriptor.
Definition cli.h:161
Descriptor for a single command line argument.
Definition cli.h:139
bj_bool checks_log
Checks log failures.
Definition api.h:242
const char * name
API name (see BJ_NAME).
Definition api.h:229
bj_bool pedantic
Extra runtime checks enabled.
Definition api.h:245
uint32_t version
Packed API version (see BJ_VERSION).
Definition api.h:231
bj_bool log_color
Colored log output enabled.
Definition api.h:244
bj_bool backend_win32
Built with Win32 window support.
Definition api.h:239
bj_bool backend_alsa
Built with ALSA audio.
Definition api.h:235
bj_bool fastmath
Built with fast-math optimizations.
Definition api.h:243
const char * compiler_name
Compiler name string.
Definition api.h:232
bj_bool backend_x11
Built with X11 window support.
Definition api.h:240
bj_bool backend_emscripten
Built with Emscripten support.
Definition api.h:237
const char * variant
API name variant (see BJ_NAME_VARIANT).
Definition api.h:230
bj_bool debug
Non-zero if built with debug info.
Definition api.h:234
bj_bool backend_cocoa
Built with Cocoa/macOS support.
Definition api.h:236
bj_bool checks_abort
Checks abort execution on failure.
Definition api.h:241
int compiler_version
Compiler version number.
Definition api.h:233
bj_bool backend_mme
Built with Windows MME audio.
Definition api.h:238
struct bj_mat3x3 bj_mat3
Definition api.h:286
struct bj_datagram bj_datagram
Definition api.h:308
struct bj_stream bj_stream
Definition api.h:298
struct bj_address bj_address
Definition api.h:304
struct bj_error bj_error
Definition api.h:282
#define BANJO_EXPORT
Definition api.h:113
struct bj_udp bj_udp
Definition api.h:307
uint32_t bj_bool
Boolean type used throughout the Banjo API.
Definition api.h:207
struct bj_bitmap bj_bitmap
Definition api.h:277
struct bj_renderer bj_renderer
Definition api.h:295
struct bj_window bj_window
Definition api.h:303
struct bj_vec4 bj_quat
Definition api.h:301
struct bj_tcp_listener bj_tcp_listener
Definition api.h:305
struct bj_audio_device bj_audio_device
Definition api.h:274
struct bj_mat4x4 bj_mat4
Definition api.h:289
struct bj_tcp_stream bj_tcp_stream
Definition api.h:306
const struct bj_build_info * bj_build_information(void)
Get runtime build information for the loaded Banjo binaries.
Structure holding build information of the binary.
Definition api.h:228
Represent a mouse cursor movement event.
Definition event.h:320
Represent a mouse enter or leave event.
Definition event.h:311
Represent a generic window-related event.
Definition event.h:362
Represent a keyboard key event.
Definition event.h:338
struct bj_mat3x2: 3×2 column-major matrix backed by struct bj_vec2.
Definition mat.h:35
struct bj_mat4x3: 4×3 column-major matrix backed by struct bj_vec3.
Definition mat.h:53
struct bj_mat4x4: 4×4 column-major matrix backed by struct bj_vec4.
Definition mat.h:43
Represents a rectangle with position and dimensions.
Definition rect.h:19
struct bj_vec2: 2D vector of bj_real values.
Definition vec.h:26
struct bj_vec3: 3D vector of bj_real values.
Definition vec.h:38
struct bj_vec4: 4D vector of bj_real values.
Definition vec.h:51
Custom allocation callbacks.
Definition memory.h:71
Angular.
Definition physics_2d.h:226
2D point mass state and physical properties.
Definition physics_2d.h:78
Rigid body with translational and angular components.
Definition physics_2d.h:268
PCG32 generator state.
Definition random.h:46
Structure representing a simple stopwatch.
Definition time.h:97
Define parameters for generating simple waveforms.
Definition audio.h:254