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/error.h>
31
33struct bj_window;
34
49#ifndef BJ_NO_TYPEDEF
51#endif
52
76 const char* title,
77 uint16_t x,
78 uint16_t y,
79 uint16_t width,
80 uint16_t height,
81 uint8_t flags,
82 struct bj_error** error
83);
84
91 struct bj_window* window
92);
93
112 struct bj_window* window
113);
114
126 struct bj_window* window
127);
128
143 struct bj_window* window,
144 uint8_t flags
145);
146
159 const struct bj_window* window,
160 int key
161);
162
185 const struct bj_window* window,
186 int* width,
187 int* height
188);
189
190
191#endif
193
General-purpose definitions for Banjo API.
bj_window * window
Definition bitmap_blit.c:24
Recoverable error handling.
struct bj_error bj_error
Definition api.h:282
#define BANJO_EXPORT
Definition api.h:113
uint32_t bj_bool
Boolean type used throughout the Banjo API.
Definition api.h:207
struct bj_window bj_window
Definition api.h:303
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.
struct bj_window * bj_bind_window(const char *title, uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint8_t flags, struct bj_error **error)
Create a new struct bj_window with the specified attributes.
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:43
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:44
@ BJ_WINDOW_FLAG_KEY_REPEAT
Key repeat event is enabled (see bj_set_key_callback).
Definition window.h:46
@ BJ_WINDOW_FLAG_ALL
All flags set.
Definition window.h:47
@ BJ_WINDOW_FLAG_CLOSE
Window should be closed by the application.
Definition window.h:45