• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 /* --- 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;
576 
577 /**
578  * GParamSpecChar:
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
583  *
584  * A #GParamSpec derived structure that contains the meta data for character properties.
585  */
586 struct _GParamSpecChar
587 {
588   GParamSpec    parent_instance;
589 
590   gint8         minimum;
591   gint8         maximum;
592   gint8         default_value;
593 };
594 /**
595  * GParamSpecUChar:
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
600  *
601  * A #GParamSpec derived structure that contains the meta data for unsigned character properties.
602  */
603 struct _GParamSpecUChar
604 {
605   GParamSpec    parent_instance;
606 
607   guint8        minimum;
608   guint8        maximum;
609   guint8        default_value;
610 };
611 /**
612  * GParamSpecBoolean:
613  * @parent_instance: private #GParamSpec portion
614  * @default_value: default value for the property specified
615  *
616  * A #GParamSpec derived structure that contains the meta data for boolean properties.
617  */
618 struct _GParamSpecBoolean
619 {
620   GParamSpec    parent_instance;
621 
622   gboolean      default_value;
623 };
624 /**
625  * GParamSpecInt:
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
630  *
631  * A #GParamSpec derived structure that contains the meta data for integer properties.
632  */
633 struct _GParamSpecInt
634 {
635   GParamSpec    parent_instance;
636 
637   gint          minimum;
638   gint          maximum;
639   gint          default_value;
640 };
641 /**
642  * GParamSpecUInt:
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
647  *
648  * A #GParamSpec derived structure that contains the meta data for unsigned integer properties.
649  */
650 struct _GParamSpecUInt
651 {
652   GParamSpec    parent_instance;
653 
654   guint         minimum;
655   guint         maximum;
656   guint         default_value;
657 };
658 /**
659  * GParamSpecLong:
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
664  *
665  * A #GParamSpec derived structure that contains the meta data for long integer properties.
666  */
667 struct _GParamSpecLong
668 {
669   GParamSpec    parent_instance;
670 
671   glong         minimum;
672   glong         maximum;
673   glong         default_value;
674 };
675 /**
676  * GParamSpecULong:
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
681  *
682  * A #GParamSpec derived structure that contains the meta data for unsigned long integer properties.
683  */
684 struct _GParamSpecULong
685 {
686   GParamSpec    parent_instance;
687 
688   gulong        minimum;
689   gulong        maximum;
690   gulong        default_value;
691 };
692 /**
693  * GParamSpecInt64:
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
698  *
699  * A #GParamSpec derived structure that contains the meta data for 64bit integer properties.
700  */
701 struct _GParamSpecInt64
702 {
703   GParamSpec    parent_instance;
704 
705   gint64        minimum;
706   gint64        maximum;
707   gint64        default_value;
708 };
709 /**
710  * GParamSpecUInt64:
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
715  *
716  * A #GParamSpec derived structure that contains the meta data for unsigned 64bit integer properties.
717  */
718 struct _GParamSpecUInt64
719 {
720   GParamSpec    parent_instance;
721 
722   guint64       minimum;
723   guint64       maximum;
724   guint64       default_value;
725 };
726 /**
727  * GParamSpecUnichar:
728  * @parent_instance: private #GParamSpec portion
729  * @default_value: default value for the property specified
730  *
731  * A #GParamSpec derived structure that contains the meta data for unichar (unsigned integer) properties.
732  */
733 struct _GParamSpecUnichar
734 {
735   GParamSpec    parent_instance;
736 
737   gunichar      default_value;
738 };
739 /**
740  * GParamSpecEnum:
741  * @parent_instance: private #GParamSpec portion
742  * @enum_class: the #GEnumClass for the enum
743  * @default_value: default value for the property specified
744  *
745  * A #GParamSpec derived structure that contains the meta data for enum
746  * properties.
747  */
748 struct _GParamSpecEnum
749 {
750   GParamSpec    parent_instance;
751 
752   GEnumClass   *enum_class;
753   gint          default_value;
754 };
755 /**
756  * GParamSpecFlags:
757  * @parent_instance: private #GParamSpec portion
758  * @flags_class: the #GFlagsClass for the flags
759  * @default_value: default value for the property specified
760  *
761  * A #GParamSpec derived structure that contains the meta data for flags
762  * properties.
763  */
764 struct _GParamSpecFlags
765 {
766   GParamSpec    parent_instance;
767 
768   GFlagsClass  *flags_class;
769   guint         default_value;
770 };
771 /**
772  * GParamSpecFloat:
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.
779  *
780  * A #GParamSpec derived structure that contains the meta data for float properties.
781  */
782 struct _GParamSpecFloat
783 {
784   GParamSpec    parent_instance;
785 
786   gfloat        minimum;
787   gfloat        maximum;
788   gfloat        default_value;
789   gfloat        epsilon;
790 };
791 /**
792  * GParamSpecDouble:
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.
799  *
800  * A #GParamSpec derived structure that contains the meta data for double properties.
801  */
802 struct _GParamSpecDouble
803 {
804   GParamSpec    parent_instance;
805 
806   gdouble       minimum;
807   gdouble       maximum;
808   gdouble       default_value;
809   gdouble       epsilon;
810 };
811 /**
812  * GParamSpecString:
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
820  *
821  * A #GParamSpec derived structure that contains the meta data for string
822  * properties.
823  */
824 struct _GParamSpecString
825 {
826   GParamSpec    parent_instance;
827 
828   gchar        *default_value;
829   gchar        *cset_first;
830   gchar        *cset_nth;
831   gchar         substitutor;
832   guint         null_fold_if_empty : 1;
833   guint         ensure_non_null : 1;
834 };
835 /**
836  * GParamSpecParam:
837  * @parent_instance: private #GParamSpec portion
838  *
839  * A #GParamSpec derived structure that contains the meta data for %G_TYPE_PARAM
840  * properties.
841  */
842 struct _GParamSpecParam
843 {
844   GParamSpec    parent_instance;
845 };
846 /**
847  * GParamSpecBoxed:
848  * @parent_instance: private #GParamSpec portion
849  *
850  * A #GParamSpec derived structure that contains the meta data for boxed properties.
851  */
852 struct _GParamSpecBoxed
853 {
854   GParamSpec    parent_instance;
855 };
856 /**
857  * GParamSpecPointer:
858  * @parent_instance: private #GParamSpec portion
859  *
860  * A #GParamSpec derived structure that contains the meta data for pointer properties.
861  */
862 struct _GParamSpecPointer
863 {
864   GParamSpec    parent_instance;
865 };
866 /**
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
871  *
872  * A #GParamSpec derived structure that contains the meta data for #GValueArray properties.
873  */
874 struct _GParamSpecValueArray
875 {
876   GParamSpec    parent_instance;
877   GParamSpec   *element_spec;
878   guint		fixed_n_elements;
879 };
880 /**
881  * GParamSpecObject:
882  * @parent_instance: private #GParamSpec portion
883  *
884  * A #GParamSpec derived structure that contains the meta data for object properties.
885  */
886 struct _GParamSpecObject
887 {
888   GParamSpec    parent_instance;
889 };
890 /**
891  * GParamSpecOverride:
892  *
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.
901  *
902  * Since: 2.4
903  */
904 struct _GParamSpecOverride
905 {
906   /*< private >*/
907   GParamSpec    parent_instance;
908   GParamSpec   *overridden;
909 };
910 /**
911  * GParamSpecGType:
912  * @parent_instance: private #GParamSpec portion
913  * @is_a_type: a #GType whose subtypes can occur as values
914  *
915  * A #GParamSpec derived structure that contains the meta data for #GType properties.
916  *
917  * Since: 2.10
918  */
919 struct _GParamSpecGType
920 {
921   GParamSpec    parent_instance;
922   GType         is_a_type;
923 };
924 
925 /* --- GParamSpec prototypes --- */
926 GParamSpec*	g_param_spec_char	 (const gchar	 *name,
927 					  const gchar	 *nick,
928 					  const gchar	 *blurb,
929 					  gint8		  minimum,
930 					  gint8		  maximum,
931 					  gint8		  default_value,
932 					  GParamFlags	  flags);
933 GParamSpec*	g_param_spec_uchar	 (const gchar	 *name,
934 					  const gchar	 *nick,
935 					  const gchar	 *blurb,
936 					  guint8	  minimum,
937 					  guint8	  maximum,
938 					  guint8	  default_value,
939 					  GParamFlags	  flags);
940 GParamSpec*	g_param_spec_boolean	 (const gchar	 *name,
941 					  const gchar	 *nick,
942 					  const gchar	 *blurb,
943 					  gboolean	  default_value,
944 					  GParamFlags	  flags);
945 GParamSpec*	g_param_spec_int	 (const gchar	 *name,
946 					  const gchar	 *nick,
947 					  const gchar	 *blurb,
948 					  gint		  minimum,
949 					  gint		  maximum,
950 					  gint		  default_value,
951 					  GParamFlags	  flags);
952 GParamSpec*	g_param_spec_uint	 (const gchar	 *name,
953 					  const gchar	 *nick,
954 					  const gchar	 *blurb,
955 					  guint		  minimum,
956 					  guint		  maximum,
957 					  guint		  default_value,
958 					  GParamFlags	  flags);
959 GParamSpec*	g_param_spec_long	 (const gchar	 *name,
960 					  const gchar	 *nick,
961 					  const gchar	 *blurb,
962 					  glong		  minimum,
963 					  glong		  maximum,
964 					  glong		  default_value,
965 					  GParamFlags	  flags);
966 GParamSpec*	g_param_spec_ulong	 (const gchar	 *name,
967 					  const gchar	 *nick,
968 					  const gchar	 *blurb,
969 					  gulong	  minimum,
970 					  gulong	  maximum,
971 					  gulong	  default_value,
972 					  GParamFlags	  flags);
973 GParamSpec*	g_param_spec_int64	 (const gchar	 *name,
974 					  const gchar	 *nick,
975 					  const gchar	 *blurb,
976 					  gint64       	  minimum,
977 					  gint64       	  maximum,
978 					  gint64       	  default_value,
979 					  GParamFlags	  flags);
980 GParamSpec*	g_param_spec_uint64	 (const gchar	 *name,
981 					  const gchar	 *nick,
982 					  const gchar	 *blurb,
983 					  guint64	  minimum,
984 					  guint64	  maximum,
985 					  guint64	  default_value,
986 					  GParamFlags	  flags);
987 GParamSpec*	g_param_spec_unichar      (const gchar    *name,
988 				          const gchar    *nick,
989 				          const gchar    *blurb,
990 				          gunichar	  default_value,
991 				          GParamFlags     flags);
992 GParamSpec*	g_param_spec_enum	 (const gchar	 *name,
993 					  const gchar	 *nick,
994 					  const gchar	 *blurb,
995 					  GType		  enum_type,
996 					  gint		  default_value,
997 					  GParamFlags	  flags);
998 GParamSpec*	g_param_spec_flags	 (const gchar	 *name,
999 					  const gchar	 *nick,
1000 					  const gchar	 *blurb,
1001 					  GType		  flags_type,
1002 					  guint		  default_value,
1003 					  GParamFlags	  flags);
1004 GParamSpec*	g_param_spec_float	 (const gchar	 *name,
1005 					  const gchar	 *nick,
1006 					  const gchar	 *blurb,
1007 					  gfloat	  minimum,
1008 					  gfloat	  maximum,
1009 					  gfloat	  default_value,
1010 					  GParamFlags	  flags);
1011 GParamSpec*	g_param_spec_double	 (const gchar	 *name,
1012 					  const gchar	 *nick,
1013 					  const gchar	 *blurb,
1014 					  gdouble	  minimum,
1015 					  gdouble	  maximum,
1016 					  gdouble	  default_value,
1017 					  GParamFlags	  flags);
1018 GParamSpec*	g_param_spec_string	 (const gchar	 *name,
1019 					  const gchar	 *nick,
1020 					  const gchar	 *blurb,
1021 					  const gchar	 *default_value,
1022 					  GParamFlags	  flags);
1023 GParamSpec*	g_param_spec_param	 (const gchar	 *name,
1024 					  const gchar	 *nick,
1025 					  const gchar	 *blurb,
1026 					  GType		  param_type,
1027 					  GParamFlags	  flags);
1028 GParamSpec*	g_param_spec_boxed	 (const gchar	 *name,
1029 					  const gchar	 *nick,
1030 					  const gchar	 *blurb,
1031 					  GType		  boxed_type,
1032 					  GParamFlags	  flags);
1033 GParamSpec*	g_param_spec_pointer	 (const gchar	 *name,
1034 					  const gchar	 *nick,
1035 					  const gchar	 *blurb,
1036 					  GParamFlags	  flags);
1037 GParamSpec*	g_param_spec_value_array (const gchar	 *name,
1038 					  const gchar	 *nick,
1039 					  const gchar	 *blurb,
1040 					  GParamSpec	 *element_spec,
1041 					  GParamFlags	  flags);
1042 GParamSpec*	g_param_spec_object	 (const gchar	 *name,
1043 					  const gchar	 *nick,
1044 					  const gchar	 *blurb,
1045 					  GType		  object_type,
1046 					  GParamFlags	  flags);
1047 GParamSpec*	g_param_spec_override    (const gchar    *name,
1048 					  GParamSpec     *overridden);
1049 GParamSpec*	g_param_spec_gtype	 (const gchar	 *name,
1050 					  const gchar	 *nick,
1051 					  const gchar	 *blurb,
1052 					  GType           is_a_type,
1053 					  GParamFlags	  flags);
1054 
1055 /* --- internal --- */
1056 /* We prefix variable declarations so they can
1057  * properly get exported in windows dlls.
1058  */
1059 #ifndef GOBJECT_VAR
1060 #  ifdef G_PLATFORM_WIN32
1061 #    ifdef GOBJECT_STATIC_COMPILATION
1062 #      define GOBJECT_VAR extern
1063 #    else /* !GOBJECT_STATIC_COMPILATION */
1064 #      ifdef GOBJECT_COMPILATION
1065 #        ifdef DLL_EXPORT
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 */
1078 
1079 GOBJECT_VAR GType *g_param_spec_types;
1080 
1081 G_END_DECLS
1082 
1083 #endif /* __G_PARAMSPECS_H__ */
1084