Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
GtkGradient is a boxed type that represents a gradient. It is the result of parsing a [gradient expression][gtkcssprovider-gradients]. To obtain the gradient represented by a GtkGradient, it has to be resolved with gtk_gradient_resolve(), which replaces all symbolic color references by the colors they refer to (in a given context) and constructs a #cairo_pattern_t value.
It is not normally necessary to deal directly with #GtkGradients, since they are mostly used behind the scenes by #GtkStyleContext and #GtkCssProvider.
#GtkGradient is deprecated. It was used internally by GTK’s CSS engine to represent gradients. As its handling is not conforming to modern web standards, it is not used anymore. If you want to use gradients in your own code, please use Cairo directly.
- newtype Gradient = Gradient (ForeignPtr Gradient)
- noGradient :: Maybe Gradient
- data GradientAddColorStopMethodInfo
- gradientAddColorStop :: MonadIO m => Gradient -> Double -> SymbolicColor -> m ()
- gradientNewLinear :: MonadIO m => Double -> Double -> Double -> Double -> m Gradient
- gradientNewRadial :: MonadIO m => Double -> Double -> Double -> Double -> Double -> Double -> m Gradient
- data GradientRefMethodInfo
- gradientRef :: MonadIO m => Gradient -> m Gradient
- data GradientResolveMethodInfo
- gradientResolve :: (MonadIO m, StylePropertiesK a) => Gradient -> a -> m (Bool, Pattern)
- data GradientResolveForContextMethodInfo
- gradientResolveForContext :: (MonadIO m, StyleContextK a) => Gradient -> a -> m Pattern
- data GradientToStringMethodInfo
- gradientToString :: MonadIO m => Gradient -> m Text
- data GradientUnrefMethodInfo
- gradientUnref :: MonadIO m => Gradient -> m ()
Exported types
BoxedObject Gradient | |
((~) * signature (m ()), MonadIO m) => MethodInfo * GradientUnrefMethodInfo Gradient signature | |
((~) * signature (m Text), MonadIO m) => MethodInfo * GradientToStringMethodInfo Gradient signature | |
((~) * signature (a -> m Pattern), MonadIO m, StyleContextK a) => MethodInfo * GradientResolveForContextMethodInfo Gradient signature | |
((~) * signature (a -> m (Bool, Pattern)), MonadIO m, StylePropertiesK a) => MethodInfo * GradientResolveMethodInfo Gradient signature | |
((~) * signature (m Gradient), MonadIO m) => MethodInfo * GradientRefMethodInfo Gradient signature | |
((~) * signature (Double -> SymbolicColor -> m ()), MonadIO m) => MethodInfo * GradientAddColorStopMethodInfo Gradient signature | |
((~) * info (ResolveGradientMethod t Gradient), MethodInfo * info Gradient p) => IsLabelProxy t (Gradient -> p) | |
type AttributeList Gradient |
Methods
gradientAddColorStop
data GradientAddColorStopMethodInfo Source
((~) * signature (Double -> SymbolicColor -> m ()), MonadIO m) => MethodInfo * GradientAddColorStopMethodInfo Gradient signature |
gradientAddColorStop :: MonadIO m => Gradient -> Double -> SymbolicColor -> m () Source
Deprecated: (Since version 3.8)#GtkGradient is deprecated.
gradientNewLinear
gradientNewLinear :: MonadIO m => Double -> Double -> Double -> Double -> m Gradient Source
Deprecated: (Since version 3.8)#GtkGradient is deprecated.
gradientNewRadial
gradientNewRadial :: MonadIO m => Double -> Double -> Double -> Double -> Double -> Double -> m Gradient Source
Deprecated: (Since version 3.8)#GtkGradient is deprecated.
gradientRef
data GradientRefMethodInfo Source
((~) * signature (m Gradient), MonadIO m) => MethodInfo * GradientRefMethodInfo Gradient signature |
gradientRef :: MonadIO m => Gradient -> m Gradient Source
Deprecated: (Since version 3.8)#GtkGradient is deprecated.
gradientResolve
data GradientResolveMethodInfo Source
((~) * signature (a -> m (Bool, Pattern)), MonadIO m, StylePropertiesK a) => MethodInfo * GradientResolveMethodInfo Gradient signature |
gradientResolve :: (MonadIO m, StylePropertiesK a) => Gradient -> a -> m (Bool, Pattern) Source
Deprecated: (Since version 3.8)#GtkGradient is deprecated.
gradientResolveForContext
data GradientResolveForContextMethodInfo Source
((~) * signature (a -> m Pattern), MonadIO m, StyleContextK a) => MethodInfo * GradientResolveForContextMethodInfo Gradient signature |
gradientResolveForContext :: (MonadIO m, StyleContextK a) => Gradient -> a -> m Pattern Source
gradientToString
data GradientToStringMethodInfo Source
((~) * signature (m Text), MonadIO m) => MethodInfo * GradientToStringMethodInfo Gradient signature |
gradientToString :: MonadIO m => Gradient -> m Text Source
Deprecated: (Since version 3.8)#GtkGradient is deprecated.
gradientUnref
data GradientUnrefMethodInfo Source
((~) * signature (m ()), MonadIO m) => MethodInfo * GradientUnrefMethodInfo Gradient signature |
gradientUnref :: MonadIO m => Gradient -> m () Source
Deprecated: (Since version 3.8)#GtkGradient is deprecated.