register_property


Description:

[ Version ( deprecated = true , deprecated_since = "3.8" , since = "3.0" ) ]
public static void register_property (string name_space, StylePropertyParser? parse_func, ParamSpec pspec)

Warning: register_property is deprecated since 3.8.

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}".

Note:

Code should use the default properties provided by CSS.

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 Value 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 ThemeEngines 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;
}

Parameters:

name_space

namespace for the property name

parse_func

parsing function to use, or null

pspec

the ParamSpec for the new property