Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
GtkStyleProperties provides the storage for style information
that is used by StyleContext
and other StyleProvider
implementations.
Before style properties can be stored in GtkStyleProperties, they
must be registered with gtk_style_properties_register_property()
.
Unless you are writing a StyleProvider
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 ThemingEngine
instead.
StyleProperties
has been deprecated in GTK 3.16. The CSS
machinery does not use it anymore and all users of this object
have been deprecated.
- newtype StyleProperties = StyleProperties (ManagedPtr StyleProperties)
- class GObject o => IsStyleProperties o
- toStyleProperties :: IsStyleProperties o => o -> IO StyleProperties
- noStyleProperties :: Maybe StyleProperties
- data StylePropertiesClearMethodInfo
- stylePropertiesClear :: (HasCallStack, MonadIO m, IsStyleProperties a) => a -> m ()
- data StylePropertiesGetPropertyMethodInfo
- stylePropertiesGetProperty :: (HasCallStack, MonadIO m, IsStyleProperties a) => a -> Text -> [StateFlags] -> m (Bool, GValue)
- data StylePropertiesLookupColorMethodInfo
- stylePropertiesLookupColor :: (HasCallStack, MonadIO m, IsStyleProperties a) => a -> Text -> m SymbolicColor
- data StylePropertiesMapColorMethodInfo
- stylePropertiesMapColor :: (HasCallStack, MonadIO m, IsStyleProperties a) => a -> Text -> SymbolicColor -> m ()
- data StylePropertiesMergeMethodInfo
- stylePropertiesMerge :: (HasCallStack, MonadIO m, IsStyleProperties a, IsStyleProperties b) => a -> b -> Bool -> m ()
- stylePropertiesNew :: (HasCallStack, MonadIO m) => m StyleProperties
- data StylePropertiesSetPropertyMethodInfo
- stylePropertiesSetProperty :: (HasCallStack, MonadIO m, IsStyleProperties a) => a -> Text -> [StateFlags] -> GValue -> m ()
- data StylePropertiesUnsetPropertyMethodInfo
- stylePropertiesUnsetProperty :: (HasCallStack, MonadIO m, IsStyleProperties a) => a -> Text -> [StateFlags] -> m ()
Exported types
newtype StyleProperties Source #
GObject StyleProperties Source # | |
IsObject StyleProperties Source # | |
IsStyleProperties StyleProperties Source # | |
IsStyleProvider StyleProperties Source # | |
((~) * info (ResolveStylePropertiesMethod t StyleProperties), MethodInfo * info StyleProperties p) => IsLabel t (StyleProperties -> p) Source # | |
((~) * info (ResolveStylePropertiesMethod t StyleProperties), MethodInfo * info StyleProperties p) => IsLabelProxy t (StyleProperties -> p) Source # | |
HasAttributeList * StyleProperties Source # | |
type AttributeList StyleProperties Source # | |
type SignalList StyleProperties Source # | |
class GObject o => IsStyleProperties o Source #
toStyleProperties :: IsStyleProperties o => o -> IO StyleProperties Source #
Methods
clear
data StylePropertiesClearMethodInfo Source #
((~) * signature (m ()), MonadIO m, IsStyleProperties a) => MethodInfo * StylePropertiesClearMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsStyleProperties a) | |
=> a |
|
-> m () |
Deprecated: (Since version 3.16)StyleProperties
are deprecated.
Clears all style information from props
.
getProperty
data StylePropertiesGetPropertyMethodInfo Source #
((~) * signature (Text -> [StateFlags] -> m (Bool, GValue)), MonadIO m, IsStyleProperties a) => MethodInfo * StylePropertiesGetPropertyMethodInfo a signature Source # | |
stylePropertiesGetProperty Source #
:: (HasCallStack, MonadIO m, IsStyleProperties a) | |
=> a |
|
-> Text |
|
-> [StateFlags] |
|
-> m (Bool, GValue) | Returns: |
Deprecated: (Since version 3.16)StyleProperties
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
data StylePropertiesLookupColorMethodInfo Source #
((~) * signature (Text -> m SymbolicColor), MonadIO m, IsStyleProperties a) => MethodInfo * StylePropertiesLookupColorMethodInfo a signature Source # | |
stylePropertiesLookupColor Source #
:: (HasCallStack, MonadIO m, IsStyleProperties a) | |
=> a |
|
-> Text |
|
-> m SymbolicColor | Returns: The mapped color |
Deprecated: (Since version 3.8)SymbolicColor
is deprecated.
Returns the symbolic color that is mapped
to name
.
Since: 3.0
mapColor
data StylePropertiesMapColorMethodInfo Source #
((~) * signature (Text -> SymbolicColor -> m ()), MonadIO m, IsStyleProperties a) => MethodInfo * StylePropertiesMapColorMethodInfo a signature Source # | |
stylePropertiesMapColor Source #
:: (HasCallStack, MonadIO m, IsStyleProperties a) | |
=> a |
|
-> Text |
|
-> SymbolicColor |
|
-> m () |
Deprecated: (Since version 3.8)SymbolicColor
is deprecated.
Maps color
so it can be referenced by name
. See
stylePropertiesLookupColor
Since: 3.0
merge
data StylePropertiesMergeMethodInfo Source #
((~) * signature (b -> Bool -> m ()), MonadIO m, IsStyleProperties a, IsStyleProperties b) => MethodInfo * StylePropertiesMergeMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsStyleProperties a, IsStyleProperties b) | |
=> a |
|
-> b |
|
-> Bool |
|
-> m () |
Deprecated: (Since version 3.16)StyleProperties
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
:: (HasCallStack, MonadIO m) | |
=> m StyleProperties | Returns: a new |
Deprecated: (Since version 3.16)StyleProperties
are deprecated.
Returns a newly created StyleProperties
setProperty
data StylePropertiesSetPropertyMethodInfo Source #
((~) * signature (Text -> [StateFlags] -> GValue -> m ()), MonadIO m, IsStyleProperties a) => MethodInfo * StylePropertiesSetPropertyMethodInfo a signature Source # | |
stylePropertiesSetProperty Source #
:: (HasCallStack, MonadIO m, IsStyleProperties a) | |
=> a |
|
-> Text |
|
-> [StateFlags] |
|
-> GValue |
|
-> m () |
Deprecated: (Since version 3.16)StyleProperties
are deprecated.
Sets a styling property in props
.
Since: 3.0
unsetProperty
data StylePropertiesUnsetPropertyMethodInfo Source #
((~) * signature (Text -> [StateFlags] -> m ()), MonadIO m, IsStyleProperties a) => MethodInfo * StylePropertiesUnsetPropertyMethodInfo a signature Source # | |
stylePropertiesUnsetProperty Source #
:: (HasCallStack, MonadIO m, IsStyleProperties a) | |
=> a |
|
-> Text |
|
-> [StateFlags] |
|
-> m () |
Deprecated: (Since version 3.16)StyleProperties
are deprecated.
Unsets a style property in props
.
Since: 3.0