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 /* --- typedefs & structures --- */
554 typedef struct _GParamSpecChar GParamSpecChar;
555 typedef struct _GParamSpecUChar GParamSpecUChar;
556 typedef struct _GParamSpecBoolean GParamSpecBoolean;
557 typedef struct _GParamSpecInt GParamSpecInt;
558 typedef struct _GParamSpecUInt GParamSpecUInt;
559 typedef struct _GParamSpecLong GParamSpecLong;
560 typedef struct _GParamSpecULong GParamSpecULong;
561 typedef struct _GParamSpecInt64 GParamSpecInt64;
562 typedef struct _GParamSpecUInt64 GParamSpecUInt64;
563 typedef struct _GParamSpecUnichar GParamSpecUnichar;
564 typedef struct _GParamSpecEnum GParamSpecEnum;
565 typedef struct _GParamSpecFlags GParamSpecFlags;
566 typedef struct _GParamSpecFloat GParamSpecFloat;
567 typedef struct _GParamSpecDouble GParamSpecDouble;
568 typedef struct _GParamSpecString GParamSpecString;
569 typedef struct _GParamSpecParam GParamSpecParam;
570 typedef struct _GParamSpecBoxed GParamSpecBoxed;
571 typedef struct _GParamSpecPointer GParamSpecPointer;
572 typedef struct _GParamSpecValueArray GParamSpecValueArray;
573 typedef struct _GParamSpecObject GParamSpecObject;
574 typedef struct _GParamSpecOverride GParamSpecOverride;
575 typedef struct _GParamSpecGType GParamSpecGType;
579 * @parent_instance: private #GParamSpec portion
580 * @minimum: minimum value for the property specified
581 * @maximum: maximum value for the property specified
582 * @default_value: default value for the property specified
584 * A #GParamSpec derived structure that contains the meta data for character properties.
586 struct _GParamSpecChar
588 GParamSpec parent_instance;
596 * @parent_instance: private #GParamSpec portion
597 * @minimum: minimum value for the property specified
598 * @maximum: maximum value for the property specified
599 * @default_value: default value for the property specified
601 * A #GParamSpec derived structure that contains the meta data for unsigned character properties.
603 struct _GParamSpecUChar
605 GParamSpec parent_instance;
609 guint8 default_value;
613 * @parent_instance: private #GParamSpec portion
614 * @default_value: default value for the property specified
616 * A #GParamSpec derived structure that contains the meta data for boolean properties.
618 struct _GParamSpecBoolean
620 GParamSpec parent_instance;
622 gboolean default_value;
626 * @parent_instance: private #GParamSpec portion
627 * @minimum: minimum value for the property specified
628 * @maximum: maximum value for the property specified
629 * @default_value: default value for the property specified
631 * A #GParamSpec derived structure that contains the meta data for integer properties.
633 struct _GParamSpecInt
635 GParamSpec parent_instance;
643 * @parent_instance: private #GParamSpec portion
644 * @minimum: minimum value for the property specified
645 * @maximum: maximum value for the property specified
646 * @default_value: default value for the property specified
648 * A #GParamSpec derived structure that contains the meta data for unsigned integer properties.
650 struct _GParamSpecUInt
652 GParamSpec parent_instance;
660 * @parent_instance: private #GParamSpec portion
661 * @minimum: minimum value for the property specified
662 * @maximum: maximum value for the property specified
663 * @default_value: default value for the property specified
665 * A #GParamSpec derived structure that contains the meta data for long integer properties.
667 struct _GParamSpecLong
669 GParamSpec parent_instance;
677 * @parent_instance: private #GParamSpec portion
678 * @minimum: minimum value for the property specified
679 * @maximum: maximum value for the property specified
680 * @default_value: default value for the property specified
682 * A #GParamSpec derived structure that contains the meta data for unsigned long integer properties.
684 struct _GParamSpecULong
686 GParamSpec parent_instance;
690 gulong default_value;
694 * @parent_instance: private #GParamSpec portion
695 * @minimum: minimum value for the property specified
696 * @maximum: maximum value for the property specified
697 * @default_value: default value for the property specified
699 * A #GParamSpec derived structure that contains the meta data for 64bit integer properties.
701 struct _GParamSpecInt64
703 GParamSpec parent_instance;
707 gint64 default_value;
711 * @parent_instance: private #GParamSpec portion
712 * @minimum: minimum value for the property specified
713 * @maximum: maximum value for the property specified
714 * @default_value: default value for the property specified
716 * A #GParamSpec derived structure that contains the meta data for unsigned 64bit integer properties.
718 struct _GParamSpecUInt64
720 GParamSpec parent_instance;
724 guint64 default_value;
728 * @parent_instance: private #GParamSpec portion
729 * @default_value: default value for the property specified
731 * A #GParamSpec derived structure that contains the meta data for unichar (unsigned integer) properties.
733 struct _GParamSpecUnichar
735 GParamSpec parent_instance;
737 gunichar default_value;
741 * @parent_instance: private #GParamSpec portion
742 * @enum_class: the #GEnumClass for the enum
743 * @default_value: default value for the property specified
745 * A #GParamSpec derived structure that contains the meta data for enum
748 struct _GParamSpecEnum
750 GParamSpec parent_instance;
752 GEnumClass *enum_class;
757 * @parent_instance: private #GParamSpec portion
758 * @flags_class: the #GFlagsClass for the flags
759 * @default_value: default value for the property specified
761 * A #GParamSpec derived structure that contains the meta data for flags
764 struct _GParamSpecFlags
766 GParamSpec parent_instance;
768 GFlagsClass *flags_class;
773 * @parent_instance: private #GParamSpec portion
774 * @minimum: minimum value for the property specified
775 * @maximum: maximum value for the property specified
776 * @default_value: default value for the property specified
777 * @epsilon: values closer than @epsilon will be considered identical
778 * by g_param_values_cmp(); the default value is 1e-30.
780 * A #GParamSpec derived structure that contains the meta data for float properties.
782 struct _GParamSpecFloat
784 GParamSpec parent_instance;
788 gfloat default_value;
793 * @parent_instance: private #GParamSpec portion
794 * @minimum: minimum value for the property specified
795 * @maximum: maximum value for the property specified
796 * @default_value: default value for the property specified
797 * @epsilon: values closer than @epsilon will be considered identical
798 * by g_param_values_cmp(); the default value is 1e-90.
800 * A #GParamSpec derived structure that contains the meta data for double properties.
802 struct _GParamSpecDouble
804 GParamSpec parent_instance;
808 gdouble default_value;
813 * @parent_instance: private #GParamSpec portion
814 * @default_value: default value for the property specified
815 * @cset_first: a string containing the allowed values for the first byte
816 * @cset_nth: a string containing the allowed values for the subsequent bytes
817 * @substitutor: the replacement byte for bytes which don't match @cset_first or @cset_nth.
818 * @null_fold_if_empty: replace empty string by %NULL
819 * @ensure_non_null: replace %NULL strings by an empty string
821 * A #GParamSpec derived structure that contains the meta data for string
824 struct _GParamSpecString
826 GParamSpec parent_instance;
828 gchar *default_value;
832 guint null_fold_if_empty : 1;
833 guint ensure_non_null : 1;
837 * @parent_instance: private #GParamSpec portion
839 * A #GParamSpec derived structure that contains the meta data for %G_TYPE_PARAM
842 struct _GParamSpecParam
844 GParamSpec parent_instance;
848 * @parent_instance: private #GParamSpec portion
850 * A #GParamSpec derived structure that contains the meta data for boxed properties.
852 struct _GParamSpecBoxed
854 GParamSpec parent_instance;
858 * @parent_instance: private #GParamSpec portion
860 * A #GParamSpec derived structure that contains the meta data for pointer properties.
862 struct _GParamSpecPointer
864 GParamSpec parent_instance;
867 * GParamSpecValueArray:
868 * @parent_instance: private #GParamSpec portion
869 * @element_spec: a #GParamSpec describing the elements contained in arrays of this property, may be %NULL
870 * @fixed_n_elements: if greater than 0, arrays of this property will always have this many elements
872 * A #GParamSpec derived structure that contains the meta data for #GValueArray properties.
874 struct _GParamSpecValueArray
876 GParamSpec parent_instance;
877 GParamSpec *element_spec;
878 guint fixed_n_elements;
882 * @parent_instance: private #GParamSpec portion
884 * A #GParamSpec derived structure that contains the meta data for object properties.
886 struct _GParamSpecObject
888 GParamSpec parent_instance;
891 * GParamSpecOverride:
893 * This is a type of #GParamSpec type that simply redirects operations to
894 * another paramspec. All operations other than getting or
895 * setting the value are redirected, including accessing the nick and
896 * blurb, validating a value, and so forth. See
897 * g_param_spec_get_redirect_target() for retrieving the overidden
898 * property. #GParamSpecOverride is used in implementing
899 * g_object_class_override_property(), and will not be directly useful
900 * unless you are implementing a new base type similar to GObject.
904 struct _GParamSpecOverride
907 GParamSpec parent_instance;
908 GParamSpec *overridden;
912 * @parent_instance: private #GParamSpec portion
913 * @is_a_type: a #GType whose subtypes can occur as values
915 * A #GParamSpec derived structure that contains the meta data for #GType properties.
919 struct _GParamSpecGType
921 GParamSpec parent_instance;
925 /* --- GParamSpec prototypes --- */
926 GParamSpec* g_param_spec_char (const gchar *name,
933 GParamSpec* g_param_spec_uchar (const gchar *name,
938 guint8 default_value,
940 GParamSpec* g_param_spec_boolean (const gchar *name,
943 gboolean default_value,
945 GParamSpec* g_param_spec_int (const gchar *name,
952 GParamSpec* g_param_spec_uint (const gchar *name,
959 GParamSpec* g_param_spec_long (const gchar *name,
966 GParamSpec* g_param_spec_ulong (const gchar *name,
971 gulong default_value,
973 GParamSpec* g_param_spec_int64 (const gchar *name,
978 gint64 default_value,
980 GParamSpec* g_param_spec_uint64 (const gchar *name,
985 guint64 default_value,
987 GParamSpec* g_param_spec_unichar (const gchar *name,
990 gunichar default_value,
992 GParamSpec* g_param_spec_enum (const gchar *name,
998 GParamSpec* g_param_spec_flags (const gchar *name,
1002 guint default_value,
1004 GParamSpec* g_param_spec_float (const gchar *name,
1009 gfloat default_value,
1011 GParamSpec* g_param_spec_double (const gchar *name,
1016 gdouble default_value,
1018 GParamSpec* g_param_spec_string (const gchar *name,
1021 const gchar *default_value,
1023 GParamSpec* g_param_spec_param (const gchar *name,
1028 GParamSpec* g_param_spec_boxed (const gchar *name,
1033 GParamSpec* g_param_spec_pointer (const gchar *name,
1037 GParamSpec* g_param_spec_value_array (const gchar *name,
1040 GParamSpec *element_spec,
1042 GParamSpec* g_param_spec_object (const gchar *name,
1047 GParamSpec* g_param_spec_override (const gchar *name,
1048 GParamSpec *overridden);
1049 GParamSpec* g_param_spec_gtype (const gchar *name,
1055 /* --- internal --- */
1056 /* We prefix variable declarations so they can
1057 * properly get exported in windows dlls.
1060 # ifdef G_PLATFORM_WIN32
1061 # ifdef GOBJECT_STATIC_COMPILATION
1062 # define GOBJECT_VAR extern
1063 # else /* !GOBJECT_STATIC_COMPILATION */
1064 # ifdef GOBJECT_COMPILATION
1066 # define GOBJECT_VAR __declspec(dllexport)
1067 # else /* !DLL_EXPORT */
1068 # define GOBJECT_VAR extern
1069 # endif /* !DLL_EXPORT */
1070 # else /* !GOBJECT_COMPILATION */
1071 # define GOBJECT_VAR extern __declspec(dllimport)
1072 # endif /* !GOBJECT_COMPILATION */
1073 # endif /* !GOBJECT_STATIC_COMPILATION */
1074 # else /* !G_PLATFORM_WIN32 */
1075 # define GOBJECT_VAR extern
1076 # endif /* !G_PLATFORM_WIN32 */
1077 #endif /* GOBJECT_VAR */
1079 GOBJECT_VAR GType *g_param_spec_types;
1083 #endif /* __G_PARAMSPECS_H__ */