Graphics.UI.Gtk.General.CssProvider

gtk3-0.14.6: Binding to the Gtk+ 3 graphical user interface library

Maintainer | gtk2hs-users@lists.sourceforge.net
Stability | provisional
Portability | portable (depends on GHC)
Safe Haskell | None
Language | Haskell98

Graphics.UI.Gtk.General.CssProvider

Contents

- Description
- Types
- Enums
- Constructors
- Methods
- Orphan instances

Description

CSS-like styling for widgets.

Synopsis

- data CssProvider
- class GObjectClass o => CssProviderClass o
- castToCssProvider :: GObjectClass obj => obj -> CssProvider
- gTypeCssProvider :: GType
- toCssProvider :: CssProviderClass o => o -> CssProvider
- data CssProviderError
  - = CssProviderErrorFailed
  - | CssProviderErrorSyntax
  - | CssProviderErrorImport
  - | CssProviderErrorName
  - | CssProviderErrorDeprecated
  - | CssProviderErrorUnknownValue
- cssProviderNew :: IO CssProvider
- cssProviderGetDefault :: IO CssProvider
- cssProviderGetNamed :: GlibString string => string -> Maybe string -> IO (Maybe CssProvider)
- cssProviderLoadFromData :: CssProviderClass cssProvider => cssProvider -> Ptr CChar -> Int -> IO ()
- cssProviderLoadFromString :: (CssProviderClass cssProvider, GlibString string) => cssProvider -> string -> IO ()
- cssProviderLoadFromPath :: (CssProviderClass cssProvider, GlibFilePath fp) => cssProvider -> fp -> IO ()
- cssProviderToString :: (CssProviderClass cssProvider, GlibString string) => cssProvider -> IO string

# Description

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

# Types

data CssProvider #

Instances

Eq CssProvider # |
Methods (==) :: CssProvider -> CssProvider -> Bool # (/=) :: CssProvider -> CssProvider -> Bool #
Ord CssProvider # |
Methods compare :: CssProvider -> CssProvider -> Ordering # (<) :: CssProvider -> CssProvider -> Bool # (<=) :: CssProvider -> CssProvider -> Bool # (>) :: CssProvider -> CssProvider -> Bool # (>=) :: CssProvider -> CssProvider -> Bool # max :: CssProvider -> CssProvider -> CssProvider # min :: CssProvider -> CssProvider -> CssProvider #
GObjectClass CssProvider # |
Methods toGObject :: CssProvider -> GObject # unsafeCastGObject :: GObject -> CssProvider #
CssProviderClass CssProvider # |

class GObjectClass o => CssProviderClass o #

Instances

CssProviderClass CssProvider # |

castToCssProvider :: GObjectClass obj => obj -> CssProvider #

gTypeCssProvider :: GType #

toCssProvider :: CssProviderClass o => o -> CssProvider #

# Enums

data CssProviderError #

Constructors

CssProviderErrorFailed |
CssProviderErrorSyntax |
CssProviderErrorImport |
CssProviderErrorName |
CssProviderErrorDeprecated |
CssProviderErrorUnknownValue |

Instances

Bounded CssProviderError # |
Methods minBound :: CssProviderError # maxBound :: CssProviderError #
Enum CssProviderError # |
Methods succ :: CssProviderError -> CssProviderError # pred :: CssProviderError -> CssProviderError # toEnum :: Int -> CssProviderError # fromEnum :: CssProviderError -> Int # enumFrom :: CssProviderError -> [CssProviderError] # enumFromThen :: CssProviderError -> CssProviderError -> [CssProviderError] # enumFromTo :: CssProviderError -> CssProviderError -> [CssProviderError] # enumFromThenTo :: CssProviderError -> CssProviderError -> CssProviderError -> [CssProviderError] #
Eq CssProviderError # |
Methods (==) :: CssProviderError -> CssProviderError -> Bool # (/=) :: CssProviderError -> CssProviderError -> Bool #
Show CssProviderError # |
Methods showsPrec :: Int -> CssProviderError -> ShowS # show :: CssProviderError -> String # showList :: [CssProviderError] -> ShowS #

# Constructors

cssProviderNew #

Arguments

:: IO CssProvider | A new CssProvider

Returns a newly created CssProvider

# Methods

cssProviderGetDefault #

Arguments

:: IO CssProvider | The provider used for fallback styling

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

cssProviderGetNamed #

Arguments

:: GlibString string |
=> 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

cssProviderLoadFromData #

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.

cssProviderLoadFromString #

Arguments

:: (CssProviderClass cssProvider, GlibString string) |
=> cssProvider | `cssProvider` : a `CssProvider`
-> string | `css` : CSS data loaded in memory.
-> IO () |

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

cssProviderLoadFromPath #

Arguments

:: (CssProviderClass cssProvider, GlibFilePath fp) |
=> cssProvider | `cssProvider` a `CssProvider`
-> fp | the path of a filename to load
-> IO () |

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

cssProviderToString #

Arguments

:: (CssProviderClass cssProvider, GlibString string) |
=> 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`.

# Orphan instances

StyleProviderClass CssProvider # |