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/error.h>
32#include <banjo/memory.h>
33
35struct bj_window;
36
51#ifndef BJ_NO_TYPEDEF
53#endif
54
78 const char* title,
79 uint16_t x,
80 uint16_t y,
81 uint16_t width,
82 uint16_t height,
83 uint8_t flags,
84 struct bj_error** error
85);
86
93 struct bj_window* window
94);
95
114 struct bj_window* window
115);
116
128 struct bj_window* window
129);
130
145 struct bj_window* window,
146 uint8_t flags
147);
148
161 const struct bj_window* window,
162 int key
163);
164
187 const struct bj_window* window,
188 int* width,
189 int* height
190);
191
192
193#endif
195
General-purpose definitions for Banjo API.
Header file for Bitmap type.
bj_window * window
Definition bitmap_blit.c:24
Recoverable error handling.
struct bj_error bj_error
Definition api.h:275
#define BANJO_EXPORT
Definition api.h:106
uint32_t bj_bool
Boolean type used throughout the Banjo API.
Definition api.h:200
struct bj_window bj_window
Definition api.h:296
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:45
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:46
@ BJ_WINDOW_FLAG_KEY_REPEAT
Key repeat event is enabled (see bj_set_key_callback).
Definition window.h:48
@ BJ_WINDOW_FLAG_ALL
All flags set.
Definition window.h:49
@ BJ_WINDOW_FLAG_CLOSE
Window should be closed by the application.
Definition window.h:47
All memory-related functions, including custom allocators.