/*
- * Geeqie
- * Copyright (C) 2008 - 2012 The Geeqie Team
+ * Copyright (C) 2008 - 2016 The Geeqie Team
*
- * Authors: Vladimir Nadvornik / Laurent Monin
+ * Authors: Vladimir Nadvornik, Laurent Monin
*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
- * This software is released under the GNU General Public License (GNU GPL).
- * Please read the included file COPYING for more information.
- * This software comes with no warranty of any kind, use at your own risk!
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef COMPAT_H
#define COMPAT_H
-void radio_action_set_current_value(GtkRadioAction *action, gint current_value);
-GList* hash_table_get_keys(GHashTable *hash_table);
-
-#if !GTK_CHECK_VERSION(2,12,0)
-#define gtk_widget_set_tooltip_text(widget, text) /* ignored */
-#endif
-
/* Some systems (BSD,MacOsX,HP-UX,...) define MAP_ANON and not MAP_ANONYMOUS */
#if defined(MAP_ANON) && !defined(MAP_ANONYMOUS)
#define MAP_ANON MAP_ANONYMOUS
#endif
-#ifndef GDK_KEY_Up
+#if !GTK_CHECK_VERSION(2,22,0)
#define GDK_KEY_BackSpace GDK_BackSpace
#define GDK_KEY_Delete GDK_Delete
#define GDK_KEY_Down GDK_Down
#define gtk_combo_box_text_append_text gtk_combo_box_append_text
#define gtk_combo_box_text_new_with_entry gtk_combo_box_entry_new_text
#define gtk_combo_box_new_with_model_and_entry(model) gtk_combo_box_entry_new_with_model(model, FILTER_COLUMN_FILTER)
-#define GTK_COMBO_BOX_TEXT(combo) GTK_COMBO_BOX(combo)
+#define GTK_COMBO_BOX_TEXT(combo) GTK_COMBO_BOX(combo)
#define gdk_window_get_width(window) compat_gdk_window_get_width(window)
#define gdk_window_get_height(window) compat_gdk_window_get_height(window)
#endif
-#if !GTK_CHECK_VERSION(2,24,0)
+#if !GTK_CHECK_VERSION(2,22,0)
#define gdk_window_create_similar_surface(window, content, width, height) compat_gdk_window_create_similar_surface(window, content, width, height)
cairo_surface_t *compat_gdk_window_create_similar_surface (GdkWindow *window, cairo_content_t content, gint width, gint height);
#define gdk_drag_context_get_actions(context) ((context)->actions)
#endif
+#if GTK_CHECK_VERSION(3,0,0)
+#define gtk_hbox_new(homogeneous, spacing) gtk_box_new(GTK_ORIENTATION_HORIZONTAL, spacing)
+#define gtk_vbox_new(homogeneous, spacing) gtk_box_new(GTK_ORIENTATION_VERTICAL, spacing)
+#define gdk_cursor_unref(cursor) g_object_unref(G_OBJECT(cursor))
+#endif
+
+#if GTK_CHECK_VERSION(3,2,0)
+#define gtk_hpaned_new() gtk_paned_new(GTK_ORIENTATION_HORIZONTAL)
+#define gtk_vpaned_new() gtk_paned_new(GTK_ORIENTATION_VERTICAL)
+#endif
+
+#if GTK_CHECK_VERSION(3,8,0)
+#define gtk_scrolled_window_add_with_viewport(viewport, child) gtk_container_add(GTK_CONTAINER(viewport), child)
+#endif
+
+#if GTK_CHECK_VERSION(3,20,0)
+#define gtk_hbutton_box_new() gtk_button_box_new(GTK_ORIENTATION_HORIZONTAL)
+#endif
+
#endif /* COMPAT_H */
/* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */