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 [methodGdk.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 [methodGdk.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.
function Build_Color_State
(Self : not null access Gdk_Cicp_Params_Record;
Error : out Glib.Error.GError) return Gdk.Color_State.Gdk_Color_State
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: gtk+ 4.16
the return location for a recoverable error
A newly allocated GdkColorState. Has transfer-ownership='full'.
Color_Primaries_Property : constant Glib.Properties.Property_Uint;
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
subtype Gdk_Cicp_Params is Gdk.Gdk_Cicp_Params;
function Gdk_Cicp_Params_New return Gdk_Cicp_Params
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: gtk+ 4.16
type Gdk_Cicp_Params_Record is new GObject_Record with null record;
type Gdk_Cicp_Range is (
Gdk_Cicp_Range_Narrow,
Gdk_Cicp_Range_Full);
The values of this enumeration describe whether image data uses the full range of 8-bit values.
In digital broadcasting, it is common to reserve the lowest and highest values. Typically the allowed values for the narrow range are 16-235 for Y and 16-240 for u,v (when dealing with YUV data).
package Gdk_Cicp_Range_Properties is
new Generic_Internal_Discrete_Property (Gdk_Cicp_Range);
procedure Gdk_New (Self : out Gdk_Cicp_Params)
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: gtk+ 4.16
function Get_Color_Primaries
(Self : not null access Gdk_Cicp_Params_Record) return Guint
Returns the value of the color-primaries property of Self. Since: gtk+ 4.16
the color-primaries value
function Get_Matrix_Coefficients
(Self : not null access Gdk_Cicp_Params_Record) return Guint
Gets the matrix-coefficients property of Self. Since: gtk+ 4.16
the matrix-coefficients value
function Get_Range
(Self : not null access Gdk_Cicp_Params_Record) return Gdk_Cicp_Range
Gets the range property of Self. Since: gtk+ 4.16
the range value
function Get_Transfer_Function
(Self : not null access Gdk_Cicp_Params_Record) return Guint
Gets the transfer-function property of Self. Since: gtk+ 4.16
the transfer-function value
function Get_Type return Glib.GType
GRange_Property : constant Glib.Properties.Property_Boxed;
Type: Cicp_Range Whether the data is using the full range of values.
The range of the data.
procedure Initialize
(Self : not null access Gdk_Cicp_Params_Record'Class)
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: gtk+ 4.16 Initialize does nothing if the object was already created with another call to Initialize* or G_New.
Matrix_Coefficients_Property : constant Glib.Properties.Property_Uint;
The matrix coefficients (for YUV to RGB conversion).
Supported values:
0: RGB - 1: BT.709 - 2: unspecified - 5,6: BT.601 - 9: BT.2020
type Property_Gdk_Cicp_Range is new Gdk_Cicp_Range_Properties.Property;
procedure Set_Color_Primaries
(Self : not null access Gdk_Cicp_Params_Record;
Color_Primaries : Guint)
Sets the color-primaries property of Self. Since: gtk+ 4.16
the new color primaries value
procedure Set_Matrix_Coefficients
(Self : not null access Gdk_Cicp_Params_Record;
Matrix_Coefficients : Guint)
Self a GdkCicpParams Sets the matrix-coefficients property of Self. Since: gtk+ 4.16
the new matrix-coefficients value
procedure Set_Range
(Self : not null access Gdk_Cicp_Params_Record;
GRange : Gdk_Cicp_Range)
Sets the range property of Self Since: gtk+ 4.16
the range value
procedure Set_Transfer_Function
(Self : not null access Gdk_Cicp_Params_Record;
Transfer_Function : Guint)
Sets the transfer-function property of Self. Since: gtk+ 4.16
the new transfer-function value
Transfer_Function_Property : constant Glib.Properties.Property_Uint;
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