summaryrefslogtreecommitdiff
path: root/src/gui/window.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/window.h')
-rw-r--r--src/gui/window.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/gui/window.h b/src/gui/window.h
new file mode 100644
index 0000000..3a0cc97
--- /dev/null
+++ b/src/gui/window.h
@@ -0,0 +1,25 @@
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include "composite_widget.h"
+
+#include <stdbool.h>
+
+typedef struct {
+ composite_widget_vtable_t base;
+} window_vtable_t;
+
+typedef struct {
+ composite_widget_t base;
+ window_vtable_t *vtable;
+ bool dragging;
+} window_t;
+
+void window_init( window_t *window, widget_t *parent, const int x, const int y, const int w, const int h, const vga_color_t background_color );
+
+void window_draw( void *obj, graphics_context_t *context );
+void window_on_mouse_down( void *obj, const int x, const int y );
+void window_on_mouse_up( void *obj, const int x, const int y );
+void window_on_mouse_move( void *obj, const int old_x, const int old_y, const int x, const int y );
+
+#endif // WINDOW_H