Gdk.CicpParams

g GObject.Object GObject.Object Gdk.CicpParams Gdk.CicpParams GObject.Object->Gdk.CicpParams

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

build_color_state ()

get_color_primaries ()

get_matrix_coefficients ()

get_range ()

get_transfer_function ()

set_color_primaries (color_primaries)

set_matrix_coefficients (matrix_coefficients)

set_range (range)

set_transfer_function (transfer_function)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

color-primaries

int

r/w/en

matrix-coefficients

int

r/w/en

range

Gdk.CicpRange

r/w/en

transfer-function

int

r/w/en

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Gdk.CicpParams(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Gdk.CicpParamsClass

The GdkCicpParams struct contains the parameters that define a colorstate according to 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 [method`Gdk`.CicpParams.build_color_state]. The function will return an error if the given parameters are not supported.

You can obtain a GdkCicpParams object from a color state with [method`Gdk`.ColorState.create_cicp_params]. 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.

New in version 4.16.

classmethod new()[source]
Returns:

a new GdkCicpParams

Return type:

Gdk.CicpParams

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.

New in version 4.16.

build_color_state()[source]
Raises:

GLib.Error

Returns:

A newly allocated GdkColorState

Return type:

Gdk.ColorState

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.

New in version 4.16.

get_color_primaries()[source]
Returns:

the color-primaries value

Return type:

int

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

New in version 4.16.

get_matrix_coefficients()[source]
Returns:

the matrix-coefficients value

Return type:

int

Gets the matrix-coefficients property of self.

New in version 4.16.

get_range()[source]
Returns:

the range value

Return type:

Gdk.CicpRange

Gets the range property of self.

New in version 4.16.

get_transfer_function()[source]
Returns:

the transfer-function value

Return type:

int

Gets the transfer-function property of self.

New in version 4.16.

set_color_primaries(color_primaries)[source]
Parameters:

color_primaries (int) – the new color primaries value

Sets the color-primaries property of self.

New in version 4.16.

set_matrix_coefficients(matrix_coefficients)[source]
Parameters:

matrix_coefficients (int) – the new matrix-coefficients value

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

New in version 4.16.

set_range(range)[source]
Parameters:

range (Gdk.CicpRange) – the range value

Sets the range property of self

New in version 4.16.

set_transfer_function(transfer_function)[source]
Parameters:

transfer_function (int) – the new transfer-function value

Sets the transfer-function property of self.

New in version 4.16.

Property Details

Gdk.CicpParams.props.color_primaries
Name:

color-primaries

Type:

int

Default Value:

2

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

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

New in version 4.16.

Gdk.CicpParams.props.matrix_coefficients
Name:

matrix-coefficients

Type:

int

Default Value:

2

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

The matrix coefficients (for YUV to RGB conversion).

Supported values:

  • 0: RGB

  • 2: unspecified

New in version 4.16.

Gdk.CicpParams.props.range
Name:

range

Type:

Gdk.CicpRange

Default Value:

Gdk.CicpRange.NARROW

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Whether the data is using the full range of values.

The range of the data.

New in version 4.16.

Gdk.CicpParams.props.transfer_function
Name:

transfer-function

Type:

int

Default Value:

2

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

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

New in version 4.16.