Banjo API 0.0.1
C99 game development API
Loading...
Searching...
No Matches
window.h
Go to the documentation of this file.
1
25
26#ifndef BJ_WINDOW_H
27#define BJ_WINDOW_H
28
29#include <banjo/api.h>
30#include <banjo/bitmap.h>
31#include <banjo/memory.h>
32
34struct bj_window;
35
50
70 const char* title,
71 uint16_t x,
72 uint16_t y,
73 uint16_t width,
74 uint16_t height,
75 uint8_t flags
76);
77
84 struct bj_window* window
85);
86
105 struct bj_window* window
106);
107
119 struct bj_window* window
120);
121
136 struct bj_window* window,
137 uint8_t flags
138);
139
152 const struct bj_window* window,
153 int key
154);
155
178 const struct bj_window* window,
179 int* width,
180 int* height
181);
182
183
184#endif
186
General-purpose definitions for Banjo API.
Header file for Bitmap type.
#define BANJO_EXPORT
Definition api.h:155
uint32_t bj_bool
Boolean type used throughout the Banjo API.
Definition api.h:249
struct bj_window bj_window
Definition api.h:357
uint8_t bj_get_window_flags(struct bj_window *window, uint8_t flags)
Get window flags.
void bj_set_window_should_close(struct bj_window *window)
Flag a given window to be closed.
int bj_get_key(const struct bj_window *window, int key)
Query the current state of a key for a given window.
bj_window_flag
A set of flags describing some properties of a bj_window.
Definition window.h:44
struct bj_window * bj_bind_window(const char *title, uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint8_t flags)
Create a new struct bj_window with the specified attributes.
bj_bool bj_should_close_window(struct bj_window *window)
Get the close flag state of a window.
void bj_unbind_window(struct bj_window *window)
Deletes a struct bj_window object and releases associated memory.
int bj_get_window_size(const struct bj_window *window, int *width, int *height)
Retrieve the size of the window.
@ BJ_WINDOW_FLAG_NONE
No Flag.
Definition window.h:45
@ BJ_WINDOW_FLAG_KEY_REPEAT
Key repeat event is enabled (see bj_set_key_callback).
Definition window.h:47
@ BJ_WINDOW_FLAG_ALL
All flags set.
Definition window.h:48
@ BJ_WINDOW_FLAG_CLOSE
Window should be closed by the application.
Definition window.h:46
All memory-related functions, including custom allocators.