Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
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.
Synopsis
- newtype ThemingEngine = ThemingEngine (ManagedPtr ThemingEngine)
- class (GObject o, IsDescendantOf ThemingEngine o) => IsThemingEngine o
- toThemingEngine :: (MonadIO m, IsThemingEngine o) => o -> m 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, MonadIO m) => Text -> m (GValueConstruct o)
- getThemingEngineName :: (MonadIO m, IsThemingEngine o) => o -> m (Maybe Text)
Exported types
newtype ThemingEngine Source #
Memory-managed wrapper type.
ThemingEngine (ManagedPtr ThemingEngine) |
Instances
Eq ThemingEngine Source # | |
Defined in GI.Gtk.Objects.ThemingEngine (==) :: ThemingEngine -> ThemingEngine -> Bool # (/=) :: ThemingEngine -> ThemingEngine -> Bool # | |
GObject ThemingEngine Source # | |
Defined in GI.Gtk.Objects.ThemingEngine | |
ManagedPtrNewtype ThemingEngine Source # | |
Defined in GI.Gtk.Objects.ThemingEngine toManagedPtr :: ThemingEngine -> ManagedPtr ThemingEngine | |
TypedObject ThemingEngine Source # | |
Defined in GI.Gtk.Objects.ThemingEngine | |
HasParentTypes ThemingEngine Source # | |
Defined in GI.Gtk.Objects.ThemingEngine | |
IsGValue (Maybe ThemingEngine) Source # | Convert |
Defined in GI.Gtk.Objects.ThemingEngine gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe ThemingEngine -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe ThemingEngine) | |
type ParentTypes ThemingEngine Source # | |
Defined in GI.Gtk.Objects.ThemingEngine |
class (GObject o, IsDescendantOf ThemingEngine o) => IsThemingEngine o Source #
Type class for types which can be safely cast to ThemingEngine
, for instance with toThemingEngine
.
Instances
(GObject o, IsDescendantOf ThemingEngine o) => IsThemingEngine o Source # | |
Defined in GI.Gtk.Objects.ThemingEngine |
toThemingEngine :: (MonadIO m, IsThemingEngine o) => o -> m ThemingEngine Source #
Cast to ThemingEngine
, 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, forceFloating, freezeNotify, getv, hasClass, hasRegion, isFloating, lookupColor, notify, notifyByPspec, ref, refSink, runDispose, stateIsRunning, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getBackgroundColor, getBorder, getBorderColor, getColor, getData, getDirection, getFont, getJunctionSides, getMargin, getPadding, getPath, getProperty, getQdata, getScreen, getState, getStyleProperty.
Setters
getBackgroundColor
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
themingEngineGetBorder Source #
:: (HasCallStack, MonadIO m, IsThemingEngine a) | |
=> a |
|
-> [StateFlags] |
|
-> m Border |
getBorderColor
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
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
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
:: (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 #
:: (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 #
:: (HasCallStack, MonadIO m, IsThemingEngine a) | |
=> a |
|
-> [StateFlags] |
|
-> m Border |
getPadding
themingEngineGetPadding Source #
:: (HasCallStack, MonadIO m, IsThemingEngine a) | |
=> a |
|
-> [StateFlags] |
|
-> m Border |
getPath
:: (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 #
:: (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 #
:: (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 #
:: (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 #
:: (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 #
:: (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 #
:: (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
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
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
The theming engine name, this name will be used when registering custom properties, for a theming engine named "Clearlooks" registering a "glossy" custom property, it could be referenced in the CSS file as
-Clearlooks-glossy: true;
Since: 3.0
constructThemingEngineName :: (IsThemingEngine o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “name
” property. This is rarely needed directly, but it is used by new
.
getThemingEngineName :: (MonadIO m, IsThemingEngine o) => o -> m (Maybe Text) Source #
Get the value of the “name
” property.
When overloading is enabled, this is equivalent to
get
themingEngine #name