2011-10-17 [colin] 3.7.10cvs31
[claws.git] / src / gtk / gtkutils.h
index 0de05c09f2121485f7554bb46a048d71fe5c0643..0ae2765e57353fa2c8cd19108c9e457cbbb43fe4 100644 (file)
 #include "main.h"
 #endif
 
+#if !GTK_CHECK_VERSION(3, 0, 0)
 #include "gtkcmctree.h"
+#endif
+
+#ifndef GDK_KEY_Escape
+#include "gdkkeysyms-new.h"
+#endif
 
 #define GTK_EVENTS_FLUSH() \
 { \
@@ -92,6 +98,7 @@ void gtkut_stock_with_text_button_set_create(GtkWidget **bbox,
                                   GtkWidget **button2, const gchar *label2, const gchar *text2,
                                   GtkWidget **button3, const gchar *label3, const gchar *text3);
 
+#if !GTK_CHECK_VERSION(3, 0, 0)
 void gtkut_ctree_node_move_if_on_the_edge
                                        (GtkCMCTree     *ctree,
                                         GtkCMCTreeNode *node,
@@ -113,6 +120,7 @@ gboolean gtkut_ctree_node_is_parent (GtkCMCTreeNode         *parent,
                                         GtkCMCTreeNode         *node);
 void gtkut_ctree_set_focus_row         (GtkCMCTree     *ctree,
                                         GtkCMCTreeNode *node);
+#endif
 
 void gtkut_clist_set_focus_row         (GtkCMCList     *clist,
                                         gint            row);
@@ -212,12 +220,15 @@ GtkUIManager *gtkut_ui_manager(void);
 
 GdkPixbuf *claws_load_pixbuf_fitting(GdkPixbuf *pixbuf, int box_width,
                                     int box_height);
+
+typedef void (*ClawsIOFunc)(gpointer data, gint source, GIOCondition condition);
 gint
 claws_input_add    (gint             source,
-                   GdkInputCondition condition,
-                   GdkInputFunction  function,
+                   GIOCondition      condition,
+                   ClawsIOFunc       function,
                    gpointer          data,
                    gboolean          is_sock);
+
 #if GTK_CHECK_VERSION(2,12,0)
 #define CLAWS_TIP_DECL() {}
 #define CLAWS_SET_TIP(widget,tip) {                                    \
@@ -235,6 +246,12 @@ claws_input_add    (gint         source,
        gtk_tooltips_set_tip(GTK_TOOLTIPS(tips), widget,        \
                            tip, NULL);                         \
 }
-
+#endif
+#if !GTK_CHECK_VERSION(2,22,0)
+#define gdk_drag_context_get_selected_action(x) ((x)->action)
+#define gdk_drag_context_get_actions(x) ((x)->actions)
+#define gtk_text_view_get_vadjustment(x) ((x)->vadjustment)
+#define gdk_drag_context_get_suggested_action(x) ((x)->suggested_action)
+#define gtk_button_get_event_window(x) ((x)->event_window)
 #endif
 #endif /* __GTKUTILS_H__ */