gi-gtk-3.0.43: Gtk bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Gtk.Interfaces.StyleProvider

Contents

- Exported types
- Methods
  - getIconFactory
  - getStyle
  - getStyleProperty

Description

GtkStyleProvider is an interface used to provide style information to a `StyleContext`. See `styleContextAddProvider` and `styleContextAddProviderForScreen`.

Synopsis

- newtype StyleProvider = StyleProvider (ManagedPtr StyleProvider)
- class (ManagedPtrNewtype o, IsDescendantOf StyleProvider o) => IsStyleProvider o
- styleProviderGetIconFactory :: (HasCallStack, MonadIO m, IsStyleProvider a) => a -> WidgetPath -> m (Maybe IconFactory)
- styleProviderGetStyle :: (HasCallStack, MonadIO m, IsStyleProvider a) => a -> WidgetPath -> m (Maybe StyleProperties)
- styleProviderGetStyleProperty :: (HasCallStack, MonadIO m, IsStyleProvider a) => a -> WidgetPath -> [StateFlags] -> GParamSpec -> m (Bool, GValue)

# Exported types

newtype StyleProvider Source #

Memory-managed wrapper type.

Constructors

StyleProvider (ManagedPtr StyleProvider) |

#### Instances

Instances details

Eq StyleProvider Source # |
Instance details Defined in GI.Gtk.Interfaces.StyleProvider Methods (==) :: StyleProvider -> StyleProvider -> Bool Source # (/=) :: StyleProvider -> StyleProvider -> Bool Source #
BoxedPtr StyleProvider Source # |
Instance details Defined in GI.Gtk.Interfaces.StyleProvider Methods boxedPtrCopy :: StyleProvider -> IO StyleProvider Source # boxedPtrFree :: StyleProvider -> IO () Source #
ManagedPtrNewtype StyleProvider Source # |
Instance details Defined in GI.Gtk.Interfaces.StyleProvider Methods toManagedPtr :: StyleProvider -> ManagedPtr StyleProvider Source #

class (ManagedPtrNewtype o, IsDescendantOf StyleProvider o) => IsStyleProvider o Source #

Type class for types which implement `StyleProvider`.

#### Instances

Instances details

(ManagedPtrNewtype o, IsDescendantOf StyleProvider o) => IsStyleProvider o Source # |
Instance details Defined in GI.Gtk.Interfaces.StyleProvider

# Methods

### Click to display all available methods, including inherited ones

Expand

#### Methods

None.

#### Getters

getIconFactory, getStyle, getStyleProperty.

#### Setters

None.

## getIconFactory

styleProviderGetIconFactory Source #

Arguments

:: (HasCallStack, MonadIO m, IsStyleProvider a) |
=> a | `provider`: a `StyleProvider`
-> WidgetPath | `path`: `WidgetPath` to query
-> m (Maybe IconFactory) | Returns: The icon factory to use for `path`, or `Nothing`

Deprecated: (Since version 3.8)Will always return `Nothing` for all GTK-provided style providers.

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

Since: 3.0

## getStyle

styleProviderGetStyle Source #

Arguments

:: (HasCallStack, MonadIO m, IsStyleProvider a) |
=> a | `provider`: a `StyleProvider`
-> WidgetPath | `path`: `WidgetPath` to query
-> m (Maybe StyleProperties) | Returns: a `StyleProperties` containing the style settings affecting `path`

Deprecated: (Since version 3.8)Will always return `Nothing` for all GTK-provided style providersas the interface cannot correctly work the way CSS is specified.

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

Since: 3.0

## getStyleProperty

styleProviderGetStyleProperty Source #

Arguments

:: (HasCallStack, MonadIO m, IsStyleProvider a) |
=> a | `provider`: a `StyleProvider`
-> WidgetPath | `path`: `WidgetPath` to query
-> [StateFlags] | `state`: state to query the style property for
-> GParamSpec | `pspec`: The `ParamSpec` to query
-> m (Bool, GValue) | Returns: `True` if the property was found and has a value, `False` otherwise

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

Since: 3.0