diff options
Diffstat (limited to 'src/libui_sdl/libui/unix/area.c')
-rw-r--r-- | src/libui_sdl/libui/unix/area.c | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/src/libui_sdl/libui/unix/area.c b/src/libui_sdl/libui/unix/area.c index 62fe512..5734b4b 100644 --- a/src/libui_sdl/libui/unix/area.c +++ b/src/libui_sdl/libui/unix/area.c @@ -3,6 +3,18 @@ extern GThread* gtkthread; +// notes: +// - G_DECLARE_DERIVABLE/FINAL_INTERFACE() requires glib 2.44 and that's starting with debian stretch (testing) (GTK+ 3.18) and ubuntu 15.04 (GTK+ 3.14) - debian jessie has 2.42 (GTK+ 3.14) +#define areaWidgetType (areaWidget_get_type()) +#define areaWidget(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), areaWidgetType, areaWidget)) +#define isAreaWidget(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), areaWidgetType)) +#define areaWidgetClass(class) (G_TYPE_CHECK_CLASS_CAST((class), areaWidgetType, areaWidgetClass)) +#define isAreaWidgetClass(class) (G_TYPE_CHECK_CLASS_TYPE((class), areaWidget)) +#define getAreaWidgetClass(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), areaWidgetType, areaWidgetClass)) + +typedef struct areaWidget areaWidget; +typedef struct areaWidgetClass areaWidgetClass; + struct areaWidget { GtkDrawingArea parent_instance; uiArea *a; @@ -131,22 +143,6 @@ static void loadAreaSize(uiArea *a, double *width, double *height) } } -void areaPreRedraw(areaWidget* widget) -{ - uiArea* a = widget->a; - if (!a->opengl) return; - - areaPreRedrawGL(a->glContext); -} - -void areaPostRedraw(areaWidget* widget) -{ - uiArea* a = widget->a; - if (!a->opengl) return; - - areaPostRedrawGL(a->glContext); -} - static gboolean areaWidget_draw(GtkWidget *w, cairo_t *cr) { areaWidget *aw = areaWidget(w); |