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 #ifndef __G_PARAMSPECS_H__
22 #define __G_PARAMSPECS_H__
24 #if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION)
25 #error "Only <glib-object.h> can be included directly."
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 * Deprecated: 2.32: Use #GArray instead of #GValueArray
457 #define G_TYPE_PARAM_VALUE_ARRAY (g_param_spec_types[18])
459 * G_IS_PARAM_SPEC_VALUE_ARRAY:
460 * @pspec: a valid #GParamSpec instance
462 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_VALUE_ARRAY.
464 * Returns: %TRUE on success.
466 * Deprecated: 2.32: Use #GArray instead of #GValueArray
468 #define G_IS_PARAM_SPEC_VALUE_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_VALUE_ARRAY))
470 * G_PARAM_SPEC_VALUE_ARRAY:
471 * @pspec: a valid #GParamSpec instance
473 * Cast a #GParamSpec instance into a #GParamSpecValueArray.
475 * Deprecated: 2.32: Use #GArray instead of #GValueArray
477 #define G_PARAM_SPEC_VALUE_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_VALUE_ARRAY, GParamSpecValueArray))
480 * G_TYPE_PARAM_OBJECT:
482 * The #GType of #GParamSpecObject.
484 #define G_TYPE_PARAM_OBJECT (g_param_spec_types[19])
486 * G_IS_PARAM_SPEC_OBJECT:
487 * @pspec: a valid #GParamSpec instance
489 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_OBJECT.
491 * Returns: %TRUE on success.
493 #define G_IS_PARAM_SPEC_OBJECT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_OBJECT))
495 * G_PARAM_SPEC_OBJECT:
496 * @pspec: a valid #GParamSpec instance
498 * Casts a #GParamSpec instance into a #GParamSpecObject.
500 #define G_PARAM_SPEC_OBJECT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_OBJECT, GParamSpecObject))
503 * G_TYPE_PARAM_OVERRIDE:
505 * The #GType of #GParamSpecOverride.
509 #define G_TYPE_PARAM_OVERRIDE (g_param_spec_types[20])
511 * G_IS_PARAM_SPEC_OVERRIDE:
512 * @pspec: a #GParamSpec
514 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_OVERRIDE.
517 * Returns: %TRUE on success.
519 #define G_IS_PARAM_SPEC_OVERRIDE(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_OVERRIDE))
521 * G_PARAM_SPEC_OVERRIDE:
522 * @pspec: a #GParamSpec
524 * Casts a #GParamSpec into a #GParamSpecOverride.
528 #define G_PARAM_SPEC_OVERRIDE(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_OVERRIDE, GParamSpecOverride))
531 * G_TYPE_PARAM_GTYPE:
533 * The #GType of #GParamSpecGType.
537 #define G_TYPE_PARAM_GTYPE (g_param_spec_types[21])
539 * G_IS_PARAM_SPEC_GTYPE:
540 * @pspec: a #GParamSpec
542 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_GTYPE.
545 * Returns: %TRUE on success.
547 #define G_IS_PARAM_SPEC_GTYPE(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_GTYPE))
549 * G_PARAM_SPEC_GTYPE:
550 * @pspec: a #GParamSpec
552 * Casts a #GParamSpec into a #GParamSpecGType.
556 #define G_PARAM_SPEC_GTYPE(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_GTYPE, GParamSpecGType))
559 * G_TYPE_PARAM_VARIANT:
561 * The #GType of #GParamSpecVariant.
565 #define G_TYPE_PARAM_VARIANT (g_param_spec_types[22])
567 * G_IS_PARAM_SPEC_VARIANT:
568 * @pspec: a #GParamSpec
570 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_VARIANT.
572 * Returns: %TRUE on success
576 #define G_IS_PARAM_SPEC_VARIANT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_VARIANT))
578 * G_PARAM_SPEC_VARIANT:
579 * @pspec: a #GParamSpec
581 * Casts a #GParamSpec into a #GParamSpecVariant.
585 #define G_PARAM_SPEC_VARIANT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_VARIANT, GParamSpecVariant))
587 /* --- typedefs & structures --- */
588 typedef struct _GParamSpecChar GParamSpecChar;
589 typedef struct _GParamSpecUChar GParamSpecUChar;
590 typedef struct _GParamSpecBoolean GParamSpecBoolean;
591 typedef struct _GParamSpecInt GParamSpecInt;
592 typedef struct _GParamSpecUInt GParamSpecUInt;
593 typedef struct _GParamSpecLong GParamSpecLong;
594 typedef struct _GParamSpecULong GParamSpecULong;
595 typedef struct _GParamSpecInt64 GParamSpecInt64;
596 typedef struct _GParamSpecUInt64 GParamSpecUInt64;
597 typedef struct _GParamSpecUnichar GParamSpecUnichar;
598 typedef struct _GParamSpecEnum GParamSpecEnum;
599 typedef struct _GParamSpecFlags GParamSpecFlags;
600 typedef struct _GParamSpecFloat GParamSpecFloat;
601 typedef struct _GParamSpecDouble GParamSpecDouble;
602 typedef struct _GParamSpecString GParamSpecString;
603 typedef struct _GParamSpecParam GParamSpecParam;
604 typedef struct _GParamSpecBoxed GParamSpecBoxed;
605 typedef struct _GParamSpecPointer GParamSpecPointer;
606 typedef struct _GParamSpecValueArray GParamSpecValueArray;
607 typedef struct _GParamSpecObject GParamSpecObject;
608 typedef struct _GParamSpecOverride GParamSpecOverride;
609 typedef struct _GParamSpecGType GParamSpecGType;
610 typedef struct _GParamSpecVariant GParamSpecVariant;
614 * @parent_instance: private #GParamSpec portion
615 * @minimum: minimum value for the property specified
616 * @maximum: maximum value for the property specified
617 * @default_value: default value for the property specified
619 * A #GParamSpec derived structure that contains the meta data for character properties.
621 struct _GParamSpecChar
623 GParamSpec parent_instance;
631 * @parent_instance: private #GParamSpec portion
632 * @minimum: minimum value for the property specified
633 * @maximum: maximum value for the property specified
634 * @default_value: default value for the property specified
636 * A #GParamSpec derived structure that contains the meta data for unsigned character properties.
638 struct _GParamSpecUChar
640 GParamSpec parent_instance;
644 guint8 default_value;
648 * @parent_instance: private #GParamSpec portion
649 * @default_value: default value for the property specified
651 * A #GParamSpec derived structure that contains the meta data for boolean properties.
653 struct _GParamSpecBoolean
655 GParamSpec parent_instance;
657 gboolean default_value;
661 * @parent_instance: private #GParamSpec portion
662 * @minimum: minimum value for the property specified
663 * @maximum: maximum value for the property specified
664 * @default_value: default value for the property specified
666 * A #GParamSpec derived structure that contains the meta data for integer properties.
668 struct _GParamSpecInt
670 GParamSpec parent_instance;
678 * @parent_instance: private #GParamSpec portion
679 * @minimum: minimum value for the property specified
680 * @maximum: maximum value for the property specified
681 * @default_value: default value for the property specified
683 * A #GParamSpec derived structure that contains the meta data for unsigned integer properties.
685 struct _GParamSpecUInt
687 GParamSpec parent_instance;
695 * @parent_instance: private #GParamSpec portion
696 * @minimum: minimum value for the property specified
697 * @maximum: maximum value for the property specified
698 * @default_value: default value for the property specified
700 * A #GParamSpec derived structure that contains the meta data for long integer properties.
702 struct _GParamSpecLong
704 GParamSpec parent_instance;
712 * @parent_instance: private #GParamSpec portion
713 * @minimum: minimum value for the property specified
714 * @maximum: maximum value for the property specified
715 * @default_value: default value for the property specified
717 * A #GParamSpec derived structure that contains the meta data for unsigned long integer properties.
719 struct _GParamSpecULong
721 GParamSpec parent_instance;
725 gulong default_value;
729 * @parent_instance: private #GParamSpec portion
730 * @minimum: minimum value for the property specified
731 * @maximum: maximum value for the property specified
732 * @default_value: default value for the property specified
734 * A #GParamSpec derived structure that contains the meta data for 64bit integer properties.
736 struct _GParamSpecInt64
738 GParamSpec parent_instance;
742 gint64 default_value;
746 * @parent_instance: private #GParamSpec portion
747 * @minimum: minimum value for the property specified
748 * @maximum: maximum value for the property specified
749 * @default_value: default value for the property specified
751 * A #GParamSpec derived structure that contains the meta data for unsigned 64bit integer properties.
753 struct _GParamSpecUInt64
755 GParamSpec parent_instance;
759 guint64 default_value;
763 * @parent_instance: private #GParamSpec portion
764 * @default_value: default value for the property specified
766 * A #GParamSpec derived structure that contains the meta data for unichar (unsigned integer) properties.
768 struct _GParamSpecUnichar
770 GParamSpec parent_instance;
772 gunichar default_value;
776 * @parent_instance: private #GParamSpec portion
777 * @enum_class: the #GEnumClass for the enum
778 * @default_value: default value for the property specified
780 * A #GParamSpec derived structure that contains the meta data for enum
783 struct _GParamSpecEnum
785 GParamSpec parent_instance;
787 GEnumClass *enum_class;
792 * @parent_instance: private #GParamSpec portion
793 * @flags_class: the #GFlagsClass for the flags
794 * @default_value: default value for the property specified
796 * A #GParamSpec derived structure that contains the meta data for flags
799 struct _GParamSpecFlags
801 GParamSpec parent_instance;
803 GFlagsClass *flags_class;
808 * @parent_instance: private #GParamSpec portion
809 * @minimum: minimum value for the property specified
810 * @maximum: maximum value for the property specified
811 * @default_value: default value for the property specified
812 * @epsilon: values closer than @epsilon will be considered identical
813 * by g_param_values_cmp(); the default value is 1e-30.
815 * A #GParamSpec derived structure that contains the meta data for float properties.
817 struct _GParamSpecFloat
819 GParamSpec parent_instance;
823 gfloat default_value;
828 * @parent_instance: private #GParamSpec portion
829 * @minimum: minimum value for the property specified
830 * @maximum: maximum value for the property specified
831 * @default_value: default value for the property specified
832 * @epsilon: values closer than @epsilon will be considered identical
833 * by g_param_values_cmp(); the default value is 1e-90.
835 * A #GParamSpec derived structure that contains the meta data for double properties.
837 struct _GParamSpecDouble
839 GParamSpec parent_instance;
843 gdouble default_value;
848 * @parent_instance: private #GParamSpec portion
849 * @default_value: default value for the property specified
850 * @cset_first: a string containing the allowed values for the first byte
851 * @cset_nth: a string containing the allowed values for the subsequent bytes
852 * @substitutor: the replacement byte for bytes which don't match @cset_first or @cset_nth.
853 * @null_fold_if_empty: replace empty string by %NULL
854 * @ensure_non_null: replace %NULL strings by an empty string
856 * A #GParamSpec derived structure that contains the meta data for string
859 struct _GParamSpecString
861 GParamSpec parent_instance;
863 gchar *default_value;
867 guint null_fold_if_empty : 1;
868 guint ensure_non_null : 1;
872 * @parent_instance: private #GParamSpec portion
874 * A #GParamSpec derived structure that contains the meta data for %G_TYPE_PARAM
877 struct _GParamSpecParam
879 GParamSpec parent_instance;
883 * @parent_instance: private #GParamSpec portion
885 * A #GParamSpec derived structure that contains the meta data for boxed properties.
887 struct _GParamSpecBoxed
889 GParamSpec parent_instance;
893 * @parent_instance: private #GParamSpec portion
895 * A #GParamSpec derived structure that contains the meta data for pointer properties.
897 struct _GParamSpecPointer
899 GParamSpec parent_instance;
902 * GParamSpecValueArray:
903 * @parent_instance: private #GParamSpec portion
904 * @element_spec: a #GParamSpec describing the elements contained in arrays of this property, may be %NULL
905 * @fixed_n_elements: if greater than 0, arrays of this property will always have this many elements
907 * A #GParamSpec derived structure that contains the meta data for #GValueArray properties.
909 struct _GParamSpecValueArray
911 GParamSpec parent_instance;
912 GParamSpec *element_spec;
913 guint fixed_n_elements;
917 * @parent_instance: private #GParamSpec portion
919 * A #GParamSpec derived structure that contains the meta data for object properties.
921 struct _GParamSpecObject
923 GParamSpec parent_instance;
926 * GParamSpecOverride:
928 * This is a type of #GParamSpec type that simply redirects operations to
929 * another paramspec. All operations other than getting or
930 * setting the value are redirected, including accessing the nick and
931 * blurb, validating a value, and so forth. See
932 * g_param_spec_get_redirect_target() for retrieving the overidden
933 * property. #GParamSpecOverride is used in implementing
934 * g_object_class_override_property(), and will not be directly useful
935 * unless you are implementing a new base type similar to GObject.
939 struct _GParamSpecOverride
942 GParamSpec parent_instance;
943 GParamSpec *overridden;
947 * @parent_instance: private #GParamSpec portion
948 * @is_a_type: a #GType whose subtypes can occur as values
950 * A #GParamSpec derived structure that contains the meta data for #GType properties.
954 struct _GParamSpecGType
956 GParamSpec parent_instance;
961 * @parent_instance: private #GParamSpec portion
962 * @type: a #GVariantType, or %NULL
963 * @default_value: a #GVariant, or %NULL
965 * A #GParamSpec derived structure that contains the meta data for #GVariant properties.
969 struct _GParamSpecVariant
971 GParamSpec parent_instance;
973 GVariant *default_value;
979 /* --- GParamSpec prototypes --- */
980 GLIB_AVAILABLE_IN_ALL
981 GParamSpec* g_param_spec_char (const gchar *name,
988 GLIB_AVAILABLE_IN_ALL
989 GParamSpec* g_param_spec_uchar (const gchar *name,
994 guint8 default_value,
996 GLIB_AVAILABLE_IN_ALL
997 GParamSpec* g_param_spec_boolean (const gchar *name,
1000 gboolean default_value,
1002 GLIB_AVAILABLE_IN_ALL
1003 GParamSpec* g_param_spec_int (const gchar *name,
1010 GLIB_AVAILABLE_IN_ALL
1011 GParamSpec* g_param_spec_uint (const gchar *name,
1016 guint default_value,
1018 GLIB_AVAILABLE_IN_ALL
1019 GParamSpec* g_param_spec_long (const gchar *name,
1024 glong default_value,
1026 GLIB_AVAILABLE_IN_ALL
1027 GParamSpec* g_param_spec_ulong (const gchar *name,
1032 gulong default_value,
1034 GLIB_AVAILABLE_IN_ALL
1035 GParamSpec* g_param_spec_int64 (const gchar *name,
1040 gint64 default_value,
1042 GLIB_AVAILABLE_IN_ALL
1043 GParamSpec* g_param_spec_uint64 (const gchar *name,
1048 guint64 default_value,
1050 GLIB_AVAILABLE_IN_ALL
1051 GParamSpec* g_param_spec_unichar (const gchar *name,
1054 gunichar default_value,
1056 GLIB_AVAILABLE_IN_ALL
1057 GParamSpec* g_param_spec_enum (const gchar *name,
1063 GLIB_AVAILABLE_IN_ALL
1064 GParamSpec* g_param_spec_flags (const gchar *name,
1068 guint default_value,
1070 GLIB_AVAILABLE_IN_ALL
1071 GParamSpec* g_param_spec_float (const gchar *name,
1076 gfloat default_value,
1078 GLIB_AVAILABLE_IN_ALL
1079 GParamSpec* g_param_spec_double (const gchar *name,
1084 gdouble default_value,
1086 GLIB_AVAILABLE_IN_ALL
1087 GParamSpec* g_param_spec_string (const gchar *name,
1090 const gchar *default_value,
1092 GLIB_AVAILABLE_IN_ALL
1093 GParamSpec* g_param_spec_param (const gchar *name,
1098 GLIB_AVAILABLE_IN_ALL
1099 GParamSpec* g_param_spec_boxed (const gchar *name,
1104 GLIB_AVAILABLE_IN_ALL
1105 GParamSpec* g_param_spec_pointer (const gchar *name,
1109 GLIB_AVAILABLE_IN_ALL
1110 GParamSpec* g_param_spec_value_array (const gchar *name,
1113 GParamSpec *element_spec,
1115 GLIB_AVAILABLE_IN_ALL
1116 GParamSpec* g_param_spec_object (const gchar *name,
1121 GLIB_AVAILABLE_IN_ALL
1122 GParamSpec* g_param_spec_override (const gchar *name,
1123 GParamSpec *overridden);
1124 GLIB_AVAILABLE_IN_ALL
1125 GParamSpec* g_param_spec_gtype (const gchar *name,
1130 GLIB_AVAILABLE_IN_ALL
1131 GParamSpec* g_param_spec_variant (const gchar *name,
1134 const GVariantType *type,
1135 GVariant *default_value,
1138 /* --- internal --- */
1139 /* We prefix variable declarations so they can
1140 * properly get exported in windows dlls.
1143 # ifdef G_PLATFORM_WIN32
1144 # ifdef GOBJECT_STATIC_COMPILATION
1145 # define GOBJECT_VAR extern
1146 # else /* !GOBJECT_STATIC_COMPILATION */
1147 # ifdef GOBJECT_COMPILATION
1149 # define GOBJECT_VAR __declspec(dllexport)
1150 # else /* !DLL_EXPORT */
1151 # define GOBJECT_VAR extern
1152 # endif /* !DLL_EXPORT */
1153 # else /* !GOBJECT_COMPILATION */
1154 # define GOBJECT_VAR extern __declspec(dllimport)
1155 # endif /* !GOBJECT_COMPILATION */
1156 # endif /* !GOBJECT_STATIC_COMPILATION */
1157 # else /* !G_PLATFORM_WIN32 */
1158 # define GOBJECT_VAR _GLIB_EXTERN
1159 # endif /* !G_PLATFORM_WIN32 */
1160 #endif /* GOBJECT_VAR */
1162 GOBJECT_VAR GType *g_param_spec_types;
1166 #endif /* __G_PARAMSPECS_H__ */