Merge remote branch 'gvdb/master'
[platform/upstream/glib.git] / gobject / gparamspecs.h
1 /* GObject - GLib Type, Object, Parameter and Signal Library
2  * Copyright (C) 1997-1999, 2000-2001 Tim Janik and Red Hat, Inc.
3  *
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.
8  *
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.
13  *
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.
18  *
19  * gparamspecs.h: GLib default param specs
20  */
21 #if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION)
22 #error "Only <glib-object.h> can be included directly."
23 #endif
24
25 #ifndef __G_PARAMSPECS_H__
26 #define __G_PARAMSPECS_H__
27
28 #include        <gobject/gvalue.h>
29 #include        <gobject/genums.h>
30 #include        <gobject/gboxed.h>
31 #include        <gobject/gobject.h>
32
33 G_BEGIN_DECLS
34
35 /* --- type macros --- */
36 /**
37  * G_TYPE_PARAM_CHAR:
38  * 
39  * The #GType of #GParamSpecChar.
40  */
41 #define G_TYPE_PARAM_CHAR                  (g_param_spec_types[0])
42 /**
43  * G_IS_PARAM_SPEC_CHAR:
44  * @pspec: a valid #GParamSpec instance
45  * 
46  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_CHAR.
47  * 
48  * Returns: %TRUE on success.
49  */
50 #define G_IS_PARAM_SPEC_CHAR(pspec)        (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_CHAR))
51 /**
52  * G_PARAM_SPEC_CHAR:
53  * @pspec: a valid #GParamSpec instance
54  * 
55  * Cast a #GParamSpec instance into a #GParamSpecChar.
56  */
57 #define G_PARAM_SPEC_CHAR(pspec)           (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_CHAR, GParamSpecChar))
58
59 /**
60  * G_TYPE_PARAM_UCHAR:
61  * 
62  * The #GType of #GParamSpecUChar.
63  */
64 #define G_TYPE_PARAM_UCHAR                 (g_param_spec_types[1])
65 /**
66  * G_IS_PARAM_SPEC_UCHAR:
67  * @pspec: a valid #GParamSpec instance
68  * 
69  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UCHAR.
70  * 
71  * Returns: %TRUE on success.
72  */
73 #define G_IS_PARAM_SPEC_UCHAR(pspec)       (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UCHAR))
74 /**
75  * G_PARAM_SPEC_UCHAR:
76  * @pspec: a valid #GParamSpec instance
77  * 
78  * Cast a #GParamSpec instance into a #GParamSpecUChar.
79  */
80 #define G_PARAM_SPEC_UCHAR(pspec)          (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UCHAR, GParamSpecUChar))
81
82 /**
83  * G_TYPE_PARAM_BOOLEAN:
84  * 
85  * The #GType of #GParamSpecBoolean.
86  */
87 #define G_TYPE_PARAM_BOOLEAN               (g_param_spec_types[2])
88 /**
89  * G_IS_PARAM_SPEC_BOOLEAN:
90  * @pspec: a valid #GParamSpec instance
91  * 
92  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_BOOLEAN.
93  * 
94  * Returns: %TRUE on success.
95  */
96 #define G_IS_PARAM_SPEC_BOOLEAN(pspec)     (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_BOOLEAN))
97 /**
98  * G_PARAM_SPEC_BOOLEAN:
99  * @pspec: a valid #GParamSpec instance
100  * 
101  * Cast a #GParamSpec instance into a #GParamSpecBoolean.
102  */
103 #define G_PARAM_SPEC_BOOLEAN(pspec)        (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_BOOLEAN, GParamSpecBoolean))
104
105 /**
106  * G_TYPE_PARAM_INT:
107  * 
108  * The #GType of #GParamSpecInt.
109  */
110 #define G_TYPE_PARAM_INT                   (g_param_spec_types[3])
111 /**
112  * G_IS_PARAM_SPEC_INT:
113  * @pspec: a valid #GParamSpec instance
114  * 
115  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_INT.
116  * 
117  * Returns: %TRUE on success.
118  */
119 #define G_IS_PARAM_SPEC_INT(pspec)         (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_INT))
120 /**
121  * G_PARAM_SPEC_INT:
122  * @pspec: a valid #GParamSpec instance
123  * 
124  * Cast a #GParamSpec instance into a #GParamSpecInt.
125  */
126 #define G_PARAM_SPEC_INT(pspec)            (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_INT, GParamSpecInt))
127
128 /**
129  * G_TYPE_PARAM_UINT:
130  * 
131  * The #GType of #GParamSpecUInt.
132  */
133 #define G_TYPE_PARAM_UINT                  (g_param_spec_types[4])
134 /**
135  * G_IS_PARAM_SPEC_UINT:
136  * @pspec: a valid #GParamSpec instance
137  * 
138  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UINT.
139  * 
140  * Returns: %TRUE on success.
141  */
142 #define G_IS_PARAM_SPEC_UINT(pspec)        (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UINT))
143 /**
144  * G_PARAM_SPEC_UINT:
145  * @pspec: a valid #GParamSpec instance
146  * 
147  * Cast a #GParamSpec instance into a #GParamSpecUInt.
148  */
149 #define G_PARAM_SPEC_UINT(pspec)           (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UINT, GParamSpecUInt))
150
151 /**
152  * G_TYPE_PARAM_LONG:
153  * 
154  * The #GType of #GParamSpecLong.
155  */
156 #define G_TYPE_PARAM_LONG                  (g_param_spec_types[5])
157 /**
158  * G_IS_PARAM_SPEC_LONG:
159  * @pspec: a valid #GParamSpec instance
160  * 
161  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_LONG.
162  * 
163  * Returns: %TRUE on success.
164  */
165 #define G_IS_PARAM_SPEC_LONG(pspec)        (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_LONG))
166 /**
167  * G_PARAM_SPEC_LONG:
168  * @pspec: a valid #GParamSpec instance
169  * 
170  * Cast a #GParamSpec instance into a #GParamSpecLong.
171  */
172 #define G_PARAM_SPEC_LONG(pspec)           (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_LONG, GParamSpecLong))
173
174 /**
175  * G_TYPE_PARAM_ULONG:
176  * 
177  * The #GType of #GParamSpecULong.
178  */
179 #define G_TYPE_PARAM_ULONG                 (g_param_spec_types[6])
180 /**
181  * G_IS_PARAM_SPEC_ULONG:
182  * @pspec: a valid #GParamSpec instance
183  * 
184  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_ULONG.
185  * 
186  * Returns: %TRUE on success.
187  */
188 #define G_IS_PARAM_SPEC_ULONG(pspec)       (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_ULONG))
189 /**
190  * G_PARAM_SPEC_ULONG:
191  * @pspec: a valid #GParamSpec instance
192  * 
193  * Cast a #GParamSpec instance into a #GParamSpecULong.
194  */
195 #define G_PARAM_SPEC_ULONG(pspec)          (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_ULONG, GParamSpecULong))
196
197 /**
198  * G_TYPE_PARAM_INT64:
199  * 
200  * The #GType of #GParamSpecInt64.
201  */
202 #define G_TYPE_PARAM_INT64                 (g_param_spec_types[7])
203 /**
204  * G_IS_PARAM_SPEC_INT64:
205  * @pspec: a valid #GParamSpec instance
206  * 
207  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_INT64.
208  *
209  * Returns: %TRUE on success.
210  */
211 #define G_IS_PARAM_SPEC_INT64(pspec)       (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_INT64))
212 /**
213  * G_PARAM_SPEC_INT64:
214  * @pspec: a valid #GParamSpec instance
215  * 
216  * Cast a #GParamSpec instance into a #GParamSpecInt64.
217  */
218 #define G_PARAM_SPEC_INT64(pspec)          (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_INT64, GParamSpecInt64))
219
220 /**
221  * G_TYPE_PARAM_UINT64:
222  * 
223  * The #GType of #GParamSpecUInt64.
224  */
225 #define G_TYPE_PARAM_UINT64                (g_param_spec_types[8])
226 /**
227  * G_IS_PARAM_SPEC_UINT64:
228  * @pspec: a valid #GParamSpec instance
229  * 
230  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UINT64.
231  * 
232  * Returns: %TRUE on success.
233  */
234 #define G_IS_PARAM_SPEC_UINT64(pspec)      (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UINT64))
235 /**
236  * G_PARAM_SPEC_UINT64:
237  * @pspec: a valid #GParamSpec instance
238  * 
239  * Cast a #GParamSpec instance into a #GParamSpecUInt64.
240  */
241 #define G_PARAM_SPEC_UINT64(pspec)         (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UINT64, GParamSpecUInt64))
242
243 /**
244  * G_TYPE_PARAM_UNICHAR:
245  * 
246  * The #GType of #GParamSpecUnichar.
247  */
248 #define G_TYPE_PARAM_UNICHAR               (g_param_spec_types[9])
249 /**
250  * G_PARAM_SPEC_UNICHAR:
251  * @pspec: a valid #GParamSpec instance
252  * 
253  * Cast a #GParamSpec instance into a #GParamSpecUnichar.
254  */
255 #define G_PARAM_SPEC_UNICHAR(pspec)        (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UNICHAR, GParamSpecUnichar))
256 /**
257  * G_IS_PARAM_SPEC_UNICHAR:
258  * @pspec: a valid #GParamSpec instance
259  * 
260  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UNICHAR.
261  * 
262  * Returns: %TRUE on success.
263  */
264 #define G_IS_PARAM_SPEC_UNICHAR(pspec)     (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UNICHAR))
265
266 /**
267  * G_TYPE_PARAM_ENUM:
268  * 
269  * The #GType of #GParamSpecEnum.
270  */
271 #define G_TYPE_PARAM_ENUM                  (g_param_spec_types[10])
272 /**
273  * G_IS_PARAM_SPEC_ENUM:
274  * @pspec: a valid #GParamSpec instance
275  * 
276  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_ENUM.
277  * 
278  * Returns: %TRUE on success.
279  */
280 #define G_IS_PARAM_SPEC_ENUM(pspec)        (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_ENUM))
281 /**
282  * G_PARAM_SPEC_ENUM:
283  * @pspec: a valid #GParamSpec instance
284  * 
285  * Cast a #GParamSpec instance into a #GParamSpecEnum.
286  */
287 #define G_PARAM_SPEC_ENUM(pspec)           (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_ENUM, GParamSpecEnum))
288
289 /**
290  * G_TYPE_PARAM_FLAGS:
291  * 
292  * The #GType of #GParamSpecFlags.
293  */
294 #define G_TYPE_PARAM_FLAGS                 (g_param_spec_types[11])
295 /**
296  * G_IS_PARAM_SPEC_FLAGS:
297  * @pspec: a valid #GParamSpec instance
298  * 
299  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_FLAGS.
300  * 
301  * Returns: %TRUE on success.
302  */
303 #define G_IS_PARAM_SPEC_FLAGS(pspec)       (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_FLAGS))
304 /**
305  * G_PARAM_SPEC_FLAGS:
306  * @pspec: a valid #GParamSpec instance
307  * 
308  * Cast a #GParamSpec instance into a #GParamSpecFlags.
309  */
310 #define G_PARAM_SPEC_FLAGS(pspec)          (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_FLAGS, GParamSpecFlags))
311
312 /**
313  * G_TYPE_PARAM_FLOAT:
314  * 
315  * The #GType of #GParamSpecFloat.
316  */
317 #define G_TYPE_PARAM_FLOAT                 (g_param_spec_types[12])
318 /**
319  * G_IS_PARAM_SPEC_FLOAT:
320  * @pspec: a valid #GParamSpec instance
321  * 
322  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_FLOAT.
323  * 
324  * Returns: %TRUE on success.
325  */
326 #define G_IS_PARAM_SPEC_FLOAT(pspec)       (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_FLOAT))
327 /**
328  * G_PARAM_SPEC_FLOAT:
329  * @pspec: a valid #GParamSpec instance
330  * 
331  * Cast a #GParamSpec instance into a #GParamSpecFloat.
332  */
333 #define G_PARAM_SPEC_FLOAT(pspec)          (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_FLOAT, GParamSpecFloat))
334
335 /**
336  * G_TYPE_PARAM_DOUBLE:
337  * 
338  * The #GType of #GParamSpecDouble.
339  */
340 #define G_TYPE_PARAM_DOUBLE                (g_param_spec_types[13])
341 /**
342  * G_IS_PARAM_SPEC_DOUBLE:
343  * @pspec: a valid #GParamSpec instance
344  * 
345  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_DOUBLE.
346  * 
347  * Returns: %TRUE on success.
348  */
349 #define G_IS_PARAM_SPEC_DOUBLE(pspec)      (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_DOUBLE))
350 /**
351  * G_PARAM_SPEC_DOUBLE:
352  * @pspec: a valid #GParamSpec instance
353  * 
354  * Cast a #GParamSpec instance into a #GParamSpecDouble.
355  */
356 #define G_PARAM_SPEC_DOUBLE(pspec)         (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_DOUBLE, GParamSpecDouble))
357
358 /**
359  * G_TYPE_PARAM_STRING:
360  * 
361  * The #GType of #GParamSpecString.
362  */
363 #define G_TYPE_PARAM_STRING                (g_param_spec_types[14])
364 /**
365  * G_IS_PARAM_SPEC_STRING:
366  * @pspec: a valid #GParamSpec instance
367  * 
368  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_STRING.
369  * 
370  * Returns: %TRUE on success.
371  */
372 #define G_IS_PARAM_SPEC_STRING(pspec)      (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_STRING))
373 /**
374  * G_PARAM_SPEC_STRING:
375  * @pspec: a valid #GParamSpec instance
376  * 
377  * Casts a #GParamSpec instance into a #GParamSpecString.
378  */
379 #define G_PARAM_SPEC_STRING(pspec)         (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_STRING, GParamSpecString))
380
381 /**
382  * G_TYPE_PARAM_PARAM:
383  * 
384  * The #GType of #GParamSpecParam.
385  */
386 #define G_TYPE_PARAM_PARAM                 (g_param_spec_types[15])
387 /**
388  * G_IS_PARAM_SPEC_PARAM:
389  * @pspec: a valid #GParamSpec instance
390  * 
391  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_PARAM.
392  * 
393  * Returns: %TRUE on success.
394  */
395 #define G_IS_PARAM_SPEC_PARAM(pspec)       (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_PARAM))
396 /**
397  * G_PARAM_SPEC_PARAM:
398  * @pspec: a valid #GParamSpec instance
399  * 
400  * Casts a #GParamSpec instance into a #GParamSpecParam.
401  */
402 #define G_PARAM_SPEC_PARAM(pspec)          (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_PARAM, GParamSpecParam))
403
404 /**
405  * G_TYPE_PARAM_BOXED:
406  * 
407  * The #GType of #GParamSpecBoxed.
408  */
409 #define G_TYPE_PARAM_BOXED                 (g_param_spec_types[16])
410 /**
411  * G_IS_PARAM_SPEC_BOXED:
412  * @pspec: a valid #GParamSpec instance
413  * 
414  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_BOXED.
415  * 
416  * Returns: %TRUE on success.
417  */
418 #define G_IS_PARAM_SPEC_BOXED(pspec)       (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_BOXED))
419 /**
420  * G_PARAM_SPEC_BOXED:
421  * @pspec: a valid #GParamSpec instance
422  * 
423  * Cast a #GParamSpec instance into a #GParamSpecBoxed.
424  */
425 #define G_PARAM_SPEC_BOXED(pspec)          (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_BOXED, GParamSpecBoxed))
426
427 /**
428  * G_TYPE_PARAM_POINTER:
429  * 
430  * The #GType of #GParamSpecPointer.
431  */
432 #define G_TYPE_PARAM_POINTER               (g_param_spec_types[17])
433 /**
434  * G_IS_PARAM_SPEC_POINTER:
435  * @pspec: a valid #GParamSpec instance
436  * 
437  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_POINTER.
438  * 
439  * Returns: %TRUE on success.
440  */
441 #define G_IS_PARAM_SPEC_POINTER(pspec)     (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_POINTER))
442 /**
443  * G_PARAM_SPEC_POINTER:
444  * @pspec: a valid #GParamSpec instance
445  * 
446  * Casts a #GParamSpec instance into a #GParamSpecPointer.
447  */
448 #define G_PARAM_SPEC_POINTER(pspec)        (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_POINTER, GParamSpecPointer))
449
450 /**
451  * G_TYPE_PARAM_VALUE_ARRAY:
452  * 
453  * The #GType of #GParamSpecValueArray.
454  */
455 #define G_TYPE_PARAM_VALUE_ARRAY           (g_param_spec_types[18])
456 /**
457  * G_IS_PARAM_SPEC_VALUE_ARRAY:
458  * @pspec: a valid #GParamSpec instance
459  * 
460  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_VALUE_ARRAY.
461  * 
462  * Returns: %TRUE on success.
463  */
464 #define G_IS_PARAM_SPEC_VALUE_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_VALUE_ARRAY))
465 /**
466  * G_PARAM_SPEC_VALUE_ARRAY:
467  * @pspec: a valid #GParamSpec instance
468  * 
469  * Cast a #GParamSpec instance into a #GParamSpecValueArray.
470  */
471 #define G_PARAM_SPEC_VALUE_ARRAY(pspec)    (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_VALUE_ARRAY, GParamSpecValueArray))
472
473 /**
474  * G_TYPE_PARAM_OBJECT:
475  * 
476  * The #GType of #GParamSpecObject.
477  */
478 #define G_TYPE_PARAM_OBJECT                (g_param_spec_types[19])
479 /**
480  * G_IS_PARAM_SPEC_OBJECT:
481  * @pspec: a valid #GParamSpec instance
482  * 
483  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_OBJECT.
484  * 
485  * Returns: %TRUE on success.
486  */
487 #define G_IS_PARAM_SPEC_OBJECT(pspec)      (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_OBJECT))
488 /**
489  * G_PARAM_SPEC_OBJECT:
490  * @pspec: a valid #GParamSpec instance
491  * 
492  * Casts a #GParamSpec instance into a #GParamSpecObject.
493  */
494 #define G_PARAM_SPEC_OBJECT(pspec)         (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_OBJECT, GParamSpecObject))
495
496 /**
497  * G_TYPE_PARAM_OVERRIDE:
498  * 
499  * The #GType of #GParamSpecOverride.
500  * 
501  * Since: 2.4
502  */
503 #define G_TYPE_PARAM_OVERRIDE              (g_param_spec_types[20])
504 /**
505  * G_IS_PARAM_SPEC_OVERRIDE:
506  * @pspec: a #GParamSpec
507  * 
508  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_OVERRIDE.
509  * 
510  * Since: 2.4
511  * Returns: %TRUE on success.
512  */
513 #define G_IS_PARAM_SPEC_OVERRIDE(pspec)    (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_OVERRIDE))
514 /**
515  * G_PARAM_SPEC_OVERRIDE:
516  * @pspec: a #GParamSpec
517  * 
518  * Casts a #GParamSpec into a #GParamSpecOverride.
519  * 
520  * Since: 2.4
521  */
522 #define G_PARAM_SPEC_OVERRIDE(pspec)       (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_OVERRIDE, GParamSpecOverride))
523
524 /**
525  * G_TYPE_PARAM_GTYPE:
526  * 
527  * The #GType of #GParamSpecGType.
528  * 
529  * Since: 2.10
530  */
531 #define G_TYPE_PARAM_GTYPE                 (g_param_spec_types[21])
532 /**
533  * G_IS_PARAM_SPEC_GTYPE:
534  * @pspec: a #GParamSpec
535  * 
536  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_GTYPE.
537  * 
538  * Since: 2.10
539  * Returns: %TRUE on success. 
540  */
541 #define G_IS_PARAM_SPEC_GTYPE(pspec)       (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_GTYPE))
542 /**
543  * G_PARAM_SPEC_GTYPE:
544  * @pspec: a #GParamSpec
545  * 
546  * Casts a #GParamSpec into a #GParamSpecGType.
547  * 
548  * Since: 2.10
549  */
550 #define G_PARAM_SPEC_GTYPE(pspec)          (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_GTYPE, GParamSpecGType))
551
552 /**
553  * G_TYPE_PARAM_VARIANT:
554  *
555  * The #GType of #GParamSpecVariant.
556  *
557  * Since: 2.26
558  */
559 #define G_TYPE_PARAM_VARIANT                (g_param_spec_types[22])
560 /**
561  * G_IS_PARAM_SPEC_VARIANT:
562  * @pspec: a #GParamSpec
563  *
564  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_VARIANT.
565  *
566  * Returns: %TRUE on success
567  *
568  * Since: 2.26
569  */
570 #define G_IS_PARAM_SPEC_VARIANT(pspec)      (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_VARIANT))
571 /**
572  * G_PARAM_SPEC_VARIANT:
573  * @pspec: a #GParamSpec
574  *
575  * Casts a #GParamSpec into a #GParamSpecVariant.
576  *
577  * Since: 2.26
578  */
579 #define G_PARAM_SPEC_VARIANT(pspec)         (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_VARIANT, GParamSpecVariant))
580
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;
605
606 /**
607  * GParamSpecChar:
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
612  * 
613  * A #GParamSpec derived structure that contains the meta data for character properties.
614  */
615 struct _GParamSpecChar
616 {
617   GParamSpec    parent_instance;
618   
619   gint8         minimum;
620   gint8         maximum;
621   gint8         default_value;
622 };
623 /**
624  * GParamSpecUChar:
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
629  * 
630  * A #GParamSpec derived structure that contains the meta data for unsigned character properties.
631  */
632 struct _GParamSpecUChar
633 {
634   GParamSpec    parent_instance;
635   
636   guint8        minimum;
637   guint8        maximum;
638   guint8        default_value;
639 };
640 /**
641  * GParamSpecBoolean:
642  * @parent_instance: private #GParamSpec portion
643  * @default_value: default value for the property specified
644  * 
645  * A #GParamSpec derived structure that contains the meta data for boolean properties.
646  */
647 struct _GParamSpecBoolean
648 {
649   GParamSpec    parent_instance;
650   
651   gboolean      default_value;
652 };
653 /**
654  * GParamSpecInt:
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
659  * 
660  * A #GParamSpec derived structure that contains the meta data for integer properties.
661  */
662 struct _GParamSpecInt
663 {
664   GParamSpec    parent_instance;
665   
666   gint          minimum;
667   gint          maximum;
668   gint          default_value;
669 };
670 /**
671  * GParamSpecUInt:
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
676  * 
677  * A #GParamSpec derived structure that contains the meta data for unsigned integer properties.
678  */
679 struct _GParamSpecUInt
680 {
681   GParamSpec    parent_instance;
682   
683   guint         minimum;
684   guint         maximum;
685   guint         default_value;
686 };
687 /**
688  * GParamSpecLong:
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
693  * 
694  * A #GParamSpec derived structure that contains the meta data for long integer properties.
695  */
696 struct _GParamSpecLong
697 {
698   GParamSpec    parent_instance;
699   
700   glong         minimum;
701   glong         maximum;
702   glong         default_value;
703 };
704 /**
705  * GParamSpecULong:
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
710  * 
711  * A #GParamSpec derived structure that contains the meta data for unsigned long integer properties.
712  */
713 struct _GParamSpecULong
714 {
715   GParamSpec    parent_instance;
716   
717   gulong        minimum;
718   gulong        maximum;
719   gulong        default_value;
720 };
721 /**
722  * GParamSpecInt64:
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
727  * 
728  * A #GParamSpec derived structure that contains the meta data for 64bit integer properties.
729  */
730 struct _GParamSpecInt64
731 {
732   GParamSpec    parent_instance;
733   
734   gint64        minimum;
735   gint64        maximum;
736   gint64        default_value;
737 };
738 /**
739  * GParamSpecUInt64:
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
744  * 
745  * A #GParamSpec derived structure that contains the meta data for unsigned 64bit integer properties.
746  */
747 struct _GParamSpecUInt64
748 {
749   GParamSpec    parent_instance;
750   
751   guint64       minimum;
752   guint64       maximum;
753   guint64       default_value;
754 };
755 /**
756  * GParamSpecUnichar:
757  * @parent_instance: private #GParamSpec portion
758  * @default_value: default value for the property specified
759  * 
760  * A #GParamSpec derived structure that contains the meta data for unichar (unsigned integer) properties.
761  */
762 struct _GParamSpecUnichar
763 {
764   GParamSpec    parent_instance;
765   
766   gunichar      default_value;
767 };
768 /**
769  * GParamSpecEnum:
770  * @parent_instance: private #GParamSpec portion
771  * @enum_class: the #GEnumClass for the enum
772  * @default_value: default value for the property specified
773  * 
774  * A #GParamSpec derived structure that contains the meta data for enum 
775  * properties.
776  */
777 struct _GParamSpecEnum
778 {
779   GParamSpec    parent_instance;
780   
781   GEnumClass   *enum_class;
782   gint          default_value;
783 };
784 /**
785  * GParamSpecFlags:
786  * @parent_instance: private #GParamSpec portion
787  * @flags_class: the #GFlagsClass for the flags
788  * @default_value: default value for the property specified
789  * 
790  * A #GParamSpec derived structure that contains the meta data for flags
791  * properties.
792  */
793 struct _GParamSpecFlags
794 {
795   GParamSpec    parent_instance;
796   
797   GFlagsClass  *flags_class;
798   guint         default_value;
799 };
800 /**
801  * GParamSpecFloat:
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.
808  * 
809  * A #GParamSpec derived structure that contains the meta data for float properties.
810  */
811 struct _GParamSpecFloat
812 {
813   GParamSpec    parent_instance;
814   
815   gfloat        minimum;
816   gfloat        maximum;
817   gfloat        default_value;
818   gfloat        epsilon;
819 };
820 /**
821  * GParamSpecDouble:
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.
828  * 
829  * A #GParamSpec derived structure that contains the meta data for double properties.
830  */
831 struct _GParamSpecDouble
832 {
833   GParamSpec    parent_instance;
834   
835   gdouble       minimum;
836   gdouble       maximum;
837   gdouble       default_value;
838   gdouble       epsilon;
839 };
840 /**
841  * GParamSpecString:
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
849  * 
850  * A #GParamSpec derived structure that contains the meta data for string
851  * properties.
852  */
853 struct _GParamSpecString
854 {
855   GParamSpec    parent_instance;
856   
857   gchar        *default_value;
858   gchar        *cset_first;
859   gchar        *cset_nth;
860   gchar         substitutor;
861   guint         null_fold_if_empty : 1;
862   guint         ensure_non_null : 1;
863 };
864 /**
865  * GParamSpecParam:
866  * @parent_instance: private #GParamSpec portion
867  * 
868  * A #GParamSpec derived structure that contains the meta data for %G_TYPE_PARAM
869  * properties.
870  */
871 struct _GParamSpecParam
872 {
873   GParamSpec    parent_instance;
874 };
875 /**
876  * GParamSpecBoxed:
877  * @parent_instance: private #GParamSpec portion
878  * 
879  * A #GParamSpec derived structure that contains the meta data for boxed properties.
880  */
881 struct _GParamSpecBoxed
882 {
883   GParamSpec    parent_instance;
884 };
885 /**
886  * GParamSpecPointer:
887  * @parent_instance: private #GParamSpec portion
888  * 
889  * A #GParamSpec derived structure that contains the meta data for pointer properties.
890  */
891 struct _GParamSpecPointer
892 {
893   GParamSpec    parent_instance;
894 };
895 /**
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
900  * 
901  * A #GParamSpec derived structure that contains the meta data for #GValueArray properties.
902  */
903 struct _GParamSpecValueArray
904 {
905   GParamSpec    parent_instance;
906   GParamSpec   *element_spec;
907   guint         fixed_n_elements;
908 };
909 /**
910  * GParamSpecObject:
911  * @parent_instance: private #GParamSpec portion
912  * 
913  * A #GParamSpec derived structure that contains the meta data for object properties.
914  */
915 struct _GParamSpecObject
916 {
917   GParamSpec    parent_instance;
918 };
919 /**
920  * GParamSpecOverride:
921  * 
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.
930  * 
931  * Since: 2.4
932  */
933 struct _GParamSpecOverride
934 {
935   /*< private >*/
936   GParamSpec    parent_instance;
937   GParamSpec   *overridden;
938 };
939 /**
940  * GParamSpecGType:
941  * @parent_instance: private #GParamSpec portion
942  * @is_a_type: a #GType whose subtypes can occur as values
943  * 
944  * A #GParamSpec derived structure that contains the meta data for #GType properties.
945  * 
946  * Since: 2.10
947  */
948 struct _GParamSpecGType
949 {
950   GParamSpec    parent_instance;
951   GType         is_a_type;
952 };
953 /**
954  * GParamSpecVariant:
955  * @parent_instance: private #GParamSpec portion
956  * @type: a #GVariantType, or %NULL
957  * @default_value: a #GVariant, or %NULL
958  *
959  * A #GParamSpec derived structure that contains the meta data for #GVariant properties.
960  *
961  * Since: 2.26
962  */
963 struct _GParamSpecVariant
964 {
965   GParamSpec    parent_instance;
966   GVariantType *type;
967   GVariant     *default_value;
968
969   /*< private >*/
970   gpointer      padding[4];
971 };
972
973 /* --- GParamSpec prototypes --- */
974 GParamSpec*     g_param_spec_char        (const gchar    *name,
975                                           const gchar    *nick,
976                                           const gchar    *blurb,
977                                           gint8           minimum,
978                                           gint8           maximum,
979                                           gint8           default_value,
980                                           GParamFlags     flags);
981 GParamSpec*     g_param_spec_uchar       (const gchar    *name,
982                                           const gchar    *nick,
983                                           const gchar    *blurb,
984                                           guint8          minimum,
985                                           guint8          maximum,
986                                           guint8          default_value,
987                                           GParamFlags     flags);
988 GParamSpec*     g_param_spec_boolean     (const gchar    *name,
989                                           const gchar    *nick,
990                                           const gchar    *blurb,
991                                           gboolean        default_value,
992                                           GParamFlags     flags);
993 GParamSpec*     g_param_spec_int         (const gchar    *name,
994                                           const gchar    *nick,
995                                           const gchar    *blurb,
996                                           gint            minimum,
997                                           gint            maximum,
998                                           gint            default_value,
999                                           GParamFlags     flags);
1000 GParamSpec*     g_param_spec_uint        (const gchar    *name,
1001                                           const gchar    *nick,
1002                                           const gchar    *blurb,
1003                                           guint           minimum,
1004                                           guint           maximum,
1005                                           guint           default_value,
1006                                           GParamFlags     flags);
1007 GParamSpec*     g_param_spec_long        (const gchar    *name,
1008                                           const gchar    *nick,
1009                                           const gchar    *blurb,
1010                                           glong           minimum,
1011                                           glong           maximum,
1012                                           glong           default_value,
1013                                           GParamFlags     flags);
1014 GParamSpec*     g_param_spec_ulong       (const gchar    *name,
1015                                           const gchar    *nick,
1016                                           const gchar    *blurb,
1017                                           gulong          minimum,
1018                                           gulong          maximum,
1019                                           gulong          default_value,
1020                                           GParamFlags     flags);
1021 GParamSpec*     g_param_spec_int64       (const gchar    *name,
1022                                           const gchar    *nick,
1023                                           const gchar    *blurb,
1024                                           gint64          minimum,
1025                                           gint64          maximum,
1026                                           gint64          default_value,
1027                                           GParamFlags     flags);
1028 GParamSpec*     g_param_spec_uint64      (const gchar    *name,
1029                                           const gchar    *nick,
1030                                           const gchar    *blurb,
1031                                           guint64         minimum,
1032                                           guint64         maximum,
1033                                           guint64         default_value,
1034                                           GParamFlags     flags);
1035 GParamSpec*     g_param_spec_unichar      (const gchar    *name,
1036                                           const gchar    *nick,
1037                                           const gchar    *blurb,
1038                                           gunichar        default_value,
1039                                           GParamFlags     flags);
1040 GParamSpec*     g_param_spec_enum        (const gchar    *name,
1041                                           const gchar    *nick,
1042                                           const gchar    *blurb,
1043                                           GType           enum_type,
1044                                           gint            default_value,
1045                                           GParamFlags     flags);
1046 GParamSpec*     g_param_spec_flags       (const gchar    *name,
1047                                           const gchar    *nick,
1048                                           const gchar    *blurb,
1049                                           GType           flags_type,
1050                                           guint           default_value,
1051                                           GParamFlags     flags);
1052 GParamSpec*     g_param_spec_float       (const gchar    *name,
1053                                           const gchar    *nick,
1054                                           const gchar    *blurb,
1055                                           gfloat          minimum,
1056                                           gfloat          maximum,
1057                                           gfloat          default_value,
1058                                           GParamFlags     flags);
1059 GParamSpec*     g_param_spec_double      (const gchar    *name,
1060                                           const gchar    *nick,
1061                                           const gchar    *blurb,
1062                                           gdouble         minimum,
1063                                           gdouble         maximum,
1064                                           gdouble         default_value,
1065                                           GParamFlags     flags);
1066 GParamSpec*     g_param_spec_string      (const gchar    *name,
1067                                           const gchar    *nick,
1068                                           const gchar    *blurb,
1069                                           const gchar    *default_value,
1070                                           GParamFlags     flags);
1071 GParamSpec*     g_param_spec_param       (const gchar    *name,
1072                                           const gchar    *nick,
1073                                           const gchar    *blurb,
1074                                           GType           param_type,
1075                                           GParamFlags     flags);
1076 GParamSpec*     g_param_spec_boxed       (const gchar    *name,
1077                                           const gchar    *nick,
1078                                           const gchar    *blurb,
1079                                           GType           boxed_type,
1080                                           GParamFlags     flags);
1081 GParamSpec*     g_param_spec_pointer     (const gchar    *name,
1082                                           const gchar    *nick,
1083                                           const gchar    *blurb,
1084                                           GParamFlags     flags);
1085 GParamSpec*     g_param_spec_value_array (const gchar    *name,
1086                                           const gchar    *nick,
1087                                           const gchar    *blurb,
1088                                           GParamSpec     *element_spec,
1089                                           GParamFlags     flags);
1090 GParamSpec*     g_param_spec_object      (const gchar    *name,
1091                                           const gchar    *nick,
1092                                           const gchar    *blurb,
1093                                           GType           object_type,
1094                                           GParamFlags     flags);
1095 GParamSpec*     g_param_spec_override    (const gchar    *name,
1096                                           GParamSpec     *overridden);
1097 GParamSpec*     g_param_spec_gtype       (const gchar    *name,
1098                                           const gchar    *nick,
1099                                           const gchar    *blurb,
1100                                           GType           is_a_type,
1101                                           GParamFlags     flags);
1102 GParamSpec*     g_param_spec_variant     (const gchar        *name,
1103                                           const gchar        *nick,
1104                                           const gchar        *blurb,
1105                                           const GVariantType *type,
1106                                           GVariant           *default_value,
1107                                           GParamFlags         flags);
1108
1109 /* --- internal --- */
1110 /* We prefix variable declarations so they can
1111  * properly get exported in windows dlls.
1112  */
1113 #ifndef GOBJECT_VAR
1114 #  ifdef G_PLATFORM_WIN32
1115 #    ifdef GOBJECT_STATIC_COMPILATION
1116 #      define GOBJECT_VAR extern
1117 #    else /* !GOBJECT_STATIC_COMPILATION */
1118 #      ifdef GOBJECT_COMPILATION
1119 #        ifdef DLL_EXPORT
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 */
1132
1133 GOBJECT_VAR GType *g_param_spec_types;
1134
1135 G_END_DECLS
1136
1137 #endif /* __G_PARAMSPECS_H__ */