Banjo API 0.0.1
Multi-purpose C99 API
Loading...
Searching...
No Matches
Core

General-purpose API. More...

Collaboration diagram for Core:

Detailed Description

Topics

 Audio
 Provide basic PCM audio playback.
 
 Error Management
 Recoverable error handling facilities.
 
 Event
 Handle input events such as keyboard, mouse and focus.
 
 Math
 Linear math function.
 
 Logging
 Logging utility functions.
 
 Memory Management
 
 Video
 Manage window creation and pixel-based drawing.
 

Data Structures

struct  bj_build_info
 Structure holding build information of the binary. More...
 

Macros

#define BJ_VERSION_MAJOR(version)
 Extracts the major version number from a 32-bit version number.
 
#define BJ_VERSION_MINOR(version)
 Extracts the minor version number from a 32-bit version number.
 
#define BJ_VERSION_PATCH(version)
 Extracts the patch version number from a 32-bit version number.
 
#define BJ_MAKE_VERSION(major, minor, patch)
 Constructs an API version number into 32bits.
 
#define BJ_VERSION_MAJOR_NUMBER   0
 Banjo current major version.
 
#define BJ_VERSION_MINOR_NUMBER   1
 Banjo current minor version.
 
#define BJ_VERSION_PATCH_NUMBER   0
 Banjo current patch version.
 
#define BJ_VERSION   BJ_MAKE_VERSION(BJ_VERSION_MAJOR_NUMBER, BJ_VERSION_MINOR_NUMBER, BJ_VERSION_PATCH_NUMBER)
 Expands to a 32bits representatin of the current version the API.
 
#define BJ_NAME   "Banjo"
 Name of the library.
 
#define BJ_OS_UNKNOWN
 Platform detection.
 
#define BJ_FALSE   ((bj_bool)0)
 Boolean false value.
 
#define BJ_TRUE   ((bj_bool)1)
 Boolean true value.
 

Typedefs

typedef uint32_t bj_bool
 Boolean type used throughout the BJ codebase.
 

Functions

const bj_build_infobj_get_build_info (void)
 Returns the build information of the runtime Banjo binaries.
 

Data Structure Documentation

◆ bj_build_info

struct bj_build_info
Examples
build_info.c.
Data Fields
const char * compiler_name Compiler C-String name.
int compiler_version Compiler version specifier.
bj_bool config_checks_abort When checks feature is on, a failed check will abort execution.
bj_bool config_checks_log If checks feature is on, failed check with log.
bj_bool config_log_color Banjo logs will have colored output.
bj_bool config_pedantic Banjo runtime will make costly extra checks.
bj_bool debug Built with debug information.
bj_bool feature_alsa Compiled with support for ALSA (for audio).
bj_bool feature_emscripten Compiled with support for Emscripten.
bj_bool feature_mme Compiled with support for Windows Multimedia Extension (for audio).
bj_bool feature_win32 Compiled with support for Win32 windows.
bj_bool feature_x11 Compiled with support for Win32 windows.
const char * p_name API Name (BJ_NAME)
uint32_t version Built version (BJ_VERSION)

Macro Definition Documentation

◆ BJ_FALSE

#define BJ_FALSE   ((bj_bool)0)

Represents the false value for the bj_bool type, defined as zero.

See also
bj_bool
BJ_TRUE

◆ BJ_MAKE_VERSION

#define BJ_MAKE_VERSION ( major,
minor,
patch )
Value:
((((uint32_t)(major)) << 22U) | (((uint32_t)(minor)) << 12U) | ((uint32_t)(patch)))
Parameters
majorThe major version number
minorThe minor version number
patchThe patch version number

◆ BJ_TRUE

#define BJ_TRUE   ((bj_bool)1)

Represents the true value for the bj_bool type, defined as one.

See also
bj_bool
BJ_FALSE

◆ BJ_VERSION_MAJOR

#define BJ_VERSION_MAJOR ( version)
Value:
(((version) >> 22U) & 0x3FFU)

◆ BJ_VERSION_MINOR

#define BJ_VERSION_MINOR ( version)
Value:
(((version) >> 12U) & 0x3FFU)

◆ BJ_VERSION_PATCH

#define BJ_VERSION_PATCH ( version)
Value:
((version) & 0xFFFU)

Typedef Documentation

◆ bj_bool

typedef uint32_t bj_bool

Defined as a 32-bit unsigned integer for compatibility and clarity.

See also
BJ_FALSE
BJ_TRUE

Function Documentation

◆ bj_get_build_info()

const bj_build_info * bj_get_build_info ( void )

The function returns a pointer to bj_build_info that is always the same in between different calls.

Returns
A description of runtime build information
Examples
build_info.c.