Change ARCH_X86_64_h to ARCH_X86_64_H
[fio.git] / gcompat.c
CommitLineData
f762cef9
JA
1#include <gtk/gtk.h>
2
3#include "gcompat.h"
4
5#if GTK_MAJOR_VERSION <= 2 && GTK_MINOR_VERSION < 24
6
7GtkWidget *gtk_combo_box_text_new(void)
8{
9 return gtk_combo_box_new();
10}
11
12void gtk_combo_box_text_append_text(GtkComboBoxText *combo_box,
13 const gchar *text)
14{
15 gtk_combo_box_append_text(GTK_COMBO_BOX(combo_box), text);
16}
17
18void gtk_combo_box_text_insert_text(GtkComboBoxText *combo_box, gint position,
19 const gchar *text)
20{
21 gtk_combo_box_insert_text(GTK_COMBO_BOX(combo_box), position, text);
22}
23
24void gtk_combo_box_text_prepend_text(GtkComboBoxText *combo_box,
25 const gchar *text)
26{
27 gtk_combo_box_prepend_text(GTK_COMBO_BOX(combo_box), text);
28}
29
30gchar *gtk_combo_box_text_get_active_text(GtkComboBoxText *combo_box)
31{
32 return gtk_combo_box_get_active_text(GTK_COMBO_BOX(combo_box));
33}
34
35#endif
cd0d2db8
JA
36
37#if GTK_MAJOR_VERSION < 3
38
39guint gtk_widget_get_allocated_width(GtkWidget *w)
40{
41 return w->allocation.width;
42}
43
44guint gtk_widget_get_allocated_height(GtkWidget *w)
45{
46 return w->allocation.height;
47}
48
49#endif
cf8d54c7
JA
50
51#if GTK_MAJOR_VERSION <= 2 && GTK_MINOR_VERSION < 18
52void gtk_widget_set_can_focus(GtkWidget *widget, gboolean can_focus)
53{
54 if (can_focus)
55 GTK_WIDGET_SET_FLAGS(widget, GTK_CAN_FOCUS);
56 else
57 GTK_WIDGET_UNSET_FLAGS(widget, GTK_CAN_FOCUS);
58}
59#endif