mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 21:51:08 +00:00
gtkwidget: Drop gtk_widget_device_is_shadowed()
A widget no longer needs updating on GTK grabs on itself, drop this miscellaneous and no longer used API.
This commit is contained in:
parent
1c5cf17f1c
commit
f046e27bb4
@ -4503,7 +4503,6 @@ gtk_widget_set_receives_default
|
||||
gtk_widget_get_receives_default
|
||||
gtk_widget_get_realized
|
||||
gtk_widget_get_mapped
|
||||
gtk_widget_device_is_shadowed
|
||||
gtk_widget_get_opacity
|
||||
gtk_widget_set_opacity
|
||||
gtk_widget_get_overflow
|
||||
|
@ -5218,48 +5218,6 @@ _gtk_widget_set_has_grab (GtkWidget *widget,
|
||||
priv->has_grab = has_grab;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_widget_device_is_shadowed:
|
||||
* @widget: a #GtkWidget
|
||||
* @device: a #GdkDevice
|
||||
*
|
||||
* Returns %TRUE if @device has been shadowed by a GTK+
|
||||
* device grab on another widget, so it would stop sending
|
||||
* events to @widget. This may be used in the
|
||||
* #GtkWidget::grab-notify signal to check for specific
|
||||
* devices. See gtk_device_grab_add().
|
||||
*
|
||||
* Returns: %TRUE if there is an ongoing grab on @device
|
||||
* by another #GtkWidget than @widget.
|
||||
**/
|
||||
gboolean
|
||||
gtk_widget_device_is_shadowed (GtkWidget *widget,
|
||||
GdkDevice *device)
|
||||
{
|
||||
GtkWindowGroup *group;
|
||||
GtkWidget *grab_widget;
|
||||
GtkRoot *root;
|
||||
|
||||
g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
|
||||
|
||||
if (!_gtk_widget_get_realized (widget))
|
||||
return TRUE;
|
||||
|
||||
root = _gtk_widget_get_root (widget);
|
||||
|
||||
if (GTK_IS_WINDOW (root))
|
||||
group = gtk_window_get_group (GTK_WINDOW (root));
|
||||
else
|
||||
group = gtk_window_get_group (NULL);
|
||||
|
||||
grab_widget = gtk_window_group_get_current_grab (group);
|
||||
if (grab_widget && widget != grab_widget &&
|
||||
!gtk_widget_is_ancestor (widget, grab_widget))
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_widget_set_name:
|
||||
* @widget: a #GtkWidget
|
||||
|
@ -427,10 +427,6 @@ void gtk_widget_set_receives_default (GtkWidget *widget,
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gboolean gtk_widget_get_receives_default (GtkWidget *widget);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gboolean gtk_widget_device_is_shadowed (GtkWidget *widget,
|
||||
GdkDevice *device);
|
||||
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gtk_widget_set_name (GtkWidget *widget,
|
||||
|
Loading…
Reference in New Issue
Block a user