Debian Codegraph @

gdk/gdkcicpparams.c

raw symbols SCIP
1 /* gdkcicpparams.c
2 *
3 * Copyright 2024 Matthias Clasen
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19 #include "config.h"cxx . . $ `<file>/build/config.h`/
20
21 #include "gdkcicpparamsprivate.h"cxx . . $ `<file>/gdk/gdkcicpparamsprivate.h`/
22 #include "gdkcolorstateprivate.h"cxx . . $ `<file>/gdk/gdkcolorstateprivate.h`/
23 #include "gdkenumtypes.h"cxx . . $ `<file>/build/gdk/gdkenumtypes.h`/
24
25 /**
26 * GdkCicpParams:
27 *
28 * Contains the parameters that define a colorstate with cicp parameters.
29 *
30 * Cicp parameters are specified in the ITU-T H.273
31 * [specification](https://www.itu.int/rec/T-REC-H.273/en).
32 *
33 * See the documentation of individual properties for supported values.
34 *
35 * The 'unspecified' value (2) is not treated in any special way, and
36 * must be replaced by a different value before creating a color state.
37 *
38 * `GdkCicpParams` can be used as a builder object to construct a color
39 * state from Cicp data with [[email protected]_color_state].
40 * The function will return an error if the given parameters are not
41 * supported.
42 *
43 * You can obtain a `GdkCicpParams` object from a color state with
44 * [[email protected]_cicp_params]. This can be used to
45 * create a variant of a color state, by changing just one of the cicp
46 * parameters, or just to obtain information about the color state.
47 *
48 * Since: 4.16
49 */
50
51 /* {{{ GObject boilerplate */
52
53 struct _GdkCicpParamscxx . . $ _GdkCicpParams#
54 {
55 GObjectcxx . . $ GObject# parent_instancecxx . . $ _GdkCicpParams#parent_instance.;
56
57 GdkCicpcxx . . $ GdkCicp# cicpcxx . . $ _GdkCicpParams#cicp.;
58 };
59
60 struct _GdkCicpParamsClasscxx . . $ _GdkCicpParamsClass#
61 {
62 GObjectClasscxx . . $ GObjectClass# parent_classcxx . . $ _GdkCicpParamsClass#parent_class.;
63 };
64
65 G_DEFINE_TYPEcxx . . $ `<external>/9567554376676449156/gtype.h:1834:9`! (GdkCicpParams, gdk_cicp_params, G_TYPE_OBJECTcxx . . $ `<external>/9567554376676449156/gtype.h:189:9`!)
66
67 enumcxx . . $ $anonymous_type_32f37fc18e78e45c_0#
68 {
69 PROP_COLOR_PRIMARIEScxx . . $ PROP_COLOR_PRIMARIES. = 1,
70 PROP_TRANSFER_FUNCTIONcxx . . $ PROP_TRANSFER_FUNCTION.,
71 PROP_MATRIX_COEFFICIENTScxx . . $ PROP_MATRIX_COEFFICIENTS.,
72 PROP_RANGEcxx . . $ PROP_RANGE.,
73
74 N_PROPERTIEScxx . . $ N_PROPERTIES.,
75 };
76
77 static GParamSpeccxx . . $ GParamSpec# *propertiescxx . . $ properties.[N_PROPERTIEScxx . . $ N_PROPERTIES.] = { NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, };
78
79 static void
80 gdk_cicp_params_initcxx . . $ gdk_cicp_params_init(44da38526c7f158e). (GdkCicpParamscxx . . $ GdkCicpParams# *self)
81 {
82 self->cicpcxx . . $ _GdkCicpParams#cicp..color_primariescxx . . $ _GdkCicp#color_primaries. = 2;
83 self->cicpcxx . . $ _GdkCicpParams#cicp..transfer_functioncxx . . $ _GdkCicp#transfer_function. = 2;
84 self->cicpcxx . . $ _GdkCicpParams#cicp..matrix_coefficientscxx . . $ _GdkCicp#matrix_coefficients. = 2;
85 self->cicpcxx . . $ _GdkCicpParams#cicp..rangecxx . . $ _GdkCicp#range. = GDK_CICP_RANGE_NARROWcxx . . $ GDK_CICP_RANGE_NARROW.;
86 }
87
88 static void
89 gdk_cicp_params_get_propertycxx . . $ gdk_cicp_params_get_property(cee2c52f22407c66). (GObjectcxx . . $ GObject# *object,
90 guintcxx . . $ guint# property_id,
91 GValuecxx . . $ GValue# *value,
92 GParamSpeccxx . . $ GParamSpec# *pspec)
93 {
94 GdkCicpParamscxx . . $ GdkCicpParams# *self = GDK_CICP_PARAMScxx . . $ GDK_CICP_PARAMS(549fc6ce18a5f25b). (object);
95
96 switch (property_id)
97 {
98 case PROP_COLOR_PRIMARIEScxx . . $ PROP_COLOR_PRIMARIES.:
99 g_value_set_uintcxx . . $ g_value_set_uint(f81c5c84daf56975). (value, self->cicpcxx . . $ _GdkCicpParams#cicp..color_primariescxx . . $ _GdkCicp#color_primaries.);
100 break;
101
102 case PROP_TRANSFER_FUNCTIONcxx . . $ PROP_TRANSFER_FUNCTION.:
103 g_value_set_uintcxx . . $ g_value_set_uint(f81c5c84daf56975). (value, self->cicpcxx . . $ _GdkCicpParams#cicp..transfer_functioncxx . . $ _GdkCicp#transfer_function.);
104 break;
105
106 case PROP_MATRIX_COEFFICIENTScxx . . $ PROP_MATRIX_COEFFICIENTS.:
107 g_value_set_uintcxx . . $ g_value_set_uint(f81c5c84daf56975). (value, self->cicpcxx . . $ _GdkCicpParams#cicp..matrix_coefficientscxx . . $ _GdkCicp#matrix_coefficients.);
108 break;
109
110 case PROP_RANGEcxx . . $ PROP_RANGE.:
111 g_value_set_enumcxx . . $ g_value_set_enum(b698c61e8e30c4ea). (value, self->cicpcxx . . $ _GdkCicpParams#cicp..rangecxx . . $ _GdkCicp#range.);
112 break;
113
114 default:
115 G_OBJECT_WARN_INVALID_PROPERTY_IDcxx . . $ `<external>/1341695927569185362/gobject.h:690:9`! (object, property_id, pspec);
116 break;
117 }
118 }
119
120 static void
121 gdk_cicp_params_set_propertycxx . . $ gdk_cicp_params_set_property(d7c4bb29f36c0dc4). (GObjectcxx . . $ GObject# *object,
122 guintcxx . . $ guint# property_id,
123 const GValuecxx . . $ GValue# *value,
124 GParamSpeccxx . . $ GParamSpec# *pspec)
125 {
126 GdkCicpParamscxx . . $ GdkCicpParams# *self = GDK_CICP_PARAMScxx . . $ GDK_CICP_PARAMS(549fc6ce18a5f25b). (object);
127
128 switch (property_id)
129 {
130 case PROP_COLOR_PRIMARIEScxx . . $ PROP_COLOR_PRIMARIES.:
131 gdk_cicp_params_set_color_primariescxx . . $ gdk_cicp_params_set_color_primaries(b32e8aa544a2dda0). (self, g_value_get_uintcxx . . $ g_value_get_uint(1e175b1568bd83e1). (value));
132 break;
133
134 case PROP_TRANSFER_FUNCTIONcxx . . $ PROP_TRANSFER_FUNCTION.:
135 gdk_cicp_params_set_transfer_functioncxx . . $ gdk_cicp_params_set_transfer_function(b32e8aa544a2dda0). (self, g_value_get_uintcxx . . $ g_value_get_uint(1e175b1568bd83e1). (value));
136 break;
137
138 case PROP_MATRIX_COEFFICIENTScxx . . $ PROP_MATRIX_COEFFICIENTS.:
139 gdk_cicp_params_set_matrix_coefficientscxx . . $ gdk_cicp_params_set_matrix_coefficients(b32e8aa544a2dda0). (self, g_value_get_uintcxx . . $ g_value_get_uint(1e175b1568bd83e1). (value));
140 break;
141
142 case PROP_RANGEcxx . . $ PROP_RANGE.:
143 gdk_cicp_params_set_rangecxx . . $ gdk_cicp_params_set_range(b38579cf2fecac6d). (self, g_value_get_enumcxx . . $ g_value_get_enum(f890c5c75ead5b21). (value));
144 break;
145
146 default:
147 G_OBJECT_WARN_INVALID_PROPERTY_IDcxx . . $ `<external>/1341695927569185362/gobject.h:690:9`! (object, property_id, pspec);
148 break;
149 }
150 }
151
152 static void
153 gdk_cicp_params_class_initcxx . . $ gdk_cicp_params_class_init(7846fbecd994946b). (GdkCicpParamsClasscxx . . $ GdkCicpParamsClass# *klass)
154 {
155 GObjectClasscxx . . $ GObjectClass# *object_class = G_OBJECT_CLASScxx . . $ `<external>/1341695927569185362/gobject.h:61:9`! (klass);
156
157 object_class->get_propertycxx . . $ _GObjectClass#get_property. = gdk_cicp_params_get_propertycxx . . $ gdk_cicp_params_get_property(cee2c52f22407c66).;
158 object_class->set_propertycxx . . $ _GObjectClass#set_property. = gdk_cicp_params_set_propertycxx . . $ gdk_cicp_params_set_property(d7c4bb29f36c0dc4).;
159
160 /**
161 * GdkCicpParams:color-primaries:
162 *
163 * The color primaries to use.
164 *
165 * Supported values:
166 *
167 * - 1: BT.709 / sRGB
168 * - 2: unspecified
169 * - 5: PAL
170 * - 6,7: BT.601 / NTSC
171 * - 9: BT.2020
172 * - 12: Display P3
173 *
174 * Since: 4.16
175 */
176 propertiescxx . . $ properties.[PROP_COLOR_PRIMARIEScxx . . $ PROP_COLOR_PRIMARIES.] =
177 g_param_spec_uintcxx . . $ g_param_spec_uint(503a1013c8de17d5). ("color-primaries", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!,
178 0, 255, 2,
179 G_PARAM_READWRITEcxx . . $ G_PARAM_READWRITE. | G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY. | G_PARAM_STATIC_STRINGScxx . . $ `<external>/7453068347527694854/gparam.h:187:9`!);
180
181 /**
182 * GdkCicpParams:transfer-function:
183 *
184 * The transfer function to use.
185 *
186 * Supported values:
187 *
188 * - 1,6,14,15: BT.709, BT.601, BT.2020
189 * - 2: unspecified
190 * - 4: gamma 2.2
191 * - 5: gamma 2.8
192 * - 8: linear
193 * - 13: sRGB
194 * - 16: BT.2100 PQ
195 * - 18: BT.2100 HLG
196 *
197 * Since: 4.16
198 */
199 propertiescxx . . $ properties.[PROP_TRANSFER_FUNCTIONcxx . . $ PROP_TRANSFER_FUNCTION.] =
200 g_param_spec_uintcxx . . $ g_param_spec_uint(503a1013c8de17d5). ("transfer-function", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!,
201 0, 255, 2,
202 G_PARAM_READWRITEcxx . . $ G_PARAM_READWRITE. | G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY. | G_PARAM_STATIC_STRINGScxx . . $ `<external>/7453068347527694854/gparam.h:187:9`!);
203
204 /**
205 * GdkCicpParams:matrix-coefficients:
206 *
207 * The matrix coefficients (for YUV to RGB conversion).
208 *
209 * Supported values:
210 *
211 * - 0: RGB
212 * - 1: BT.709
213 * - 2: unspecified
214 * - 5,6: BT.601
215 * - 9: BT.2020
216 *
217 * Since: 4.16
218 */
219 propertiescxx . . $ properties.[PROP_MATRIX_COEFFICIENTScxx . . $ PROP_MATRIX_COEFFICIENTS.] =
220 g_param_spec_uintcxx . . $ g_param_spec_uint(503a1013c8de17d5). ("matrix-coefficients", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!,
221 0, 255, 2,
222 G_PARAM_READWRITEcxx . . $ G_PARAM_READWRITE. | G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY. | G_PARAM_STATIC_STRINGScxx . . $ `<external>/7453068347527694854/gparam.h:187:9`!);
223
224 /**
225 * GdkCicpParams:range:
226 *
227 * Whether the data is using the full range of values.
228 *
229 * The range of the data.
230 *
231 * Since: 4.16
232 */
233 propertiescxx . . $ properties.[PROP_RANGEcxx . . $ PROP_RANGE.] =
234 g_param_spec_enumcxx . . $ g_param_spec_enum(bfeb217b5dc6c0ac). ("range", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!,
235 GDK_TYPE_CICP_RANGEcxx . . $ `build/gdk/gdkenumtypes.h:15:9`!,
236 GDK_CICP_RANGE_NARROWcxx . . $ GDK_CICP_RANGE_NARROW.,
237 G_PARAM_READWRITEcxx . . $ G_PARAM_READWRITE. | G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY. | G_PARAM_STATIC_STRINGScxx . . $ `<external>/7453068347527694854/gparam.h:187:9`!);
238
239 g_object_class_install_propertiescxx . . $ g_object_class_install_properties(569d03e6a4088541). (object_class, N_PROPERTIEScxx . . $ N_PROPERTIES., propertiescxx . . $ properties.);
240 }
241
242 /* }}} */
243 /* {{{ Public API */
244
245 /**
246 * gdk_cicp_params_new:
247 *
248 * Creates a new `GdkCicpParams` object.
249 *
250 * The initial values of the properties are the values for "undefined"
251 * and need to be set before a color state object can be built.
252 *
253 * Returns: (transfer full): a new `GdkCicpParams`
254 *
255 * Since: 4.16
256 */
257 GdkCicpParamscxx . . $ GdkCicpParams# *
258 gdk_cicp_params_newcxx . . $ gdk_cicp_params_new(283c768a52b5efe). (void)
259 {
260 return g_object_newcxx . . $ g_object_new(8485fe61b4be4c78). (GDK_TYPE_CICP_PARAMScxx . . $ `gdk/gdkcicpparams.h:30:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
261 }
262
263 /**
264 * gdk_cicp_params_get_color_primaries:
265 * @self: a `GdkCicpParams`
266 *
267 * Returns the value of the color-primaries property
268 * of @self.
269 *
270 * Returns: the color-primaries value
271 *
272 * Since: 4.16
273 */
274 guintcxx . . $ guint#
275 gdk_cicp_params_get_color_primariescxx . . $ gdk_cicp_params_get_color_primaries(4843a16528cb1709). (GdkCicpParamscxx . . $ GdkCicpParams# *self)
276 {
277 g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GDK_IS_CICP_PARAMS (self), 0);
278
279 return self->cicpcxx . . $ _GdkCicpParams#cicp..color_primariescxx . . $ _GdkCicp#color_primaries.;
280 }
281
282 /**
283 * gdk_cicp_params_set_color_primaries:
284 * @self: a `GdkCicpParams`
285 * @color_primaries: the new color primaries value
286 *
287 * Sets the color-primaries property of @self.
288 *
289 * Since: 4.16
290 */
291 void
292 gdk_cicp_params_set_color_primariescxx . . $ gdk_cicp_params_set_color_primaries(b32e8aa544a2dda0). (GdkCicpParamscxx . . $ GdkCicpParams# *self,
293 guintcxx . . $ guint# color_primaries)
294 {
295 g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GDK_IS_CICP_PARAMS (self));
296
297 if (self->cicpcxx . . $ _GdkCicpParams#cicp..color_primariescxx . . $ _GdkCicp#color_primaries. == color_primaries)
298 return;
299
300 self->cicpcxx . . $ _GdkCicpParams#cicp..color_primariescxx . . $ _GdkCicp#color_primaries. = color_primaries;
301 g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), propertiescxx . . $ properties.[PROP_COLOR_PRIMARIEScxx . . $ PROP_COLOR_PRIMARIES.]);
302 }
303
304 /**
305 * gdk_cicp_params_get_transfer_function:
306 * @self: a `GdkCicpParams`
307 *
308 * Gets the transfer-function property of @self.
309 *
310 * Returns: the transfer-function value
311 *
312 * Since: 4.16
313 */
314 guintcxx . . $ guint#
315 gdk_cicp_params_get_transfer_functioncxx . . $ gdk_cicp_params_get_transfer_function(4843a16528cb1709). (GdkCicpParamscxx . . $ GdkCicpParams# *self)
316 {
317 g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GDK_IS_CICP_PARAMS (self), 0);
318
319 return self->cicpcxx . . $ _GdkCicpParams#cicp..transfer_functioncxx . . $ _GdkCicp#transfer_function.;
320 }
321
322 /**
323 * gdk_cicp_params_set_transfer_function:
324 * @self: a `GdkCicpParams`
325 * @transfer_function: the new transfer-function value
326 *
327 * Sets the transfer-function property of @self.
328 *
329 * Since: 4.16
330 */
331 void
332 gdk_cicp_params_set_transfer_functioncxx . . $ gdk_cicp_params_set_transfer_function(b32e8aa544a2dda0). (GdkCicpParamscxx . . $ GdkCicpParams# *self,
333 guintcxx . . $ guint# transfer_function)
334 {
335 g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GDK_IS_CICP_PARAMS (self));
336
337 if (self->cicpcxx . . $ _GdkCicpParams#cicp..transfer_functioncxx . . $ _GdkCicp#transfer_function. == transfer_function)
338 return;
339
340 self->cicpcxx . . $ _GdkCicpParams#cicp..transfer_functioncxx . . $ _GdkCicp#transfer_function. = transfer_function;
341 g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), propertiescxx . . $ properties.[PROP_TRANSFER_FUNCTIONcxx . . $ PROP_TRANSFER_FUNCTION.]);
342 }
343
344 /**
345 * gdk_cicp_params_get_matrix_coefficients:
346 * @self: a `GdkCicpParams`
347 *
348 * Gets the matrix-coefficients property of @self.
349 *
350 * Returns: the matrix-coefficients value
351 *
352 * Since: 4.16
353 */
354 guintcxx . . $ guint#
355 gdk_cicp_params_get_matrix_coefficientscxx . . $ gdk_cicp_params_get_matrix_coefficients(4843a16528cb1709). (GdkCicpParamscxx . . $ GdkCicpParams# *self)
356 {
357 g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GDK_IS_CICP_PARAMS (self), 0);
358
359 return self->cicpcxx . . $ _GdkCicpParams#cicp..matrix_coefficientscxx . . $ _GdkCicp#matrix_coefficients.;
360 }
361
362 /**
363 * gdk_cicp_params_set_matrix_coefficients:
364 * @self a `GdkCicpParams`
365 * @matrix_coefficients: the new matrix-coefficients value
366 *
367 * Sets the matrix-coefficients property of @self.
368 *
369 * Since: 4.16
370 */
371 void
372 gdk_cicp_params_set_matrix_coefficientscxx . . $ gdk_cicp_params_set_matrix_coefficients(b32e8aa544a2dda0). (GdkCicpParamscxx . . $ GdkCicpParams# *self,
373 guintcxx . . $ guint# matrix_coefficients)
374 {
375 g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GDK_IS_CICP_PARAMS (self));
376
377 if (self->cicpcxx . . $ _GdkCicpParams#cicp..matrix_coefficientscxx . . $ _GdkCicp#matrix_coefficients. == matrix_coefficients)
378 return;
379
380 self->cicpcxx . . $ _GdkCicpParams#cicp..matrix_coefficientscxx . . $ _GdkCicp#matrix_coefficients. = matrix_coefficients;
381 g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), propertiescxx . . $ properties.[PROP_MATRIX_COEFFICIENTScxx . . $ PROP_MATRIX_COEFFICIENTS.]);
382 }
383
384 /**
385 * gdk_cicp_params_get_range:
386 * @self: a `GdkCicpParams`
387 *
388 * Gets the range property of @self.
389 *
390 * Returns: the range value
391 *
392 * Since: 4.16
393 */
394 GdkCicpRangecxx . . $ GdkCicpRange#
395 gdk_cicp_params_get_rangecxx . . $ gdk_cicp_params_get_range(41154c75d0716448). (GdkCicpParamscxx . . $ GdkCicpParams# *self)
396 {
397 g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GDK_IS_CICP_PARAMS (self), GDK_CICP_RANGE_NARROW);
398
399 return self->cicpcxx . . $ _GdkCicpParams#cicp..rangecxx . . $ _GdkCicp#range.;
400 }
401
402 /**
403 * gdk_cicp_params_set_range:
404 * @self: a `GdkCipParams`
405 * @range: the range value
406 *
407 * Sets the range property of @self
408 *
409 * Since: 4.16
410 */
411 void
412 gdk_cicp_params_set_rangecxx . . $ gdk_cicp_params_set_range(b38579cf2fecac6d). (GdkCicpParamscxx . . $ GdkCicpParams# *self,
413 GdkCicpRangecxx . . $ GdkCicpRange# range)
414 {
415 g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GDK_IS_CICP_PARAMS (self));
416
417 if (self->cicpcxx . . $ _GdkCicpParams#cicp..rangecxx . . $ _GdkCicp#range. == range)
418 return;
419
420 self->cicpcxx . . $ _GdkCicpParams#cicp..rangecxx . . $ _GdkCicp#range. = range;
421 g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), propertiescxx . . $ properties.[PROP_RANGEcxx . . $ PROP_RANGE.]);
422 }
423
424 /**
425 * gdk_cicp_params_build_color_state:
426 * @self: a `GdkCicpParams`
427 * @error: return location for errors
428 *
429 * Creates a new `GdkColorState` object for the cicp parameters in @self.
430 *
431 * Note that this may fail if the cicp parameters in @self are not
432 * supported by GTK. In that case, `NULL` is returned, and @error is set
433 * with an error message that can be presented to the user.
434 *
435 * Returns: (transfer full): A newly allocated `GdkColorState`
436 *
437 * Since: 4.16
438 */
439 GdkColorStatecxx . . $ GdkColorState# *
440 gdk_cicp_params_build_color_statecxx . . $ gdk_cicp_params_build_color_state(ce9d53891677d071). (GdkCicpParamscxx . . $ GdkCicpParams# *self,
441 GErrorcxx . . $ GError# **error)
442 {
443 return gdk_color_state_new_for_cicpcxx . . $ gdk_color_state_new_for_cicp(95753207f9c0d5a3). (gdk_cicp_params_get_cicpcxx . . $ gdk_cicp_params_get_cicp(217bd51cabe24ef4). (self), error);
444 }
445
446 /* }}} */
447 /* {{{ Private API */
448
449 /*< private >
450 * gdk_cicp_params_new_for_cicp:
451 * @cicp: a GdkCicp struct
452 *
453 * Create a `GdkCicpParams` from the values in @cicp.
454 *
455 * Returns: (transfer full): a new `GdkCicpParams` object
456 */
457 GdkCicpParamscxx . . $ GdkCicpParams# *
458 gdk_cicp_params_new_for_cicpcxx . . $ gdk_cicp_params_new_for_cicp(d4314b29da1b79d). (const GdkCicpcxx . . $ GdkCicp# *cicp)
459 {
460 return g_object_newcxx . . $ g_object_new(8485fe61b4be4c78). (GDK_TYPE_CICP_PARAMScxx . . $ `gdk/gdkcicpparams.h:30:9`!,
461 "color-primaries", cicp->color_primariescxx . . $ _GdkCicp#color_primaries.,
462 "transfer-function", cicp->transfer_functioncxx . . $ _GdkCicp#transfer_function.,
463 "matrix-coefficients", cicp->matrix_coefficientscxx . . $ _GdkCicp#matrix_coefficients.,
464 "range", cicp->rangecxx . . $ _GdkCicp#range.,
465 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
466 }
467
468 /*< private >
469 * gdk_cicp_params_get_cicp:
470 * @self: a `GdkCicpParams` object
471 *
472 * Gets the `GdkCicp` struct of @self.
473 *
474 * Returns: (transfer none): a `GdkCicp` struct containing
475 * the values of @self
476 */
477 const GdkCicpcxx . . $ GdkCicp# *
478 gdk_cicp_params_get_cicpcxx . . $ gdk_cicp_params_get_cicp(217bd51cabe24ef4). (GdkCicpParamscxx . . $ GdkCicpParams# *self)
479 {
480 return &self->cicpcxx . . $ _GdkCicpParams#cicp.;
481 }
482
483 /* }}} */
484
485 /* vim:set foldmethod=marker: */