| 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 |
GI.Pango.Structs.Color
Description
The Color structure is used to
represent a color in an uncalibrated RGB color-space.
- newtype Color = Color (ManagedPtr Color)
- newZeroColor :: MonadIO m => m Color
- noColor :: Maybe Color
- data ColorCopyMethodInfo
- colorCopy :: (HasCallStack, MonadIO m) => Color -> m (Maybe Color)
- data ColorFreeMethodInfo
- colorFree :: (HasCallStack, MonadIO m) => Color -> m ()
- data ColorParseMethodInfo
- colorParse :: (HasCallStack, MonadIO m) => Color -> Text -> m Bool
- data ColorToStringMethodInfo
- colorToString :: (HasCallStack, MonadIO m) => Color -> m Text
- color_blue :: AttrLabelProxy "blue"
- getColorBlue :: MonadIO m => Color -> m Word16
- setColorBlue :: MonadIO m => Color -> Word16 -> m ()
- color_green :: AttrLabelProxy "green"
- getColorGreen :: MonadIO m => Color -> m Word16
- setColorGreen :: MonadIO m => Color -> Word16 -> m ()
- color_red :: AttrLabelProxy "red"
- getColorRed :: MonadIO m => Color -> m Word16
- setColorRed :: MonadIO m => Color -> Word16 -> m ()
Exported types
Constructors
| Color (ManagedPtr Color) |
Instances
| BoxedObject Color Source # | |
| (~) AttrOpTag tag AttrSet => Constructible Color tag Source # | |
| ((~) * info (ResolveColorMethod t Color), MethodInfo * info Color p) => IsLabel t (Color -> p) Source # | |
| ((~) * info (ResolveColorMethod t Color), MethodInfo * info Color p) => IsLabelProxy t (Color -> p) Source # | |
| HasAttributeList * Color Source # | |
| ((~) * signature (m Text), MonadIO m) => MethodInfo * ColorToStringMethodInfo Color signature Source # | |
| ((~) * signature (Text -> m Bool), MonadIO m) => MethodInfo * ColorParseMethodInfo Color signature Source # | |
| ((~) * signature (m ()), MonadIO m) => MethodInfo * ColorFreeMethodInfo Color signature Source # | |
| ((~) * signature (m (Maybe Color)), MonadIO m) => MethodInfo * ColorCopyMethodInfo Color signature Source # | |
| type AttributeList Color Source # | |
Methods
copy
data ColorCopyMethodInfo Source #
Instances
| ((~) * signature (m (Maybe Color)), MonadIO m) => MethodInfo * ColorCopyMethodInfo Color signature Source # | |
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Color |
|
| -> m (Maybe Color) | Returns: the newly allocated |
Creates a copy of src, which should be freed with
colorFree. Primarily used by language bindings,
not that useful otherwise (since colors can just be copied
by assignment in C).
free
data ColorFreeMethodInfo Source #
Instances
| ((~) * signature (m ()), MonadIO m) => MethodInfo * ColorFreeMethodInfo Color signature Source # | |
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Color | |
| -> m () |
Frees a color allocated by colorCopy.
parse
data ColorParseMethodInfo Source #
Instances
| ((~) * signature (Text -> m Bool), MonadIO m) => MethodInfo * ColorParseMethodInfo Color signature Source # | |
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Color |
|
| -> Text |
|
| -> m Bool | Returns: |
Fill in the fields of a color from a string specification. The
string can either one of a large set of standard names. (Taken
from the CSS <ulink url="http://dev.w3.org/csswg/css-color/named-colors">specification</ulink>), or it can be a hexadecimal
value in the
form '#rgb' '#rrggbb' '#rrrgggbbb' or '#rrrrggggbbbb' where
'r', 'g' and 'b' are hex digits of the red, green, and blue
components of the color, respectively. (White in the four
forms is '#fff' '#ffffff' '#fffffffff' and '#ffffffffffff')
toString
data ColorToStringMethodInfo Source #
Instances
| ((~) * signature (m Text), MonadIO m) => MethodInfo * ColorToStringMethodInfo Color signature Source # | |
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Color |
|
| -> m Text | Returns: a newly-allocated text string that must be freed with |
Returns a textual specification of color in the hexadecimal form
<literal>#rrrrggggbbbb</literal>, where <literal>r</literal>,
<literal>g</literal> and <literal>b</literal> are hex digits representing
the red, green, and blue components respectively.
Since: 1.16
Properties
blue
color_blue :: AttrLabelProxy "blue" Source #
green
color_green :: AttrLabelProxy "green" Source #
red
color_red :: AttrLabelProxy "red" Source #