X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=gcompat.h;h=e0f744434eb45a8a08b556a66811d7ff39815b9a;hp=66fb781d1351cca1adb185e3dccc67de0184d067;hb=de5ed0e4d398bc9d4576f9b2b82d7686989c27e1;hpb=cd0d2db8d4a8863bb48eca8bb197bd73d2f6c9a4 diff --git a/gcompat.h b/gcompat.h index 66fb781d..e0f74443 100644 --- a/gcompat.h +++ b/gcompat.h @@ -12,7 +12,7 @@ void gtk_combo_box_text_append_text(GtkComboBoxText *combo_box, const gchar *tex void gtk_combo_box_text_insert_text(GtkComboBoxText *combo_box, gint position, const gchar *text); void gtk_combo_box_text_prepend_text(GtkComboBoxText *combo_box, const gchar *text); void gtk_combo_box_text_remove(GtkComboBoxText *combo_box, gint position); -gchar *gtk_combo_box_text_get_active_text (GtkComboBoxText *combo_box); +gchar *gtk_combo_box_text_get_active_text(GtkComboBoxText *combo_box); #define GTK_COMBO_BOX_TEXT GTK_COMBO_BOX #endif /* GTK_MAJOR_VERSION <= 2 && GTK_MINOR_VERSION < 24 */ @@ -22,6 +22,10 @@ static inline GtkWidget *gtk_dialog_get_content_area(GtkDialog *dialog) { return dialog->vbox; } +static inline GdkWindow *gtk_widget_get_window(GtkWidget *w) +{ + return w->window; +} #endif #if GTK_MAJOR_VERSION < 3 @@ -29,4 +33,14 @@ guint gtk_widget_get_allocated_width(GtkWidget *w); guint gtk_widget_get_allocated_height(GtkWidget *w); #endif +#if GTK_MAJOR_VERSION == 3 +#define GFIO_DRAW_EVENT "draw" +#elif GTK_MAJOR_VERSION == 2 +#define GFIO_DRAW_EVENT "expose_event" +#endif + +#if GTK_MAJOR_VERSION <= 2 && GTK_MINOR_VERSION < 18 +void gtk_widget_set_can_focus(GtkWidget *widget, gboolean can_focus); +#endif + #endif