gi-gdk4-4.0.10: Gdk bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Gdk.Objects.CicpParams

Contents

- Exported types
- Methods
  - buildColorState
  - getColorPrimaries
  - getMatrixCoefficients
  - getRange
  - getTransferFunction
  - new
  - setColorPrimaries
  - setMatrixCoefficients
  - setRange
  - setTransferFunction
- Properties
  - colorPrimaries
  - matrixCoefficients
  - range
  - transferFunction

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

- newtype CicpParams = CicpParams (ManagedPtr CicpParams)
- class (GObject o, IsDescendantOf CicpParams o) => IsCicpParams o
- toCicpParams :: (MonadIO m, IsCicpParams o) => o -> m CicpParams
- cicpParamsBuildColorState :: (HasCallStack, MonadIO m, IsCicpParams a) => a -> m ColorState
- cicpParamsGetColorPrimaries :: (HasCallStack, MonadIO m, IsCicpParams a) => a -> m Word32
- cicpParamsGetMatrixCoefficients :: (HasCallStack, MonadIO m, IsCicpParams a) => a -> m Word32
- cicpParamsGetRange :: (HasCallStack, MonadIO m, IsCicpParams a) => a -> m CicpRange
- cicpParamsGetTransferFunction :: (HasCallStack, MonadIO m, IsCicpParams a) => a -> m Word32
- cicpParamsNew :: (HasCallStack, MonadIO m) => m CicpParams
- cicpParamsSetColorPrimaries :: (HasCallStack, MonadIO m, IsCicpParams a) => a -> Word32 -> m ()
- cicpParamsSetMatrixCoefficients :: (HasCallStack, MonadIO m, IsCicpParams a) => a -> Word32 -> m ()
- cicpParamsSetRange :: (HasCallStack, MonadIO m, IsCicpParams a) => a -> CicpRange -> m ()
- cicpParamsSetTransferFunction :: (HasCallStack, MonadIO m, IsCicpParams a) => a -> Word32 -> m ()
- constructCicpParamsColorPrimaries :: (IsCicpParams o, MonadIO m) => Word32 -> m (GValueConstruct o)
- getCicpParamsColorPrimaries :: (MonadIO m, IsCicpParams o) => o -> m Word32
- setCicpParamsColorPrimaries :: (MonadIO m, IsCicpParams o) => o -> Word32 -> m ()
- constructCicpParamsMatrixCoefficients :: (IsCicpParams o, MonadIO m) => Word32 -> m (GValueConstruct o)
- getCicpParamsMatrixCoefficients :: (MonadIO m, IsCicpParams o) => o -> m Word32
- setCicpParamsMatrixCoefficients :: (MonadIO m, IsCicpParams o) => o -> Word32 -> m ()
- constructCicpParamsRange :: (IsCicpParams o, MonadIO m) => CicpRange -> m (GValueConstruct o)
- getCicpParamsRange :: (MonadIO m, IsCicpParams o) => o -> m CicpRange
- setCicpParamsRange :: (MonadIO m, IsCicpParams o) => o -> CicpRange -> m ()
- constructCicpParamsTransferFunction :: (IsCicpParams o, MonadIO m) => Word32 -> m (GValueConstruct o)
- getCicpParamsTransferFunction :: (MonadIO m, IsCicpParams o) => o -> m Word32
- setCicpParamsTransferFunction :: (MonadIO m, IsCicpParams o) => o -> Word32 -> m ()

# Exported types

newtype CicpParams Source #

Memory-managed wrapper type.

Constructors

CicpParams (ManagedPtr CicpParams) |

#### Instances

Instances details

Eq CicpParams Source # |
Instance details Defined in GI.Gdk.Objects.CicpParams Methods (==) :: CicpParams -> CicpParams -> Bool Source # (/=) :: CicpParams -> CicpParams -> Bool Source #
GObject CicpParams Source # |
Instance details Defined in GI.Gdk.Objects.CicpParams
ManagedPtrNewtype CicpParams Source # |
Instance details Defined in GI.Gdk.Objects.CicpParams Methods toManagedPtr :: CicpParams -> ManagedPtr CicpParams Source #
TypedObject CicpParams Source # |
Instance details Defined in GI.Gdk.Objects.CicpParams Methods glibType :: IO GType Source #
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 Source # gvalueSet_ :: Ptr GValue -> Maybe CicpParams -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe CicpParams) Source #
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

### Click to display all available methods, including inherited ones

Expand

#### Methods

bindProperty, bindPropertyFull, buildColorState, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.

#### Getters

getColorPrimaries, getData, getMatrixCoefficients, getProperty, getQdata, getRange, getTransferFunction.

#### Setters

setColorPrimaries, setData, setDataFull, setMatrixCoefficients, setProperty, setRange, setTransferFunction.

## 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 ]