73#if defined(__EMSCRIPTEN__)
74# define BJ_OS_EMSCRIPTEN
75#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
77#elif defined(__linux__) || defined(__gnu_linux__)
81# include <TargetConditionals.h>
84# elif TARGET_IPHONE_SIMULATOR
86# define BJ_OS_IOS_SIMULATOR
91# define BJ_OS_APPLE_UNKNOWN
101#if defined(BJ_OS_UNIX)
103# if defined(_POSIX_VERSION)
114#if defined(BJ_COMPILER_DOXYGEN)
115# define BJ_COMPILER_NAME "Doxygen"
116# define BJ_COMPILER_VERSION 0
117#elif defined(__EMSCRIPTEN__)
118# include <emscripten/version.h>
119# define BJ_COMPILER_EMSCRIPTEN
120# define BJ_COMPILER_NAME "Emscripten"
121# define BJ_COMPILER_VERSION __EMSCRIPTEN_major__
122#elif defined(__GNUC__) && !defined(__clang__)
123# define BJ_COMPILER_GCC
124# define BJ_COMPILER_NAME "GCC"
125# define BJ_COMPILER_VERSION __GNUC__
126#elif defined(__clang__)
127# define BJ_COMPILER_CLANG
128# define BJ_COMPILER_NAME "Clang"
129# define BJ_COMPILER_VERSION __clang_major__
130#elif defined(_MSC_VER)
131# define BJ_COMPILER_MSVC
132# define BJ_COMPILER_NAME "MSVC"
133# define BJ_COMPILER_VERSION _MSC_VER
134#elif defined(__MINGW32__)
135# define BJ_COMPILER_MINGW
136# define BJ_COMPILER_NAME "MinGW"
137# define BJ_COMPILER_VERSION 0
139# define BJ_COMPILER_UNKNOWN
140# define BJ_COMPILER_NAME "Unknown"
141# define BJ_COMPILER_VERSION 0
152#if defined(NDEBUG) || defined(BJ_COMPILER_DOXYGEN)
153# define BJ_BUILD_RELEASE
158#if !defined(NDEBUG) || defined(BJ_COMPILER_DOXYGEN)
159# define BJ_BUILD_DEBUG
169# define BJ_EXTERN_C extern "C"
178#if defined(BANJO_STATIC) || defined(BJ_COMPILER_DOXYGEN)
179# define BANJO_EXPORT BJ_EXTERN_C
180# define BANJO_NO_EXPORT
181#elif defined(_WIN32) || defined(__CYGWIN__)
182# if defined(BANJO_EXPORTS)
183# define BANJO_EXPORT BJ_EXTERN_C __declspec(dllexport)
184# elif defined(_MSC_VER)
185# define BANJO_EXPORT BJ_EXTERN_C __declspec(dllimport)
190# define BANJO_EXPORT BJ_EXTERN_C
192# define BANJO_NO_EXPORT
194# define BANJO_EXPORT BJ_EXTERN_C __attribute__((visibility("default")))
195# define BANJO_NO_EXPORT __attribute__((visibility("hidden")))
203#if defined(__cplusplus)
204 #if defined(__GNUC__) || defined(__clang__)
205 #define BJ_RESTRICT __restrict__
206 #elif defined(_MSC_VER)
207 #define BJ_RESTRICT __restrict
213 #if defined(BJ_COMPILER_DOXYGEN) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
214 #define BJ_RESTRICT restrict
215 #elif defined(__GNUC__) || defined(__clang__)
216 #define BJ_RESTRICT __restrict__
217 #elif defined(_MSC_VER)
218 #define BJ_RESTRICT __restrict
231 #if defined(BJ_API_FORCE_INLINE)
232 #define BJ_INLINE __forceinline
234 #if !defined(__cplusplus) && !defined(inline)
235 #define BJ_INLINE __inline
237 #define BJ_INLINE inline
240#elif defined(__GNUC__) || defined(__clang__)
241 #if defined(BJ_API_FORCE_INLINE)
242 #define BJ_INLINE inline __attribute__((always_inline))
244 #define BJ_INLINE inline
247 #if defined(BJ_COMPILER_DOXYGEN) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
248 #define BJ_INLINE inline
273#define BJ_FALSE ((bj_bool)0)
282#define BJ_TRUE ((bj_bool)1)
Define parameters for generating simple waveforms.
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.
size_t real_size
Size of bj_real in the library, in bytes (since 1.1).
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 backend_fake
Built with the fake video and audio backends (since 1.1).
bj_bool log_color
Colored log output enabled.
bj_bool backend_win32
Built with Win32 window support.
bj_bool backend_coreaudio
Built with CoreAudio audio (since 1.1).
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: describes this library's own build, not the including program's ND...
bj_bool backend_cocoa
Built with Cocoa/macOS support.
bj_bool checks_abort
Built with BJ_CONFIG_CHECKS_ABORT, deprecated and without effect.
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_maze_builder bj_maze_builder
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.
struct bj_text_wrapper bj_text_wrapper
struct bj_mat43 bj_mat4x3
struct bj_mat32 bj_mat3x2
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.
The functions of a source the program supplies.
A borrowed view of a sequence of bytes.
An owning string containing valid UTF-8.
Structure representing a simple stopwatch.