[gtk+/xi2] Make gtk_window_group_get_current_device_grab() public.



commit 11da06a42a8a5180dca72cf27208c4232f3917f1
Author: Carlos Garnacho <carlosg gnome org>
Date:   Tue Mar 9 18:15:25 2010 +0100

    Make gtk_window_group_get_current_device_grab() public.
    
    This is the replacement for gtk_grab_get_current().

 gtk/gtkmain.c   |    6 +++---
 gtk/gtkwidget.c |    2 +-
 gtk/gtkwindow.c |   13 +++++++++++--
 gtk/gtkwindow.h |    6 +++---
 4 files changed, 18 insertions(+), 9 deletions(-)
---
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index 4658749..11909ad 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -1516,7 +1516,7 @@ gtk_main_do_event (GdkEvent *event)
     }
   else if (device)
     {
-      grab_widget = _gtk_window_group_get_current_device_grab (window_group, device);
+      grab_widget = gtk_window_group_get_current_device_grab (window_group, device);
 
       if (grab_widget)
         {
@@ -1997,7 +1997,7 @@ gtk_device_grab_add (GtkWidget        *widget,
   g_return_if_fail (GDK_IS_DEVICE (device));
 
   group = gtk_main_get_window_group (widget);
-  old_grab_widget = _gtk_window_group_get_current_device_grab (group, device);
+  old_grab_widget = gtk_window_group_get_current_device_grab (group, device);
   _gtk_window_group_add_device_grab (group, widget, device, block_others);
 
   gtk_grab_notify (group, device, old_grab_widget, widget, TRUE);
@@ -2023,7 +2023,7 @@ gtk_device_grab_remove (GtkWidget *widget,
 
   group = gtk_main_get_window_group (widget);
   _gtk_window_group_remove_device_grab (group, widget, device);
-  new_grab_widget = _gtk_window_group_get_current_device_grab (group, device);
+  new_grab_widget = gtk_window_group_get_current_device_grab (group, device);
 
   gtk_grab_notify (group, device, widget, new_grab_widget, FALSE);
 }
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 32442c1..6125eb6 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -5859,7 +5859,7 @@ gtk_widget_device_is_shadowed (GtkWidget *widget,
   else
     group = gtk_window_get_group (NULL);
 
-  grab_widget = _gtk_window_group_get_current_device_grab (group, device);
+  grab_widget = gtk_window_group_get_current_device_grab (group, device);
 
   /* Widget not inside the hierarchy of grab_widget */
   if (grab_widget &&
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index d36f454..fcc100f 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -7891,9 +7891,18 @@ _gtk_window_group_remove_device_grab (GtkWindowGroup *window_group,
     }
 }
 
+/**
+ * gtk_window_group_get_current_device_grab:
+ * @window_group: a #GtkWindowGroup
+ * @device: a #GdkDevice
+ *
+ * Returns the current grab widget for @device, or %NULL if none.
+ *
+ * Returns: The grab widget, or %NULL
+ **/
 GtkWidget *
-_gtk_window_group_get_current_device_grab (GtkWindowGroup *window_group,
-                                           GdkDevice      *device)
+gtk_window_group_get_current_device_grab (GtkWindowGroup *window_group,
+                                          GdkDevice      *device)
 {
   GtkWindowGroupPrivate *priv;
   GtkDeviceGrabInfo *info;
diff --git a/gtk/gtkwindow.h b/gtk/gtkwindow.h
index 4175069..2953d53 100644
--- a/gtk/gtkwindow.h
+++ b/gtk/gtkwindow.h
@@ -401,6 +401,9 @@ void             gtk_window_group_remove_window (GtkWindowGroup     *window_grou
 					         GtkWindow          *window);
 GList *          gtk_window_group_list_windows  (GtkWindowGroup     *window_group);
 
+GtkWidget *      gtk_window_group_get_current_device_grab (GtkWindowGroup *window_group,
+                                                           GdkDevice      *device);
+
 
 /* --- internal functions --- */
 void            _gtk_window_internal_set_focus (GtkWindow *window,
@@ -426,9 +429,6 @@ void            _gtk_window_group_remove_device_grab (GtkWindowGroup   *window_g
                                                       GtkWidget        *widget,
                                                       GdkDevice        *device);
 
-GtkWidget *     _gtk_window_group_get_current_device_grab (GtkWindowGroup *window_group,
-                                                           GdkDevice      *device);
-
 gboolean        _gtk_window_group_widget_is_blocked_for_device (GtkWindowGroup *window_group,
                                                                 GtkWidget      *widget,
                                                                 GdkDevice      *device);



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