gi-gtk-3.0.32: Gtk bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Objects.StyleProperties

Contents

Description

GtkStyleProperties provides the storage for style information that is used by tStyleContext and other tStyleProvider implementations.

Before style properties can be stored in GtkStyleProperties, they must be registered with gtk_style_properties_register_property().

Unless you are writing a tStyleProvider implementation, 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 tThemingEngine instead.

tStyleProperties has been deprecated in GTK 3.16. The CSS machinery does not use it anymore and all users of this object have been deprecated.

Synopsis

Exported types

newtype StyleProperties Source #

Memory-managed wrapper type.

Constructors

StyleProperties (ManagedPtr StyleProperties) 
Instances
Eq StyleProperties Source # 
Instance details

Defined in GI.Gtk.Objects.StyleProperties

GObject StyleProperties Source # 
Instance details

Defined in GI.Gtk.Objects.StyleProperties

Methods

gobjectType :: IO GType

IsGValue StyleProperties Source #

Convert StyleProperties to and from GValue with toGValue and fromGValue.

Instance details

Defined in GI.Gtk.Objects.StyleProperties

Methods

toGValue :: StyleProperties -> IO GValue

fromGValue :: GValue -> IO StyleProperties

HasParentTypes StyleProperties Source # 
Instance details

Defined in GI.Gtk.Objects.StyleProperties

type ParentTypes StyleProperties Source # 
Instance details

Defined in GI.Gtk.Objects.StyleProperties

type ParentTypes StyleProperties = Object ': (StyleProvider ': ([] :: [Type]))

class (GObject o, IsDescendantOf StyleProperties o) => IsStyleProperties o Source #

Type class for types which can be safely cast to StyleProperties, for instance with toStyleProperties.

Instances
(GObject o, IsDescendantOf StyleProperties o) => IsStyleProperties o Source # 
Instance details

Defined in GI.Gtk.Objects.StyleProperties

toStyleProperties :: (MonadIO m, IsStyleProperties o) => o -> m StyleProperties Source #

Cast to StyleProperties, for types for which this is known to be safe. For general casts, use castTo.

noStyleProperties :: Maybe StyleProperties Source #

A convenience alias for Nothing :: Maybe StyleProperties.

Methods

Overloaded methods

clear

stylePropertiesClear Source #

Arguments

:: (HasCallStack, MonadIO m, IsStyleProperties a) 
=> a

props: a tStyleProperties

-> m () 

Deprecated: (Since version 3.16)tStyleProperties are deprecated.

Clears all style information from props.

getProperty

stylePropertiesGetProperty Source #

Arguments

:: (HasCallStack, MonadIO m, IsStyleProperties a) 
=> a

props: a tStyleProperties

-> Text

property: style property name

-> [StateFlags]

state: state to retrieve the property value for

-> m (Bool, GValue)

Returns: True if the property exists in props, False otherwise

Deprecated: (Since version 3.16)tStyleProperties are deprecated.

Gets a style property from props for the given state. When done with value, valueUnset needs to be called to free any allocated memory.

Since: 3.0

lookupColor

stylePropertiesLookupColor Source #

Arguments

:: (HasCallStack, MonadIO m, IsStyleProperties a) 
=> a

props: a tStyleProperties

-> Text

name: color name to lookup

-> m SymbolicColor

Returns: The mapped color

Deprecated: (Since version 3.8)tSymbolicColor is deprecated.

Returns the symbolic color that is mapped to name.

Since: 3.0

mapColor

stylePropertiesMapColor Source #

Arguments

:: (HasCallStack, MonadIO m, IsStyleProperties a) 
=> a

props: a tStyleProperties

-> Text

name: color name

-> SymbolicColor

color: tSymbolicColor to map name to

-> m () 

Deprecated: (Since version 3.8)tSymbolicColor is deprecated.

Maps color so it can be referenced by name. See stylePropertiesLookupColor

Since: 3.0

merge

stylePropertiesMerge Source #

Arguments

:: (HasCallStack, MonadIO m, IsStyleProperties a, IsStyleProperties b) 
=> a

props: a tStyleProperties

-> b

propsToMerge: a second tStyleProperties

-> Bool

replace: whether to replace values or not

-> m () 

Deprecated: (Since version 3.16)tStyleProperties are deprecated.

Merges into props all the style information contained in propsToMerge. If replace is True, the values will be overwritten, if it is False, the older values will prevail.

Since: 3.0

new

stylePropertiesNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m StyleProperties

Returns: a new tStyleProperties

Deprecated: (Since version 3.16)tStyleProperties are deprecated.

Returns a newly created tStyleProperties

setProperty

stylePropertiesSetProperty Source #

Arguments

:: (HasCallStack, MonadIO m, IsStyleProperties a) 
=> a

props: a tStyleProperties

-> Text

property: styling property to set

-> [StateFlags]

state: state to set the value for

-> GValue

value: new value for the property

-> m () 

Deprecated: (Since version 3.16)tStyleProperties are deprecated.

Sets a styling property in props.

Since: 3.0

unsetProperty

stylePropertiesUnsetProperty Source #

Arguments

:: (HasCallStack, MonadIO m, IsStyleProperties a) 
=> a

props: a tStyleProperties

-> Text

property: property to unset

-> [StateFlags]

state: state to unset

-> m () 

Deprecated: (Since version 3.16)tStyleProperties are deprecated.

Unsets a style property in props.

Since: 3.0