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 |
ThemingEngine
was the object used for rendering themed content
in GTK+ widgets. It used to allow overriding GTK+'s default
implementation of rendering functions by allowing engines to be
loaded as modules.
ThemingEngine
has been deprecated in GTK+ 3.14 and will be
ignored for rendering. The advancements in CSS theming are good
enough to allow themers to achieve their goals without the need
to modify source code.
- newtype ThemingEngine = ThemingEngine (ManagedPtr ThemingEngine)
- class GObject o => IsThemingEngine o
- toThemingEngine :: IsThemingEngine o => o -> IO ThemingEngine
- noThemingEngine :: Maybe ThemingEngine
- data ThemingEngineGetBackgroundColorMethodInfo
- themingEngineGetBackgroundColor :: (HasCallStack, MonadIO m, IsThemingEngine a) => a -> [StateFlags] -> m RGBA
- data ThemingEngineGetBorderMethodInfo
- themingEngineGetBorder :: (HasCallStack, MonadIO m, IsThemingEngine a) => a -> [StateFlags] -> m Border
- data ThemingEngineGetBorderColorMethodInfo
- themingEngineGetBorderColor :: (HasCallStack, MonadIO m, IsThemingEngine a) => a -> [StateFlags] -> m RGBA
- data ThemingEngineGetColorMethodInfo
- themingEngineGetColor :: (HasCallStack, MonadIO m, IsThemingEngine a) => a -> [StateFlags] -> m RGBA
- data ThemingEngineGetDirectionMethodInfo
- themingEngineGetDirection :: (HasCallStack, MonadIO m, IsThemingEngine a) => a -> m TextDirection
- data ThemingEngineGetFontMethodInfo
- themingEngineGetFont :: (HasCallStack, MonadIO m, IsThemingEngine a) => a -> [StateFlags] -> m FontDescription
- data ThemingEngineGetJunctionSidesMethodInfo
- themingEngineGetJunctionSides :: (HasCallStack, MonadIO m, IsThemingEngine a) => a -> m [JunctionSides]
- data ThemingEngineGetMarginMethodInfo
- themingEngineGetMargin :: (HasCallStack, MonadIO m, IsThemingEngine a) => a -> [StateFlags] -> m Border
- data ThemingEngineGetPaddingMethodInfo
- themingEngineGetPadding :: (HasCallStack, MonadIO m, IsThemingEngine a) => a -> [StateFlags] -> m Border
- data ThemingEngineGetPathMethodInfo
- themingEngineGetPath :: (HasCallStack, MonadIO m, IsThemingEngine a) => a -> m WidgetPath
- data ThemingEngineGetPropertyMethodInfo
- themingEngineGetProperty :: (HasCallStack, MonadIO m, IsThemingEngine a) => a -> Text -> [StateFlags] -> m GValue
- data ThemingEngineGetScreenMethodInfo
- themingEngineGetScreen :: (HasCallStack, MonadIO m, IsThemingEngine a) => a -> m (Maybe Screen)
- data ThemingEngineGetStateMethodInfo
- themingEngineGetState :: (HasCallStack, MonadIO m, IsThemingEngine a) => a -> m [StateFlags]
- data ThemingEngineGetStylePropertyMethodInfo
- themingEngineGetStyleProperty :: (HasCallStack, MonadIO m, IsThemingEngine a) => a -> Text -> m GValue
- data ThemingEngineHasClassMethodInfo
- themingEngineHasClass :: (HasCallStack, MonadIO m, IsThemingEngine a) => a -> Text -> m Bool
- data ThemingEngineHasRegionMethodInfo
- themingEngineHasRegion :: (HasCallStack, MonadIO m, IsThemingEngine a) => a -> Text -> m (Bool, [RegionFlags])
- themingEngineLoad :: (HasCallStack, MonadIO m) => Text -> m (Maybe ThemingEngine)
- data ThemingEngineLookupColorMethodInfo
- themingEngineLookupColor :: (HasCallStack, MonadIO m, IsThemingEngine a) => a -> Text -> m (Bool, RGBA)
- data ThemingEngineStateIsRunningMethodInfo
- themingEngineStateIsRunning :: (HasCallStack, MonadIO m, IsThemingEngine a) => a -> StateType -> m (Bool, Double)
- data ThemingEngineNamePropertyInfo
- constructThemingEngineName :: IsThemingEngine o => Text -> IO (GValueConstruct o)
- getThemingEngineName :: (MonadIO m, IsThemingEngine o) => o -> m (Maybe Text)
- themingEngineName :: AttrLabelProxy "name"
Exported types
newtype ThemingEngine Source #
GObject ThemingEngine Source # | |
IsObject ThemingEngine Source # | |
IsThemingEngine ThemingEngine Source # | |
((~) * info (ResolveThemingEngineMethod t ThemingEngine), MethodInfo * info ThemingEngine p) => IsLabel t (ThemingEngine -> p) Source # | |
((~) * info (ResolveThemingEngineMethod t ThemingEngine), MethodInfo * info ThemingEngine p) => IsLabelProxy t (ThemingEngine -> p) Source # | |
HasAttributeList * ThemingEngine Source # | |
type AttributeList ThemingEngine Source # | |
type SignalList ThemingEngine Source # | |
class GObject o => IsThemingEngine o Source #
toThemingEngine :: IsThemingEngine o => o -> IO ThemingEngine Source #
Methods
getBackgroundColor
data ThemingEngineGetBackgroundColorMethodInfo Source #
((~) * signature ([StateFlags] -> m RGBA), MonadIO m, IsThemingEngine a) => MethodInfo * ThemingEngineGetBackgroundColorMethodInfo a signature Source # | |
themingEngineGetBackgroundColor Source #
:: (HasCallStack, MonadIO m, IsThemingEngine a) | |
=> a |
|
-> [StateFlags] |
|
-> m RGBA |
Deprecated: (Since version 3.14)
Gets the background color for a given state.
Since: 3.0
getBorder
data ThemingEngineGetBorderMethodInfo Source #
((~) * signature ([StateFlags] -> m Border), MonadIO m, IsThemingEngine a) => MethodInfo * ThemingEngineGetBorderMethodInfo a signature Source # | |
themingEngineGetBorder Source #
:: (HasCallStack, MonadIO m, IsThemingEngine a) | |
=> a |
|
-> [StateFlags] |
|
-> m Border |
getBorderColor
data ThemingEngineGetBorderColorMethodInfo Source #
((~) * signature ([StateFlags] -> m RGBA), MonadIO m, IsThemingEngine a) => MethodInfo * ThemingEngineGetBorderColorMethodInfo a signature Source # | |
themingEngineGetBorderColor Source #
:: (HasCallStack, MonadIO m, IsThemingEngine a) | |
=> a |
|
-> [StateFlags] |
|
-> m RGBA |
Deprecated: (Since version 3.14)
Gets the border color for a given state.
Since: 3.0
getColor
data ThemingEngineGetColorMethodInfo Source #
((~) * signature ([StateFlags] -> m RGBA), MonadIO m, IsThemingEngine a) => MethodInfo * ThemingEngineGetColorMethodInfo a signature Source # | |
themingEngineGetColor Source #
:: (HasCallStack, MonadIO m, IsThemingEngine a) | |
=> a |
|
-> [StateFlags] |
|
-> m RGBA |
Deprecated: (Since version 3.14)
Gets the foreground color for a given state.
Since: 3.0
getDirection
data ThemingEngineGetDirectionMethodInfo Source #
((~) * signature (m TextDirection), MonadIO m, IsThemingEngine a) => MethodInfo * ThemingEngineGetDirectionMethodInfo a signature Source # | |
themingEngineGetDirection Source #
:: (HasCallStack, MonadIO m, IsThemingEngine a) | |
=> a |
|
-> m TextDirection | Returns: the widget direction |
Deprecated: (Since version 3.8)Use themingEngineGetState
and check for GTK_STATE_FLAG_DIR_LTR
and GTK_STATE_FLAG_DIR_RTL
instead.
Returns the widget direction used for rendering.
Since: 3.0
getFont
data ThemingEngineGetFontMethodInfo Source #
((~) * signature ([StateFlags] -> m FontDescription), MonadIO m, IsThemingEngine a) => MethodInfo * ThemingEngineGetFontMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsThemingEngine a) | |
=> a |
|
-> [StateFlags] |
|
-> m FontDescription | Returns: the |
Deprecated: (Since version 3.8)Use gtk_theming_engine_get()
Returns the font description for a given state.
Since: 3.0
getJunctionSides
data ThemingEngineGetJunctionSidesMethodInfo Source #
((~) * signature (m [JunctionSides]), MonadIO m, IsThemingEngine a) => MethodInfo * ThemingEngineGetJunctionSidesMethodInfo a signature Source # | |
themingEngineGetJunctionSides Source #
:: (HasCallStack, MonadIO m, IsThemingEngine a) | |
=> a |
|
-> m [JunctionSides] | Returns: the widget direction |
Deprecated: (Since version 3.14)
Returns the widget direction used for rendering.
Since: 3.0
getMargin
data ThemingEngineGetMarginMethodInfo Source #
((~) * signature ([StateFlags] -> m Border), MonadIO m, IsThemingEngine a) => MethodInfo * ThemingEngineGetMarginMethodInfo a signature Source # | |
themingEngineGetMargin Source #
:: (HasCallStack, MonadIO m, IsThemingEngine a) | |
=> a |
|
-> [StateFlags] |
|
-> m Border |
getPadding
data ThemingEngineGetPaddingMethodInfo Source #
((~) * signature ([StateFlags] -> m Border), MonadIO m, IsThemingEngine a) => MethodInfo * ThemingEngineGetPaddingMethodInfo a signature Source # | |
themingEngineGetPadding Source #
:: (HasCallStack, MonadIO m, IsThemingEngine a) | |
=> a |
|
-> [StateFlags] |
|
-> m Border |
getPath
data ThemingEngineGetPathMethodInfo Source #
((~) * signature (m WidgetPath), MonadIO m, IsThemingEngine a) => MethodInfo * ThemingEngineGetPathMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsThemingEngine a) | |
=> a |
|
-> m WidgetPath | Returns: A |
Deprecated: (Since version 3.14)
Returns the widget path used for style matching.
Since: 3.0
getProperty
data ThemingEngineGetPropertyMethodInfo Source #
((~) * signature (Text -> [StateFlags] -> m GValue), MonadIO m, IsThemingEngine a) => MethodInfo * ThemingEngineGetPropertyMethodInfo a signature Source # | |
themingEngineGetProperty Source #
:: (HasCallStack, MonadIO m, IsThemingEngine a) | |
=> a |
|
-> Text |
|
-> [StateFlags] |
|
-> m GValue |
Deprecated: (Since version 3.14)
Gets a property value as retrieved from the style settings that apply to the currently rendered element.
Since: 3.0
getScreen
data ThemingEngineGetScreenMethodInfo Source #
((~) * signature (m (Maybe Screen)), MonadIO m, IsThemingEngine a) => MethodInfo * ThemingEngineGetScreenMethodInfo a signature Source # | |
themingEngineGetScreen Source #
:: (HasCallStack, MonadIO m, IsThemingEngine a) | |
=> a |
|
-> m (Maybe Screen) |
Deprecated: (Since version 3.14)
Returns the Screen
to which engine
currently rendering to.
getState
data ThemingEngineGetStateMethodInfo Source #
((~) * signature (m [StateFlags]), MonadIO m, IsThemingEngine a) => MethodInfo * ThemingEngineGetStateMethodInfo a signature Source # | |
themingEngineGetState Source #
:: (HasCallStack, MonadIO m, IsThemingEngine a) | |
=> a |
|
-> m [StateFlags] | Returns: the state flags |
Deprecated: (Since version 3.14)
returns the state used when rendering.
Since: 3.0
getStyleProperty
data ThemingEngineGetStylePropertyMethodInfo Source #
((~) * signature (Text -> m GValue), MonadIO m, IsThemingEngine a) => MethodInfo * ThemingEngineGetStylePropertyMethodInfo a signature Source # | |
themingEngineGetStyleProperty Source #
:: (HasCallStack, MonadIO m, IsThemingEngine a) | |
=> a |
|
-> Text |
|
-> m GValue |
Deprecated: (Since version 3.14)
Gets the value for a widget style property.
Since: 3.0
hasClass
data ThemingEngineHasClassMethodInfo Source #
((~) * signature (Text -> m Bool), MonadIO m, IsThemingEngine a) => MethodInfo * ThemingEngineHasClassMethodInfo a signature Source # | |
themingEngineHasClass Source #
:: (HasCallStack, MonadIO m, IsThemingEngine a) | |
=> a |
|
-> Text |
|
-> m Bool | Returns: |
Deprecated: (Since version 3.14)
Returns True
if the currently rendered contents have
defined the given class name.
Since: 3.0
hasRegion
data ThemingEngineHasRegionMethodInfo Source #
((~) * signature (Text -> m (Bool, [RegionFlags])), MonadIO m, IsThemingEngine a) => MethodInfo * ThemingEngineHasRegionMethodInfo a signature Source # | |
themingEngineHasRegion Source #
:: (HasCallStack, MonadIO m, IsThemingEngine a) | |
=> a |
|
-> Text |
|
-> m (Bool, [RegionFlags]) | Returns: |
load
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m (Maybe ThemingEngine) | Returns: A theming engine, or |
Deprecated: (Since version 3.14)
Loads and initializes a theming engine module from the standard directories.
lookupColor
data ThemingEngineLookupColorMethodInfo Source #
((~) * signature (Text -> m (Bool, RGBA)), MonadIO m, IsThemingEngine a) => MethodInfo * ThemingEngineLookupColorMethodInfo a signature Source # | |
themingEngineLookupColor Source #
:: (HasCallStack, MonadIO m, IsThemingEngine a) | |
=> a |
|
-> Text |
|
-> m (Bool, RGBA) | Returns: |
Deprecated: (Since version 3.14)
Looks up and resolves a color name in the current style’s color map.
Since: 3.0
stateIsRunning
data ThemingEngineStateIsRunningMethodInfo Source #
((~) * signature (StateType -> m (Bool, Double)), MonadIO m, IsThemingEngine a) => MethodInfo * ThemingEngineStateIsRunningMethodInfo a signature Source # | |
themingEngineStateIsRunning Source #
:: (HasCallStack, MonadIO m, IsThemingEngine a) | |
=> a |
|
-> StateType |
|
-> m (Bool, Double) | Returns: |
Deprecated: (Since version 3.6)Always returns False
Returns True
if there is a transition animation running for the
current region (see styleContextPushAnimatableRegion
).
If progress
is not Nothing
, the animation progress will be returned
there, 0.0 means the state is closest to being False
, while 1.0 means
it’s closest to being True
. This means transition animations will
run from 0 to 1 when state
is being set to True
and from 1 to 0 when
it’s being set to False
.
Since: 3.0
Properties
name
data ThemingEngineNamePropertyInfo Source #
constructThemingEngineName :: IsThemingEngine o => Text -> IO (GValueConstruct o) Source #
getThemingEngineName :: (MonadIO m, IsThemingEngine o) => o -> m (Maybe Text) Source #
themingEngineName :: AttrLabelProxy "name" Source #