| 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 |
GI.Gtk.Objects.ThemingEngine
Contents
Description
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 :: (MonadIO m, IsThemingEngine o) => o -> m ThemingEngine
- noThemingEngine :: Maybe ThemingEngine
- themingEngineGetBackgroundColor :: (HasCallStack, MonadIO m, IsThemingEngine a) => a -> [StateFlags] -> m RGBA
- themingEngineGetBorder :: (HasCallStack, MonadIO m, IsThemingEngine a) => a -> [StateFlags] -> m Border
- themingEngineGetBorderColor :: (HasCallStack, MonadIO m, IsThemingEngine a) => a -> [StateFlags] -> m RGBA
- themingEngineGetColor :: (HasCallStack, MonadIO m, IsThemingEngine a) => a -> [StateFlags] -> m RGBA
- themingEngineGetDirection :: (HasCallStack, MonadIO m, IsThemingEngine a) => a -> m TextDirection
- themingEngineGetFont :: (HasCallStack, MonadIO m, IsThemingEngine a) => a -> [StateFlags] -> m FontDescription
- themingEngineGetJunctionSides :: (HasCallStack, MonadIO m, IsThemingEngine a) => a -> m [JunctionSides]
- themingEngineGetMargin :: (HasCallStack, MonadIO m, IsThemingEngine a) => a -> [StateFlags] -> m Border
- themingEngineGetPadding :: (HasCallStack, MonadIO m, IsThemingEngine a) => a -> [StateFlags] -> m Border
- themingEngineGetPath :: (HasCallStack, MonadIO m, IsThemingEngine a) => a -> m WidgetPath
- themingEngineGetProperty :: (HasCallStack, MonadIO m, IsThemingEngine a) => a -> Text -> [StateFlags] -> m GValue
- themingEngineGetScreen :: (HasCallStack, MonadIO m, IsThemingEngine a) => a -> m (Maybe Screen)
- themingEngineGetState :: (HasCallStack, MonadIO m, IsThemingEngine a) => a -> m [StateFlags]
- themingEngineGetStyleProperty :: (HasCallStack, MonadIO m, IsThemingEngine a) => a -> Text -> m GValue
- themingEngineHasClass :: (HasCallStack, MonadIO m, IsThemingEngine a) => a -> Text -> m Bool
- themingEngineHasRegion :: (HasCallStack, MonadIO m, IsThemingEngine a) => a -> Text -> m (Bool, [RegionFlags])
- themingEngineLoad :: (HasCallStack, MonadIO m) => Text -> m (Maybe ThemingEngine)
- themingEngineLookupColor :: (HasCallStack, MonadIO m, IsThemingEngine a) => a -> Text -> m (Bool, RGBA)
- themingEngineStateIsRunning :: (HasCallStack, MonadIO m, IsThemingEngine a) => a -> StateType -> m (Bool, Double)
- constructThemingEngineName :: IsThemingEngine o => Text -> IO (GValueConstruct o)
- getThemingEngineName :: (MonadIO m, IsThemingEngine o) => o -> m (Maybe Text)
Exported types
newtype ThemingEngine Source #
Constructors
| ThemingEngine (ManagedPtr ThemingEngine) |
class GObject o => IsThemingEngine o Source #
Instances
toThemingEngine :: (MonadIO m, IsThemingEngine o) => o -> m ThemingEngine Source #
Methods
getBackgroundColor
themingEngineGetBackgroundColor Source #
Arguments
| :: (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
themingEngineGetBorder Source #
Arguments
| :: (HasCallStack, MonadIO m, IsThemingEngine a) | |
| => a |
|
| -> [StateFlags] |
|
| -> m Border |
getBorderColor
themingEngineGetBorderColor Source #
Arguments
| :: (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
themingEngineGetColor Source #
Arguments
| :: (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
themingEngineGetDirection Source #
Arguments
| :: (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
Arguments
| :: (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
themingEngineGetJunctionSides Source #
Arguments
| :: (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
themingEngineGetMargin Source #
Arguments
| :: (HasCallStack, MonadIO m, IsThemingEngine a) | |
| => a |
|
| -> [StateFlags] |
|
| -> m Border |
getPadding
themingEngineGetPadding Source #
Arguments
| :: (HasCallStack, MonadIO m, IsThemingEngine a) | |
| => a |
|
| -> [StateFlags] |
|
| -> m Border |
getPath
Arguments
| :: (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
themingEngineGetProperty Source #
Arguments
| :: (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
themingEngineGetScreen Source #
Arguments
| :: (HasCallStack, MonadIO m, IsThemingEngine a) | |
| => a |
|
| -> m (Maybe Screen) |
Deprecated: (Since version 3.14)
Returns the Screen to which engine currently rendering to.
getState
themingEngineGetState Source #
Arguments
| :: (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
themingEngineGetStyleProperty Source #
Arguments
| :: (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
themingEngineHasClass Source #
Arguments
| :: (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
themingEngineHasRegion Source #
Arguments
| :: (HasCallStack, MonadIO m, IsThemingEngine a) | |
| => a |
|
| -> Text |
|
| -> m (Bool, [RegionFlags]) | Returns: |
load
Arguments
| :: (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
themingEngineLookupColor Source #
Arguments
| :: (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
themingEngineStateIsRunning Source #
Arguments
| :: (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
constructThemingEngineName :: IsThemingEngine o => Text -> IO (GValueConstruct o) Source #
getThemingEngineName :: (MonadIO m, IsThemingEngine o) => o -> m (Maybe Text) Source #