diff options
Diffstat (limited to 'src/input.h')
| -rw-r--r-- | src/input.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/input.h b/src/input.h index d521ce0..261b9f3 100644 --- a/src/input.h +++ b/src/input.h @@ -11,6 +11,15 @@ #define PW_KEYBOARD_BUFFER_SIZE 256 /** + * PICO-8 window flags. + */ +enum pw_window_flags { + PW_WINDOW_NONE = 0, + PW_WINDOW_VISIBLE = 1 << 0, + PW_WINDOW_FOCUS = 1 << 1, +}; + +/** * PICO-8 controller buttons. */ enum pw_button { @@ -153,6 +162,11 @@ bool pw_input_event(struct pw_input *input, struct pw_players *players, bool pw_input_iterate(struct pw_input *input, struct pw_framebuffer *fb); /** + * Returns PICO-8 window flags. + */ +enum pw_window_flags pw_input_window(struct pw_input *input); + +/** * Gets the number of connected players. */ size_t pw_input_players(struct pw_input *input); @@ -168,6 +182,12 @@ enum pw_button pw_input_btn(struct pw_input *input, size_t player); enum pw_keymod pw_input_keymod(struct pw_input *input); /** + * Gets the next buffered key. Passing `NULL` as `key` returns whether + * or not there are any keys buffered. + */ +bool pw_input_key(struct pw_input *input, int32_t *key); + +/** * Gets the current mouse button state. */ enum pw_mouse_button pw_input_mouse(struct pw_input *input, |
