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
55#if defined(BJ_COMPILER_DOXYGEN)
56# define BJ_COMPILER_NAME "Doxygen"
57# define BJ_COMPILER_VERSION 0
58#elif defined(__EMSCRIPTEN__)
59# include <emscripten/version.h>
60# define BJ_COMPILER_EMSCRIPTEN
61# define BJ_COMPILER_NAME "Emscripten"
62# define BJ_COMPILER_VERSION __EMSCRIPTEN_major__
63#elif defined(__GNUC__) && !defined(__clang__)
64# define BJ_COMPILER_GCC
65# define BJ_COMPILER_NAME "GCC"
66# define BJ_COMPILER_VERSION __GNUC__
67#elif defined(__clang__)
68# define BJ_COMPILER_CLANG
69# define BJ_COMPILER_NAME "Clang"
70# define BJ_COMPILER_VERSION __clang_major__
71#elif defined(_MSC_VER)
72# define BJ_COMPILER_MSVC
73# define BJ_COMPILER_NAME "MSVC"
74# define BJ_COMPILER_VERSION _MSC_VER
75#elif defined(__MINGW32__)
76# define BJ_COMPILER_MINGW
77# define BJ_COMPILER_NAME "MinGW"
78# define BJ_COMPILER_VERSION 0
80# define BJ_COMPILER_UNKNOWN
81# define BJ_COMPILER_NAME "Unknown"
82# define BJ_COMPILER_VERSION 0
91#if defined(NDEBUG) || defined(BJ_COMPILER_DOXYGEN)
92# define BJ_BUILD_RELEASE
96#if !defined(NDEBUG) || defined(BJ_COMPILER_DOXYGEN)
97# define BJ_BUILD_DEBUG
105#if defined(BANJO_STATIC) || defined(BJ_COMPILER_DOXYGEN)
107# define BANJO_NO_EXPORT
112# define BANJO_EXPORT __declspec(dllexport)
114# define BANJO_EXPORT __declspec( dllexport )
117# ifndef BANJO_NO_EXPORT
118# define BANJO_NO_EXPORT
123# define BANJO_EXPORT __attribute__((visibility("default")))
125# define BANJO_EXPORT __attribute__((visibility("default")))
128# ifndef BANJO_NO_EXPORT
129# define BANJO_NO_EXPORT __attribute__((visibility("hidden")))
139#if defined(__cplusplus)
140 #if defined(__GNUC__) || defined(__clang__)
141 #define BJ_RESTRICT __restrict__
142 #elif defined(_MSC_VER)
143 #define BJ_RESTRICT __restrict
149 #if defined(BJ_COMPILER_DOXYGEN) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
150 #define BJ_RESTRICT restrict
151 #elif defined(__GNUC__) || defined(__clang__)
152 #define BJ_RESTRICT __restrict__
153 #elif defined(_MSC_VER)
154 #define BJ_RESTRICT __restrict
167 #if defined(BJ_API_FORCE_INLINE)
168 #define BJ_INLINE __forceinline
170 #if !defined(__cplusplus) && !defined(inline)
171 #define BJ_INLINE __inline
173 #define BJ_INLINE inline
176#elif defined(__GNUC__) || defined(__clang__)
177 #if defined(BJ_API_FORCE_INLINE)
178 #define BJ_INLINE inline __attribute__((always_inline))
180 #define BJ_INLINE inline
183 #if defined(BJ_COMPILER_DOXYGEN) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
184 #define BJ_INLINE inline
209#define BJ_FALSE ((bj_bool)0)
218#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:235
const char * name
API name (see BJ_NAME).
Definition api.h:222
bj_bool pedantic
Extra runtime checks enabled.
Definition api.h:238
uint32_t version
Packed API version (see BJ_VERSION).
Definition api.h:224
bj_bool log_color
Colored log output enabled.
Definition api.h:237
bj_bool backend_win32
Built with Win32 window support.
Definition api.h:232
bj_bool backend_alsa
Built with ALSA audio.
Definition api.h:228
bj_bool fastmath
Built with fast-math optimizations.
Definition api.h:236
const char * compiler_name
Compiler name string.
Definition api.h:225
bj_bool backend_x11
Built with X11 window support.
Definition api.h:233
bj_bool backend_emscripten
Built with Emscripten support.
Definition api.h:230
const char * variant
API name variant (see BJ_NAME_VARIANT).
Definition api.h:223
bj_bool debug
Non-zero if built with debug info.
Definition api.h:227
bj_bool backend_cocoa
Built with Cocoa/macOS support.
Definition api.h:229
bj_bool checks_abort
Checks abort execution on failure.
Definition api.h:234
int compiler_version
Compiler version number.
Definition api.h:226
bj_bool backend_mme
Built with Windows MME audio.
Definition api.h:231
struct bj_mat3x3 bj_mat3
Definition api.h:279
struct bj_stream bj_stream
Definition api.h:291
struct bj_error bj_error
Definition api.h:275
#define BANJO_EXPORT
Definition api.h:106
uint32_t bj_bool
Boolean type used throughout the Banjo API.
Definition api.h:200
struct bj_bitmap bj_bitmap
Definition api.h:270
struct bj_renderer bj_renderer
Definition api.h:288
struct bj_window bj_window
Definition api.h:296
struct bj_vec4 bj_quat
Definition api.h:294
struct bj_audio_device bj_audio_device
Definition api.h:267
struct bj_mat4x4 bj_mat4
Definition api.h:282
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:221
Represent a mouse cursor movement event.
Definition event.h:318
Represent a mouse enter or leave event.
Definition event.h:309
Represent a generic window-related event.
Definition event.h:360
Represent a keyboard key event.
Definition event.h:336
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