From 35d540dd3c9269ec39bf3bc10a98b9714963291b Mon Sep 17 00:00:00 2001 From: Laszlo Boros Date: Sat, 26 Oct 2013 14:27:58 +0200 Subject: Starting to add GTK3 support --- src/ui/themewidget.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/ui/themewidget.h') diff --git a/src/ui/themewidget.h b/src/ui/themewidget.h index 79f10e65..940b44fc 100644 --- a/src/ui/themewidget.h +++ b/src/ui/themewidget.h @@ -42,19 +42,30 @@ typedef void (* MetaAreaSizeFunc) (MetaArea *area, int *width, int *height, void *user_data); - +#if GTK_CHECK_VERSION(3, 0, 0) +typedef void (* MetaAreaDrawFunc) (MetaArea *area, + cairo_t *cr, + void *user_data); +#else typedef void (* MetaAreaExposeFunc) (MetaArea *area, GdkEventExpose *event, int x_offset, int y_offset, void *user_data); +#endif + +#define parent_class meta_area_parent_class struct _MetaArea { GtkMisc misc; MetaAreaSizeFunc size_func; + #if GTK_CHECK_VERSION(3, 0, 0) + MetaAreaDrawFunc draw_func; + #else MetaAreaExposeFunc expose_func; + #endif void *user_data; GDestroyNotify dnotify; }; @@ -70,7 +81,11 @@ GtkWidget* meta_area_new (void); void meta_area_setup (MetaArea *area, MetaAreaSizeFunc size_func, + #if GTK_CHECK_VERSION(3, 0, 0) + MetaAreaDrawFunc draw_func, + #else MetaAreaExposeFunc expose_func, + #endif void *user_data, GDestroyNotify dnotify); -- cgit v1.2.1