Method

GtkStyleContextget_property

Declaration [src]

void
gtk_style_context_get_property (
  GtkStyleContext* context,
  const gchar* property,
  GtkStateFlags state,
  GValue* value
)

Description [src]

Gets a style property from context for the given state.

Note that not all CSS properties that are supported by GTK+ can be retrieved in this way, since they may not be representable as GValue. GTK+ defines macros for a number of properties that can be used with this function.

Note that passing a state other than the current state of context is not recommended unless the style context has been saved with gtk_style_context_save().

When value is no longer needed, g_value_unset() must be called to free any allocated memory.

Available since:3.0

Parameters

property

Type: const gchar*

Style property name.

The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.
state

Type: GtkStateFlags

State to retrieve the property value for.

value

Type: GValue

Return location for the style property value.

The argument will be set by the function.
The instance takes ownership of the data, and is responsible for freeing it.