Missing func in gdkmain-fb.c of linux-fb backend



Hi,


gdk_keyboard_grab_info_libgtk_only and gdk_pointer_grab_info_libgtk_only
func are missing in gdk/linux-fb/gdkmain-fb.c. This patch is almost a
complete cut-n-paste from the x11/directfb counterpart. OK to commit to
HEAD?

Abel
--- gdk/linux-fb/gdkmain-fb.c.orig	2002-02-09 01:37:26.000000000 +0800
+++ gdk/linux-fb/gdkmain-fb.c	2002-03-16 07:57:48.000000000 +0800
@@ -1012,6 +1012,35 @@
   return _gdk_fb_pointer_grab_window != NULL;
 }
 
+/**
+ * gdk_pointer_grab_info_libgtk_only:
+ * @grab_window: location to store current grab window
+ * @owner_events: location to store boolean indicating whether
+ *   the @owner_events flag to gdk_pointer_grab() was %TRUE.
+ *
+ * Determines information about the current pointer grab.
+ * This is not public API and must not be used by applications.
+ *
+ * Return value: %TRUE if this application currently has the
+ *  pointer grabbed.
+ **/
+gboolean
+gdk_pointer_grab_info_libgtk_only (GdkWindow **grab_window,
+				   gboolean   *owner_events)
+{
+  if (_gdk_fb_pointer_grab_window)
+    {
+      if (grab_window)
+        *grab_window = (GdkWindow *)_gdk_fb_pointer_grab_window;
+      if (owner_events)
+        *owner_events = _gdk_fb_pointer_grab_owner_events;
+
+      return TRUE;
+    }
+  else
+    return FALSE;
+}
+
 /*
  *--------------------------------------------------------------
  * gdk_keyboard_grab
@@ -1072,6 +1101,34 @@
   _gdk_fb_keyboard_grab_window = NULL;
 }
 
+/**
+ * gdk_keyboard_grab_info_libgtk_only:
+ * @grab_window: location to store current grab window
+ * @owner_events: location to store boolean indicating whether
+ *   the @owner_events flag to gdk_keyboard_grab() was %TRUE.
+ *
+ * Determines information about the current keyboard grab.
+ * This is not public API and must not be used by applications.
+ *
+ * Return value: %TRUE if this application currently has the
+ *  keyboard grabbed.
+ **/
+gdk_keyboard_grab_info_libgtk_only (GdkWindow **grab_window,
+				    gboolean   *owner_events)
+{
+  if (_gdk_fb_keyboard_grab_window)
+    {
+      if (grab_window)
+        *grab_window = (GdkWindow *)_gdk_fb_keyboard_grab_window;
+      if (owner_events)
+        *owner_events = _gdk_fb_keyboard_grab_owner_events;
+
+      return TRUE;
+    }
+  else
+    return FALSE;
+}
+
 /*
  *--------------------------------------------------------------
  * gdk_screen_width


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