Gtk.StyleProvider

g GObject.GInterface GObject.GInterface Gtk.StyleProvider Gtk.StyleProvider GObject.GInterface->Gtk.StyleProvider

Implementations:
 Gtk.CssProvider, Gtk.Settings, Gtk.StyleProperties

Methods

  get_icon_factory (path)
  get_style (path)
  get_style_property (path, state, pspec)

Virtual Methods

  do_get_icon_factory (path)
  do_get_style (path)
  do_get_style_property (path, state, pspec)

Properties

None

Signals

None

Fields

None

Class Details

class Gtk.StyleProvider
Bases:GObject.GInterface
Structure:Gtk.StyleProviderIface

Gtk.StyleProvider is an interface used to provide style information to a Gtk.StyleContext. See Gtk.StyleContext.add_provider() and Gtk.StyleContext.add_provider_for_screen().

get_icon_factory(path)[source]
Parameters:path (Gtk.WidgetPath) – Gtk.WidgetPath to query
Returns:The icon factory to use for path, or None
Return type:Gtk.IconFactory or None

Returns the Gtk.IconFactory defined to be in use for path, or None if none is defined.

New in version 3.0.

Deprecated since version 3.8: Will always return None for all GTK-provided style providers.

get_style(path)[source]
Parameters:path (Gtk.WidgetPath) – Gtk.WidgetPath to query
Returns:a Gtk.StyleProperties containing the style settings affecting path
Return type:Gtk.StyleProperties or None

Returns the style settings affecting a widget defined by path, or None if self doesn’t contemplate styling path.

New in version 3.0.

Deprecated since version 3.8: Will always return None for all GTK-provided style providers as the interface cannot correctly work the way CSS is specified.

get_style_property(path, state, pspec)[source]
Parameters:
Returns:

True if the property was found and has a value, False otherwise

value:return location for the property value

Return type:

(bool, value: GObject.Value)

Looks up a widget style property as defined by self for the widget represented by path.

New in version 3.0.

do_get_icon_factory(path) virtual
Parameters:path (Gtk.WidgetPath) – Gtk.WidgetPath to query
Returns:The icon factory to use for path, or None
Return type:Gtk.IconFactory or None

Returns the Gtk.IconFactory defined to be in use for path, or None if none is defined.

New in version 3.0.

Deprecated since version 3.8: Will always return None for all GTK-provided style providers.

do_get_style(path) virtual
Parameters:path (Gtk.WidgetPath) – Gtk.WidgetPath to query
Returns:a Gtk.StyleProperties containing the style settings affecting path
Return type:Gtk.StyleProperties or None

Returns the style settings affecting a widget defined by path, or None if provider doesn’t contemplate styling path.

New in version 3.0.

Deprecated since version 3.8: Will always return None for all GTK-provided style providers as the interface cannot correctly work the way CSS is specified.

do_get_style_property(path, state, pspec) virtual
Parameters:
Returns:

True if the property was found and has a value, False otherwise

value:return location for the property value

Return type:

(bool, value: GObject.Value)

Looks up a widget style property as defined by provider for the widget represented by path.

New in version 3.0.