[gtk+/xi2-for-master] Move gdk_device_grab API to gdkdevice.h



commit 87118f3f3de907e555536cf97a719c4b1e423e1d
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon May 24 14:18:39 2010 -0400

    Move gdk_device_grab API to gdkdevice.h
    
    And fix up gdk.symbols to match. I also needed to move GdkEventType
    from gdkevents.h to gdktypes.h to avoid some inclusion order issues.

 gdk/gdk.h       |   16 ----------------
 gdk/gdk.symbols |   21 +++++++++++++--------
 gdk/gdkdevice.h |   17 +++++++++++++++++
 gdk/gdkevents.h |   29 -----------------------------
 gdk/gdktypes.h  |   29 +++++++++++++++++++++++++++++
 5 files changed, 59 insertions(+), 53 deletions(-)
---
diff --git a/gdk/gdk.h b/gdk/gdk.h
index 9a1e2ea..e910a8b 100644
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -124,22 +124,6 @@ GdkGrabStatus gdk_keyboard_grab      (GdkWindow    *window,
 				      guint32       time_);
 #endif /* GDK_MULTIDEVICE_SAFE */
 
-GdkGrabStatus gdk_device_grab        (GdkDevice        *device,
-                                      GdkWindow        *window,
-                                      GdkGrabOwnership  grab_ownership,
-                                      gboolean          owner_events,
-                                      GdkEventMask      event_mask,
-				      GdkCursor        *cursor,
-				      guint32           time_);
-
-void          gdk_device_ungrab      (GdkDevice        *device,
-                                      guint32          time_);
-
-gboolean gdk_device_grab_info_libgtk_only (GdkDisplay  *display,
-                                           GdkDevice   *device,
-                                           GdkWindow  **grab_window,
-                                           gboolean    *owner_events);
-
 #ifndef GDK_MULTIHEAD_SAFE
 
 #ifndef GDK_MULTIDEVICE_SAFE
diff --git a/gdk/gdk.symbols b/gdk/gdk.symbols
index 9ae15f7..fe47daf 100644
--- a/gdk/gdk.symbols
+++ b/gdk/gdk.symbols
@@ -97,7 +97,6 @@ gdk_pointer_ungrab
 #endif
 gdk_event_send_client_message
 gdk_event_send_clientmessage_toall
-gdk_device_grab_info_libgtk_only
 #ifndef GDK_MULTIDEVICE_SAFE
 gdk_display_pointer_is_grabbed
 #endif
@@ -116,7 +115,6 @@ gdk_set_locale
 
 #if IN_HEADER(__GDK_H__)
 #if IN_FILE(__GDK_DISPLAY_X11_C__)
-gdk_device_ungrab
 gdk_display_list_devices
 gdk_event_send_client_message_for_display
 gdk_flush
@@ -190,12 +188,6 @@ gdk_keyboard_grab
 #endif
 #endif
 
-#if IN_HEADER(__GDK_H__)
-#if IN_FILE(__GDK_DEVICE_C__)
-gdk_device_grab
-#endif
-#endif
-
 #if IN_HEADER(__GDK_PROPERTY_H__)
 #if IN_FILE(__GDK_SELECTION_C__)
 gdk_string_to_compound_text
@@ -426,6 +418,19 @@ gdk_device_set_axis_use
 gdk_device_set_key
 gdk_device_set_mode
 gdk_device_set_source
+gdk_device_grab
+#endif
+#endif
+
+#if IN_HEADER(__GDK_DEVICE_H__)
+#if IN_FILE(__GDK_DISPLAY_X11_C__)
+gdk_device_ungrab
+#endif
+#endif
+
+#if IN_HEADER(__GDK_DEVICE_H__)
+#if IN_FILE(__GDK_DISPLAY_C__)
+gdk_device_grab_info_libgtk_only
 #endif
 #endif
 
diff --git a/gdk/gdkdevice.h b/gdk/gdkdevice.h
index 7412591..dfbf48a 100644
--- a/gdk/gdkdevice.h
+++ b/gdk/gdkdevice.h
@@ -26,6 +26,7 @@
 
 #include <gdk/gdktypes.h>
 
+
 G_BEGIN_DECLS
 
 #define GDK_TYPE_DEVICE         (gdk_device_get_type ())
@@ -269,6 +270,22 @@ GdkDevice  * gdk_device_get_associated_device (GdkDevice     *device);
 
 GdkDeviceType gdk_device_get_device_type (GdkDevice *device);
 
+GdkGrabStatus gdk_device_grab        (GdkDevice        *device,
+                                      GdkWindow        *window,
+                                      GdkGrabOwnership  grab_ownership,
+                                      gboolean          owner_events,
+                                      GdkEventMask      event_mask,
+                                      GdkCursor        *cursor,
+                                      guint32           time_);
+
+void          gdk_device_ungrab      (GdkDevice        *device,
+                                      guint32           time_);
+
+gboolean gdk_device_grab_info_libgtk_only (GdkDisplay  *display,
+                                           GdkDevice   *device,
+                                           GdkWindow  **grab_window,
+                                           gboolean    *owner_events);
+
 
 G_END_DECLS
 
diff --git a/gdk/gdkevents.h b/gdk/gdkevents.h
index 22475a8..f8f6d1a 100644
--- a/gdk/gdkevents.h
+++ b/gdk/gdkevents.h
@@ -187,35 +187,6 @@ typedef enum
   GDK_EVENT_LAST        /* helper variable for decls */
 } GdkEventType;
 
-/* Event masks. (Used to select what types of events a window
- *  will receive).
- */
-typedef enum
-{
-  GDK_EXPOSURE_MASK		= 1 << 1,
-  GDK_POINTER_MOTION_MASK	= 1 << 2,
-  GDK_POINTER_MOTION_HINT_MASK	= 1 << 3,
-  GDK_BUTTON_MOTION_MASK	= 1 << 4,
-  GDK_BUTTON1_MOTION_MASK	= 1 << 5,
-  GDK_BUTTON2_MOTION_MASK	= 1 << 6,
-  GDK_BUTTON3_MOTION_MASK	= 1 << 7,
-  GDK_BUTTON_PRESS_MASK		= 1 << 8,
-  GDK_BUTTON_RELEASE_MASK	= 1 << 9,
-  GDK_KEY_PRESS_MASK		= 1 << 10,
-  GDK_KEY_RELEASE_MASK		= 1 << 11,
-  GDK_ENTER_NOTIFY_MASK		= 1 << 12,
-  GDK_LEAVE_NOTIFY_MASK		= 1 << 13,
-  GDK_FOCUS_CHANGE_MASK		= 1 << 14,
-  GDK_STRUCTURE_MASK		= 1 << 15,
-  GDK_PROPERTY_CHANGE_MASK	= 1 << 16,
-  GDK_VISIBILITY_NOTIFY_MASK	= 1 << 17,
-  GDK_PROXIMITY_IN_MASK		= 1 << 18,
-  GDK_PROXIMITY_OUT_MASK	= 1 << 19,
-  GDK_SUBSTRUCTURE_MASK		= 1 << 20,
-  GDK_SCROLL_MASK               = 1 << 21,
-  GDK_ALL_EVENTS_MASK		= 0x3FFFFE
-} GdkEventMask;
-
 typedef enum
 {
   GDK_VISIBILITY_UNOBSCURED,
diff --git a/gdk/gdktypes.h b/gdk/gdktypes.h
index 5fff2fe..f2a1ff4 100644
--- a/gdk/gdktypes.h
+++ b/gdk/gdktypes.h
@@ -251,6 +251,35 @@ typedef enum
   GDK_OWNERSHIP_APPLICATION
 } GdkGrabOwnership;
 
+/* Event masks. (Used to select what types of events a window
+ *  *  will receive).
+ *   */
+typedef enum
+{
+  GDK_EXPOSURE_MASK             = 1 << 1,
+  GDK_POINTER_MOTION_MASK       = 1 << 2,
+  GDK_POINTER_MOTION_HINT_MASK  = 1 << 3,
+  GDK_BUTTON_MOTION_MASK        = 1 << 4,
+  GDK_BUTTON1_MOTION_MASK       = 1 << 5,
+  GDK_BUTTON2_MOTION_MASK       = 1 << 6,
+  GDK_BUTTON3_MOTION_MASK       = 1 << 7,
+  GDK_BUTTON_PRESS_MASK         = 1 << 8,
+  GDK_BUTTON_RELEASE_MASK       = 1 << 9,
+  GDK_KEY_PRESS_MASK            = 1 << 10,
+  GDK_KEY_RELEASE_MASK          = 1 << 11,
+  GDK_ENTER_NOTIFY_MASK         = 1 << 12,
+  GDK_LEAVE_NOTIFY_MASK         = 1 << 13,
+  GDK_FOCUS_CHANGE_MASK         = 1 << 14,
+  GDK_STRUCTURE_MASK            = 1 << 15,
+  GDK_PROPERTY_CHANGE_MASK      = 1 << 16,
+  GDK_VISIBILITY_NOTIFY_MASK    = 1 << 17,
+  GDK_PROXIMITY_IN_MASK         = 1 << 18,
+  GDK_PROXIMITY_OUT_MASK        = 1 << 19,
+  GDK_SUBSTRUCTURE_MASK         = 1 << 20,
+  GDK_SCROLL_MASK               = 1 << 21,
+  GDK_ALL_EVENTS_MASK           = 0x3FFFFE
+} GdkEventMask;
+
 typedef void (*GdkInputFunction) (gpointer	    data,
 				  gint		    source,
 				  GdkInputCondition condition);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]