summaryrefslogtreecommitdiff
path: root/src/gui/desktop.h
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2017-06-21 17:39:00 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2017-06-21 17:39:00 +0200
commitf05524445914e31891ec227520d9bb3fe5857e2c (patch)
tree219f38ac0d3be60dda3613b892b51cae0fee9ec9 /src/gui/desktop.h
parente158c4832aa1d5dc8603fb9c33cac3f7cc19abc9 (diff)
downloadabaos-f05524445914e31891ec227520d9bb3fe5857e2c.tar.gz
abaos-f05524445914e31891ec227520d9bb3fe5857e2c.tar.bz2
improved VGA colors
added basics of a desktop widget class
Diffstat (limited to 'src/gui/desktop.h')
-rw-r--r--src/gui/desktop.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/gui/desktop.h b/src/gui/desktop.h
new file mode 100644
index 0000000..b160dc0
--- /dev/null
+++ b/src/gui/desktop.h
@@ -0,0 +1,24 @@
+#ifndef DESKTOP_H
+#define DESKTOP_H
+
+#include "composite_widget.h"
+
+#define MAX_NOF_WIDGET_CHILDREN 100
+
+typedef struct {
+ composite_widget_vtable_t base;
+} desktop_vtable_t;
+
+typedef struct {
+ composite_widget_t base;
+ desktop_vtable_t *vtable;
+} desktop_t;
+
+void desktop_init( desktop_t *widget, const int w, const int h );
+
+void desktop_draw( void *obj, graphics_context_t *context );
+void desktop_on_mouse_down( void *obj, const int x, const int y );
+void desktop_on_mouse_up( void *obj, const int x, const int y );
+void desktop_on_mouse_move( void *obj, const int old_x, const int old_y, const int x, const int y );
+
+#endif // DESKTOP_H