gtk3-0.15.10: 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 Source #

#### Instances

Instances details

Eq CssProvider Source # |
Instance details Defined in Graphics.UI.Gtk.Types Methods (==) :: CssProvider -> CssProvider -> Bool Source # (/=) :: CssProvider -> CssProvider -> Bool Source #
Ord CssProvider Source # |

Instance details

Defined in Graphics.UI.Gtk.Types

Methods

compare :: CssProvider -> CssProvider -> Ordering Source #

(<) :: CssProvider -> CssProvider -> Bool Source #

(<=) :: CssProvider -> CssProvider -> Bool Source #

(>) :: CssProvider -> CssProvider -> Bool Source #

(>=) :: CssProvider -> CssProvider -> Bool Source #

max :: CssProvider -> CssProvider -> CssProvider Source #

min :: CssProvider -> CssProvider -> CssProvider Source #

GObjectClass CssProvider Source # |
Instance details Defined in Graphics.UI.Gtk.Types Methods toGObject :: CssProvider -> GObject Source # unsafeCastGObject :: GObject -> CssProvider Source #
CssProviderClass CssProvider Source # |
Instance details Defined in Graphics.UI.Gtk.Types
StyleProviderClass CssProvider Source # |
Instance details Defined in Graphics.UI.Gtk.General.CssProvider

class GObjectClass o => CssProviderClass o Source #

#### Instances

Instances details

CssProviderClass CssProvider Source # |
Instance details Defined in Graphics.UI.Gtk.Types

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

gTypeCssProvider :: GType Source #

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

# Enums

data CssProviderError Source #

Constructors

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

#### Instances

Instances details

Bounded CssProviderError Source # |
Instance details Defined in Graphics.UI.Gtk.General.CssProvider Methods minBound :: CssProviderError Source # maxBound :: CssProviderError Source #
Enum CssProviderError Source # |

Instance details

Defined in Graphics.UI.Gtk.General.CssProvider

Methods

succ :: CssProviderError -> CssProviderError Source #

pred :: CssProviderError -> CssProviderError Source #

toEnum :: Int -> CssProviderError Source #

fromEnum :: CssProviderError -> Int Source #

enumFrom :: CssProviderError -> [CssProviderError] Source #

enumFromThen :: CssProviderError -> CssProviderError -> [CssProviderError] Source #

enumFromTo :: CssProviderError -> CssProviderError -> [CssProviderError] Source #

enumFromThenTo :: CssProviderError -> CssProviderError -> CssProviderError -> [CssProviderError] Source #

Show CssProviderError Source # |
Instance details Defined in Graphics.UI.Gtk.General.CssProvider Methods showsPrec :: Int -> CssProviderError -> ShowS Source # show :: CssProviderError -> String Source # showList :: [CssProviderError] -> ShowS Source #
Eq CssProviderError Source # |
Instance details Defined in Graphics.UI.Gtk.General.CssProvider Methods (==) :: CssProviderError -> CssProviderError -> Bool Source # (/=) :: CssProviderError -> CssProviderError -> Bool Source #

# Constructors

cssProviderNew Source #

Arguments

:: IO CssProvider | A new CssProvider

Returns a newly created CssProvider

# Methods

cssProviderGetDefault Source #

Arguments

:: IO CssProvider | The provider used for fallback styling

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

cssProviderGetNamed Source #

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

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

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

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

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