summaryrefslogtreecommitdiff
path: root/plat.h
diff options
context:
space:
mode:
Diffstat (limited to 'plat.h')
-rw-r--r--plat.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/plat.h b/plat.h
index 70fdf36..190c011 100644
--- a/plat.h
+++ b/plat.h
@@ -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);