[gtk/kill-grabs-2: 3/3] Drop gtk_grab_add/remove from public api



commit 3d11973df8a02d789005a7d3f9991e0ab681b72a
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Feb 28 16:36:17 2020 -0500

    Drop gtk_grab_add/remove from public api
    
    The only form in which we still allow grabs to take place
    is with modal toplevels.

 docs/reference/gtk/gtk4-sections.txt |  6 +-----
 gtk/gtkmain.h                        |  5 -----
 gtk/gtkprivate.h                     |  5 +++++
 gtk/gtkwindowgroup.c                 | 16 +++++-----------
 gtk/gtkwindowgroup.h                 |  3 ---
 5 files changed, 11 insertions(+), 24 deletions(-)
---
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt
index 9f6d0081b9..008ab81f1e 100644
--- a/docs/reference/gtk/gtk4-sections.txt
+++ b/docs/reference/gtk/gtk4-sections.txt
@@ -4368,7 +4368,7 @@ gtk_window_group_new
 gtk_window_group_add_window
 gtk_window_group_remove_window
 gtk_window_group_list_windows
-gtk_window_group_get_current_grab
+
 <SUBSECTION Standard>
 GTK_IS_WINDOW_GROUP
 GTK_IS_WINDOW_GROUP_CLASS
@@ -4390,10 +4390,6 @@ gtk_get_locale_direction
 gtk_init
 gtk_init_check
 
-<SUBSECTION>
-gtk_grab_add
-gtk_grab_remove
-
 <SUBSECTION>
 GTK_PRIORITY_RESIZE
 
diff --git a/gtk/gtkmain.h b/gtk/gtkmain.h
index 72adbb69ec..16fb5743d5 100644
--- a/gtk/gtkmain.h
+++ b/gtk/gtkmain.h
@@ -107,11 +107,6 @@ PangoLanguage *gtk_get_default_language (void);
 GDK_AVAILABLE_IN_ALL
 GtkTextDirection gtk_get_locale_direction (void);
 
-GDK_AVAILABLE_IN_ALL
-void       gtk_grab_add            (GtkWidget          *widget);
-GDK_AVAILABLE_IN_ALL
-void       gtk_grab_remove         (GtkWidget          *widget);
-
 GDK_AVAILABLE_IN_ALL
 GdkEvent * gtk_get_current_event        (void);
 GDK_AVAILABLE_IN_ALL
diff --git a/gtk/gtkprivate.h b/gtk/gtkprivate.h
index 9e4e73a11f..6cac03c763 100644
--- a/gtk/gtkprivate.h
+++ b/gtk/gtkprivate.h
@@ -32,6 +32,7 @@
 #include "gtkcsstypesprivate.h"
 #include "gtktexthandleprivate.h"
 #include "gtkeventcontrollerprivate.h"
+#include "gtkwindowgroup.h"
 
 G_BEGIN_DECLS
 
@@ -67,6 +68,10 @@ void          _gtk_ensure_resources       (void);
 
 void          gtk_main_sync               (void);
 
+GtkWidget *   gtk_window_group_get_current_grab (GtkWindowGroup *window_group);
+void          gtk_grab_add                      (GtkWidget      *widget);
+void          gtk_grab_remove                   (GtkWidget      *widget);
+
 gboolean _gtk_boolean_handled_accumulator (GSignalInvocationHint *ihint,
                                            GValue                *return_accu,
                                            const GValue          *handler_return,
diff --git a/gtk/gtkwindowgroup.c b/gtk/gtkwindowgroup.c
index aeadd467af..4b1e0c2e39 100644
--- a/gtk/gtkwindowgroup.c
+++ b/gtk/gtkwindowgroup.c
@@ -27,6 +27,7 @@
 #include "gtkmain.h"
 #include "gtkwindowprivate.h"
 #include "gtkwindowgroup.h"
+#include "gtkprivate.h"
 
 
 /**
@@ -81,8 +82,10 @@ gtk_window_group_class_init (GtkWindowGroupClass *klass)
 /**
  * gtk_window_group_new:
  * 
- * Creates a new #GtkWindowGroup object. Grabs added with
- * gtk_grab_add() only affect windows within the same #GtkWindowGroup.
+ * Creates a new #GtkWindowGroup object.
+ *
+ * Modality of windows only affects windows
+ * within the same #GtkWindowGroup.
  * 
  * Returns: a new #GtkWindowGroup. 
  **/
@@ -208,15 +211,6 @@ gtk_window_group_list_windows (GtkWindowGroup *window_group)
   return g_list_reverse (group_windows);
 }
 
-/**
- * gtk_window_group_get_current_grab:
- * @window_group: a #GtkWindowGroup
- *
- * Gets the current grab widget of the given group,
- * see gtk_grab_add().
- *
- * Returns: (transfer none): the current grab widget of the group
- */
 GtkWidget *
 gtk_window_group_get_current_grab (GtkWindowGroup *window_group)
 {
diff --git a/gtk/gtkwindowgroup.h b/gtk/gtkwindowgroup.h
index 80910751ea..b8e9ad548a 100644
--- a/gtk/gtkwindowgroup.h
+++ b/gtk/gtkwindowgroup.h
@@ -76,9 +76,6 @@ void             gtk_window_group_remove_window (GtkWindowGroup     *window_grou
 GDK_AVAILABLE_IN_ALL
 GList *          gtk_window_group_list_windows  (GtkWindowGroup     *window_group);
 
-GDK_AVAILABLE_IN_ALL
-GtkWidget *      gtk_window_group_get_current_grab (GtkWindowGroup *window_group);
-
 
 G_END_DECLS
 


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