gtk3-0.12.5.6: Binding to the Gtk+ graphical user interface library.

Portabilityportable (depends on GHC)
Stabilityprovisional
Maintainergtk2hs-users@lists.sourceforge.net
Safe HaskellNone

Graphics.UI.Gtk.General.CssProvider

Contents

Description

CSS-like styling for widgets.

Synopsis

Description

CssProvider is an object implementing the StyleProvider interface. It is able to parse CSS-like input in order to style widgets.

Types

Enums

Constructors

cssProviderNewSource

Arguments

:: IO CssProvider

A new CssProvider

Returns a newly created CssProvider

Methods

cssProviderGetDefaultSource

Arguments

:: IO CssProvider

The provider used for fallback styling

Returns the provider containing the style settings used as a fallback for all widgets.

cssProviderGetNamedSource

Arguments

:: String

name : A theme name

-> Maybe String

variant to load, for example, dark

-> IO (Maybe CssProvider)

a CssProvider with the theme loaded

Loads a theme from the usual theme paths

cssProviderLoadFromDataSource

Arguments

:: CssProviderClass cssProvider 
=> cssProvider

cssProvider : a CssProvider

-> Ptr CChar

_data : CSS data loaded in memory. [array length=length][element-type guint8]

-> Int

length : the length of _data in bytes, or -1 for NUL terminated strings. If length is not -1, the code will assume it is not NUL terminated and will potentially do a copy.

-> IO () 

Loads _data into cssProvider, making it clear any previously loaded information.

cssProviderLoadFromStringSource

Arguments

:: CssProviderClass cssProvider 
=> cssProvider

cssProvider : a CssProvider

-> String

css : CSS data loaded in memory.

-> IO () 

Loads css into cssProvider, making it clear any previously loaded information.

cssProviderLoadFromPathSource

Arguments

:: CssProviderClass cssProvider 
=> cssProvider

cssProvider a CssProvider

-> FilePath

the path of a filename to load

-> IO () 

Loads the data contained in path into cssProvider, making it clear any previously loaded information

cssProviderToStringSource

Arguments

:: CssProviderClass cssProvider 
=> cssProvider

provider a CssProvider

-> IO String 

Convertes the provider into a string representation in CSS format.

Using cssProviderLoadFromString with the return value from this function on a new provider created with cssProviderNew will basically create a duplicate of this provider.