1 /* GObject - GLib Type, Object, Parameter and Signal Library
2 * Copyright (C) 1997-1999, 2000-2001 Tim Janik and Red Hat, Inc.
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General
15 * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
17 * gparamspecs.h: GLib default param specs
19 #ifndef __G_PARAMSPECS_H__
20 #define __G_PARAMSPECS_H__
22 #if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION)
23 #error "Only <glib-object.h> can be included directly."
26 #include <gobject/gvalue.h>
27 #include <gobject/genums.h>
28 #include <gobject/gboxed.h>
29 #include <gobject/gobject.h>
33 /* --- type macros --- */
37 * The #GType of #GParamSpecChar.
39 #define G_TYPE_PARAM_CHAR (g_param_spec_types[0])
41 * G_IS_PARAM_SPEC_CHAR:
42 * @pspec: a valid #GParamSpec instance
44 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_CHAR.
46 * Returns: %TRUE on success.
48 #define G_IS_PARAM_SPEC_CHAR(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_CHAR))
51 * @pspec: a valid #GParamSpec instance
53 * Cast a #GParamSpec instance into a #GParamSpecChar.
55 #define G_PARAM_SPEC_CHAR(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_CHAR, GParamSpecChar))
60 * The #GType of #GParamSpecUChar.
62 #define G_TYPE_PARAM_UCHAR (g_param_spec_types[1])
64 * G_IS_PARAM_SPEC_UCHAR:
65 * @pspec: a valid #GParamSpec instance
67 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UCHAR.
69 * Returns: %TRUE on success.
71 #define G_IS_PARAM_SPEC_UCHAR(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UCHAR))
74 * @pspec: a valid #GParamSpec instance
76 * Cast a #GParamSpec instance into a #GParamSpecUChar.
78 #define G_PARAM_SPEC_UCHAR(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UCHAR, GParamSpecUChar))
81 * G_TYPE_PARAM_BOOLEAN:
83 * The #GType of #GParamSpecBoolean.
85 #define G_TYPE_PARAM_BOOLEAN (g_param_spec_types[2])
87 * G_IS_PARAM_SPEC_BOOLEAN:
88 * @pspec: a valid #GParamSpec instance
90 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_BOOLEAN.
92 * Returns: %TRUE on success.
94 #define G_IS_PARAM_SPEC_BOOLEAN(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_BOOLEAN))
96 * G_PARAM_SPEC_BOOLEAN:
97 * @pspec: a valid #GParamSpec instance
99 * Cast a #GParamSpec instance into a #GParamSpecBoolean.
101 #define G_PARAM_SPEC_BOOLEAN(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_BOOLEAN, GParamSpecBoolean))
106 * The #GType of #GParamSpecInt.
108 #define G_TYPE_PARAM_INT (g_param_spec_types[3])
110 * G_IS_PARAM_SPEC_INT:
111 * @pspec: a valid #GParamSpec instance
113 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_INT.
115 * Returns: %TRUE on success.
117 #define G_IS_PARAM_SPEC_INT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_INT))
120 * @pspec: a valid #GParamSpec instance
122 * Cast a #GParamSpec instance into a #GParamSpecInt.
124 #define G_PARAM_SPEC_INT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_INT, GParamSpecInt))
129 * The #GType of #GParamSpecUInt.
131 #define G_TYPE_PARAM_UINT (g_param_spec_types[4])
133 * G_IS_PARAM_SPEC_UINT:
134 * @pspec: a valid #GParamSpec instance
136 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UINT.
138 * Returns: %TRUE on success.
140 #define G_IS_PARAM_SPEC_UINT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UINT))
143 * @pspec: a valid #GParamSpec instance
145 * Cast a #GParamSpec instance into a #GParamSpecUInt.
147 #define G_PARAM_SPEC_UINT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UINT, GParamSpecUInt))
152 * The #GType of #GParamSpecLong.
154 #define G_TYPE_PARAM_LONG (g_param_spec_types[5])
156 * G_IS_PARAM_SPEC_LONG:
157 * @pspec: a valid #GParamSpec instance
159 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_LONG.
161 * Returns: %TRUE on success.
163 #define G_IS_PARAM_SPEC_LONG(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_LONG))
166 * @pspec: a valid #GParamSpec instance
168 * Cast a #GParamSpec instance into a #GParamSpecLong.
170 #define G_PARAM_SPEC_LONG(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_LONG, GParamSpecLong))
173 * G_TYPE_PARAM_ULONG:
175 * The #GType of #GParamSpecULong.
177 #define G_TYPE_PARAM_ULONG (g_param_spec_types[6])
179 * G_IS_PARAM_SPEC_ULONG:
180 * @pspec: a valid #GParamSpec instance
182 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_ULONG.
184 * Returns: %TRUE on success.
186 #define G_IS_PARAM_SPEC_ULONG(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_ULONG))
188 * G_PARAM_SPEC_ULONG:
189 * @pspec: a valid #GParamSpec instance
191 * Cast a #GParamSpec instance into a #GParamSpecULong.
193 #define G_PARAM_SPEC_ULONG(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_ULONG, GParamSpecULong))
196 * G_TYPE_PARAM_INT64:
198 * The #GType of #GParamSpecInt64.
200 #define G_TYPE_PARAM_INT64 (g_param_spec_types[7])
202 * G_IS_PARAM_SPEC_INT64:
203 * @pspec: a valid #GParamSpec instance
205 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_INT64.
207 * Returns: %TRUE on success.
209 #define G_IS_PARAM_SPEC_INT64(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_INT64))
211 * G_PARAM_SPEC_INT64:
212 * @pspec: a valid #GParamSpec instance
214 * Cast a #GParamSpec instance into a #GParamSpecInt64.
216 #define G_PARAM_SPEC_INT64(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_INT64, GParamSpecInt64))
219 * G_TYPE_PARAM_UINT64:
221 * The #GType of #GParamSpecUInt64.
223 #define G_TYPE_PARAM_UINT64 (g_param_spec_types[8])
225 * G_IS_PARAM_SPEC_UINT64:
226 * @pspec: a valid #GParamSpec instance
228 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UINT64.
230 * Returns: %TRUE on success.
232 #define G_IS_PARAM_SPEC_UINT64(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UINT64))
234 * G_PARAM_SPEC_UINT64:
235 * @pspec: a valid #GParamSpec instance
237 * Cast a #GParamSpec instance into a #GParamSpecUInt64.
239 #define G_PARAM_SPEC_UINT64(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UINT64, GParamSpecUInt64))
242 * G_TYPE_PARAM_UNICHAR:
244 * The #GType of #GParamSpecUnichar.
246 #define G_TYPE_PARAM_UNICHAR (g_param_spec_types[9])
248 * G_PARAM_SPEC_UNICHAR:
249 * @pspec: a valid #GParamSpec instance
251 * Cast a #GParamSpec instance into a #GParamSpecUnichar.
253 #define G_PARAM_SPEC_UNICHAR(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UNICHAR, GParamSpecUnichar))
255 * G_IS_PARAM_SPEC_UNICHAR:
256 * @pspec: a valid #GParamSpec instance
258 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UNICHAR.
260 * Returns: %TRUE on success.
262 #define G_IS_PARAM_SPEC_UNICHAR(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UNICHAR))
267 * The #GType of #GParamSpecEnum.
269 #define G_TYPE_PARAM_ENUM (g_param_spec_types[10])
271 * G_IS_PARAM_SPEC_ENUM:
272 * @pspec: a valid #GParamSpec instance
274 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_ENUM.
276 * Returns: %TRUE on success.
278 #define G_IS_PARAM_SPEC_ENUM(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_ENUM))
281 * @pspec: a valid #GParamSpec instance
283 * Cast a #GParamSpec instance into a #GParamSpecEnum.
285 #define G_PARAM_SPEC_ENUM(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_ENUM, GParamSpecEnum))
288 * G_TYPE_PARAM_FLAGS:
290 * The #GType of #GParamSpecFlags.
292 #define G_TYPE_PARAM_FLAGS (g_param_spec_types[11])
294 * G_IS_PARAM_SPEC_FLAGS:
295 * @pspec: a valid #GParamSpec instance
297 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_FLAGS.
299 * Returns: %TRUE on success.
301 #define G_IS_PARAM_SPEC_FLAGS(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_FLAGS))
303 * G_PARAM_SPEC_FLAGS:
304 * @pspec: a valid #GParamSpec instance
306 * Cast a #GParamSpec instance into a #GParamSpecFlags.
308 #define G_PARAM_SPEC_FLAGS(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_FLAGS, GParamSpecFlags))
311 * G_TYPE_PARAM_FLOAT:
313 * The #GType of #GParamSpecFloat.
315 #define G_TYPE_PARAM_FLOAT (g_param_spec_types[12])
317 * G_IS_PARAM_SPEC_FLOAT:
318 * @pspec: a valid #GParamSpec instance
320 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_FLOAT.
322 * Returns: %TRUE on success.
324 #define G_IS_PARAM_SPEC_FLOAT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_FLOAT))
326 * G_PARAM_SPEC_FLOAT:
327 * @pspec: a valid #GParamSpec instance
329 * Cast a #GParamSpec instance into a #GParamSpecFloat.
331 #define G_PARAM_SPEC_FLOAT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_FLOAT, GParamSpecFloat))
334 * G_TYPE_PARAM_DOUBLE:
336 * The #GType of #GParamSpecDouble.
338 #define G_TYPE_PARAM_DOUBLE (g_param_spec_types[13])
340 * G_IS_PARAM_SPEC_DOUBLE:
341 * @pspec: a valid #GParamSpec instance
343 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_DOUBLE.
345 * Returns: %TRUE on success.
347 #define G_IS_PARAM_SPEC_DOUBLE(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_DOUBLE))
349 * G_PARAM_SPEC_DOUBLE:
350 * @pspec: a valid #GParamSpec instance
352 * Cast a #GParamSpec instance into a #GParamSpecDouble.
354 #define G_PARAM_SPEC_DOUBLE(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_DOUBLE, GParamSpecDouble))
357 * G_TYPE_PARAM_STRING:
359 * The #GType of #GParamSpecString.
361 #define G_TYPE_PARAM_STRING (g_param_spec_types[14])
363 * G_IS_PARAM_SPEC_STRING:
364 * @pspec: a valid #GParamSpec instance
366 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_STRING.
368 * Returns: %TRUE on success.
370 #define G_IS_PARAM_SPEC_STRING(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_STRING))
372 * G_PARAM_SPEC_STRING:
373 * @pspec: a valid #GParamSpec instance
375 * Casts a #GParamSpec instance into a #GParamSpecString.
377 #define G_PARAM_SPEC_STRING(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_STRING, GParamSpecString))
380 * G_TYPE_PARAM_PARAM:
382 * The #GType of #GParamSpecParam.
384 #define G_TYPE_PARAM_PARAM (g_param_spec_types[15])
386 * G_IS_PARAM_SPEC_PARAM:
387 * @pspec: a valid #GParamSpec instance
389 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_PARAM.
391 * Returns: %TRUE on success.
393 #define G_IS_PARAM_SPEC_PARAM(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_PARAM))
395 * G_PARAM_SPEC_PARAM:
396 * @pspec: a valid #GParamSpec instance
398 * Casts a #GParamSpec instance into a #GParamSpecParam.
400 #define G_PARAM_SPEC_PARAM(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_PARAM, GParamSpecParam))
403 * G_TYPE_PARAM_BOXED:
405 * The #GType of #GParamSpecBoxed.
407 #define G_TYPE_PARAM_BOXED (g_param_spec_types[16])
409 * G_IS_PARAM_SPEC_BOXED:
410 * @pspec: a valid #GParamSpec instance
412 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_BOXED.
414 * Returns: %TRUE on success.
416 #define G_IS_PARAM_SPEC_BOXED(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_BOXED))
418 * G_PARAM_SPEC_BOXED:
419 * @pspec: a valid #GParamSpec instance
421 * Cast a #GParamSpec instance into a #GParamSpecBoxed.
423 #define G_PARAM_SPEC_BOXED(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_BOXED, GParamSpecBoxed))
426 * G_TYPE_PARAM_POINTER:
428 * The #GType of #GParamSpecPointer.
430 #define G_TYPE_PARAM_POINTER (g_param_spec_types[17])
432 * G_IS_PARAM_SPEC_POINTER:
433 * @pspec: a valid #GParamSpec instance
435 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_POINTER.
437 * Returns: %TRUE on success.
439 #define G_IS_PARAM_SPEC_POINTER(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_POINTER))
441 * G_PARAM_SPEC_POINTER:
442 * @pspec: a valid #GParamSpec instance
444 * Casts a #GParamSpec instance into a #GParamSpecPointer.
446 #define G_PARAM_SPEC_POINTER(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_POINTER, GParamSpecPointer))
449 * G_TYPE_PARAM_VALUE_ARRAY:
451 * The #GType of #GParamSpecValueArray.
453 * Deprecated: 2.32: Use #GArray instead of #GValueArray
455 #define G_TYPE_PARAM_VALUE_ARRAY (g_param_spec_types[18])
457 * G_IS_PARAM_SPEC_VALUE_ARRAY:
458 * @pspec: a valid #GParamSpec instance
460 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_VALUE_ARRAY.
462 * Returns: %TRUE on success.
464 * Deprecated: 2.32: Use #GArray instead of #GValueArray
466 #define G_IS_PARAM_SPEC_VALUE_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_VALUE_ARRAY))
468 * G_PARAM_SPEC_VALUE_ARRAY:
469 * @pspec: a valid #GParamSpec instance
471 * Cast a #GParamSpec instance into a #GParamSpecValueArray.
473 * Deprecated: 2.32: Use #GArray instead of #GValueArray
475 #define G_PARAM_SPEC_VALUE_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_VALUE_ARRAY, GParamSpecValueArray))
478 * G_TYPE_PARAM_OBJECT:
480 * The #GType of #GParamSpecObject.
482 #define G_TYPE_PARAM_OBJECT (g_param_spec_types[19])
484 * G_IS_PARAM_SPEC_OBJECT:
485 * @pspec: a valid #GParamSpec instance
487 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_OBJECT.
489 * Returns: %TRUE on success.
491 #define G_IS_PARAM_SPEC_OBJECT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_OBJECT))
493 * G_PARAM_SPEC_OBJECT:
494 * @pspec: a valid #GParamSpec instance
496 * Casts a #GParamSpec instance into a #GParamSpecObject.
498 #define G_PARAM_SPEC_OBJECT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_OBJECT, GParamSpecObject))
501 * G_TYPE_PARAM_OVERRIDE:
503 * The #GType of #GParamSpecOverride.
507 #define G_TYPE_PARAM_OVERRIDE (g_param_spec_types[20])
509 * G_IS_PARAM_SPEC_OVERRIDE:
510 * @pspec: a #GParamSpec
512 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_OVERRIDE.
515 * Returns: %TRUE on success.
517 #define G_IS_PARAM_SPEC_OVERRIDE(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_OVERRIDE))
519 * G_PARAM_SPEC_OVERRIDE:
520 * @pspec: a #GParamSpec
522 * Casts a #GParamSpec into a #GParamSpecOverride.
526 #define G_PARAM_SPEC_OVERRIDE(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_OVERRIDE, GParamSpecOverride))
529 * G_TYPE_PARAM_GTYPE:
531 * The #GType of #GParamSpecGType.
535 #define G_TYPE_PARAM_GTYPE (g_param_spec_types[21])
537 * G_IS_PARAM_SPEC_GTYPE:
538 * @pspec: a #GParamSpec
540 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_GTYPE.
543 * Returns: %TRUE on success.
545 #define G_IS_PARAM_SPEC_GTYPE(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_GTYPE))
547 * G_PARAM_SPEC_GTYPE:
548 * @pspec: a #GParamSpec
550 * Casts a #GParamSpec into a #GParamSpecGType.
554 #define G_PARAM_SPEC_GTYPE(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_GTYPE, GParamSpecGType))
557 * G_TYPE_PARAM_VARIANT:
559 * The #GType of #GParamSpecVariant.
563 #define G_TYPE_PARAM_VARIANT (g_param_spec_types[22])
565 * G_IS_PARAM_SPEC_VARIANT:
566 * @pspec: a #GParamSpec
568 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_VARIANT.
570 * Returns: %TRUE on success
574 #define G_IS_PARAM_SPEC_VARIANT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_VARIANT))
576 * G_PARAM_SPEC_VARIANT:
577 * @pspec: a #GParamSpec
579 * Casts a #GParamSpec into a #GParamSpecVariant.
583 #define G_PARAM_SPEC_VARIANT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_VARIANT, GParamSpecVariant))
585 /* --- typedefs & structures --- */
586 typedef struct _GParamSpecChar GParamSpecChar
;
587 typedef struct _GParamSpecUChar GParamSpecUChar
;
588 typedef struct _GParamSpecBoolean GParamSpecBoolean
;
589 typedef struct _GParamSpecInt GParamSpecInt
;
590 typedef struct _GParamSpecUInt GParamSpecUInt
;
591 typedef struct _GParamSpecLong GParamSpecLong
;
592 typedef struct _GParamSpecULong GParamSpecULong
;
593 typedef struct _GParamSpecInt64 GParamSpecInt64
;
594 typedef struct _GParamSpecUInt64 GParamSpecUInt64
;
595 typedef struct _GParamSpecUnichar GParamSpecUnichar
;
596 typedef struct _GParamSpecEnum GParamSpecEnum
;
597 typedef struct _GParamSpecFlags GParamSpecFlags
;
598 typedef struct _GParamSpecFloat GParamSpecFloat
;
599 typedef struct _GParamSpecDouble GParamSpecDouble
;
600 typedef struct _GParamSpecString GParamSpecString
;
601 typedef struct _GParamSpecParam GParamSpecParam
;
602 typedef struct _GParamSpecBoxed GParamSpecBoxed
;
603 typedef struct _GParamSpecPointer GParamSpecPointer
;
604 typedef struct _GParamSpecValueArray GParamSpecValueArray
;
605 typedef struct _GParamSpecObject GParamSpecObject
;
606 typedef struct _GParamSpecOverride GParamSpecOverride
;
607 typedef struct _GParamSpecGType GParamSpecGType
;
608 typedef struct _GParamSpecVariant GParamSpecVariant
;
612 * @parent_instance: private #GParamSpec portion
613 * @minimum: minimum value for the property specified
614 * @maximum: maximum value for the property specified
615 * @default_value: default value for the property specified
617 * A #GParamSpec derived structure that contains the meta data for character properties.
619 struct _GParamSpecChar
621 GParamSpec parent_instance
;
629 * @parent_instance: private #GParamSpec portion
630 * @minimum: minimum value for the property specified
631 * @maximum: maximum value for the property specified
632 * @default_value: default value for the property specified
634 * A #GParamSpec derived structure that contains the meta data for unsigned character properties.
636 struct _GParamSpecUChar
638 GParamSpec parent_instance
;
642 guint8 default_value
;
646 * @parent_instance: private #GParamSpec portion
647 * @default_value: default value for the property specified
649 * A #GParamSpec derived structure that contains the meta data for boolean properties.
651 struct _GParamSpecBoolean
653 GParamSpec parent_instance
;
655 gboolean default_value
;
659 * @parent_instance: private #GParamSpec portion
660 * @minimum: minimum value for the property specified
661 * @maximum: maximum value for the property specified
662 * @default_value: default value for the property specified
664 * A #GParamSpec derived structure that contains the meta data for integer properties.
666 struct _GParamSpecInt
668 GParamSpec parent_instance
;
676 * @parent_instance: private #GParamSpec portion
677 * @minimum: minimum value for the property specified
678 * @maximum: maximum value for the property specified
679 * @default_value: default value for the property specified
681 * A #GParamSpec derived structure that contains the meta data for unsigned integer properties.
683 struct _GParamSpecUInt
685 GParamSpec parent_instance
;
693 * @parent_instance: private #GParamSpec portion
694 * @minimum: minimum value for the property specified
695 * @maximum: maximum value for the property specified
696 * @default_value: default value for the property specified
698 * A #GParamSpec derived structure that contains the meta data for long integer properties.
700 struct _GParamSpecLong
702 GParamSpec parent_instance
;
710 * @parent_instance: private #GParamSpec portion
711 * @minimum: minimum value for the property specified
712 * @maximum: maximum value for the property specified
713 * @default_value: default value for the property specified
715 * A #GParamSpec derived structure that contains the meta data for unsigned long integer properties.
717 struct _GParamSpecULong
719 GParamSpec parent_instance
;
723 gulong default_value
;
727 * @parent_instance: private #GParamSpec portion
728 * @minimum: minimum value for the property specified
729 * @maximum: maximum value for the property specified
730 * @default_value: default value for the property specified
732 * A #GParamSpec derived structure that contains the meta data for 64bit integer properties.
734 struct _GParamSpecInt64
736 GParamSpec parent_instance
;
740 gint64 default_value
;
744 * @parent_instance: private #GParamSpec portion
745 * @minimum: minimum value for the property specified
746 * @maximum: maximum value for the property specified
747 * @default_value: default value for the property specified
749 * A #GParamSpec derived structure that contains the meta data for unsigned 64bit integer properties.
751 struct _GParamSpecUInt64
753 GParamSpec parent_instance
;
757 guint64 default_value
;
761 * @parent_instance: private #GParamSpec portion
762 * @default_value: default value for the property specified
764 * A #GParamSpec derived structure that contains the meta data for unichar (unsigned integer) properties.
766 struct _GParamSpecUnichar
768 GParamSpec parent_instance
;
770 gunichar default_value
;
774 * @parent_instance: private #GParamSpec portion
775 * @enum_class: the #GEnumClass for the enum
776 * @default_value: default value for the property specified
778 * A #GParamSpec derived structure that contains the meta data for enum
781 struct _GParamSpecEnum
783 GParamSpec parent_instance
;
785 GEnumClass
*enum_class
;
790 * @parent_instance: private #GParamSpec portion
791 * @flags_class: the #GFlagsClass for the flags
792 * @default_value: default value for the property specified
794 * A #GParamSpec derived structure that contains the meta data for flags
797 struct _GParamSpecFlags
799 GParamSpec parent_instance
;
801 GFlagsClass
*flags_class
;
806 * @parent_instance: private #GParamSpec portion
807 * @minimum: minimum value for the property specified
808 * @maximum: maximum value for the property specified
809 * @default_value: default value for the property specified
810 * @epsilon: values closer than @epsilon will be considered identical
811 * by g_param_values_cmp(); the default value is 1e-30.
813 * A #GParamSpec derived structure that contains the meta data for float properties.
815 struct _GParamSpecFloat
817 GParamSpec parent_instance
;
821 gfloat default_value
;
826 * @parent_instance: private #GParamSpec portion
827 * @minimum: minimum value for the property specified
828 * @maximum: maximum value for the property specified
829 * @default_value: default value for the property specified
830 * @epsilon: values closer than @epsilon will be considered identical
831 * by g_param_values_cmp(); the default value is 1e-90.
833 * A #GParamSpec derived structure that contains the meta data for double properties.
835 struct _GParamSpecDouble
837 GParamSpec parent_instance
;
841 gdouble default_value
;
846 * @parent_instance: private #GParamSpec portion
847 * @default_value: default value for the property specified
848 * @cset_first: a string containing the allowed values for the first byte
849 * @cset_nth: a string containing the allowed values for the subsequent bytes
850 * @substitutor: the replacement byte for bytes which don't match @cset_first or @cset_nth.
851 * @null_fold_if_empty: replace empty string by %NULL
852 * @ensure_non_null: replace %NULL strings by an empty string
854 * A #GParamSpec derived structure that contains the meta data for string
857 struct _GParamSpecString
859 GParamSpec parent_instance
;
861 gchar
*default_value
;
865 guint null_fold_if_empty
: 1;
866 guint ensure_non_null
: 1;
870 * @parent_instance: private #GParamSpec portion
872 * A #GParamSpec derived structure that contains the meta data for %G_TYPE_PARAM
875 struct _GParamSpecParam
877 GParamSpec parent_instance
;
881 * @parent_instance: private #GParamSpec portion
883 * A #GParamSpec derived structure that contains the meta data for boxed properties.
885 struct _GParamSpecBoxed
887 GParamSpec parent_instance
;
891 * @parent_instance: private #GParamSpec portion
893 * A #GParamSpec derived structure that contains the meta data for pointer properties.
895 struct _GParamSpecPointer
897 GParamSpec parent_instance
;
900 * GParamSpecValueArray:
901 * @parent_instance: private #GParamSpec portion
902 * @element_spec: a #GParamSpec describing the elements contained in arrays of this property, may be %NULL
903 * @fixed_n_elements: if greater than 0, arrays of this property will always have this many elements
905 * A #GParamSpec derived structure that contains the meta data for #GValueArray properties.
907 struct _GParamSpecValueArray
909 GParamSpec parent_instance
;
910 GParamSpec
*element_spec
;
911 guint fixed_n_elements
;
915 * @parent_instance: private #GParamSpec portion
917 * A #GParamSpec derived structure that contains the meta data for object properties.
919 struct _GParamSpecObject
921 GParamSpec parent_instance
;
924 * GParamSpecOverride:
926 * This is a type of #GParamSpec type that simply redirects operations to
927 * another paramspec. All operations other than getting or
928 * setting the value are redirected, including accessing the nick and
929 * blurb, validating a value, and so forth. See
930 * g_param_spec_get_redirect_target() for retrieving the overidden
931 * property. #GParamSpecOverride is used in implementing
932 * g_object_class_override_property(), and will not be directly useful
933 * unless you are implementing a new base type similar to GObject.
937 struct _GParamSpecOverride
940 GParamSpec parent_instance
;
941 GParamSpec
*overridden
;
945 * @parent_instance: private #GParamSpec portion
946 * @is_a_type: a #GType whose subtypes can occur as values
948 * A #GParamSpec derived structure that contains the meta data for #GType properties.
952 struct _GParamSpecGType
954 GParamSpec parent_instance
;
959 * @parent_instance: private #GParamSpec portion
960 * @type: a #GVariantType, or %NULL
961 * @default_value: a #GVariant, or %NULL
963 * A #GParamSpec derived structure that contains the meta data for #GVariant properties.
965 * When comparing values with g_param_values_cmp(), scalar values with the same
966 * type will be compared with g_variant_compare(). Other non-%NULL variants will
967 * be checked for equality with g_variant_equal(), and their sort order is
968 * otherwise undefined. %NULL is ordered before non-%NULL variants. Two %NULL
969 * values compare equal.
973 struct _GParamSpecVariant
975 GParamSpec parent_instance
;
977 GVariant
*default_value
;
983 /* --- GParamSpec prototypes --- */
984 GLIB_AVAILABLE_IN_ALL
985 GParamSpec
* g_param_spec_char (const gchar
*name
,
992 GLIB_AVAILABLE_IN_ALL
993 GParamSpec
* g_param_spec_uchar (const gchar
*name
,
998 guint8 default_value
,
1000 GLIB_AVAILABLE_IN_ALL
1001 GParamSpec
* g_param_spec_boolean (const gchar
*name
,
1004 gboolean default_value
,
1006 GLIB_AVAILABLE_IN_ALL
1007 GParamSpec
* g_param_spec_int (const gchar
*name
,
1014 GLIB_AVAILABLE_IN_ALL
1015 GParamSpec
* g_param_spec_uint (const gchar
*name
,
1020 guint default_value
,
1022 GLIB_AVAILABLE_IN_ALL
1023 GParamSpec
* g_param_spec_long (const gchar
*name
,
1028 glong default_value
,
1030 GLIB_AVAILABLE_IN_ALL
1031 GParamSpec
* g_param_spec_ulong (const gchar
*name
,
1036 gulong default_value
,
1038 GLIB_AVAILABLE_IN_ALL
1039 GParamSpec
* g_param_spec_int64 (const gchar
*name
,
1044 gint64 default_value
,
1046 GLIB_AVAILABLE_IN_ALL
1047 GParamSpec
* g_param_spec_uint64 (const gchar
*name
,
1052 guint64 default_value
,
1054 GLIB_AVAILABLE_IN_ALL
1055 GParamSpec
* g_param_spec_unichar (const gchar
*name
,
1058 gunichar default_value
,
1060 GLIB_AVAILABLE_IN_ALL
1061 GParamSpec
* g_param_spec_enum (const gchar
*name
,
1067 GLIB_AVAILABLE_IN_ALL
1068 GParamSpec
* g_param_spec_flags (const gchar
*name
,
1072 guint default_value
,
1074 GLIB_AVAILABLE_IN_ALL
1075 GParamSpec
* g_param_spec_float (const gchar
*name
,
1080 gfloat default_value
,
1082 GLIB_AVAILABLE_IN_ALL
1083 GParamSpec
* g_param_spec_double (const gchar
*name
,
1088 gdouble default_value
,
1090 GLIB_AVAILABLE_IN_ALL
1091 GParamSpec
* g_param_spec_string (const gchar
*name
,
1094 const gchar
*default_value
,
1096 GLIB_AVAILABLE_IN_ALL
1097 GParamSpec
* g_param_spec_param (const gchar
*name
,
1102 GLIB_AVAILABLE_IN_ALL
1103 GParamSpec
* g_param_spec_boxed (const gchar
*name
,
1108 GLIB_AVAILABLE_IN_ALL
1109 GParamSpec
* g_param_spec_pointer (const gchar
*name
,
1113 GLIB_AVAILABLE_IN_ALL
1114 GParamSpec
* g_param_spec_value_array (const gchar
*name
,
1117 GParamSpec
*element_spec
,
1119 GLIB_AVAILABLE_IN_ALL
1120 GParamSpec
* g_param_spec_object (const gchar
*name
,
1125 GLIB_AVAILABLE_IN_ALL
1126 GParamSpec
* g_param_spec_override (const gchar
*name
,
1127 GParamSpec
*overridden
);
1128 GLIB_AVAILABLE_IN_ALL
1129 GParamSpec
* g_param_spec_gtype (const gchar
*name
,
1134 GLIB_AVAILABLE_IN_ALL
1135 GParamSpec
* g_param_spec_variant (const gchar
*name
,
1138 const GVariantType
*type
,
1139 GVariant
*default_value
,
1142 /* --- internal --- */
1143 /* We prefix variable declarations so they can
1144 * properly get exported in windows dlls.
1147 # ifdef G_PLATFORM_WIN32
1148 # ifdef GOBJECT_STATIC_COMPILATION
1149 # define GOBJECT_VAR extern
1150 # else /* !GOBJECT_STATIC_COMPILATION */
1151 # ifdef GOBJECT_COMPILATION
1153 # define GOBJECT_VAR __declspec(dllexport)
1154 # else /* !DLL_EXPORT */
1155 # define GOBJECT_VAR extern
1156 # endif /* !DLL_EXPORT */
1157 # else /* !GOBJECT_COMPILATION */
1158 # define GOBJECT_VAR extern __declspec(dllimport)
1159 # endif /* !GOBJECT_COMPILATION */
1160 # endif /* !GOBJECT_STATIC_COMPILATION */
1161 # else /* !G_PLATFORM_WIN32 */
1162 # define GOBJECT_VAR _GLIB_EXTERN
1163 # endif /* !G_PLATFORM_WIN32 */
1164 #endif /* GOBJECT_VAR */
1166 GOBJECT_VAR GType
*g_param_spec_types
;
1170 #endif /* __G_PARAMSPECS_H__ */