Drop gtk_grab_add/remove from public api

The only form in which we still allow grabs to take place
is with modal toplevels.
This commit is contained in:
Matthias Clasen 2020-02-28 16:36:17 -05:00
parent 57c8a643ff
commit 3d11973df8
5 changed files with 11 additions and 24 deletions

View File

@ -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

View File

@ -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

View File

@ -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,

View File

@ -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)
{

View File

@ -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