General-purpose definitions for Banjo API.
Header file for Bitmap type.
struct bj_bitmap_t bj_bitmap
Typedef for the bj_bitmap struct.
Definition bitmap.h:60
#define BANJO_EXPORT
Definition api.h:139
uint32_t bj_bool
Boolean type used throughout the Banjo API.
Definition api.h:276
Error structure.
Definition error.h:131
int bj_get_window_size(const bj_window *p_window, int *width, int *height)
Retrieve the size of the window.
void bj_unbind_window(bj_window *p_window)
Deletes a bj_window object and releases associated memory.
bj_window_flag_t
A set of flags describing some properties of a bj_window.
Definition window.h:46
bj_window * bj_bind_window(const char *p_title, uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint8_t flags)
Create a new bj_window with the specified attributes.
void bj_update_window_framebuffer(bj_window *p_window)
Copy window's framebuffer onto screen.
bj_bitmap * bj_get_window_framebuffer(bj_window *p_window, bj_error **p_error)
Return the framebuffer attached to the window.
struct bj_window_t bj_window
Opaque typedef for the window type.
Definition window.h:36
enum bj_window_flag_t bj_window_flag
A set of flags describing some properties of a bj_window.
int bj_get_key(const bj_window *p_window, int key)
Query the current state of a key for a given window.
uint8_t bj_get_window_flags(bj_window *p_window, uint8_t flags)
Get window flags.
bj_bool bj_should_close_window(bj_window *p_window)
Get the close flag state of a window.
void bj_set_window_should_close(bj_window *p_window)
Flag a given window to be closed.
@ BJ_WINDOW_FLAG_NONE
No Flag.
Definition window.h:47
@ BJ_WINDOW_FLAG_KEY_REPEAT
Key repeat event is enabled (see bj_set_key_callback).
Definition window.h:49
@ BJ_WINDOW_FLAG_ALL
All flags set.
Definition window.h:50
@ BJ_WINDOW_FLAG_CLOSE
Window should be closed by the application.
Definition window.h:48
All memory-related functions, including custom allocators.