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 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, write to the
16 * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
17 * Boston, MA 02111-1307, USA.
19 * gparamspecs.h: GLib default param specs
21 #if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION)
22 #error "Only <glib-object.h> can be included directly."
25 #ifndef __G_PARAMSPECS_H__
26 #define __G_PARAMSPECS_H__
28 #include <gobject/gvalue.h>
29 #include <gobject/genums.h>
30 #include <gobject/gboxed.h>
31 #include <gobject/gobject.h>
35 /* --- type macros --- */
39 * The #GType of #GParamSpecChar.
41 #define G_TYPE_PARAM_CHAR (g_param_spec_types[0])
43 * G_IS_PARAM_SPEC_CHAR:
44 * @pspec: a valid #GParamSpec instance
46 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_CHAR.
48 * Returns: %TRUE on success.
50 #define G_IS_PARAM_SPEC_CHAR(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_CHAR))
53 * @pspec: a valid #GParamSpec instance
55 * Cast a #GParamSpec instance into a #GParamSpecChar.
57 #define G_PARAM_SPEC_CHAR(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_CHAR, GParamSpecChar))
62 * The #GType of #GParamSpecUChar.
64 #define G_TYPE_PARAM_UCHAR (g_param_spec_types[1])
66 * G_IS_PARAM_SPEC_UCHAR:
67 * @pspec: a valid #GParamSpec instance
69 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UCHAR.
71 * Returns: %TRUE on success.
73 #define G_IS_PARAM_SPEC_UCHAR(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UCHAR))
76 * @pspec: a valid #GParamSpec instance
78 * Cast a #GParamSpec instance into a #GParamSpecUChar.
80 #define G_PARAM_SPEC_UCHAR(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UCHAR, GParamSpecUChar))
83 * G_TYPE_PARAM_BOOLEAN:
85 * The #GType of #GParamSpecBoolean.
87 #define G_TYPE_PARAM_BOOLEAN (g_param_spec_types[2])
89 * G_IS_PARAM_SPEC_BOOLEAN:
90 * @pspec: a valid #GParamSpec instance
92 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_BOOLEAN.
94 * Returns: %TRUE on success.
96 #define G_IS_PARAM_SPEC_BOOLEAN(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_BOOLEAN))
98 * G_PARAM_SPEC_BOOLEAN:
99 * @pspec: a valid #GParamSpec instance
101 * Cast a #GParamSpec instance into a #GParamSpecBoolean.
103 #define G_PARAM_SPEC_BOOLEAN(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_BOOLEAN, GParamSpecBoolean))
108 * The #GType of #GParamSpecInt.
110 #define G_TYPE_PARAM_INT (g_param_spec_types[3])
112 * G_IS_PARAM_SPEC_INT:
113 * @pspec: a valid #GParamSpec instance
115 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_INT.
117 * Returns: %TRUE on success.
119 #define G_IS_PARAM_SPEC_INT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_INT))
122 * @pspec: a valid #GParamSpec instance
124 * Cast a #GParamSpec instance into a #GParamSpecInt.
126 #define G_PARAM_SPEC_INT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_INT, GParamSpecInt))
131 * The #GType of #GParamSpecUInt.
133 #define G_TYPE_PARAM_UINT (g_param_spec_types[4])
135 * G_IS_PARAM_SPEC_UINT:
136 * @pspec: a valid #GParamSpec instance
138 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UINT.
140 * Returns: %TRUE on success.
142 #define G_IS_PARAM_SPEC_UINT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UINT))
145 * @pspec: a valid #GParamSpec instance
147 * Cast a #GParamSpec instance into a #GParamSpecUInt.
149 #define G_PARAM_SPEC_UINT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UINT, GParamSpecUInt))
154 * The #GType of #GParamSpecLong.
156 #define G_TYPE_PARAM_LONG (g_param_spec_types[5])
158 * G_IS_PARAM_SPEC_LONG:
159 * @pspec: a valid #GParamSpec instance
161 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_LONG.
163 * Returns: %TRUE on success.
165 #define G_IS_PARAM_SPEC_LONG(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_LONG))
168 * @pspec: a valid #GParamSpec instance
170 * Cast a #GParamSpec instance into a #GParamSpecLong.
172 #define G_PARAM_SPEC_LONG(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_LONG, GParamSpecLong))
175 * G_TYPE_PARAM_ULONG:
177 * The #GType of #GParamSpecULong.
179 #define G_TYPE_PARAM_ULONG (g_param_spec_types[6])
181 * G_IS_PARAM_SPEC_ULONG:
182 * @pspec: a valid #GParamSpec instance
184 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_ULONG.
186 * Returns: %TRUE on success.
188 #define G_IS_PARAM_SPEC_ULONG(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_ULONG))
190 * G_PARAM_SPEC_ULONG:
191 * @pspec: a valid #GParamSpec instance
193 * Cast a #GParamSpec instance into a #GParamSpecULong.
195 #define G_PARAM_SPEC_ULONG(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_ULONG, GParamSpecULong))
198 * G_TYPE_PARAM_INT64:
200 * The #GType of #GParamSpecInt64.
202 #define G_TYPE_PARAM_INT64 (g_param_spec_types[7])
204 * G_IS_PARAM_SPEC_INT64:
205 * @pspec: a valid #GParamSpec instance
207 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_INT64.
209 * Returns: %TRUE on success.
211 #define G_IS_PARAM_SPEC_INT64(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_INT64))
213 * G_PARAM_SPEC_INT64:
214 * @pspec: a valid #GParamSpec instance
216 * Cast a #GParamSpec instance into a #GParamSpecInt64.
218 #define G_PARAM_SPEC_INT64(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_INT64, GParamSpecInt64))
221 * G_TYPE_PARAM_UINT64:
223 * The #GType of #GParamSpecUInt64.
225 #define G_TYPE_PARAM_UINT64 (g_param_spec_types[8])
227 * G_IS_PARAM_SPEC_UINT64:
228 * @pspec: a valid #GParamSpec instance
230 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UINT64.
232 * Returns: %TRUE on success.
234 #define G_IS_PARAM_SPEC_UINT64(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UINT64))
236 * G_PARAM_SPEC_UINT64:
237 * @pspec: a valid #GParamSpec instance
239 * Cast a #GParamSpec instance into a #GParamSpecUInt64.
241 #define G_PARAM_SPEC_UINT64(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UINT64, GParamSpecUInt64))
244 * G_TYPE_PARAM_UNICHAR:
246 * The #GType of #GParamSpecUnichar.
248 #define G_TYPE_PARAM_UNICHAR (g_param_spec_types[9])
250 * G_PARAM_SPEC_UNICHAR:
251 * @pspec: a valid #GParamSpec instance
253 * Cast a #GParamSpec instance into a #GParamSpecUnichar.
255 #define G_PARAM_SPEC_UNICHAR(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UNICHAR, GParamSpecUnichar))
257 * G_IS_PARAM_SPEC_UNICHAR:
258 * @pspec: a valid #GParamSpec instance
260 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UNICHAR.
262 * Returns: %TRUE on success.
264 #define G_IS_PARAM_SPEC_UNICHAR(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UNICHAR))
269 * The #GType of #GParamSpecEnum.
271 #define G_TYPE_PARAM_ENUM (g_param_spec_types[10])
273 * G_IS_PARAM_SPEC_ENUM:
274 * @pspec: a valid #GParamSpec instance
276 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_ENUM.
278 * Returns: %TRUE on success.
280 #define G_IS_PARAM_SPEC_ENUM(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_ENUM))
283 * @pspec: a valid #GParamSpec instance
285 * Cast a #GParamSpec instance into a #GParamSpecEnum.
287 #define G_PARAM_SPEC_ENUM(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_ENUM, GParamSpecEnum))
290 * G_TYPE_PARAM_FLAGS:
292 * The #GType of #GParamSpecFlags.
294 #define G_TYPE_PARAM_FLAGS (g_param_spec_types[11])
296 * G_IS_PARAM_SPEC_FLAGS:
297 * @pspec: a valid #GParamSpec instance
299 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_FLAGS.
301 * Returns: %TRUE on success.
303 #define G_IS_PARAM_SPEC_FLAGS(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_FLAGS))
305 * G_PARAM_SPEC_FLAGS:
306 * @pspec: a valid #GParamSpec instance
308 * Cast a #GParamSpec instance into a #GParamSpecFlags.
310 #define G_PARAM_SPEC_FLAGS(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_FLAGS, GParamSpecFlags))
313 * G_TYPE_PARAM_FLOAT:
315 * The #GType of #GParamSpecFloat.
317 #define G_TYPE_PARAM_FLOAT (g_param_spec_types[12])
319 * G_IS_PARAM_SPEC_FLOAT:
320 * @pspec: a valid #GParamSpec instance
322 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_FLOAT.
324 * Returns: %TRUE on success.
326 #define G_IS_PARAM_SPEC_FLOAT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_FLOAT))
328 * G_PARAM_SPEC_FLOAT:
329 * @pspec: a valid #GParamSpec instance
331 * Cast a #GParamSpec instance into a #GParamSpecFloat.
333 #define G_PARAM_SPEC_FLOAT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_FLOAT, GParamSpecFloat))
336 * G_TYPE_PARAM_DOUBLE:
338 * The #GType of #GParamSpecDouble.
340 #define G_TYPE_PARAM_DOUBLE (g_param_spec_types[13])
342 * G_IS_PARAM_SPEC_DOUBLE:
343 * @pspec: a valid #GParamSpec instance
345 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_DOUBLE.
347 * Returns: %TRUE on success.
349 #define G_IS_PARAM_SPEC_DOUBLE(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_DOUBLE))
351 * G_PARAM_SPEC_DOUBLE:
352 * @pspec: a valid #GParamSpec instance
354 * Cast a #GParamSpec instance into a #GParamSpecDouble.
356 #define G_PARAM_SPEC_DOUBLE(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_DOUBLE, GParamSpecDouble))
359 * G_TYPE_PARAM_STRING:
361 * The #GType of #GParamSpecString.
363 #define G_TYPE_PARAM_STRING (g_param_spec_types[14])
365 * G_IS_PARAM_SPEC_STRING:
366 * @pspec: a valid #GParamSpec instance
368 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_STRING.
370 * Returns: %TRUE on success.
372 #define G_IS_PARAM_SPEC_STRING(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_STRING))
374 * G_PARAM_SPEC_STRING:
375 * @pspec: a valid #GParamSpec instance
377 * Casts a #GParamSpec instance into a #GParamSpecString.
379 #define G_PARAM_SPEC_STRING(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_STRING, GParamSpecString))
382 * G_TYPE_PARAM_PARAM:
384 * The #GType of #GParamSpecParam.
386 #define G_TYPE_PARAM_PARAM (g_param_spec_types[15])
388 * G_IS_PARAM_SPEC_PARAM:
389 * @pspec: a valid #GParamSpec instance
391 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_PARAM.
393 * Returns: %TRUE on success.
395 #define G_IS_PARAM_SPEC_PARAM(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_PARAM))
397 * G_PARAM_SPEC_PARAM:
398 * @pspec: a valid #GParamSpec instance
400 * Casts a #GParamSpec instance into a #GParamSpecParam.
402 #define G_PARAM_SPEC_PARAM(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_PARAM, GParamSpecParam))
405 * G_TYPE_PARAM_BOXED:
407 * The #GType of #GParamSpecBoxed.
409 #define G_TYPE_PARAM_BOXED (g_param_spec_types[16])
411 * G_IS_PARAM_SPEC_BOXED:
412 * @pspec: a valid #GParamSpec instance
414 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_BOXED.
416 * Returns: %TRUE on success.
418 #define G_IS_PARAM_SPEC_BOXED(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_BOXED))
420 * G_PARAM_SPEC_BOXED:
421 * @pspec: a valid #GParamSpec instance
423 * Cast a #GParamSpec instance into a #GParamSpecBoxed.
425 #define G_PARAM_SPEC_BOXED(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_BOXED, GParamSpecBoxed))
428 * G_TYPE_PARAM_POINTER:
430 * The #GType of #GParamSpecPointer.
432 #define G_TYPE_PARAM_POINTER (g_param_spec_types[17])
434 * G_IS_PARAM_SPEC_POINTER:
435 * @pspec: a valid #GParamSpec instance
437 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_POINTER.
439 * Returns: %TRUE on success.
441 #define G_IS_PARAM_SPEC_POINTER(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_POINTER))
443 * G_PARAM_SPEC_POINTER:
444 * @pspec: a valid #GParamSpec instance
446 * Casts a #GParamSpec instance into a #GParamSpecPointer.
448 #define G_PARAM_SPEC_POINTER(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_POINTER, GParamSpecPointer))
451 * G_TYPE_PARAM_VALUE_ARRAY:
453 * The #GType of #GParamSpecValueArray.
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 #define G_IS_PARAM_SPEC_VALUE_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_VALUE_ARRAY))
466 * G_PARAM_SPEC_VALUE_ARRAY:
467 * @pspec: a valid #GParamSpec instance
469 * Cast a #GParamSpec instance into a #GParamSpecValueArray.
471 #define G_PARAM_SPEC_VALUE_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_VALUE_ARRAY, GParamSpecValueArray))
474 * G_TYPE_PARAM_OBJECT:
476 * The #GType of #GParamSpecObject.
478 #define G_TYPE_PARAM_OBJECT (g_param_spec_types[19])
480 * G_IS_PARAM_SPEC_OBJECT:
481 * @pspec: a valid #GParamSpec instance
483 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_OBJECT.
485 * Returns: %TRUE on success.
487 #define G_IS_PARAM_SPEC_OBJECT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_OBJECT))
489 * G_PARAM_SPEC_OBJECT:
490 * @pspec: a valid #GParamSpec instance
492 * Casts a #GParamSpec instance into a #GParamSpecObject.
494 #define G_PARAM_SPEC_OBJECT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_OBJECT, GParamSpecObject))
497 * G_TYPE_PARAM_OVERRIDE:
499 * The #GType of #GParamSpecOverride.
503 #define G_TYPE_PARAM_OVERRIDE (g_param_spec_types[20])
505 * G_IS_PARAM_SPEC_OVERRIDE:
506 * @pspec: a #GParamSpec
508 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_OVERRIDE.
511 * Returns: %TRUE on success.
513 #define G_IS_PARAM_SPEC_OVERRIDE(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_OVERRIDE))
515 * G_PARAM_SPEC_OVERRIDE:
516 * @pspec: a #GParamSpec
518 * Casts a #GParamSpec into a #GParamSpecOverride.
522 #define G_PARAM_SPEC_OVERRIDE(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_OVERRIDE, GParamSpecOverride))
525 * G_TYPE_PARAM_GTYPE:
527 * The #GType of #GParamSpecGType.
531 #define G_TYPE_PARAM_GTYPE (g_param_spec_types[21])
533 * G_IS_PARAM_SPEC_GTYPE:
534 * @pspec: a #GParamSpec
536 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_GTYPE.
539 * Returns: %TRUE on success.
541 #define G_IS_PARAM_SPEC_GTYPE(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_GTYPE))
543 * G_PARAM_SPEC_GTYPE:
544 * @pspec: a #GParamSpec
546 * Casts a #GParamSpec into a #GParamSpecGType.
550 #define G_PARAM_SPEC_GTYPE(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_GTYPE, GParamSpecGType))
553 * G_TYPE_PARAM_VARIANT:
555 * The #GType of #GParamSpecVariant.
559 #define G_TYPE_PARAM_VARIANT (g_param_spec_types[22])
561 * G_IS_PARAM_SPEC_VARIANT:
562 * @pspec: a #GParamSpec
564 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_VARIANT.
566 * Returns: %TRUE on success
570 #define G_IS_PARAM_SPEC_VARIANT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_VARIANT))
572 * G_PARAM_SPEC_VARIANT:
573 * @pspec: a #GParamSpec
575 * Casts a #GParamSpec into a #GParamSpecVariant.
579 #define G_PARAM_SPEC_VARIANT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_VARIANT, GParamSpecVariant))
581 /* --- typedefs & structures --- */
582 typedef struct _GParamSpecChar GParamSpecChar;
583 typedef struct _GParamSpecUChar GParamSpecUChar;
584 typedef struct _GParamSpecBoolean GParamSpecBoolean;
585 typedef struct _GParamSpecInt GParamSpecInt;
586 typedef struct _GParamSpecUInt GParamSpecUInt;
587 typedef struct _GParamSpecLong GParamSpecLong;
588 typedef struct _GParamSpecULong GParamSpecULong;
589 typedef struct _GParamSpecInt64 GParamSpecInt64;
590 typedef struct _GParamSpecUInt64 GParamSpecUInt64;
591 typedef struct _GParamSpecUnichar GParamSpecUnichar;
592 typedef struct _GParamSpecEnum GParamSpecEnum;
593 typedef struct _GParamSpecFlags GParamSpecFlags;
594 typedef struct _GParamSpecFloat GParamSpecFloat;
595 typedef struct _GParamSpecDouble GParamSpecDouble;
596 typedef struct _GParamSpecString GParamSpecString;
597 typedef struct _GParamSpecParam GParamSpecParam;
598 typedef struct _GParamSpecBoxed GParamSpecBoxed;
599 typedef struct _GParamSpecPointer GParamSpecPointer;
600 typedef struct _GParamSpecValueArray GParamSpecValueArray;
601 typedef struct _GParamSpecObject GParamSpecObject;
602 typedef struct _GParamSpecOverride GParamSpecOverride;
603 typedef struct _GParamSpecGType GParamSpecGType;
604 typedef struct _GParamSpecVariant GParamSpecVariant;
608 * @parent_instance: private #GParamSpec portion
609 * @minimum: minimum value for the property specified
610 * @maximum: maximum value for the property specified
611 * @default_value: default value for the property specified
613 * A #GParamSpec derived structure that contains the meta data for character properties.
615 struct _GParamSpecChar
617 GParamSpec parent_instance;
625 * @parent_instance: private #GParamSpec portion
626 * @minimum: minimum value for the property specified
627 * @maximum: maximum value for the property specified
628 * @default_value: default value for the property specified
630 * A #GParamSpec derived structure that contains the meta data for unsigned character properties.
632 struct _GParamSpecUChar
634 GParamSpec parent_instance;
638 guint8 default_value;
642 * @parent_instance: private #GParamSpec portion
643 * @default_value: default value for the property specified
645 * A #GParamSpec derived structure that contains the meta data for boolean properties.
647 struct _GParamSpecBoolean
649 GParamSpec parent_instance;
651 gboolean default_value;
655 * @parent_instance: private #GParamSpec portion
656 * @minimum: minimum value for the property specified
657 * @maximum: maximum value for the property specified
658 * @default_value: default value for the property specified
660 * A #GParamSpec derived structure that contains the meta data for integer properties.
662 struct _GParamSpecInt
664 GParamSpec parent_instance;
672 * @parent_instance: private #GParamSpec portion
673 * @minimum: minimum value for the property specified
674 * @maximum: maximum value for the property specified
675 * @default_value: default value for the property specified
677 * A #GParamSpec derived structure that contains the meta data for unsigned integer properties.
679 struct _GParamSpecUInt
681 GParamSpec parent_instance;
689 * @parent_instance: private #GParamSpec portion
690 * @minimum: minimum value for the property specified
691 * @maximum: maximum value for the property specified
692 * @default_value: default value for the property specified
694 * A #GParamSpec derived structure that contains the meta data for long integer properties.
696 struct _GParamSpecLong
698 GParamSpec parent_instance;
706 * @parent_instance: private #GParamSpec portion
707 * @minimum: minimum value for the property specified
708 * @maximum: maximum value for the property specified
709 * @default_value: default value for the property specified
711 * A #GParamSpec derived structure that contains the meta data for unsigned long integer properties.
713 struct _GParamSpecULong
715 GParamSpec parent_instance;
719 gulong default_value;
723 * @parent_instance: private #GParamSpec portion
724 * @minimum: minimum value for the property specified
725 * @maximum: maximum value for the property specified
726 * @default_value: default value for the property specified
728 * A #GParamSpec derived structure that contains the meta data for 64bit integer properties.
730 struct _GParamSpecInt64
732 GParamSpec parent_instance;
736 gint64 default_value;
740 * @parent_instance: private #GParamSpec portion
741 * @minimum: minimum value for the property specified
742 * @maximum: maximum value for the property specified
743 * @default_value: default value for the property specified
745 * A #GParamSpec derived structure that contains the meta data for unsigned 64bit integer properties.
747 struct _GParamSpecUInt64
749 GParamSpec parent_instance;
753 guint64 default_value;
757 * @parent_instance: private #GParamSpec portion
758 * @default_value: default value for the property specified
760 * A #GParamSpec derived structure that contains the meta data for unichar (unsigned integer) properties.
762 struct _GParamSpecUnichar
764 GParamSpec parent_instance;
766 gunichar default_value;
770 * @parent_instance: private #GParamSpec portion
771 * @enum_class: the #GEnumClass for the enum
772 * @default_value: default value for the property specified
774 * A #GParamSpec derived structure that contains the meta data for enum
777 struct _GParamSpecEnum
779 GParamSpec parent_instance;
781 GEnumClass *enum_class;
786 * @parent_instance: private #GParamSpec portion
787 * @flags_class: the #GFlagsClass for the flags
788 * @default_value: default value for the property specified
790 * A #GParamSpec derived structure that contains the meta data for flags
793 struct _GParamSpecFlags
795 GParamSpec parent_instance;
797 GFlagsClass *flags_class;
802 * @parent_instance: private #GParamSpec portion
803 * @minimum: minimum value for the property specified
804 * @maximum: maximum value for the property specified
805 * @default_value: default value for the property specified
806 * @epsilon: values closer than @epsilon will be considered identical
807 * by g_param_values_cmp(); the default value is 1e-30.
809 * A #GParamSpec derived structure that contains the meta data for float properties.
811 struct _GParamSpecFloat
813 GParamSpec parent_instance;
817 gfloat default_value;
822 * @parent_instance: private #GParamSpec portion
823 * @minimum: minimum value for the property specified
824 * @maximum: maximum value for the property specified
825 * @default_value: default value for the property specified
826 * @epsilon: values closer than @epsilon will be considered identical
827 * by g_param_values_cmp(); the default value is 1e-90.
829 * A #GParamSpec derived structure that contains the meta data for double properties.
831 struct _GParamSpecDouble
833 GParamSpec parent_instance;
837 gdouble default_value;
842 * @parent_instance: private #GParamSpec portion
843 * @default_value: default value for the property specified
844 * @cset_first: a string containing the allowed values for the first byte
845 * @cset_nth: a string containing the allowed values for the subsequent bytes
846 * @substitutor: the replacement byte for bytes which don't match @cset_first or @cset_nth.
847 * @null_fold_if_empty: replace empty string by %NULL
848 * @ensure_non_null: replace %NULL strings by an empty string
850 * A #GParamSpec derived structure that contains the meta data for string
853 struct _GParamSpecString
855 GParamSpec parent_instance;
857 gchar *default_value;
861 guint null_fold_if_empty : 1;
862 guint ensure_non_null : 1;
866 * @parent_instance: private #GParamSpec portion
868 * A #GParamSpec derived structure that contains the meta data for %G_TYPE_PARAM
871 struct _GParamSpecParam
873 GParamSpec parent_instance;
877 * @parent_instance: private #GParamSpec portion
879 * A #GParamSpec derived structure that contains the meta data for boxed properties.
881 struct _GParamSpecBoxed
883 GParamSpec parent_instance;
887 * @parent_instance: private #GParamSpec portion
889 * A #GParamSpec derived structure that contains the meta data for pointer properties.
891 struct _GParamSpecPointer
893 GParamSpec parent_instance;
896 * GParamSpecValueArray:
897 * @parent_instance: private #GParamSpec portion
898 * @element_spec: a #GParamSpec describing the elements contained in arrays of this property, may be %NULL
899 * @fixed_n_elements: if greater than 0, arrays of this property will always have this many elements
901 * A #GParamSpec derived structure that contains the meta data for #GValueArray properties.
903 struct _GParamSpecValueArray
905 GParamSpec parent_instance;
906 GParamSpec *element_spec;
907 guint fixed_n_elements;
911 * @parent_instance: private #GParamSpec portion
913 * A #GParamSpec derived structure that contains the meta data for object properties.
915 struct _GParamSpecObject
917 GParamSpec parent_instance;
920 * GParamSpecOverride:
922 * This is a type of #GParamSpec type that simply redirects operations to
923 * another paramspec. All operations other than getting or
924 * setting the value are redirected, including accessing the nick and
925 * blurb, validating a value, and so forth. See
926 * g_param_spec_get_redirect_target() for retrieving the overidden
927 * property. #GParamSpecOverride is used in implementing
928 * g_object_class_override_property(), and will not be directly useful
929 * unless you are implementing a new base type similar to GObject.
933 struct _GParamSpecOverride
936 GParamSpec parent_instance;
937 GParamSpec *overridden;
941 * @parent_instance: private #GParamSpec portion
942 * @is_a_type: a #GType whose subtypes can occur as values
944 * A #GParamSpec derived structure that contains the meta data for #GType properties.
948 struct _GParamSpecGType
950 GParamSpec parent_instance;
955 * @parent_instance: private #GParamSpec portion
956 * @type: a #GVariantType, or %NULL
957 * @default_value: a #GVariant, or %NULL
959 * A #GParamSpec derived structure that contains the meta data for #GVariant properties.
963 struct _GParamSpecVariant
965 GParamSpec parent_instance;
967 GVariant *default_value;
973 /* --- GParamSpec prototypes --- */
974 GParamSpec* g_param_spec_char (const gchar *name,
981 GParamSpec* g_param_spec_uchar (const gchar *name,
986 guint8 default_value,
988 GParamSpec* g_param_spec_boolean (const gchar *name,
991 gboolean default_value,
993 GParamSpec* g_param_spec_int (const gchar *name,
1000 GParamSpec* g_param_spec_uint (const gchar *name,
1005 guint default_value,
1007 GParamSpec* g_param_spec_long (const gchar *name,
1012 glong default_value,
1014 GParamSpec* g_param_spec_ulong (const gchar *name,
1019 gulong default_value,
1021 GParamSpec* g_param_spec_int64 (const gchar *name,
1026 gint64 default_value,
1028 GParamSpec* g_param_spec_uint64 (const gchar *name,
1033 guint64 default_value,
1035 GParamSpec* g_param_spec_unichar (const gchar *name,
1038 gunichar default_value,
1040 GParamSpec* g_param_spec_enum (const gchar *name,
1046 GParamSpec* g_param_spec_flags (const gchar *name,
1050 guint default_value,
1052 GParamSpec* g_param_spec_float (const gchar *name,
1057 gfloat default_value,
1059 GParamSpec* g_param_spec_double (const gchar *name,
1064 gdouble default_value,
1066 GParamSpec* g_param_spec_string (const gchar *name,
1069 const gchar *default_value,
1071 GParamSpec* g_param_spec_param (const gchar *name,
1076 GParamSpec* g_param_spec_boxed (const gchar *name,
1081 GParamSpec* g_param_spec_pointer (const gchar *name,
1085 GParamSpec* g_param_spec_value_array (const gchar *name,
1088 GParamSpec *element_spec,
1090 GParamSpec* g_param_spec_object (const gchar *name,
1095 GParamSpec* g_param_spec_override (const gchar *name,
1096 GParamSpec *overridden);
1097 GParamSpec* g_param_spec_gtype (const gchar *name,
1102 GParamSpec* g_param_spec_variant (const gchar *name,
1105 const GVariantType *type,
1106 GVariant *default_value,
1109 /* --- internal --- */
1110 /* We prefix variable declarations so they can
1111 * properly get exported in windows dlls.
1114 # ifdef G_PLATFORM_WIN32
1115 # ifdef GOBJECT_STATIC_COMPILATION
1116 # define GOBJECT_VAR extern
1117 # else /* !GOBJECT_STATIC_COMPILATION */
1118 # ifdef GOBJECT_COMPILATION
1120 # define GOBJECT_VAR __declspec(dllexport)
1121 # else /* !DLL_EXPORT */
1122 # define GOBJECT_VAR extern
1123 # endif /* !DLL_EXPORT */
1124 # else /* !GOBJECT_COMPILATION */
1125 # define GOBJECT_VAR extern __declspec(dllimport)
1126 # endif /* !GOBJECT_COMPILATION */
1127 # endif /* !GOBJECT_STATIC_COMPILATION */
1128 # else /* !G_PLATFORM_WIN32 */
1129 # define GOBJECT_VAR extern
1130 # endif /* !G_PLATFORM_WIN32 */
1131 #endif /* GOBJECT_VAR */
1133 GOBJECT_VAR GType *g_param_spec_types;
1137 #endif /* __G_PARAMSPECS_H__ */