From cc1f6d08e843a2d80e7d536ff71535aaca15f318 Mon Sep 17 00:00:00 2001 From: pacien Date: Mon, 4 Dec 2017 16:21:26 +0100 Subject: Add GUI spec draft Signed-off-by: pacien --- include/gui/window.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 include/gui/window.h (limited to 'include/gui/window.h') 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 @@ +#ifndef UPEM_MORPHING_WINDOW +#define UPEM_MORPHING_WINDOW + +/** + * File: window.h + */ + +typedef void (*ClickHandler)(int x_pos, int y_pos); + +typedef struct { + int width, height; + ClickHandler click_handler; +} Component; + +typedef struct { + int width, height; + Component *components; +} Window; + +void window_init(Window *window, int width, int height, char *title); + +void window_free(Window *window); + +void window_add_component(Window *window, Component *component, int x_pos, int y_pos); + +#endif -- cgit v1.2.3