gi-gdk4-4.0.10: Gdk bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.Gdk.Structs.ColorState

Description

Provides information to interpret colors and pixels in a variety of ways.

They are also known as *color spaces*.

Crucially, GTK knows how to convert colors from one color state to another.

GdkColorState objects are immutable and therefore threadsafe.

Since: 4.16

Synopsis

Exported types

newtype ColorState Source #

Memory-managed wrapper type.

Instances

Instances details
Eq ColorState Source # 
Instance details

Defined in GI.Gdk.Structs.ColorState

Methods

(==) :: ColorState -> ColorState -> Bool

(/=) :: ColorState -> ColorState -> Bool

GBoxed ColorState Source # 
Instance details

Defined in GI.Gdk.Structs.ColorState

ManagedPtrNewtype ColorState Source # 
Instance details

Defined in GI.Gdk.Structs.ColorState

TypedObject ColorState Source # 
Instance details

Defined in GI.Gdk.Structs.ColorState

Methods

glibType :: IO GType #

HasParentTypes ColorState Source # 
Instance details

Defined in GI.Gdk.Structs.ColorState

IsGValue (Maybe ColorState) Source #

Convert ColorState to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Gdk.Structs.ColorState

Methods

gvalueGType_ :: IO GType #

gvalueSet_ :: Ptr GValue -> Maybe ColorState -> IO () #

gvalueGet_ :: Ptr GValue -> IO (Maybe ColorState) #

type ParentTypes ColorState Source # 
Instance details

Defined in GI.Gdk.Structs.ColorState

type ParentTypes ColorState = '[] :: [Type]

Methods

Click to display all available methods, including inherited ones

Expand

Methods

createCicpParams, equal, ref, unref.

Getters

None.

Setters

None.

createCicpParams

colorStateCreateCicpParams Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ColorState

self: a GdkColorState

-> m (Maybe CicpParams)

Returns: A new CicpParams

Create a CicpParams representing the colorstate.

It is not guaranteed that every GdkColorState can be represented with Cicp parameters. If that is the case, this function returns NULL.

Since: 4.16

equal

colorStateEqual Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ColorState

self: a GdkColorState

-> ColorState

other: another GdkColorStatee

-> m Bool

Returns: True if the two color states compare equal

Compares two GdkColorStates for equality.

Note that this function is not guaranteed to be perfect and two objects describing the same color state may compare not equal. However, different color states will never compare equal.

Since: 4.16

getOklab

colorStateGetOklab Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m ColorState

Returns: the color state object for oklab

Returns the color state object representing the oklab color space.

This is a perceptually uniform color state.

Since: 4.18

getOklch

colorStateGetOklch Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m ColorState

Returns: the color state object for oklch

Returns the color state object representing the oklch color space.

This is the polar variant of oklab, in which the hue is encoded as a polar coordinate.

Since: 4.18

getRec2100Linear

colorStateGetRec2100Linear Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m ColorState

Returns: the color state object for linearized rec2100

Returns the color state object representing the linear rec2100 color space.

This color state uses the primaries defined by BT.2020-2 and BT.2100-0 and a linear transfer function.

It is equivalent to the Cicp tuple 9/8/0/1.

See e.g. the CSS HDR Module for details about this colorstate.

Since: 4.16

getRec2100Pq

colorStateGetRec2100Pq Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m ColorState

Returns: the color state object for rec2100-pq

Returns the color state object representing the rec2100-pq color space.

This color state uses the primaries defined by BT.2020-2 and BT.2100-0 and the transfer function defined by SMPTE ST 2084 and BT.2100-2.

It is equivalent to the Cicp tuple 9/16/0/1.

See e.g. the CSS HDR Module for details about this colorstate.

Since: 4.16

getSrgb

colorStateGetSrgb Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m ColorState

Returns: the color state object for sRGB

Returns the color state object representing the sRGB color space.

This color state uses the primaries defined by BT.709-6 and the transfer function defined by IEC 61966-2-1.

It is equivalent to the Cicp tuple 1/13/0/1.

See e.g. the CSS Color Module for details about this colorstate.

Since: 4.16

getSrgbLinear

colorStateGetSrgbLinear Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m ColorState

Returns: the color state object for linearized sRGB

Returns the color state object representing the linearized sRGB color space.

This color state uses the primaries defined by BT.709-6 and a linear transfer function.

It is equivalent to the Cicp tuple 1/8/0/1.

See e.g. the CSS Color Module for details about this colorstate.

Since: 4.16

ref

colorStateRef Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ColorState

self: a GdkColorState

-> m ColorState

Returns: the object that was passed in

Increase the reference count of self.

Since: 4.16

unref

colorStateUnref Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ColorState

self: a GdkColorState

-> m () 

Decrease the reference count of self.

Unless self is static, it will be freed when the reference count reaches zero.

Since: 4.16