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

 Error Management
 Recoverable error handling facilities.
 
 Math
 Linear math function.
 
 Logging
 Logging utility functions.
 
 Memory Management
 

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)
 
#define BJ_TRUE   ((bj_bool)1)
 

Typedefs

typedef uint32_t bj_bool
 

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_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_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_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)

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.