diff options
author | pacien | 2017-12-04 16:21:26 +0100 |
---|---|---|
committer | pacien | 2017-12-04 16:21:26 +0100 |
commit | cc1f6d08e843a2d80e7d536ff71535aaca15f318 (patch) | |
tree | 5291adbec612109da3a3641050dd9dc492093bb1 /include/gui/window.h | |
parent | c202e46b001238de48b500c55f7392c53655d140 (diff) | |
download | morpher-cc1f6d08e843a2d80e7d536ff71535aaca15f318.tar.gz |
Add GUI spec draft
Signed-off-by: pacien <pacien.trangirard@pacien.net>
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 | ||