blob: cd9602ff1b170fd199cf9a15af17d7381bfaa030 [file] [log] [blame]
Jens Axboef762cef2012-03-26 13:51:11 +02001#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);
15gchar *gtk_combo_box_text_get_active_text (GtkComboBoxText *combo_box);
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}
25#endif
26
Jens Axboecd0d2db2012-03-26 19:30:24 +020027#if GTK_MAJOR_VERSION < 3
28guint gtk_widget_get_allocated_width(GtkWidget *w);
29guint gtk_widget_get_allocated_height(GtkWidget *w);
30#endif
31
Jens Axboeb6ab6a32012-03-26 19:34:15 +020032#if GTK_MAJOR_VERSION == 3
33#define GFIO_DRAW_EVENT "draw"
34#elif GTK_MAJOR_VERSION == 2
35#define GFIO_DRAW_EVENT "expose_event"
36#endif
37
Jens Axboef762cef2012-03-26 13:51:11 +020038#endif