forked from AuroraMiddleware/gtk
gtkwidget: Drop ::grab-notify signal and vfunc
We don't expect widgets to react directly to these anymore. Internally we still reset the controllers.
This commit is contained in:
parent
1f798643c8
commit
994f32704b
@ -492,7 +492,6 @@ enum {
|
||||
UNREALIZE,
|
||||
STATE_FLAGS_CHANGED,
|
||||
DIRECTION_CHANGED,
|
||||
GRAB_NOTIFY,
|
||||
MNEMONIC_ACTIVATE,
|
||||
MOVE_FOCUS,
|
||||
KEYNAV_FAILED,
|
||||
@ -808,9 +807,16 @@ gtk_widget_real_contains (GtkWidget *widget,
|
||||
&GRAPHENE_POINT_INIT (x, y));
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_widget_real_grab_notify (GtkWidget *widget,
|
||||
gboolean was_grabbed)
|
||||
/**
|
||||
* _gtk_widget_grab_notify:
|
||||
* @widget: a #GtkWidget
|
||||
* @was_grabbed: whether a grab is now in effect
|
||||
*
|
||||
* Emits the #GtkWidget::grab-notify signal on @widget.
|
||||
**/
|
||||
void
|
||||
_gtk_widget_grab_notify (GtkWidget *widget,
|
||||
gboolean was_grabbed)
|
||||
{
|
||||
GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget);
|
||||
int i;
|
||||
@ -923,7 +929,6 @@ gtk_widget_class_init (GtkWidgetClass *klass)
|
||||
klass->measure = gtk_widget_real_measure;
|
||||
klass->state_flags_changed = gtk_widget_real_state_flags_changed;
|
||||
klass->direction_changed = gtk_widget_real_direction_changed;
|
||||
klass->grab_notify = gtk_widget_real_grab_notify;
|
||||
klass->snapshot = gtk_widget_real_snapshot;
|
||||
klass->mnemonic_activate = gtk_widget_real_mnemonic_activate;
|
||||
klass->grab_focus = gtk_widget_grab_focus_self;
|
||||
@ -1527,31 +1532,6 @@ gtk_widget_class_init (GtkWidgetClass *klass)
|
||||
G_TYPE_NONE, 1,
|
||||
GTK_TYPE_TEXT_DIRECTION);
|
||||
|
||||
/**
|
||||
* GtkWidget::grab-notify:
|
||||
* @widget: the object which received the signal
|
||||
* @was_grabbed: %FALSE if the widget becomes shadowed, %TRUE
|
||||
* if it becomes unshadowed
|
||||
*
|
||||
* The ::grab-notify signal is emitted when a widget becomes
|
||||
* shadowed by a GTK+ grab (not a pointer or keyboard grab) on
|
||||
* another widget, or when it becomes unshadowed due to a grab
|
||||
* being removed.
|
||||
*
|
||||
* A widget is shadowed by a gtk_grab_add() when the topmost
|
||||
* grab widget in the grab stack of its window group is not
|
||||
* its ancestor.
|
||||
*/
|
||||
widget_signals[GRAB_NOTIFY] =
|
||||
g_signal_new (I_("grab-notify"),
|
||||
G_TYPE_FROM_CLASS (gobject_class),
|
||||
G_SIGNAL_RUN_FIRST,
|
||||
G_STRUCT_OFFSET (GtkWidgetClass, grab_notify),
|
||||
NULL, NULL,
|
||||
NULL,
|
||||
G_TYPE_NONE, 1,
|
||||
G_TYPE_BOOLEAN);
|
||||
|
||||
/**
|
||||
* GtkWidget::mnemonic-activate:
|
||||
* @widget: the object which received the signal.
|
||||
@ -4593,20 +4573,6 @@ gtk_widget_activate (GtkWidget *widget)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* _gtk_widget_grab_notify:
|
||||
* @widget: a #GtkWidget
|
||||
* @was_grabbed: whether a grab is now in effect
|
||||
*
|
||||
* Emits the #GtkWidget::grab-notify signal on @widget.
|
||||
**/
|
||||
void
|
||||
_gtk_widget_grab_notify (GtkWidget *widget,
|
||||
gboolean was_grabbed)
|
||||
{
|
||||
g_signal_emit (widget, widget_signals[GRAB_NOTIFY], 0, was_grabbed);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_widget_grab_focus:
|
||||
* @widget: a #GtkWidget
|
||||
|
@ -158,9 +158,6 @@ struct _GtkWidget
|
||||
* see gtk_widget_get_state_flags().
|
||||
* @direction_changed: Signal emitted when the text direction of a
|
||||
* widget changes.
|
||||
* @grab_notify: Signal emitted when a widget becomes shadowed by a
|
||||
* GTK+ grab (not a pointer or keyboard grab) on another widget, or
|
||||
* when it becomes unshadowed due to a grab being removed.
|
||||
* @get_request_mode: This allows a widget to tell its parent container whether
|
||||
* it prefers to be allocated in %GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH or
|
||||
* %GTK_SIZE_REQUEST_WIDTH_FOR_HEIGHT mode.
|
||||
@ -226,8 +223,6 @@ struct _GtkWidgetClass
|
||||
GtkStateFlags previous_state_flags);
|
||||
void (* direction_changed) (GtkWidget *widget,
|
||||
GtkTextDirection previous_direction);
|
||||
void (* grab_notify) (GtkWidget *widget,
|
||||
gboolean was_grabbed);
|
||||
|
||||
/* size requests */
|
||||
GtkSizeRequestMode (* get_request_mode) (GtkWidget *widget);
|
||||
|
Loading…
Reference in New Issue
Block a user