X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=unix%2Fgtkcompat.h;h=19086157e564d48519de737518a18318543a6045;hb=2eb952ca31aa13d1f6f429305fbb6f43a9a28c56;hp=76b299623bea91b2d4d83ad637798221c6641fd9;hpb=6d65a92dfc99f686caa70e95d2700e299ddb79a0;p=PuTTY.git diff --git a/unix/gtkcompat.h b/unix/gtkcompat.h index 76b29962..19086157 100644 --- a/unix/gtkcompat.h +++ b/unix/gtkcompat.h @@ -165,3 +165,22 @@ #define STANDARD_OPEN_LABEL GTK_STOCK_OPEN #define STANDARD_CANCEL_LABEL GTK_STOCK_CANCEL #endif + +#if GTK_CHECK_VERSION(3,0,0) +#define gtk_hseparator_new() gtk_separator_new(GTK_ORIENTATION_HORIZONTAL) +/* Fortunately, my hboxes and vboxes never actually set homogeneous to + * TRUE, so I can just wrap these deprecated constructors with a macro + * without also having to arrange a call to gtk_box_set_homogeneous. */ +#define gtk_hbox_new(homogeneous, spacing) \ + gtk_box_new(GTK_ORIENTATION_HORIZONTAL, spacing) +#define gtk_vbox_new(homogeneous, spacing) \ + gtk_box_new(GTK_ORIENTATION_VERTICAL, spacing) +#define gtk_vscrollbar_new(adjust) \ + gtk_scrollbar_new(GTK_ORIENTATION_VERTICAL, adjust) + +#define gdk_get_display() gdk_display_get_name(gdk_display_get_default()) + +#define gdk_cursor_new(cur) \ + gdk_cursor_new_for_display(gdk_display_get_default(), cur) + +#endif