X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Finclude%2Fgtk%2Fgtk.in.h;h=8df67cd0cc88aaaa5e1121988650a07fa0d84717;hb=c1f04750c4430bf3e7f0630842f879ee695b947d;hp=75ef3799839408286b0f3d22338a0a9efa4f3f8c;hpb=e2da62d735c597afeef2e0e9b36e5a4a83d7da94;p=pspp diff --git a/src/ui/gui/include/gtk/gtk.in.h b/src/ui/gui/include/gtk/gtk.in.h index 75ef379983..8df67cd0cc 100644 --- a/src/ui/gui/include/gtk/gtk.in.h +++ b/src/ui/gui/include/gtk/gtk.in.h @@ -1,5 +1,5 @@ /* Wrapper for . - Copyright (C) 2011, 2012 Free Software Foundation, Inc. + Copyright (C) 2011, 2012, 2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -30,18 +30,19 @@ #endif -/* Like GSEAL but only used in PSPP */ -#define PSEAL(X) X - -#define gtk_hbox_new(HOMOGENOUS,SPACING) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, SPACING) -#define gtk_vbox_new(HOMOGENOUS,SPACING) gtk_box_new (GTK_ORIENTATION_VERTICAL, SPACING) +#if (GTK_CHECK_VERSION(3,8,0) == 0) +#define gtk_widget_register_window(widget, window) gdk_window_set_user_data (window, widget) +#endif -#define gtk_vbutton_box_new() gtk_button_box_new (GTK_ORIENTATION_VERTICAL) -#define gtk_hbutton_box_new() gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL) +#if (GTK_CHECK_VERSION(3,22,0) == 0) +static inline void +gtk_menu_popup_at_pointer (GtkMenu *menu, const GdkEvent *trigger) +{ + const GdkEventButton *be = trigger; + gtk_menu_popup (menu, NULL, NULL, NULL, NULL, be ? be->button : 0, be ? be->time : 0); +} +#endif -#define gtk_vpaned_new() gtk_paned_new (GTK_ORIENTATION_VERTICAL) -#define gtk_hpaned_new() gtk_paned_new (GTK_ORIENTATION_HORIZONTAL) -#define gdk_cursor_unref(X) g_object_unref (X) #endif /* PSPP_GTK_GTK_H */