forked from AuroraMiddleware/gtk
Add back a private api to list controllers
This will let us show them in the inspector.
This commit is contained in:
parent
2ba89256f4
commit
a727c41e4a
@ -16889,3 +16889,25 @@ _gtk_widget_remove_controller (GtkWidget *widget,
|
||||
g_object_unref (data->controller);
|
||||
data->controller = NULL;
|
||||
}
|
||||
|
||||
GList *
|
||||
_gtk_widget_list_controllers (GtkWidget *widget,
|
||||
GtkPropagationPhase phase)
|
||||
{
|
||||
EventControllerData *data;
|
||||
GtkWidgetPrivate *priv;
|
||||
GList *l, *retval = NULL;
|
||||
|
||||
g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL);
|
||||
|
||||
priv = widget->priv;
|
||||
|
||||
for (l = priv->event_controllers; l; l = l->next)
|
||||
{
|
||||
data = l->data;
|
||||
if (data->phase == phase && data->controller != NULL)
|
||||
retval = g_list_prepend (retval, data->controller);
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
@ -157,6 +157,8 @@ void _gtk_widget_add_controller (GtkWidget
|
||||
GtkPropagationPhase phase);
|
||||
void _gtk_widget_remove_controller (GtkWidget *widget,
|
||||
GtkEventController *controller);
|
||||
GList * _gtk_widget_list_controllers (GtkWidget *widget,
|
||||
GtkPropagationPhase phase);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user