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.Objects.CicpParams

Description

Contains the parameters that define a colorstate with cicp parameters.

Cicp parameters are specified in the ITU-T H.273 specification.

See the documentation of individual properties for supported values.

The 'unspecified' value (2) is not treated in any special way, and must be replaced by a different value before creating a color state.

GdkCicpParams can be used as a builder object to construct a color state from Cicp data with cicpParamsBuildColorState. The function will return an error if the given parameters are not supported.

You can obtain a GdkCicpParams object from a color state with colorStateCreateCicpParams. This can be used to create a variant of a color state, by changing just one of the cicp parameters, or just to obtain information about the color state.

Since: 4.16

Synopsis

Exported types

newtype CicpParams Source #

Memory-managed wrapper type.

Instances

Instances details
Eq CicpParams Source # 
Instance details

Defined in GI.Gdk.Objects.CicpParams

Methods

(==) :: CicpParams -> CicpParams -> Bool

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

GObject CicpParams Source # 
Instance details

Defined in GI.Gdk.Objects.CicpParams

ManagedPtrNewtype CicpParams Source # 
Instance details

Defined in GI.Gdk.Objects.CicpParams

TypedObject CicpParams Source # 
Instance details

Defined in GI.Gdk.Objects.CicpParams

Methods

glibType :: IO GType #

HasParentTypes CicpParams Source # 
Instance details

Defined in GI.Gdk.Objects.CicpParams

IsGValue (Maybe CicpParams) Source #

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

Instance details

Defined in GI.Gdk.Objects.CicpParams

Methods

gvalueGType_ :: IO GType #

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

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

type ParentTypes CicpParams Source # 
Instance details

Defined in GI.Gdk.Objects.CicpParams

type ParentTypes CicpParams = '[Object]

class (GObject o, IsDescendantOf CicpParams o) => IsCicpParams o Source #

Type class for types which can be safely cast to CicpParams, for instance with toCicpParams.

Instances

Instances details
(GObject o, IsDescendantOf CicpParams o) => IsCicpParams o Source # 
Instance details

Defined in GI.Gdk.Objects.CicpParams

toCicpParams :: (MonadIO m, IsCicpParams o) => o -> m CicpParams Source #

Cast to CicpParams, for types for which this is known to be safe. For general casts, use castTo.

Methods

buildColorState

cicpParamsBuildColorState Source #

Arguments

:: (HasCallStack, MonadIO m, IsCicpParams a) 
=> a

self: a GdkCicpParams

-> m ColorState

Returns: A newly allocated GdkColorState (Can throw GError)

Creates a new GdkColorState object for the cicp parameters in self.

Note that this may fail if the cicp parameters in self are not supported by GTK. In that case, NULL is returned, and error is set with an error message that can be presented to the user.

Since: 4.16

getColorPrimaries

cicpParamsGetColorPrimaries Source #

Arguments

:: (HasCallStack, MonadIO m, IsCicpParams a) 
=> a

self: a GdkCicpParams

-> m Word32

Returns: the color-primaries value

Returns the value of the color-primaries property of self.

Since: 4.16

getMatrixCoefficients

cicpParamsGetMatrixCoefficients Source #

Arguments

:: (HasCallStack, MonadIO m, IsCicpParams a) 
=> a

self: a GdkCicpParams

-> m Word32

Returns: the matrix-coefficients value

Gets the matrix-coefficients property of self.

Since: 4.16

getRange

cicpParamsGetRange Source #

Arguments

:: (HasCallStack, MonadIO m, IsCicpParams a) 
=> a

self: a GdkCicpParams

-> m CicpRange

Returns: the range value

Gets the range property of self.

Since: 4.16

getTransferFunction

cicpParamsGetTransferFunction Source #

Arguments

:: (HasCallStack, MonadIO m, IsCicpParams a) 
=> a

self: a GdkCicpParams

-> m Word32

Returns: the transfer-function value

Gets the transfer-function property of self.

Since: 4.16

new

cicpParamsNew Source #

Arguments

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

Returns: a new GdkCicpParams

Creates a new GdkCicpParams object.

The initial values of the properties are the values for "undefined" and need to be set before a color state object can be built.

Since: 4.16

setColorPrimaries

cicpParamsSetColorPrimaries Source #

Arguments

:: (HasCallStack, MonadIO m, IsCicpParams a) 
=> a

self: a GdkCicpParams

-> Word32

colorPrimaries: the new color primaries value

-> m () 

Sets the color-primaries property of self.

Since: 4.16

setMatrixCoefficients

cicpParamsSetMatrixCoefficients Source #

Arguments

:: (HasCallStack, MonadIO m, IsCicpParams a) 
=> a 
-> Word32

matrixCoefficients: the new matrix-coefficients value

-> m () 

self a GdkCicpParams Sets the matrix-coefficients property of self.

Since: 4.16

setRange

cicpParamsSetRange Source #

Arguments

:: (HasCallStack, MonadIO m, IsCicpParams a) 
=> a

self: a GdkCipParams

-> CicpRange

range: the range value

-> m () 

Sets the range property of self

Since: 4.16

setTransferFunction

cicpParamsSetTransferFunction Source #

Arguments

:: (HasCallStack, MonadIO m, IsCicpParams a) 
=> a

self: a GdkCicpParams

-> Word32

transferFunction: the new transfer-function value

-> m () 

Sets the transfer-function property of self.

Since: 4.16

Properties

colorPrimaries

The color primaries to use.

Supported values:

  • 1: BT.709 / sRGB
  • 2: unspecified
  • 5: PAL
  • 6,7: BT.601 / NTSC
  • 9: BT.2020
  • 12: Display P3

Since: 4.16

constructCicpParamsColorPrimaries :: (IsCicpParams o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “color-primaries” property. This is rarely needed directly, but it is used by new.

getCicpParamsColorPrimaries :: (MonadIO m, IsCicpParams o) => o -> m Word32 Source #

Get the value of the “color-primaries” property. When overloading is enabled, this is equivalent to

get cicpParams #colorPrimaries

setCicpParamsColorPrimaries :: (MonadIO m, IsCicpParams o) => o -> Word32 -> m () Source #

Set the value of the “color-primaries” property. When overloading is enabled, this is equivalent to

set cicpParams [ #colorPrimaries := value ]

matrixCoefficients

The matrix coefficients (for YUV to RGB conversion).

Supported values:

  • 0: RGB
  • 1: BT.709
  • 2: unspecified
  • 5,6: BT.601
  • 9: BT.2020

Since: 4.16

constructCicpParamsMatrixCoefficients :: (IsCicpParams o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “matrix-coefficients” property. This is rarely needed directly, but it is used by new.

getCicpParamsMatrixCoefficients :: (MonadIO m, IsCicpParams o) => o -> m Word32 Source #

Get the value of the “matrix-coefficients” property. When overloading is enabled, this is equivalent to

get cicpParams #matrixCoefficients

setCicpParamsMatrixCoefficients :: (MonadIO m, IsCicpParams o) => o -> Word32 -> m () Source #

Set the value of the “matrix-coefficients” property. When overloading is enabled, this is equivalent to

set cicpParams [ #matrixCoefficients := value ]

range

Whether the data is using the full range of values.

The range of the data.

Since: 4.16

constructCicpParamsRange :: (IsCicpParams o, MonadIO m) => CicpRange -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “range” property. This is rarely needed directly, but it is used by new.

getCicpParamsRange :: (MonadIO m, IsCicpParams o) => o -> m CicpRange Source #

Get the value of the “range” property. When overloading is enabled, this is equivalent to

get cicpParams #range

setCicpParamsRange :: (MonadIO m, IsCicpParams o) => o -> CicpRange -> m () Source #

Set the value of the “range” property. When overloading is enabled, this is equivalent to

set cicpParams [ #range := value ]

transferFunction

The transfer function to use.

Supported values:

  • 1,6,14,15: BT.709, BT.601, BT.2020
  • 2: unspecified
  • 4: gamma 2.2
  • 5: gamma 2.8
  • 8: linear
  • 13: sRGB
  • 16: BT.2100 PQ
  • 18: BT.2100 HLG

Since: 4.16

constructCicpParamsTransferFunction :: (IsCicpParams o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “transfer-function” property. This is rarely needed directly, but it is used by new.

getCicpParamsTransferFunction :: (MonadIO m, IsCicpParams o) => o -> m Word32 Source #

Get the value of the “transfer-function” property. When overloading is enabled, this is equivalent to

get cicpParams #transferFunction

setCicpParamsTransferFunction :: (MonadIO m, IsCicpParams o) => o -> Word32 -> m () Source #

Set the value of the “transfer-function” property. When overloading is enabled, this is equivalent to

set cicpParams [ #transferFunction := value ]