eddb3712977811ceab0c2c1d2c27b7156dfccb42
[platform/upstream/glib.git] / docs / reference / gobject / tmpl / gtype.sgml
1 <!-- ##### SECTION Title ##### -->
2 GType
3
4 <!-- ##### SECTION Short_Description ##### -->
5 The GLib Runtime type identification and management system
6
7 <!-- ##### SECTION Long_Description ##### -->
8 <para>
9 The GType API is the foundation of the GObject system.  It provides the
10 facilities for registering and managing all fundamental data types,
11 user-defined object and interface types.  Before using any GType
12 or GObject functions, g_type_init() must be called to initialize the
13 type system.
14 </para>
15 <para>
16 For type creation and registration purposes, all types fall into one of
17 two categories: static or dynamic.  Static types are never loaded or
18 unloaded at run-time as dynamic types may be.  Static types are created
19 with g_type_register_static() that gets type specific information passed
20 in via a #GTypeInfo structure.
21 Dynamic types are created with g_type_register_dynamic() which takes a
22 #GTypePlugin structure instead. The remaining type information (the
23 #GTypeInfo structure) is retrieved during runtime through #GTypePlugin
24 and the g_type_plugin_*() API.
25 These registration functions are usually called only once from a 
26 function whose only purpose is to return the type identifier for a 
27 specific class.  Once the type (or class or interface) is registered,
28 it may be instantiated, inherited, or implemented depending on exactly
29 what sort of type it is.
30 There is also a third registration function for registering fundamental
31 types called g_type_register_fundamental() which requires both a #GTypeInfo
32 structure and a #GTypeFundamentalInfo structure but it is seldom used
33 since most fundamental types are predefined rather than user-defined.
34 </para>
35
36 <!-- ##### SECTION See_Also ##### -->
37 <para>
38
39 </para>
40
41 <!-- ##### TYPEDEF GType ##### -->
42 <para>
43 A numerical value which represents the unique identifier of a registered
44 type.
45 </para>
46
47
48 <!-- ##### MACRO G_TYPE_FUNDAMENTAL ##### -->
49 <para>
50 Returns the fundamental type which is the ancestor of @type.
51 Fundamental types are types that serve as fundaments for the derived types, 
52 thus they are the roots of distinct inheritance hierarchies.
53 </para>
54
55 @type: A #GType value.
56
57
58 <!-- ##### MACRO G_TYPE_FUNDAMENTAL_MAX ##### -->
59 <para>
60 An integer constant that represents the number of identifiers reserved
61 for types that are assigned at compile-time.
62 </para>
63
64
65
66 <!-- ##### MACRO G_TYPE_MAKE_FUNDAMENTAL ##### -->
67 <para>
68 Returns the type ID for the fundamental type number @x.
69 Use g_type_fundamental_next() instead of this macro to create new fundamental 
70 types.
71 </para>
72
73 @x: the fundamental type number.
74
75
76 <!-- ##### MACRO G_TYPE_IS_ABSTRACT ##### -->
77 <para>
78 Returns %TRUE if @type is an abstract type.  An abstract type can not be
79 instantiated and is normally used as an abstract base class for
80 derived classes.
81 </para>
82
83 @type: A #GType value.
84
85
86 <!-- ##### MACRO G_TYPE_IS_DERIVED ##### -->
87 <para>
88 Returns %TRUE if @type is derived (or in object-oriented terminology:
89 inherited) from another type (this holds true for all non-fundamental
90 types).
91 </para>
92
93 @type: A #GType value.
94
95
96 <!-- ##### MACRO G_TYPE_IS_FUNDAMENTAL ##### -->
97 <para>
98 Returns %TRUE if @type is a fundamental type.
99 </para>
100
101 @type: A #GType value.
102
103
104 <!-- ##### MACRO G_TYPE_IS_VALUE_TYPE ##### -->
105 <para>
106 Returns %TRUE if @type is a value type which can be used for
107 g_value_init(). 
108 </para>
109
110 @type: A #GType value.
111
112
113 <!-- ##### MACRO G_TYPE_HAS_VALUE_TABLE ##### -->
114 <para>
115 Returns %TRUE if @type has a #GTypeValueTable.
116 </para>
117
118 @type: A #GType value.
119
120
121 <!-- ##### MACRO G_TYPE_IS_CLASSED ##### -->
122 <para>
123 Returns %TRUE if @type is a classed type.
124 </para>
125
126 @type: A #GType value.
127
128
129 <!-- ##### MACRO G_TYPE_IS_INSTANTIATABLE ##### -->
130 <para>
131 Returns %TRUE if @type can be instantiated.  Instantiation is the
132 process of creating an instance (object) of this type.
133 </para>
134
135 @type: A #GType value.
136
137
138 <!-- ##### MACRO G_TYPE_IS_DERIVABLE ##### -->
139 <para>
140 Returns %TRUE if @type is a derivable type.  A derivable type can
141 be used as the base class of a flat (single-level) class hierarchy.
142 </para>
143
144 @type: A #GType value.
145
146
147 <!-- ##### MACRO G_TYPE_IS_DEEP_DERIVABLE ##### -->
148 <para>
149 Returns %TRUE if @type is a deep derivable type.  A deep derivable type
150 can be used as the base class of a deep (multi-level) class hierarchy.
151 </para>
152
153 @type: A #GType value.
154
155
156 <!-- ##### MACRO G_TYPE_IS_INTERFACE ##### -->
157 <para>
158 Returns %TRUE if @type is an interface type.
159 Interface types are types that provide pure APIs, the implementation
160 of which is provided by another type (which is then said to conform
161 to the interface).  GLib interfaces are somewhat analogous to Java
162 interfaces and C++ classes containing only pure virtual functions, 
163 with the difference that GType interfaces are not derivable (but see
164 g_type_interface_add_prerequisite() for an alternative).
165 </para>
166
167 @type: A #GType value.
168
169
170 <!-- ##### STRUCT GTypeInterface ##### -->
171 <para>
172 An opaque structure used as the base of all interface types.
173 </para>
174
175
176 <!-- ##### STRUCT GTypeInstance ##### -->
177 <para>
178 An opaque structure used as the base of all type instances.
179 </para>
180
181
182 <!-- ##### STRUCT GTypeClass ##### -->
183 <para>
184
185 </para>
186
187
188 <!-- ##### STRUCT GTypeInfo ##### -->
189 <para>
190 This structure is used to provide the type system with the information
191 required to initialize and destruct (finalize) a type's class and
192 instances thereof.
193 The initialized structure is passed to the g_type_register_static() function
194 (or is copied into the provided #GTypeInfo structure in the
195 g_type_plugin_complete_type_info()). The type system will perform a deep
196 copy of this structure, so it's memory does not need to be persistent
197 across invocation of g_type_register_static().
198 </para>
199
200 @class_size:     Size of the class structure (required for interface, classed and instantiatable types).
201 @base_init:      Location of the base initialization function (optional).
202 @base_finalize:  Location of the base finalization function (optional).
203 @class_init:     Location of the class initialization function (optional, for classed and instantiatable types only).
204 @class_finalize: Location of the class finalization function (optional).
205 @class_data:     User-supplied data passed to the class init/finalize functions.
206 @instance_size:  Size of the instance (object) structure (required for instantiatable types only).
207 @n_preallocs:    Number of pre-allocated (cached) instances to reserve memory for (0 indicates no caching).
208 @instance_init:  Location of the instance initialization function (optional, for instantiatable types only).
209 @value_table:    A #GTypeValueTable function table for generic handling of GValues of this type (usually only
210                  useful for fundamental types).
211
212 <!-- ##### STRUCT GTypeFundamentalInfo ##### -->
213 <para>
214 A structure that provides information to the type system which is
215 used specifically for managing fundamental types.  
216 </para>
217
218 @type_flags: 
219
220 <!-- ##### STRUCT GInterfaceInfo ##### -->
221 <para>
222 A structure that provides information to the type system which is
223 used specifically for managing interface types.
224 </para>
225
226 @interface_init:        Location of the function that initializes the interface.
227 @interface_finalize:    Location of the function that finalizes the interface.
228 @interface_data:        Location of user data passed to the @interface_init and
229                         @interface_finalize functions (optional).
230
231 <!-- ##### STRUCT GTypeValueTable ##### -->
232 <para>
233 The #GTypeValueTable provides the functions required by the #GValue implementation,
234 to serve as a container for values of a type.
235 </para>
236
237 @value_init:            Default initialize @values contents by poking values
238                         directly into the value-&gt;data array. The data array of
239                         the #GValue passed into this function was zero-filled
240                         with <function>memset()</function>, so no care has to
241                         be taken to free any
242                         old contents. E.g. for the implementation of a string
243                         value that may never be %NULL, the implementation might
244                         look like:
245 <programlisting>
246 {
247   value-&gt;data[0].v_pointer = g_strdup ("");
248 }
249 </programlisting>
250 @value_free:            Free any old contents that might be left in the
251                         data array of the passed in @value. No resources may
252                         remain allocated through the #GValue contents after
253                         this function returns. E.g. for our above string type:
254 <programlisting>
255 {
256   /* only free strings without a specific flag for static storage */
257   if (!(value-&gt;data[1].v_uint &amp; G_VALUE_NOCOPY_CONTENTS))
258     g_free (value-&gt;data[0].v_pointer);
259 }
260 </programlisting>
261 @value_copy:            @dest_value is a #GValue with zero-filled data section
262                         and @src_value is a properly setup #GValue of same or
263                         derived type.
264                         The purpose of this function is to copy the contents of
265                         @src_value into @dest_value in a way, that even after
266                         @src_value has been freed, the contents of @dest_value
267                         remain valid. String type example:
268 <programlisting>
269 {
270   dest_value-&gt;data[0].v_pointer = g_strdup (src_value-&gt;data[0].v_pointer);
271 }
272 </programlisting>
273 @value_peek_pointer:    If the value contents fit into a pointer, such as objects
274                         or strings, return this pointer, so the caller can peek at
275                         the current contents. To extend on our above string example:
276 <programlisting>
277 {
278   return value-&gt;data[0].v_pointer;
279 }
280 </programlisting>
281 @collect_format:        A string format describing how to collect the contents of
282                         this value, bit-by-bit. Each character in the format represents
283                         an argument to be collected, the characters themselves indicate
284                         the type of the argument. Currently supported arguments are:
285 <variablelist>
286   <varlistentry><term></term><listitem><para>
287         'i' - Integers. passed as collect_values[].v_int.
288   </para></listitem></varlistentry>
289   <varlistentry><term></term><listitem><para>
290         'l' - Longs. passed as collect_values[].v_long.
291   </para></listitem></varlistentry>
292   <varlistentry><term></term><listitem><para>
293         'd' - Doubles. passed as collect_values[].v_double.
294   </para></listitem></varlistentry>
295   <varlistentry><term></term><listitem><para>
296         'p' - Pointers. passed as collect_values[].v_pointer.
297   </para></listitem></varlistentry>
298 </variablelist>
299                         It should be noted, that for variable argument list construction,
300                         ANSI C promotes every type smaller than an integer to an int, and
301                         floats to doubles. So for collection of short int or char, 'i'
302                         needs to be used, and for collection of floats 'd'.
303 @collect_value:         The collect_value() function is responsible for converting the
304                         values collected from a variable argument list into contents
305                         suitable for storage in a GValue. This function should setup
306                         @value similar to value_init(), e.g. for a string value that
307                         does not allow %NULL pointers, it needs to either spew an error,
308                         or do an implicit conversion by storing an empty string.
309                         The @value passed in to this function has a zero-filled data
310                         array, so just like for value_init() it is guaranteed to not
311                         contain any old contents that might need freeing.
312                         @n_collect_values is exactly the string length of @collect_format,
313                         and @collect_values is an array of unions #GTypeCValue with
314                         length @n_collect_values, containing the collected values
315                         according to @collect_format.
316                         @collect_flags is an argument provided as a hint by the caller,
317                         which may contain the flag #G_VALUE_NOCOPY_CONTENTS indicating,
318                         that the collected value contents may be considered "static"
319                         for the duration of the @value lifetime.
320                         Thus an extra copy of the contents stored in @collect_values is
321                         not required for assignment to @value.
322                         For our above string example, we continue with:
323 <programlisting>
324 {
325   if (!collect_values[0].v_pointer)
326     value->data[0].v_pointer = g_strdup ("");
327   else if (collect_flags &amp; G_VALUE_NOCOPY_CONTENTS)
328     {
329       value-&gt;data[0].v_pointer = collect_values[0].v_pointer;
330       /* keep a flag for the value_free() implementation to not free this string */
331       value-&gt;data[1].v_uint = G_VALUE_NOCOPY_CONTENTS;
332     }
333   else
334     value-&gt;data[0].v_pointer = g_strdup (collect_values[0].v_pointer);
335
336   return NULL;
337 }
338 </programlisting>
339                         It should be noted, that it is generally a bad idea to follow the
340                         #G_VALUE_NOCOPY_CONTENTS hint for reference counted types. Due to
341                         reentrancy requirements and reference count assertions performed
342                         by the #GSignal code, reference counts should always be incremented
343                         for reference counted contents stored in the value-&gt;data array.
344                         To deviate from our string example for a moment, and taking a look
345                         at an exemplary implementation for collect_value() of #GObject:
346 <programlisting>
347 {
348   if (collect_values[0].v_pointer)
349     {
350       GObject *object = G_OBJECT (collect_values[0].v_pointer);
351
352       /* never honour G_VALUE_NOCOPY_CONTENTS for ref-counted types */
353       value-&gt;data[0].v_pointer = g_object_ref (object);
354       return NULL;
355     }
356   else
357     return g_strdup_printf ("Object passed as invalid NULL pointer");
358 }
359 </programlisting>
360                         The reference count for valid objects is always incremented,
361                         regardless of @collect_flags. For invalid objects, the example
362                         returns a newly allocated string without altering @value.
363                         Upon success, collect_value() needs to return %NULL, if however
364                         a malicious condition occurred, collect_value() may spew an
365                         error by returning a newly allocated non-%NULL string, giving
366                         a suitable description of the error condition.
367                         The calling code makes no assumptions about the @value
368                         contents being valid upon error returns, @value
369                         is simply thrown away without further freeing. As such, it is
370                         a good idea to not allocate #GValue contents, prior to returning
371                         an error, however, collect_values() is not obliged to return
372                         a correctly setup @value for error returns, simply because
373                         any non-%NULL return is considered a fatal condition so further
374                         program behaviour is undefined.
375 @lcopy_format:          Format description of the arguments to collect for @lcopy_value,
376                         analogous to @collect_format. Usually, @lcopy_format string consists
377                         only of 'p's to provide lcopy_value() with pointers to storage locations.
378 @lcopy_value:           This function is responsible for storing the @value contents into
379                         arguments passed through a variable argument list which got
380                         collected into @collect_values according to @lcopy_format.
381                         @n_collect_values equals the string length of @lcopy_format,
382                         and @collect_flags may contain #G_VALUE_NOCOPY_CONTENTS.
383                         In contrast to collect_value(), lcopy_value() is obliged to
384                         always properly support #G_VALUE_NOCOPY_CONTENTS.
385                         Similar to collect_value() the function may prematurely abort
386                         by returning a newly allocated string describing an error condition.
387                         To complete the string example:
388 <programlisting>
389 {
390   gchar **string_p = collect_values[0].v_pointer;
391
392   if (!string_p)
393     return g_strdup_printf ("string location passed as NULL");
394
395   if (collect_flags &amp; G_VALUE_NOCOPY_CONTENTS)
396     *string_p = value-&gt;data[0].v_pointer;
397   else
398     *string_p = g_strdup (value-&gt;data[0].v_pointer);
399
400 }
401 </programlisting>
402                         And an exemplary version of lcopy_value() for
403                         reference-counted types:
404 <programlisting>
405 {
406   GObject **object_p = collect_values[0].v_pointer;
407
408   if (!object_p)
409     return g_strdup_printf ("object location passed as NULL");
410   if (!value-&gt;data[0].v_pointer)
411     *object_p = NULL;
412   else if (collect_flags &amp; G_VALUE_NOCOPY_CONTENTS) /* always honour */
413     *object_p = value-&gt;data[0].v_pointer;
414   else
415     *object_p = g_object_ref (value-&gt;data[0].v_pointer);
416   return NULL;
417 }
418 </programlisting>
419
420 <!-- ##### MACRO G_TYPE_FROM_INSTANCE ##### -->
421 <para>
422 Returns the type identifier from a given @instance structure.
423 </para>
424
425 @instance: Location of a valid #GTypeInstance structure.
426
427
428 <!-- ##### MACRO G_TYPE_FROM_CLASS ##### -->
429 <para>
430 Returns the type identifier from a given @class structure.
431 </para>
432
433 @g_class: Location of a valid #GTypeClass structure.
434
435
436 <!-- ##### MACRO G_TYPE_FROM_INTERFACE ##### -->
437 <para>
438 Returns the type identifier from a given @interface structure.
439 </para>
440
441 @g_iface: Location of a valid #GTypeInterface structure.
442
443
444 <!-- ##### MACRO G_TYPE_INSTANCE_GET_CLASS ##### -->
445 <para>
446 Returns the class structure of a given @instance, casted
447 to a specified anchestor type @g_type of the instance.
448 </para>
449
450 @instance:      Location of the #GTypeInstance structure.
451 @g_type:        The anchestor type of the class to be returned.
452 @c_type:        The corresponding C type of @g_type.
453
454
455 <!-- ##### MACRO G_TYPE_INSTANCE_GET_INTERFACE ##### -->
456 <para>
457 Returns the interface structure for interface @g_type of a given @instance.
458 </para>
459
460 @instance: Location of the #GTypeInstance structure.
461 @g_type: The interface type to be returned.
462 @c_type: The corresponding C type of @g_type.
463
464
465 <!-- ##### MACRO G_TYPE_INSTANCE_GET_PRIVATE ##### -->
466 <para>
467 Gets the private structure for a particular type.
468 The private structure must have been registered in the
469 class_init function with g_type_class_add_private().
470 </para>
471
472 @instance: the instance of a type deriving from @private_type.
473 @g_type: the type identifying which private data to retrieve.
474 @c_type: The C type for the private structure.
475
476 <!-- ##### MACRO G_TYPE_CHECK_INSTANCE ##### -->
477 <para>
478
479 </para>
480
481 @instance: 
482
483
484 <!-- ##### MACRO G_TYPE_CHECK_INSTANCE_CAST ##### -->
485 <para>
486
487 </para>
488
489 @instance: 
490 @g_type: 
491 @c_type: 
492
493
494 <!-- ##### MACRO G_TYPE_CHECK_INSTANCE_TYPE ##### -->
495 <para>
496
497 </para>
498
499 @instance: 
500 @g_type: 
501
502
503 <!-- ##### MACRO G_TYPE_CHECK_CLASS_CAST ##### -->
504 <para>
505
506 </para>
507
508 @g_class: 
509 @g_type: 
510 @c_type: 
511
512
513 <!-- ##### MACRO G_TYPE_CHECK_CLASS_TYPE ##### -->
514 <para>
515
516 </para>
517
518 @g_class: 
519 @g_type: 
520
521
522 <!-- ##### MACRO G_TYPE_CHECK_VALUE ##### -->
523 <para>
524
525 </para>
526
527 @value: 
528
529
530 <!-- ##### MACRO G_TYPE_CHECK_VALUE_TYPE ##### -->
531 <para>
532
533 </para>
534
535 @value: 
536 @g_type: 
537
538
539 <!-- ##### MACRO G_TYPE_FLAG_RESERVED_ID_BIT ##### -->
540 <para>
541
542 </para>
543
544
545
546 <!-- ##### FUNCTION g_type_init ##### -->
547 <para>
548 Prior to any use of the type system, g_type_init() has to be called to initialize
549 the type system and assorted other code portions (such as the various fundamental
550 type implementations or the signal system).
551 </para>
552
553
554
555 <!-- ##### ENUM GTypeDebugFlags ##### -->
556 <para>
557 The <type>GTypeDebugFlags</type> enumeration values can be passed to
558 g_type_init_with_debug_flags() to trigger debugging messages during runtime.
559 Note that the messages can also be triggered by setting the
560 <envar>GOBJECT_DEBUG</envar> environment variable to a ':'-separated list of 
561 "objects" and "signals".
562
563 </para>
564
565 @G_TYPE_DEBUG_NONE: Print no messages.
566 @G_TYPE_DEBUG_OBJECTS: Print messages about object bookkeeping.
567 @G_TYPE_DEBUG_SIGNALS: Print messages about signal emissions.
568 @G_TYPE_DEBUG_MASK: 
569
570 <!-- ##### FUNCTION g_type_init_with_debug_flags ##### -->
571 <para>
572 Similar to g_type_init(), but additionally sets debug flags.
573 </para>
574
575 @debug_flags: Bitwise combination of #GTypeDebugFlags values for debugging purposes.
576
577
578 <!-- ##### FUNCTION g_type_name ##### -->
579 <para>
580 Returns the unique name that is assigned to a type ID (this is the preferred method
581 to find out whether a specific type has been registered for the passed in ID yet).
582 </para>
583
584 @type:          Type to return name for.
585 @Returns:       Static type name or %NULL.
586
587
588 <!-- ##### FUNCTION g_type_qname ##### -->
589 <para>
590 Return the corresponding quark of the type IDs name.
591 </para>
592
593 @type:    Type to return quark of type name for.
594 @Returns: The type names quark or 0.
595
596
597 <!-- ##### FUNCTION g_type_from_name ##### -->
598 <para>
599 Lookup the type ID from a given type name, returns 0 if no type has been registered under this name
600 (this is the preferred method to find out by name whether a specific type has been registered yet).
601 </para>
602
603 @name:    Type name to lookup.
604 @Returns: Corresponding type ID or 0.
605
606
607 <!-- ##### FUNCTION g_type_parent ##### -->
608 <para>
609 Return the direct parent type of the passed in type.
610 If the passed in type has no parent, i.e. is a fundamental type, 0 is returned.
611 </para>
612
613 @type:    The derived type.
614 @Returns: The parent type.
615
616
617 <!-- ##### FUNCTION g_type_depth ##### -->
618 <para>
619 Returns the length of the ancestry of the passed in type. This includes the
620 type itself, so that e.g. a fundamental type has depth 1.
621 </para>
622
623 @type:    A #GType value.
624 @Returns: The depth of @type.
625
626
627 <!-- ##### FUNCTION g_type_next_base ##### -->
628 <para>
629 Given a @leaf_type and a @root_type which is contained in its anchestry, return
630 the type that @root_type is the immediate parent of.
631 In other words, this function determines the type that is derived directly from
632 @root_type which is also a base class of @leaf_type.  Given a root type and a
633 leaf type, this function can be used to determine the types and order in which
634 the leaf type is descended from the root type.
635 </para>
636
637 @leaf_type:     Descendant of @root_type and the type to be returned.
638 @root_type:     Immediate parent of the returned type.
639 @Returns:       Immediate child of @root_type and anchestor of @leaf_type.
640
641
642 <!-- ##### FUNCTION g_type_is_a ##### -->
643 <para>
644 If @is_a_type is a derivable type, check whether @type is a descendant of @is_a_type.
645 If @is_a_type is an interface, check whether @type conforms to it.
646 </para>
647
648 @type:      Type to check anchestry for.
649 @is_a_type: Possible anchestor of @type or interface @type could conform to.
650 @Returns:   %TRUE if @type is_a @is_a_type holds true.
651
652
653 <!-- ##### FUNCTION g_type_class_ref ##### -->
654 <para>
655 Increments the reference count of the class structure belonging to
656 @type. This function will demand-create the class if it doesn't
657 exist already.
658 </para>
659
660 @type:    Type ID of a classed type.
661 @Returns: The #GTypeClass structure for the given type ID.
662
663
664 <!-- ##### FUNCTION g_type_class_peek ##### -->
665 <para>
666 This function is essentially the same as g_type_class_ref(), except that
667 the classes reference count isn't incremented. Therefore, this function
668 may return %NULL if the class of the type passed in does not currently
669 exist (hasn't been referenced before).
670 </para>
671
672 @type:          Type ID of a classed type.
673 @Returns:       The #GTypeClass structure for the given type ID or %NULL
674                 if the class does not currently exist.
675
676
677 <!-- ##### FUNCTION g_type_class_unref ##### -->
678 <para>
679 Decrements the reference count of the class structure being passed in.
680 Once the last reference count of a class has been released, classes
681 may be finalized by the type system, so further dereferencing of a
682 class pointer after g_type_class_unref() are invalid.
683 </para>
684
685 @g_class:       The #GTypeClass structure to unreference.
686
687
688 <!-- ##### FUNCTION g_type_class_peek_parent ##### -->
689 <para>
690 This is a convenience function, often needed in class initializers.
691 It essentially takes the immediate parent type of the class passed in,
692 and returns the class structure thereof. Since derived classes hold
693 a reference count on their parent classes as long as they are instantiated,
694 the returned class will always exist. This function is essentially
695 equivalent to:
696
697 <programlisting>
698 g_type_class_peek (g_type_parent (G_TYPE_FROM_CLASS (g_class)));
699 </programlisting>
700
701 </para>
702
703 @g_class: The #GTypeClass structure to retrieve the parent class for.
704 @Returns: The parent class of @g_class.
705
706
707 <!-- ##### FUNCTION g_type_class_add_private ##### -->
708 <para>
709 Registers a private structure for a instantiatable type;
710 when an object is allocated, the private structures for
711 the type and and all of its parent types are allocated
712 sequentially in the same memory block as the public
713 structures. This function should be called in the
714 type's class_init() function. The private structure can
715 be retrieved using the G_TYPE_INSTANCE_GET_PRIVATE() macro.
716 The following example shows attaching a private structure
717 <structname>MyObjectPrivate</structname> to an object
718 <structname>MyObject</structname> defined in the standard GObject
719 fashion.
720 </para>
721 <programlisting>
722 typedef struct _MyObjectPrivate MyObjectPrivate;
723
724 struct _MyObjectPrivate {
725   int some_field;
726 };
727
728 &num;define MY_OBJECT_GET_PRIVATE(o)  \
729    (G_TYPE_INSTANCE_GET_PRIVATE ((o), MY_TYPE_OBJECT, MyObjectPrivate))
730
731 static void
732 my_object_class_init (MyObjectClass *klass)
733 {
734   g_type_class_add_private (klass, sizeof (MyObjectPrivate));
735 }
736
737 static int
738 my_object_get_some_field (MyObject *my_object)
739 {
740   MyObjectPrivate *priv = MY_OBJECT_GET_PRIVATE (my_object);
741
742   return priv->some_field;
743 }
744 </programlisting>
745
746 @g_class: class structure for an instantiatable type
747 @private_size: size of private structure.
748
749 <!-- ##### FUNCTION g_type_interface_peek ##### -->
750 <para>
751 Returns the #GTypeInterface structure of an interface to which the passed in 
752 class conforms.
753 </para>
754
755 @instance_class: A #GTypeClass structure.
756 @iface_type:     An interface ID which this class conforms to.
757 @Returns:        The #GTypeInterface structure of @iface_type, or %NULL if the
758                  class is not instantiated.
759
760
761 <!-- ##### FUNCTION g_type_interface_peek_parent ##### -->
762 <para>
763 Returns the corresponding #GTypeInterface structure of the parent type
764 of the instance type to which @g_iface belongs. This is useful when 
765 deriving the implementation of an interface from the parent type and 
766 then possibly overriding some methods. 
767 </para>
768
769 @g_iface: A #GTypeInterface structure.
770 @Returns: The corresponding #GTypeInterface structure of the parent type
771    of the instance type to which @g_iface belongs, or %NULL if the parent type
772    doesn't conform to the interface.
773
774
775 <!-- ##### FUNCTION g_type_children ##### -->
776 <para>
777 Return a newly allocated and 0-terminated array of type IDs, listing the
778 child types of @type. The return value has to be g_free()ed after use.
779 </para>
780
781 @type:       The parent type.
782 @n_children: Optional #guint pointer to contain the number of child types.
783 @Returns:    Newly allocated and 0-terminated array of child types.
784
785
786 <!-- ##### FUNCTION g_type_interfaces ##### -->
787 <para>
788 Return a newly allocated and 0-terminated array of type IDs, listing the
789 interface types that @type conforms to. The return value has to be
790 g_free()ed after use.
791 </para>
792
793 @type:         The type to list interface types for.
794 @n_interfaces: Optional #guint pointer to contain the number of interface types.
795 @Returns:      Newly allocated and 0-terminated array of interface types.
796
797
798 <!-- ##### FUNCTION g_type_interface_prerequisites ##### -->
799 <para>
800 Returns the prerequisites of an interfaces type.
801 </para>
802
803 @interface_type: an interface type
804 @n_prerequisites: location to return the number of prerequisites, or %NULL
805 @Returns: a newly-allocated zero-terminated array of #GType containing 
806    the prerequisites of @interface_type
807 @Since: 2.2
808
809
810 <!-- ##### FUNCTION g_type_set_qdata ##### -->
811 <para>
812 Attaches arbitrary data to a type.
813 </para>
814
815 @type: a #GType
816 @quark: a #GQuark id to identify the data
817 @data: the data
818
819
820 <!-- ##### FUNCTION g_type_get_qdata ##### -->
821 <para>
822 Obtains data which has previously been attached to @type
823 with g_type_set_qdata().
824 </para>
825
826 @type: a #GType
827 @quark: a #GQuark id to identify the data
828 @Returns: the data, or %NULL if no data was found
829
830
831 <!-- ##### FUNCTION g_type_query ##### -->
832 <para>
833 Queries the type system for information about a specific type. 
834 This function will fill in a user-provided structure to hold type-specific 
835 information. If an invalid #GType is passed in, the @type member of the 
836 #GTypeQuery is 0. All members filled into the #GTypeQuery structure should
837 be considered constant and have to be left untouched.
838 </para>
839
840 @type: the #GType value of a static, classed type.
841 @query: A user provided structure that is filled in with constant values 
842         upon success.
843
844
845 <!-- ##### STRUCT GTypeQuery ##### -->
846 <para>
847 A structure holding information for a specific type. It is
848 filled in by the g_type_query() function.
849 </para>
850
851 @type: the #GType value of the type.
852 @type_name: the name of the type.
853 @class_size: the size of the class structure.
854 @instance_size: the size of the instance structure.
855
856 <!-- ##### USER_FUNCTION GBaseInitFunc ##### -->
857 <para>
858 A callback function used by the type system to do base initialization
859 of the class structures of derived types. It is called as part of the
860 initialization process of all derived classes and should reallocate
861 or reset all dynamic class members copied over from the parent class.
862 Therefore class members, e.g. strings, that are not sufficiently
863 handled by a plain memory copy of the parent class into the derived class
864 have to be altered. See GClassInitFunc() for a discussion of the class
865 intialization process.
866 </para>
867
868 @g_class: The #GTypeClass structure to initialize.
869
870
871 <!-- ##### USER_FUNCTION GBaseFinalizeFunc ##### -->
872 <para>
873 A callback function used by the type system to finalize those portions
874 of a derived types class structure that were setup from the corresponding
875 GBaseInitFunc() function. Class finalization basically works the inverse
876 way in which class intialization is performed.
877 See GClassInitFunc() for a discussion of the class intialization process.
878 </para>
879
880 @g_class: The #GTypeClass structure to finalize.
881
882
883 <!-- ##### USER_FUNCTION GClassInitFunc ##### -->
884 <para>
885 A callback function used by the type system to initialize the class
886 of a specific type. This function should initialize all static class
887 members.
888 The initialization process of a class involves:
889 <variablelist>
890   <varlistentry><term></term><listitem><para>
891         1 - Copying common members from the parent class over to the
892         derived class structure.
893   </para></listitem></varlistentry>
894   <varlistentry><term></term><listitem><para>
895         2 -  Zero initialization of the remaining members not copied
896         over from the parent class.
897   </para></listitem></varlistentry>
898   <varlistentry><term></term><listitem><para>
899         3 - Invocation of the GBaseInitFunc() initializers of all parent
900         types and the class' type.
901   </para></listitem></varlistentry>
902   <varlistentry><term></term><listitem><para>
903         4 - Invocation of the class' GClassInitFunc() initializer.
904   </para></listitem></varlistentry>
905 </variablelist>
906 Since derived classes are partially initialized through a memory copy
907 of the parent class, the general rule is that GBaseInitFunc() and
908 GBaseFinalizeFunc() should take care of necessary reinitialization
909 and release of those class members that were introduced by the type
910 that specified these GBaseInitFunc()/GBaseFinalizeFunc().
911 GClassInitFunc() should only care about initializing static
912 class members, while dynamic class members (such as allocated strings
913 or reference counted resources) are better handled by a GBaseInitFunc()
914 for this type, so proper initialization of the dynamic class members
915 is performed for class initialization of derived types as well.
916 An example may help to correspond the intend of the different class
917 initializers:
918
919 <programlisting>
920 typedef struct {
921   GObjectClass parent_class;
922   gint         static_integer;
923   gchar       *dynamic_string;
924 } TypeAClass;
925 static void
926 type_a_base_class_init (TypeAClass *class)
927 {
928   class->dynamic_string = g_strdup ("some string");
929 }
930 static void
931 type_a_base_class_finalize (TypeAClass *class)
932 {
933   g_free (class->dynamic_string);
934 }
935 static void
936 type_a_class_init (TypeAClass *class)
937 {
938   class->static_integer = 42;
939 }
940
941 typedef struct {
942   TypeAClass   parent_class;
943   gfloat       static_float;
944   GString     *dynamic_gstring;
945 } TypeBClass;
946 static void
947 type_b_base_class_init (TypeBClass *class)
948 {
949   class->dynamic_gstring = g_string_new ("some other string");
950 }
951 static void
952 type_b_base_class_finalize (TypeBClass *class)
953 {
954   g_string_free (class->dynamic_gstring);
955 }
956 static void
957 type_b_class_init (TypeBClass *class)
958 {
959   class->static_float = 3.14159265358979323846;
960 }
961 </programlisting>
962 Initialization of TypeBClass will first cause initialization of
963 TypeAClass (derived classes reference their parent classes, see
964 g_type_class_ref() on this).
965 Initialization of TypeAClass roughly involves zero-initializing its fields,
966 then calling its GBaseInitFunc() type_a_base_class_init() that allocates
967 its dynamic members (dynamic_string) and finally calling its GClassInitFunc()
968 type_a_class_init() to initialize its static members (static_integer).
969 The first step in the initialization process of TypeBClass is then
970 a plain memory copy of the contents of TypeAClass into TypeBClass and 
971 zero-initialization of the remaining fields in TypeBClass.
972 The dynamic members of TypeAClass within TypeBClass now need
973 reinitialization which is performed by calling type_a_base_class_init()
974 with an argument of TypeBClass.
975 After that, the GBaseInitFunc() of TypeBClass, type_b_base_class_init()
976 is called to allocate the dynamic members of TypeBClass (dynamic_gstring),
977 and finally the GClassInitFunc() of TypeBClass, type_b_class_init(),
978 is called to complete the initialization process with the static members
979 (static_float).
980 Corresponding finalization counter parts to the GBaseInitFunc() functions
981 have to be provided to release allocated resources at class finalization
982 time.
983 </para>
984
985 @g_class:       The #GTypeClass structure to initialize.
986 @class_data:    The @class_data member supplied via the #GTypeInfo structure.
987
988
989 <!-- ##### USER_FUNCTION GClassFinalizeFunc ##### -->
990 <para>
991 A callback function used by the type system to finalize a class.
992 This function is rarely needed, as dynamically allocated class resources
993 should be handled by GBaseInitFunc() and GBaseFinalizeFunc().
994 Also, specification of a GClassFinalizeFunc() in the #GTypeInfo
995 structure of a static type is invalid, because classes of static types
996 will never be finalized (they are artificially kept alive when their
997 reference count drops to zero).
998 </para>
999
1000 @g_class:       The #GTypeClass structure to finalize.
1001 @class_data:    The @class_data member supplied via the #GTypeInfo structure.
1002
1003
1004 <!-- ##### USER_FUNCTION GInstanceInitFunc ##### -->
1005 <para>
1006 A callback function used by the type system to initialize a new
1007 instance of a type. This function initializes all instance members and
1008 allocates any resources required by it.
1009 Initialization of a derived instance involves calling all its parent
1010 types instance initializers, therefore the class member of the instance
1011 is altered during its initialization to always point to the class that
1012 belongs to the type the current initializer was introduced for.
1013 </para>
1014
1015 @instance:      The instance to initialize.
1016 @g_class:       The class of the type the instance is created for.
1017
1018
1019 <!-- ##### USER_FUNCTION GInterfaceInitFunc ##### -->
1020 <para>
1021 A callback function used by the type system to initialize a new
1022 interface.  This function should initialize all internal data and
1023 allocate any resources required by the interface.
1024 </para>
1025
1026 @g_iface:       The interface structure to initialize.
1027 @iface_data:    The @class_data supplied via the #GTypeInfo structure.
1028
1029
1030 <!-- ##### USER_FUNCTION GInterfaceFinalizeFunc ##### -->
1031 <para>
1032 A callback function used by the type system to finalize an interface.
1033 This function should destroy any internal data and release any resources
1034 allocated by the corresponding GInterfaceInitFunc() function.
1035 </para>
1036
1037 @g_iface:       The interface structure to finalize.
1038 @iface_data:    The @class_data supplied via the #GTypeInfo structure.
1039
1040
1041 <!-- ##### USER_FUNCTION GTypeClassCacheFunc ##### -->
1042 <para>
1043
1044 </para>
1045
1046 @cache_data: 
1047 @g_class: 
1048 @Returns: 
1049
1050
1051 <!-- ##### ENUM GTypeFlags ##### -->
1052 <para>
1053 Bit masks used to check or determine characteristics of a type.
1054 </para>
1055
1056 @G_TYPE_FLAG_ABSTRACT:  Indicates an abstract type. No instances can be
1057                         created for an abstract type.
1058 @G_TYPE_FLAG_VALUE_ABSTRACT: Indicates an abstract value type, i.e. a type
1059                         that introduces a value table, but can't be used for
1060                         g_value_init().
1061
1062 <!-- ##### ENUM GTypeFundamentalFlags ##### -->
1063 <para>
1064 Bit masks used to check or determine specific characteristics of a
1065 fundamental type.
1066 </para>
1067
1068 @G_TYPE_FLAG_CLASSED:           Indicates a classed type.
1069 @G_TYPE_FLAG_INSTANTIATABLE:    Indicates an instantiable type (implies classed).
1070 @G_TYPE_FLAG_DERIVABLE:                 Indicates a flat derivable type.
1071 @G_TYPE_FLAG_DEEP_DERIVABLE:    Indicates a deep derivable type (implies derivable).
1072
1073 <!-- ##### FUNCTION g_type_register_static ##### -->
1074 <para>
1075 Registers @type_name as the name of a new static type derived from
1076 @parent_type.  The type system uses the information contained in the
1077 #GTypeInfo structure pointed to by @info to manage the type and its
1078 instances (if not abstract).  The value of @flags determines the nature
1079 (e.g. abstract or not) of the type.
1080 </para>
1081
1082 @parent_type:   Type which this type will be derived from.
1083 @type_name:     0-terminated string used as the name of the new type.
1084 @info:          The #GTypeInfo structure for this type.
1085 @flags:                 Bitwise combination of #GTypeFlags values.
1086 @Returns:       The new type identifier.
1087
1088
1089 <!-- ##### FUNCTION g_type_register_dynamic ##### -->
1090 <para>
1091 Registers @type_name as the name of a new dynamic type derived from
1092 @parent_type.  The type system uses the information contained in the
1093 #GTypePlugin structure pointed to by @plugin to manage the type and its
1094 instances (if not abstract).  The value of @flags determines the nature
1095 (e.g. abstract or not) of the type.
1096 </para>
1097
1098 @parent_type:   Type which this type will be derived from.
1099 @type_name:     0-terminated string used as the name of the new type.
1100 @plugin:        The #GTypePlugin structure to retrieve the #GTypeInfo from.
1101 @flags:                 Bitwise combination of #GTypeFlags values.
1102 @Returns:       The new type identifier or #G_TYPE_INVALID if registration failed.
1103
1104
1105 <!-- ##### FUNCTION g_type_register_fundamental ##### -->
1106 <para>
1107 Registers @type_id as the predefined identifier and @type_name as the
1108 name of a fundamental type.  The type system uses the information
1109 contained in the #GTypeInfo structure pointed to by @info and the 
1110 #GTypeFundamentalInfo structure pointed to by @finfo to manage the
1111 type and its instances.  The value of @flags determines additional
1112 characteristics of the fundamental type.
1113 </para>
1114
1115 @type_id:       A predefined #GTypeFundamentals value.
1116 @type_name:     0-terminated string used as the name of the new type.
1117 @info:          The #GTypeInfo structure for this type.
1118 @finfo:                 The #GTypeFundamentalInfo structure for this type.
1119 @flags:                 Bitwise combination of #GTypeFlags values.
1120 @Returns:       The predefined type identifier.
1121
1122
1123 <!-- ##### FUNCTION g_type_add_interface_static ##### -->
1124 <para>
1125 Adds the static @interface_type to @instantiable_type.  The information
1126 contained in the #GTypeInterfaceInfo structure pointed to by @info
1127 is used to manage the relationship.
1128 </para>
1129
1130 @instance_type:          #GType value of an instantiable type.
1131 @interface_type: #GType value of an interface type.
1132 @info:           The #GInterfaceInfo structure for this
1133                  (@instance_type, @interface_type) combination.
1134
1135
1136 <!-- ##### FUNCTION g_type_add_interface_dynamic ##### -->
1137 <para>
1138 Adds the dynamic @interface_type to @instantiable_type. The information
1139 contained in the #GTypePlugin structure pointed to by @plugin
1140 is used to manage the relationship.
1141 </para>
1142
1143 @instance_type: the #GType value of an instantiable type.
1144 @interface_type: the #GType value of an interface type.
1145 @plugin: the #GTypePlugin structure to retrieve the #GInterfaceInfo from.
1146
1147
1148 <!-- ##### FUNCTION g_type_interface_add_prerequisite ##### -->
1149 <para>
1150 Adds @prerequisite_type to the list of prerequisites of @interface_type.
1151 This means that any type implementing @interface_type must also implement
1152 @prerequisite_type. Prerequisites can be thought of as an alternative to
1153 interface derivation (which GType doesn't support). An interface can have
1154 at most one instantiatable prerequisite type.
1155 </para>
1156
1157 @interface_type: #GType value of an interface type.
1158 @prerequisite_type: #GType value of an interface or instantiatable type.
1159
1160
1161 <!-- ##### FUNCTION g_type_get_plugin ##### -->
1162 <para>
1163 Returns the #GTypePlugin structure for @type or
1164 %NULL if @type does not have a #GTypePlugin structure.
1165 </para>
1166
1167 @type:          The #GType to retrieve the plugin for.
1168 @Returns:       The corresponding plugin if @type is a dynamic type,
1169                 %NULL otherwise.
1170
1171
1172 <!-- ##### FUNCTION g_type_interface_get_plugin ##### -->
1173 <para>
1174 Returns the #GTypePlugin structure for the dynamic interface 
1175 @interface_type which has been added to @instance_type, or 
1176 %NULL if @interface_type has not been added to @instance_type or does 
1177 not have a #GTypePlugin structure. See g_type_add_interface_dynamic().
1178 </para>
1179
1180 @instance_type: the #GType value of an instantiatable type.
1181 @interface_type: the #GType value of an interface type.
1182 @Returns: the #GTypePlugin for the dynamic interface @interface_type
1183    of @instance_type.
1184
1185
1186 <!-- ##### FUNCTION g_type_fundamental_next ##### -->
1187 <para>
1188 Returns the next free fundamental type id which can be used to
1189 register a new fundamental type with g_type_register_fundamental().
1190 The returned type ID represents the highest currently registered
1191 fundamental type identifier.
1192
1193 </para>
1194
1195 @Returns: The nextmost fundamental type ID to be registered,
1196           or 0 if the type system ran out of fundamental type IDs.
1197
1198
1199 <!-- ##### FUNCTION g_type_fundamental ##### -->
1200 <para>
1201 Internal function, used to extract the fundamental type ID portion.
1202 use G_TYPE_FUNDAMENTAL() instead.
1203 </para>
1204
1205 @type_id: valid type ID
1206 @Returns: fundamental type ID
1207
1208
1209 <!-- ##### FUNCTION g_type_create_instance ##### -->
1210 <para>
1211 Creates and initializes an instance of @type if @type is valid and can
1212 be instantiated. The type system only performs basic allocation and
1213 structure setups for instances, actual instance creation should happen
1214 through functions supplied by the type's fundamental type implementation.
1215 So use of g_type_create_instance() is reserved for implementators of
1216 fundamental types only. E.g. instances of the #GObject hierarchy
1217 should be created via g_object_new() and <emphasis>never</emphasis>
1218 directly through g_type_create_instance() which doesn't handle
1219 things like singleton objects or object construction.
1220 Note: Do <emphasis>not</emphasis> use this function, unless you're
1221 implementing a fundamental type. Also language bindings should <emphasis>not</emphasis>
1222 use this function but g_object_new() instead.
1223 </para>
1224
1225 @type:    An instantiatable type to create an instance for.
1226 @Returns: An allocated and initialized instance, subject to further
1227           treatment by the fundamental type implementation.
1228
1229
1230 <!-- ##### FUNCTION g_type_free_instance ##### -->
1231 <para>
1232 Frees an instance of a type, returning it to the instance pool for the type,
1233 if there is one.
1234 </para>
1235 <para>
1236 Like g_type_create_i    * gobject/tmpl/gtype.sgml: 
1237         * gobject/tmpl/enumerations_flags.sgml: Add docs.
1238 nstance(), this function is reserved for implementors of 
1239 fundamental types.
1240 </para>
1241
1242 @instance: an instance of a type.
1243
1244
1245 <!-- ##### FUNCTION g_type_add_class_cache_func ##### -->
1246 <para>
1247
1248 </para>
1249
1250 @cache_data: 
1251 @cache_func: 
1252
1253
1254 <!-- ##### FUNCTION g_type_remove_class_cache_func ##### -->
1255 <para>
1256
1257 </para>
1258
1259 @cache_data: 
1260 @cache_func: 
1261
1262
1263 <!-- ##### FUNCTION g_type_class_unref_uncached ##### -->
1264 <para>
1265
1266 </para>
1267
1268 @g_class: 
1269
1270
1271 <!-- ##### FUNCTION g_type_value_table_peek ##### -->
1272 <para>
1273 Returns the location of the #GTypeValueTable associated with @type.
1274 <emphasis>Note, this function should only be used from source code
1275 that implements or has internal knowledge of the implementation of
1276 @type.</emphasis>
1277 </para>
1278
1279 @type:    A #GType value.
1280 @Returns: Location of the #GTypeValueTable associated with @type or
1281           %NULL if there is no #GTypeValueTable associated with @type.
1282
1283
1284 <!-- ##### MACRO G_TYPE_INVALID ##### -->
1285 <para>
1286 An invalid #GType, used as error return value in some functions which return
1287 a #GType. 
1288 </para>
1289
1290
1291
1292 <!-- ##### MACRO G_TYPE_NONE ##### -->
1293 <para>
1294 A fundamental type which is used as a replacement for the C
1295 <literal>void</literal> return type.
1296 </para>
1297
1298
1299
1300 <!-- ##### MACRO G_TYPE_INTERFACE ##### -->
1301 <para>
1302 The fundamental type from which all interfaces are derived.
1303 </para>
1304
1305
1306
1307 <!-- ##### MACRO G_TYPE_CHAR ##### -->
1308 <para>
1309 The fundamental type corresponding to #gchar.
1310 </para>
1311
1312
1313
1314 <!-- ##### MACRO G_TYPE_UCHAR ##### -->
1315 <para>
1316 The fundamental type corresponding to #guchar.
1317 </para>
1318
1319
1320
1321 <!-- ##### MACRO G_TYPE_BOOLEAN ##### -->
1322 <para>
1323 The fundamental type corresponding to #gboolean.
1324 </para>
1325
1326
1327
1328 <!-- ##### MACRO G_TYPE_INT ##### -->
1329 <para>
1330 The fundamental type corresponding to #gint.
1331 </para>
1332
1333
1334
1335 <!-- ##### MACRO G_TYPE_UINT ##### -->
1336 <para>
1337 The fundamental type corresponding to #guint.
1338 </para>
1339
1340
1341
1342 <!-- ##### MACRO G_TYPE_LONG ##### -->
1343 <para>
1344 The fundamental type corresponding to #glong.
1345 </para>
1346
1347
1348
1349 <!-- ##### MACRO G_TYPE_ULONG ##### -->
1350 <para>
1351 The fundamental type corresponding to #gulong.
1352 </para>
1353
1354
1355
1356 <!-- ##### MACRO G_TYPE_INT64 ##### -->
1357 <para>
1358 The fundamental type corresponding to #gint64.
1359 </para>
1360
1361
1362
1363 <!-- ##### MACRO G_TYPE_UINT64 ##### -->
1364 <para>
1365 The fundamental type corresponding to #guint64.
1366 </para>
1367
1368
1369
1370 <!-- ##### MACRO G_TYPE_ENUM ##### -->
1371 <para>
1372 The fundamental type from which all enumeration types are derived.
1373 </para>
1374
1375
1376
1377 <!-- ##### MACRO G_TYPE_FLAGS ##### -->
1378 <para>
1379 The fundamental type from which all flags types are derived.
1380 </para>
1381
1382
1383
1384 <!-- ##### MACRO G_TYPE_FLOAT ##### -->
1385 <para>
1386 The fundamental type corresponding to #gfloat.
1387 </para>
1388
1389
1390
1391 <!-- ##### MACRO G_TYPE_DOUBLE ##### -->
1392 <para>
1393 The fundamental type corresponding to #gdouble.
1394 </para>
1395
1396
1397
1398 <!-- ##### MACRO G_TYPE_STRING ##### -->
1399 <para>
1400 The fundamental type corresponding to nul-terminated C strings.
1401 </para>
1402
1403
1404
1405 <!-- ##### MACRO G_TYPE_POINTER ##### -->
1406 <para>
1407 The fundamental type corresponding to #gpointer.
1408 </para>
1409
1410
1411
1412 <!-- ##### MACRO G_TYPE_BOXED ##### -->
1413 <para>
1414 The fundamental type from which all boxed types are derived.
1415 </para>
1416
1417
1418
1419 <!-- ##### MACRO G_TYPE_PARAM ##### -->
1420 <para>
1421 The fundamental type from which all #GParamSpec types are derived.
1422 </para>
1423
1424
1425
1426 <!-- ##### MACRO G_TYPE_OBJECT ##### -->
1427 <para>
1428 The fundamental type for #GObject.
1429 </para>
1430
1431
1432
1433 <!-- ##### MACRO G_TYPE_RESERVED_GLIB_FIRST ##### -->
1434 <para>
1435
1436 </para>
1437
1438
1439
1440 <!-- ##### MACRO G_TYPE_RESERVED_GLIB_LAST ##### -->
1441 <para>
1442
1443 </para>
1444
1445
1446
1447 <!-- ##### MACRO G_TYPE_RESERVED_BSE_FIRST ##### -->
1448 <para>
1449
1450 </para>
1451
1452
1453
1454 <!-- ##### MACRO G_TYPE_RESERVED_BSE_LAST ##### -->
1455 <para>
1456
1457 </para>
1458
1459
1460
1461 <!-- ##### MACRO G_TYPE_RESERVED_USER_FIRST ##### -->
1462 <para>
1463
1464 </para>
1465
1466 <!--
1467 Local variables:
1468 mode: sgml
1469 sgml-parent-document: ("../gobject-docs.sgml" "book" "refsect2" "")
1470 End:
1471 -->