summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2017-07-01 20:56:00 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2017-07-01 20:56:00 +0200
commitf8181f1355cf8218daf2ee2153606b7eccf1cb18 (patch)
treef5f1bab87dbc3c99bec83ea00b78989344f8bf27 /src/gui
parent85df1646ecccc7e484e2efc903166b89e4c55684 (diff)
downloadabaos-f8181f1355cf8218daf2ee2153606b7eccf1cb18.tar.gz
abaos-f8181f1355cf8218daf2ee2153606b7eccf1cb18.tar.bz2
got rid of superflous vtables in GUI class hierarchy
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/composite_widget.c1
-rw-r--r--src/gui/composite_widget.h1
-rw-r--r--src/gui/desktop.c2
-rw-r--r--src/gui/desktop.h1
-rw-r--r--src/gui/text_widget.c1
-rw-r--r--src/gui/text_widget.h1
-rw-r--r--src/gui/window.c2
-rw-r--r--src/gui/window.h1
8 files changed, 0 insertions, 10 deletions
diff --git a/src/gui/composite_widget.c b/src/gui/composite_widget.c
index e71bac6..355e3c6 100644
--- a/src/gui/composite_widget.c
+++ b/src/gui/composite_widget.c
@@ -29,7 +29,6 @@ void composite_widget_init( composite_widget_t *widget, widget_t *parent, const
memset( widget->children, 0, MAX_NOF_WIDGET_CHILDREN * sizeof( widget_t * ) );
widget->base.vtable = (widget_vtable_t *)&composite_widget_vtable;
- widget->vtable = &composite_widget_vtable;
}
void composite_widget_draw( void *obj, graphics_context_t *context )
diff --git a/src/gui/composite_widget.h b/src/gui/composite_widget.h
index 28e1e02..c055e09 100644
--- a/src/gui/composite_widget.h
+++ b/src/gui/composite_widget.h
@@ -12,7 +12,6 @@ typedef struct {
typedef struct {
widget_t base;
- composite_widget_vtable_t *vtable;
widget_t *children[MAX_NOF_WIDGET_CHILDREN];
int nof_children;
widget_t *focused_child;
diff --git a/src/gui/desktop.c b/src/gui/desktop.c
index 4a3876e..08da59b 100644
--- a/src/gui/desktop.c
+++ b/src/gui/desktop.c
@@ -31,8 +31,6 @@ void desktop_init( desktop_t *desktop, const int w, const int h, const vga_color
desktop->needs_redrawing = true;
desktop->base.base.vtable = (widget_vtable_t *)&desktop_vtable;
- desktop->base.vtable = (composite_widget_vtable_t *)&desktop_vtable;
- desktop->vtable = &desktop_vtable;
}
void desktop_draw( void *obj, graphics_context_t *context )
diff --git a/src/gui/desktop.h b/src/gui/desktop.h
index f644691..09a2d75 100644
--- a/src/gui/desktop.h
+++ b/src/gui/desktop.h
@@ -13,7 +13,6 @@ typedef struct {
typedef struct {
composite_widget_t base;
- desktop_vtable_t *vtable;
int mouse_x;
int mouse_y;
bool needs_redrawing;
diff --git a/src/gui/text_widget.c b/src/gui/text_widget.c
index f6ba8eb..2567df3 100644
--- a/src/gui/text_widget.c
+++ b/src/gui/text_widget.c
@@ -29,7 +29,6 @@ void text_widget_init( text_widget_t *widget, widget_t *parent, const int x, con
widget->base.focusable = true;
widget->base.vtable = (widget_vtable_t *)&text_widget_vtable;
- widget->vtable = &text_widget_vtable;
}
void text_widget_draw( void *obj, graphics_context_t *context )
diff --git a/src/gui/text_widget.h b/src/gui/text_widget.h
index 3b22cf1..316f56e 100644
--- a/src/gui/text_widget.h
+++ b/src/gui/text_widget.h
@@ -12,7 +12,6 @@ typedef struct {
typedef struct {
widget_t base;
- text_widget_vtable_t *vtable;
char s[TEXT_WIDGET_MAX_TEXT_SIZE];
} text_widget_t;
diff --git a/src/gui/window.c b/src/gui/window.c
index cd62e47..f56c8e6 100644
--- a/src/gui/window.c
+++ b/src/gui/window.c
@@ -30,8 +30,6 @@ void window_init( window_t *window, widget_t *parent, const int x, const int y,
window->dragging = false;
window->base.base.vtable = (widget_vtable_t *)&window_vtable;
- window->base.vtable = (composite_widget_vtable_t *)&window_vtable;
- window->vtable = &window_vtable;
}
void window_draw( void *obj, graphics_context_t *context )
diff --git a/src/gui/window.h b/src/gui/window.h
index 3a0cc97..793d8b3 100644
--- a/src/gui/window.h
+++ b/src/gui/window.h
@@ -11,7 +11,6 @@ typedef struct {
typedef struct {
composite_widget_t base;
- window_vtable_t *vtable;
bool dragging;
} window_t;