Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
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.
Synopsis
- newtype StyleProperties = StyleProperties (ManagedPtr StyleProperties)
- class (GObject o, IsDescendantOf StyleProperties o) => IsStyleProperties o
- toStyleProperties :: (MonadIO m, IsStyleProperties o) => o -> m StyleProperties
- stylePropertiesClear :: (HasCallStack, MonadIO m, IsStyleProperties a) => a -> m ()
- stylePropertiesGetProperty :: (HasCallStack, MonadIO m, IsStyleProperties a) => a -> Text -> [StateFlags] -> m (Bool, GValue)
- stylePropertiesLookupColor :: (HasCallStack, MonadIO m, IsStyleProperties a) => a -> Text -> m SymbolicColor
- stylePropertiesMapColor :: (HasCallStack, MonadIO m, IsStyleProperties a) => a -> Text -> SymbolicColor -> m ()
- stylePropertiesMerge :: (HasCallStack, MonadIO m, IsStyleProperties a, IsStyleProperties b) => a -> b -> Bool -> m ()
- stylePropertiesNew :: (HasCallStack, MonadIO m) => m StyleProperties
- stylePropertiesSetProperty :: (HasCallStack, MonadIO m, IsStyleProperties a) => a -> Text -> [StateFlags] -> GValue -> m ()
- stylePropertiesUnsetProperty :: (HasCallStack, MonadIO m, IsStyleProperties a) => a -> Text -> [StateFlags] -> m ()
Exported types
newtype StyleProperties Source #
Memory-managed wrapper type.
StyleProperties (ManagedPtr StyleProperties) |
Instances
Eq StyleProperties Source # | |
Defined in GI.Gtk.Objects.StyleProperties (==) :: StyleProperties -> StyleProperties -> Bool # (/=) :: StyleProperties -> StyleProperties -> Bool # | |
GObject StyleProperties Source # | |
Defined in GI.Gtk.Objects.StyleProperties | |
ManagedPtrNewtype StyleProperties Source # | |
Defined in GI.Gtk.Objects.StyleProperties toManagedPtr :: StyleProperties -> ManagedPtr StyleProperties | |
TypedObject StyleProperties Source # | |
Defined in GI.Gtk.Objects.StyleProperties | |
HasParentTypes StyleProperties Source # | |
Defined in GI.Gtk.Objects.StyleProperties | |
IsGValue (Maybe StyleProperties) Source # | Convert |
Defined in GI.Gtk.Objects.StyleProperties gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe StyleProperties -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe StyleProperties) | |
type ParentTypes StyleProperties Source # | |
Defined in GI.Gtk.Objects.StyleProperties |
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 # | |
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
.
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, clear, forceFloating, freezeNotify, getv, isFloating, lookupColor, mapColor, merge, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, unsetProperty, watchClosure.
Getters
getData, getIconFactory, getProperty, getQdata, getStyle, getStyleProperty.
Setters
clear
:: (HasCallStack, MonadIO m, IsStyleProperties a) | |
=> a |
|
-> m () |
Deprecated: (Since version 3.16)tStyleProperties
are deprecated.
Clears all style information from props
.
getProperty
stylePropertiesGetProperty Source #
:: (HasCallStack, MonadIO m, IsStyleProperties a) | |
=> a |
|
-> Text |
|
-> [StateFlags] |
|
-> m (Bool, GValue) | Returns: |
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 #
:: (HasCallStack, MonadIO m, IsStyleProperties a) | |
=> a |
|
-> Text |
|
-> 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 #
:: (HasCallStack, MonadIO m, IsStyleProperties a) | |
=> a |
|
-> Text |
|
-> SymbolicColor |
|
-> m () |
Deprecated: (Since version 3.8)tSymbolicColor
is deprecated.
Maps color
so it can be referenced by name
. See
stylePropertiesLookupColor
Since: 3.0
merge
:: (HasCallStack, MonadIO m, IsStyleProperties a, IsStyleProperties b) | |
=> a |
|
-> b |
|
-> Bool |
|
-> 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
:: (HasCallStack, MonadIO m) | |
=> m StyleProperties | Returns: a new |
Deprecated: (Since version 3.16)tStyleProperties
are deprecated.
Returns a newly created StyleProperties
setProperty
stylePropertiesSetProperty Source #
:: (HasCallStack, MonadIO m, IsStyleProperties a) | |
=> a |
|
-> Text |
|
-> [StateFlags] |
|
-> GValue |
|
-> m () |
Deprecated: (Since version 3.16)tStyleProperties
are deprecated.
Sets a styling property in props
.
Since: 3.0
unsetProperty
stylePropertiesUnsetProperty Source #
:: (HasCallStack, MonadIO m, IsStyleProperties a) | |
=> a |
|
-> Text |
|
-> [StateFlags] |
|
-> m () |
Deprecated: (Since version 3.16)tStyleProperties
are deprecated.
Unsets a style property in props
.
Since: 3.0