gi-gdk-3.0.11: Gdk bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Gdk.Structs.Color

Contents

Description

A Color is used to describe a color, similar to the XColor struct used in the X11 drawing API.

Synopsis

Exported types

newtype Color Source #

Constructors

Color (ManagedPtr Color) 

Instances

BoxedObject Color Source # 

Methods

boxedType :: Color -> IO GType #

(~) AttrOpTag tag AttrSet => Constructible Color tag Source # 

Methods

new :: MonadIO m => (ManagedPtr Color -> Color) -> [AttrOp Color tag] -> m Color #

((~) * info (ResolveColorMethod t Color), MethodInfo * info Color p) => IsLabel t (Color -> p) Source # 

Methods

fromLabel :: Proxy# Symbol t -> Color -> p #

((~) * info (ResolveColorMethod t Color), MethodInfo * info Color p) => IsLabelProxy t (Color -> p) Source # 

Methods

fromLabelProxy :: Proxy Symbol t -> Color -> p #

HasAttributeList * Color Source # 
((~) * signature (m Text), MonadIO m) => MethodInfo * ColorToStringMethodInfo Color signature Source # 
((~) * signature (m Word32), MonadIO m) => MethodInfo * ColorHashMethodInfo Color signature Source # 
((~) * signature (m ()), MonadIO m) => MethodInfo * ColorFreeMethodInfo Color signature Source # 
((~) * signature (Color -> m Bool), MonadIO m) => MethodInfo * ColorEqualMethodInfo Color signature Source # 
((~) * signature (m Color), MonadIO m) => MethodInfo * ColorCopyMethodInfo Color signature Source # 
type AttributeList Color Source # 

newZeroColor :: MonadIO m => m Color Source #

Construct a Color struct initialized to zero.

Methods

copy

data ColorCopyMethodInfo Source #

Instances

((~) * signature (m Color), MonadIO m) => MethodInfo * ColorCopyMethodInfo Color signature Source # 

colorCopy Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Color

color: a Color

-> m Color

Returns: a copy of color

Deprecated: (Since version 3.14)Use RGBA

Makes a copy of a Color.

The result must be freed using colorFree.

equal

data ColorEqualMethodInfo Source #

Instances

((~) * signature (Color -> m Bool), MonadIO m) => MethodInfo * ColorEqualMethodInfo Color signature Source # 

colorEqual Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Color

colora: a Color

-> Color

colorb: another Color

-> m Bool

Returns: True if the two colors compare equal

Deprecated: (Since version 3.14)Use RGBA

Compares two colors.

free

data ColorFreeMethodInfo Source #

Instances

((~) * signature (m ()), MonadIO m) => MethodInfo * ColorFreeMethodInfo Color signature Source # 

colorFree Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Color

color: a Color

-> m () 

Deprecated: (Since version 3.14)Use RGBA

Frees a Color created with colorCopy.

hash

data ColorHashMethodInfo Source #

Instances

((~) * signature (m Word32), MonadIO m) => MethodInfo * ColorHashMethodInfo Color signature Source # 

colorHash Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Color

color: a Color

-> m Word32

Returns: The hash function applied to color

Deprecated: (Since version 3.14)Use RGBA

A hash function suitable for using for a hash table that stores GdkColors.

parse

colorParse Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

spec: the string specifying the color

-> m (Bool, Color)

Returns: True if the parsing succeeded

Deprecated: (Since version 3.14)Use RGBA

Parses a textual specification of a color and fill in the red, green, and blue fields of a Color.

The string can either one of a large set of standard names (taken from the X11 rgb.txt file), or it can be a hexadecimal value in the form “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 “ffffff”, “#fffffffff” and “#ffffffffffff”).

toString

colorToString Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Color

color: a Color

-> m Text

Returns: a newly-allocated text string

Deprecated: (Since version 3.14)Use RGBA

Returns a textual specification of color in the hexadecimal form “#rrrrggggbbbb” where “r”, “g” and “b” are hex digits representing the red, green and blue components respectively.

The returned string can be parsed by colorParse.

Since: 2.12

Properties

blue

green

pixel

red

setColorRed :: MonadIO m => Color -> Word16 -> m () Source #