gi-gtk-3.0.31: Gtk bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (inaki@blueleaf.cc)
Safe HaskellNone
LanguageHaskell2010

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.

Synopsis

Exported types

newtype ThemingEngine Source #

Memory-managed wrapper type.

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 # 
Instance details

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

getBackgroundColor

themingEngineGetBackgroundColor Source #

Arguments

:: (HasCallStack, MonadIO m, IsThemingEngine a) 
=> a

engine: a ThemingEngine

-> [StateFlags]

state: state to retrieve the color for

-> 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

engine: a ThemingEngine

-> [StateFlags]

state: state to retrieve the border for

-> m Border 

Deprecated: (Since version 3.14)

Gets the border for a given state as a Border.

Since: 3.0

getBorderColor

themingEngineGetBorderColor Source #

Arguments

:: (HasCallStack, MonadIO m, IsThemingEngine a) 
=> a

engine: a ThemingEngine

-> [StateFlags]

state: state to retrieve the color for

-> 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

engine: a ThemingEngine

-> [StateFlags]

state: state to retrieve the color for

-> 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

engine: a ThemingEngine

-> 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

themingEngineGetFont Source #

Arguments

:: (HasCallStack, MonadIO m, IsThemingEngine a) 
=> a

engine: a ThemingEngine

-> [StateFlags]

state: state to retrieve the font for

-> m FontDescription

Returns: the FontDescription for the given state. This object is owned by GTK+ and should not be freed.

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

engine: a ThemingEngine

-> 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

engine: a ThemingEngine

-> [StateFlags]

state: state to retrieve the border for

-> m Border 

Deprecated: (Since version 3.14)

Gets the margin for a given state as a Border.

Since: 3.0

getPadding

themingEngineGetPadding Source #

Arguments

:: (HasCallStack, MonadIO m, IsThemingEngine a) 
=> a

engine: a ThemingEngine

-> [StateFlags]

state: state to retrieve the padding for

-> m Border 

Deprecated: (Since version 3.14)

Gets the padding for a given state as a Border.

Since: 3.0

getPath

themingEngineGetPath Source #

Arguments

:: (HasCallStack, MonadIO m, IsThemingEngine a) 
=> a

engine: a ThemingEngine

-> m WidgetPath

Returns: A WidgetPath

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

engine: a ThemingEngine

-> Text

property: the property name

-> [StateFlags]

state: state to retrieve the value for

-> 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

engine: a ThemingEngine

-> m (Maybe Screen)

Returns: a Screen, or Nothing.

Deprecated: (Since version 3.14)

Returns the Screen to which engine currently rendering to.

getState

themingEngineGetState Source #

Arguments

:: (HasCallStack, MonadIO m, IsThemingEngine a) 
=> a

engine: a ThemingEngine

-> 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

engine: a ThemingEngine

-> Text

propertyName: the name of the widget style property

-> 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

engine: a ThemingEngine

-> Text

styleClass: class name to look up

-> m Bool

Returns: True if engine has className defined

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

engine: a ThemingEngine

-> Text

styleRegion: a region name

-> m (Bool, [RegionFlags])

Returns: True if region is defined

Deprecated: (Since version 3.14)

Returns True if the currently rendered contents have the region defined. If flagsReturn is not Nothing, it is set to the flags affecting the region.

Since: 3.0

load

themingEngineLoad Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

name: Theme engine name to load

-> m (Maybe ThemingEngine)

Returns: A theming engine, or Nothing if the engine name doesn’t exist.

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

engine: a ThemingEngine

-> Text

colorName: color name to lookup

-> m (Bool, RGBA)

Returns: True if colorName was found and resolved, False otherwise

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

engine: a ThemingEngine

-> StateType

state: a widget state

-> m (Bool, Double)

Returns: True if there is a running transition animation for state.

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 => Text -> IO (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