diff options
author | quou <quou@disroot.org> | 2024-07-31 22:09:27 +1000 |
---|---|---|
committer | quou <quou@disroot.org> | 2024-07-31 22:09:27 +1000 |
commit | 84615bccdc0962ac7ecdac258a8006af7ebe1c9b (patch) | |
tree | 59623c75620162604f5605f3e333d3e512d8c586 /plat.h | |
parent | 26dd62f331fc658554d49975312bf74563df8f57 (diff) |
more mouse stuff
Diffstat (limited to 'plat.h')
-rw-r--r-- | plat.h | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -143,20 +143,29 @@ typedef enum { } Key; typedef enum { + mbtn_left, + mbtn_middle, + mbtn_right, + mbtn_count +} Mbtn; + +typedef enum { key_state_pressed = 1 << 0, key_state_just_pressed = 1 << 1, key_state_just_released = 1 << 2 } Key_State; -typedef struct { +typedef struct App { int w, h, s, o, mpf; int fps; int mx, my; + int scrollx, scrolly; int dmx, dmy; Error err; Colour* fb; Heap* heap; unsigned char key_states[key_count]; + unsigned char mbtn_states[mbtn_count]; } App; App* new_app(Heap* mem, int w, int h, const char* n); |