]> Pileus Git - aweather/blob - src/compat.h
Update docs
[aweather] / src / compat.h
1 #include <gtk/gtk.h>
2
3 #if ! GTK_CHECK_VERSION(3,0,0)
4 static inline GtkWidget *gtk_box_new(GtkOrientation orientation, gint spacing)
5 {
6         return orientation == GTK_ORIENTATION_HORIZONTAL
7                 ? gtk_hbox_new(0, spacing)
8                 : gtk_vbox_new(0, spacing);
9 }
10 static inline GtkWidget *gtk_scale_new_with_range(GtkOrientation orientation,
11                 gdouble min, gdouble max, gdouble step)
12 {
13         return orientation == GTK_ORIENTATION_HORIZONTAL
14                 ? gtk_hscale_new_with_range(min, max, step)
15                 : gtk_vscale_new_with_range(min, max, step);
16 }
17 #endif