Commit 2686930b authored by Michael Natterer's avatar Michael Natterer 😴

Add gtk_widget_get_state() for accessing the sealed member "state"

parent 8f601762
......@@ -4982,6 +4982,7 @@ gtk_widget_get_sensitive
gtk_widget_get_settings
gtk_widget_get_size_request
gtk_widget_get_snapshot
gtk_widget_get_state
gtk_widget_get_style
gtk_widget_get_tooltip_markup
gtk_widget_get_tooltip_text
......
......@@ -5421,6 +5421,21 @@ gtk_widget_set_state (GtkWidget *widget,
}
}
/**
* gtk_widget_get_state:
* @widget: a #GtkWidget
*
* Returns: the state of @widget. See gtk_widget_set_state().
*
* Since: 2.18
**/
GtkStateType
gtk_widget_get_state (GtkWidget *widget)
{
g_return_val_if_fail (GTK_IS_WIDGET (widget), GTK_STATE_NORMAL);
return widget->state;
}
/**
* gtk_widget_set_app_paintable:
......
......@@ -556,8 +556,10 @@ void gtk_widget_grab_default (GtkWidget *widget);
void gtk_widget_set_name (GtkWidget *widget,
const gchar *name);
G_CONST_RETURN gchar* gtk_widget_get_name (GtkWidget *widget);
void gtk_widget_set_state (GtkWidget *widget,
GtkStateType state);
GtkStateType gtk_widget_get_state (GtkWidget *widget);
void gtk_widget_set_sensitive (GtkWidget *widget,
gboolean sensitive);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment