forked from AuroraMiddleware/gtk
widget: Add a private setter for has-focus
This commit is contained in:
parent
94b0e99be5
commit
15300f839e
@ -11623,6 +11623,19 @@ gtk_widget_send_focus_change (GtkWidget *widget,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
gtk_widget_set_has_focus (GtkWidget *widget,
|
||||
gboolean has_focus)
|
||||
{
|
||||
GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget);
|
||||
|
||||
if (priv->has_focus == has_focus)
|
||||
return;
|
||||
|
||||
priv->has_focus = has_focus;
|
||||
g_object_notify_by_pspec (G_OBJECT (widget), widget_props[PROP_HAS_FOCUS]);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_widget_in_destruction:
|
||||
* @widget: a #GtkWidget
|
||||
|
@ -318,6 +318,8 @@ void gtk_widget_focus_sort (GtkWidget *wi
|
||||
GPtrArray *focus_order);
|
||||
gboolean gtk_widget_focus_move (GtkWidget *widget,
|
||||
GtkDirectionType direction);
|
||||
void gtk_widget_set_has_focus (GtkWidget *widget,
|
||||
gboolean has_focus);
|
||||
void gtk_widget_get_surface_allocation (GtkWidget *widget,
|
||||
GtkAllocation *allocation);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user