summaryrefslogtreecommitdiff
path: root/plugins/gtkui/gtkui.h
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/gtkui/gtkui.h')
-rw-r--r--plugins/gtkui/gtkui.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/plugins/gtkui/gtkui.h b/plugins/gtkui/gtkui.h
index 53db09af..7cb2dff4 100644
--- a/plugins/gtkui/gtkui.h
+++ b/plugins/gtkui/gtkui.h
@@ -25,12 +25,20 @@
#include <gtk/gtk.h>
+#ifdef HAVE_CONFIG_H
+#include "../../config.h"
+#endif
+
+#if defined(ULTRA_COMPATIBLE)
+#warning compiling for compatibility with gtk <2.14
+#endif
+
// workaround to make older gtk compatible with vala codegen
-#if !GTK_CHECK_VERSION(2,14,0)
+#if !GTK_CHECK_VERSION(2,14,0) || defined(ULTRA_COMPATIBLE)
#define gtk_widget_get_window(widget) ((widget)->window)
#endif
-#if !GTK_CHECK_VERSION(2,18,0)
+#if !GTK_CHECK_VERSION(2,18,0) || defined(ULTRA_COMPATIBLE)
#define gtk_widget_set_has_window(widget, has_window) \
if (has_window) GTK_WIDGET_UNSET_FLAGS (widget, GTK_NO_WINDOW); \
else GTK_WIDGET_SET_FLAGS (widget, GTK_NO_WINDOW);
@@ -39,7 +47,7 @@
#define gtk_widget_get_has_window(widget) (!GTK_WIDGET_NO_WINDOW(widget))
#endif
-#if !GTK_CHECK_VERSION(2,20,0)
+#if !GTK_CHECK_VERSION(2,20,0) || defined(ULTRA_COMPATIBLE)
#define gtk_widget_get_realized(widget) (GTK_WIDGET_REALIZED(widget))
#endif