Method
GtkStyleContextget
since: 3.0
Declaration [src]
void
gtk_style_context_get (
GtkStyleContext* context,
GtkStateFlags state,
...
)
Description [src]
Retrieves several style property values from context
for a
given state.
See gtk_style_context_get_property()
for details.
For the property name / return value pairs, it works similarly as g_object_get(). Example:
GdkRGBA *background_color = NULL;
PangoFontDescription *font_desc = NULL;
gint border_radius = 0;
gtk_style_context_get (style_context,
gtk_style_context_get_state (style_context),
GTK_STYLE_PROPERTY_BACKGROUND_COLOR, &background_color,
GTK_STYLE_PROPERTY_FONT, &font_desc,
GTK_STYLE_PROPERTY_BORDER_RADIUS, &border_radius,
NULL);
// Do something with the property values.
if (background_color != NULL)
gdk_rgba_free (background_color);
if (font_desc != NULL)
pango_font_description_free (font_desc);
Available since: 3.0
This method is not directly available to language bindings.
Parameters
state
-
Type:
GtkStateFlags
State to retrieve the property values for.
...
-
Type:
Property name / return value pairs, followed by
NULL
.