diff options
Diffstat (limited to 'include/gui/window.h')
-rw-r--r-- | include/gui/window.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/gui/window.h b/include/gui/window.h new file mode 100644 index 0000000..9394c84 --- /dev/null +++ b/include/gui/window.h | |||
@@ -0,0 +1,26 @@ | |||
1 | #ifndef UPEM_MORPHING_WINDOW | ||
2 | #define UPEM_MORPHING_WINDOW | ||
3 | |||
4 | /** | ||
5 | * File: window.h | ||
6 | */ | ||
7 | |||
8 | typedef void (*ClickHandler)(int x_pos, int y_pos); | ||
9 | |||
10 | typedef struct { | ||
11 | int width, height; | ||
12 | ClickHandler click_handler; | ||
13 | } Component; | ||
14 | |||
15 | typedef struct { | ||
16 | int width, height; | ||
17 | Component *components; | ||
18 | } Window; | ||
19 | |||
20 | void window_init(Window *window, int width, int height, char *title); | ||
21 | |||
22 | void window_free(Window *window); | ||
23 | |||
24 | void window_add_component(Window *window, Component *component, int x_pos, int y_pos); | ||
25 | |||
26 | #endif | ||