summaryrefslogtreecommitdiff
path: root/app/include
diff options
context:
space:
mode:
Diffstat (limited to 'app/include')
-rw-r--r--app/include/gfx/app.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/app/include/gfx/app.h b/app/include/gfx/app.h
index 3843d92..77b6ad2 100644
--- a/app/include/gfx/app.h
+++ b/app/include/gfx/app.h
@@ -31,6 +31,12 @@ typedef struct GfxAppCallbacks {
31 GfxAppResize resize; 31 GfxAppResize resize;
32} GfxAppCallbacks; 32} GfxAppCallbacks;
33 33
34typedef enum MouseButton {
35 LMB,
36 RMB,
37 MMB,
38} MouseButton;
39
34typedef enum Key { 40typedef enum Key {
35 KeyA = 'a', 41 KeyA = 'a',
36 KeyB, 42 KeyB,
@@ -70,8 +76,11 @@ bool gfx_app_run(const GfxAppDesc*, const GfxAppCallbacks*);
70/// Get the mouse coordinates relative to the app's window. 76/// Get the mouse coordinates relative to the app's window.
71void gfx_app_get_mouse_position(double* x, double* y); 77void gfx_app_get_mouse_position(double* x, double* y);
72 78
79/// Return if the given mouse button is pressed.
80bool gfx_app_is_mouse_button_pressed(MouseButton);
81
73/// Return true if the given key is pressed. 82/// Return true if the given key is pressed.
74bool gfx_is_key_pressed(Key); 83bool gfx_app_is_key_pressed(Key);
75 84
76#ifdef __cplusplus 85#ifdef __cplusplus
77} // extern "C" 86} // extern "C"