Gtk.StyleProperties¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent_object |
r |
Class Details¶
- class Gtk.StyleProperties(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Gtk.StylePropertiesprovides the storage for style information that is used byGtk.StyleContextand otherGtk.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 byGtk.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:
Returns a newly created
Gtk.StylePropertiesDeprecated 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 namestate (
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.
- lookup_color(name)[source]¶
- Parameters:
name (
str) – color name to lookup- Returns:
The mapped color
- Return type:
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 namecolor (
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.
- merge(props_to_merge, replace)[source]¶
- Parameters:
props_to_merge (
Gtk.StyleProperties) – a secondGtk.StylePropertiesreplace (
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 isFalse, the older values will prevail.New in version 3.0.
Deprecated since version 3.16:
Gtk.StylePropertiesare deprecated.
- set_property(property, state, value)[source]¶
- Parameters:
property (
str) – styling property to setstate (
Gtk.StateFlags) – state to set the value forvalue (
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.
- unset_property(property, state)[source]¶
- Parameters:
property (
str) – property to unsetstate (
Gtk.StateFlags) – state to unset
Unsets a style property in self.
New in version 3.0.
Deprecated since version 3.16:
Gtk.StylePropertiesare deprecated.