server: bump version
[fio.git] / gcompat.h
CommitLineData
f762cef9
JA
1#ifndef GFIO_GTK_COMPAT
2#define GFIO_GTK_COMPAT
3
4#include <gtk/gtk.h>
5
6#if GTK_MAJOR_VERSION <= 2 && GTK_MINOR_VERSION < 24
7struct GtkComboBoxText;
8typedef GtkComboBox GtkComboBoxText;
9GtkWidget *gtk_combo_box_text_new(void);
10GtkWidget *gtk_combo_box_text_new_with_entry(void);
11void gtk_combo_box_text_append_text(GtkComboBoxText *combo_box, const gchar *text);
12void gtk_combo_box_text_insert_text(GtkComboBoxText *combo_box, gint position, const gchar *text);
13void gtk_combo_box_text_prepend_text(GtkComboBoxText *combo_box, const gchar *text);
14void gtk_combo_box_text_remove(GtkComboBoxText *combo_box, gint position);
3c3ed070 15gchar *gtk_combo_box_text_get_active_text(GtkComboBoxText *combo_box);
f762cef9
JA
16
17#define GTK_COMBO_BOX_TEXT GTK_COMBO_BOX
18#endif /* GTK_MAJOR_VERSION <= 2 && GTK_MINOR_VERSION < 24 */
19
20#if GTK_MAJOR_VERSION <= 2 && GTK_MINOR_VERSION < 14
21static inline GtkWidget *gtk_dialog_get_content_area(GtkDialog *dialog)
22{
23 return dialog->vbox;
24}
3cb6147d
JA
25static inline GdkWindow *gtk_widget_get_window(GtkWidget *w)
26{
27 return w->window;
28}
f762cef9
JA
29#endif
30
cd0d2db8
JA
31#if GTK_MAJOR_VERSION < 3
32guint gtk_widget_get_allocated_width(GtkWidget *w);
33guint gtk_widget_get_allocated_height(GtkWidget *w);
34#endif
35
b6ab6a31
JA
36#if GTK_MAJOR_VERSION == 3
37#define GFIO_DRAW_EVENT "draw"
38#elif GTK_MAJOR_VERSION == 2
39#define GFIO_DRAW_EVENT "expose_event"
40#endif
41
cf8d54c7
JA
42#if GTK_MAJOR_VERSION <= 2 && GTK_MINOR_VERSION < 18
43void gtk_widget_set_can_focus(GtkWidget *widget, gboolean can_focus);
44#endif
45
f762cef9 46#endif