summaryrefslogtreecommitdiff
path: root/plugins/gtkui/support.h
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/gtkui/support.h')
-rw-r--r--plugins/gtkui/support.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/plugins/gtkui/support.h b/plugins/gtkui/support.h
index 6f8cbd6e..010c05b6 100644
--- a/plugins/gtkui/support.h
+++ b/plugins/gtkui/support.h
@@ -8,6 +8,7 @@
#include <gtk/gtk.h>
#if GTK_CHECK_VERSION(3,0,0)
#include <gdk/gdkkeysyms-compat.h>
+#define gdk_cursor_unref(cursor) g_object_unref(cursor)
#else
#include <gdk/gdkkeysyms.h>
#endif
@@ -146,3 +147,19 @@ void gtk_widget_get_allocation (GtkWidget *widget,
#endif
#endif
+
+
+#if GTK_CHECK_VERSION(3,2,0)
+#define gtk_vbox_new(homogeneous,spacing) ({GtkWidget *__box=gtk_box_new(GTK_ORIENTATION_VERTICAL,spacing);gtk_box_set_homogeneous(GTK_BOX(__box),homogeneous);__box;})
+#define gtk_hbox_new(homogeneous,spacing) ({GtkWidget *__box=gtk_box_new(GTK_ORIENTATION_HORIZONTAL,spacing);gtk_box_set_homogeneous(GTK_BOX(__box),homogeneous);__box;})
+#define gtk_hpaned_new() gtk_paned_new(GTK_ORIENTATION_HORIZONTAL)
+#define gtk_vpaned_new() gtk_paned_new(GTK_ORIENTATION_VERTICAL)
+#define gtk_hbutton_box_new() gtk_button_box_new(GTK_ORIENTATION_HORIZONTAL)
+#define gtk_vbutton_box_new() gtk_button_box_new(GTK_ORIENTATION_VERTICAL)
+#define gtk_hscale_new(adj) gtk_scale_new(GTK_ORIENTATION_HORIZONTAL,adj)
+#define gtk_vscale_new(adj) gtk_scale_new(GTK_ORIENTATION_VERTICAL,adj)
+#define gtk_hseparator_new() gtk_separator_new(GTK_ORIENTATION_HORIZONTAL)
+#define gtk_vseparator_new() gtk_separator_new(GTK_ORIENTATION_VERTICAL)
+#define gtk_hscrollbar_new(adj) gtk_scrollbar_new(GTK_ORIENTATION_HORIZONTAL,adj)
+#define gtk_vscrollbar_new(adj) gtk_scrollbar_new(GTK_ORIENTATION_VERTICAL,adj)
+#endif