Gtk.StyleProperties¶
| Subclasses: | None | 
|---|
Methods¶
| Inherited: | GObject.Object (37), Gtk.StyleProvider (3) | 
|---|---|
| Structs: | GObject.ObjectClass (5) | 
| class | new() | 
| clear() | |
| get_property(property, state) | |
| lookup_color(name) | |
| map_color(name, color) | |
| merge(props_to_merge, replace) | |
| set_property(property, state, value) | |
| unset_property(property, state) | 
Virtual Methods¶
| Inherited: | GObject.Object (7), Gtk.StyleProvider (3) | 
|---|
Properties¶
None
Signals¶
| Inherited: | GObject.Object (1) | 
|---|
Class Details¶
- 
class Gtk.StyleProperties(**kwargs)¶
- Bases: - GObject.Object,- Gtk.StyleProvider- Abstract: - No - Structure: - Gtk.StylePropertiesClass- Gtk.StylePropertiesprovides the storage for style information that is used by- Gtk.StyleContextand other- Gtk.StyleProviderimplementations.- Before style properties can be stored in - Gtk.StyleProperties, they must be registered with gtk_style_properties_register_property().- Unless you are writing a - Gtk.StyleProviderimplementation, you are unlikely to use this API directly, as gtk_style_context_get() and its variants are the preferred way to access styling information from widget implementations and theming engine implementations should use the APIs provided by- Gtk.ThemingEngineinstead.- Gtk.StylePropertieshas been deprecated in GTK 3.16. The CSS machinery does not use it anymore and all users of this object have been deprecated.- 
classmethod new()[source]¶
- Returns: - a new - Gtk.StyleProperties- Return type: - Gtk.StyleProperties- Returns a newly created - Gtk.StyleProperties- Deprecated since version 3.16: - Gtk.StylePropertiesare deprecated.
 - 
clear()[source]¶
- Clears all style information from self. - Deprecated since version 3.16: - Gtk.StylePropertiesare deprecated.
 - 
get_property(property, state)[source]¶
- Parameters: - property (str) – style property name
- state (Gtk.StateFlags) – state to retrieve the property value for
 - Returns: - Trueif the property exists in self,- Falseotherwise- value: - return location for the style property value. - Return type: - ( - bool, value:- GObject.Value)- Gets a style property from self for the given state. When done with value, - GObject.Value.unset() needs to be called to free any allocated memory.- New in version 3.0. - Deprecated since version 3.16: - Gtk.StylePropertiesare deprecated.
- property (
 - 
lookup_color(name)[source]¶
- Parameters: - name ( - str) – color name to lookup- Returns: - The mapped color - Return type: - Gtk.SymbolicColor- Returns the symbolic color that is mapped to name. - New in version 3.0. - Deprecated since version 3.8: - Gtk.SymbolicColoris deprecated.
 - 
map_color(name, color)[source]¶
- Parameters: - name (str) – color name
- color (Gtk.SymbolicColor) –Gtk.SymbolicColorto map name to
 - Maps color so it can be referenced by name. See - Gtk.StyleProperties.lookup_color()- New in version 3.0. - Deprecated since version 3.8: - Gtk.SymbolicColoris deprecated.
- name (
 - 
merge(props_to_merge, replace)[source]¶
- Parameters: - props_to_merge (Gtk.StyleProperties) – a secondGtk.StyleProperties
- replace (bool) – whether to replace values or not
 - Merges into self all the style information contained in props_to_merge. If replace is - True, the values will be overwritten, if it is- False, the older values will prevail.- New in version 3.0. - Deprecated since version 3.16: - Gtk.StylePropertiesare deprecated.
- props_to_merge (
 - 
set_property(property, state, value)[source]¶
- Parameters: - property (str) – styling property to set
- state (Gtk.StateFlags) – state to set the value for
- value (GObject.Value) – new value for the property
 - Sets a styling property in self. - New in version 3.0. - Deprecated since version 3.16: - Gtk.StylePropertiesare deprecated.
- property (
 - 
unset_property(property, state)[source]¶
- Parameters: - property (str) – property to unset
- state (Gtk.StateFlags) – state to unset
 - Unsets a style property in self. - New in version 3.0. - Deprecated since version 3.16: - Gtk.StylePropertiesare deprecated.
- property (
 
- 
classmethod