71#if defined(__EMSCRIPTEN__)
72# define BJ_OS_EMSCRIPTEN
73#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
75#elif defined(__linux__) || defined(__gnu_linux__)
79# include <TargetConditionals.h>
82# elif TARGET_IPHONE_SIMULATOR
84# define BJ_OS_IOS_SIMULATOR
89# define BJ_OS_APPLE_UNKNOWN
99#if defined(BJ_OS_UNIX)
101# if defined(_POSIX_VERSION)
112#if defined(BJ_COMPILER_DOXYGEN)
113# define BJ_COMPILER_NAME "Doxygen"
114# define BJ_COMPILER_VERSION 0
115#elif defined(__EMSCRIPTEN__)
116# include <emscripten/version.h>
117# define BJ_COMPILER_EMSCRIPTEN
118# define BJ_COMPILER_NAME "Emscripten"
119# define BJ_COMPILER_VERSION __EMSCRIPTEN_major__
120#elif defined(__GNUC__) && !defined(__clang__)
121# define BJ_COMPILER_GCC
122# define BJ_COMPILER_NAME "GCC"
123# define BJ_COMPILER_VERSION __GNUC__
124#elif defined(__clang__)
125# define BJ_COMPILER_CLANG
126# define BJ_COMPILER_NAME "Clang"
127# define BJ_COMPILER_VERSION __clang_major__
128#elif defined(_MSC_VER)
129# define BJ_COMPILER_MSVC
130# define BJ_COMPILER_NAME "MSVC"
131# define BJ_COMPILER_VERSION _MSC_VER
132#elif defined(__MINGW32__)
133# define BJ_COMPILER_MINGW
134# define BJ_COMPILER_NAME "MinGW"
135# define BJ_COMPILER_VERSION 0
137# define BJ_COMPILER_UNKNOWN
138# define BJ_COMPILER_NAME "Unknown"
139# define BJ_COMPILER_VERSION 0
148#if defined(NDEBUG) || defined(BJ_COMPILER_DOXYGEN)
149# define BJ_BUILD_RELEASE
153#if !defined(NDEBUG) || defined(BJ_COMPILER_DOXYGEN)
154# define BJ_BUILD_DEBUG
162#if defined(BANJO_STATIC) || defined(BJ_COMPILER_DOXYGEN)
164# define BANJO_NO_EXPORT
169# define BANJO_EXPORT __declspec(dllexport)
171# define BANJO_EXPORT __declspec( dllexport )
174# ifndef BANJO_NO_EXPORT
175# define BANJO_NO_EXPORT
180# define BANJO_EXPORT __attribute__((visibility("default")))
182# define BANJO_EXPORT __attribute__((visibility("default")))
185# ifndef BANJO_NO_EXPORT
186# define BANJO_NO_EXPORT __attribute__((visibility("hidden")))
196#if defined(__cplusplus)
197 #if defined(__GNUC__) || defined(__clang__)
198 #define BJ_RESTRICT __restrict__
199 #elif defined(_MSC_VER)
200 #define BJ_RESTRICT __restrict
206 #if defined(BJ_COMPILER_DOXYGEN) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
207 #define BJ_RESTRICT restrict
208 #elif defined(__GNUC__) || defined(__clang__)
209 #define BJ_RESTRICT __restrict__
210 #elif defined(_MSC_VER)
211 #define BJ_RESTRICT __restrict
224 #if defined(BJ_API_FORCE_INLINE)
225 #define BJ_INLINE __forceinline
227 #if !defined(__cplusplus) && !defined(inline)
228 #define BJ_INLINE __inline
230 #define BJ_INLINE inline
233#elif defined(__GNUC__) || defined(__clang__)
234 #if defined(BJ_API_FORCE_INLINE)
235 #define BJ_INLINE inline __attribute__((always_inline))
237 #define BJ_INLINE inline
240 #if defined(BJ_COMPILER_DOXYGEN) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
241 #define BJ_INLINE inline
266#define BJ_FALSE ((bj_bool)0)
275#define BJ_TRUE ((bj_bool)1)
Describe properties of an audio device.
Parser context and argument list descriptor.
Descriptor for a single command line argument.
bj_bool checks_log
Checks log failures.
const char * name
API name (see BJ_NAME).
bj_bool pedantic
Extra runtime checks enabled.
uint32_t version
Packed API version (see BJ_VERSION).
bj_bool log_color
Colored log output enabled.
bj_bool backend_win32
Built with Win32 window support.
bj_bool backend_alsa
Built with ALSA audio.
bj_bool fastmath
Built with fast-math optimizations.
bj_bool backend_wayland
Built with Wayland window support.
const char * compiler_name
Compiler name string.
bj_bool backend_x11
Built with X11 window support.
bj_bool backend_emscripten
Built with Emscripten support.
const char * variant
API name variant (see BJ_NAME_VARIANT).
bj_bool debug
Non-zero if built with debug info.
bj_bool backend_cocoa
Built with Cocoa/macOS support.
bj_bool checks_abort
Checks abort execution on failure.
int compiler_version
Compiler version number.
bj_bool backend_mme
Built with Windows MME audio.
struct bj_datagram bj_datagram
struct bj_render_target bj_render_target
struct bj_stream bj_stream
struct bj_address bj_address
uint32_t bj_bool
Boolean type used throughout the Banjo API.
struct bj_bitmap bj_bitmap
struct bj_window bj_window
struct bj_tcp_listener bj_tcp_listener
struct bj_audio_device bj_audio_device
struct bj_tcp_stream bj_tcp_stream
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.
Represent a mouse cursor movement event.
Represent a mouse enter or leave event.
Represent a generic window-related event.
Represent a keyboard key event.
3×2 column-major matrix (2D affine).
4×3 column-major matrix (3D affine).
Axis-aligned rectangle: a top-left corner plus a width and height.
2D vector of bj_real components.
3D vector of bj_real components.
4D vector of bj_real components.
Custom allocation callbacks.
2D point mass state and physical properties.
Rigid body with translational and angular components.
Structure representing a simple stopwatch.
Define parameters for generating simple waveforms.