deprecated: 3.8 since: 3.0

Declaration [src]

gtk_theming_engine_register_property (
  const gchar* name_space,
  GtkStylePropertyParser parse_func,
  GParamSpec* pspec

Description [src]

Registers a property so it can be used in the CSS file format, on the CSS file the property will look like “-${name_space}-${property_name}”. being ${property_name} the given to pspec. name_space will usually be the theme engine name.

For any type a parse_func may be provided, being this function used for turning any property value (between “:” and “;”) in CSS to the GValue needed. For basic types there is already builtin parsing support, so NULL may be provided for these cases.

Engines must ensure property registration happens exactly once, usually GTK+ deals with theming engines as singletons, so this should be guaranteed to happen once, but bear this in mind when creating GtkThemeEngines yourself.

In order to make use of the custom registered properties in the CSS file, make sure the engine is loaded first by specifying the engine property, either in a previous rule or within the same one.

* {
    engine: someengine;
    -SomeEngine-custom-property: 2;

Available since: 3.0

Deprecated since: 3.8

Code should use the default properties provided by CSS.

This function is not directly available to language bindings.



Type: const gchar*

Namespace for the property name.

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

Type: GtkStylePropertyParser

Parsing function to use, or NULL.


Type: GParamSpec

The GParamSpec for the new property.

The data is owned by the caller of the function.