summaryrefslogtreecommitdiff
path: root/eel/eel-canvas.h
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2016-06-26 20:45:02 +0200
committerraveit65 <[email protected]>2016-07-04 14:40:52 +0200
commitfecfeff6c34c1ac11c4803cb3ffc0b6722bd93b7 (patch)
tree8373fac6cec406f42152b9731be65d8fa3e4e5ea /eel/eel-canvas.h
parent8e7097e89a04156ae0d2dc487f630e259ec6fb76 (diff)
downloadcaja-fecfeff6c34c1ac11c4803cb3ffc0b6722bd93b7.tar.bz2
caja-fecfeff6c34c1ac11c4803cb3ffc0b6722bd93b7.tar.xz
Gtk+-3.20 eel-canvas: use GdkSeat operations
Some GdkDisplay operations have been deprecated in GDK 3.20. This commit replaces the deprecated code in eel_canvas_item_grab() and eel_canvas_item_ungrab() functions with new GdkSeat operations. https://bugzilla.gnome.org/show_bug.cgi?id=762235 taken from: https://git.gnome.org/browse/nautilus/commit/?id=225f2cf
Diffstat (limited to 'eel/eel-canvas.h')
-rw-r--r--eel/eel-canvas.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/eel/eel-canvas.h b/eel/eel-canvas.h
index f641087a..fcb4cb3d 100644
--- a/eel/eel-canvas.h
+++ b/eel/eel-canvas.h
@@ -250,25 +250,43 @@ extern "C" {
*/
void eel_canvas_item_hide (EelCanvasItem *item);
+#if GTK_CHECK_VERSION(3, 20, 0)
+ /* Grab the seat for the specified item. Only the events in event_mask will be
+ * reported. If cursor is non-NULL, it will be used during the duration of the
+ * grab. event is the event, triggering the grab. Returns the same values as gdk_seat_grab().
+ */
+#else
/* Grab the mouse for the specified item. Only the events in event_mask will be
* reported. If cursor is non-NULL, it will be used during the duration of the
* grab. Time is a proper X event time parameter. Returns the same values as
* XGrabPointer().
*/
+#endif
#if GTK_CHECK_VERSION (3, 0, 0)
GdkGrabStatus eel_canvas_item_grab (EelCanvasItem *item,
GdkEventMask event_mask,
GdkCursor *cursor,
+#if GTK_CHECK_VERSION(3, 20, 0)
+ const GdkEvent* event);
+#else
guint32 etime);
+#endif
#else
int eel_canvas_item_grab (EelCanvasItem *item, unsigned int event_mask,
GdkCursor *cursor, guint32 etime);
#endif
+#if GTK_CHECK_VERSION(3, 20, 0)
+ /* Ungrabs the seat -- the specified item must be the same that was passed to
+ * eel_canvas_item_grab().
+ */
+ void eel_canvas_item_ungrab (EelCanvasItem *item);
+#else
/* Ungrabs the mouse -- the specified item must be the same that was passed to
* eel_canvas_item_grab(). Time is a proper X event time parameter.
*/
void eel_canvas_item_ungrab (EelCanvasItem *item, guint32 etime);
+#endif
/* These functions convert from a coordinate system to another. "w" is world
* coordinates and "i" is item coordinates.