mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-29 06:51:10 +00:00
widget: Add typecheck-less _is_sensitive
It adds up to a whopping 3% in gtk_widget_pick
This commit is contained in:
parent
dbf0654e5b
commit
a953fd762e
@ -6481,11 +6481,9 @@ gtk_widget_get_sensitive (GtkWidget *widget)
|
||||
gboolean
|
||||
gtk_widget_is_sensitive (GtkWidget *widget)
|
||||
{
|
||||
GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget);
|
||||
|
||||
g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
|
||||
|
||||
return !(priv->state_flags & GTK_STATE_FLAG_INSENSITIVE);
|
||||
return _gtk_widget_is_sensitive (widget);
|
||||
}
|
||||
|
||||
|
||||
|
@ -484,6 +484,12 @@ _gtk_widget_get_last_child (GtkWidget *widget)
|
||||
return widget->priv->last_child;
|
||||
}
|
||||
|
||||
static inline gboolean
|
||||
_gtk_widget_is_sensitive (GtkWidget *widget)
|
||||
{
|
||||
return !(widget->priv->state_flags & GTK_STATE_FLAG_INSENSITIVE);
|
||||
}
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GTK_WIDGET_PRIVATE_H__ */
|
||||
|
Loading…
Reference in New Issue
Block a user