Add gobject-introspection.changes file
[profile/ivi/gobject-introspection.git] / gir / gobject-2.0.c
1 /************************************************************/
2 /* THIS FILE IS GENERATED DO NOT EDIT */
3 /************************************************************/
4
5 /**
6  * GBaseFinalizeFunc:
7  * @g_class: The #GTypeClass structure to finalize.
8  *
9  * A callback function used by the type system to finalize those portions
10  * of a derived types class structure that were setup from the corresponding
11  * GBaseInitFunc() function. Class finalization basically works the inverse
12  * way in which class intialization is performed.
13  * See GClassInitFunc() for a discussion of the class intialization process.
14  */
15
16
17 /**
18  * GBaseInitFunc:
19  * @g_class: The #GTypeClass structure to initialize.
20  *
21  * A callback function used by the type system to do base initialization
22  * of the class structures of derived types. It is called as part of the
23  * initialization process of all derived classes and should reallocate
24  * or reset all dynamic class members copied over from the parent class.
25  * For example, class members (such as strings) that are not sufficiently
26  * handled by a plain memory copy of the parent class into the derived class
27  * have to be altered. See GClassInitFunc() for a discussion of the class
28  * intialization process.
29  */
30
31
32 /**
33  * GBinding:
34  *
35  * <structname>GBinding</structname> is an opaque structure whose members
36  * cannot be accessed directly.
37  *
38  * Since: 2.26
39  */
40
41
42 /**
43  * GBinding:flags:
44  *
45  * Flags to be used to control the #GBinding
46  *
47  * Since: 2.26
48  */
49
50
51 /**
52  * GBinding:source:
53  *
54  * The #GObject that should be used as the source of the binding
55  *
56  * Since: 2.26
57  */
58
59
60 /**
61  * GBinding:source-property:
62  *
63  * The name of the property of #GBinding:source that should be used
64  * as the source of the binding
65  *
66  * Since: 2.26
67  */
68
69
70 /**
71  * GBinding:target:
72  *
73  * The #GObject that should be used as the target of the binding
74  *
75  * Since: 2.26
76  */
77
78
79 /**
80  * GBinding:target-property:
81  *
82  * The name of the property of #GBinding:target that should be used
83  * as the target of the binding
84  *
85  * Since: 2.26
86  */
87
88
89 /**
90  * GBindingFlags:
91  * @G_BINDING_DEFAULT: The default binding; if the source property changes, the target property is updated with its value.
92  * @G_BINDING_BIDIRECTIONAL: Bidirectional binding; if either the property of the source or the property of the target changes, the other is updated.
93  * @G_BINDING_SYNC_CREATE: Synchronize the values of the source and target properties when creating the binding; the direction of the synchronization is always from the source to the target.
94  * @G_BINDING_INVERT_BOOLEAN: If the two properties being bound are booleans, setting one to %TRUE will result in the other being set to %FALSE and vice versa. This flag will only work for boolean properties, and cannot be used when passing custom transformation functions to g_object_bind_property_full().
95  *
96  * Flags to be passed to g_object_bind_property() or
97  * g_object_bind_property_full().
98  *
99  * This enumeration can be extended at later date.
100  *
101  * Since: 2.26
102  */
103
104
105 /**
106  * GBindingTransformFunc:
107  * @binding: a #GBinding
108  * @source_value: the value of the source property
109  * @target_value: the value of the target property
110  * @user_data: data passed to the transform function
111  *
112  * A function to be called to transform the source property of @source
113  * from @source_value into the target property of @target
114  * using @target_value.
115  *
116  * otherwise
117  *
118  * Returns: %TRUE if the transformation was successful, and %FALSE
119  * Since: 2.26
120  */
121
122
123 /**
124  * GBookmarkFile:
125  *
126  * The <structname>GBookmarkFile</structname> struct contains only
127  * private data and should not be directly accessed.
128  */
129
130
131 /**
132  * GBookmarkFileError:
133  * @G_BOOKMARK_FILE_ERROR_INVALID_URI: URI was ill-formed
134  * @G_BOOKMARK_FILE_ERROR_INVALID_VALUE: a requested field was not found
135  * @G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED: a requested application did not register a bookmark
136  * @G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND: a requested URI was not found
137  * @G_BOOKMARK_FILE_ERROR_READ: document was ill formed
138  * @G_BOOKMARK_FILE_ERROR_UNKNOWN_ENCODING: the text being parsed was in an unknown encoding
139  * @G_BOOKMARK_FILE_ERROR_WRITE: an error occurred while writing
140  * @G_BOOKMARK_FILE_ERROR_FILE_NOT_FOUND: requested file was not found
141  *
142  * Error codes returned by bookmark file parsing.
143  */
144
145
146 /**
147  * GBoxedCopyFunc:
148  * @boxed: The boxed structure to be copied.
149  *
150  * This function is provided by the user and should produce a copy
151  * of the passed in boxed structure.
152  *
153  * Returns: The newly created copy of the boxed structure.
154  */
155
156
157 /**
158  * GBoxedFreeFunc:
159  * @boxed: The boxed structure to be freed.
160  *
161  * This function is provided by the user and should free the boxed
162  * structure passed.
163  */
164
165
166 /**
167  * GCClosure:
168  * @closure: the #GClosure
169  * @callback: the callback function
170  *
171  * A #GCClosure is a specialization of #GClosure for C function callbacks.
172  */
173
174
175 /**
176  * GCallback:
177  *
178  * The type used for callback functions in structure definitions and function
179  * signatures. This doesn't mean that all callback functions must take no
180  * parameters and return void. The required signature of a callback function
181  * is determined by the context in which is used (e.g. the signal to which it
182  * is connected). Use G_CALLBACK() to cast the callback function to a #GCallback.
183  */
184
185
186 /**
187  * GChecksum:
188  *
189  * An opaque structure representing a checksumming operation.
190  * To create a new GChecksum, use g_checksum_new(). To free
191  * a GChecksum, use g_checksum_free().
192  *
193  * Since: 2.16
194  */
195
196
197 /**
198  * GChecksumType:
199  * @G_CHECKSUM_MD5: Use the MD5 hashing algorithm
200  * @G_CHECKSUM_SHA1: Use the SHA-1 hashing algorithm
201  * @G_CHECKSUM_SHA256: Use the SHA-256 hashing algorithm
202  *
203  * The hashing algorithm to be used by #GChecksum when performing the
204  * digest of some data.
205  *
206  * Note that the #GChecksumType enumeration may be extended at a later
207  * date to include new hashing algorithm types.
208  *
209  * Since: 2.16
210  */
211
212
213 /**
214  * GChildWatchFunc:
215  * @pid: the process id of the child process
216  * @status: Status information about the child process, see waitpid(2) for more information about this field
217  * @user_data: user data passed to g_child_watch_add()
218  *
219  * The type of functions to be called when a child exists.
220  */
221
222
223 /**
224  * GClassFinalizeFunc:
225  * @g_class: The #GTypeClass structure to finalize.
226  * @class_data: The @class_data member supplied via the #GTypeInfo structure.
227  *
228  * A callback function used by the type system to finalize a class.
229  * This function is rarely needed, as dynamically allocated class resources
230  * should be handled by GBaseInitFunc() and GBaseFinalizeFunc().
231  * Also, specification of a GClassFinalizeFunc() in the #GTypeInfo
232  * structure of a static type is invalid, because classes of static types
233  * will never be finalized (they are artificially kept alive when their
234  * reference count drops to zero).
235  */
236
237
238 /**
239  * GClassInitFunc:
240  * @g_class: The #GTypeClass structure to initialize.
241  * @class_data: The @class_data member supplied via the #GTypeInfo structure.
242  *
243  * A callback function used by the type system to initialize the class
244  * of a specific type. This function should initialize all static class
245  * members.
246  * The initialization process of a class involves:
247  * <itemizedlist>
248  * <listitem><para>
249  * 1 - Copying common members from the parent class over to the
250  * derived class structure.
251  * </para></listitem>
252  * <listitem><para>
253  * 2 -  Zero initialization of the remaining members not copied
254  * over from the parent class.
255  * </para></listitem>
256  * <listitem><para>
257  * 3 - Invocation of the GBaseInitFunc() initializers of all parent
258  * types and the class' type.
259  * </para></listitem>
260  * <listitem><para>
261  * 4 - Invocation of the class' GClassInitFunc() initializer.
262  * </para></listitem>
263  * </itemizedlist>
264  * Since derived classes are partially initialized through a memory copy
265  * of the parent class, the general rule is that GBaseInitFunc() and
266  * GBaseFinalizeFunc() should take care of necessary reinitialization
267  * and release of those class members that were introduced by the type
268  * that specified these GBaseInitFunc()/GBaseFinalizeFunc().
269  * GClassInitFunc() should only care about initializing static
270  * class members, while dynamic class members (such as allocated strings
271  * or reference counted resources) are better handled by a GBaseInitFunc()
272  * for this type, so proper initialization of the dynamic class members
273  * is performed for class initialization of derived types as well.
274  * An example may help to correspond the intend of the different class
275  * initializers:
276  *
277  * |[
278  * typedef struct {
279  * GObjectClass parent_class;
280  * gint         static_integer;
281  * gchar       *dynamic_string;
282  * } TypeAClass;
283  * static void
284  * type_a_base_class_init (TypeAClass *class)
285  * {
286  * class->dynamic_string = g_strdup ("some string");
287  * }
288  * static void
289  * type_a_base_class_finalize (TypeAClass *class)
290  * {
291  * g_free (class->dynamic_string);
292  * }
293  * static void
294  * type_a_class_init (TypeAClass *class)
295  * {
296  * class->static_integer = 42;
297  * }
298  *
299  * typedef struct {
300  * TypeAClass   parent_class;
301  * gfloat       static_float;
302  * GString     *dynamic_gstring;
303  * } TypeBClass;
304  * static void
305  * type_b_base_class_init (TypeBClass *class)
306  * {
307  * class->dynamic_gstring = g_string_new ("some other string");
308  * }
309  * static void
310  * type_b_base_class_finalize (TypeBClass *class)
311  * {
312  * g_string_free (class->dynamic_gstring);
313  * }
314  * static void
315  * type_b_class_init (TypeBClass *class)
316  * {
317  * class->static_float = 3.14159265358979323846;
318  * }
319  * ]|
320  * Initialization of TypeBClass will first cause initialization of
321  * TypeAClass (derived classes reference their parent classes, see
322  * g_type_class_ref() on this).
323  * Initialization of TypeAClass roughly involves zero-initializing its fields,
324  * then calling its GBaseInitFunc() type_a_base_class_init() to allocate
325  * its dynamic members (dynamic_string), and finally calling its GClassInitFunc()
326  * type_a_class_init() to initialize its static members (static_integer).
327  * The first step in the initialization process of TypeBClass is then
328  * a plain memory copy of the contents of TypeAClass into TypeBClass and
329  * zero-initialization of the remaining fields in TypeBClass.
330  * The dynamic members of TypeAClass within TypeBClass now need
331  * reinitialization which is performed by calling type_a_base_class_init()
332  * with an argument of TypeBClass.
333  * After that, the GBaseInitFunc() of TypeBClass, type_b_base_class_init()
334  * is called to allocate the dynamic members of TypeBClass (dynamic_gstring),
335  * and finally the GClassInitFunc() of TypeBClass, type_b_class_init(),
336  * is called to complete the initialization process with the static members
337  * (static_float).
338  * Corresponding finalization counter parts to the GBaseInitFunc() functions
339  * have to be provided to release allocated resources at class finalization
340  * time.
341  */
342
343
344 /**
345  * GClosure:
346  * @in_marshal: Indicates whether the closure is currently being invoked with g_closure_invoke()
347  * @is_invalid: Indicates whether the closure has been invalidated by g_closure_invalidate()
348  *
349  * A #GClosure represents a callback supplied by the programmer.
350  */
351
352
353 /**
354  * GClosureMarshal:
355  * @closure: the #GClosure to which the marshaller belongs
356  * @return_value: (allow-none): a #GValue to store the return value. May be %NULL if the callback of @closure doesn't return a value.
357  * @n_param_values: the length of the @param_values array
358  * @param_values: (array length=n_param_values): an array of #GValue<!-- -->s holding the arguments on which to invoke the callback of @closure
359  * @invocation_hint: (allow-none): the invocation hint given as the last argument to g_closure_invoke()
360  * @marshal_data: (allow-none): additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
361  *
362  * The type used for marshaller functions.
363  */
364
365
366 /**
367  * GClosureNotify:
368  * @data: data specified when registering the notification callback
369  * @closure: the #GClosure on which the notification is emitted
370  *
371  * The type used for the various notification callbacks which can be registered
372  * on closures.
373  */
374
375
376 /**
377  * GConnectFlags:
378  * @G_CONNECT_AFTER: whether the handler should be called before or after the default handler of the signal.
379  * @G_CONNECT_SWAPPED: whether the instance and data should be swapped when calling the handler.
380  *
381  * The connection flags are used to specify the behaviour of a signal's
382  * connection.
383  */
384
385
386 /**
387  * GConvertError:
388  * @G_CONVERT_ERROR_NO_CONVERSION: Conversion between the requested character sets is not supported.
389  * @G_CONVERT_ERROR_ILLEGAL_SEQUENCE: Invalid byte sequence in conversion input.
390  * @G_CONVERT_ERROR_FAILED: Conversion failed for some reason.
391  * @G_CONVERT_ERROR_PARTIAL_INPUT: Partial character sequence at end of input.
392  * @G_CONVERT_ERROR_BAD_URI: URI is invalid.
393  * @G_CONVERT_ERROR_NOT_ABSOLUTE_PATH: Pathname is not an absolute path.
394  *
395  * Error codes returned by character set conversion routines.
396  */
397
398
399 /**
400  * GCopyFunc:
401  * @src: A pointer to the data which should be copied
402  * @data: Additional data
403  *
404  * A function of this signature is used to copy the node data
405  * when doing a deep-copy of a tree.
406  *
407  * Returns: A pointer to the copy
408  * Since: 2.4
409  */
410
411
412 /**
413  * GDateTime:
414  *
415  * <structname>GDateTime</structname> is an opaque structure whose members
416  * cannot be accessed directly.
417  *
418  * Since: 2.26
419  */
420
421
422 /**
423  * GDebugKey:
424  * @key: the string
425  * @value: the flag
426  *
427  * Associates a string with a bit flag.
428  * Used in g_parse_debug_string().
429  */
430
431
432 /**
433  * GEnumClass:
434  * @g_type_class: the parent class
435  * @minimum: the smallest possible value.
436  * @maximum: the largest possible value.
437  * @n_values: the number of possible values.
438  * @values: an array of #GEnumValue structs describing the individual values.
439  *
440  * The class of an enumeration type holds information about its
441  * possible values.
442  */
443
444
445 /**
446  * GEnumValue:
447  * @value: the enum value
448  * @value_name: the name of the value
449  * @value_nick: the nickname of the value
450  *
451  * A structure which contains a single enum value, its name, and its
452  * nickname.
453  */
454
455
456 /**
457  * GError:
458  * @domain: error domain, e.g. #G_FILE_ERROR
459  * @code: error code, e.g. %G_FILE_ERROR_NOENT
460  * @message: human-readable informative error message
461  *
462  * The <structname>GError</structname> structure contains
463  * information about an error that has occurred.
464  */
465
466
467 /**
468  * GFlagsClass:
469  * @g_type_class: the parent class
470  * @mask: a mask covering all possible values.
471  * @n_values: the number of possible values.
472  * @values: an array of #GFlagsValue structs describing the individual values.
473  *
474  * The class of a flags type holds information about its
475  * possible values.
476  */
477
478
479 /**
480  * GFlagsValue:
481  * @value: the flags value
482  * @value_name: the name of the value
483  * @value_nick: the nickname of the value
484  *
485  * A structure which contains a single flags value, its name, and its
486  * nickname.
487  */
488
489
490 /**
491  * GFreeFunc:
492  * @data: a data pointer
493  *
494  * Declares a type of function which takes an arbitrary
495  * data pointer argument and has no return value. It is
496  * not currently used in GLib or GTK+.
497  */
498
499
500 /**
501  * GHmac:
502  *
503  * An opaque structure representing a HMAC operation.
504  * To create a new GHmac, use g_hmac_new(). To free
505  * a GHmac, use g_hmac_unref().
506  *
507  * Since: 2.30
508  */
509
510
511 /**
512  * GIconv:
513  *
514  * The <structname>GIConv</structname> struct wraps an
515  * iconv() conversion descriptor. It contains private data
516  * and should only be accessed using the following functions.
517  */
518
519
520 /**
521  * GInitiallyUnowned:
522  *
523  * All the fields in the <structname>GInitiallyUnowned</structname> structure
524  * are private to the #GInitiallyUnowned implementation and should never be
525  * accessed directly.
526  */
527
528
529 /**
530  * GInitiallyUnownedClass:
531  *
532  * The class structure for the <structname>GInitiallyUnowned</structname> type.
533  */
534
535
536 /**
537  * GInstanceInitFunc:
538  * @instance: The instance to initialize.
539  * @g_class: The class of the type the instance is created for.
540  *
541  * A callback function used by the type system to initialize a new
542  * instance of a type. This function initializes all instance members and
543  * allocates any resources required by it.
544  * Initialization of a derived instance involves calling all its parent
545  * types instance initializers, so the class member of the instance
546  * is altered during its initialization to always point to the class that
547  * belongs to the type the current initializer was introduced for.
548  */
549
550
551 /**
552  * GInterfaceFinalizeFunc:
553  * @g_iface: The interface structure to finalize.
554  * @iface_data: The @interface_data supplied via the #GInterfaceInfo structure.
555  *
556  * A callback function used by the type system to finalize an interface.
557  * This function should destroy any internal data and release any resources
558  * allocated by the corresponding GInterfaceInitFunc() function.
559  */
560
561
562 /**
563  * GInterfaceInfo:
564  * @interface_init: location of the interface initialization function
565  * @interface_finalize: location of the interface finalization function
566  * @interface_data: user-supplied data passed to the interface init/finalize functions
567  *
568  * A structure that provides information to the type system which is
569  * used specifically for managing interface types.
570  */
571
572
573 /**
574  * GInterfaceInitFunc:
575  * @g_iface: The interface structure to initialize.
576  * @iface_data: The @interface_data supplied via the #GInterfaceInfo structure.
577  *
578  * A callback function used by the type system to initialize a new
579  * interface.  This function should initialize all internal data and
580  * allocate any resources required by the interface.
581  */
582
583
584 /**
585  * GLIB_CHECK_VERSION:
586  * @major: the major version to check for
587  * @minor: the minor version to check for
588  * @micro: the micro version to check for
589  *
590  * Checks the version of the GLib library that is being compiled
591  * against.
592  *
593  * <example>
594  * <title>Checking the version of the GLib library</title>
595  * <programlisting>
596  * if (!GLIB_CHECK_VERSION (1, 2, 0))
597  * g_error ("GLib version 1.2.0 or above is needed");
598  * </programlisting>
599  * </example>
600  *
601  * See glib_check_version() for a runtime check.
602  *
603  * is the same as or newer than the passed-in version.
604  *
605  * Returns: %TRUE if the version of the GLib header files
606  */
607
608
609 /**
610  * GLIB_VERSION_2_26:
611  *
612  * A macro that evaluates to the 2.26 version of GLib, in a format
613  * that can be used by the C pre-processor.
614  *
615  * Since: 2.32
616  */
617
618
619 /**
620  * GLIB_VERSION_2_28:
621  *
622  * A macro that evaluates to the 2.28 version of GLib, in a format
623  * that can be used by the C pre-processor.
624  *
625  * Since: 2.32
626  */
627
628
629 /**
630  * GLIB_VERSION_2_30:
631  *
632  * A macro that evaluates to the 2.30 version of GLib, in a format
633  * that can be used by the C pre-processor.
634  *
635  * Since: 2.32
636  */
637
638
639 /**
640  * GLIB_VERSION_2_32:
641  *
642  * A macro that evaluates to the 2.32 version of GLib, in a format
643  * that can be used by the C pre-processor.
644  *
645  * Since: 2.32
646  */
647
648
649 /**
650  * GLIB_VERSION_MAX_ALLOWED:
651  *
652  * A macro that should be defined by the user prior to including
653  * the glib.h header.
654  * The definition should be one of the predefined GLib version
655  * macros: %GLIB_VERSION_2_26, %GLIB_VERSION_2_28,...
656  *
657  * This macro defines the upper bound for the GLib API to use.
658  *
659  * If a function has been introduced in a newer version of GLib,
660  * it is possible to use this symbol to get compiler warnings when
661  * trying to use that function.
662  *
663  * Since: 2.32
664  */
665
666
667 /**
668  * GLIB_VERSION_MIN_REQUIRED:
669  *
670  * A macro that should be defined by the user prior to including
671  * the glib.h header.
672  * The definition should be one of the predefined GLib version
673  * macros: %GLIB_VERSION_2_26, %GLIB_VERSION_2_28,...
674  *
675  * This macro defines the lower bound for the GLib API to use.
676  *
677  * If a function has been deprecated in a newer version of GLib,
678  * it is possible to use this symbol to avoid the compiler warnings
679  * without disabling warning for every deprecated function.
680  *
681  * Since: 2.32
682  */
683
684
685 /**
686  * GMainContext:
687  *
688  * The <structname>GMainContext</structname> struct is an opaque data
689  * type representing a set of sources to be handled in a main loop.
690  */
691
692
693 /**
694  * GMainLoop:
695  *
696  * The <structname>GMainLoop</structname> struct is an opaque data type
697  * representing the main event loop of a GLib or GTK+ application.
698  */
699
700
701 /**
702  * GMarkupError:
703  * @G_MARKUP_ERROR_BAD_UTF8: text being parsed was not valid UTF-8
704  * @G_MARKUP_ERROR_EMPTY: document contained nothing, or only whitespace
705  * @G_MARKUP_ERROR_PARSE: document was ill-formed
706  * @G_MARKUP_ERROR_UNKNOWN_ELEMENT: error should be set by #GMarkupParser functions; element wasn't known
707  * @G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE: error should be set by #GMarkupParser functions; attribute wasn't known
708  * @G_MARKUP_ERROR_INVALID_CONTENT: error should be set by #GMarkupParser functions; content was invalid
709  * @G_MARKUP_ERROR_MISSING_ATTRIBUTE: error should be set by #GMarkupParser functions; a required attribute was missing
710  *
711  * Error codes returned by markup parsing.
712  */
713
714
715 /**
716  * GMarkupParseContext:
717  *
718  * A parse context is used to parse a stream of bytes that
719  * you expect to contain marked-up text.
720  *
721  * See g_markup_parse_context_new(), #GMarkupParser, and so
722  * on for more details.
723  */
724
725
726 /**
727  * GMarkupParseFlags:
728  * @G_MARKUP_DO_NOT_USE_THIS_UNSUPPORTED_FLAG: flag you should not use
729  * @G_MARKUP_TREAT_CDATA_AS_TEXT: When this flag is set, CDATA marked sections are not passed literally to the @passthrough function of the parser. Instead, the content of the section (without the <literal>&lt;![CDATA[</literal> and <literal>]]&gt;</literal>) is passed to the @text function. This flag was added in GLib 2.12
730  * @G_MARKUP_PREFIX_ERROR_POSITION: Normally errors caught by GMarkup itself have line/column information prefixed to them to let the caller know the location of the error. When this flag is set the location information is also prefixed to errors generated by the #GMarkupParser implementation functions
731  *
732  * Flags that affect the behaviour of the parser.
733  */
734
735
736 /**
737  * GMarkupParser:
738  * @start_element: Callback to invoke when the opening tag of an element is seen.
739  * @end_element: Callback to invoke when the closing tag of an element is seen. Note that this is also called for empty tags like <literal>&lt;empty/&gt;</literal>.
740  * @text: Callback to invoke when some text is seen (text is always inside an element). Note that the text of an element may be spread over multiple calls of this function. If the %G_MARKUP_TREAT_CDATA_AS_TEXT flag is set, this function is also called for the content of CDATA marked sections.
741  * @passthrough: Callback to invoke for comments, processing instructions and doctype declarations; if you're re-writing the parsed document, write the passthrough text back out in the same position. If the %G_MARKUP_TREAT_CDATA_AS_TEXT flag is not set, this function is also called for CDATA marked sections.
742  * @error: Callback to invoke when an error occurs.
743  *
744  * Any of the fields in #GMarkupParser can be %NULL, in which case they
745  * will be ignored. Except for the @error function, any of these callbacks
746  * can set an error; in particular the %G_MARKUP_ERROR_UNKNOWN_ELEMENT,
747  * %G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE, and %G_MARKUP_ERROR_INVALID_CONTENT
748  * errors are intended to be set from these callbacks. If you set an error
749  * from a callback, g_markup_parse_context_parse() will report that error
750  * back to its caller.
751  */
752
753
754 /**
755  * GMemVTable:
756  * @malloc: function to use for allocating memory.
757  * @realloc: function to use for reallocating memory.
758  * @free: function to use to free memory.
759  * @calloc: function to use for allocating zero-filled memory.
760  * @try_malloc: function to use for allocating memory without a default error handler.
761  * @try_realloc: function to use for reallocating memory without a default error handler.
762  *
763  * A set of functions used to perform memory allocation. The same #GMemVTable must
764  * be used for all allocations in the same program; a call to g_mem_set_vtable(),
765  * if it exists, should be prior to any use of GLib.
766  */
767
768
769 /**
770  * GNormalizeMode:
771  * @G_NORMALIZE_DEFAULT: standardize differences that do not affect the text content, such as the above-mentioned accent representation
772  * @G_NORMALIZE_NFD: another name for %G_NORMALIZE_DEFAULT
773  * @G_NORMALIZE_DEFAULT_COMPOSE: like %G_NORMALIZE_DEFAULT, but with composed forms rather than a maximally decomposed form
774  * @G_NORMALIZE_NFC: another name for %G_NORMALIZE_DEFAULT_COMPOSE
775  * @G_NORMALIZE_ALL: beyond %G_NORMALIZE_DEFAULT also standardize the "compatibility" characters in Unicode, such as SUPERSCRIPT THREE to the standard forms (in this case DIGIT THREE). Formatting information may be lost but for most text operations such characters should be considered the same
776  * @G_NORMALIZE_NFKD: another name for %G_NORMALIZE_ALL
777  * @G_NORMALIZE_ALL_COMPOSE: like %G_NORMALIZE_ALL, but with composed forms rather than a maximally decomposed form
778  * @G_NORMALIZE_NFKC: another name for %G_NORMALIZE_ALL_COMPOSE
779  *
780  * Defines how a Unicode string is transformed in a canonical
781  * form, standardizing such issues as whether a character with
782  * an accent is represented as a base character and combining
783  * accent or as a single precomposed character. Unicode strings
784  * should generally be normalized before comparing them.
785  */
786
787
788 /**
789  * GObject:
790  *
791  * All the fields in the <structname>GObject</structname> structure are private
792  * to the #GObject implementation and should never be accessed directly.
793  */
794
795
796 /**
797  * GObject::notify:
798  * @gobject: the object which received the signal.
799  * @pspec: the #GParamSpec of the property which changed.
800  *
801  * The notify signal is emitted on an object when one of its
802  * properties has been changed. Note that getting this signal
803  * doesn't guarantee that the value of the property has actually
804  * changed, it may also be emitted when the setter for the property
805  * is called to reinstate the previous value.
806  *
807  * This signal is typically used to obtain change notification for a
808  * single property, by specifying the property name as a detail in the
809  * g_signal_connect() call, like this:
810  * |[
811  * g_signal_connect (text_view->buffer, "notify::paste-target-list",
812  * G_CALLBACK (gtk_text_view_target_list_notify),
813  * text_view)
814  * ]|
815  * It is important to note that you must use
816  * <link linkend="canonical-parameter-name">canonical</link> parameter names as
817  * detail strings for the notify signal.
818  */
819
820
821 /**
822  * GObjectClass:
823  * @g_type_class: the parent class
824  * @constructor: the @constructor function is called by g_object_new () to complete the object initialization after all the construction properties are set. The first thing a @constructor implementation must do is chain up to the @constructor of the parent class. Overriding @constructor should be rarely needed, e.g. to handle construct properties, or to implement singletons.
825  * @set_property: the generic setter for all properties of this type. Should be overridden for every type with properties. Implementations of @set_property don't need to emit property change notification explicitly, this is handled by the type system.
826  * @get_property: the generic getter for all properties of this type. Should be overridden for every type with properties.
827  * @dispose: the @dispose function is supposed to drop all references to other objects, but keep the instance otherwise intact, so that client method invocations still work. It may be run multiple times (due to reference loops). Before returning, @dispose should chain up to the @dispose method of the parent class.
828  * @finalize: instance finalization function, should finish the finalization of the instance begun in @dispose and chain up to the @finalize method of the parent class.
829  * @dispatch_properties_changed: emits property change notification for a bunch of properties. Overriding @dispatch_properties_changed should be rarely needed.
830  * @notify: the class closure for the notify signal
831  * @constructed: the @constructed function is called by g_object_new() as the final step of the object creation process.  At the point of the call, all construction properties have been set on the object.  The purpose of this call is to allow for object initialisation steps that can only be performed after construction properties have been set.  @constructed implementors should chain up to the @constructed call of their parent class to allow it to complete its initialisation.
832  *
833  * The class structure for the <structname>GObject</structname> type.
834  *
835  * <example>
836  * <title>Implementing singletons using a constructor</title>
837  * <programlisting>
838  * static MySingleton *the_singleton = NULL;
839  *
840  * static GObject*
841  * my_singleton_constructor (GType                  type,
842  * guint                  n_construct_params,
843  * GObjectConstructParam *construct_params)
844  * {
845  * GObject *object;
846  *
847  * if (!the_singleton)
848  * {
849  * object = G_OBJECT_CLASS (parent_class)->constructor (type,
850  * n_construct_params,
851  * construct_params);
852  * the_singleton = MY_SINGLETON (object);
853  * }
854  * else
855  * object = g_object_ref (G_OBJECT (the_singleton));
856  *
857  * return object;
858  * }
859  * </programlisting></example>
860  */
861
862
863 /**
864  * GObjectConstructParam:
865  * @pspec: the #GParamSpec of the construct parameter
866  * @value: the value to set the parameter to
867  *
868  * The <structname>GObjectConstructParam</structname> struct is an auxiliary
869  * structure used to hand #GParamSpec/#GValue pairs to the @constructor of
870  * a #GObjectClass.
871  */
872
873
874 /**
875  * GObjectFinalizeFunc:
876  * @object: the #GObject being finalized
877  *
878  * The type of the @finalize function of #GObjectClass.
879  */
880
881
882 /**
883  * GObjectGetPropertyFunc:
884  * @object: a #GObject
885  * @property_id: the numeric id under which the property was registered with g_object_class_install_property().
886  * @value: a #GValue to return the property value in
887  * @pspec: the #GParamSpec describing the property
888  *
889  * The type of the @get_property function of #GObjectClass.
890  */
891
892
893 /**
894  * GObjectSetPropertyFunc:
895  * @object: a #GObject
896  * @property_id: the numeric id under which the property was registered with g_object_class_install_property().
897  * @value: the new value for the property
898  * @pspec: the #GParamSpec describing the property
899  *
900  * The type of the @set_property function of #GObjectClass.
901  */
902
903
904 /**
905  * GOptionArg:
906  * @G_OPTION_ARG_NONE: No extra argument. This is useful for simple flags.
907  * @G_OPTION_ARG_STRING: The option takes a string argument.
908  * @G_OPTION_ARG_INT: The option takes an integer argument.
909  * @G_OPTION_ARG_CALLBACK: The option provides a callback to parse the extra argument.
910  * @G_OPTION_ARG_FILENAME: The option takes a filename as argument.
911  * @G_OPTION_ARG_STRING_ARRAY: The option takes a string argument, multiple uses of the option are collected into an array of strings.
912  * @G_OPTION_ARG_FILENAME_ARRAY: The option takes a filename as argument, multiple uses of the option are collected into an array of strings.
913  * @G_OPTION_ARG_DOUBLE: The option takes a double argument. The argument can be formatted either for the user's locale or for the "C" locale. Since 2.12
914  * @G_OPTION_ARG_INT64: The option takes a 64-bit integer. Like %G_OPTION_ARG_INT but for larger numbers. The number can be in decimal base, or in hexadecimal (when prefixed with <literal>0x</literal>, for example, <literal>0xffffffff</literal>). Since 2.12
915  *
916  * The #GOptionArg enum values determine which type of extra argument the
917  * options expect to find. If an option expects an extra argument, it
918  * can be specified in several ways; with a short option:
919  * <option>-x arg</option>, with a long option: <option>--name arg</option>
920  * or combined in a single argument: <option>--name=arg</option>.
921  */
922
923
924 /**
925  * GOptionArgFunc:
926  * @option_name: The name of the option being parsed. This will be either a single dash followed by a single letter (for a short name) or two dashes followed by a long option name.
927  * @value: The value to be parsed.
928  * @data: User data added to the #GOptionGroup containing the option when it was created with g_option_group_new()
929  * @error: A return location for errors. The error code %G_OPTION_ERROR_FAILED is intended to be used for errors in #GOptionArgFunc callbacks.
930  *
931  * The type of function to be passed as callback for %G_OPTION_ARG_CALLBACK
932  * options.
933  *
934  * occurred, in which case @error should be set with g_set_error()
935  *
936  * Returns: %TRUE if the option was successfully parsed, %FALSE if an error
937  */
938
939
940 /**
941  * GOptionContext:
942  *
943  * A <structname>GOptionContext</structname> struct defines which options
944  * are accepted by the commandline option parser. The struct has only private
945  * fields and should not be directly accessed.
946  */
947
948
949 /**
950  * GOptionEntry:
951  * @long_name: The long name of an option can be used to specify it in a commandline as --<replaceable>long_name</replaceable>. Every option must have a long name. To resolve conflicts if multiple option groups contain the same long name, it is also possible to specify the option as --<replaceable>groupname</replaceable>-<replaceable>long_name</replaceable>.
952  * @short_name: If an option has a short name, it can be specified -<replaceable>short_name</replaceable> in a commandline. @short_name must be a printable ASCII character different from '-', or zero if the option has no short name.
953  * @flags: Flags from #GOptionFlags.
954  * @arg: The type of the option, as a #GOptionArg.
955  * @arg_data: If the @arg type is %G_OPTION_ARG_CALLBACK, then @arg_data must point to a #GOptionArgFunc callback function, which will be called to handle the extra argument. Otherwise, @arg_data is a pointer to a location to store the value, the required type of the location depends on the @arg type: <variablelist> <varlistentry> <term>%G_OPTION_ARG_NONE</term> <listitem><para>%gboolean</para></listitem> </varlistentry> <varlistentry> <term>%G_OPTION_ARG_STRING</term> <listitem><para>%gchar*</para></listitem> </varlistentry> <varlistentry> <term>%G_OPTION_ARG_INT</term> <listitem><para>%gint</para></listitem> </varlistentry> <varlistentry> <term>%G_OPTION_ARG_FILENAME</term> <listitem><para>%gchar*</para></listitem> </varlistentry> <varlistentry> <term>%G_OPTION_ARG_STRING_ARRAY</term> <listitem><para>%gchar**</para></listitem> </varlistentry> <varlistentry> <term>%G_OPTION_ARG_FILENAME_ARRAY</term> <listitem><para>%gchar**</para></listitem> </varlistentry> <varlistentry> <term>%G_OPTION_ARG_DOUBLE</term> <listitem><para>%gdouble</para></listitem> </varlistentry> </variablelist> If @arg type is %G_OPTION_ARG_STRING or %G_OPTION_ARG_FILENAME the location will contain a newly allocated string if the option was given. That string needs to be freed by the callee using g_free(). Likewise if @arg type is %G_OPTION_ARG_STRING_ARRAY or %G_OPTION_ARG_FILENAME_ARRAY, the data should be freed using g_strfreev().
956  * @description: the description for the option in <option>--help</option> output. The @description is translated using the @translate_func of the group, see g_option_group_set_translation_domain().
957  * @arg_description: The placeholder to use for the extra argument parsed by the option in <option>--help</option> output. The @arg_description is translated using the @translate_func of the group, see g_option_group_set_translation_domain().
958  *
959  * A <structname>GOptionEntry</structname> defines a single option.
960  * To have an effect, they must be added to a #GOptionGroup with
961  * g_option_context_add_main_entries() or g_option_group_add_entries().
962  */
963
964
965 /**
966  * GOptionError:
967  * @G_OPTION_ERROR_UNKNOWN_OPTION: An option was not known to the parser. This error will only be reported, if the parser hasn't been instructed to ignore unknown options, see g_option_context_set_ignore_unknown_options().
968  * @G_OPTION_ERROR_BAD_VALUE: A value couldn't be parsed.
969  * @G_OPTION_ERROR_FAILED: A #GOptionArgFunc callback failed.
970  *
971  * Error codes returned by option parsing.
972  */
973
974
975 /**
976  * GOptionErrorFunc:
977  * @context: The active #GOptionContext
978  * @group: The group to which the function belongs
979  * @data: User data added to the #GOptionGroup containing the option when it was created with g_option_group_new()
980  * @error: The #GError containing details about the parse error
981  *
982  * The type of function to be used as callback when a parse error occurs.
983  */
984
985
986 /**
987  * GOptionFlags:
988  * @G_OPTION_FLAG_HIDDEN: The option doesn't appear in <option>--help</option> output.
989  * @G_OPTION_FLAG_IN_MAIN: The option appears in the main section of the <option>--help</option> output, even if it is defined in a group.
990  * @G_OPTION_FLAG_REVERSE: For options of the %G_OPTION_ARG_NONE kind, this flag indicates that the sense of the option is reversed.
991  * @G_OPTION_FLAG_NO_ARG: For options of the %G_OPTION_ARG_CALLBACK kind, this flag indicates that the callback does not take any argument (like a %G_OPTION_ARG_NONE option). Since 2.8
992  * @G_OPTION_FLAG_FILENAME: For options of the %G_OPTION_ARG_CALLBACK kind, this flag indicates that the argument should be passed to the callback in the GLib filename encoding rather than UTF-8. Since 2.8
993  * @G_OPTION_FLAG_OPTIONAL_ARG: For options of the %G_OPTION_ARG_CALLBACK kind, this flag indicates that the argument supply is optional. If no argument is given then data of %GOptionParseFunc will be set to NULL. Since 2.8
994  * @G_OPTION_FLAG_NOALIAS: This flag turns off the automatic conflict resolution which prefixes long option names with <literal>groupname-</literal> if there is a conflict. This option should only be used in situations where aliasing is necessary to model some legacy commandline interface. It is not safe to use this option, unless all option groups are under your direct control. Since 2.8.
995  *
996  * Flags which modify individual options.
997  */
998
999
1000 /**
1001  * GOptionGroup:
1002  *
1003  * A <structname>GOptionGroup</structname> struct defines the options in a single
1004  * group. The struct has only private fields and should not be directly accessed.
1005  *
1006  * All options in a group share the same translation function. Libraries which
1007  * need to parse commandline options are expected to provide a function for
1008  * getting a <structname>GOptionGroup</structname> holding their options, which
1009  * the application can then add to its #GOptionContext.
1010  */
1011
1012
1013 /**
1014  * GOptionParseFunc:
1015  * @context: The active #GOptionContext
1016  * @group: The group to which the function belongs
1017  * @data: User data added to the #GOptionGroup containing the option when it was created with g_option_group_new()
1018  * @error: A return location for error details
1019  *
1020  * The type of function that can be called before and after parsing.
1021  *
1022  * occurred, in which case @error should be set with g_set_error()
1023  *
1024  * Returns: %TRUE if the function completed successfully, %FALSE if an error
1025  */
1026
1027
1028 /**
1029  * GParamFlags:
1030  * @G_PARAM_READABLE: the parameter is readable
1031  * @G_PARAM_WRITABLE: the parameter is writable
1032  * @G_PARAM_CONSTRUCT: the parameter will be set upon object construction
1033  * @G_PARAM_CONSTRUCT_ONLY: the parameter will only be set upon object construction
1034  * @G_PARAM_LAX_VALIDATION: upon parameter conversion (see g_param_value_convert()) strict validation is not required
1035  * @G_PARAM_STATIC_NAME: the string used as name when constructing the parameter is guaranteed to remain valid and unmodified for the lifetime of the parameter. Since 2.8
1036  * @G_PARAM_STATIC_NICK: the string used as nick when constructing the parameter is guaranteed to remain valid and unmmodified for the lifetime of the parameter. Since 2.8
1037  * @G_PARAM_STATIC_BLURB: the string used as blurb when constructing the parameter is guaranteed to remain valid and unmodified for the lifetime of the parameter. Since 2.8
1038  * @G_PARAM_PRIVATE: internal
1039  * @G_PARAM_DEPRECATED: the parameter is deprecated and will be removed in a future version. A warning will be generated if it is used while running with G_ENABLE_DIAGNOSTIC=1. Since: 2.26
1040  *
1041  * Through the #GParamFlags flag values, certain aspects of parameters
1042  * can be configured.
1043  */
1044
1045
1046 /**
1047  * GParamSpec:
1048  * @g_type_instance: private #GTypeInstance portion
1049  * @name: name of this parameter: always an interned string
1050  * @flags: #GParamFlags flags for this parameter
1051  * @value_type: the #GValue type for this parameter
1052  * @owner_type: #GType type that uses (introduces) this parameter
1053  *
1054  * All other fields of the <structname>GParamSpec</structname> struct are private and
1055  * should not be used directly.
1056  */
1057
1058
1059 /**
1060  * GParamSpecBoolean:
1061  * @parent_instance: private #GParamSpec portion
1062  * @default_value: default value for the property specified
1063  *
1064  * A #GParamSpec derived structure that contains the meta data for boolean properties.
1065  */
1066
1067
1068 /**
1069  * GParamSpecBoxed:
1070  * @parent_instance: private #GParamSpec portion
1071  *
1072  * A #GParamSpec derived structure that contains the meta data for boxed properties.
1073  */
1074
1075
1076 /**
1077  * GParamSpecChar:
1078  * @parent_instance: private #GParamSpec portion
1079  * @minimum: minimum value for the property specified
1080  * @maximum: maximum value for the property specified
1081  * @default_value: default value for the property specified
1082  *
1083  * A #GParamSpec derived structure that contains the meta data for character properties.
1084  */
1085
1086
1087 /**
1088  * GParamSpecClass:
1089  * @g_type_class: the parent class
1090  * @value_type: the #GValue type for this parameter
1091  * @finalize: The instance finalization function (optional), should chain up to the finalize method of the parent class.
1092  * @value_set_default: Resets a @value to the default value for this type (recommended, the default is g_value_reset()), see g_param_value_set_default().
1093  * @value_validate: Ensures that the contents of @value comply with the specifications set out by this type (optional), see g_param_value_validate().
1094  * @values_cmp: Compares @value1 with @value2 according to this type (recommended, the default is memcmp()), see g_param_values_cmp().
1095  *
1096  * The class structure for the <structname>GParamSpec</structname> type.
1097  * Normally, <structname>GParamSpec</structname> classes are filled by
1098  * g_param_type_register_static().
1099  */
1100
1101
1102 /**
1103  * GParamSpecDouble:
1104  * @parent_instance: private #GParamSpec portion
1105  * @minimum: minimum value for the property specified
1106  * @maximum: maximum value for the property specified
1107  * @default_value: default value for the property specified
1108  * @epsilon: values closer than @epsilon will be considered identical by g_param_values_cmp(); the default value is 1e-90.
1109  *
1110  * A #GParamSpec derived structure that contains the meta data for double properties.
1111  */
1112
1113
1114 /**
1115  * GParamSpecEnum:
1116  * @parent_instance: private #GParamSpec portion
1117  * @enum_class: the #GEnumClass for the enum
1118  * @default_value: default value for the property specified
1119  *
1120  * A #GParamSpec derived structure that contains the meta data for enum
1121  * properties.
1122  */
1123
1124
1125 /**
1126  * GParamSpecFlags:
1127  * @parent_instance: private #GParamSpec portion
1128  * @flags_class: the #GFlagsClass for the flags
1129  * @default_value: default value for the property specified
1130  *
1131  * A #GParamSpec derived structure that contains the meta data for flags
1132  * properties.
1133  */
1134
1135
1136 /**
1137  * GParamSpecFloat:
1138  * @parent_instance: private #GParamSpec portion
1139  * @minimum: minimum value for the property specified
1140  * @maximum: maximum value for the property specified
1141  * @default_value: default value for the property specified
1142  * @epsilon: values closer than @epsilon will be considered identical by g_param_values_cmp(); the default value is 1e-30.
1143  *
1144  * A #GParamSpec derived structure that contains the meta data for float properties.
1145  */
1146
1147
1148 /**
1149  * GParamSpecGType:
1150  * @parent_instance: private #GParamSpec portion
1151  * @is_a_type: a #GType whose subtypes can occur as values
1152  *
1153  * A #GParamSpec derived structure that contains the meta data for #GType properties.
1154  *
1155  * Since: 2.10
1156  */
1157
1158
1159 /**
1160  * GParamSpecInt:
1161  * @parent_instance: private #GParamSpec portion
1162  * @minimum: minimum value for the property specified
1163  * @maximum: maximum value for the property specified
1164  * @default_value: default value for the property specified
1165  *
1166  * A #GParamSpec derived structure that contains the meta data for integer properties.
1167  */
1168
1169
1170 /**
1171  * GParamSpecInt64:
1172  * @parent_instance: private #GParamSpec portion
1173  * @minimum: minimum value for the property specified
1174  * @maximum: maximum value for the property specified
1175  * @default_value: default value for the property specified
1176  *
1177  * A #GParamSpec derived structure that contains the meta data for 64bit integer properties.
1178  */
1179
1180
1181 /**
1182  * GParamSpecLong:
1183  * @parent_instance: private #GParamSpec portion
1184  * @minimum: minimum value for the property specified
1185  * @maximum: maximum value for the property specified
1186  * @default_value: default value for the property specified
1187  *
1188  * A #GParamSpec derived structure that contains the meta data for long integer properties.
1189  */
1190
1191
1192 /**
1193  * GParamSpecObject:
1194  * @parent_instance: private #GParamSpec portion
1195  *
1196  * A #GParamSpec derived structure that contains the meta data for object properties.
1197  */
1198
1199
1200 /**
1201  * GParamSpecOverride:
1202  *
1203  * This is a type of #GParamSpec type that simply redirects operations to
1204  * another paramspec.  All operations other than getting or
1205  * setting the value are redirected, including accessing the nick and
1206  * blurb, validating a value, and so forth. See
1207  * g_param_spec_get_redirect_target() for retrieving the overidden
1208  * property. #GParamSpecOverride is used in implementing
1209  * g_object_class_override_property(), and will not be directly useful
1210  * unless you are implementing a new base type similar to GObject.
1211  *
1212  * Since: 2.4
1213  */
1214
1215
1216 /**
1217  * GParamSpecParam:
1218  * @parent_instance: private #GParamSpec portion
1219  *
1220  * A #GParamSpec derived structure that contains the meta data for %G_TYPE_PARAM
1221  * properties.
1222  */
1223
1224
1225 /**
1226  * GParamSpecPointer:
1227  * @parent_instance: private #GParamSpec portion
1228  *
1229  * A #GParamSpec derived structure that contains the meta data for pointer properties.
1230  */
1231
1232
1233 /**
1234  * GParamSpecPool:
1235  *
1236  * A #GParamSpecPool maintains a collection of #GParamSpec<!-- -->s which can be
1237  * quickly accessed by owner and name. The implementation of the #GObject property
1238  * system uses such a pool to store the #GParamSpecs of the properties all object
1239  * types.
1240  */
1241
1242
1243 /**
1244  * GParamSpecString:
1245  * @parent_instance: private #GParamSpec portion
1246  * @default_value: default value for the property specified
1247  * @cset_first: a string containing the allowed values for the first byte
1248  * @cset_nth: a string containing the allowed values for the subsequent bytes
1249  * @substitutor: the replacement byte for bytes which don't match @cset_first or @cset_nth.
1250  * @null_fold_if_empty: replace empty string by %NULL
1251  * @ensure_non_null: replace %NULL strings by an empty string
1252  *
1253  * A #GParamSpec derived structure that contains the meta data for string
1254  * properties.
1255  */
1256
1257
1258 /**
1259  * GParamSpecTypeInfo:
1260  * @instance_size: Size of the instance (object) structure.
1261  * @n_preallocs: Prior to GLib 2.10, it specified the number of pre-allocated (cached) instances to reserve memory for (0 indicates no caching). Since GLib 2.10, it is ignored, since instances are allocated with the <link linkend="glib-Memory-Slices">slice allocator</link> now.
1262  * @instance_init: Location of the instance initialization function (optional).
1263  * @value_type: The #GType of values conforming to this #GParamSpec
1264  * @finalize: The instance finalization function (optional).
1265  * @value_set_default: Resets a @value to the default value for @pspec (recommended, the default is g_value_reset()), see g_param_value_set_default().
1266  * @value_validate: Ensures that the contents of @value comply with the specifications set out by @pspec (optional), see g_param_value_validate().
1267  * @values_cmp: Compares @value1 with @value2 according to @pspec (recommended, the default is memcmp()), see g_param_values_cmp().
1268  *
1269  * This structure is used to provide the type system with the information
1270  * required to initialize and destruct (finalize) a parameter's class and
1271  * instances thereof.
1272  * The initialized structure is passed to the g_param_type_register_static()
1273  * The type system will perform a deep copy of this structure, so its memory
1274  * does not need to be persistent across invocation of
1275  * g_param_type_register_static().
1276  */
1277
1278
1279 /**
1280  * GParamSpecUChar:
1281  * @parent_instance: private #GParamSpec portion
1282  * @minimum: minimum value for the property specified
1283  * @maximum: maximum value for the property specified
1284  * @default_value: default value for the property specified
1285  *
1286  * A #GParamSpec derived structure that contains the meta data for unsigned character properties.
1287  */
1288
1289
1290 /**
1291  * GParamSpecUInt:
1292  * @parent_instance: private #GParamSpec portion
1293  * @minimum: minimum value for the property specified
1294  * @maximum: maximum value for the property specified
1295  * @default_value: default value for the property specified
1296  *
1297  * A #GParamSpec derived structure that contains the meta data for unsigned integer properties.
1298  */
1299
1300
1301 /**
1302  * GParamSpecUInt64:
1303  * @parent_instance: private #GParamSpec portion
1304  * @minimum: minimum value for the property specified
1305  * @maximum: maximum value for the property specified
1306  * @default_value: default value for the property specified
1307  *
1308  * A #GParamSpec derived structure that contains the meta data for unsigned 64bit integer properties.
1309  */
1310
1311
1312 /**
1313  * GParamSpecULong:
1314  * @parent_instance: private #GParamSpec portion
1315  * @minimum: minimum value for the property specified
1316  * @maximum: maximum value for the property specified
1317  * @default_value: default value for the property specified
1318  *
1319  * A #GParamSpec derived structure that contains the meta data for unsigned long integer properties.
1320  */
1321
1322
1323 /**
1324  * GParamSpecUnichar:
1325  * @parent_instance: private #GParamSpec portion
1326  * @default_value: default value for the property specified
1327  *
1328  * A #GParamSpec derived structure that contains the meta data for unichar (unsigned integer) properties.
1329  */
1330
1331
1332 /**
1333  * GParamSpecValueArray:
1334  * @parent_instance: private #GParamSpec portion
1335  * @element_spec: a #GParamSpec describing the elements contained in arrays of this property, may be %NULL
1336  * @fixed_n_elements: if greater than 0, arrays of this property will always have this many elements
1337  *
1338  * A #GParamSpec derived structure that contains the meta data for #GValueArray properties.
1339  */
1340
1341
1342 /**
1343  * GParamSpecVariant:
1344  * @parent_instance: private #GParamSpec portion
1345  * @type: a #GVariantType, or %NULL
1346  * @default_value: a #GVariant, or %NULL
1347  *
1348  * A #GParamSpec derived structure that contains the meta data for #GVariant properties.
1349  *
1350  * Since: 2.26
1351  */
1352
1353
1354 /**
1355  * GParameter:
1356  * @name: the parameter name
1357  * @value: the parameter value
1358  *
1359  * The <structname>GParameter</structname> struct is an auxiliary structure used
1360  * to hand parameter name/value pairs to g_object_newv().
1361  */
1362
1363
1364 /**
1365  * GPid:
1366  *
1367  * A type which is used to hold a process identification.
1368  *
1369  * On UNIX, processes are identified by a process id (an integer),
1370  * while Windows uses process handles (which are pointers).
1371  *
1372  * GPid is used in GLib only for descendant processes spawned with
1373  * the g_spawn functions.
1374  */
1375
1376
1377 /**
1378  * GPollFD:
1379  * @fd: the file descriptor to poll (or a <type>HANDLE</type> on Win32)
1380  * @events: a bitwise combination from #GIOCondition, specifying which events should be polled for. Typically for reading from a file descriptor you would use %G_IO_IN | %G_IO_HUP | %G_IO_ERR, and for writing you would use %G_IO_OUT | %G_IO_ERR.
1381  * @revents: a bitwise combination of flags from #GIOCondition, returned from the poll() function to indicate which events occurred.
1382  *
1383  * Represents a file descriptor, which events to poll for, and which events
1384  * occurred.
1385  */
1386
1387
1388 /**
1389  * GPollFunc:
1390  * @ufds: an array of #GPollFD elements
1391  * @nfsd: the number of elements in @ufds
1392  * @timeout_: the maximum time to wait for an event of the file descriptors. A negative value indicates an infinite timeout.
1393  *
1394  * Specifies the type of function passed to g_main_context_set_poll_func().
1395  * The semantics of the function should match those of the poll() system call.
1396  *
1397  * reported, or -1 if an error occurred.
1398  *
1399  * Returns: the number of #GPollFD elements which have events or errors
1400  */
1401
1402
1403 /**
1404  * GPrintFunc:
1405  * @string: the message to output
1406  *
1407  * Specifies the type of the print handler functions.
1408  * These are called with the complete formatted string to output.
1409  */
1410
1411
1412 /**
1413  * GQueue:
1414  * @head: a pointer to the first element of the queue
1415  * @tail: a pointer to the last element of the queue
1416  * @length: the number of elements in the queue
1417  *
1418  * Contains the public fields of a
1419  * <link linkend="glib-Double-ended-Queues">Queue</link>.
1420  */
1421
1422
1423 /**
1424  * GRegex:
1425  *
1426  * A GRegex is the "compiled" form of a regular expression pattern. This
1427  * structure is opaque and its fields cannot be accessed directly.
1428  *
1429  * Since: 2.14
1430  */
1431
1432
1433 /**
1434  * GRegexCompileFlags:
1435  * @G_REGEX_CASELESS: Letters in the pattern match both upper- and lowercase letters. This option can be changed within a pattern by a "(?i)" option setting.
1436  * @G_REGEX_MULTILINE: By default, GRegex treats the strings as consisting of a single line of characters (even if it actually contains newlines). The "start of line" metacharacter ("^") matches only at the start of the string, while the "end of line" metacharacter ("$") matches only at the end of the string, or before a terminating newline (unless #G_REGEX_DOLLAR_ENDONLY is set). When #G_REGEX_MULTILINE is set, the "start of line" and "end of line" constructs match immediately following or immediately before any newline in the string, respectively, as well as at the very start and end. This can be changed within a pattern by a "(?m)" option setting.
1437  * @G_REGEX_DOTALL: A dot metacharater (".") in the pattern matches all characters, including newlines. Without it, newlines are excluded. This option can be changed within a pattern by a ("?s") option setting.
1438  * @G_REGEX_EXTENDED: Whitespace data characters in the pattern are totally ignored except when escaped or inside a character class. Whitespace does not include the VT character (code 11). In addition, characters between an unescaped "#" outside a character class and the next newline character, inclusive, are also ignored. This can be changed within a pattern by a "(?x)" option setting.
1439  * @G_REGEX_ANCHORED: The pattern is forced to be "anchored", that is, it is constrained to match only at the first matching point in the string that is being searched. This effect can also be achieved by appropriate constructs in the pattern itself such as the "^" metacharater.
1440  * @G_REGEX_DOLLAR_ENDONLY: A dollar metacharacter ("$") in the pattern matches only at the end of the string. Without this option, a dollar also matches immediately before the final character if it is a newline (but not before any other newlines). This option is ignored if #G_REGEX_MULTILINE is set.
1441  * @G_REGEX_UNGREEDY: Inverts the "greediness" of the quantifiers so that they are not greedy by default, but become greedy if followed by "?". It can also be set by a "(?U)" option setting within the pattern.
1442  * @G_REGEX_RAW: Usually strings must be valid UTF-8 strings, using this flag they are considered as a raw sequence of bytes. @G_REGEX_NO_AUTO_CAPTURE: Disables the use of numbered capturing parentheses in the pattern. Any opening parenthesis that is not followed by "?" behaves as if it were followed by "?:" but named parentheses can still be used for capturing (and they acquire numbers in the usual way).
1443  * @G_REGEX_OPTIMIZE: Optimize the regular expression. If the pattern will be used many times, then it may be worth the effort to optimize it to improve the speed of matches.
1444  * @G_REGEX_DUPNAMES: Names used to identify capturing subpatterns need not be unique. This can be helpful for certain types of pattern when it is known that only one instance of the named subpattern can ever be matched.
1445  * @G_REGEX_NEWLINE_CR: Usually any newline character is recognized, if this option is set, the only recognized newline character is '\r'.
1446  * @G_REGEX_NEWLINE_LF: Usually any newline character is recognized, if this option is set, the only recognized newline character is '\n'.
1447  * @G_REGEX_NEWLINE_CRLF: Usually any newline character is recognized, if this option is set, the only recognized newline character sequence is '\r\n'.
1448  *
1449  * Flags specifying compile-time options.
1450  *
1451  * Since: 2.14
1452  */
1453
1454
1455 /**
1456  * GRegexError:
1457  * @G_REGEX_ERROR_COMPILE: Compilation of the regular expression failed.
1458  * @G_REGEX_ERROR_OPTIMIZE: Optimization of the regular expression failed.
1459  * @G_REGEX_ERROR_REPLACE: Replacement failed due to an ill-formed replacement string.
1460  * @G_REGEX_ERROR_MATCH: The match process failed.
1461  * @G_REGEX_ERROR_INTERNAL: Internal error of the regular expression engine. Since 2.16
1462  * @G_REGEX_ERROR_STRAY_BACKSLASH: "\\" at end of pattern. Since 2.16
1463  * @G_REGEX_ERROR_MISSING_CONTROL_CHAR: "\\c" at end of pattern. Since 2.16
1464  * @G_REGEX_ERROR_UNRECOGNIZED_ESCAPE: Unrecognized character follows "\\". Since 2.16
1465  * @G_REGEX_ERROR_QUANTIFIERS_OUT_OF_ORDER: Numbers out of order in "{}" quantifier. Since 2.16
1466  * @G_REGEX_ERROR_QUANTIFIER_TOO_BIG: Number too big in "{}" quantifier. Since 2.16
1467  * @G_REGEX_ERROR_UNTERMINATED_CHARACTER_CLASS: Missing terminating "]" for character class. Since 2.16
1468  * @G_REGEX_ERROR_INVALID_ESCAPE_IN_CHARACTER_CLASS: Invalid escape sequence in character class. Since 2.16
1469  * @G_REGEX_ERROR_RANGE_OUT_OF_ORDER: Range out of order in character class. Since 2.16
1470  * @G_REGEX_ERROR_NOTHING_TO_REPEAT: Nothing to repeat. Since 2.16
1471  * @G_REGEX_ERROR_UNRECOGNIZED_CHARACTER: Unrecognized character after "(?", "(?&lt;" or "(?P". Since 2.16
1472  * @G_REGEX_ERROR_POSIX_NAMED_CLASS_OUTSIDE_CLASS: POSIX named classes are supported only within a class. Since 2.16
1473  * @G_REGEX_ERROR_UNMATCHED_PARENTHESIS: Missing terminating ")" or ")" without opening "(". Since 2.16
1474  * @G_REGEX_ERROR_INEXISTENT_SUBPATTERN_REFERENCE: Reference to non-existent subpattern. Since 2.16
1475  * @G_REGEX_ERROR_UNTERMINATED_COMMENT: Missing terminating ")" after comment. Since 2.16
1476  * @G_REGEX_ERROR_EXPRESSION_TOO_LARGE: Regular expression too large. Since 2.16
1477  * @G_REGEX_ERROR_MEMORY_ERROR: Failed to get memory. Since 2.16
1478  * @G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND: Lookbehind assertion is not fixed length. Since 2.16
1479  * @G_REGEX_ERROR_MALFORMED_CONDITION: Malformed number or name after "(?(". Since 2.16
1480  * @G_REGEX_ERROR_TOO_MANY_CONDITIONAL_BRANCHES: Conditional group contains more than two branches. Since 2.16
1481  * @G_REGEX_ERROR_ASSERTION_EXPECTED: Assertion expected after "(?(". Since 2.16
1482  * @G_REGEX_ERROR_UNKNOWN_POSIX_CLASS_NAME: Unknown POSIX class name. Since 2.16
1483  * @G_REGEX_ERROR_POSIX_COLLATING_ELEMENTS_NOT_SUPPORTED: POSIX collating elements are not supported. Since 2.16
1484  * @G_REGEX_ERROR_HEX_CODE_TOO_LARGE: Character value in "\\x{...}" sequence is too large. Since 2.16
1485  * @G_REGEX_ERROR_INVALID_CONDITION: Invalid condition "(?(0)". Since 2.16
1486  * @G_REGEX_ERROR_SINGLE_BYTE_MATCH_IN_LOOKBEHIND: \\C not allowed in lookbehind assertion. Since 2.16
1487  * @G_REGEX_ERROR_INFINITE_LOOP: Recursive call could loop indefinitely. Since 2.16
1488  * @G_REGEX_ERROR_MISSING_SUBPATTERN_NAME_TERMINATOR: Missing terminator in subpattern name. Since 2.16
1489  * @G_REGEX_ERROR_DUPLICATE_SUBPATTERN_NAME: Two named subpatterns have the same name. Since 2.16
1490  * @G_REGEX_ERROR_MALFORMED_PROPERTY: Malformed "\\P" or "\\p" sequence. Since 2.16
1491  * @G_REGEX_ERROR_UNKNOWN_PROPERTY: Unknown property name after "\\P" or "\\p". Since 2.16
1492  * @G_REGEX_ERROR_SUBPATTERN_NAME_TOO_LONG: Subpattern name is too long (maximum 32 characters). Since 2.16
1493  * @G_REGEX_ERROR_TOO_MANY_SUBPATTERNS: Too many named subpatterns (maximum 10,000). Since 2.16
1494  * @G_REGEX_ERROR_INVALID_OCTAL_VALUE: Octal value is greater than "\\377". Since 2.16
1495  * @G_REGEX_ERROR_TOO_MANY_BRANCHES_IN_DEFINE: "DEFINE" group contains more than one branch. Since 2.16
1496  * @G_REGEX_ERROR_DEFINE_REPETION: Repeating a "DEFINE" group is not allowed. Since 2.16
1497  * @G_REGEX_ERROR_INCONSISTENT_NEWLINE_OPTIONS: Inconsistent newline options. Since 2.16
1498  * @G_REGEX_ERROR_MISSING_BACK_REFERENCE: "\\g" is not followed by a braced name or an optionally braced non-zero number. Since 2.16
1499  *
1500  * Error codes returned by regular expressions functions.
1501  *
1502  * Since: 2.14
1503  */
1504
1505
1506 /**
1507  * GRegexEvalCallback:
1508  * @match_info: the #GMatchInfo generated by the match. Use g_match_info_get_regex() and g_match_info_get_string() if you need the #GRegex or the matched string.
1509  * @result: a #GString containing the new string
1510  * @user_data: user data passed to g_regex_replace_eval()
1511  *
1512  * Specifies the type of the function passed to g_regex_replace_eval().
1513  * It is called for each occurrence of the pattern in the string passed
1514  * to g_regex_replace_eval(), and it should append the replacement to
1515  * @result.
1516  *
1517  * Returns: %FALSE to continue the replacement process, %TRUE to stop it
1518  * Since: 2.14
1519  */
1520
1521
1522 /**
1523  * GRegexMatchFlags:
1524  * @G_REGEX_MATCH_ANCHORED: The pattern is forced to be "anchored", that is, it is constrained to match only at the first matching point in the string that is being searched. This effect can also be achieved by appropriate constructs in the pattern itself such as the "^" metacharater.
1525  * @G_REGEX_MATCH_NOTBOL: Specifies that first character of the string is not the beginning of a line, so the circumflex metacharacter should not match before it. Setting this without #G_REGEX_MULTILINE (at compile time) causes circumflex never to match. This option affects only the behaviour of the circumflex metacharacter, it does not affect "\A".
1526  * @G_REGEX_MATCH_NOTEOL: Specifies that the end of the subject string is not the end of a line, so the dollar metacharacter should not match it nor (except in multiline mode) a newline immediately before it. Setting this without #G_REGEX_MULTILINE (at compile time) causes dollar never to match. This option affects only the behaviour of the dollar metacharacter, it does not affect "\Z" or "\z".
1527  * @G_REGEX_MATCH_NOTEMPTY: An empty string is not considered to be a valid match if this option is set. If there are alternatives in the pattern, they are tried. If all the alternatives match the empty string, the entire match fails. For example, if the pattern "a?b?" is applied to a string not beginning with "a" or "b", it matches the empty string at the start of the string. With this flag set, this match is not valid, so GRegex searches further into the string for occurrences of "a" or "b".
1528  * @G_REGEX_MATCH_PARTIAL: Turns on the partial matching feature, for more documentation on partial matching see g_match_info_is_partial_match().
1529  * @G_REGEX_MATCH_NEWLINE_CR: Overrides the newline definition set when creating a new #GRegex, setting the '\r' character as line terminator.
1530  * @G_REGEX_MATCH_NEWLINE_LF: Overrides the newline definition set when creating a new #GRegex, setting the '\n' character as line terminator.
1531  * @G_REGEX_MATCH_NEWLINE_CRLF: Overrides the newline definition set when creating a new #GRegex, setting the '\r\n' characters as line terminator.
1532  * @G_REGEX_MATCH_NEWLINE_ANY: Overrides the newline definition set when creating a new #GRegex, any newline character or character sequence is recognized.
1533  *
1534  * Flags specifying match-time options.
1535  *
1536  * Since: 2.14
1537  */
1538
1539
1540 /**
1541  * GSignalAccumulator:
1542  * @ihint: Signal invocation hint, see #GSignalInvocationHint.
1543  * @return_accu: Accumulator to collect callback return values in, this is the return value of the current signal emission.
1544  * @handler_return: A #GValue holding the return value of the signal handler.
1545  * @data: Callback data that was specified when creating the signal.
1546  *
1547  * The signal accumulator is a special callback function that can be used
1548  * to collect return values of the various callbacks that are called
1549  * during a signal emission. The signal accumulator is specified at signal
1550  * creation time, if it is left %NULL, no accumulation of callback return
1551  * values is performed. The return value of signal emissions is then the
1552  * value returned by the last callback.
1553  *
1554  * should be aborted. Returning %FALSE means to abort the
1555  * current emission and %TRUE is returned for continuation.
1556  *
1557  * Returns: The accumulator function returns whether the signal emission
1558  */
1559
1560
1561 /**
1562  * GSignalCMarshaller:
1563  *
1564  * This is the signature of marshaller functions, required to marshall
1565  * arrays of parameter values to signal emissions into C language callback
1566  * invocations. It is merely an alias to #GClosureMarshal since the #GClosure
1567  * mechanism takes over responsibility of actual function invocation for the
1568  * signal system.
1569  */
1570
1571
1572 /**
1573  * GSignalCVaMarshaller:
1574  *
1575  * This is the signature of va_list marshaller functions, an optional
1576  * marshaller that can be used in some situations to avoid
1577  * marshalling the signal argument into GValues.
1578  */
1579
1580
1581 /**
1582  * GSignalEmissionHook:
1583  * @ihint: Signal invocation hint, see #GSignalInvocationHint.
1584  * @n_param_values: the number of parameters to the function, including the instance on which the signal was emitted.
1585  * @param_values: (array length=n_param_values): the instance on which the signal was emitted, followed by the parameters of the emission.
1586  * @data: user data associated with the hook.
1587  *
1588  * A simple function pointer to get invoked when the signal is emitted. This
1589  * allows you to tie a hook to the signal type, so that it will trap all
1590  * emissions of that signal, from any object.
1591  *
1592  * You may not attach these to signals created with the #G_SIGNAL_NO_HOOKS flag.
1593  *
1594  * hook is disconnected (and destroyed).
1595  *
1596  * Returns: whether it wants to stay connected. If it returns %FALSE, the signal
1597  */
1598
1599
1600 /**
1601  * GSignalFlags:
1602  * @G_SIGNAL_RUN_FIRST: Invoke the object method handler in the first emission stage.
1603  * @G_SIGNAL_RUN_LAST: Invoke the object method handler in the third emission stage.
1604  * @G_SIGNAL_RUN_CLEANUP: Invoke the object method handler in the last emission stage.
1605  * @G_SIGNAL_NO_RECURSE: Signals being emitted for an object while currently being in emission for this very object will not be emitted recursively, but instead cause the first emission to be restarted.
1606  * @G_SIGNAL_DETAILED: This signal supports "::detail" appendices to the signal name upon handler connections and emissions.
1607  * @G_SIGNAL_ACTION: Action signals are signals that may freely be emitted on alive objects from user code via g_signal_emit() and friends, without the need of being embedded into extra code that performs pre or post emission adjustments on the object. They can also be thought of as object methods which can be called generically by third-party code.
1608  * @G_SIGNAL_NO_HOOKS: No emissions hooks are supported for this signal.
1609  * @G_SIGNAL_MUST_COLLECT: Varargs signal emission will always collect the arguments, even if there are no signal handlers connected.  Since 2.30.
1610  * @G_SIGNAL_DEPRECATED: The signal is deprecated and will be removed in a future version. A warning will be generated if it is connected while running with G_ENABLE_DIAGNOSTIC=1.  Since 2.32.
1611  *
1612  * The signal flags are used to specify a signal's behaviour, the overall
1613  * signal description outlines how especially the RUN flags control the
1614  * stages of a signal emission.
1615  */
1616
1617
1618 /**
1619  * GSignalInvocationHint:
1620  * @signal_id: The signal id of the signal invoking the callback
1621  * @detail: The detail passed on for this emission
1622  * @run_type: The stage the signal emission is currently in, this field will contain one of %G_SIGNAL_RUN_FIRST, %G_SIGNAL_RUN_LAST or %G_SIGNAL_RUN_CLEANUP.
1623  *
1624  * The #GSignalInvocationHint structure is used to pass on additional information
1625  * to callbacks during a signal emission.
1626  */
1627
1628
1629 /**
1630  * GSignalMatchType:
1631  * @G_SIGNAL_MATCH_ID: The signal id must be equal.
1632  * @G_SIGNAL_MATCH_DETAIL: The signal detail be equal.
1633  * @G_SIGNAL_MATCH_CLOSURE: The closure must be the same.
1634  * @G_SIGNAL_MATCH_FUNC: The C closure callback must be the same.
1635  * @G_SIGNAL_MATCH_DATA: The closure data must be the same.
1636  * @G_SIGNAL_MATCH_UNBLOCKED: Only unblocked signals may matched.
1637  *
1638  * The match types specify what g_signal_handlers_block_matched(),
1639  * g_signal_handlers_unblock_matched() and g_signal_handlers_disconnect_matched()
1640  * match signals by.
1641  */
1642
1643
1644 /**
1645  * GSignalQuery:
1646  * @signal_id: The signal id of the signal being queried, or 0 if the signal to be queried was unknown.
1647  * @signal_name: The signal name.
1648  * @itype: The interface/instance type that this signal can be emitted for.
1649  * @signal_flags: The signal flags as passed in to g_signal_new().
1650  * @return_type: The return type for user callbacks.
1651  * @n_params: The number of parameters that user callbacks take.
1652  * @param_types: The individual parameter types for user callbacks, note that the effective callback signature is: <programlisting> @return_type callback (#gpointer     data1, [param_types param_names,] gpointer     data2); </programlisting>
1653  *
1654  * A structure holding in-depth information for a specific signal. It is
1655  * filled in by the g_signal_query() function.
1656  */
1657
1658
1659 /**
1660  * GSource:
1661  *
1662  * The <structname>GSource</structname> struct is an opaque data type
1663  * representing an event source.
1664  */
1665
1666
1667 /**
1668  * GSourceCallbackFuncs:
1669  * @ref: Called when a reference is added to the callback object
1670  * @unref: Called when a reference to the callback object is dropped
1671  * @get: Called to extract the callback function and data from the callback object. The <structname>GSourceCallbackFuncs</structname> struct contains functions for managing callback objects.
1672  *
1673  *
1674  */
1675
1676
1677 /**
1678  * GSourceDummyMarshal:
1679  *
1680  * This is just a placeholder for #GClosureMarshal,
1681  * which cannot be used here for dependency reasons.
1682  */
1683
1684
1685 /**
1686  * GSourceFunc:
1687  * @user_data: data passed to the function, set when the source was created with one of the above functions
1688  *
1689  * Specifies the type of function passed to g_timeout_add(),
1690  * g_timeout_add_full(), g_idle_add(), and g_idle_add_full().
1691  *
1692  * Returns: %FALSE if the source should be removed
1693  */
1694
1695
1696 /**
1697  * GSourceFuncs:
1698  * @prepare: Called before all the file descriptors are polled. If the source can determine that it is ready here (without waiting for the results of the poll() call) it should return %TRUE. It can also return a @timeout_ value which should be the maximum timeout (in milliseconds) which should be passed to the poll() call. The actual timeout used will be -1 if all sources returned -1, or it will be the minimum of all the @timeout_ values returned which were >= 0.
1699  * @check: Called after all the file descriptors are polled. The source should return %TRUE if it is ready to be dispatched. Note that some time may have passed since the previous prepare function was called, so the source should be checked again here.
1700  * @dispatch: Called to dispatch the event source, after it has returned %TRUE in either its @prepare or its @check function. The @dispatch function is passed in a callback function and data. The callback function may be %NULL if the source was never connected to a callback using g_source_set_callback(). The @dispatch function should call the callback function with @user_data and whatever additional parameters are needed for this type of event source.
1701  * @finalize: Called when the source is finalized.
1702  *
1703  * The <structname>GSourceFuncs</structname> struct contains a table of
1704  * functions used to handle event sources in a generic manner.
1705  *
1706  * For idle sources, the prepare and check functions always return %TRUE
1707  * to indicate that the source is always ready to be processed. The prepare
1708  * function also returns a timeout value of 0 to ensure that the poll() call
1709  * doesn't block (since that would be time wasted which could have been spent
1710  * running the idle function).
1711  *
1712  * For timeout sources, the prepare and check functions both return %TRUE
1713  * if the timeout interval has expired. The prepare function also returns
1714  * a timeout value to ensure that the poll() call doesn't block too long
1715  * and miss the next timeout.
1716  *
1717  * For file descriptor sources, the prepare function typically returns %FALSE,
1718  * since it must wait until poll() has been called before it knows whether
1719  * any events need to be processed. It sets the returned timeout to -1 to
1720  * indicate that it doesn't mind how long the poll() call blocks. In the
1721  * check function, it tests the results of the poll() call to see if the
1722  * required condition has been met, and returns %TRUE if so.
1723  */
1724
1725
1726 /**
1727  * GSpawnChildSetupFunc:
1728  * @user_data: user data to pass to the function.
1729  *
1730  * Specifies the type of the setup function passed to g_spawn_async(),
1731  * g_spawn_sync() and g_spawn_async_with_pipes(), which can, in very
1732  * limited ways, be used to affect the child's execution.
1733  *
1734  * On POSIX platforms, the function is called in the child after GLib
1735  * has performed all the setup it plans to perform, but before calling
1736  * exec(). Actions taken in this function will only affect the child,
1737  * not the parent.
1738  *
1739  * On Windows, the function is called in the parent. Its usefulness on
1740  * Windows is thus questionable. In many cases executing the child setup
1741  * function in the parent can have ill effects, and you should be very
1742  * careful when porting software to Windows that uses child setup
1743  * functions.
1744  *
1745  * However, even on POSIX, you are extremely limited in what you can
1746  * safely do from a #GSpawnChildSetupFunc, because any mutexes that
1747  * were held by other threads in the parent process at the time of the
1748  * fork() will still be locked in the child process, and they will
1749  * never be unlocked (since the threads that held them don't exist in
1750  * the child). POSIX allows only async-signal-safe functions (see
1751  * <citerefentry><refentrytitle>signal</refentrytitle><manvolnum>7</manvolnum></citerefentry>)
1752  * to be called in the child between fork() and exec(), which
1753  * drastically limits the usefulness of child setup functions.
1754  *
1755  * In particular, it is not safe to call any function which may
1756  * call malloc(), which includes POSIX functions such as setenv().
1757  * If you need to set up the child environment differently from
1758  * the parent, you should use g_get_environ(), g_environ_setenv(),
1759  * and g_environ_unsetenv(), and then pass the complete environment
1760  * list to the <literal>g_spawn...</literal> function.
1761  */
1762
1763
1764 /**
1765  * GSpawnError:
1766  * @G_SPAWN_ERROR_FORK: Fork failed due to lack of memory.
1767  * @G_SPAWN_ERROR_READ: Read or select on pipes failed.
1768  * @G_SPAWN_ERROR_CHDIR: Changing to working directory failed.
1769  * @G_SPAWN_ERROR_ACCES: execv() returned <literal>EACCES</literal>
1770  * @G_SPAWN_ERROR_PERM: execv() returned <literal>EPERM</literal>
1771  * @G_SPAWN_ERROR_TOO_BIG: execv() returned <literal>E2BIG</literal>
1772  * @G_SPAWN_ERROR_2BIG: deprecated alias for %G_SPAWN_ERROR_TOO_BIG
1773  * @G_SPAWN_ERROR_NOEXEC: execv() returned <literal>ENOEXEC</literal>
1774  * @G_SPAWN_ERROR_NAMETOOLONG: execv() returned <literal>ENAMETOOLONG</literal>
1775  * @G_SPAWN_ERROR_NOENT: execv() returned <literal>ENOENT</literal>
1776  * @G_SPAWN_ERROR_NOMEM: execv() returned <literal>ENOMEM</literal>
1777  * @G_SPAWN_ERROR_NOTDIR: execv() returned <literal>ENOTDIR</literal>
1778  * @G_SPAWN_ERROR_LOOP: execv() returned <literal>ELOOP</literal>
1779  * @G_SPAWN_ERROR_TXTBUSY: execv() returned <literal>ETXTBUSY</literal>
1780  * @G_SPAWN_ERROR_IO: execv() returned <literal>EIO</literal>
1781  * @G_SPAWN_ERROR_NFILE: execv() returned <literal>ENFILE</literal>
1782  * @G_SPAWN_ERROR_MFILE: execv() returned <literal>EMFILE</literal>
1783  * @G_SPAWN_ERROR_INVAL: execv() returned <literal>EINVAL</literal>
1784  * @G_SPAWN_ERROR_ISDIR: execv() returned <literal>EISDIR</literal>
1785  * @G_SPAWN_ERROR_LIBBAD: execv() returned <literal>ELIBBAD</literal>
1786  * @G_SPAWN_ERROR_FAILED: Some other fatal failure, <literal>error-&gt;message</literal> should explain.
1787  *
1788  * Error codes returned by spawning processes.
1789  */
1790
1791
1792 /**
1793  * GSpawnFlags:
1794  * @G_SPAWN_LEAVE_DESCRIPTORS_OPEN: the parent's open file descriptors will be inherited by the child; otherwise all descriptors except stdin/stdout/stderr will be closed before calling exec() in the child.
1795  * @G_SPAWN_DO_NOT_REAP_CHILD: the child will not be automatically reaped; you must use g_child_watch_add() yourself (or call waitpid() or handle <literal>SIGCHLD</literal> yourself), or the child will become a zombie.
1796  * @G_SPAWN_SEARCH_PATH: <literal>argv[0]</literal> need not be an absolute path, it will be looked for in the user's <envar>PATH</envar>.
1797  * @G_SPAWN_STDOUT_TO_DEV_NULL: the child's standard output will be discarded, instead of going to the same location as the parent's standard output.
1798  * @G_SPAWN_STDERR_TO_DEV_NULL: the child's standard error will be discarded.
1799  * @G_SPAWN_CHILD_INHERITS_STDIN: the child will inherit the parent's standard input (by default, the child's standard input is attached to <filename>/dev/null</filename>).
1800  * @G_SPAWN_FILE_AND_ARGV_ZERO: the first element of <literal>argv</literal> is the file to execute, while the remaining elements are the actual argument vector to pass to the file. Normally g_spawn_async_with_pipes() uses <literal>argv[0]</literal> as the file to execute, and passes all of <literal>argv</literal> to the child.
1801  *
1802  * Flags passed to g_spawn_sync(), g_spawn_async() and g_spawn_async_with_pipes().
1803  */
1804
1805
1806 /**
1807  * GStrv:
1808  *
1809  * A C representable type name for #G_TYPE_STRV.
1810  */
1811
1812
1813 /**
1814  * GTestLogFatalFunc:
1815  * @log_domain: the log domain of the message
1816  * @log_level: the log level of the message (including the fatal and recursion flags)
1817  * @message: the message to process
1818  * @user_data: user data, set in g_test_log_set_fatal_handler()
1819  *
1820  * Specifies the prototype of fatal log handler functions.
1821  *
1822  * Returns: %TRUE if the program should abort, %FALSE otherwise
1823  * Since: 2.22
1824  */
1825
1826
1827 /**
1828  * GTimeSpan:
1829  *
1830  * A value representing an interval of time, in microseconds.
1831  *
1832  * Since: 2.26
1833  */
1834
1835
1836 /**
1837  * GTimeType:
1838  * @G_TIME_TYPE_STANDARD: the time is in local standard time
1839  * @G_TIME_TYPE_DAYLIGHT: the time is in local daylight time
1840  * @G_TIME_TYPE_UNIVERSAL: the time is in UTC
1841  *
1842  * Disambiguates a given time in two ways.
1843  *
1844  * First, specifies if the given time is in universal or local time.
1845  *
1846  * Second, if the time is in local time, specifies if it is local
1847  * standard time or local daylight time.  This is important for the case
1848  * where the same local time occurs twice (during daylight savings time
1849  * transitions, for example).
1850  */
1851
1852
1853 /**
1854  * GToggleNotify:
1855  * @data: Callback data passed to g_object_add_toggle_ref()
1856  * @object: The object on which g_object_add_toggle_ref() was called.
1857  * @is_last_ref: %TRUE if the toggle reference is now the last reference to the object. %FALSE if the toggle reference was the last reference and there are now other references.
1858  *
1859  * A callback function used for notification when the state
1860  * of a toggle reference changes. See g_object_add_toggle_ref().
1861  */
1862
1863
1864 /**
1865  * GTranslateFunc:
1866  * @str: the untranslated string
1867  * @data: user data specified when installing the function, e.g. in g_option_group_set_translate_func()
1868  *
1869  * The type of functions which are used to translate user-visible
1870  * strings, for <option>--help</option> output.
1871  *
1872  * The returned string is owned by GLib and must not be freed.
1873  *
1874  * Returns: a translation of the string for the current locale.
1875  */
1876
1877
1878 /**
1879  * GType:
1880  *
1881  * A numerical value which represents the unique identifier of a registered
1882  * type.
1883  */
1884
1885
1886 /**
1887  * GTypeCValue:
1888  * @v_int: the field for holding integer values
1889  * @v_long: the field for holding long integer values
1890  * @v_int64: the field for holding 64 bit integer values
1891  * @v_double: the field for holding floating point values
1892  * @v_pointer: the field for holding pointers
1893  *
1894  * A union holding one collected value.
1895  */
1896
1897
1898 /**
1899  * GTypeClass:
1900  *
1901  * An opaque structure used as the base of all classes.
1902  */
1903
1904
1905 /**
1906  * GTypeClassCacheFunc:
1907  * @cache_data: data that was given to the g_type_add_class_cache_func() call
1908  * @g_class: The #GTypeClass structure which is unreferenced
1909  *
1910  * A callback function which is called when the reference count of a class
1911  * drops to zero. It may use g_type_class_ref() to prevent the class from
1912  * being freed. You should not call g_type_class_unref() from a
1913  * #GTypeClassCacheFunc function to prevent infinite recursion, use
1914  * g_type_class_unref_uncached() instead.
1915  *
1916  * The functions have to check the class id passed in to figure
1917  * whether they actually want to cache the class of this type, since all
1918  * classes are routed through the same #GTypeClassCacheFunc chain.
1919  *
1920  * called, %FALSE to continue.
1921  *
1922  * Returns: %TRUE to stop further #GTypeClassCacheFunc<!-- -->s from being
1923  */
1924
1925
1926 /**
1927  * GTypeDebugFlags:
1928  * @G_TYPE_DEBUG_NONE: Print no messages.
1929  * @G_TYPE_DEBUG_OBJECTS: Print messages about object bookkeeping.
1930  * @G_TYPE_DEBUG_SIGNALS: Print messages about signal emissions.
1931  * @G_TYPE_DEBUG_MASK: Mask covering all debug flags.
1932  *
1933  * The <type>GTypeDebugFlags</type> enumeration values can be passed to
1934  * g_type_init_with_debug_flags() to trigger debugging messages during runtime.
1935  * Note that the messages can also be triggered by setting the
1936  * <envar>GOBJECT_DEBUG</envar> environment variable to a ':'-separated list of
1937  * "objects" and "signals".
1938  */
1939
1940
1941 /**
1942  * GTypeFlags:
1943  * @G_TYPE_FLAG_ABSTRACT: Indicates an abstract type. No instances can be created for an abstract type.
1944  * @G_TYPE_FLAG_VALUE_ABSTRACT: Indicates an abstract value type, i.e. a type that introduces a value table, but can't be used for g_value_init().
1945  *
1946  * Bit masks used to check or determine characteristics of a type.
1947  */
1948
1949
1950 /**
1951  * GTypeFundamentalFlags:
1952  * @G_TYPE_FLAG_CLASSED: Indicates a classed type.
1953  * @G_TYPE_FLAG_INSTANTIATABLE: Indicates an instantiable type (implies classed).
1954  * @G_TYPE_FLAG_DERIVABLE: Indicates a flat derivable type.
1955  * @G_TYPE_FLAG_DEEP_DERIVABLE: Indicates a deep derivable type (implies derivable).
1956  *
1957  * Bit masks used to check or determine specific characteristics of a
1958  * fundamental type.
1959  */
1960
1961
1962 /**
1963  * GTypeFundamentalInfo:
1964  * @type_flags: #GTypeFundamentalFlags describing the characteristics of the fundamental type
1965  *
1966  * A structure that provides information to the type system which is
1967  * used specifically for managing fundamental types.
1968  */
1969
1970
1971 /**
1972  * GTypeInfo:
1973  * @class_size: Size of the class structure (required for interface, classed and instantiatable types).
1974  * @base_init: Location of the base initialization function (optional).
1975  * @base_finalize: Location of the base finalization function (optional).
1976  * @class_init: Location of the class initialization function for classed and instantiatable types. Location of the default vtable inititalization function for interface types. (optional) This function is used both to fill in virtual functions in the class or default vtable, and to do type-specific setup such as registering signals and object properties.
1977  * @class_finalize: Location of the class finalization function for classed and instantiatable types. Location fo the default vtable finalization function for interface types. (optional)
1978  * @class_data: User-supplied data passed to the class init/finalize functions.
1979  * @instance_size: Size of the instance (object) structure (required for instantiatable types only).
1980  * @n_preallocs: Prior to GLib 2.10, it specified the number of pre-allocated (cached) instances to reserve memory for (0 indicates no caching). Since GLib 2.10, it is ignored, since instances are allocated with the <link linkend="glib-Memory-Slices">slice allocator</link> now.
1981  * @instance_init: Location of the instance initialization function (optional, for instantiatable types only).
1982  * @value_table: A #GTypeValueTable function table for generic handling of GValues of this type (usually only useful for fundamental types).
1983  *
1984  * This structure is used to provide the type system with the information
1985  * required to initialize and destruct (finalize) a type's class and
1986  * its instances.
1987  * The initialized structure is passed to the g_type_register_static() function
1988  * (or is copied into the provided #GTypeInfo structure in the
1989  * g_type_plugin_complete_type_info()). The type system will perform a deep
1990  * copy of this structure, so its memory does not need to be persistent
1991  * across invocation of g_type_register_static().
1992  */
1993
1994
1995 /**
1996  * GTypeInstance:
1997  *
1998  * An opaque structure used as the base of all type instances.
1999  */
2000
2001
2002 /**
2003  * GTypeInterface:
2004  *
2005  * An opaque structure used as the base of all interface types.
2006  */
2007
2008
2009 /**
2010  * GTypeInterfaceCheckFunc:
2011  * @check_data: data passed to g_type_add_interface_check().
2012  * @g_iface: the interface that has been initialized
2013  *
2014  * A callback called after an interface vtable is initialized.
2015  * See g_type_add_interface_check().
2016  *
2017  * Since: 2.4
2018  */
2019
2020
2021 /**
2022  * GTypeModule:
2023  * @name: the name of the module
2024  *
2025  * The members of the <structname>GTypeModule</structname> structure should not
2026  * be accessed directly, except for the @name field.
2027  */
2028
2029
2030 /**
2031  * GTypeModuleClass:
2032  * @parent_class: the parent class
2033  * @load: loads the module and registers one or more types using g_type_module_register_type().
2034  * @unload: unloads the module
2035  *
2036  * In order to implement dynamic loading of types based on #GTypeModule,
2037  * the @load and @unload functions in #GTypeModuleClass must be implemented.
2038  */
2039
2040
2041 /**
2042  * GTypePlugin:
2043  *
2044  * The <structname>GTypePlugin</structname> typedef is used as a placeholder
2045  * for objects that implement the <structname>GTypePlugin</structname>
2046  * interface.
2047  */
2048
2049
2050 /**
2051  * GTypePluginClass:
2052  * @use_plugin: Increases the use count of the plugin.
2053  * @unuse_plugin: Decreases the use count of the plugin.
2054  * @complete_type_info: Fills in the #GTypeInfo and #GTypeValueTable structs for the type. The structs are initialized with <literal>memset(s, 0, sizeof (s))</literal> before calling this function.
2055  * @complete_interface_info: Fills in missing parts of the #GInterfaceInfo for the interface. The structs is initialized with <literal>memset(s, 0, sizeof (s))</literal> before calling this function.
2056  *
2057  * The #GTypePlugin interface is used by the type system in order to handle
2058  * the lifecycle of dynamically loaded types.
2059  */
2060
2061
2062 /**
2063  * GTypePluginCompleteInterfaceInfo:
2064  * @plugin: the #GTypePlugin
2065  * @instance_type: the #GType of an instantiable type to which the interface is added
2066  * @interface_type: the #GType of the interface whose info is completed
2067  * @info: the #GInterfaceInfo to fill in
2068  *
2069  * The type of the @complete_interface_info function of #GTypePluginClass.
2070  */
2071
2072
2073 /**
2074  * GTypePluginCompleteTypeInfo:
2075  * @plugin: the #GTypePlugin
2076  * @g_type: the #GType whose info is completed
2077  * @info: the #GTypeInfo struct to fill in
2078  * @value_table: the #GTypeValueTable to fill in
2079  *
2080  * The type of the @complete_type_info function of #GTypePluginClass.
2081  */
2082
2083
2084 /**
2085  * GTypePluginUnuse:
2086  * @plugin: the #GTypePlugin whose use count should be decreased
2087  *
2088  * The type of the @unuse_plugin function of #GTypePluginClass.
2089  */
2090
2091
2092 /**
2093  * GTypePluginUse:
2094  * @plugin: the #GTypePlugin whose use count should be increased
2095  *
2096  * The type of the @use_plugin function of #GTypePluginClass, which gets called
2097  * to increase the use count of @plugin.
2098  */
2099
2100
2101 /**
2102  * GTypeQuery:
2103  * @type: the #GType value of the type.
2104  * @type_name: the name of the type.
2105  * @class_size: the size of the class structure.
2106  * @instance_size: the size of the instance structure.
2107  *
2108  * A structure holding information for a specific type. It is
2109  * filled in by the g_type_query() function.
2110  */
2111
2112
2113 /**
2114  * GTypeValueTable:
2115  * @value_init: Default initialize @values contents by poking values directly into the value->data array. The data array of the #GValue passed into this function was zero-filled with <function>memset()</function>, so no care has to be taken to free any old contents. E.g. for the implementation of a string value that may never be %NULL, the implementation might look like: |[ value->data[0].v_pointer = g_strdup (""); ]|
2116  * @value_free: Free any old contents that might be left in the data array of the passed in @value. No resources may remain allocated through the #GValue contents after this function returns. E.g. for our above string type: |[ // only free strings without a specific flag for static storage if (!(value->data[1].v_uint & G_VALUE_NOCOPY_CONTENTS)) g_free (value->data[0].v_pointer); ]|
2117  * @value_copy: @dest_value is a #GValue with zero-filled data section and @src_value is a properly setup #GValue of same or derived type. The purpose of this function is to copy the contents of @src_value into @dest_value in a way, that even after @src_value has been freed, the contents of @dest_value remain valid. String type example: |[ dest_value->data[0].v_pointer = g_strdup (src_value->data[0].v_pointer); ]|
2118  * @value_peek_pointer: If the value contents fit into a pointer, such as objects or strings, return this pointer, so the caller can peek at the current contents. To extend on our above string example: |[ return value->data[0].v_pointer; ]|
2119  * @collect_format: A string format describing how to collect the contents of this value bit-by-bit. Each character in the format represents an argument to be collected, and the characters themselves indicate the type of the argument. Currently supported arguments are: <variablelist> <varlistentry><term /><listitem><para> 'i' - Integers. passed as collect_values[].v_int. </para></listitem></varlistentry> <varlistentry><term /><listitem><para> 'l' - Longs. passed as collect_values[].v_long. </para></listitem></varlistentry> <varlistentry><term /><listitem><para> 'd' - Doubles. passed as collect_values[].v_double. </para></listitem></varlistentry> <varlistentry><term /><listitem><para> 'p' - Pointers. passed as collect_values[].v_pointer. </para></listitem></varlistentry> </variablelist> It should be noted that for variable argument list construction, ANSI C promotes every type smaller than an integer to an int, and floats to doubles. So for collection of short int or char, 'i' needs to be used, and for collection of floats 'd'.
2120  * @collect_value: The collect_value() function is responsible for converting the values collected from a variable argument list into contents suitable for storage in a GValue. This function should setup @value similar to value_init(); e.g. for a string value that does not allow %NULL pointers, it needs to either spew an error, or do an implicit conversion by storing an empty string. The @value passed in to this function has a zero-filled data array, so just like for value_init() it is guaranteed to not contain any old contents that might need freeing. @n_collect_values is exactly the string length of @collect_format, and @collect_values is an array of unions #GTypeCValue with length @n_collect_values, containing the collected values according to @collect_format. @collect_flags is an argument provided as a hint by the caller. It may contain the flag %G_VALUE_NOCOPY_CONTENTS indicating, that the collected value contents may be considered "static" for the duration of the @value lifetime. Thus an extra copy of the contents stored in @collect_values is not required for assignment to @value. For our above string example, we continue with: |[ if (!collect_values[0].v_pointer) value->data[0].v_pointer = g_strdup (""); else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { value->data[0].v_pointer = collect_values[0].v_pointer; // keep a flag for the value_free() implementation to not free this string value->data[1].v_uint = G_VALUE_NOCOPY_CONTENTS; } else value->data[0].v_pointer = g_strdup (collect_values[0].v_pointer); return NULL; ]| It should be noted, that it is generally a bad idea to follow the #G_VALUE_NOCOPY_CONTENTS hint for reference counted types. Due to reentrancy requirements and reference count assertions performed by the signal emission code, reference counts should always be incremented for reference counted contents stored in the value->data array.  To deviate from our string example for a moment, and taking a look at an exemplary implementation for collect_value() of #GObject: |[ if (collect_values[0].v_pointer) { GObject *object = G_OBJECT (collect_values[0].v_pointer); // never honour G_VALUE_NOCOPY_CONTENTS for ref-counted types value->data[0].v_pointer = g_object_ref (object); return NULL; } else return g_strdup_printf ("Object passed as invalid NULL pointer"); } ]| The reference count for valid objects is always incremented, regardless of @collect_flags. For invalid objects, the example returns a newly allocated string without altering @value. Upon success, collect_value() needs to return %NULL. If, however, an error condition occurred, collect_value() may spew an error by returning a newly allocated non-%NULL string, giving a suitable description of the error condition. The calling code makes no assumptions about the @value contents being valid upon error returns, @value is simply thrown away without further freeing. As such, it is a good idea to not allocate #GValue contents, prior to returning an error, however, collect_values() is not obliged to return a correctly setup @value for error returns, simply because any non-%NULL return is considered a fatal condition so further program behaviour is undefined.
2121  * @lcopy_format: Format description of the arguments to collect for @lcopy_value, analogous to @collect_format. Usually, @lcopy_format string consists only of 'p's to provide lcopy_value() with pointers to storage locations.
2122  * @lcopy_value: This function is responsible for storing the @value contents into arguments passed through a variable argument list which got collected into @collect_values according to @lcopy_format. @n_collect_values equals the string length of @lcopy_format, and @collect_flags may contain %G_VALUE_NOCOPY_CONTENTS. In contrast to collect_value(), lcopy_value() is obliged to always properly support %G_VALUE_NOCOPY_CONTENTS. Similar to collect_value() the function may prematurely abort by returning a newly allocated string describing an error condition. To complete the string example: |[ gchar **string_p = collect_values[0].v_pointer; if (!string_p) return g_strdup_printf ("string location passed as NULL"); if (collect_flags & G_VALUE_NOCOPY_CONTENTS) *string_p = value->data[0].v_pointer; else *string_p = g_strdup (value->data[0].v_pointer); ]| And an illustrative version of lcopy_value() for reference-counted types: |[ GObject **object_p = collect_values[0].v_pointer; if (!object_p) return g_strdup_printf ("object location passed as NULL"); if (!value->data[0].v_pointer) *object_p = NULL; else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) /&ast; always honour &ast;/ *object_p = value->data[0].v_pointer; else *object_p = g_object_ref (value->data[0].v_pointer); return NULL; ]|
2123  *
2124  * The #GTypeValueTable provides the functions required by the #GValue implementation,
2125  * to serve as a container for values of a type.
2126  */
2127
2128
2129 /**
2130  * GUnicodeBreakType:
2131  * @G_UNICODE_BREAK_MANDATORY: Mandatory Break (BK)
2132  * @G_UNICODE_BREAK_CARRIAGE_RETURN: Carriage Return (CR)
2133  * @G_UNICODE_BREAK_LINE_FEED: Line Feed (LF)
2134  * @G_UNICODE_BREAK_COMBINING_MARK: Attached Characters and Combining Marks (CM)
2135  * @G_UNICODE_BREAK_SURROGATE: Surrogates (SG)
2136  * @G_UNICODE_BREAK_ZERO_WIDTH_SPACE: Zero Width Space (ZW)
2137  * @G_UNICODE_BREAK_INSEPARABLE: Inseparable (IN)
2138  * @G_UNICODE_BREAK_NON_BREAKING_GLUE: Non-breaking ("Glue") (GL)
2139  * @G_UNICODE_BREAK_CONTINGENT: Contingent Break Opportunity (CB)
2140  * @G_UNICODE_BREAK_SPACE: Space (SP)
2141  * @G_UNICODE_BREAK_AFTER: Break Opportunity After (BA)
2142  * @G_UNICODE_BREAK_BEFORE: Break Opportunity Before (BB)
2143  * @G_UNICODE_BREAK_BEFORE_AND_AFTER: Break Opportunity Before and After (B2)
2144  * @G_UNICODE_BREAK_HYPHEN: Hyphen (HY)
2145  * @G_UNICODE_BREAK_NON_STARTER: Nonstarter (NS)
2146  * @G_UNICODE_BREAK_OPEN_PUNCTUATION: Opening Punctuation (OP)
2147  * @G_UNICODE_BREAK_CLOSE_PUNCTUATION: Closing Punctuation (CL)
2148  * @G_UNICODE_BREAK_QUOTATION: Ambiguous Quotation (QU)
2149  * @G_UNICODE_BREAK_EXCLAMATION: Exclamation/Interrogation (EX)
2150  * @G_UNICODE_BREAK_IDEOGRAPHIC: Ideographic (ID)
2151  * @G_UNICODE_BREAK_NUMERIC: Numeric (NU)
2152  * @G_UNICODE_BREAK_INFIX_SEPARATOR: Infix Separator (Numeric) (IS)
2153  * @G_UNICODE_BREAK_SYMBOL: Symbols Allowing Break After (SY)
2154  * @G_UNICODE_BREAK_ALPHABETIC: Ordinary Alphabetic and Symbol Characters (AL)
2155  * @G_UNICODE_BREAK_PREFIX: Prefix (Numeric) (PR)
2156  * @G_UNICODE_BREAK_POSTFIX: Postfix (Numeric) (PO)
2157  * @G_UNICODE_BREAK_COMPLEX_CONTEXT: Complex Content Dependent (South East Asian) (SA)
2158  * @G_UNICODE_BREAK_AMBIGUOUS: Ambiguous (Alphabetic or Ideographic) (AI)
2159  * @G_UNICODE_BREAK_UNKNOWN: Unknown (XX)
2160  * @G_UNICODE_BREAK_NEXT_LINE: Next Line (NL)
2161  * @G_UNICODE_BREAK_WORD_JOINER: Word Joiner (WJ)
2162  * @G_UNICODE_BREAK_HANGUL_L_JAMO: Hangul L Jamo (JL)
2163  * @G_UNICODE_BREAK_HANGUL_V_JAMO: Hangul V Jamo (JV)
2164  * @G_UNICODE_BREAK_HANGUL_T_JAMO: Hangul T Jamo (JT)
2165  * @G_UNICODE_BREAK_HANGUL_LV_SYLLABLE: Hangul LV Syllable (H2)
2166  * @G_UNICODE_BREAK_HANGUL_LVT_SYLLABLE: Hangul LVT Syllable (H3)
2167  * @G_UNICODE_BREAK_CLOSE_PARANTHESIS: Closing Parenthesis (CP). Since 2.28
2168  * @G_UNICODE_BREAK_CONDITIONAL_JAPANESE_STARTER: Conditional Japanese Starter (CJ). Since: 2.32
2169  * @G_UNICODE_BREAK_HEBREW_LETTER: Hebrew Letter (HL). Since: 2.32
2170  *
2171  * These are the possible line break classifications.
2172  *
2173  * The five Hangul types were added in Unicode 4.1, so, has been
2174  * introduced in GLib 2.10. Note that new types may be added in the future.
2175  * Applications should be ready to handle unknown values.
2176  * They may be regarded as %G_UNICODE_BREAK_UNKNOWN.
2177  *
2178  * See <ulink url="http://www.unicode.org/unicode/reports/tr14/">http://www.unicode.org/unicode/reports/tr14/</ulink>.
2179  */
2180
2181
2182 /**
2183  * GUnicodeScript:
2184  * @G_UNICODE_SCRIPT_COMMON: a character used by multiple different scripts
2185  * @G_UNICODE_SCRIPT_INHERITED: a mark glyph that takes its script from the i                             base glyph to which it is attached
2186  * @G_UNICODE_SCRIPT_ARABIC: Arabic
2187  * @G_UNICODE_SCRIPT_ARMENIAN: Armenian
2188  * @G_UNICODE_SCRIPT_BENGALI: Bengali
2189  * @G_UNICODE_SCRIPT_BOPOMOFO: Bopomofo
2190  * @G_UNICODE_SCRIPT_CHEROKEE: Cherokee
2191  * @G_UNICODE_SCRIPT_COPTIC: Coptic
2192  * @G_UNICODE_SCRIPT_CYRILLIC: Cyrillic
2193  * @G_UNICODE_SCRIPT_DESERET: Deseret
2194  * @G_UNICODE_SCRIPT_DEVANAGARI: Devanagari
2195  * @G_UNICODE_SCRIPT_ETHIOPIC: Ethiopic
2196  * @G_UNICODE_SCRIPT_GEORGIAN: Georgian
2197  * @G_UNICODE_SCRIPT_GOTHIC: Gothic
2198  * @G_UNICODE_SCRIPT_GREEK: Greek
2199  * @G_UNICODE_SCRIPT_GUJARATI: Gujarati
2200  * @G_UNICODE_SCRIPT_GURMUKHI: Gurmukhi
2201  * @G_UNICODE_SCRIPT_HAN: Han
2202  * @G_UNICODE_SCRIPT_HANGUL: Hangul
2203  * @G_UNICODE_SCRIPT_HEBREW: Hebrew
2204  * @G_UNICODE_SCRIPT_HIRAGANA: Hiragana
2205  * @G_UNICODE_SCRIPT_KANNADA: Kannada
2206  * @G_UNICODE_SCRIPT_KATAKANA: Katakana
2207  * @G_UNICODE_SCRIPT_KHMER: Khmer
2208  * @G_UNICODE_SCRIPT_LAO: Lao
2209  * @G_UNICODE_SCRIPT_LATIN: Latin
2210  * @G_UNICODE_SCRIPT_MALAYALAM: Malayalam
2211  * @G_UNICODE_SCRIPT_MONGOLIAN: Mongolian
2212  * @G_UNICODE_SCRIPT_MYANMAR: Myanmar
2213  * @G_UNICODE_SCRIPT_OGHAM: Ogham
2214  * @G_UNICODE_SCRIPT_OLD_ITALIC: Old Italic
2215  * @G_UNICODE_SCRIPT_ORIYA: Oriya
2216  * @G_UNICODE_SCRIPT_RUNIC: Runic
2217  * @G_UNICODE_SCRIPT_SINHALA: Sinhala
2218  * @G_UNICODE_SCRIPT_SYRIAC: Syriac
2219  * @G_UNICODE_SCRIPT_TAMIL: Tamil
2220  * @G_UNICODE_SCRIPT_TELUGU: Telugu
2221  * @G_UNICODE_SCRIPT_THAANA: Thaana
2222  * @G_UNICODE_SCRIPT_THAI: Thai
2223  * @G_UNICODE_SCRIPT_TIBETAN: Tibetan Canadian Aboriginal
2224  * @G_UNICODE_SCRIPT_YI: Yi
2225  * @G_UNICODE_SCRIPT_TAGALOG: Tagalog
2226  * @G_UNICODE_SCRIPT_HANUNOO: Hanunoo
2227  * @G_UNICODE_SCRIPT_BUHID: Buhid
2228  * @G_UNICODE_SCRIPT_TAGBANWA: Tagbanwa
2229  * @G_UNICODE_SCRIPT_BRAILLE: Braille
2230  * @G_UNICODE_SCRIPT_CYPRIOT: Cypriot
2231  * @G_UNICODE_SCRIPT_LIMBU: Limbu
2232  * @G_UNICODE_SCRIPT_OSMANYA: Osmanya
2233  * @G_UNICODE_SCRIPT_SHAVIAN: Shavian
2234  * @G_UNICODE_SCRIPT_LINEAR_B: Linear B
2235  * @G_UNICODE_SCRIPT_TAI_LE: Tai Le
2236  * @G_UNICODE_SCRIPT_UGARITIC: Ugaritic New Tai Lue
2237  * @G_UNICODE_SCRIPT_BUGINESE: Buginese
2238  * @G_UNICODE_SCRIPT_GLAGOLITIC: Glagolitic
2239  * @G_UNICODE_SCRIPT_TIFINAGH: Tifinagh Syloti Nagri Old Persian
2240  * @G_UNICODE_SCRIPT_KHAROSHTHI: Kharoshthi
2241  * @G_UNICODE_SCRIPT_UNKNOWN: an unassigned code point
2242  * @G_UNICODE_SCRIPT_BALINESE: Balinese
2243  * @G_UNICODE_SCRIPT_CUNEIFORM: Cuneiform
2244  * @G_UNICODE_SCRIPT_PHOENICIAN: Phoenician
2245  * @G_UNICODE_SCRIPT_PHAGS_PA: Phags-pa
2246  * @G_UNICODE_SCRIPT_NKO: N'Ko
2247  * @G_UNICODE_SCRIPT_KAYAH_LI: Kayah Li. Since 2.16.3
2248  * @G_UNICODE_SCRIPT_LEPCHA: Lepcha. Since 2.16.3
2249  * @G_UNICODE_SCRIPT_REJANG: Rejang. Since 2.16.3
2250  * @G_UNICODE_SCRIPT_SUNDANESE: Sundanese. Since 2.16.3
2251  * @G_UNICODE_SCRIPT_SAURASHTRA: Saurashtra. Since 2.16.3
2252  * @G_UNICODE_SCRIPT_CHAM: Cham. Since 2.16.3
2253  * @G_UNICODE_SCRIPT_OL_CHIKI: Ol Chiki. Since 2.16.3
2254  * @G_UNICODE_SCRIPT_VAI: Vai. Since 2.16.3
2255  * @G_UNICODE_SCRIPT_CARIAN: Carian. Since 2.16.3
2256  * @G_UNICODE_SCRIPT_LYCIAN: Lycian. Since 2.16.3
2257  * @G_UNICODE_SCRIPT_LYDIAN: Lydian. Since 2.16.3
2258  * @G_UNICODE_SCRIPT_AVESTAN: Avestan. Since 2.26
2259  * @G_UNICODE_SCRIPT_BAMUM: Bamum. Since 2.26 Egyptian Hieroglpyhs. Since 2.26 Imperial Aramaic. Since 2.26 Inscriptional Pahlavi. Since 2.26 Inscriptional Parthian. Since 2.26
2260  * @G_UNICODE_SCRIPT_JAVANESE: Javanese. Since 2.26
2261  * @G_UNICODE_SCRIPT_KAITHI: Kaithi. Since 2.26
2262  * @G_UNICODE_SCRIPT_LISU: Lisu. Since 2.26 Meetei Mayek. Since 2.26 Old South Arabian. Since 2.26
2263  * @G_UNICODE_SCRIPT_OLD_TURKIC: Old Turkic. Since 2.28
2264  * @G_UNICODE_SCRIPT_SAMARITAN: Samaritan. Since 2.26
2265  * @G_UNICODE_SCRIPT_TAI_THAM: Tai Tham. Since 2.26
2266  * @G_UNICODE_SCRIPT_TAI_VIET: Tai Viet. Since 2.26
2267  * @G_UNICODE_SCRIPT_BATAK: Batak. Since 2.28
2268  * @G_UNICODE_SCRIPT_BRAHMI: Brahmi. Since 2.28
2269  * @G_UNICODE_SCRIPT_MANDAIC: Mandaic. Since 2.28
2270  * @G_UNICODE_SCRIPT_CHAKMA: Chakma. Since: 2.32
2271  * @G_UNICODE_SCRIPT_MEROITIC_CURSIVE: Meroitic Cursive. Since: 2.32
2272  * @G_UNICODE_SCRIPT_MEROITIC_HIEROGLYPHS, Meroitic Hieroglyphs. Since: 2.32
2273  * @G_UNICODE_SCRIPT_MIAO: Miao. Since: 2.32
2274  * @G_UNICODE_SCRIPT_SHARADA: Sharada. Since: 2.32
2275  * @G_UNICODE_SCRIPT_SORA_SOMPENG: Sora Sompeng. Since: 2.32
2276  * @G_UNICODE_SCRIPT_TAKRI: Takri. Since: 2.32
2277  *
2278  * The #GUnicodeScript enumeration identifies different writing
2279  * systems. The values correspond to the names as defined in the
2280  * Unicode standard. The enumeration has been added in GLib 2.14,
2281  * and is interchangeable with #PangoScript.
2282  *
2283  * Note that new types may be added in the future. Applications
2284  * should be ready to handle unknown values.
2285  * See <ulink
2286  * url="http://www.unicode.org/reports/tr24/">Unicode Standard Annex
2287  * #24: Script names</ulink>.
2288  */
2289
2290
2291 /**
2292  * GUnicodeType:
2293  * @G_UNICODE_CONTROL: General category "Other, Control" (Cc)
2294  * @G_UNICODE_FORMAT: General category "Other, Format" (Cf)
2295  * @G_UNICODE_UNASSIGNED: General category "Other, Not Assigned" (Cn)
2296  * @G_UNICODE_PRIVATE_USE: General category "Other, Private Use" (Co)
2297  * @G_UNICODE_SURROGATE: General category "Other, Surrogate" (Cs)
2298  * @G_UNICODE_LOWERCASE_LETTER: General category "Letter, Lowercase" (Ll)
2299  * @G_UNICODE_MODIFIER_LETTER: General category "Letter, Modifier" (Lm)
2300  * @G_UNICODE_OTHER_LETTER: General category "Letter, Other" (Lo)
2301  * @G_UNICODE_TITLECASE_LETTER: General category "Letter, Titlecase" (Lt)
2302  * @G_UNICODE_UPPERCASE_LETTER: General category "Letter, Uppercase" (Lu)
2303  * @G_UNICODE_SPACING_MARK: General category "Mark, Spacing" (Mc)
2304  * @G_UNICODE_ENCLOSING_MARK: General category "Mark, Enclosing" (Me)
2305  * @G_UNICODE_NON_SPACING_MARK: General category "Mark, Nonspacing" (Mn)
2306  * @G_UNICODE_DECIMAL_NUMBER: General category "Number, Decimal Digit" (Nd)
2307  * @G_UNICODE_LETTER_NUMBER: General category "Number, Letter" (Nl)
2308  * @G_UNICODE_OTHER_NUMBER: General category "Number, Other" (No)
2309  * @G_UNICODE_CONNECT_PUNCTUATION: General category "Punctuation, Connector" (Pc)
2310  * @G_UNICODE_DASH_PUNCTUATION: General category "Punctuation, Dash" (Pd)
2311  * @G_UNICODE_CLOSE_PUNCTUATION: General category "Punctuation, Close" (Pe)
2312  * @G_UNICODE_FINAL_PUNCTUATION: General category "Punctuation, Final quote" (Pf)
2313  * @G_UNICODE_INITIAL_PUNCTUATION: General category "Punctuation, Initial quote" (Pi)
2314  * @G_UNICODE_OTHER_PUNCTUATION: General category "Punctuation, Other" (Po)
2315  * @G_UNICODE_OPEN_PUNCTUATION: General category "Punctuation, Open" (Ps)
2316  * @G_UNICODE_CURRENCY_SYMBOL: General category "Symbol, Currency" (Sc)
2317  * @G_UNICODE_MODIFIER_SYMBOL: General category "Symbol, Modifier" (Sk)
2318  * @G_UNICODE_MATH_SYMBOL: General category "Symbol, Math" (Sm)
2319  * @G_UNICODE_OTHER_SYMBOL: General category "Symbol, Other" (So)
2320  * @G_UNICODE_LINE_SEPARATOR: General category "Separator, Line" (Zl)
2321  * @G_UNICODE_PARAGRAPH_SEPARATOR: General category "Separator, Paragraph" (Zp)
2322  * @G_UNICODE_SPACE_SEPARATOR: General category "Separator, Space" (Zs)
2323  *
2324  * These are the possible character classifications from the
2325  * Unicode specification.
2326  * See <ulink url="http://www.unicode.org/Public/UNIDATA/UnicodeData.html">http://www.unicode.org/Public/UNIDATA/UnicodeData.html</ulink>.
2327  */
2328
2329
2330 /**
2331  * GUserDirectory:
2332  * @G_USER_DIRECTORY_DESKTOP: the user's Desktop directory
2333  * @G_USER_DIRECTORY_DOCUMENTS: the user's Documents directory
2334  * @G_USER_DIRECTORY_DOWNLOAD: the user's Downloads directory
2335  * @G_USER_DIRECTORY_MUSIC: the user's Music directory
2336  * @G_USER_DIRECTORY_PICTURES: the user's Pictures directory
2337  * @G_USER_DIRECTORY_PUBLIC_SHARE: the user's shared directory
2338  * @G_USER_DIRECTORY_TEMPLATES: the user's Templates directory
2339  * @G_USER_DIRECTORY_VIDEOS: the user's Movies directory
2340  * @G_USER_N_DIRECTORIES: the number of enum values
2341  *
2342  * These are logical ids for special directories which are defined
2343  * depending on the platform used. You should use g_get_user_special_dir()
2344  * to retrieve the full path associated to the logical id.
2345  *
2346  * The #GUserDirectory enumeration can be extended at later date. Not
2347  * every platform has a directory for every logical id in this
2348  * enumeration.
2349  *
2350  * Since: 2.14
2351  */
2352
2353
2354 /**
2355  * GValue:
2356  *
2357  * An opaque structure used to hold different types of values.
2358  * The data within the structure has protected scope: it is accessible only
2359  * to functions within a #GTypeValueTable structure, or implementations of
2360  * the g_value_*() API. That is, code portions which implement new fundamental
2361  * types.
2362  * #GValue users cannot make any assumptions about how data is stored
2363  * within the 2 element @data union, and the @g_type member should
2364  * only be accessed through the G_VALUE_TYPE() macro.
2365  */
2366
2367
2368 /**
2369  * GValueArray:
2370  * @n_values: number of values contained in the array
2371  * @values: array of values
2372  *
2373  * A #GValueArray contains an array of #GValue elements.
2374  */
2375
2376
2377 /**
2378  * GValueTransform:
2379  * @src_value: Source value.
2380  * @dest_value: Target value.
2381  *
2382  * The type of value transformation functions which can be registered with
2383  * g_value_register_transform_func().
2384  */
2385
2386
2387 /**
2388  * GVariantType:
2389  *
2390  * A type in the GVariant type system.
2391  *
2392  * Two types may not be compared by value; use g_variant_type_equal() or
2393  * g_variant_type_is_subtype_of().  May be copied using
2394  * g_variant_type_copy() and freed using g_variant_type_free().
2395  */
2396
2397
2398 /**
2399  * GVoidFunc:
2400  *
2401  * Declares a type of function which takes no arguments
2402  * and has no return value. It is used to specify the type
2403  * function passed to g_atexit().
2404  */
2405
2406
2407 /**
2408  * GWeakNotify:
2409  * @data: data that was provided when the weak reference was established
2410  * @where_the_object_was: the object being finalized
2411  *
2412  * A #GWeakNotify function can be added to an object as a callback that gets
2413  * triggered when the object is finalized. Since the object is already being
2414  * finalized when the #GWeakNotify is called, there's not much you could do
2415  * with the object, apart from e.g. using its address as hash-index or the like.
2416  */
2417
2418
2419 /**
2420  * GWeakRef:
2421  *
2422  * A structure containing a weak reference to a #GObject.  It can either
2423  * be empty (i.e. point to %NULL), or point to an object for as long as
2424  * at least one "strong" reference to that object exists. Before the
2425  * object's #GObjectClass.dispose method is called, every #GWeakRef
2426  * associated with becomes empty (i.e. points to %NULL).
2427  *
2428  * Like #GValue, #GWeakRef can be statically allocated, stack- or
2429  * heap-allocated, or embedded in larger structures.
2430  *
2431  * Unlike g_object_weak_ref() and g_object_add_weak_pointer(), this weak
2432  * reference is thread-safe: converting a weak pointer to a reference is
2433  * atomic with respect to invalidation of weak pointers to destroyed
2434  * objects.
2435  *
2436  * If the object's #GObjectClass.dispose method results in additional
2437  * references to the object being held, any #GWeakRef<!-- -->s taken
2438  * before it was disposed will continue to point to %NULL.  If
2439  * #GWeakRef<!-- -->s are taken after the object is disposed and
2440  * re-referenced, they will continue to point to it until its refcount
2441  * goes back to zero, at which point they too will be invalidated.
2442  */
2443
2444
2445 /**
2446  * G_BOOKMARK_FILE_ERROR:
2447  *
2448  * Error domain for bookmark file parsing.
2449  * Errors in this domain will be from the #GBookmarkFileError
2450  * enumeration. See #GError for information on error domains.
2451  */
2452
2453
2454 /**
2455  * G_BREAKPOINT:
2456  *
2457  * Inserts a breakpoint instruction into the code.
2458  *
2459  * On x86 and alpha systems this is implemented as a soft interrupt
2460  * and on other architectures it raises a <literal>SIGTRAP</literal> signal.
2461  */
2462
2463
2464 /**
2465  * G_CALLBACK:
2466  * @f: a function pointer.
2467  *
2468  * Cast a function pointer to a #GCallback.
2469  */
2470
2471
2472 /**
2473  * G_CCLOSURE_SWAP_DATA:
2474  * @cclosure: a #GCClosure
2475  *
2476  * Checks whether the user data of the #GCClosure should be passed as the
2477  * first parameter to the callback. See g_cclosure_new_swap().
2478  *
2479  * Returns: %TRUE if data has to be swapped.
2480  */
2481
2482
2483 /**
2484  * G_CLOSURE_NEEDS_MARSHAL:
2485  * @closure: a #GClosure
2486  *
2487  * Check if the closure still needs a marshaller. See g_closure_set_marshal().
2488  *
2489  * @closure.
2490  *
2491  * Returns: %TRUE if a #GClosureMarshal marshaller has not yet been set on
2492  */
2493
2494
2495 /**
2496  * G_CLOSURE_N_NOTIFIERS:
2497  * @cl: a #GClosure
2498  *
2499  * Get the total number of notifiers connected with the closure @cl.
2500  * The count includes the meta marshaller, the finalize and invalidate notifiers
2501  * and the marshal guards. Note that each guard counts as two notifiers.
2502  * See g_closure_set_meta_marshal(), g_closure_add_finalize_notifier(),
2503  * g_closure_add_invalidate_notifier() and g_closure_add_marshal_guards().
2504  *
2505  * Returns: number of notifiers
2506  */
2507
2508
2509 /**
2510  * G_CONVERT_ERROR:
2511  *
2512  * Error domain for character set conversions. Errors in this domain will
2513  * be from the #GConvertError enumeration. See #GError for information on
2514  * error domains.
2515  */
2516
2517
2518 /**
2519  * G_DATALIST_FLAGS_MASK:
2520  *
2521  * A bitmask that restricts the possible flags passed to
2522  * g_datalist_set_flags(). Passing a flags value where
2523  * flags & ~G_DATALIST_FLAGS_MASK != 0 is an error.
2524  */
2525
2526
2527 /**
2528  * G_DEFINE_ABSTRACT_TYPE:
2529  * @TN: The name of the new type, in Camel case.
2530  * @t_n: The name of the new type, in lowercase, with words separated by '_'.
2531  * @T_P: The #GType of the parent type.
2532  *
2533  * A convenience macro for type implementations.
2534  * Similar to G_DEFINE_TYPE(), but defines an abstract type.
2535  * See G_DEFINE_TYPE_EXTENDED() for an example.
2536  *
2537  * Since: 2.4
2538  */
2539
2540
2541 /**
2542  * G_DEFINE_ABSTRACT_TYPE_WITH_CODE:
2543  * @TN: The name of the new type, in Camel case.
2544  * @t_n: The name of the new type, in lowercase, with words separated by '_'.
2545  * @T_P: The #GType of the parent type.
2546  * @_C_: Custom code that gets inserted in the @type_name_get_type() function.
2547  *
2548  * A convenience macro for type implementations.
2549  * Similar to G_DEFINE_TYPE_WITH_CODE(), but defines an abstract type and allows you to
2550  * insert custom code into the *_get_type() function, e.g. interface implementations
2551  * via G_IMPLEMENT_INTERFACE(). See G_DEFINE_TYPE_EXTENDED() for an example.
2552  *
2553  * Since: 2.4
2554  */
2555
2556
2557 /**
2558  * G_DEFINE_BOXED_TYPE:
2559  * @TypeName: The name of the new type, in Camel case.
2560  * @type_name: The name of the new type, in lowercase, with words separated by '_'.
2561  * @copy_func: the #GBoxedCopyFunc for the new type
2562  * @free_func: the #GBoxedFreeFunc for the new type
2563  *
2564  * A convenience macro for boxed type implementations, which defines a
2565  * type_name_get_type() function registering the boxed type.
2566  *
2567  * Since: 2.26
2568  */
2569
2570
2571 /**
2572  * G_DEFINE_BOXED_TYPE_WITH_CODE:
2573  * @TypeName: The name of the new type, in Camel case.
2574  * @type_name: The name of the new type, in lowercase, with words separated by '_'.
2575  * @copy_func: the #GBoxedCopyFunc for the new type
2576  * @free_func: the #GBoxedFreeFunc for the new type
2577  * @_C_: Custom code that gets inserted in the *_get_type() function.
2578  *
2579  * A convenience macro for boxed type implementations.
2580  * Similar to G_DEFINE_BOXED_TYPE(), but allows to insert custom code into the
2581  * type_name_get_type() function, e.g. to register value transformations with
2582  * g_value_register_transform_func().
2583  *
2584  * Since: 2.26
2585  */
2586
2587
2588 /**
2589  * G_DEFINE_DYNAMIC_TYPE:
2590  * @TN: The name of the new type, in Camel case.
2591  * @t_n: The name of the new type, in lowercase, with words separated by '_'.
2592  * @T_P: The #GType of the parent type.
2593  *
2594  * A convenience macro for dynamic type implementations, which declares a
2595  * class initialization function, an instance initialization function (see
2596  * #GTypeInfo for information about these) and a static variable named
2597  * @t_n<!-- -->_parent_class pointing to the parent class. Furthermore,
2598  * it defines a <function>*_get_type()</function> and a static
2599  * <function>*_register_type()</function> function for use in your
2600  * <function>module_init()</function>.
2601  * See G_DEFINE_DYNAMIC_TYPE_EXTENDED() for an example.
2602  *
2603  * Since: 2.14
2604  */
2605
2606
2607 /**
2608  * G_DEFINE_DYNAMIC_TYPE_EXTENDED:
2609  * @TypeName: The name of the new type, in Camel case.
2610  * @type_name: The name of the new type, in lowercase, with words separated by '_'.
2611  * @TYPE_PARENT: The #GType of the parent type.
2612  * @flags: #GTypeFlags to pass to g_type_module_register_type()
2613  * @CODE: Custom code that gets inserted in the *_get_type() function.
2614  *
2615  * A more general version of G_DEFINE_DYNAMIC_TYPE() which
2616  * allows to specify #GTypeFlags and custom code.
2617  *
2618  * |[
2619  * G_DEFINE_DYNAMIC_TYPE_EXTENDED (GtkGadget,
2620  * gtk_gadget,
2621  * GTK_TYPE_THING,
2622  * 0,
2623  * G_IMPLEMENT_INTERFACE_DYNAMIC (TYPE_GIZMO,
2624  * gtk_gadget_gizmo_init));
2625  * ]|
2626  * expands to
2627  * |[
2628  * static void     gtk_gadget_init              (GtkGadget      *self);
2629  * static void     gtk_gadget_class_init        (GtkGadgetClass *klass);
2630  * static void     gtk_gadget_class_finalize    (GtkGadgetClass *klass);
2631  *
2632  * static gpointer gtk_gadget_parent_class = NULL;
2633  * static GType    gtk_gadget_type_id = 0;
2634  *
2635  * static void     gtk_gadget_class_intern_init (gpointer klass)
2636  * {
2637  * gtk_gadget_parent_class = g_type_class_peek_parent (klass);
2638  * gtk_gadget_class_init ((GtkGadgetClass*) klass);
2639  * }
2640  *
2641  * GType
2642  * gtk_gadget_get_type (void)
2643  * {
2644  * return gtk_gadget_type_id;
2645  * }
2646  *
2647  * static void
2648  * gtk_gadget_register_type (GTypeModule *type_module)
2649  * {
2650  * const GTypeInfo g_define_type_info = {
2651  * sizeof (GtkGadgetClass),
2652  * (GBaseInitFunc) NULL,
2653  * (GBaseFinalizeFunc) NULL,
2654  * (GClassInitFunc) gtk_gadget_class_intern_init,
2655  * (GClassFinalizeFunc) gtk_gadget_class_finalize,
2656  * NULL,   // class_data
2657  * sizeof (GtkGadget),
2658  * 0,      // n_preallocs
2659  * (GInstanceInitFunc) gtk_gadget_init,
2660  * NULL    // value_table
2661  * };
2662  * gtk_gadget_type_id = g_type_module_register_type (type_module,
2663  * GTK_TYPE_THING,
2664  * GtkGadget,
2665  * &g_define_type_info,
2666  * (GTypeFlags) flags);
2667  * {
2668  * const GInterfaceInfo g_implement_interface_info = {
2669  * (GInterfaceInitFunc) gtk_gadget_gizmo_init
2670  * };
2671  * g_type_module_add_interface (type_module, g_define_type_id, TYPE_GIZMO, &g_implement_interface_info);
2672  * }
2673  * }
2674  * ]|
2675  *
2676  * Since: 2.14
2677  */
2678
2679
2680 /**
2681  * G_DEFINE_INTERFACE:
2682  * @TN: The name of the new type, in Camel case.
2683  * @t_n: The name of the new type, in lowercase, with words separated by '_'.
2684  * @T_P: The #GType of the prerequisite type for the interface, or 0 (%G_TYPE_INVALID) for no prerequisite type.
2685  *
2686  * A convenience macro for #GTypeInterface definitions, which declares
2687  * a default vtable initialization function and defines a *_get_type()
2688  * function.
2689  *
2690  * The macro expects the interface initialization function to have the
2691  * name <literal>t_n ## _default_init</literal>, and the interface
2692  * structure to have the name <literal>TN ## Interface</literal>.
2693  *
2694  * Since: 2.24
2695  */
2696
2697
2698 /**
2699  * G_DEFINE_INTERFACE_WITH_CODE:
2700  * @TN: The name of the new type, in Camel case.
2701  * @t_n: The name of the new type, in lowercase, with words separated by '_'.
2702  * @T_P: The #GType of the prerequisite type for the interface, or 0 (%G_TYPE_INVALID) for no prerequisite type.
2703  * @_C_: Custom code that gets inserted in the *_get_type() function.
2704  *
2705  * A convenience macro for #GTypeInterface definitions. Similar to
2706  * G_DEFINE_INTERFACE(), but allows you to insert custom code into the
2707  * *_get_type() function, e.g. additional interface implementations
2708  * via G_IMPLEMENT_INTERFACE(), or additional prerequisite types. See
2709  * G_DEFINE_TYPE_EXTENDED() for a similar example using
2710  * G_DEFINE_TYPE_WITH_CODE().
2711  *
2712  * Since: 2.24
2713  */
2714
2715
2716 /**
2717  * G_DEFINE_POINTER_TYPE:
2718  * @TypeName: The name of the new type, in Camel case.
2719  * @type_name: The name of the new type, in lowercase, with words separated by '_'.
2720  *
2721  * A convenience macro for pointer type implementations, which defines a
2722  * type_name_get_type() function registering the pointer type.
2723  *
2724  * Since: 2.26
2725  */
2726
2727
2728 /**
2729  * G_DEFINE_POINTER_TYPE_WITH_CODE:
2730  * @TypeName: The name of the new type, in Camel case.
2731  * @type_name: The name of the new type, in lowercase, with words separated by '_'.
2732  * @_C_: Custom code that gets inserted in the *_get_type() function.
2733  *
2734  * A convenience macro for pointer type implementations.
2735  * Similar to G_DEFINE_POINTER_TYPE(), but allows to insert custom code into the
2736  * type_name_get_type() function.
2737  *
2738  * Since: 2.26
2739  */
2740
2741
2742 /**
2743  * G_DEFINE_TYPE:
2744  * @TN: The name of the new type, in Camel case.
2745  * @t_n: The name of the new type, in lowercase, with words separated by '_'.
2746  * @T_P: The #GType of the parent type.
2747  *
2748  * A convenience macro for type implementations, which declares a
2749  * class initialization function, an instance initialization function (see #GTypeInfo for information about
2750  * these) and a static variable named @t_n<!-- -->_parent_class pointing to the parent class. Furthermore, it defines
2751  * a *_get_type() function. See G_DEFINE_TYPE_EXTENDED() for an example.
2752  *
2753  * Since: 2.4
2754  */
2755
2756
2757 /**
2758  * G_DEFINE_TYPE_EXTENDED:
2759  * @TN: The name of the new type, in Camel case.
2760  * @t_n: The name of the new type, in lowercase, with words separated by '_'.
2761  * @T_P: The #GType of the parent type.
2762  * @_f_: #GTypeFlags to pass to g_type_register_static()
2763  * @_C_: Custom code that gets inserted in the *_get_type() function.
2764  *
2765  * The most general convenience macro for type implementations, on which
2766  * G_DEFINE_TYPE(), etc are based.
2767  *
2768  * |[
2769  * G_DEFINE_TYPE_EXTENDED (GtkGadget,
2770  * gtk_gadget,
2771  * GTK_TYPE_WIDGET,
2772  * 0,
2773  * G_IMPLEMENT_INTERFACE (TYPE_GIZMO,
2774  * gtk_gadget_gizmo_init));
2775  * ]|
2776  * expands to
2777  * |[
2778  * static void     gtk_gadget_init       (GtkGadget      *self);
2779  * static void     gtk_gadget_class_init (GtkGadgetClass *klass);
2780  * static gpointer gtk_gadget_parent_class = NULL;
2781  * static void     gtk_gadget_class_intern_init (gpointer klass)
2782  * {
2783  * gtk_gadget_parent_class = g_type_class_peek_parent (klass);
2784  * gtk_gadget_class_init ((GtkGadgetClass*) klass);
2785  * }
2786  *
2787  * GType
2788  * gtk_gadget_get_type (void)
2789  * {
2790  * static volatile gsize g_define_type_id__volatile = 0;
2791  * if (g_once_init_enter (&g_define_type_id__volatile))
2792  * {
2793  * GType g_define_type_id =
2794  * g_type_register_static_simple (GTK_TYPE_WIDGET,
2795  * g_intern_static_string ("GtkGadget"),
2796  * sizeof (GtkGadgetClass),
2797  * (GClassInitFunc) gtk_gadget_class_intern_init,
2798  * sizeof (GtkGadget),
2799  * (GInstanceInitFunc) gtk_gadget_init,
2800  * (GTypeFlags) flags);
2801  * {
2802  * const GInterfaceInfo g_implement_interface_info = {
2803  * (GInterfaceInitFunc) gtk_gadget_gizmo_init
2804  * };
2805  * g_type_add_interface_static (g_define_type_id, TYPE_GIZMO, &g_implement_interface_info);
2806  * }
2807  * g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
2808  * }
2809  * return g_define_type_id__volatile;
2810  * }
2811  * ]|
2812  * The only pieces which have to be manually provided are the definitions of
2813  * the instance and class structure and the definitions of the instance and
2814  * class init functions.
2815  *
2816  * Since: 2.4
2817  */
2818
2819
2820 /**
2821  * G_DEFINE_TYPE_WITH_CODE:
2822  * @TN: The name of the new type, in Camel case.
2823  * @t_n: The name of the new type in lowercase, with words separated by '_'.
2824  * @T_P: The #GType of the parent type.
2825  * @_C_: Custom code that gets inserted in the *_get_type() function.
2826  *
2827  * A convenience macro for type implementations.
2828  * Similar to G_DEFINE_TYPE(), but allows you to insert custom code into the
2829  * *_get_type() function, e.g. interface implementations via G_IMPLEMENT_INTERFACE().
2830  * See G_DEFINE_TYPE_EXTENDED() for an example.
2831  *
2832  * Since: 2.4
2833  */
2834
2835
2836 /**
2837  * G_ENUM_CLASS:
2838  * @class: a valid #GEnumClass
2839  *
2840  * Casts a derived #GEnumClass structure into a #GEnumClass structure.
2841  */
2842
2843
2844 /**
2845  * G_ENUM_CLASS_TYPE:
2846  * @class: a #GEnumClass
2847  *
2848  * Get the type identifier from a given #GEnumClass structure.
2849  *
2850  * Returns: the #GType
2851  */
2852
2853
2854 /**
2855  * G_ENUM_CLASS_TYPE_NAME:
2856  * @class: a #GEnumClass
2857  *
2858  * Get the static type name from a given #GEnumClass structure.
2859  *
2860  * Returns: the type name.
2861  */
2862
2863
2864 /**
2865  * G_FLAGS_CLASS:
2866  * @class: a valid #GFlagsClass
2867  *
2868  * Casts a derived #GFlagsClass structure into a #GFlagsClass structure.
2869  */
2870
2871
2872 /**
2873  * G_FLAGS_CLASS_TYPE:
2874  * @class: a #GFlagsClass
2875  *
2876  * Get the type identifier from a given #GFlagsClass structure.
2877  *
2878  * Returns: the #GType
2879  */
2880
2881
2882 /**
2883  * G_FLAGS_CLASS_TYPE_NAME:
2884  * @class: a #GFlagsClass
2885  *
2886  * Get the static type name from a given #GFlagsClass structure.
2887  *
2888  * Returns: the type name.
2889  */
2890
2891
2892 /**
2893  * G_IMPLEMENT_INTERFACE:
2894  * @TYPE_IFACE: The #GType of the interface to add
2895  * @iface_init: The interface init function
2896  *
2897  * A convenience macro to ease interface addition in the @_C_ section
2898  * of G_DEFINE_TYPE_WITH_CODE() or G_DEFINE_ABSTRACT_TYPE_WITH_CODE().
2899  * See G_DEFINE_TYPE_EXTENDED() for an example.
2900  *
2901  * Note that this macro can only be used together with the G_DEFINE_TYPE_*
2902  * macros, since it depends on variable names from those macros.
2903  *
2904  * Since: 2.4
2905  */
2906
2907
2908 /**
2909  * G_IMPLEMENT_INTERFACE_DYNAMIC:
2910  * @TYPE_IFACE: The #GType of the interface to add
2911  * @iface_init: The interface init function
2912  *
2913  * A convenience macro to ease interface addition in the @_C_ section
2914  * of G_DEFINE_DYNAMIC_TYPE_EXTENDED(). See G_DEFINE_DYNAMIC_TYPE_EXTENDED()
2915  * for an example.
2916  *
2917  * Note that this macro can only be used together with the
2918  * G_DEFINE_DYNAMIC_TYPE_EXTENDED macros, since it depends on variable
2919  * names from that macro.
2920  *
2921  * Since: 2.24
2922  */
2923
2924
2925 /**
2926  * G_INITIALLY_UNOWNED:
2927  * @object: Object which is subject to casting.
2928  *
2929  * Casts a #GInitiallyUnowned or derived pointer into a (GInitiallyUnowned*)
2930  * pointer. Depending on the current debugging level, this function may invoke
2931  * certain runtime checks to identify invalid casts.
2932  */
2933
2934
2935 /**
2936  * G_INITIALLY_UNOWNED_CLASS:
2937  * @class: a valid #GInitiallyUnownedClass
2938  *
2939  * Casts a derived #GInitiallyUnownedClass structure into a
2940  * #GInitiallyUnownedClass structure.
2941  */
2942
2943
2944 /**
2945  * G_INITIALLY_UNOWNED_GET_CLASS:
2946  * @object: a #GInitiallyUnowned instance.
2947  *
2948  * Get the class structure associated to a #GInitiallyUnowned instance.
2949  *
2950  * Returns: pointer to object class structure.
2951  */
2952
2953
2954 /**
2955  * G_IS_ENUM_CLASS:
2956  * @class: a #GEnumClass
2957  *
2958  * Checks whether @class "is a" valid #GEnumClass structure of type %G_TYPE_ENUM
2959  * or derived.
2960  */
2961
2962
2963 /**
2964  * G_IS_FLAGS_CLASS:
2965  * @class: a #GFlagsClass
2966  *
2967  * Checks whether @class "is a" valid #GFlagsClass structure of type %G_TYPE_FLAGS
2968  * or derived.
2969  */
2970
2971
2972 /**
2973  * G_IS_INITIALLY_UNOWNED:
2974  * @object: Instance to check for being a %G_TYPE_INITIALLY_UNOWNED.
2975  *
2976  * Checks whether a valid #GTypeInstance pointer is of type %G_TYPE_INITIALLY_UNOWNED.
2977  */
2978
2979
2980 /**
2981  * G_IS_INITIALLY_UNOWNED_CLASS:
2982  * @class: a #GInitiallyUnownedClass
2983  *
2984  * Checks whether @class "is a" valid #GInitiallyUnownedClass structure of type
2985  * %G_TYPE_INITIALLY_UNOWNED or derived.
2986  */
2987
2988
2989 /**
2990  * G_IS_OBJECT:
2991  * @object: Instance to check for being a %G_TYPE_OBJECT.
2992  *
2993  * Checks whether a valid #GTypeInstance pointer is of type %G_TYPE_OBJECT.
2994  */
2995
2996
2997 /**
2998  * G_IS_OBJECT_CLASS:
2999  * @class: a #GObjectClass
3000  *
3001  * Checks whether @class "is a" valid #GObjectClass structure of type
3002  * %G_TYPE_OBJECT or derived.
3003  */
3004
3005
3006 /**
3007  * G_IS_PARAM_SPEC:
3008  * @pspec: a #GParamSpec
3009  *
3010  * Checks whether @pspec "is a" valid #GParamSpec structure of type %G_TYPE_PARAM
3011  * or derived.
3012  */
3013
3014
3015 /**
3016  * G_IS_PARAM_SPEC_BOOLEAN:
3017  * @pspec: a valid #GParamSpec instance
3018  *
3019  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_BOOLEAN.
3020  *
3021  * Returns: %TRUE on success.
3022  */
3023
3024
3025 /**
3026  * G_IS_PARAM_SPEC_BOXED:
3027  * @pspec: a valid #GParamSpec instance
3028  *
3029  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_BOXED.
3030  *
3031  * Returns: %TRUE on success.
3032  */
3033
3034
3035 /**
3036  * G_IS_PARAM_SPEC_CHAR:
3037  * @pspec: a valid #GParamSpec instance
3038  *
3039  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_CHAR.
3040  *
3041  * Returns: %TRUE on success.
3042  */
3043
3044
3045 /**
3046  * G_IS_PARAM_SPEC_CLASS:
3047  * @pclass: a #GParamSpecClass
3048  *
3049  * Checks whether @pclass "is a" valid #GParamSpecClass structure of type
3050  * %G_TYPE_PARAM or derived.
3051  */
3052
3053
3054 /**
3055  * G_IS_PARAM_SPEC_DOUBLE:
3056  * @pspec: a valid #GParamSpec instance
3057  *
3058  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_DOUBLE.
3059  *
3060  * Returns: %TRUE on success.
3061  */
3062
3063
3064 /**
3065  * G_IS_PARAM_SPEC_ENUM:
3066  * @pspec: a valid #GParamSpec instance
3067  *
3068  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_ENUM.
3069  *
3070  * Returns: %TRUE on success.
3071  */
3072
3073
3074 /**
3075  * G_IS_PARAM_SPEC_FLAGS:
3076  * @pspec: a valid #GParamSpec instance
3077  *
3078  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_FLAGS.
3079  *
3080  * Returns: %TRUE on success.
3081  */
3082
3083
3084 /**
3085  * G_IS_PARAM_SPEC_FLOAT:
3086  * @pspec: a valid #GParamSpec instance
3087  *
3088  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_FLOAT.
3089  *
3090  * Returns: %TRUE on success.
3091  */
3092
3093
3094 /**
3095  * G_IS_PARAM_SPEC_GTYPE:
3096  * @pspec: a #GParamSpec
3097  *
3098  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_GTYPE.
3099  *
3100  * Since: 2.10
3101  * Returns: %TRUE on success.
3102  */
3103
3104
3105 /**
3106  * G_IS_PARAM_SPEC_INT:
3107  * @pspec: a valid #GParamSpec instance
3108  *
3109  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_INT.
3110  *
3111  * Returns: %TRUE on success.
3112  */
3113
3114
3115 /**
3116  * G_IS_PARAM_SPEC_INT64:
3117  * @pspec: a valid #GParamSpec instance
3118  *
3119  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_INT64.
3120  *
3121  * Returns: %TRUE on success.
3122  */
3123
3124
3125 /**
3126  * G_IS_PARAM_SPEC_LONG:
3127  * @pspec: a valid #GParamSpec instance
3128  *
3129  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_LONG.
3130  *
3131  * Returns: %TRUE on success.
3132  */
3133
3134
3135 /**
3136  * G_IS_PARAM_SPEC_OBJECT:
3137  * @pspec: a valid #GParamSpec instance
3138  *
3139  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_OBJECT.
3140  *
3141  * Returns: %TRUE on success.
3142  */
3143
3144
3145 /**
3146  * G_IS_PARAM_SPEC_OVERRIDE:
3147  * @pspec: a #GParamSpec
3148  *
3149  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_OVERRIDE.
3150  *
3151  * Since: 2.4
3152  * Returns: %TRUE on success.
3153  */
3154
3155
3156 /**
3157  * G_IS_PARAM_SPEC_PARAM:
3158  * @pspec: a valid #GParamSpec instance
3159  *
3160  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_PARAM.
3161  *
3162  * Returns: %TRUE on success.
3163  */
3164
3165
3166 /**
3167  * G_IS_PARAM_SPEC_POINTER:
3168  * @pspec: a valid #GParamSpec instance
3169  *
3170  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_POINTER.
3171  *
3172  * Returns: %TRUE on success.
3173  */
3174
3175
3176 /**
3177  * G_IS_PARAM_SPEC_STRING:
3178  * @pspec: a valid #GParamSpec instance
3179  *
3180  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_STRING.
3181  *
3182  * Returns: %TRUE on success.
3183  */
3184
3185
3186 /**
3187  * G_IS_PARAM_SPEC_UCHAR:
3188  * @pspec: a valid #GParamSpec instance
3189  *
3190  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UCHAR.
3191  *
3192  * Returns: %TRUE on success.
3193  */
3194
3195
3196 /**
3197  * G_IS_PARAM_SPEC_UINT:
3198  * @pspec: a valid #GParamSpec instance
3199  *
3200  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UINT.
3201  *
3202  * Returns: %TRUE on success.
3203  */
3204
3205
3206 /**
3207  * G_IS_PARAM_SPEC_UINT64:
3208  * @pspec: a valid #GParamSpec instance
3209  *
3210  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UINT64.
3211  *
3212  * Returns: %TRUE on success.
3213  */
3214
3215
3216 /**
3217  * G_IS_PARAM_SPEC_ULONG:
3218  * @pspec: a valid #GParamSpec instance
3219  *
3220  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_ULONG.
3221  *
3222  * Returns: %TRUE on success.
3223  */
3224
3225
3226 /**
3227  * G_IS_PARAM_SPEC_UNICHAR:
3228  * @pspec: a valid #GParamSpec instance
3229  *
3230  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UNICHAR.
3231  *
3232  * Returns: %TRUE on success.
3233  */
3234
3235
3236 /**
3237  * G_IS_PARAM_SPEC_VALUE_ARRAY:
3238  * @pspec: a valid #GParamSpec instance
3239  *
3240  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_VALUE_ARRAY.
3241  *
3242  * Returns: %TRUE on success.
3243  * Deprecated: 2.32: Use #GArray instead of #GValueArray
3244  */
3245
3246
3247 /**
3248  * G_IS_PARAM_SPEC_VARIANT:
3249  * @pspec: a #GParamSpec
3250  *
3251  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_VARIANT.
3252  *
3253  * Returns: %TRUE on success
3254  * Since: 2.26
3255  */
3256
3257
3258 /**
3259  * G_IS_VALUE:
3260  * @value: A #GValue structure.
3261  *
3262  * Checks if @value is a valid and initialized #GValue structure.
3263  *
3264  * Returns: %TRUE on success.
3265  */
3266
3267
3268 /**
3269  * G_MARKUP_ERROR:
3270  *
3271  * Error domain for markup parsing.
3272  * Errors in this domain will be from the #GMarkupError enumeration.
3273  * See #GError for information on error domains.
3274  */
3275
3276
3277 /**
3278  * G_NODE_IS_LEAF:
3279  * @node: a #GNode
3280  *
3281  * Returns %TRUE if a #GNode is a leaf node.
3282  *
3283  * (i.e. it has no children)
3284  *
3285  * Returns: %TRUE if the #GNode is a leaf node
3286  */
3287
3288
3289 /**
3290  * G_NODE_IS_ROOT:
3291  * @node: a #GNode
3292  *
3293  * Returns %TRUE if a #GNode is the root of a tree.
3294  *
3295  * (i.e. it has no parent or siblings)
3296  *
3297  * Returns: %TRUE if the #GNode is the root of a tree
3298  */
3299
3300
3301 /**
3302  * G_OBJECT:
3303  * @object: Object which is subject to casting.
3304  *
3305  * Casts a #GObject or derived pointer into a (GObject*) pointer.
3306  * Depending on the current debugging level, this function may invoke
3307  * certain runtime checks to identify invalid casts.
3308  */
3309
3310
3311 /**
3312  * G_OBJECT_CLASS:
3313  * @class: a valid #GObjectClass
3314  *
3315  * Casts a derived #GObjectClass structure into a #GObjectClass structure.
3316  */
3317
3318
3319 /**
3320  * G_OBJECT_CLASS_NAME:
3321  * @class: a valid #GObjectClass
3322  *
3323  * Return the name of a class structure's type.
3324  *
3325  * should not be freed.
3326  *
3327  * Returns: Type name of @class. The string is owned by the type system and
3328  */
3329
3330
3331 /**
3332  * G_OBJECT_CLASS_TYPE:
3333  * @class: a valid #GObjectClass
3334  *
3335  * Get the type id of a class structure.
3336  *
3337  * Returns: Type id of @class.
3338  */
3339
3340
3341 /**
3342  * G_OBJECT_GET_CLASS:
3343  * @object: a #GObject instance.
3344  *
3345  * Get the class structure associated to a #GObject instance.
3346  *
3347  * Returns: pointer to object class structure.
3348  */
3349
3350
3351 /**
3352  * G_OBJECT_TYPE:
3353  * @object: Object to return the type id for.
3354  *
3355  * Get the type id of an object.
3356  *
3357  * Returns: Type id of @object.
3358  */
3359
3360
3361 /**
3362  * G_OBJECT_TYPE_NAME:
3363  * @object: Object to return the type name for.
3364  *
3365  * Get the name of an object's type.
3366  *
3367  * should not be freed.
3368  *
3369  * Returns: Type name of @object. The string is owned by the type system and
3370  */
3371
3372
3373 /**
3374  * G_OBJECT_WARN_INVALID_PROPERTY_ID:
3375  * @object: the #GObject on which set_property() or get_property() was called
3376  * @property_id: the numeric id of the property
3377  * @pspec: the #GParamSpec of the property
3378  *
3379  * This macro should be used to emit a standard warning about unexpected
3380  * properties in set_property() and get_property() implementations.
3381  */
3382
3383
3384 /**
3385  * G_OPTION_ERROR:
3386  *
3387  * Error domain for option parsing. Errors in this domain will
3388  * be from the #GOptionError enumeration. See #GError for information on
3389  * error domains.
3390  */
3391
3392
3393 /**
3394  * G_OPTION_REMAINING:
3395  *
3396  * If a long option in the main group has this name, it is not treated as a
3397  * regular option. Instead it collects all non-option arguments which would
3398  * otherwise be left in <literal>argv</literal>. The option must be of type
3399  * %G_OPTION_ARG_CALLBACK, %G_OPTION_ARG_STRING_ARRAY
3400  * or %G_OPTION_ARG_FILENAME_ARRAY.
3401  *
3402  *
3403  * Using #G_OPTION_REMAINING instead of simply scanning <literal>argv</literal>
3404  * for leftover arguments has the advantage that GOption takes care of
3405  * necessary encoding conversions for strings or filenames.
3406  *
3407  * Since: 2.6
3408  */
3409
3410
3411 /**
3412  * G_PARAM_MASK:
3413  *
3414  * Mask containing the bits of #GParamSpec.flags which are reserved for GLib.
3415  */
3416
3417
3418 /**
3419  * G_PARAM_READWRITE:
3420  *
3421  * #GParamFlags value alias for %G_PARAM_READABLE | %G_PARAM_WRITABLE.
3422  */
3423
3424
3425 /**
3426  * G_PARAM_SPEC:
3427  * @pspec: a valid #GParamSpec
3428  *
3429  * Casts a derived #GParamSpec object (e.g. of type #GParamSpecInt) into
3430  * a #GParamSpec object.
3431  */
3432
3433
3434 /**
3435  * G_PARAM_SPEC_BOOLEAN:
3436  * @pspec: a valid #GParamSpec instance
3437  *
3438  * Cast a #GParamSpec instance into a #GParamSpecBoolean.
3439  */
3440
3441
3442 /**
3443  * G_PARAM_SPEC_BOXED:
3444  * @pspec: a valid #GParamSpec instance
3445  *
3446  * Cast a #GParamSpec instance into a #GParamSpecBoxed.
3447  */
3448
3449
3450 /**
3451  * G_PARAM_SPEC_CHAR:
3452  * @pspec: a valid #GParamSpec instance
3453  *
3454  * Cast a #GParamSpec instance into a #GParamSpecChar.
3455  */
3456
3457
3458 /**
3459  * G_PARAM_SPEC_CLASS:
3460  * @pclass: a valid #GParamSpecClass
3461  *
3462  * Casts a derived #GParamSpecClass structure into a #GParamSpecClass structure.
3463  */
3464
3465
3466 /**
3467  * G_PARAM_SPEC_DOUBLE:
3468  * @pspec: a valid #GParamSpec instance
3469  *
3470  * Cast a #GParamSpec instance into a #GParamSpecDouble.
3471  */
3472
3473
3474 /**
3475  * G_PARAM_SPEC_ENUM:
3476  * @pspec: a valid #GParamSpec instance
3477  *
3478  * Cast a #GParamSpec instance into a #GParamSpecEnum.
3479  */
3480
3481
3482 /**
3483  * G_PARAM_SPEC_FLAGS:
3484  * @pspec: a valid #GParamSpec instance
3485  *
3486  * Cast a #GParamSpec instance into a #GParamSpecFlags.
3487  */
3488
3489
3490 /**
3491  * G_PARAM_SPEC_FLOAT:
3492  * @pspec: a valid #GParamSpec instance
3493  *
3494  * Cast a #GParamSpec instance into a #GParamSpecFloat.
3495  */
3496
3497
3498 /**
3499  * G_PARAM_SPEC_GET_CLASS:
3500  * @pspec: a valid #GParamSpec
3501  *
3502  * Retrieves the #GParamSpecClass of a #GParamSpec.
3503  */
3504
3505
3506 /**
3507  * G_PARAM_SPEC_GTYPE:
3508  * @pspec: a #GParamSpec
3509  *
3510  * Casts a #GParamSpec into a #GParamSpecGType.
3511  *
3512  * Since: 2.10
3513  */
3514
3515
3516 /**
3517  * G_PARAM_SPEC_INT:
3518  * @pspec: a valid #GParamSpec instance
3519  *
3520  * Cast a #GParamSpec instance into a #GParamSpecInt.
3521  */
3522
3523
3524 /**
3525  * G_PARAM_SPEC_INT64:
3526  * @pspec: a valid #GParamSpec instance
3527  *
3528  * Cast a #GParamSpec instance into a #GParamSpecInt64.
3529  */
3530
3531
3532 /**
3533  * G_PARAM_SPEC_LONG:
3534  * @pspec: a valid #GParamSpec instance
3535  *
3536  * Cast a #GParamSpec instance into a #GParamSpecLong.
3537  */
3538
3539
3540 /**
3541  * G_PARAM_SPEC_OBJECT:
3542  * @pspec: a valid #GParamSpec instance
3543  *
3544  * Casts a #GParamSpec instance into a #GParamSpecObject.
3545  */
3546
3547
3548 /**
3549  * G_PARAM_SPEC_OVERRIDE:
3550  * @pspec: a #GParamSpec
3551  *
3552  * Casts a #GParamSpec into a #GParamSpecOverride.
3553  *
3554  * Since: 2.4
3555  */
3556
3557
3558 /**
3559  * G_PARAM_SPEC_PARAM:
3560  * @pspec: a valid #GParamSpec instance
3561  *
3562  * Casts a #GParamSpec instance into a #GParamSpecParam.
3563  */
3564
3565
3566 /**
3567  * G_PARAM_SPEC_POINTER:
3568  * @pspec: a valid #GParamSpec instance
3569  *
3570  * Casts a #GParamSpec instance into a #GParamSpecPointer.
3571  */
3572
3573
3574 /**
3575  * G_PARAM_SPEC_STRING:
3576  * @pspec: a valid #GParamSpec instance
3577  *
3578  * Casts a #GParamSpec instance into a #GParamSpecString.
3579  */
3580
3581
3582 /**
3583  * G_PARAM_SPEC_TYPE:
3584  * @pspec: a valid #GParamSpec
3585  *
3586  * Retrieves the #GType of this @pspec.
3587  */
3588
3589
3590 /**
3591  * G_PARAM_SPEC_TYPE_NAME:
3592  * @pspec: a valid #GParamSpec
3593  *
3594  * Retrieves the #GType name of this @pspec.
3595  */
3596
3597
3598 /**
3599  * G_PARAM_SPEC_UCHAR:
3600  * @pspec: a valid #GParamSpec instance
3601  *
3602  * Cast a #GParamSpec instance into a #GParamSpecUChar.
3603  */
3604
3605
3606 /**
3607  * G_PARAM_SPEC_UINT:
3608  * @pspec: a valid #GParamSpec instance
3609  *
3610  * Cast a #GParamSpec instance into a #GParamSpecUInt.
3611  */
3612
3613
3614 /**
3615  * G_PARAM_SPEC_UINT64:
3616  * @pspec: a valid #GParamSpec instance
3617  *
3618  * Cast a #GParamSpec instance into a #GParamSpecUInt64.
3619  */
3620
3621
3622 /**
3623  * G_PARAM_SPEC_ULONG:
3624  * @pspec: a valid #GParamSpec instance
3625  *
3626  * Cast a #GParamSpec instance into a #GParamSpecULong.
3627  */
3628
3629
3630 /**
3631  * G_PARAM_SPEC_UNICHAR:
3632  * @pspec: a valid #GParamSpec instance
3633  *
3634  * Cast a #GParamSpec instance into a #GParamSpecUnichar.
3635  */
3636
3637
3638 /**
3639  * G_PARAM_SPEC_VALUE_ARRAY:
3640  * @pspec: a valid #GParamSpec instance
3641  *
3642  * Cast a #GParamSpec instance into a #GParamSpecValueArray.
3643  *
3644  * Deprecated: 2.32: Use #GArray instead of #GValueArray
3645  */
3646
3647
3648 /**
3649  * G_PARAM_SPEC_VALUE_TYPE:
3650  * @pspec: a valid #GParamSpec
3651  *
3652  * Retrieves the #GType to initialize a #GValue for this parameter.
3653  */
3654
3655
3656 /**
3657  * G_PARAM_SPEC_VARIANT:
3658  * @pspec: a #GParamSpec
3659  *
3660  * Casts a #GParamSpec into a #GParamSpecVariant.
3661  *
3662  * Since: 2.26
3663  */
3664
3665
3666 /**
3667  * G_PARAM_STATIC_STRINGS:
3668  *
3669  * #GParamFlags value alias for %G_PARAM_STATIC_NAME | %G_PARAM_STATIC_NICK | %G_PARAM_STATIC_BLURB.
3670  *
3671  * Since 2.13.0
3672  */
3673
3674
3675 /**
3676  * G_PARAM_USER_SHIFT:
3677  *
3678  * Minimum shift count to be used for user defined flags, to be stored in
3679  * #GParamSpec.flags. The maximum allowed is 30 + G_PARAM_USER_SHIFT.
3680  */
3681
3682
3683 /**
3684  * G_PRIORITY_DEFAULT:
3685  *
3686  * Use this for default priority event sources.
3687  *
3688  * In GLib this priority is used when adding timeout functions
3689  * with g_timeout_add(). In GDK this priority is used for events
3690  * from the X server.
3691  */
3692
3693
3694 /**
3695  * G_PRIORITY_DEFAULT_IDLE:
3696  *
3697  * Use this for default priority idle functions.
3698  *
3699  * In GLib this priority is used when adding idle functions with
3700  * g_idle_add().
3701  */
3702
3703
3704 /**
3705  * G_PRIORITY_HIGH:
3706  *
3707  * Use this for high priority event sources.
3708  *
3709  * It is not used within GLib or GTK+.
3710  */
3711
3712
3713 /**
3714  * G_PRIORITY_HIGH_IDLE:
3715  *
3716  * Use this for high priority idle functions.
3717  *
3718  * GTK+ uses #G_PRIORITY_HIGH_IDLE + 10 for resizing operations,
3719  * and #G_PRIORITY_HIGH_IDLE + 20 for redrawing operations. (This is
3720  * done to ensure that any pending resizes are processed before any
3721  * pending redraws, so that widgets are not redrawn twice unnecessarily.)
3722  */
3723
3724
3725 /**
3726  * G_PRIORITY_LOW:
3727  *
3728  * Use this for very low priority background tasks.
3729  *
3730  * It is not used within GLib or GTK+.
3731  */
3732
3733
3734 /**
3735  * G_QUEUE_INIT:
3736  *
3737  * A statically-allocated #GQueue must be initialized with this
3738  * macro before it can be used. This macro can be used to initialize
3739  * a variable, but it cannot be assigned to a variable. In that case
3740  * you have to use g_queue_init().
3741  *
3742  * |[
3743  * GQueue my_queue = G_QUEUE_INIT;
3744  * ]|
3745  *
3746  * Since: 2.14
3747  */
3748
3749
3750 /**
3751  * G_REGEX_ERROR:
3752  *
3753  * Error domain for regular expressions. Errors in this domain will be
3754  * from the #GRegexError enumeration. See #GError for information on
3755  * error domains.
3756  *
3757  * Since: 2.14
3758  */
3759
3760
3761 /**
3762  * G_SIGNAL_FLAGS_MASK:
3763  *
3764  * A mask for all #GSignalFlags bits.
3765  */
3766
3767
3768 /**
3769  * G_SIGNAL_MATCH_MASK:
3770  *
3771  * A mask for all #GSignalMatchType bits.
3772  */
3773
3774
3775 /**
3776  * G_SIGNAL_TYPE_STATIC_SCOPE:
3777  *
3778  * This macro flags signal argument types for which the signal system may
3779  * assume that instances thereof remain persistent across all signal emissions
3780  * they are used in. This is only useful for non ref-counted, value-copy types.
3781  *
3782  * To flag a signal argument in this way, add
3783  * <literal>| G_SIGNAL_TYPE_STATIC_SCOPE</literal> to the corresponding argument
3784  * of g_signal_new().
3785  * |[
3786  * g_signal_new ("size_request",
3787  * G_TYPE_FROM_CLASS (gobject_class),
3788  * G_SIGNAL_RUN_FIRST,
3789  * G_STRUCT_OFFSET (GtkWidgetClass, size_request),
3790  * NULL, NULL,
3791  * _gtk_marshal_VOID__BOXED,
3792  * G_TYPE_NONE, 1,
3793  * GTK_TYPE_REQUISITION | G_SIGNAL_TYPE_STATIC_SCOPE);
3794  * ]|
3795  */
3796
3797
3798 /**
3799  * G_SOURCE_CONTINUE:
3800  *
3801  * Use this macro as the return value of a #GSourceFunc to leave
3802  * the #GSource in the main loop.
3803  *
3804  * Since: 2.28
3805  */
3806
3807
3808 /**
3809  * G_SOURCE_REMOVE:
3810  *
3811  * Use this macro as the return value of a #GSourceFunc to remove
3812  * the #GSource from the main loop.
3813  *
3814  * Since: 2.28
3815  */
3816
3817
3818 /**
3819  * G_SPAWN_ERROR:
3820  *
3821  * Error domain for spawning processes. Errors in this domain will
3822  * be from the #GSpawnError enumeration. See #GError for information on
3823  * error domains.
3824  */
3825
3826
3827 /**
3828  * G_TIME_SPAN_DAY:
3829  *
3830  * Evaluates to a time span of one day.
3831  *
3832  * Since: 2.26
3833  */
3834
3835
3836 /**
3837  * G_TIME_SPAN_HOUR:
3838  *
3839  * Evaluates to a time span of one hour.
3840  *
3841  * Since: 2.26
3842  */
3843
3844
3845 /**
3846  * G_TIME_SPAN_MILLISECOND:
3847  *
3848  * Evaluates to a time span of one millisecond.
3849  *
3850  * Since: 2.26
3851  */
3852
3853
3854 /**
3855  * G_TIME_SPAN_MINUTE:
3856  *
3857  * Evaluates to a time span of one minute.
3858  *
3859  * Since: 2.26
3860  */
3861
3862
3863 /**
3864  * G_TIME_SPAN_SECOND:
3865  *
3866  * Evaluates to a time span of one second.
3867  *
3868  * Since: 2.26
3869  */
3870
3871
3872 /**
3873  * G_TYPE_ARRAY:
3874  *
3875  * The #GType for a boxed type holding a #GArray reference.
3876  *
3877  * Since: 2.22
3878  */
3879
3880
3881 /**
3882  * G_TYPE_BOOLEAN:
3883  *
3884  * The fundamental type corresponding to #gboolean.
3885  */
3886
3887
3888 /**
3889  * G_TYPE_BOXED:
3890  *
3891  * The fundamental type from which all boxed types are derived.
3892  */
3893
3894
3895 /**
3896  * G_TYPE_BYTES:
3897  *
3898  * The #GType for #GBytes.
3899  *
3900  * Since: 2.32
3901  */
3902
3903
3904 /**
3905  * G_TYPE_BYTE_ARRAY:
3906  *
3907  * The #GType for a boxed type holding a #GByteArray reference.
3908  *
3909  * Since: 2.22
3910  */
3911
3912
3913 /**
3914  * G_TYPE_CHAR:
3915  *
3916  * The fundamental type corresponding to #gchar.
3917  * The type designated by G_TYPE_CHAR is unconditionally an 8-bit signed integer.
3918  * This may or may not be the same type a the C type "gchar".
3919  */
3920
3921
3922 /**
3923  * G_TYPE_CHECK_CLASS_CAST:
3924  * @g_class: Location of a #GTypeClass structure.
3925  * @g_type: The type to be returned.
3926  * @c_type: The corresponding C type of class structure of @g_type.
3927  *
3928  * Checks that @g_class is a class structure of the type identified by @g_type
3929  * and issues a warning if this is not the case. Returns @g_class casted
3930  * to a pointer to @c_type.
3931  *
3932  * This macro should only be used in type implementations.
3933  */
3934
3935
3936 /**
3937  * G_TYPE_CHECK_CLASS_TYPE:
3938  * @g_class: Location of a #GTypeClass structure.
3939  * @g_type: The type to be checked.
3940  *
3941  * Checks if @g_class is a class structure of the type identified by
3942  * @g_type.
3943  *
3944  * This macro should only be used in type implementations.
3945  *
3946  * Returns: %TRUE on success.
3947  */
3948
3949
3950 /**
3951  * G_TYPE_CHECK_INSTANCE:
3952  * @instance: Location of a #GTypeInstance structure.
3953  *
3954  * Checks if @instance is a valid #GTypeInstance structure,
3955  * otherwise issues a warning and returns %FALSE.
3956  *
3957  * This macro should only be used in type implementations.
3958  *
3959  * Returns: %TRUE on success.
3960  */
3961
3962
3963 /**
3964  * G_TYPE_CHECK_INSTANCE_CAST:
3965  * @instance: Location of a #GTypeInstance structure.
3966  * @g_type: The type to be returned.
3967  * @c_type: The corresponding C type of @g_type.
3968  *
3969  * Checks that @instance is an instance of the type identified by @g_type
3970  * and issues a warning if this is not the case. Returns @instance casted
3971  * to a pointer to @c_type.
3972  *
3973  * This macro should only be used in type implementations.
3974  */
3975
3976
3977 /**
3978  * G_TYPE_CHECK_INSTANCE_TYPE:
3979  * @instance: Location of a #GTypeInstance structure.
3980  * @g_type: The type to be checked
3981  *
3982  * Checks if @instance is an instance of the type identified by @g_type.
3983  *
3984  * This macro should only be used in type implementations.
3985  *
3986  * Returns: %TRUE on success.
3987  */
3988
3989
3990 /**
3991  * G_TYPE_CHECK_VALUE:
3992  * @value: a #GValue
3993  *
3994  * Checks if @value has been initialized to hold values
3995  * of a value type.
3996  *
3997  * This macro should only be used in type implementations.
3998  *
3999  * Returns: %TRUE on success.
4000  */
4001
4002
4003 /**
4004  * G_TYPE_CHECK_VALUE_TYPE:
4005  * @value: a #GValue
4006  * @g_type: The type to be checked.
4007  *
4008  * Checks if @value has been initialized to hold values
4009  * of type @g_type.
4010  *
4011  * This macro should only be used in type implementations.
4012  *
4013  * Returns: %TRUE on success.
4014  */
4015
4016
4017 /**
4018  * G_TYPE_CLASS_GET_PRIVATE:
4019  * @klass: the class of a type deriving from @private_type.
4020  * @g_type: the type identifying which private data to retrieve.
4021  * @c_type: The C type for the private structure.
4022  *
4023  * Gets the private class structure for a particular type.
4024  * The private structure must have been registered in the
4025  * get_type() function with g_type_add_class_private().
4026  *
4027  * This macro should only be used in type implementations.
4028  *
4029  * Since: 2.24
4030  * Returns: a pointer to the private data structure.
4031  */
4032
4033
4034 /**
4035  * G_TYPE_CLOSURE:
4036  *
4037  * The #GType for #GClosure.
4038  */
4039
4040
4041 /**
4042  * G_TYPE_DATE:
4043  *
4044  * The #GType for #GDate.
4045  */
4046
4047
4048 /**
4049  * G_TYPE_DATE_TIME:
4050  *
4051  * The #GType for a boxed type holding a #GDateTime.
4052  *
4053  * Since: 2.26
4054  */
4055
4056
4057 /**
4058  * G_TYPE_DOUBLE:
4059  *
4060  * The fundamental type corresponding to #gdouble.
4061  */
4062
4063
4064 /**
4065  * G_TYPE_ENUM:
4066  *
4067  * The fundamental type from which all enumeration types are derived.
4068  */
4069
4070
4071 /**
4072  * G_TYPE_ERROR:
4073  *
4074  * The #GType for a boxed type holding a #GError.
4075  *
4076  * Since: 2.26
4077  */
4078
4079
4080 /**
4081  * G_TYPE_FLAGS:
4082  *
4083  * The fundamental type from which all flags types are derived.
4084  */
4085
4086
4087 /**
4088  * G_TYPE_FLAG_RESERVED_ID_BIT:
4089  *
4090  * A bit in the type number that's supposed to be left untouched.
4091  */
4092
4093
4094 /**
4095  * G_TYPE_FLOAT:
4096  *
4097  * The fundamental type corresponding to #gfloat.
4098  */
4099
4100
4101 /**
4102  * G_TYPE_FROM_CLASS:
4103  * @g_class: Location of a valid #GTypeClass structure.
4104  *
4105  * Get the type identifier from a given @class structure.
4106  *
4107  * This macro should only be used in type implementations.
4108  *
4109  * Returns: the #GType
4110  */
4111
4112
4113 /**
4114  * G_TYPE_FROM_INSTANCE:
4115  * @instance: Location of a valid #GTypeInstance structure.
4116  *
4117  * Get the type identifier from a given @instance structure.
4118  *
4119  * This macro should only be used in type implementations.
4120  *
4121  * Returns: the #GType
4122  */
4123
4124
4125 /**
4126  * G_TYPE_FROM_INTERFACE:
4127  * @g_iface: Location of a valid #GTypeInterface structure.
4128  *
4129  * Get the type identifier from a given @interface structure.
4130  *
4131  * This macro should only be used in type implementations.
4132  *
4133  * Returns: the #GType
4134  */
4135
4136
4137 /**
4138  * G_TYPE_FUNDAMENTAL:
4139  * @type: A #GType value.
4140  *
4141  * The fundamental type which is the ancestor of @type.
4142  * Fundamental types are types that serve as ultimate bases for the derived types,
4143  * thus they are the roots of distinct inheritance hierarchies.
4144  */
4145
4146
4147 /**
4148  * G_TYPE_FUNDAMENTAL_MAX:
4149  *
4150  * An integer constant that represents the number of identifiers reserved
4151  * for types that are assigned at compile-time.
4152  */
4153
4154
4155 /**
4156  * G_TYPE_FUNDAMENTAL_SHIFT:
4157  *
4158  * Shift value used in converting numbers to type IDs.
4159  */
4160
4161
4162 /**
4163  * G_TYPE_GSTRING:
4164  *
4165  * The #GType for #GString.
4166  */
4167
4168
4169 /**
4170  * G_TYPE_GTYPE:
4171  *
4172  * The type for #GType.
4173  */
4174
4175
4176 /**
4177  * G_TYPE_HASH_TABLE:
4178  *
4179  * The #GType for a boxed type holding a #GHashTable reference.
4180  *
4181  * Since: 2.10
4182  */
4183
4184
4185 /**
4186  * G_TYPE_HAS_VALUE_TABLE:
4187  * @type: A #GType value.
4188  *
4189  * Checks if @type has a #GTypeValueTable.
4190  *
4191  * Returns: %TRUE on success.
4192  */
4193
4194
4195 /**
4196  * G_TYPE_INITIALLY_UNOWNED:
4197  *
4198  * The type for #GInitiallyUnowned.
4199  */
4200
4201
4202 /**
4203  * G_TYPE_INSTANCE_GET_CLASS:
4204  * @instance: Location of the #GTypeInstance structure.
4205  * @g_type: The #GType of the class to be returned.
4206  * @c_type: The C type of the class structure.
4207  *
4208  * Get the class structure of a given @instance, casted
4209  * to a specified ancestor type @g_type of the instance.
4210  *
4211  * Note that while calling a GInstanceInitFunc(), the class pointer gets
4212  * modified, so it might not always return the expected pointer.
4213  *
4214  * This macro should only be used in type implementations.
4215  *
4216  * Returns: a pointer to the class structure
4217  */
4218
4219
4220 /**
4221  * G_TYPE_INSTANCE_GET_INTERFACE:
4222  * @instance: Location of the #GTypeInstance structure.
4223  * @g_type: The #GType of the interface to be returned.
4224  * @c_type: The C type of the interface structure.
4225  *
4226  * Get the interface structure for interface @g_type of a given @instance.
4227  *
4228  * This macro should only be used in type implementations.
4229  *
4230  * Returns: a pointer to the interface structure
4231  */
4232
4233
4234 /**
4235  * G_TYPE_INSTANCE_GET_PRIVATE:
4236  * @instance: the instance of a type deriving from @private_type.
4237  * @g_type: the type identifying which private data to retrieve.
4238  * @c_type: The C type for the private structure.
4239  *
4240  * Gets the private structure for a particular type.
4241  * The private structure must have been registered in the
4242  * class_init function with g_type_class_add_private().
4243  *
4244  * This macro should only be used in type implementations.
4245  *
4246  * Since: 2.4
4247  * Returns: a pointer to the private data structure.
4248  */
4249
4250
4251 /**
4252  * G_TYPE_INT:
4253  *
4254  * The fundamental type corresponding to #gint.
4255  */
4256
4257
4258 /**
4259  * G_TYPE_INT64:
4260  *
4261  * The fundamental type corresponding to #gint64.
4262  */
4263
4264
4265 /**
4266  * G_TYPE_INTERFACE:
4267  *
4268  * The fundamental type from which all interfaces are derived.
4269  */
4270
4271
4272 /**
4273  * G_TYPE_INVALID:
4274  *
4275  * An invalid #GType used as error return value in some functions which return
4276  * a #GType.
4277  */
4278
4279
4280 /**
4281  * G_TYPE_IO_CHANNEL:
4282  *
4283  * The #GType for #GIOChannel.
4284  */
4285
4286
4287 /**
4288  * G_TYPE_IO_CONDITION:
4289  *
4290  * The #GType for #GIOCondition.
4291  */
4292
4293
4294 /**
4295  * G_TYPE_IS_ABSTRACT:
4296  * @type: A #GType value.
4297  *
4298  * Checks if @type is an abstract type.  An abstract type cannot be
4299  * instantiated and is normally used as an abstract base class for
4300  * derived classes.
4301  *
4302  * Returns: %TRUE on success.
4303  */
4304
4305
4306 /**
4307  * G_TYPE_IS_CLASSED:
4308  * @type: A #GType value.
4309  *
4310  * Checks if @type is a classed type.
4311  *
4312  * Returns: %TRUE on success.
4313  */
4314
4315
4316 /**
4317  * G_TYPE_IS_DEEP_DERIVABLE:
4318  * @type: A #GType value.
4319  *
4320  * Checks if @type is a deep derivable type.  A deep derivable type
4321  * can be used as the base class of a deep (multi-level) class hierarchy.
4322  *
4323  * Returns: %TRUE on success.
4324  */
4325
4326
4327 /**
4328  * G_TYPE_IS_DERIVABLE:
4329  * @type: A #GType value.
4330  *
4331  * Checks if @type is a derivable type.  A derivable type can
4332  * be used as the base class of a flat (single-level) class hierarchy.
4333  *
4334  * Returns: %TRUE on success.
4335  */
4336
4337
4338 /**
4339  * G_TYPE_IS_DERIVED:
4340  * @type: A #GType value.
4341  *
4342  * Checks if @type is derived (or in object-oriented terminology:
4343  * inherited) from another type (this holds true for all non-fundamental
4344  * types).
4345  *
4346  * Returns: %TRUE on success.
4347  */
4348
4349
4350 /**
4351  * G_TYPE_IS_ENUM:
4352  * @type: a #GType ID.
4353  *
4354  * Checks whether @type "is a" %G_TYPE_ENUM.
4355  *
4356  * Returns: %TRUE if @type "is a" %G_TYPE_ENUM.
4357  */
4358
4359
4360 /**
4361  * G_TYPE_IS_FLAGS:
4362  * @type: a #GType ID.
4363  *
4364  * Checks whether @type "is a" %G_TYPE_FLAGS.
4365  *
4366  * Returns: %TRUE if @type "is a" %G_TYPE_FLAGS.
4367  */
4368
4369
4370 /**
4371  * G_TYPE_IS_FUNDAMENTAL:
4372  * @type: A #GType value.
4373  *
4374  * Checks if @type is a fundamental type.
4375  *
4376  * Returns: %TRUE on success.
4377  */
4378
4379
4380 /**
4381  * G_TYPE_IS_INSTANTIATABLE:
4382  * @type: A #GType value.
4383  *
4384  * Checks if @type can be instantiated.  Instantiation is the
4385  * process of creating an instance (object) of this type.
4386  *
4387  * Returns: %TRUE on success.
4388  */
4389
4390
4391 /**
4392  * G_TYPE_IS_INTERFACE:
4393  * @type: A #GType value.
4394  *
4395  * Checks if @type is an interface type.
4396  * An interface type provides a pure API, the implementation
4397  * of which is provided by another type (which is then said to conform
4398  * to the interface).  GLib interfaces are somewhat analogous to Java
4399  * interfaces and C++ classes containing only pure virtual functions,
4400  * with the difference that GType interfaces are not derivable (but see
4401  * g_type_interface_add_prerequisite() for an alternative).
4402  *
4403  * Returns: %TRUE on success.
4404  */
4405
4406
4407 /**
4408  * G_TYPE_IS_OBJECT:
4409  * @type: Type id to check
4410  *
4411  * Check if the passed in type id is a %G_TYPE_OBJECT or derived from it.
4412  *
4413  * Returns: %FALSE or %TRUE, indicating whether @type is a %G_TYPE_OBJECT.
4414  */
4415
4416
4417 /**
4418  * G_TYPE_IS_PARAM:
4419  * @type: a #GType ID
4420  *
4421  * Checks whether @type "is a" %G_TYPE_PARAM.
4422  */
4423
4424
4425 /**
4426  * G_TYPE_IS_VALUE:
4427  * @type: A #GType value.
4428  *
4429  * Checks whether the passed in type ID can be used for g_value_init().
4430  * That is, this macro checks whether this type provides an implementation
4431  * of the #GTypeValueTable functions required for a type to create a #GValue of.
4432  *
4433  * Returns: Whether @type is suitable as a #GValue type.
4434  */
4435
4436
4437 /**
4438  * G_TYPE_IS_VALUE_ABSTRACT:
4439  * @type: A #GType value.
4440  *
4441  * Checks if @type is an abstract value type.  An abstract value type introduces
4442  * a value table, but can't be used for g_value_init() and is normally used as
4443  * an abstract base type for derived value types.
4444  *
4445  * Returns: %TRUE on success.
4446  */
4447
4448
4449 /**
4450  * G_TYPE_IS_VALUE_TYPE:
4451  * @type: A #GType value.
4452  *
4453  * Checks if @type is a value type and can be used with g_value_init().
4454  *
4455  * Returns: %TRUE on success.
4456  */
4457
4458
4459 /**
4460  * G_TYPE_KEY_FILE:
4461  *
4462  * The #GType for a boxed type holding a #GKeyFile.
4463  *
4464  * Since: 2.32
4465  */
4466
4467
4468 /**
4469  * G_TYPE_LONG:
4470  *
4471  * The fundamental type corresponding to #glong.
4472  */
4473
4474
4475 /**
4476  * G_TYPE_MAIN_CONTEXT:
4477  *
4478  * The #GType for a boxed type holding a #GMainContext.
4479  *
4480  * Since: 2.30
4481  */
4482
4483
4484 /**
4485  * G_TYPE_MAIN_LOOP:
4486  *
4487  * The #GType for a boxed type holding a #GMainLoop.
4488  *
4489  * Since: 2.30
4490  */
4491
4492
4493 /**
4494  * G_TYPE_MAKE_FUNDAMENTAL:
4495  * @x: the fundamental type number.
4496  *
4497  * Get the type ID for the fundamental type number @x.
4498  * Use g_type_fundamental_next() instead of this macro to create new fundamental
4499  * types.
4500  *
4501  * Returns: the GType
4502  */
4503
4504
4505 /**
4506  * G_TYPE_MATCH_INFO:
4507  *
4508  * The #GType for a boxed type holding a #GMatchInfo reference.
4509  *
4510  * Since: 2.30
4511  */
4512
4513
4514 /**
4515  * G_TYPE_NONE:
4516  *
4517  * A fundamental type which is used as a replacement for the C
4518  * <literal>void</literal> return type.
4519  */
4520
4521
4522 /**
4523  * G_TYPE_OBJECT:
4524  *
4525  * The fundamental type for #GObject.
4526  */
4527
4528
4529 /**
4530  * G_TYPE_PARAM:
4531  *
4532  * The fundamental type from which all #GParamSpec types are derived.
4533  */
4534
4535
4536 /**
4537  * G_TYPE_PARAM_BOOLEAN:
4538  *
4539  * The #GType of #GParamSpecBoolean.
4540  */
4541
4542
4543 /**
4544  * G_TYPE_PARAM_BOXED:
4545  *
4546  * The #GType of #GParamSpecBoxed.
4547  */
4548
4549
4550 /**
4551  * G_TYPE_PARAM_CHAR:
4552  *
4553  * The #GType of #GParamSpecChar.
4554  */
4555
4556
4557 /**
4558  * G_TYPE_PARAM_DOUBLE:
4559  *
4560  * The #GType of #GParamSpecDouble.
4561  */
4562
4563
4564 /**
4565  * G_TYPE_PARAM_ENUM:
4566  *
4567  * The #GType of #GParamSpecEnum.
4568  */
4569
4570
4571 /**
4572  * G_TYPE_PARAM_FLAGS:
4573  *
4574  * The #GType of #GParamSpecFlags.
4575  */
4576
4577
4578 /**
4579  * G_TYPE_PARAM_FLOAT:
4580  *
4581  * The #GType of #GParamSpecFloat.
4582  */
4583
4584
4585 /**
4586  * G_TYPE_PARAM_GTYPE:
4587  *
4588  * The #GType of #GParamSpecGType.
4589  *
4590  * Since: 2.10
4591  */
4592
4593
4594 /**
4595  * G_TYPE_PARAM_INT:
4596  *
4597  * The #GType of #GParamSpecInt.
4598  */
4599
4600
4601 /**
4602  * G_TYPE_PARAM_INT64:
4603  *
4604  * The #GType of #GParamSpecInt64.
4605  */
4606
4607
4608 /**
4609  * G_TYPE_PARAM_LONG:
4610  *
4611  * The #GType of #GParamSpecLong.
4612  */
4613
4614
4615 /**
4616  * G_TYPE_PARAM_OBJECT:
4617  *
4618  * The #GType of #GParamSpecObject.
4619  */
4620
4621
4622 /**
4623  * G_TYPE_PARAM_OVERRIDE:
4624  *
4625  * The #GType of #GParamSpecOverride.
4626  *
4627  * Since: 2.4
4628  */
4629
4630
4631 /**
4632  * G_TYPE_PARAM_PARAM:
4633  *
4634  * The #GType of #GParamSpecParam.
4635  */
4636
4637
4638 /**
4639  * G_TYPE_PARAM_POINTER:
4640  *
4641  * The #GType of #GParamSpecPointer.
4642  */
4643
4644
4645 /**
4646  * G_TYPE_PARAM_STRING:
4647  *
4648  * The #GType of #GParamSpecString.
4649  */
4650
4651
4652 /**
4653  * G_TYPE_PARAM_UCHAR:
4654  *
4655  * The #GType of #GParamSpecUChar.
4656  */
4657
4658
4659 /**
4660  * G_TYPE_PARAM_UINT:
4661  *
4662  * The #GType of #GParamSpecUInt.
4663  */
4664
4665
4666 /**
4667  * G_TYPE_PARAM_UINT64:
4668  *
4669  * The #GType of #GParamSpecUInt64.
4670  */
4671
4672
4673 /**
4674  * G_TYPE_PARAM_ULONG:
4675  *
4676  * The #GType of #GParamSpecULong.
4677  */
4678
4679
4680 /**
4681  * G_TYPE_PARAM_UNICHAR:
4682  *
4683  * The #GType of #GParamSpecUnichar.
4684  */
4685
4686
4687 /**
4688  * G_TYPE_PARAM_VALUE_ARRAY:
4689  *
4690  * The #GType of #GParamSpecValueArray.
4691  *
4692  * Deprecated: 2.32: Use #GArray instead of #GValueArray
4693  */
4694
4695
4696 /**
4697  * G_TYPE_PARAM_VARIANT:
4698  *
4699  * The #GType of #GParamSpecVariant.
4700  *
4701  * Since: 2.26
4702  */
4703
4704
4705 /**
4706  * G_TYPE_POINTER:
4707  *
4708  * The fundamental type corresponding to #gpointer.
4709  */
4710
4711
4712 /**
4713  * G_TYPE_PTR_ARRAY:
4714  *
4715  * The #GType for a boxed type holding a #GPtrArray reference.
4716  *
4717  * Since: 2.22
4718  */
4719
4720
4721 /**
4722  * G_TYPE_REGEX:
4723  *
4724  * The #GType for a boxed type holding a #GRegex reference.
4725  *
4726  * Since: 2.14
4727  */
4728
4729
4730 /**
4731  * G_TYPE_RESERVED_BSE_FIRST:
4732  *
4733  * First fundamental type number to create a new fundamental type id with
4734  * G_TYPE_MAKE_FUNDAMENTAL() reserved for BSE.
4735  */
4736
4737
4738 /**
4739  * G_TYPE_RESERVED_BSE_LAST:
4740  *
4741  * Last fundamental type number reserved for BSE.
4742  */
4743
4744
4745 /**
4746  * G_TYPE_RESERVED_GLIB_FIRST:
4747  *
4748  * First fundamental type number to create a new fundamental type id with
4749  * G_TYPE_MAKE_FUNDAMENTAL() reserved for GLib.
4750  */
4751
4752
4753 /**
4754  * G_TYPE_RESERVED_GLIB_LAST:
4755  *
4756  * Last fundamental type number reserved for GLib.
4757  */
4758
4759
4760 /**
4761  * G_TYPE_RESERVED_USER_FIRST:
4762  *
4763  * First available fundamental type number to create new fundamental
4764  * type id with G_TYPE_MAKE_FUNDAMENTAL().
4765  */
4766
4767
4768 /**
4769  * G_TYPE_SOURCE:
4770  *
4771  * The #GType for a boxed type holding a #GSource.
4772  *
4773  * Since: 2.30
4774  */
4775
4776
4777 /**
4778  * G_TYPE_STRING:
4779  *
4780  * The fundamental type corresponding to nul-terminated C strings.
4781  */
4782
4783
4784 /**
4785  * G_TYPE_STRV:
4786  *
4787  * The #GType for a boxed type holding a %NULL-terminated array of strings.
4788  *
4789  * The code fragments in the following example show the use of a property of
4790  * type #G_TYPE_STRV with g_object_class_install_property(), g_object_set()
4791  * and g_object_get().
4792  *
4793  * |[
4794  * g_object_class_install_property (object_class,
4795  * PROP_AUTHORS,
4796  * g_param_spec_boxed ("authors",
4797  * _("Authors"),
4798  * _("List of authors"),
4799  * G_TYPE_STRV,
4800  * G_PARAM_READWRITE));
4801  *
4802  * gchar *authors[] = { "Owen", "Tim", NULL };
4803  * g_object_set (obj, "authors", authors, NULL);
4804  *
4805  * gchar *writers[];
4806  * g_object_get (obj, "authors", &writers, NULL);
4807  * /&ast; do something with writers &ast;/
4808  * g_strfreev (writers);
4809  * ]|
4810  *
4811  * Since: 2.4
4812  */
4813
4814
4815 /**
4816  * G_TYPE_UCHAR:
4817  *
4818  * The fundamental type corresponding to #guchar.
4819  */
4820
4821
4822 /**
4823  * G_TYPE_UINT:
4824  *
4825  * The fundamental type corresponding to #guint.
4826  */
4827
4828
4829 /**
4830  * G_TYPE_UINT64:
4831  *
4832  * The fundamental type corresponding to #guint64.
4833  */
4834
4835
4836 /**
4837  * G_TYPE_ULONG:
4838  *
4839  * The fundamental type corresponding to #gulong.
4840  */
4841
4842
4843 /**
4844  * G_TYPE_VALUE:
4845  *
4846  * The type ID of the "GValue" type which is a boxed type,
4847  * used to pass around pointers to GValues.
4848  */
4849
4850
4851 /**
4852  * G_TYPE_VALUE_ARRAY:
4853  *
4854  * The type ID of the "GValueArray" type which is a boxed type,
4855  * used to pass around pointers to GValueArrays.
4856  *
4857  * Deprecated: 2.32: Use #GArray instead of #GValueArray
4858  */
4859
4860
4861 /**
4862  * G_TYPE_VARIANT:
4863  *
4864  * The fundamental type corresponding to #GVariant.
4865  *
4866  * All floating #GVariant instances passed through the #GType system are
4867  * consumed.
4868  *
4869  * Note that callbacks in closures, and signal handlers
4870  * for signals of return type %G_TYPE_VARIANT, must never return floating
4871  * variants.
4872  *
4873  * Note: GLib 2.24 did include a boxed type with this name. It was replaced
4874  * with this fundamental type in 2.26.
4875  *
4876  * Since: 2.26
4877  */
4878
4879
4880 /**
4881  * G_TYPE_VARIANT_BUILDER:
4882  *
4883  * The #GType for a boxed type holding a #GVariantBuilder.
4884  *
4885  * Since: 2.30
4886  */
4887
4888
4889 /**
4890  * G_TYPE_VARIANT_TYPE:
4891  *
4892  * The #GType for a boxed type holding a #GVariantType.
4893  *
4894  * Since: 2.24
4895  */
4896
4897
4898 /**
4899  * G_UNICHAR_MAX_DECOMPOSITION_LENGTH:
4900  *
4901  * The maximum length (in codepoints) of a compatibility or canonical
4902  * decomposition of a single Unicode character.
4903  *
4904  * This is as defined by Unicode 6.1.
4905  *
4906  * Since: 2.32
4907  */
4908
4909
4910 /**
4911  * G_UNICODE_COMBINING_MARK:
4912  *
4913  * Older name for %G_UNICODE_SPACING_MARK.
4914  *
4915  * Deprecated: 2.30: Use %G_UNICODE_SPACING_MARK.
4916  */
4917
4918
4919 /**
4920  * G_URI_RESERVED_CHARS_ALLOWED_IN_PATH:
4921  *
4922  * Allowed characters in a path. Includes "!$&'()*+,;=:@/".
4923  */
4924
4925
4926 /**
4927  * G_URI_RESERVED_CHARS_ALLOWED_IN_PATH_ELEMENT:
4928  *
4929  * Allowed characters in path elements. Includes "!$&'()*+,;=:@".
4930  */
4931
4932
4933 /**
4934  * G_URI_RESERVED_CHARS_ALLOWED_IN_USERINFO:
4935  *
4936  * Allowed characters in userinfo as defined in RFC 3986. Includes "!$&'()*+,;=:".
4937  */
4938
4939
4940 /**
4941  * G_URI_RESERVED_CHARS_GENERIC_DELIMITERS:
4942  *
4943  * Generic delimiters characters as defined in RFC 3986. Includes ":/?#[]@".
4944  */
4945
4946
4947 /**
4948  * G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS:
4949  *
4950  * Subcomponent delimiter characters as defined in RFC 3986. Includes "!$&'()*+,;=".
4951  */
4952
4953
4954 /**
4955  * G_VALUE_COLLECT:
4956  * @value: a #GValue return location. @value is supposed to be initialized according to the value type to be collected
4957  * @var_args: the va_list variable; it may be evaluated multiple times
4958  * @flags: flags which are passed on to the collect_value() function of the #GTypeValueTable of @value.
4959  * @__error: a #gchar** variable that will be modified to hold a g_new() allocated error messages if something fails
4960  *
4961  * Collects a variable argument value from a va_list. We have to
4962  * implement the varargs collection as a macro, because on some systems
4963  * va_list variables cannot be passed by reference.
4964  *
4965  * Note: If you are creating the @value argument just before calling this macro,
4966  * you should use the #G_VALUE_COLLECT_INIT variant and pass the unitialized
4967  * #GValue. That variant is faster than #G_VALUE_COLLECT.
4968  */
4969
4970
4971 /**
4972  * G_VALUE_COLLECT_FORMAT_MAX_LENGTH:
4973  *
4974  * The maximal number of #GTypeCValue<!-- -->s which can be collected for a
4975  * single #GValue.
4976  */
4977
4978
4979 /**
4980  * G_VALUE_COLLECT_INIT:
4981  * @value: a #GValue return location. @value must contain only 0 bytes.
4982  * @_value_type: the #GType to use for @value.
4983  * @var_args: the va_list variable; it may be evaluated multiple times
4984  * @flags: flags which are passed on to the collect_value() function of the #GTypeValueTable of @value.
4985  * @__error: a #gchar** variable that will be modified to hold a g_new() allocated error messages if something fails
4986  *
4987  * Collects a variable argument value from a va_list. We have to
4988  * implement the varargs collection as a macro, because on some systems
4989  * va_list variables cannot be passed by reference.
4990  *
4991  * Since: 2.24
4992  */
4993
4994
4995 /**
4996  * G_VALUE_HOLDS:
4997  * @value: A #GValue structure.
4998  * @type: A #GType value.
4999  *
5000  * Checks if @value holds (or contains) a value of @type.
5001  * This macro will also check for @value != %NULL and issue a
5002  * warning if the check fails.
5003  *
5004  * Returns: %TRUE if @value holds the @type.
5005  */
5006
5007
5008 /**
5009  * G_VALUE_HOLDS_BOOLEAN:
5010  * @value: a valid #GValue structure
5011  *
5012  * Checks whether the given #GValue can hold values of type %G_TYPE_BOOLEAN.
5013  *
5014  * Returns: %TRUE on success.
5015  */
5016
5017
5018 /**
5019  * G_VALUE_HOLDS_BOXED:
5020  * @value: a valid #GValue structure
5021  *
5022  * Checks whether the given #GValue can hold values derived
5023  * from type %G_TYPE_BOXED.
5024  *
5025  * Returns: %TRUE on success.
5026  */
5027
5028
5029 /**
5030  * G_VALUE_HOLDS_CHAR:
5031  * @value: a valid #GValue structure
5032  *
5033  * Checks whether the given #GValue can hold values of type %G_TYPE_CHAR.
5034  *
5035  * Returns: %TRUE on success.
5036  */
5037
5038
5039 /**
5040  * G_VALUE_HOLDS_DOUBLE:
5041  * @value: a valid #GValue structure
5042  *
5043  * Checks whether the given #GValue can hold values of type %G_TYPE_DOUBLE.
5044  *
5045  * Returns: %TRUE on success.
5046  */
5047
5048
5049 /**
5050  * G_VALUE_HOLDS_ENUM:
5051  * @value: a valid #GValue structure
5052  *
5053  * Checks whether the given #GValue can hold values derived from type %G_TYPE_ENUM.
5054  *
5055  * Returns: %TRUE on success.
5056  */
5057
5058
5059 /**
5060  * G_VALUE_HOLDS_FLAGS:
5061  * @value: a valid #GValue structure
5062  *
5063  * Checks whether the given #GValue can hold values derived from type %G_TYPE_FLAGS.
5064  *
5065  * Returns: %TRUE on success.
5066  */
5067
5068
5069 /**
5070  * G_VALUE_HOLDS_FLOAT:
5071  * @value: a valid #GValue structure
5072  *
5073  * Checks whether the given #GValue can hold values of type %G_TYPE_FLOAT.
5074  *
5075  * Returns: %TRUE on success.
5076  */
5077
5078
5079 /**
5080  * G_VALUE_HOLDS_GTYPE:
5081  * @value: a valid #GValue structure
5082  *
5083  * Checks whether the given #GValue can hold values of type %G_TYPE_GTYPE.
5084  *
5085  * Since: 2.12
5086  * Returns: %TRUE on success.
5087  */
5088
5089
5090 /**
5091  * G_VALUE_HOLDS_INT:
5092  * @value: a valid #GValue structure
5093  *
5094  * Checks whether the given #GValue can hold values of type %G_TYPE_INT.
5095  *
5096  * Returns: %TRUE on success.
5097  */
5098
5099
5100 /**
5101  * G_VALUE_HOLDS_INT64:
5102  * @value: a valid #GValue structure
5103  *
5104  * Checks whether the given #GValue can hold values of type %G_TYPE_INT64.
5105  *
5106  * Returns: %TRUE on success.
5107  */
5108
5109
5110 /**
5111  * G_VALUE_HOLDS_LONG:
5112  * @value: a valid #GValue structure
5113  *
5114  * Checks whether the given #GValue can hold values of type %G_TYPE_LONG.
5115  *
5116  * Returns: %TRUE on success.
5117  */
5118
5119
5120 /**
5121  * G_VALUE_HOLDS_OBJECT:
5122  * @value: a valid #GValue structure
5123  *
5124  * Checks whether the given #GValue can hold values derived from type %G_TYPE_OBJECT.
5125  *
5126  * Returns: %TRUE on success.
5127  */
5128
5129
5130 /**
5131  * G_VALUE_HOLDS_PARAM:
5132  * @value: a valid #GValue structure
5133  *
5134  * Checks whether the given #GValue can hold values derived from type %G_TYPE_PARAM.
5135  *
5136  * Returns: %TRUE on success.
5137  */
5138
5139
5140 /**
5141  * G_VALUE_HOLDS_POINTER:
5142  * @value: a valid #GValue structure
5143  *
5144  * Checks whether the given #GValue can hold values of type %G_TYPE_POINTER.
5145  *
5146  * Returns: %TRUE on success.
5147  */
5148
5149
5150 /**
5151  * G_VALUE_HOLDS_STRING:
5152  * @value: a valid #GValue structure
5153  *
5154  * Checks whether the given #GValue can hold values of type %G_TYPE_STRING.
5155  *
5156  * Returns: %TRUE on success.
5157  */
5158
5159
5160 /**
5161  * G_VALUE_HOLDS_UCHAR:
5162  * @value: a valid #GValue structure
5163  *
5164  * Checks whether the given #GValue can hold values of type %G_TYPE_UCHAR.
5165  *
5166  * Returns: %TRUE on success.
5167  */
5168
5169
5170 /**
5171  * G_VALUE_HOLDS_UINT:
5172  * @value: a valid #GValue structure
5173  *
5174  * Checks whether the given #GValue can hold values of type %G_TYPE_UINT.
5175  *
5176  * Returns: %TRUE on success.
5177  */
5178
5179
5180 /**
5181  * G_VALUE_HOLDS_UINT64:
5182  * @value: a valid #GValue structure
5183  *
5184  * Checks whether the given #GValue can hold values of type %G_TYPE_UINT64.
5185  *
5186  * Returns: %TRUE on success.
5187  */
5188
5189
5190 /**
5191  * G_VALUE_HOLDS_ULONG:
5192  * @value: a valid #GValue structure
5193  *
5194  * Checks whether the given #GValue can hold values of type %G_TYPE_ULONG.
5195  *
5196  * Returns: %TRUE on success.
5197  */
5198
5199
5200 /**
5201  * G_VALUE_HOLDS_VARIANT:
5202  * @value: a valid #GValue structure
5203  *
5204  * Checks whether the given #GValue can hold values of type %G_TYPE_VARIANT.
5205  *
5206  * Returns: %TRUE on success.
5207  * Since: 2.26
5208  */
5209
5210
5211 /**
5212  * G_VALUE_INIT:
5213  *
5214  * A #GValue must be initialized before it can be used.
5215  * This macro can be used as initializer instead of an explicit
5216  * <literal>{ 0 }</literal> when declaring a variable,
5217  * but it cannot be assigned to a variable.
5218  *
5219  * |[
5220  * GValue value = G_VALUE_INIT;
5221  * ]|
5222  *
5223  * Since: 2.30
5224  */
5225
5226
5227 /**
5228  * G_VALUE_LCOPY:
5229  * @value: a #GValue return location. @value is supposed to be initialized according to the value type to be collected
5230  * @var_args: the va_list variable; it may be evaluated multiple times
5231  * @flags: flags which are passed on to the lcopy_value() function of the #GTypeValueTable of @value.
5232  * @__error: a #gchar** variable that will be modified to hold a g_new() allocated error messages if something fails
5233  *
5234  * Collects a value's variable argument locations from a va_list. Usage is
5235  * analogous to G_VALUE_COLLECT().
5236  */
5237
5238
5239 /**
5240  * G_VALUE_NOCOPY_CONTENTS:
5241  *
5242  * If passed to G_VALUE_COLLECT(), allocated data won't be copied
5243  * but used verbatim. This does not affect ref-counted types like
5244  * objects.
5245  */
5246
5247
5248 /**
5249  * G_VALUE_TYPE:
5250  * @value: A #GValue structure.
5251  *
5252  * Get the type identifier of @value.
5253  *
5254  * Returns: the #GType.
5255  */
5256
5257
5258 /**
5259  * G_VALUE_TYPE_NAME:
5260  * @value: A #GValue structure.
5261  *
5262  * Gets the the type name of @value.
5263  *
5264  * Returns: the type name.
5265  */
5266
5267
5268 /**
5269  * G_VARIANT_TYPE:
5270  * @type_string: a well-formed #GVariantType type string
5271  *
5272  * Converts a string to a const #GVariantType.  Depending on the
5273  * current debugging level, this function may perform a runtime check
5274  * to ensure that @string is a valid GVariant type string.
5275  *
5276  * It is always a programmer error to use this macro with an invalid
5277  * type string. If in doubt, use g_variant_type_string_is_valid() to
5278  * check if the string is valid.
5279  *
5280  * Since 2.24
5281  */
5282
5283
5284 /**
5285  * G_VARIANT_TYPE_ANY:
5286  *
5287  * An indefinite type that is a supertype of every type (including
5288  * itself).
5289  */
5290
5291
5292 /**
5293  * G_VARIANT_TYPE_ARRAY:
5294  *
5295  * An indefinite type that is a supertype of every array type.
5296  */
5297
5298
5299 /**
5300  * G_VARIANT_TYPE_BASIC:
5301  *
5302  * An indefinite type that is a supertype of every basic (ie:
5303  * non-container) type.
5304  */
5305
5306
5307 /**
5308  * G_VARIANT_TYPE_BOOLEAN:
5309  *
5310  * The type of a value that can be either %TRUE or %FALSE.
5311  */
5312
5313
5314 /**
5315  * G_VARIANT_TYPE_BYTE:
5316  *
5317  * The type of an integer value that can range from 0 to 255.
5318  */
5319
5320
5321 /**
5322  * G_VARIANT_TYPE_BYTESTRING:
5323  *
5324  * The type of an array of bytes.  This type is commonly used to pass
5325  * around strings that may not be valid utf8.  In that case, the
5326  * convention is that the nul terminator character should be included as
5327  * the last character in the array.
5328  */
5329
5330
5331 /**
5332  * G_VARIANT_TYPE_BYTESTRING_ARRAY:
5333  *
5334  * The type of an array of byte strings (an array of arrays of bytes).
5335  */
5336
5337
5338 /**
5339  * G_VARIANT_TYPE_DICTIONARY:
5340  *
5341  * An indefinite type that is a supertype of every dictionary type --
5342  * that is, any array type that has an element type equal to any
5343  * dictionary entry type.
5344  */
5345
5346
5347 /**
5348  * G_VARIANT_TYPE_DICT_ENTRY:
5349  *
5350  * An indefinite type that is a supertype of every dictionary entry
5351  * type.
5352  */
5353
5354
5355 /**
5356  * G_VARIANT_TYPE_DOUBLE:
5357  *
5358  * The type of a double precision IEEE754 floating point number.
5359  * These guys go up to about 1.80e308 (plus and minus) but miss out on
5360  * some numbers in between.  In any case, that's far greater than the
5361  * estimated number of fundamental particles in the observable
5362  * universe.
5363  */
5364
5365
5366 /**
5367  * G_VARIANT_TYPE_HANDLE:
5368  *
5369  * The type of a 32bit signed integer value, that by convention, is used
5370  * as an index into an array of file descriptors that are sent alongside
5371  * a D-Bus message.
5372  *
5373  * If you are not interacting with D-Bus, then there is no reason to make
5374  * use of this type.
5375  */
5376
5377
5378 /**
5379  * G_VARIANT_TYPE_INT16:
5380  *
5381  * The type of an integer value that can range from -32768 to 32767.
5382  */
5383
5384
5385 /**
5386  * G_VARIANT_TYPE_INT32:
5387  *
5388  * The type of an integer value that can range from -2147483648 to
5389  * 2147483647.
5390  */
5391
5392
5393 /**
5394  * G_VARIANT_TYPE_INT64:
5395  *
5396  * The type of an integer value that can range from
5397  * -9223372036854775808 to 9223372036854775807.
5398  */
5399
5400
5401 /**
5402  * G_VARIANT_TYPE_MAYBE:
5403  *
5404  * An indefinite type that is a supertype of every maybe type.
5405  */
5406
5407
5408 /**
5409  * G_VARIANT_TYPE_OBJECT_PATH:
5410  *
5411  * The type of a D-Bus object reference.  These are strings of a
5412  * specific format used to identify objects at a given destination on
5413  * the bus.
5414  *
5415  * If you are not interacting with D-Bus, then there is no reason to make
5416  * use of this type.  If you are, then the D-Bus specification contains a
5417  * precise description of valid object paths.
5418  */
5419
5420
5421 /**
5422  * G_VARIANT_TYPE_OBJECT_PATH_ARRAY:
5423  *
5424  * The type of an array of object paths.
5425  */
5426
5427
5428 /**
5429  * G_VARIANT_TYPE_SIGNATURE:
5430  *
5431  * The type of a D-Bus type signature.  These are strings of a specific
5432  * format used as type signatures for D-Bus methods and messages.
5433  *
5434  * If you are not interacting with D-Bus, then there is no reason to make
5435  * use of this type.  If you are, then the D-Bus specification contains a
5436  * precise description of valid signature strings.
5437  */
5438
5439
5440 /**
5441  * G_VARIANT_TYPE_STRING:
5442  *
5443  * The type of a string.  "" is a string.  %NULL is not a string.
5444  */
5445
5446
5447 /**
5448  * G_VARIANT_TYPE_STRING_ARRAY:
5449  *
5450  * The type of an array of strings.
5451  */
5452
5453
5454 /**
5455  * G_VARIANT_TYPE_TUPLE:
5456  *
5457  * An indefinite type that is a supertype of every tuple type,
5458  * regardless of the number of items in the tuple.
5459  */
5460
5461
5462 /**
5463  * G_VARIANT_TYPE_UINT16:
5464  *
5465  * The type of an integer value that can range from 0 to 65535.
5466  * There were about this many people living in Toronto in the 1870s.
5467  */
5468
5469
5470 /**
5471  * G_VARIANT_TYPE_UINT32:
5472  *
5473  * The type of an integer value that can range from 0 to 4294967295.
5474  * That's one number for everyone who was around in the late 1970s.
5475  */
5476
5477
5478 /**
5479  * G_VARIANT_TYPE_UINT64:
5480  *
5481  * The type of an integer value that can range from 0 to
5482  * 18446744073709551616.  That's a really big number, but a Rubik's
5483  * cube can have a bit more than twice as many possible positions.
5484  */
5485
5486
5487 /**
5488  * G_VARIANT_TYPE_UNIT:
5489  *
5490  * The empty tuple type.  Has only one instance.  Known also as "triv"
5491  * or "void".
5492  */
5493
5494
5495 /**
5496  * G_VARIANT_TYPE_VARDICT:
5497  *
5498  * The type of a dictionary mapping strings to variants (the ubiquitous
5499  * "a{sv}" type).
5500  *
5501  * Since: 2.30
5502  */
5503
5504
5505 /**
5506  * G_VARIANT_TYPE_VARIANT:
5507  *
5508  * The type of a box that contains any other value (including another
5509  * variant).
5510  */
5511
5512
5513 /**
5514  * SECTION:enumerations_flags
5515  * @short_description: Enumeration and flags types
5516  * @title: Enumeration and Flag Types g_param_spec_flags()
5517  *
5518  * The GLib type system provides fundamental types for enumeration and
5519  * flags types. (Flags types are like enumerations, but allow their
5520  * values to be combined by bitwise or). A registered enumeration or
5521  * flags type associates a name and a nickname with each allowed
5522  * value, and the methods g_enum_get_value_by_name(),
5523  * g_enum_get_value_by_nick(), g_flags_get_value_by_name() and
5524  * g_flags_get_value_by_nick() can look up values by their name or
5525  * nickname.  When an enumeration or flags type is registered with the
5526  * GLib type system, it can be used as value type for object
5527  * properties, using g_param_spec_enum() or g_param_spec_flags().
5528  *
5529  * GObject ships with a utility called <link
5530  * linkend="glib-mkenums">glib-mkenums</link> that can construct
5531  * suitable type registration functions from C enumeration
5532  * definitions.
5533  */
5534
5535
5536 /**
5537  * SECTION:gbinding
5538  * @Title: GBinding
5539  * @Short_Description: Bind two object properties
5540  *
5541  * #GBinding is the representation of a binding between a property on a
5542  * #GObject instance (or source) and another property on another #GObject
5543  * instance (or target). Whenever the source property changes, the same
5544  * value is applied to the target property; for instance, the following
5545  * binding:
5546  *
5547  * |[
5548  * g_object_bind_property (object1, "property-a",
5549  * object2, "property-b",
5550  * G_BINDING_DEFAULT);
5551  * ]|
5552  *
5553  * will cause <emphasis>object2:property-b</emphasis> to be updated every
5554  * time g_object_set() or the specific accessor changes the value of
5555  * <emphasis>object1:property-a</emphasis>.
5556  *
5557  * It is possible to create a bidirectional binding between two properties
5558  * of two #GObject instances, so that if either property changes, the
5559  * other is updated as well, for instance:
5560  *
5561  * |[
5562  * g_object_bind_property (object1, "property-a",
5563  * object2, "property-b",
5564  * G_BINDING_BIDIRECTIONAL);
5565  * ]|
5566  *
5567  * will keep the two properties in sync.
5568  *
5569  * It is also possible to set a custom transformation function (in both
5570  * directions, in case of a bidirectional binding) to apply a custom
5571  * transformation from the source value to the target value before
5572  * applying it; for instance, the following binding:
5573  *
5574  * |[
5575  * g_object_bind_property_full (adjustment1, "value",
5576  * adjustment2, "value",
5577  * G_BINDING_BIDIRECTIONAL,
5578  * celsius_to_fahrenheit,
5579  * fahrenheit_to_celsius,
5580  * NULL, NULL);
5581  * ]|
5582  *
5583  * will keep the <emphasis>value</emphasis> property of the two adjustments
5584  * in sync; the <function>celsius_to_fahrenheit</function> function will be
5585  * called whenever the <emphasis>adjustment1:value</emphasis> property changes
5586  * and will transform the current value of the property before applying it
5587  * to the <emphasis>adjustment2:value</emphasis> property; vice versa, the
5588  * <function>fahrenheit_to_celsius</function> function will be called whenever
5589  * the <emphasis>adjustment2:value</emphasis> property changes, and will
5590  * transform the current value of the property before applying it to the
5591  * <emphasis>adjustment1:value</emphasis>.
5592  *
5593  * Note that #GBinding does not resolve cycles by itself; a cycle like
5594  *
5595  * |[
5596  * object1:propertyA -> object2:propertyB
5597  * object2:propertyB -> object3:propertyC
5598  * object3:propertyC -> object1:propertyA
5599  * ]|
5600  *
5601  * might lead to an infinite loop. The loop, in this particular case,
5602  * can be avoided if the objects emit the #GObject::notify signal only
5603  * if the value has effectively been changed. A binding is implemented
5604  * using the #GObject::notify signal, so it is susceptible to all the
5605  * various ways of blocking a signal emission, like g_signal_stop_emission()
5606  * or g_signal_handler_block().
5607  *
5608  * A binding will be severed, and the resources it allocates freed, whenever
5609  * either one of the #GObject instances it refers to are finalized, or when
5610  * the #GBinding instance loses its last reference.
5611  *
5612  * #GBinding is available since GObject 2.26
5613  */
5614
5615
5616 /**
5617  * SECTION:gboxed
5618  * @short_description: A mechanism to wrap opaque C structures registered by the type system
5619  * @see_also: #GParamSpecBoxed, g_param_spec_boxed()
5620  * @title: Boxed Types
5621  *
5622  * GBoxed is a generic wrapper mechanism for arbitrary C structures. The only
5623  * thing the type system needs to know about the structures is how to copy and
5624  * free them, beyond that they are treated as opaque chunks of memory.
5625  *
5626  * Boxed types are useful for simple value-holder structures like rectangles or
5627  * points. They can also be used for wrapping structures defined in non-GObject
5628  * based libraries.
5629  */
5630
5631
5632 /**
5633  * SECTION:gclosure
5634  * @short_description: Functions as first-class objects
5635  * @title: Closures
5636  *
5637  * A #GClosure represents a callback supplied by the programmer. It
5638  * will generally comprise a function of some kind and a marshaller
5639  * used to call it. It is the reponsibility of the marshaller to
5640  * convert the arguments for the invocation from #GValue<!-- -->s into
5641  * a suitable form, perform the callback on the converted arguments,
5642  * and transform the return value back into a #GValue.
5643  *
5644  * In the case of C programs, a closure usually just holds a pointer
5645  * to a function and maybe a data argument, and the marshaller
5646  * converts between #GValue<!-- --> and native C types. The GObject
5647  * library provides the #GCClosure type for this purpose. Bindings for
5648  * other languages need marshallers which convert between #GValue<!--
5649  * -->s and suitable representations in the runtime of the language in
5650  * order to use functions written in that languages as callbacks.
5651  *
5652  * Within GObject, closures play an important role in the
5653  * implementation of signals. When a signal is registered, the
5654  * @c_marshaller argument to g_signal_new() specifies the default C
5655  * marshaller for any closure which is connected to this
5656  * signal. GObject provides a number of C marshallers for this
5657  * purpose, see the g_cclosure_marshal_*() functions. Additional C
5658  * marshallers can be generated with the <link
5659  * linkend="glib-genmarshal">glib-genmarshal</link> utility.  Closures
5660  * can be explicitly connected to signals with
5661  * g_signal_connect_closure(), but it usually more convenient to let
5662  * GObject create a closure automatically by using one of the
5663  * g_signal_connect_*() functions which take a callback function/user
5664  * data pair.
5665  *
5666  * Using closures has a number of important advantages over a simple
5667  * callback function/data pointer combination:
5668  * <itemizedlist>
5669  * <listitem><para>
5670  * Closures allow the callee to get the types of the callback parameters,
5671  * which means that language bindings don't have to write individual glue
5672  * for each callback type.
5673  * </para></listitem>
5674  * <listitem><para>
5675  * The reference counting of #GClosure makes it easy to handle reentrancy
5676  * right; if a callback is removed while it is being invoked, the closure
5677  * and its parameters won't be freed until the invocation finishes.
5678  * </para></listitem>
5679  * <listitem><para>
5680  * g_closure_invalidate() and invalidation notifiers allow callbacks to be
5681  * automatically removed when the objects they point to go away.
5682  * </para></listitem>
5683  * </itemizedlist>
5684  */
5685
5686
5687 /**
5688  * SECTION:generic_values
5689  * @short_description: A polymorphic type that can hold values of any other type
5690  * @see_also: The fundamental types which all support #GValue operations and thus can be used as a type initializer for g_value_init() are defined by a separate interface.  See the <link linkend="gobject-Standard-Parameter-and-Value-Types">Standard Values API</link> for details.
5691  * @title: Generic values
5692  *
5693  * The #GValue structure is basically a variable container that consists
5694  * of a type identifier and a specific value of that type.
5695  * The type identifier within a #GValue structure always determines the
5696  * type of the associated value.
5697  * To create a undefined #GValue structure, simply create a zero-filled
5698  * #GValue structure. To initialize the #GValue, use the g_value_init()
5699  * function. A #GValue cannot be used until it is initialized.
5700  * The basic type operations (such as freeing and copying) are determined
5701  * by the #GTypeValueTable associated with the type ID stored in the #GValue.
5702  * Other #GValue operations (such as converting values between types) are
5703  * provided by this interface.
5704  *
5705  * The code in the example program below demonstrates #GValue's
5706  * features.
5707  *
5708  * |[
5709  * #include &lt;glib-object.h&gt;
5710  *
5711  * static void
5712  * int2string (const GValue *src_value,
5713  * GValue       *dest_value)
5714  * {
5715  * if (g_value_get_int (src_value) == 42)
5716  * g_value_set_static_string (dest_value, "An important number");
5717  * else
5718  * g_value_set_static_string (dest_value, "What's that?");
5719  * }
5720  *
5721  * int
5722  * main (int   argc,
5723  * char *argv[])
5724  * {
5725  * /&ast; GValues must be initialized &ast;/
5726  * GValue a = G_VALUE_INIT;
5727  * GValue b = G_VALUE_INIT;
5728  * const gchar *message;
5729  *
5730  * g_type_init ();
5731  *
5732  * /&ast; The GValue starts empty &ast;/
5733  * g_assert (!G_VALUE_HOLDS_STRING (&amp;a));
5734  *
5735  * /&ast; Put a string in it &ast;/
5736  * g_value_init (&amp;a, G_TYPE_STRING);
5737  * g_assert (G_VALUE_HOLDS_STRING (&amp;a));
5738  * g_value_set_static_string (&amp;a, "Hello, world!");
5739  * g_printf ("%s\n", g_value_get_string (&amp;a));
5740  *
5741  * /&ast; Reset it to its pristine state &ast;/
5742  * g_value_unset (&amp;a);
5743  *
5744  * /&ast; It can then be reused for another type &ast;/
5745  * g_value_init (&amp;a, G_TYPE_INT);
5746  * g_value_set_int (&amp;a, 42);
5747  *
5748  * /&ast; Attempt to transform it into a GValue of type STRING &ast;/
5749  * g_value_init (&amp;b, G_TYPE_STRING);
5750  *
5751  * /&ast; An INT is transformable to a STRING &ast;/
5752  * g_assert (g_value_type_transformable (G_TYPE_INT, G_TYPE_STRING));
5753  *
5754  * g_value_transform (&amp;a, &amp;b);
5755  * g_printf ("%s\n", g_value_get_string (&amp;b));
5756  *
5757  * /&ast; Attempt to transform it again using a custom transform function &ast;/
5758  * g_value_register_transform_func (G_TYPE_INT, G_TYPE_STRING, int2string);
5759  * g_value_transform (&amp;a, &amp;b);
5760  * g_printf ("%s\n", g_value_get_string (&amp;b));
5761  * return 0;
5762  * }
5763  * ]|
5764  */
5765
5766
5767 /**
5768  * SECTION:gparamspec
5769  * @short_description: Metadata for parameter specifications
5770  * @see_also: g_object_class_install_property(), g_object_set(), g_object_get(), g_object_set_property(), g_object_get_property(), g_value_register_transform_func()
5771  * @title: GParamSpec
5772  *
5773  * #GParamSpec is an object structure that encapsulates the metadata
5774  * required to specify parameters, such as e.g. #GObject properties.
5775  *
5776  * <para id="canonical-parameter-name">
5777  * Parameter names need to start with a letter (a-z or A-Z). Subsequent
5778  * characters can be letters, numbers or a '-'.
5779  * All other characters are replaced by a '-' during construction.
5780  * The result of this replacement is called the canonical name of the
5781  * parameter.
5782  * </para>
5783  */
5784
5785
5786 /**
5787  * SECTION:gtype
5788  * @short_description: The GLib Runtime type identification and management system
5789  *
5790  * The GType API is the foundation of the GObject system.  It provides the
5791  * facilities for registering and managing all fundamental data types,
5792  * user-defined object and interface types.  Before using any GType
5793  * or GObject functions, g_type_init() must be called to initialize the
5794  * type system.
5795  *
5796  * For type creation and registration purposes, all types fall into one of
5797  * two categories: static or dynamic.  Static types are never loaded or
5798  * unloaded at run-time as dynamic types may be.  Static types are created
5799  * with g_type_register_static() that gets type specific information passed
5800  * in via a #GTypeInfo structure.
5801  * Dynamic types are created with g_type_register_dynamic() which takes a
5802  * #GTypePlugin structure instead. The remaining type information (the
5803  * #GTypeInfo structure) is retrieved during runtime through #GTypePlugin
5804  * and the g_type_plugin_*() API.
5805  * These registration functions are usually called only once from a
5806  * function whose only purpose is to return the type identifier for a
5807  * specific class.  Once the type (or class or interface) is registered,
5808  * it may be instantiated, inherited, or implemented depending on exactly
5809  * what sort of type it is.
5810  * There is also a third registration function for registering fundamental
5811  * types called g_type_register_fundamental() which requires both a #GTypeInfo
5812  * structure and a #GTypeFundamentalInfo structure but it is seldom used
5813  * since most fundamental types are predefined rather than user-defined.
5814  *
5815  * Type instance and class structs are limited to a total of 64 KiB,
5816  * including all parent types. Similarly, type instances' private data
5817  * (as created by g_type_class_add_private()) are limited to a total of
5818  * 64 KiB. If a type instance needs a large static buffer, allocate it
5819  * separately (typically by using #GArray or #GPtrArray) and put a pointer
5820  * to the buffer in the structure.
5821  *
5822  * A final word about type names.
5823  * Such an identifier needs to be at least three characters long. There is no
5824  * upper length limit. The first character needs to be a letter (a-z or A-Z)
5825  * or an underscore '_'. Subsequent characters can be letters, numbers or
5826  * any of '-_+'.
5827  */
5828
5829
5830 /**
5831  * SECTION:gtypemodule
5832  * @short_description: Type loading modules <varlistentry> <term>#GTypePlugin</term> <listitem><para>The abstract type loader interface.</para></listitem> </varlistentry> <varlistentry> <term>#GModule</term> <listitem><para>Portable mechanism for dynamically loaded modules.</para></listitem> </varlistentry> </variablelist>
5833  * @title: GTypeModule
5834  *
5835  * #GTypeModule provides a simple implementation of the #GTypePlugin
5836  * interface. The model of #GTypeModule is a dynamically loaded module
5837  * which implements some number of types and interface
5838  * implementations. When the module is loaded, it registers its types
5839  * and interfaces using g_type_module_register_type() and
5840  * g_type_module_add_interface().  As long as any instances of these
5841  * types and interface implementations are in use, the module is kept
5842  * loaded. When the types and interfaces are gone, the module may be
5843  * unloaded. If the types and interfaces become used again, the module
5844  * will be reloaded. Note that the last unref cannot happen in module
5845  * code, since that would lead to the caller's code being unloaded before
5846  * g_object_unref() returns to it.
5847  *
5848  * Keeping track of whether the module should be loaded or not is done by
5849  * using a use count - it starts at zero, and whenever it is greater than
5850  * zero, the module is loaded. The use count is maintained internally by
5851  * the type system, but also can be explicitly controlled by
5852  * g_type_module_use() and g_type_module_unuse(). Typically, when loading
5853  * a module for the first type, g_type_module_use() will be used to load
5854  * it so that it can initialize its types. At some later point, when the
5855  * module no longer needs to be loaded except for the type
5856  * implementations it contains, g_type_module_unuse() is called.
5857  *
5858  * #GTypeModule does not actually provide any implementation of module
5859  * loading and unloading. To create a particular module type you must
5860  * derive from #GTypeModule and implement the load and unload functions
5861  * in #GTypeModuleClass.
5862  */
5863
5864
5865 /**
5866  * SECTION:gtypeplugin
5867  * @short_description: An interface for dynamically loadable types
5868  * @see_also: #GTypeModule and g_type_register_dynamic().
5869  * @title: GTypePlugin
5870  *
5871  * The GObject type system supports dynamic loading of types. The
5872  * #GTypePlugin interface is used to handle the lifecycle of
5873  * dynamically loaded types.  It goes as follows:
5874  *
5875  * <orderedlist>
5876  * <listitem><para>
5877  * The type is initially introduced (usually upon loading the module
5878  * the first time, or by your main application that knows what modules
5879  * introduces what types), like this:
5880  * |[
5881  * new_type_id = g_type_register_dynamic (parent_type_id,
5882  * "TypeName",
5883  * new_type_plugin,
5884  * type_flags);
5885  * ]|
5886  * where <literal>new_type_plugin</literal> is an implementation of the
5887  * #GTypePlugin interface.
5888  * </para></listitem>
5889  * <listitem><para>
5890  * The type's implementation is referenced, e.g. through
5891  * g_type_class_ref() or through g_type_create_instance() (this is
5892  * being called by g_object_new()) or through one of the above done on
5893  * a type derived from <literal>new_type_id</literal>.
5894  * </para></listitem>
5895  * <listitem><para>
5896  * This causes the type system to load the type's implementation by calling
5897  * g_type_plugin_use() and g_type_plugin_complete_type_info() on
5898  * <literal>new_type_plugin</literal>.
5899  * </para></listitem>
5900  * <listitem><para>
5901  * At some point the type's implementation isn't required anymore, e.g. after
5902  * g_type_class_unref() or g_type_free_instance() (called when the reference
5903  * count of an instance drops to zero).
5904  * </para></listitem>
5905  * <listitem><para>
5906  * This causes the type system to throw away the information retrieved from
5907  * g_type_plugin_complete_type_info() and then it calls
5908  * g_type_plugin_unuse() on <literal>new_type_plugin</literal>.
5909  * </para></listitem>
5910  * <listitem><para>
5911  * Things may repeat from the second step.
5912  * </para></listitem>
5913  * </orderedlist>
5914  *
5915  * So basically, you need to implement a #GTypePlugin type that
5916  * carries a use_count, once use_count goes from zero to one, you need
5917  * to load the implementation to successfully handle the upcoming
5918  * g_type_plugin_complete_type_info() call. Later, maybe after
5919  * succeeding use/unuse calls, once use_count drops to zero, you can
5920  * unload the implementation again. The type system makes sure to call
5921  * g_type_plugin_use() and g_type_plugin_complete_type_info() again
5922  * when the type is needed again.
5923  *
5924  * #GTypeModule is an implementation of #GTypePlugin that already
5925  * implements most of this except for the actual module loading and
5926  * unloading. It even handles multiple registered types per module.
5927  */
5928
5929
5930 /**
5931  * SECTION:objects
5932  * @title: GObject
5933  * @short_description: The base object type
5934  * @see_also: #GParamSpecObject, g_param_spec_object()
5935  *
5936  * GObject is the fundamental type providing the common attributes and
5937  * methods for all object types in GTK+, Pango and other libraries
5938  * based on GObject.  The GObject class provides methods for object
5939  * construction and destruction, property access methods, and signal
5940  * support.  Signals are described in detail in <xref
5941  * linkend="gobject-Signals"/>.
5942  *
5943  * <para id="floating-ref">
5944  * GInitiallyUnowned is derived from GObject. The only difference between
5945  * the two is that the initial reference of a GInitiallyUnowned is flagged
5946  * as a <firstterm>floating</firstterm> reference.
5947  * This means that it is not specifically claimed to be "owned" by
5948  * any code portion. The main motivation for providing floating references is
5949  * C convenience. In particular, it allows code to be written as:
5950  * |[
5951  * container = create_container ();
5952  * container_add_child (container, create_child());
5953  * ]|
5954  * If <function>container_add_child()</function> will g_object_ref_sink() the
5955  * passed in child, no reference of the newly created child is leaked.
5956  * Without floating references, <function>container_add_child()</function>
5957  * can only g_object_ref() the new child, so to implement this code without
5958  * reference leaks, it would have to be written as:
5959  * |[
5960  * Child *child;
5961  * container = create_container ();
5962  * child = create_child ();
5963  * container_add_child (container, child);
5964  * g_object_unref (child);
5965  * ]|
5966  * The floating reference can be converted into
5967  * an ordinary reference by calling g_object_ref_sink().
5968  * For already sunken objects (objects that don't have a floating reference
5969  * anymore), g_object_ref_sink() is equivalent to g_object_ref() and returns
5970  * a new reference.
5971  * Since floating references are useful almost exclusively for C convenience,
5972  * language bindings that provide automated reference and memory ownership
5973  * maintenance (such as smart pointers or garbage collection) should not
5974  * expose floating references in their API.
5975  * </para>
5976  *
5977  * Some object implementations may need to save an objects floating state
5978  * across certain code portions (an example is #GtkMenu), to achieve this,
5979  * the following sequence can be used:
5980  *
5981  * |[
5982  * /&ast; save floating state &ast;/
5983  * gboolean was_floating = g_object_is_floating (object);
5984  * g_object_ref_sink (object);
5985  * /&ast; protected code portion &ast;/
5986  * ...;
5987  * /&ast; restore floating state &ast;/
5988  * if (was_floating)
5989  * g_object_force_floating (object);
5990  * g_object_unref (object); /&ast; release previously acquired reference &ast;/
5991  * ]|
5992  */
5993
5994
5995 /**
5996  * SECTION:param_value_types
5997  * @short_description: Standard Parameter and Value Types
5998  * @see_also: #GParamSpec, #GValue, g_object_class_install_property().
5999  * @title: Parameters and Values
6000  *
6001  * #GValue provides an abstract container structure which can be
6002  * copied, transformed and compared while holding a value of any
6003  * (derived) type, which is registered as a #GType with a
6004  * #GTypeValueTable in its #GTypeInfo structure.  Parameter
6005  * specifications for most value types can be created as #GParamSpec
6006  * derived instances, to implement e.g. #GObject properties which
6007  * operate on #GValue containers.
6008  *
6009  * Parameter names need to start with a letter (a-z or A-Z). Subsequent
6010  * characters can be letters, numbers or a '-'.
6011  * All other characters are replaced by a '-' during construction.
6012  */
6013
6014
6015 /**
6016  * SECTION:signals
6017  * @short_description: A means for customization of object behaviour and a general purpose notification mechanism
6018  * @title: Signals
6019  *
6020  * The basic concept of the signal system is that of the
6021  * <emphasis>emission</emphasis> of a signal. Signals are introduced
6022  * per-type and are identified through strings.  Signals introduced
6023  * for a parent type are available in derived types as well, so
6024  * basically they are a per-type facility that is inherited.  A signal
6025  * emission mainly involves invocation of a certain set of callbacks
6026  * in precisely defined manner. There are two main categories of such
6027  * callbacks, per-object
6028  * <footnote><para>Although signals can deal with any kind of instantiatable
6029  * type, i'm referring to those types as "object types" in the following,
6030  * simply because that is the context most users will encounter signals in.
6031  * </para></footnote>
6032  * ones and user provided ones.
6033  * The per-object callbacks are most often referred to as "object method
6034  * handler" or "default (signal) handler", while user provided callbacks are
6035  * usually just called "signal handler".
6036  * The object method handler is provided at signal creation time (this most
6037  * frequently happens at the end of an object class' creation), while user
6038  * provided handlers are frequently connected and disconnected to/from a certain
6039  * signal on certain object instances.
6040  *
6041  * A signal emission consists of five stages, unless prematurely stopped:
6042  * <variablelist>
6043  * <varlistentry><term></term><listitem><para>
6044  * 1 - Invocation of the object method handler for %G_SIGNAL_RUN_FIRST signals
6045  * </para></listitem></varlistentry>
6046  * <varlistentry><term></term><listitem><para>
6047  * 2 - Invocation of normal user-provided signal handlers (<emphasis>after</emphasis> flag %FALSE)
6048  * </para></listitem></varlistentry>
6049  * <varlistentry><term></term><listitem><para>
6050  * 3 - Invocation of the object method handler for %G_SIGNAL_RUN_LAST signals
6051  * </para></listitem></varlistentry>
6052  * <varlistentry><term></term><listitem><para>
6053  * 4 - Invocation of user provided signal handlers, connected with an <emphasis>after</emphasis> flag of %TRUE
6054  * </para></listitem></varlistentry>
6055  * <varlistentry><term></term><listitem><para>
6056  * 5 - Invocation of the object method handler for %G_SIGNAL_RUN_CLEANUP signals
6057  * </para></listitem></varlistentry>
6058  * </variablelist>
6059  * The user-provided signal handlers are called in the order they were
6060  * connected in.
6061  * All handlers may prematurely stop a signal emission, and any number of
6062  * handlers may be connected, disconnected, blocked or unblocked during
6063  * a signal emission.
6064  * There are certain criteria for skipping user handlers in stages 2 and 4
6065  * of a signal emission.
6066  * First, user handlers may be <emphasis>blocked</emphasis>, blocked handlers are omitted
6067  * during callback invocation, to return from the "blocked" state, a
6068  * handler has to get unblocked exactly the same amount of times
6069  * it has been blocked before.
6070  * Second, upon emission of a %G_SIGNAL_DETAILED signal, an additional
6071  * "detail" argument passed in to g_signal_emit() has to match the detail
6072  * argument of the signal handler currently subject to invocation.
6073  * Specification of no detail argument for signal handlers (omission of the
6074  * detail part of the signal specification upon connection) serves as a
6075  * wildcard and matches any detail argument passed in to emission.
6076  */
6077
6078
6079 /**
6080  * SECTION:value_arrays
6081  * @short_description: A container structure to maintain an array of generic values
6082  * @see_also: #GValue, #GParamSpecValueArray, g_param_spec_value_array()
6083  * @title: Value arrays
6084  *
6085  * The prime purpose of a #GValueArray is for it to be used as an
6086  * object property that holds an array of values. A #GValueArray wraps
6087  * an array of #GValue elements in order for it to be used as a boxed
6088  * type through %G_TYPE_VALUE_ARRAY.
6089  *
6090  * #GValueArray is deprecated in favour of #GArray since GLib 2.32. It
6091  * is possible to create a #GArray that behaves like a #GValueArray by
6092  * using the size of #GValue as the element size, and by setting
6093  * g_value_unset() as the clear function using g_array_set_clear_func(),
6094  * for instance, the following code:
6095  *
6096  * |[
6097  * GValueArray *array = g_value_array_new (10);
6098  * ]|
6099  *
6100  * can be replaced by:
6101  *
6102  * |[
6103  * GArray *array = g_array_sized_new (FALSE, TRUE, sizeof (GValue), 10);
6104  * g_array_set_clear_func (array, (GDestroyNotify) g_value_unset);
6105  * ]|
6106  */
6107
6108
6109 /**
6110  * SECTION:value_collection
6111  * @Short_description: Converting varargs to generic values
6112  * @Title: Varargs Value Collection
6113  *
6114  * The macros in this section provide the varargs parsing support needed
6115  * in variadic GObject functions such as g_object_new() or g_object_set().
6116  * They currently support the collection of integral types, floating point
6117  * types and pointers.
6118  */
6119
6120
6121 /**
6122  * g_alloca:
6123  * @size: number of bytes to allocate.
6124  *
6125  * Allocates @size bytes on the stack; these bytes will be freed when the current
6126  * stack frame is cleaned up. This macro essentially just wraps the alloca()
6127  * function present on most UNIX variants.
6128  * Thus it provides the same advantages and pitfalls as alloca():
6129  * <variablelist>
6130  * <varlistentry><term></term><listitem><para>
6131  * + alloca() is very fast, as on most systems it's implemented by just adjusting
6132  * the stack pointer register.
6133  * </para></listitem></varlistentry>
6134  * <varlistentry><term></term><listitem><para>
6135  * + It doesn't cause any memory fragmentation, within its scope, separate alloca()
6136  * blocks just build up and are released together at function end.
6137  * </para></listitem></varlistentry>
6138  * <varlistentry><term></term><listitem><para>
6139  * - Allocation sizes have to fit into the current stack frame. For instance in a
6140  * threaded environment on Linux, the per-thread stack size is limited to 2 Megabytes,
6141  * so be sparse with alloca() uses.
6142  * </para></listitem></varlistentry>
6143  * <varlistentry><term></term><listitem><para>
6144  * - Allocation failure due to insufficient stack space is not indicated with a %NULL
6145  * return like e.g. with malloc(). Instead, most systems probably handle it the same
6146  * way as out of stack space situations from infinite function recursion, i.e.
6147  * with a segmentation fault.
6148  * </para></listitem></varlistentry>
6149  * <varlistentry><term></term><listitem><para>
6150  * - Special care has to be taken when mixing alloca() with GNU C variable sized arrays.
6151  * Stack space allocated with alloca() in the same scope as a variable sized array
6152  * will be freed together with the variable sized array upon exit of that scope, and
6153  * not upon exit of the enclosing function scope.
6154  * </para></listitem></varlistentry>
6155  * </variablelist>
6156  *
6157  * Returns: space for @size bytes, allocated on the stack
6158  */
6159
6160
6161 /**
6162  * g_binding_get_flags:
6163  * @binding: a #GBinding
6164  *
6165  * Retrieves the flags passed when constructing the #GBinding
6166  *
6167  * Returns: the #GBindingFlags used by the #GBinding
6168  * Since: 2.26
6169  */
6170
6171
6172 /**
6173  * g_binding_get_source:
6174  * @binding: a #GBinding
6175  *
6176  * Retrieves the #GObject instance used as the source of the binding
6177  *
6178  * Returns: (transfer none): the source #GObject
6179  * Since: 2.26
6180  */
6181
6182
6183 /**
6184  * g_binding_get_source_property:
6185  * @binding: a #GBinding
6186  *
6187  * Retrieves the name of the property of #GBinding:source used as the source
6188  * of the binding
6189  *
6190  * Returns: the name of the source property
6191  * Since: 2.26
6192  */
6193
6194
6195 /**
6196  * g_binding_get_target:
6197  * @binding: a #GBinding
6198  *
6199  * Retrieves the #GObject instance used as the target of the binding
6200  *
6201  * Returns: (transfer none): the target #GObject
6202  * Since: 2.26
6203  */
6204
6205
6206 /**
6207  * g_binding_get_target_property:
6208  * @binding: a #GBinding
6209  *
6210  * Retrieves the name of the property of #GBinding:target used as the target
6211  * of the binding
6212  *
6213  * Returns: the name of the target property
6214  * Since: 2.26
6215  */
6216
6217
6218 /**
6219  * g_boxed_copy:
6220  * @boxed_type: The type of @src_boxed.
6221  * @src_boxed: The boxed structure to be copied.
6222  *
6223  * Provide a copy of a boxed structure @src_boxed which is of type @boxed_type.
6224  *
6225  * Returns: The newly created copy of the boxed structure.
6226  */
6227
6228
6229 /**
6230  * g_boxed_free:
6231  * @boxed_type: The type of @boxed.
6232  * @boxed: The boxed structure to be freed.
6233  *
6234  * Free the boxed structure @boxed which is of type @boxed_type.
6235  */
6236
6237
6238 /**
6239  * g_boxed_type_register_static:
6240  * @name: Name of the new boxed type.
6241  * @boxed_copy: Boxed structure copy function.
6242  * @boxed_free: Boxed structure free function.
6243  *
6244  * This function creates a new %G_TYPE_BOXED derived type id for a new
6245  * boxed type with name @name. Boxed type handling functions have to be
6246  * provided to copy and free opaque boxed structures of this type.
6247  *
6248  * Returns: New %G_TYPE_BOXED derived type id for @name.
6249  */
6250
6251
6252 /**
6253  * g_cclosure_marshal_BOOLEAN__FLAGS:
6254  * @closure: the #GClosure to which the marshaller belongs
6255  * @return_value: a #GValue which can store the returned #gboolean
6256  * @n_param_values: 2
6257  * @param_values: a #GValue array holding instance and arg1
6258  * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
6259  * @marshal_data: additional data specified when registering the marshaller
6260  *
6261  * A marshaller for a #GCClosure with a callback of type
6262  * <literal>gboolean (*callback) (gpointer instance, gint arg1, gpointer user_data)</literal> where the #gint parameter
6263  * denotes a flags type.
6264  */
6265
6266
6267 /**
6268  * g_cclosure_marshal_BOOLEAN__OBJECT_BOXED_BOXED:
6269  * @closure: the #GClosure to which the marshaller belongs
6270  * @return_value: a #GValue, which can store the returned string
6271  * @n_param_values: 3
6272  * @param_values: a #GValue array holding instance, arg1 and arg2
6273  * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
6274  * @marshal_data: additional data specified when registering the marshaller
6275  *
6276  * A marshaller for a #GCClosure with a callback of type
6277  * <literal>gboolean (*callback) (gpointer instance, GBoxed *arg1, GBoxed *arg2, gpointer user_data)</literal>.
6278  *
6279  * Since: 2.26
6280  */
6281
6282
6283 /**
6284  * g_cclosure_marshal_BOOL__FLAGS:
6285  *
6286  * Another name for g_cclosure_marshal_BOOLEAN__FLAGS().
6287  */
6288
6289
6290 /**
6291  * g_cclosure_marshal_STRING__OBJECT_POINTER:
6292  * @closure: the #GClosure to which the marshaller belongs
6293  * @return_value: a #GValue, which can store the returned string
6294  * @n_param_values: 3
6295  * @param_values: a #GValue array holding instance, arg1 and arg2
6296  * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
6297  * @marshal_data: additional data specified when registering the marshaller
6298  *
6299  * A marshaller for a #GCClosure with a callback of type
6300  * <literal>gchar* (*callback) (gpointer instance, GObject *arg1, gpointer arg2, gpointer user_data)</literal>.
6301  */
6302
6303
6304 /**
6305  * g_cclosure_marshal_VOID__BOOLEAN:
6306  * @closure: the #GClosure to which the marshaller belongs
6307  * @return_value: ignored
6308  * @n_param_values: 2
6309  * @param_values: a #GValue array holding the instance and the #gboolean parameter
6310  * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
6311  * @marshal_data: additional data specified when registering the marshaller
6312  *
6313  * A marshaller for a #GCClosure with a callback of type
6314  * <literal>void (*callback) (gpointer instance, gboolean arg1, gpointer user_data)</literal>.
6315  */
6316
6317
6318 /**
6319  * g_cclosure_marshal_VOID__BOXED:
6320  * @closure: the #GClosure to which the marshaller belongs
6321  * @return_value: ignored
6322  * @n_param_values: 2
6323  * @param_values: a #GValue array holding the instance and the #GBoxed* parameter
6324  * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
6325  * @marshal_data: additional data specified when registering the marshaller
6326  *
6327  * A marshaller for a #GCClosure with a callback of type
6328  * <literal>void (*callback) (gpointer instance, GBoxed *arg1, gpointer user_data)</literal>.
6329  */
6330
6331
6332 /**
6333  * g_cclosure_marshal_VOID__CHAR:
6334  * @closure: the #GClosure to which the marshaller belongs
6335  * @return_value: ignored
6336  * @n_param_values: 2
6337  * @param_values: a #GValue array holding the instance and the #gchar parameter
6338  * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
6339  * @marshal_data: additional data specified when registering the marshaller
6340  *
6341  * A marshaller for a #GCClosure with a callback of type
6342  * <literal>void (*callback) (gpointer instance, gchar arg1, gpointer user_data)</literal>.
6343  */
6344
6345
6346 /**
6347  * g_cclosure_marshal_VOID__DOUBLE:
6348  * @closure: the #GClosure to which the marshaller belongs
6349  * @return_value: ignored
6350  * @n_param_values: 2
6351  * @param_values: a #GValue array holding the instance and the #gdouble parameter
6352  * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
6353  * @marshal_data: additional data specified when registering the marshaller
6354  *
6355  * A marshaller for a #GCClosure with a callback of type
6356  * <literal>void (*callback) (gpointer instance, gdouble arg1, gpointer user_data)</literal>.
6357  */
6358
6359
6360 /**
6361  * g_cclosure_marshal_VOID__ENUM:
6362  * @closure: the #GClosure to which the marshaller belongs
6363  * @return_value: ignored
6364  * @n_param_values: 2
6365  * @param_values: a #GValue array holding the instance and the enumeration parameter
6366  * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
6367  * @marshal_data: additional data specified when registering the marshaller
6368  *
6369  * A marshaller for a #GCClosure with a callback of type
6370  * <literal>void (*callback) (gpointer instance, gint arg1, gpointer user_data)</literal> where the #gint parameter denotes an enumeration type..
6371  */
6372
6373
6374 /**
6375  * g_cclosure_marshal_VOID__FLAGS:
6376  * @closure: the #GClosure to which the marshaller belongs
6377  * @return_value: ignored
6378  * @n_param_values: 2
6379  * @param_values: a #GValue array holding the instance and the flags parameter
6380  * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
6381  * @marshal_data: additional data specified when registering the marshaller
6382  *
6383  * A marshaller for a #GCClosure with a callback of type
6384  * <literal>void (*callback) (gpointer instance, gint arg1, gpointer user_data)</literal> where the #gint parameter denotes a flags type.
6385  */
6386
6387
6388 /**
6389  * g_cclosure_marshal_VOID__FLOAT:
6390  * @closure: the #GClosure to which the marshaller belongs
6391  * @return_value: ignored
6392  * @n_param_values: 2
6393  * @param_values: a #GValue array holding the instance and the #gfloat parameter
6394  * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
6395  * @marshal_data: additional data specified when registering the marshaller
6396  *
6397  * A marshaller for a #GCClosure with a callback of type
6398  * <literal>void (*callback) (gpointer instance, gfloat arg1, gpointer user_data)</literal>.
6399  */
6400
6401
6402 /**
6403  * g_cclosure_marshal_VOID__INT:
6404  * @closure: the #GClosure to which the marshaller belongs
6405  * @return_value: ignored
6406  * @n_param_values: 2
6407  * @param_values: a #GValue array holding the instance and the #gint parameter
6408  * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
6409  * @marshal_data: additional data specified when registering the marshaller
6410  *
6411  * A marshaller for a #GCClosure with a callback of type
6412  * <literal>void (*callback) (gpointer instance, gint arg1, gpointer user_data)</literal>.
6413  */
6414
6415
6416 /**
6417  * g_cclosure_marshal_VOID__LONG:
6418  * @closure: the #GClosure to which the marshaller belongs
6419  * @return_value: ignored
6420  * @n_param_values: 2
6421  * @param_values: a #GValue array holding the instance and the #glong parameter
6422  * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
6423  * @marshal_data: additional data specified when registering the marshaller
6424  *
6425  * A marshaller for a #GCClosure with a callback of type
6426  * <literal>void (*callback) (gpointer instance, glong arg1, gpointer user_data)</literal>.
6427  */
6428
6429
6430 /**
6431  * g_cclosure_marshal_VOID__OBJECT:
6432  * @closure: the #GClosure to which the marshaller belongs
6433  * @return_value: ignored
6434  * @n_param_values: 2
6435  * @param_values: a #GValue array holding the instance and the #GObject* parameter
6436  * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
6437  * @marshal_data: additional data specified when registering the marshaller
6438  *
6439  * A marshaller for a #GCClosure with a callback of type
6440  * <literal>void (*callback) (gpointer instance, GObject *arg1, gpointer user_data)</literal>.
6441  */
6442
6443
6444 /**
6445  * g_cclosure_marshal_VOID__PARAM:
6446  * @closure: the #GClosure to which the marshaller belongs
6447  * @return_value: ignored
6448  * @n_param_values: 2
6449  * @param_values: a #GValue array holding the instance and the #GParamSpec* parameter
6450  * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
6451  * @marshal_data: additional data specified when registering the marshaller
6452  *
6453  * A marshaller for a #GCClosure with a callback of type
6454  * <literal>void (*callback) (gpointer instance, GParamSpec *arg1, gpointer user_data)</literal>.
6455  */
6456
6457
6458 /**
6459  * g_cclosure_marshal_VOID__POINTER:
6460  * @closure: the #GClosure to which the marshaller belongs
6461  * @return_value: ignored
6462  * @n_param_values: 2
6463  * @param_values: a #GValue array holding the instance and the #gpointer parameter
6464  * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
6465  * @marshal_data: additional data specified when registering the marshaller
6466  *
6467  * A marshaller for a #GCClosure with a callback of type
6468  * <literal>void (*callback) (gpointer instance, gpointer arg1, gpointer user_data)</literal>.
6469  */
6470
6471
6472 /**
6473  * g_cclosure_marshal_VOID__STRING:
6474  * @closure: the #GClosure to which the marshaller belongs
6475  * @return_value: ignored
6476  * @n_param_values: 2
6477  * @param_values: a #GValue array holding the instance and the #gchar* parameter
6478  * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
6479  * @marshal_data: additional data specified when registering the marshaller
6480  *
6481  * A marshaller for a #GCClosure with a callback of type
6482  * <literal>void (*callback) (gpointer instance, const gchar *arg1, gpointer user_data)</literal>.
6483  */
6484
6485
6486 /**
6487  * g_cclosure_marshal_VOID__UCHAR:
6488  * @closure: the #GClosure to which the marshaller belongs
6489  * @return_value: ignored
6490  * @n_param_values: 2
6491  * @param_values: a #GValue array holding the instance and the #guchar parameter
6492  * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
6493  * @marshal_data: additional data specified when registering the marshaller
6494  *
6495  * A marshaller for a #GCClosure with a callback of type
6496  * <literal>void (*callback) (gpointer instance, guchar arg1, gpointer user_data)</literal>.
6497  */
6498
6499
6500 /**
6501  * g_cclosure_marshal_VOID__UINT:
6502  * @closure: the #GClosure to which the marshaller belongs
6503  * @return_value: ignored
6504  * @n_param_values: 2
6505  * @param_values: a #GValue array holding the instance and the #guint parameter
6506  * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
6507  * @marshal_data: additional data specified when registering the marshaller
6508  *
6509  * A marshaller for a #GCClosure with a callback of type
6510  * <literal>void (*callback) (gpointer instance, guint arg1, gpointer user_data)</literal>.
6511  */
6512
6513
6514 /**
6515  * g_cclosure_marshal_VOID__UINT_POINTER:
6516  * @closure: the #GClosure to which the marshaller belongs
6517  * @return_value: ignored
6518  * @n_param_values: 3
6519  * @param_values: a #GValue array holding instance, arg1 and arg2
6520  * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
6521  * @marshal_data: additional data specified when registering the marshaller
6522  *
6523  * A marshaller for a #GCClosure with a callback of type
6524  * <literal>void (*callback) (gpointer instance, guint arg1, gpointer arg2, gpointer user_data)</literal>.
6525  */
6526
6527
6528 /**
6529  * g_cclosure_marshal_VOID__ULONG:
6530  * @closure: the #GClosure to which the marshaller belongs
6531  * @return_value: ignored
6532  * @n_param_values: 2
6533  * @param_values: a #GValue array holding the instance and the #gulong parameter
6534  * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
6535  * @marshal_data: additional data specified when registering the marshaller
6536  *
6537  * A marshaller for a #GCClosure with a callback of type
6538  * <literal>void (*callback) (gpointer instance, gulong arg1, gpointer user_data)</literal>.
6539  */
6540
6541
6542 /**
6543  * g_cclosure_marshal_VOID__VARIANT:
6544  * @closure: the #GClosure to which the marshaller belongs
6545  * @return_value: ignored
6546  * @n_param_values: 2
6547  * @param_values: a #GValue array holding the instance and the #GVariant* parameter
6548  * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
6549  * @marshal_data: additional data specified when registering the marshaller
6550  *
6551  * A marshaller for a #GCClosure with a callback of type
6552  * <literal>void (*callback) (gpointer instance, GVariant *arg1, gpointer user_data)</literal>.
6553  *
6554  * Since: 2.26
6555  */
6556
6557
6558 /**
6559  * g_cclosure_marshal_VOID__VOID:
6560  * @closure: the #GClosure to which the marshaller belongs
6561  * @return_value: ignored
6562  * @n_param_values: 1
6563  * @param_values: a #GValue array holding only the instance
6564  * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
6565  * @marshal_data: additional data specified when registering the marshaller
6566  *
6567  * A marshaller for a #GCClosure with a callback of type
6568  * <literal>void (*callback) (gpointer instance, gpointer user_data)</literal>.
6569  */
6570
6571
6572 /**
6573  * g_cclosure_marshal_generic:
6574  * @closure: A #GClosure.
6575  * @return_gvalue: A #GValue to store the return value. May be %NULL if the callback of closure doesn't return a value.
6576  * @n_param_values: The length of the @param_values array.
6577  * @param_values: An array of #GValue<!-- -->s holding the arguments on which to invoke the callback of closure.
6578  * @invocation_hint: The invocation hint given as the last argument to g_closure_invoke().
6579  * @marshal_data: Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
6580  *
6581  * A generic marshaller function implemented via <ulink
6582  * url="http://sourceware.org/libffi/">libffi</ulink>.
6583  *
6584  * Since: 2.30
6585  */
6586
6587
6588 /**
6589  * g_cclosure_new: (skip)
6590  * @callback_func: the function to invoke
6591  * @user_data: user data to pass to @callback_func
6592  * @destroy_data: destroy notify to be called when @user_data is no longer used
6593  *
6594  * Creates a new closure which invokes @callback_func with @user_data as
6595  * the last parameter.
6596  *
6597  * Returns: a new #GCClosure
6598  */
6599
6600
6601 /**
6602  * g_cclosure_new_object: (skip)
6603  * @callback_func: the function to invoke
6604  * @object: a #GObject pointer to pass to @callback_func
6605  *
6606  * A variant of g_cclosure_new() which uses @object as @user_data and
6607  * calls g_object_watch_closure() on @object and the created
6608  * closure. This function is useful when you have a callback closely
6609  * associated with a #GObject, and want the callback to no longer run
6610  * after the object is is freed.
6611  *
6612  * Returns: a new #GCClosure
6613  */
6614
6615
6616 /**
6617  * g_cclosure_new_object_swap: (skip)
6618  * @callback_func: the function to invoke
6619  * @object: a #GObject pointer to pass to @callback_func
6620  *
6621  * A variant of g_cclosure_new_swap() which uses @object as @user_data
6622  * and calls g_object_watch_closure() on @object and the created
6623  * closure. This function is useful when you have a callback closely
6624  * associated with a #GObject, and want the callback to no longer run
6625  * after the object is is freed.
6626  *
6627  * Returns: a new #GCClosure
6628  */
6629
6630
6631 /**
6632  * g_cclosure_new_swap: (skip)
6633  * @callback_func: the function to invoke
6634  * @user_data: user data to pass to @callback_func
6635  * @destroy_data: destroy notify to be called when @user_data is no longer used
6636  *
6637  * Creates a new closure which invokes @callback_func with @user_data as
6638  * the first parameter.
6639  *
6640  * Returns: (transfer full): a new #GCClosure
6641  */
6642
6643
6644 /**
6645  * g_clear_object: (skip)
6646  * @object_ptr: a pointer to a #GObject reference
6647  *
6648  * Clears a reference to a #GObject.
6649  *
6650  * @object_ptr must not be %NULL.
6651  *
6652  * If the reference is %NULL then this function does nothing.
6653  * Otherwise, the reference count of the object is decreased and the
6654  * pointer is set to %NULL.
6655  *
6656  * This function is threadsafe and modifies the pointer atomically,
6657  * using memory barriers where needed.
6658  *
6659  * A macro is also included that allows this function to be used without
6660  * pointer casts.
6661  *
6662  * Since: 2.28
6663  */
6664
6665
6666 /**
6667  * g_closure_add_finalize_notifier: (skip)
6668  * @closure: a #GClosure
6669  * @notify_data: data to pass to @notify_func
6670  * @notify_func: the callback function to register
6671  *
6672  * Registers a finalization notifier which will be called when the
6673  * reference count of @closure goes down to 0. Multiple finalization
6674  * notifiers on a single closure are invoked in unspecified order. If
6675  * a single call to g_closure_unref() results in the closure being
6676  * both invalidated and finalized, then the invalidate notifiers will
6677  * be run before the finalize notifiers.
6678  */
6679
6680
6681 /**
6682  * g_closure_add_invalidate_notifier: (skip)
6683  * @closure: a #GClosure
6684  * @notify_data: data to pass to @notify_func
6685  * @notify_func: the callback function to register
6686  *
6687  * Registers an invalidation notifier which will be called when the
6688  * @closure is invalidated with g_closure_invalidate(). Invalidation
6689  * notifiers are invoked before finalization notifiers, in an
6690  * unspecified order.
6691  */
6692
6693
6694 /**
6695  * g_closure_add_marshal_guards: (skip)
6696  * @closure: a #GClosure
6697  * @pre_marshal_data: data to pass to @pre_marshal_notify
6698  * @pre_marshal_notify: a function to call before the closure callback
6699  * @post_marshal_data: data to pass to @post_marshal_notify
6700  * @post_marshal_notify: a function to call after the closure callback
6701  *
6702  * Adds a pair of notifiers which get invoked before and after the
6703  * closure callback, respectively. This is typically used to protect
6704  * the extra arguments for the duration of the callback. See
6705  * g_object_watch_closure() for an example of marshal guards.
6706  */
6707
6708
6709 /**
6710  * g_closure_invalidate:
6711  * @closure: GClosure to invalidate
6712  *
6713  * Sets a flag on the closure to indicate that its calling
6714  * environment has become invalid, and thus causes any future
6715  * invocations of g_closure_invoke() on this @closure to be
6716  * ignored. Also, invalidation notifiers installed on the closure will
6717  * be called at this point. Note that unless you are holding a
6718  * reference to the closure yourself, the invalidation notifiers may
6719  * unref the closure and cause it to be destroyed, so if you need to
6720  * access the closure after calling g_closure_invalidate(), make sure
6721  * that you've previously called g_closure_ref().
6722  *
6723  * Note that g_closure_invalidate() will also be called when the
6724  * reference count of a closure drops to zero (unless it has already
6725  * been invalidated before).
6726  */
6727
6728
6729 /**
6730  * g_closure_invoke:
6731  * @closure: a #GClosure
6732  * @return_value: (allow-none): a #GValue to store the return value. May be %NULL if the callback of @closure doesn't return a value.
6733  * @n_param_values: the length of the @param_values array
6734  * @param_values: (array length=n_param_values): an array of #GValue<!-- -->s holding the arguments on which to invoke the callback of @closure
6735  * @invocation_hint: (allow-none): a context-dependent invocation hint
6736  *
6737  * Invokes the closure, i.e. executes the callback represented by the @closure.
6738  */
6739
6740
6741 /**
6742  * g_closure_new_object:
6743  * @sizeof_closure: the size of the structure to allocate, must be at least <literal>sizeof (GClosure)</literal>
6744  * @object: a #GObject pointer to store in the @data field of the newly allocated #GClosure
6745  *
6746  * A variant of g_closure_new_simple() which stores @object in the
6747  * @data field of the closure and calls g_object_watch_closure() on
6748  * @object and the created closure. This function is mainly useful
6749  * when implementing new types of closures.
6750  *
6751  * Returns: (transfer full): a newly allocated #GClosure
6752  */
6753
6754
6755 /**
6756  * g_closure_new_simple:
6757  * @sizeof_closure: the size of the structure to allocate, must be at least <literal>sizeof (GClosure)</literal>
6758  * @data: data to store in the @data field of the newly allocated #GClosure
6759  *
6760  * Allocates a struct of the given size and initializes the initial
6761  * part as a #GClosure. This function is mainly useful when
6762  * implementing new types of closures.
6763  *
6764  * |[
6765  * typedef struct _MyClosure MyClosure;
6766  * struct _MyClosure
6767  * {
6768  * GClosure closure;
6769  * // extra data goes here
6770  * };
6771  *
6772  * static void
6773  * my_closure_finalize (gpointer  notify_data,
6774  * GClosure *closure)
6775  * {
6776  * MyClosure *my_closure = (MyClosure *)closure;
6777  *
6778  * // free extra data here
6779  * }
6780  *
6781  * MyClosure *my_closure_new (gpointer data)
6782  * {
6783  * GClosure *closure;
6784  * MyClosure *my_closure;
6785  *
6786  * closure = g_closure_new_simple (sizeof (MyClosure), data);
6787  * my_closure = (MyClosure *) closure;
6788  *
6789  * // initialize extra data here
6790  *
6791  * g_closure_add_finalize_notifier (closure, notify_data,
6792  * my_closure_finalize);
6793  * return my_closure;
6794  * }
6795  * ]|
6796  *
6797  * Returns: (transfer full): a newly allocated #GClosure
6798  */
6799
6800
6801 /**
6802  * g_closure_ref:
6803  * @closure: #GClosure to increment the reference count on
6804  *
6805  * Increments the reference count on a closure to force it staying
6806  * alive while the caller holds a pointer to it.
6807  *
6808  * Returns: (transfer none): The @closure passed in, for convenience
6809  */
6810
6811
6812 /**
6813  * g_closure_remove_finalize_notifier: (skip)
6814  * @closure: a #GClosure
6815  * @notify_data: data which was passed to g_closure_add_finalize_notifier() when registering @notify_func
6816  * @notify_func: the callback function to remove
6817  *
6818  * Removes a finalization notifier.
6819  *
6820  * Notice that notifiers are automatically removed after they are run.
6821  */
6822
6823
6824 /**
6825  * g_closure_remove_invalidate_notifier: (skip)
6826  * @closure: a #GClosure
6827  * @notify_data: data which was passed to g_closure_add_invalidate_notifier() when registering @notify_func
6828  * @notify_func: the callback function to remove
6829  *
6830  * Removes an invalidation notifier.
6831  *
6832  * Notice that notifiers are automatically removed after they are run.
6833  */
6834
6835
6836 /**
6837  * g_closure_set_marshal: (skip)
6838  * @closure: a #GClosure
6839  * @marshal: a #GClosureMarshal function
6840  *
6841  * Sets the marshaller of @closure. The <literal>marshal_data</literal>
6842  * of @marshal provides a way for a meta marshaller to provide additional
6843  * information to the marshaller. (See g_closure_set_meta_marshal().) For
6844  * GObject's C predefined marshallers (the g_cclosure_marshal_*()
6845  * functions), what it provides is a callback function to use instead of
6846  * @closure->callback.
6847  */
6848
6849
6850 /**
6851  * g_closure_set_meta_marshal: (skip)
6852  * @closure: a #GClosure
6853  * @marshal_data: context-dependent data to pass to @meta_marshal
6854  * @meta_marshal: a #GClosureMarshal function
6855  *
6856  * Sets the meta marshaller of @closure.  A meta marshaller wraps
6857  * @closure->marshal and modifies the way it is called in some
6858  * fashion. The most common use of this facility is for C callbacks.
6859  * The same marshallers (generated by <link
6860  * linkend="glib-genmarshal">glib-genmarshal</link>) are used
6861  * everywhere, but the way that we get the callback function
6862  * differs. In most cases we want to use @closure->callback, but in
6863  * other cases we want to use some different technique to retrieve the
6864  * callback function.
6865  *
6866  * For example, class closures for signals (see
6867  * g_signal_type_cclosure_new()) retrieve the callback function from a
6868  * fixed offset in the class structure.  The meta marshaller retrieves
6869  * the right callback and passes it to the marshaller as the
6870  * @marshal_data argument.
6871  */
6872
6873
6874 /**
6875  * g_closure_sink:
6876  * @closure: #GClosure to decrement the initial reference count on, if it's still being held
6877  *
6878  * Takes over the initial ownership of a closure.  Each closure is
6879  * initially created in a <firstterm>floating</firstterm> state, which
6880  * means that the initial reference count is not owned by any caller.
6881  * g_closure_sink() checks to see if the object is still floating, and
6882  * if so, unsets the floating state and decreases the reference
6883  * count. If the closure is not floating, g_closure_sink() does
6884  * nothing. The reason for the existence of the floating state is to
6885  * prevent cumbersome code sequences like:
6886  * |[
6887  * closure = g_cclosure_new (cb_func, cb_data);
6888  * g_source_set_closure (source, closure);
6889  * g_closure_unref (closure); // XXX GObject doesn't really need this
6890  * ]|
6891  * Because g_source_set_closure() (and similar functions) take ownership of the
6892  * initial reference count, if it is unowned, we instead can write:
6893  * |[
6894  * g_source_set_closure (source, g_cclosure_new (cb_func, cb_data));
6895  * ]|
6896  *
6897  * Generally, this function is used together with g_closure_ref(). Ane example
6898  * of storing a closure for later notification looks like:
6899  * |[
6900  * static GClosure *notify_closure = NULL;
6901  * void
6902  * foo_notify_set_closure (GClosure *closure)
6903  * {
6904  * if (notify_closure)
6905  * g_closure_unref (notify_closure);
6906  * notify_closure = closure;
6907  * if (notify_closure)
6908  * {
6909  * g_closure_ref (notify_closure);
6910  * g_closure_sink (notify_closure);
6911  * }
6912  * }
6913  * ]|
6914  *
6915  * Because g_closure_sink() may decrement the reference count of a closure
6916  * (if it hasn't been called on @closure yet) just like g_closure_unref(),
6917  * g_closure_ref() should be called prior to this function.
6918  */
6919
6920
6921 /**
6922  * g_closure_unref:
6923  * @closure: #GClosure to decrement the reference count on
6924  *
6925  * Decrements the reference count of a closure after it was previously
6926  * incremented by the same caller. If no other callers are using the
6927  * closure, then the closure will be destroyed and freed.
6928  */
6929
6930
6931 /**
6932  * g_enum_complete_type_info:
6933  * @g_enum_type: the type identifier of the type being completed
6934  * @info: the #GTypeInfo struct to be filled in
6935  * @const_values: An array of #GEnumValue structs for the possible enumeration values. The array is terminated by a struct with all members being 0.
6936  *
6937  * This function is meant to be called from the <literal>complete_type_info</literal>
6938  * function of a #GTypePlugin implementation, as in the following
6939  * example:
6940  *
6941  * |[
6942  * static void
6943  * my_enum_complete_type_info (GTypePlugin     *plugin,
6944  * GType            g_type,
6945  * GTypeInfo       *info,
6946  * GTypeValueTable *value_table)
6947  * {
6948  * static const GEnumValue values[] = {
6949  * { MY_ENUM_FOO, "MY_ENUM_FOO", "foo" },
6950  * { MY_ENUM_BAR, "MY_ENUM_BAR", "bar" },
6951  * { 0, NULL, NULL }
6952  * };
6953  *
6954  * g_enum_complete_type_info (type, info, values);
6955  * }
6956  * ]|
6957  */
6958
6959
6960 /**
6961  * g_enum_get_value:
6962  * @enum_class: a #GEnumClass
6963  * @value: the value to look up
6964  *
6965  * Returns the #GEnumValue for a value.
6966  *
6967  * member of the enumeration
6968  *
6969  * Returns: the #GEnumValue for @value, or %NULL if @value is not a
6970  */
6971
6972
6973 /**
6974  * g_enum_get_value_by_name:
6975  * @enum_class: a #GEnumClass
6976  * @name: the name to look up
6977  *
6978  * Looks up a #GEnumValue by name.
6979  *
6980  * enumeration doesn't have a member with that name
6981  *
6982  * Returns: the #GEnumValue with name @name, or %NULL if the
6983  */
6984
6985
6986 /**
6987  * g_enum_get_value_by_nick:
6988  * @enum_class: a #GEnumClass
6989  * @nick: the nickname to look up
6990  *
6991  * Looks up a #GEnumValue by nickname.
6992  *
6993  * enumeration doesn't have a member with that nickname
6994  *
6995  * Returns: the #GEnumValue with nickname @nick, or %NULL if the
6996  */
6997
6998
6999 /**
7000  * g_enum_register_static:
7001  * @name: A nul-terminated string used as the name of the new type.
7002  * @const_static_values: An array of #GEnumValue structs for the possible enumeration values. The array is terminated by a struct with all members being 0. GObject keeps a reference to the data, so it cannot be stack-allocated.
7003  *
7004  * Registers a new static enumeration type with the name @name.
7005  *
7006  * It is normally more convenient to let <link
7007  * linkend="glib-mkenums">glib-mkenums</link> generate a
7008  * my_enum_get_type() function from a usual C enumeration definition
7009  * than to write one yourself using g_enum_register_static().
7010  *
7011  * Returns: The new type identifier.
7012  */
7013
7014
7015 /**
7016  * g_flags_complete_type_info:
7017  * @g_flags_type: the type identifier of the type being completed
7018  * @info: the #GTypeInfo struct to be filled in
7019  * @const_values: An array of #GFlagsValue structs for the possible enumeration values. The array is terminated by a struct with all members being 0.
7020  *
7021  * This function is meant to be called from the complete_type_info()
7022  * function of a #GTypePlugin implementation, see the example for
7023  * g_enum_complete_type_info() above.
7024  */
7025
7026
7027 /**
7028  * g_flags_get_first_value:
7029  * @flags_class: a #GFlagsClass
7030  * @value: the value
7031  *
7032  * Returns the first #GFlagsValue which is set in @value.
7033  *
7034  * none is set
7035  *
7036  * Returns: the first #GFlagsValue which is set in @value, or %NULL if
7037  */
7038
7039
7040 /**
7041  * g_flags_get_value_by_name:
7042  * @flags_class: a #GFlagsClass
7043  * @name: the name to look up
7044  *
7045  * Looks up a #GFlagsValue by name.
7046  *
7047  * flag with that name
7048  *
7049  * Returns: the #GFlagsValue with name @name, or %NULL if there is no
7050  */
7051
7052
7053 /**
7054  * g_flags_get_value_by_nick:
7055  * @flags_class: a #GFlagsClass
7056  * @nick: the nickname to look up
7057  *
7058  * Looks up a #GFlagsValue by nickname.
7059  *
7060  * no flag with that nickname
7061  *
7062  * Returns: the #GFlagsValue with nickname @nick, or %NULL if there is
7063  */
7064
7065
7066 /**
7067  * g_flags_register_static:
7068  * @name: A nul-terminated string used as the name of the new type.
7069  * @const_static_values: An array of #GFlagsValue structs for the possible flags values. The array is terminated by a struct with all members being 0. GObject keeps a reference to the data, so it cannot be stack-allocated.
7070  *
7071  * Registers a new static flags type with the name @name.
7072  *
7073  * It is normally more convenient to let <link
7074  * linkend="glib-mkenums">glib-mkenums</link> generate a
7075  * my_flags_get_type() function from a usual C enumeration definition
7076  * than to write one yourself using g_flags_register_static().
7077  *
7078  * Returns: The new type identifier.
7079  */
7080
7081
7082 /**
7083  * g_main_destroy:
7084  * @loop: a #GMainLoop
7085  *
7086  * Frees the memory allocated for the #GMainLoop.
7087  *
7088  * Deprecated: 2.2: Use g_main_loop_unref() instead
7089  */
7090
7091
7092 /**
7093  * g_main_is_running:
7094  * @loop: a #GMainLoop
7095  *
7096  * Checks if the main loop is running.
7097  *
7098  * Returns: %TRUE if the main loop is running
7099  * Deprecated: 2.2: Use g_main_loop_is_running() instead
7100  */
7101
7102
7103 /**
7104  * g_main_iteration:
7105  * @may_block: set to %TRUE if it should block (i.e. wait) until an event source becomes ready. It will return after an event source has been processed. If set to %FALSE it will return immediately if no event source is ready to be processed.
7106  *
7107  * Runs a single iteration for the default #GMainContext.
7108  *
7109  * Returns: %TRUE if more events are pending.
7110  * Deprecated: 2.2: Use g_main_context_iteration() instead.
7111  */
7112
7113
7114 /**
7115  * g_main_new:
7116  * @is_running: set to %TRUE to indicate that the loop is running. This is not very important since calling g_main_run() will set this to %TRUE anyway.
7117  *
7118  * Creates a new #GMainLoop for th default main context.
7119  *
7120  * Returns: a new #GMainLoop
7121  * Deprecated: 2.2: Use g_main_loop_new() instead
7122  */
7123
7124
7125 /**
7126  * g_main_pending:
7127  *
7128  * Checks if any events are pending for the default #GMainContext
7129  * (i.e. ready to be processed).
7130  *
7131  *
7132  * Deprected: 2.2: Use g_main_context_pending() instead.
7133  *
7134  * Returns: %TRUE if any events are pending.
7135  */
7136
7137
7138 /**
7139  * g_main_quit:
7140  * @loop: a #GMainLoop
7141  *
7142  * Stops the #GMainLoop.
7143  * If g_main_run() was called to run the #GMainLoop, it will now return.
7144  *
7145  * Deprecated: 2.2: Use g_main_loop_quit() instead
7146  */
7147
7148
7149 /**
7150  * g_main_run:
7151  * @loop: a #GMainLoop
7152  *
7153  * Runs a main loop until it stops running.
7154  *
7155  * Deprecated: 2.2: Use g_main_loop_run() instead
7156  */
7157
7158
7159 /**
7160  * g_main_set_poll_func:
7161  * @func: the function to call to poll all file descriptors
7162  *
7163  * Sets the function to use for the handle polling of file descriptors
7164  * for the default main context.
7165  *
7166  * Deprecated: 2.2: Use g_main_context_set_poll_func() again
7167  */
7168
7169
7170 /**
7171  * g_new:
7172  * @struct_type: the type of the elements to allocate
7173  * @n_structs: the number of elements to allocate
7174  *
7175  * Allocates @n_structs elements of type @struct_type.
7176  * The returned pointer is cast to a pointer to the given type.
7177  * If @n_structs is 0 it returns %NULL.
7178  * Care is taken to avoid overflow when calculating the size of the allocated block.
7179  *
7180  * Since the returned pointer is already casted to the right type,
7181  * it is normally unnecessary to cast it explicitly, and doing
7182  * so might hide memory allocation errors.
7183  *
7184  * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type
7185  */
7186
7187
7188 /**
7189  * g_new0:
7190  * @struct_type: the type of the elements to allocate.
7191  * @n_structs: the number of elements to allocate.
7192  *
7193  * Allocates @n_structs elements of type @struct_type, initialized to 0's.
7194  * The returned pointer is cast to a pointer to the given type.
7195  * If @n_structs is 0 it returns %NULL.
7196  * Care is taken to avoid overflow when calculating the size of the allocated block.
7197  *
7198  * Since the returned pointer is already casted to the right type,
7199  * it is normally unnecessary to cast it explicitly, and doing
7200  * so might hide memory allocation errors.
7201  *
7202  * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type.
7203  */
7204
7205
7206 /**
7207  * g_newa:
7208  * @struct_type: Type of memory chunks to be allocated
7209  * @n_structs: Number of chunks to be allocated
7210  *
7211  * Wraps g_alloca() in a more typesafe manner.
7212  *
7213  * Returns: Pointer to stack space for @n_structs chunks of type @struct_type
7214  */
7215
7216
7217 /**
7218  * g_node_append:
7219  * @parent: the #GNode to place the new #GNode under
7220  * @node: the #GNode to insert
7221  *
7222  * Inserts a #GNode as the last child of the given parent.
7223  *
7224  * Returns: the inserted #GNode
7225  */
7226
7227
7228 /**
7229  * g_node_append_data:
7230  * @parent: the #GNode to place the new #GNode under
7231  * @data: the data for the new #GNode
7232  *
7233  * Inserts a new #GNode as the last child of the given parent.
7234  *
7235  * Returns: the new #GNode
7236  */
7237
7238
7239 /**
7240  * g_node_first_child:
7241  * @node: a #GNode
7242  *
7243  * Gets the first child of a #GNode.
7244  *
7245  * or has no children
7246  *
7247  * Returns: the first child of @node, or %NULL if @node is %NULL
7248  */
7249
7250
7251 /**
7252  * g_node_insert_data:
7253  * @parent: the #GNode to place the new #GNode under
7254  * @position: the position to place the new #GNode at. If position is -1, the new #GNode is inserted as the last child of @parent
7255  * @data: the data for the new #GNode
7256  *
7257  * Inserts a new #GNode at the given position.
7258  *
7259  * Returns: the new #GNode
7260  */
7261
7262
7263 /**
7264  * g_node_insert_data_after:
7265  * @parent: the #GNode to place the new #GNode under
7266  * @sibling: the sibling #GNode to place the new #GNode after
7267  * @data: the data for the new #GNode
7268  *
7269  * Inserts a new #GNode after the given sibling.
7270  *
7271  * Returns: the new #GNode
7272  */
7273
7274
7275 /**
7276  * g_node_insert_data_before:
7277  * @parent: the #GNode to place the new #GNode under
7278  * @sibling: the sibling #GNode to place the new #GNode before
7279  * @data: the data for the new #GNode
7280  *
7281  * Inserts a new #GNode before the given sibling.
7282  *
7283  * Returns: the new #GNode
7284  */
7285
7286
7287 /**
7288  * g_node_next_sibling:
7289  * @node: a #GNode
7290  *
7291  * Gets the next sibling of a #GNode.
7292  *
7293  * or %NULL
7294  *
7295  * Returns: the next sibling of @node, or %NULL if @node is the last node
7296  */
7297
7298
7299 /**
7300  * g_node_prepend_data:
7301  * @parent: the #GNode to place the new #GNode under
7302  * @data: the data for the new #GNode
7303  *
7304  * Inserts a new #GNode as the first child of the given parent.
7305  *
7306  * Returns: the new #GNode
7307  */
7308
7309
7310 /**
7311  * g_node_prev_sibling:
7312  * @node: a #GNode
7313  *
7314  * Gets the previous sibling of a #GNode.
7315  *
7316  * node or %NULL
7317  *
7318  * Returns: the previous sibling of @node, or %NULL if @node is the first
7319  */
7320
7321
7322 /**
7323  * g_object_add_toggle_ref: (skip)
7324  * @object: a #GObject
7325  * @notify: a function to call when this reference is the last reference to the object, or is no longer the last reference.
7326  * @data: data to pass to @notify
7327  *
7328  * Increases the reference count of the object by one and sets a
7329  * callback to be called when all other references to the object are
7330  * dropped, or when this is already the last reference to the object
7331  * and another reference is established.
7332  *
7333  * This functionality is intended for binding @object to a proxy
7334  * object managed by another memory manager. This is done with two
7335  * paired references: the strong reference added by
7336  * g_object_add_toggle_ref() and a reverse reference to the proxy
7337  * object which is either a strong reference or weak reference.
7338  *
7339  * The setup is that when there are no other references to @object,
7340  * only a weak reference is held in the reverse direction from @object
7341  * to the proxy object, but when there are other references held to
7342  * @object, a strong reference is held. The @notify callback is called
7343  * when the reference from @object to the proxy object should be
7344  * <firstterm>toggled</firstterm> from strong to weak (@is_last_ref
7345  * true) or weak to strong (@is_last_ref false).
7346  *
7347  * Since a (normal) reference must be held to the object before
7348  * calling g_object_add_toggle_ref(), the initial state of the reverse
7349  * link is always strong.
7350  *
7351  * Multiple toggle references may be added to the same gobject,
7352  * however if there are multiple toggle references to an object, none
7353  * of them will ever be notified until all but one are removed.  For
7354  * this reason, you should only ever use a toggle reference if there
7355  * is important state in the proxy object.
7356  *
7357  * Since: 2.8
7358  */
7359
7360
7361 /**
7362  * g_object_add_weak_pointer: (skip)
7363  * @object: The object that should be weak referenced.
7364  * @weak_pointer_location: (inout): The memory address of a pointer.
7365  *
7366  * Adds a weak reference from weak_pointer to @object to indicate that
7367  * the pointer located at @weak_pointer_location is only valid during
7368  * the lifetime of @object. When the @object is finalized,
7369  * @weak_pointer will be set to %NULL.
7370  *
7371  * Note that as with g_object_weak_ref(), the weak references created by
7372  * this method are not thread-safe: they cannot safely be used in one
7373  * thread if the object's last g_object_unref() might happen in another
7374  * thread. Use #GWeakRef if thread-safety is required.
7375  */
7376
7377
7378 /**
7379  * g_object_bind_property:
7380  * @source: (type GObject.Object): the source #GObject
7381  * @source_property: the property on @source to bind
7382  * @target: (type GObject.Object): the target #GObject
7383  * @target_property: the property on @target to bind
7384  * @flags: flags to pass to #GBinding
7385  *
7386  * Creates a binding between @source_property on @source and @target_property
7387  * on @target. Whenever the @source_property is changed the @target_property is
7388  * updated using the same value. For instance:
7389  *
7390  * |[
7391  * g_object_bind_property (action, "active", widget, "sensitive", 0);
7392  * ]|
7393  *
7394  * Will result in the "sensitive" property of the widget #GObject instance to be
7395  * updated with the same value of the "active" property of the action #GObject
7396  * instance.
7397  *
7398  * If @flags contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
7399  * if @target_property on @target changes then the @source_property on @source
7400  * will be updated as well.
7401  *
7402  * The binding will automatically be removed when either the @source or the
7403  * @target instances are finalized. To remove the binding without affecting the
7404  * @source and the @target you can just call g_object_unref() on the returned
7405  * #GBinding instance.
7406  *
7407  * A #GObject can have multiple bindings.
7408  *
7409  * binding between the two #GObject instances. The binding is released
7410  * whenever the #GBinding reference count reaches zero.
7411  *
7412  * Returns: (transfer none): the #GBinding instance representing the
7413  * Since: 2.26
7414  */
7415
7416
7417 /**
7418  * g_object_bind_property_full:
7419  * @source: (type GObject.Object): the source #GObject
7420  * @source_property: the property on @source to bind
7421  * @target: (type GObject.Object): the target #GObject
7422  * @target_property: the property on @target to bind
7423  * @flags: flags to pass to #GBinding
7424  * @transform_to: (scope notified) (allow-none): the transformation function from the @source to the @target, or %NULL to use the default
7425  * @transform_from: (scope notified) (allow-none): the transformation function from the @target to the @source, or %NULL to use the default
7426  * @user_data: custom data to be passed to the transformation functions, or %NULL
7427  * @notify: function to be called when disposing the binding, to free the resources used by the transformation functions
7428  *
7429  * Complete version of g_object_bind_property().
7430  *
7431  * Creates a binding between @source_property on @source and @target_property
7432  * on @target, allowing you to set the transformation functions to be used by
7433  * the binding.
7434  *
7435  * If @flags contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
7436  * if @target_property on @target changes then the @source_property on @source
7437  * will be updated as well. The @transform_from function is only used in case
7438  * of bidirectional bindings, otherwise it will be ignored
7439  *
7440  * The binding will automatically be removed when either the @source or the
7441  * @target instances are finalized. To remove the binding without affecting the
7442  * @source and the @target you can just call g_object_unref() on the returned
7443  * #GBinding instance.
7444  *
7445  * A #GObject can have multiple bindings.
7446  *
7447  * <note>The same @user_data parameter will be used for both @transform_to
7448  * and @transform_from transformation functions; the @notify function will
7449  * be called once, when the binding is removed. If you need different data
7450  * for each transformation function, please use
7451  * g_object_bind_property_with_closures() instead.</note>
7452  *
7453  * binding between the two #GObject instances. The binding is released
7454  * whenever the #GBinding reference count reaches zero.
7455  *
7456  * Returns: (transfer none): the #GBinding instance representing the
7457  * Since: 2.26
7458  */
7459
7460
7461 /**
7462  * g_object_bind_property_with_closures:
7463  * @source: (type GObject.Object): the source #GObject
7464  * @source_property: the property on @source to bind
7465  * @target: (type GObject.Object): the target #GObject
7466  * @target_property: the property on @target to bind
7467  * @flags: flags to pass to #GBinding
7468  * @transform_to: a #GClosure wrapping the transformation function from the @source to the @target, or %NULL to use the default
7469  * @transform_from: a #GClosure wrapping the transformation function from the @target to the @source, or %NULL to use the default
7470  *
7471  * Creates a binding between @source_property on @source and @target_property
7472  * on @target, allowing you to set the transformation functions to be used by
7473  * the binding.
7474  *
7475  * This function is the language bindings friendly version of
7476  * g_object_bind_property_full(), using #GClosure<!-- -->s instead of
7477  * function pointers.
7478  *
7479  *
7480  * binding between the two #GObject instances. The binding is released
7481  * whenever the #GBinding reference count reaches zero.
7482  *
7483  * Rename to: g_object_bind_property_full
7484  * Returns: (transfer none): the #GBinding instance representing the
7485  * Since: 2.26
7486  */
7487
7488
7489 /**
7490  * g_object_class_find_property:
7491  * @oclass: a #GObjectClass
7492  * @property_name: the name of the property to look up
7493  *
7494  * Looks up the #GParamSpec for a property of a class.
7495  *
7496  * %NULL if the class doesn't have a property of that name
7497  *
7498  * Returns: (transfer none): the #GParamSpec for the property, or
7499  */
7500
7501
7502 /**
7503  * g_object_class_install_properties:
7504  * @oclass: a #GObjectClass
7505  * @n_pspecs: the length of the #GParamSpec<!-- -->s array
7506  * @pspecs: (array length=n_pspecs): the #GParamSpec<!-- -->s array defining the new properties
7507  *
7508  * Installs new properties from an array of #GParamSpec<!-- -->s. This is
7509  * usually done in the class initializer.
7510  *
7511  * The property id of each property is the index of each #GParamSpec in
7512  * the @pspecs array.
7513  *
7514  * The property id of 0 is treated specially by #GObject and it should not
7515  * be used to store a #GParamSpec.
7516  *
7517  * This function should be used if you plan to use a static array of
7518  * #GParamSpec<!-- -->s and g_object_notify_by_pspec(). For instance, this
7519  * class initialization:
7520  *
7521  * |[
7522  * enum {
7523  * PROP_0, PROP_FOO, PROP_BAR, N_PROPERTIES
7524  * };
7525  *
7526  * static GParamSpec *obj_properties[N_PROPERTIES] = { NULL, };
7527  *
7528  * static void
7529  * my_object_class_init (MyObjectClass *klass)
7530  * {
7531  * GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
7532  *
7533  * obj_properties[PROP_FOO] =
7534  * g_param_spec_int ("foo", "Foo", "Foo",
7535  * -1, G_MAXINT,
7536  * 0,
7537  * G_PARAM_READWRITE);
7538  *
7539  * obj_properties[PROP_BAR] =
7540  * g_param_spec_string ("bar", "Bar", "Bar",
7541  * NULL,
7542  * G_PARAM_READWRITE);
7543  *
7544  * gobject_class->set_property = my_object_set_property;
7545  * gobject_class->get_property = my_object_get_property;
7546  * g_object_class_install_properties (gobject_class,
7547  * N_PROPERTIES,
7548  * obj_properties);
7549  * }
7550  * ]|
7551  *
7552  * allows calling g_object_notify_by_pspec() to notify of property changes:
7553  *
7554  * |[
7555  * void
7556  * my_object_set_foo (MyObject *self, gint foo)
7557  * {
7558  * if (self->foo != foo)
7559  * {
7560  * self->foo = foo;
7561  * g_object_notify_by_pspec (G_OBJECT (self), obj_properties[PROP_FOO]);
7562  * }
7563  * }
7564  * ]|
7565  *
7566  * Since: 2.26
7567  */
7568
7569
7570 /**
7571  * g_object_class_install_property:
7572  * @oclass: a #GObjectClass
7573  * @property_id: the id for the new property
7574  * @pspec: the #GParamSpec for the new property
7575  *
7576  * Installs a new property. This is usually done in the class initializer.
7577  *
7578  * Note that it is possible to redefine a property in a derived class,
7579  * by installing a property with the same name. This can be useful at times,
7580  * e.g. to change the range of allowed values or the default value.
7581  */
7582
7583
7584 /**
7585  * g_object_class_list_properties:
7586  * @oclass: a #GObjectClass
7587  * @n_properties: (out): return location for the length of the returned array
7588  *
7589  * Get an array of #GParamSpec* for all properties of a class.
7590  *
7591  * #GParamSpec* which should be freed after use
7592  *
7593  * Returns: (array length=n_properties) (transfer container): an array of
7594  */
7595
7596
7597 /**
7598  * g_object_class_override_property:
7599  * @oclass: a #GObjectClass
7600  * @property_id: the new property ID
7601  * @name: the name of a property registered in a parent class or in an interface of this class.
7602  *
7603  * Registers @property_id as referring to a property with the
7604  * name @name in a parent class or in an interface implemented
7605  * by @oclass. This allows this class to <firstterm>override</firstterm>
7606  * a property implementation in a parent class or to provide
7607  * the implementation of a property from an interface.
7608  *
7609  * <note>
7610  * Internally, overriding is implemented by creating a property of type
7611  * #GParamSpecOverride; generally operations that query the properties of
7612  * the object class, such as g_object_class_find_property() or
7613  * g_object_class_list_properties() will return the overridden
7614  * property. However, in one case, the @construct_properties argument of
7615  * the @constructor virtual function, the #GParamSpecOverride is passed
7616  * instead, so that the @param_id field of the #GParamSpec will be
7617  * correct.  For virtually all uses, this makes no difference. If you
7618  * need to get the overridden property, you can call
7619  * g_param_spec_get_redirect_target().
7620  * </note>
7621  *
7622  * Since: 2.4
7623  */
7624
7625
7626 /**
7627  * g_object_connect: (skip)
7628  * @object: a #GObject
7629  * @signal_spec: the spec for the first signal
7630  * @...: #GCallback for the first signal, followed by data for the first signal, followed optionally by more signal spec/callback/data triples, followed by %NULL
7631  *
7632  * A convenience function to connect multiple signals at once.
7633  *
7634  * The signal specs expected by this function have the form
7635  * "modifier::signal_name", where modifier can be one of the following:
7636  * <variablelist>
7637  * <varlistentry>
7638  * <term>signal</term>
7639  * <listitem><para>
7640  * equivalent to <literal>g_signal_connect_data (..., NULL, 0)</literal>
7641  * </para></listitem>
7642  * </varlistentry>
7643  * <varlistentry>
7644  * <term>object_signal</term>
7645  * <term>object-signal</term>
7646  * <listitem><para>
7647  * equivalent to <literal>g_signal_connect_object (..., 0)</literal>
7648  * </para></listitem>
7649  * </varlistentry>
7650  * <varlistentry>
7651  * <term>swapped_signal</term>
7652  * <term>swapped-signal</term>
7653  * <listitem><para>
7654  * equivalent to <literal>g_signal_connect_data (..., NULL, G_CONNECT_SWAPPED)</literal>
7655  * </para></listitem>
7656  * </varlistentry>
7657  * <varlistentry>
7658  * <term>swapped_object_signal</term>
7659  * <term>swapped-object-signal</term>
7660  * <listitem><para>
7661  * equivalent to <literal>g_signal_connect_object (..., G_CONNECT_SWAPPED)</literal>
7662  * </para></listitem>
7663  * </varlistentry>
7664  * <varlistentry>
7665  * <term>signal_after</term>
7666  * <term>signal-after</term>
7667  * <listitem><para>
7668  * equivalent to <literal>g_signal_connect_data (..., NULL, G_CONNECT_AFTER)</literal>
7669  * </para></listitem>
7670  * </varlistentry>
7671  * <varlistentry>
7672  * <term>object_signal_after</term>
7673  * <term>object-signal-after</term>
7674  * <listitem><para>
7675  * equivalent to <literal>g_signal_connect_object (..., G_CONNECT_AFTER)</literal>
7676  * </para></listitem>
7677  * </varlistentry>
7678  * <varlistentry>
7679  * <term>swapped_signal_after</term>
7680  * <term>swapped-signal-after</term>
7681  * <listitem><para>
7682  * equivalent to <literal>g_signal_connect_data (..., NULL, G_CONNECT_SWAPPED | G_CONNECT_AFTER)</literal>
7683  * </para></listitem>
7684  * </varlistentry>
7685  * <varlistentry>
7686  * <term>swapped_object_signal_after</term>
7687  * <term>swapped-object-signal-after</term>
7688  * <listitem><para>
7689  * equivalent to <literal>g_signal_connect_object (..., G_CONNECT_SWAPPED | G_CONNECT_AFTER)</literal>
7690  * </para></listitem>
7691  * </varlistentry>
7692  * </variablelist>
7693  *
7694  * |[
7695  * menu->toplevel = g_object_connect (g_object_new (GTK_TYPE_WINDOW,
7696  * "type", GTK_WINDOW_POPUP,
7697  * "child", menu,
7698  * NULL),
7699  * "signal::event", gtk_menu_window_event, menu,
7700  * "signal::size_request", gtk_menu_window_size_request, menu,
7701  * "signal::destroy", gtk_widget_destroyed, &amp;menu-&gt;toplevel,
7702  * NULL);
7703  * ]|
7704  *
7705  * Returns: (transfer none): @object
7706  */
7707
7708
7709 /**
7710  * g_object_disconnect: (skip)
7711  * @object: a #GObject
7712  * @signal_spec: the spec for the first signal
7713  * @...: #GCallback for the first signal, followed by data for the first signal, followed optionally by more signal spec/callback/data triples, followed by %NULL
7714  *
7715  * A convenience function to disconnect multiple signals at once.
7716  *
7717  * The signal specs expected by this function have the form
7718  * "any_signal", which means to disconnect any signal with matching
7719  * callback and data, or "any_signal::signal_name", which only
7720  * disconnects the signal named "signal_name".
7721  */
7722
7723
7724 /**
7725  * g_object_force_floating:
7726  * @object: a #GObject
7727  *
7728  * This function is intended for #GObject implementations to re-enforce a
7729  * <link linkend="floating-ref">floating</link> object reference.
7730  * Doing this is seldom required: all
7731  * #GInitiallyUnowned<!-- -->s are created with a floating reference which
7732  * usually just needs to be sunken by calling g_object_ref_sink().
7733  *
7734  * Since: 2.10
7735  */
7736
7737
7738 /**
7739  * g_object_freeze_notify:
7740  * @object: a #GObject
7741  *
7742  * Increases the freeze count on @object. If the freeze count is
7743  * non-zero, the emission of "notify" signals on @object is
7744  * stopped. The signals are queued until the freeze count is decreased
7745  * to zero.
7746  *
7747  * This is necessary for accessors that modify multiple properties to prevent
7748  * premature notification while the object is still being modified.
7749  */
7750
7751
7752 /**
7753  * g_object_get: (skip)
7754  * @object: a #GObject
7755  * @first_property_name: name of the first property to get
7756  * @...: return location for the first property, followed optionally by more name/return location pairs, followed by %NULL
7757  *
7758  * Gets properties of an object.
7759  *
7760  * In general, a copy is made of the property contents and the caller
7761  * is responsible for freeing the memory in the appropriate manner for
7762  * the type, for instance by calling g_free() or g_object_unref().
7763  *
7764  * <example>
7765  * <title>Using g_object_get(<!-- -->)</title>
7766  * An example of using g_object_get() to get the contents
7767  * of three properties - one of type #G_TYPE_INT,
7768  * one of type #G_TYPE_STRING, and one of type #G_TYPE_OBJECT:
7769  * <programlisting>
7770  * gint intval;
7771  * gchar *strval;
7772  * GObject *objval;
7773  *
7774  * g_object_get (my_object,
7775  * "int-property", &intval,
7776  * "str-property", &strval,
7777  * "obj-property", &objval,
7778  * NULL);
7779  *
7780  * // Do something with intval, strval, objval
7781  *
7782  * g_free (strval);
7783  * g_object_unref (objval);
7784  * </programlisting>
7785  * </example>
7786  */
7787
7788
7789 /**
7790  * g_object_get_data:
7791  * @object: #GObject containing the associations
7792  * @key: name of the key for that association
7793  *
7794  * Gets a named field from the objects table of associations (see g_object_set_data()).
7795  *
7796  * Returns: (transfer none): the data if found, or %NULL if no such data exists.
7797  */
7798
7799
7800 /**
7801  * g_object_get_property:
7802  * @object: a #GObject
7803  * @property_name: the name of the property to get
7804  * @value: return location for the property value
7805  *
7806  * Gets a property of an object. @value must have been initialized to the
7807  * expected type of the property (or a type to which the expected type can be
7808  * transformed) using g_value_init().
7809  *
7810  * In general, a copy is made of the property contents and the caller is
7811  * responsible for freeing the memory by calling g_value_unset().
7812  *
7813  * Note that g_object_get_property() is really intended for language
7814  * bindings, g_object_get() is much more convenient for C programming.
7815  */
7816
7817
7818 /**
7819  * g_object_get_qdata:
7820  * @object: The GObject to get a stored user data pointer from
7821  * @quark: A #GQuark, naming the user data pointer
7822  *
7823  * This function gets back user data pointers stored via
7824  * g_object_set_qdata().
7825  *
7826  * Returns: (transfer none): The user data pointer set, or %NULL
7827  */
7828
7829
7830 /**
7831  * g_object_get_valist: (skip)
7832  * @object: a #GObject
7833  * @first_property_name: name of the first property to get
7834  * @var_args: return location for the first property, followed optionally by more name/return location pairs, followed by %NULL
7835  *
7836  * Gets properties of an object.
7837  *
7838  * In general, a copy is made of the property contents and the caller
7839  * is responsible for freeing the memory in the appropriate manner for
7840  * the type, for instance by calling g_free() or g_object_unref().
7841  *
7842  * See g_object_get().
7843  */
7844
7845
7846 /**
7847  * g_object_interface_find_property:
7848  * @g_iface: any interface vtable for the interface, or the default vtable for the interface
7849  * @property_name: name of a property to lookup.
7850  *
7851  * Find the #GParamSpec with the given name for an
7852  * interface. Generally, the interface vtable passed in as @g_iface
7853  * will be the default vtable from g_type_default_interface_ref(), or,
7854  * if you know the interface has already been loaded,
7855  * g_type_default_interface_peek().
7856  *
7857  *
7858  * interface with the name @property_name, or %NULL if no
7859  * such property exists.
7860  *
7861  * Since: 2.4
7862  * Returns: (transfer none): the #GParamSpec for the property of the
7863  */
7864
7865
7866 /**
7867  * g_object_interface_install_property:
7868  * @g_iface: any interface vtable for the interface, or the default vtable for the interface.
7869  * @pspec: the #GParamSpec for the new property
7870  *
7871  * Add a property to an interface; this is only useful for interfaces
7872  * that are added to GObject-derived types. Adding a property to an
7873  * interface forces all objects classes with that interface to have a
7874  * compatible property. The compatible property could be a newly
7875  * created #GParamSpec, but normally
7876  * g_object_class_override_property() will be used so that the object
7877  * class only needs to provide an implementation and inherits the
7878  * property description, default value, bounds, and so forth from the
7879  * interface property.
7880  *
7881  * This function is meant to be called from the interface's default
7882  * vtable initialization function (the @class_init member of
7883  * #GTypeInfo.) It must not be called after after @class_init has
7884  * been called for any object types implementing this interface.
7885  *
7886  * Since: 2.4
7887  */
7888
7889
7890 /**
7891  * g_object_interface_list_properties:
7892  * @g_iface: any interface vtable for the interface, or the default vtable for the interface
7893  * @n_properties_p: (out): location to store number of properties returned.
7894  *
7895  * Lists the properties of an interface.Generally, the interface
7896  * vtable passed in as @g_iface will be the default vtable from
7897  * g_type_default_interface_ref(), or, if you know the interface has
7898  * already been loaded, g_type_default_interface_peek().
7899  *
7900  *
7901  * pointer to an array of pointers to #GParamSpec
7902  * structures. The paramspecs are owned by GLib, but the
7903  * array should be freed with g_free() when you are done with
7904  * it.
7905  *
7906  * Since: 2.4
7907  * Returns: (array length=n_properties_p) (transfer container): a
7908  */
7909
7910
7911 /**
7912  * g_object_is_floating:
7913  * @object: (type GObject.Object): a #GObject
7914  *
7915  * Checks whether @object has a <link linkend="floating-ref">floating</link>
7916  * reference.
7917  *
7918  * Since: 2.10
7919  * Returns: %TRUE if @object has a floating reference
7920  */
7921
7922
7923 /**
7924  * g_object_new: (skip)
7925  * @object_type: the type id of the #GObject subtype to instantiate
7926  * @first_property_name: the name of the first property
7927  * @...: the value of the first property, followed optionally by more name/value pairs, followed by %NULL
7928  *
7929  * Creates a new instance of a #GObject subtype and sets its properties.
7930  *
7931  * Construction parameters (see #G_PARAM_CONSTRUCT, #G_PARAM_CONSTRUCT_ONLY)
7932  * which are not explicitly specified are set to their default values.
7933  *
7934  * Returns: (transfer full): a new instance of @object_type
7935  */
7936
7937
7938 /**
7939  * g_object_new_valist: (skip)
7940  * @object_type: the type id of the #GObject subtype to instantiate
7941  * @first_property_name: the name of the first property
7942  * @var_args: the value of the first property, followed optionally by more name/value pairs, followed by %NULL
7943  *
7944  * Creates a new instance of a #GObject subtype and sets its properties.
7945  *
7946  * Construction parameters (see #G_PARAM_CONSTRUCT, #G_PARAM_CONSTRUCT_ONLY)
7947  * which are not explicitly specified are set to their default values.
7948  *
7949  * Returns: a new instance of @object_type
7950  */
7951
7952
7953 /**
7954  * g_object_newv:
7955  * @object_type: the type id of the #GObject subtype to instantiate
7956  * @n_parameters: the length of the @parameters array
7957  * @parameters: (array length=n_parameters): an array of #GParameter
7958  *
7959  * Creates a new instance of a #GObject subtype and sets its properties.
7960  *
7961  * Construction parameters (see #G_PARAM_CONSTRUCT, #G_PARAM_CONSTRUCT_ONLY)
7962  * which are not explicitly specified are set to their default values.
7963  *
7964  * @object_type
7965  *
7966  * Rename to: g_object_new
7967  * Returns: (type GObject.Object) (transfer full): a new instance of
7968  */
7969
7970
7971 /**
7972  * g_object_notify:
7973  * @object: a #GObject
7974  * @property_name: the name of a property installed on the class of @object.
7975  *
7976  * Emits a "notify" signal for the property @property_name on @object.
7977  *
7978  * When possible, eg. when signaling a property change from within the class
7979  * that registered the property, you should use g_object_notify_by_pspec()
7980  * instead.
7981  */
7982
7983
7984 /**
7985  * g_object_notify_by_pspec:
7986  * @object: a #GObject
7987  * @pspec: the #GParamSpec of a property installed on the class of @object.
7988  *
7989  * Emits a "notify" signal for the property specified by @pspec on @object.
7990  *
7991  * This function omits the property name lookup, hence it is faster than
7992  * g_object_notify().
7993  *
7994  * One way to avoid using g_object_notify() from within the
7995  * class that registered the properties, and using g_object_notify_by_pspec()
7996  * instead, is to store the GParamSpec used with
7997  * g_object_class_install_property() inside a static array, e.g.:
7998  *
7999  * |[
8000  * enum
8001  * {
8002  * PROP_0,
8003  * PROP_FOO,
8004  * PROP_LAST
8005  * };
8006  *
8007  * static GParamSpec *properties[PROP_LAST];
8008  *
8009  * static void
8010  * my_object_class_init (MyObjectClass *klass)
8011  * {
8012  * properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
8013  * 0, 100,
8014  * 50,
8015  * G_PARAM_READWRITE);
8016  * g_object_class_install_property (gobject_class,
8017  * PROP_FOO,
8018  * properties[PROP_FOO]);
8019  * }
8020  * ]|
8021  *
8022  * and then notify a change on the "foo" property with:
8023  *
8024  * |[
8025  * g_object_notify_by_pspec (self, properties[PROP_FOO]);
8026  * ]|
8027  *
8028  * Since: 2.26
8029  */
8030
8031
8032 /**
8033  * g_object_ref:
8034  * @object: (type GObject.Object): a #GObject
8035  *
8036  * Increases the reference count of @object.
8037  *
8038  * Returns: (type GObject.Object) (transfer none): the same @object
8039  */
8040
8041
8042 /**
8043  * g_object_ref_sink:
8044  * @object: (type GObject.Object): a #GObject
8045  *
8046  * Increase the reference count of @object, and possibly remove the
8047  * <link linkend="floating-ref">floating</link> reference, if @object
8048  * has a floating reference.
8049  *
8050  * In other words, if the object is floating, then this call "assumes
8051  * ownership" of the floating reference, converting it to a normal
8052  * reference by clearing the floating flag while leaving the reference
8053  * count unchanged.  If the object is not floating, then this call
8054  * adds a new normal reference increasing the reference count by one.
8055  *
8056  * Since: 2.10
8057  * Returns: (type GObject.Object) (transfer none): @object
8058  */
8059
8060
8061 /**
8062  * g_object_remove_toggle_ref: (skip)
8063  * @object: a #GObject
8064  * @notify: a function to call when this reference is the last reference to the object, or is no longer the last reference.
8065  * @data: data to pass to @notify
8066  *
8067  * Removes a reference added with g_object_add_toggle_ref(). The
8068  * reference count of the object is decreased by one.
8069  *
8070  * Since: 2.8
8071  */
8072
8073
8074 /**
8075  * g_object_remove_weak_pointer: (skip)
8076  * @object: The object that is weak referenced.
8077  * @weak_pointer_location: (inout): The memory address of a pointer.
8078  *
8079  * Removes a weak reference from @object that was previously added
8080  * using g_object_add_weak_pointer(). The @weak_pointer_location has
8081  * to match the one used with g_object_add_weak_pointer().
8082  */
8083
8084
8085 /**
8086  * g_object_run_dispose:
8087  * @object: a #GObject
8088  *
8089  * Releases all references to other objects. This can be used to break
8090  * reference cycles.
8091  *
8092  * This functions should only be called from object system implementations.
8093  */
8094
8095
8096 /**
8097  * g_object_set: (skip)
8098  * @object: a #GObject
8099  * @first_property_name: name of the first property to set
8100  * @...: value for the first property, followed optionally by more name/value pairs, followed by %NULL
8101  *
8102  * Sets properties on an object.
8103  */
8104
8105
8106 /**
8107  * g_object_set_data:
8108  * @object: #GObject containing the associations.
8109  * @key: name of the key
8110  * @data: data to associate with that key
8111  *
8112  * Each object carries around a table of associations from
8113  * strings to pointers.  This function lets you set an association.
8114  *
8115  * If the object already had an association with that name,
8116  * the old association will be destroyed.
8117  */
8118
8119
8120 /**
8121  * g_object_set_data_full: (skip)
8122  * @object: #GObject containing the associations
8123  * @key: name of the key
8124  * @data: data to associate with that key
8125  * @destroy: function to call when the association is destroyed
8126  *
8127  * Like g_object_set_data() except it adds notification
8128  * for when the association is destroyed, either by setting it
8129  * to a different value or when the object is destroyed.
8130  *
8131  * Note that the @destroy callback is not called if @data is %NULL.
8132  */
8133
8134
8135 /**
8136  * g_object_set_property:
8137  * @object: a #GObject
8138  * @property_name: the name of the property to set
8139  * @value: the value
8140  *
8141  * Sets a property on an object.
8142  */
8143
8144
8145 /**
8146  * g_object_set_qdata: (skip)
8147  * @object: The GObject to set store a user data pointer
8148  * @quark: A #GQuark, naming the user data pointer
8149  * @data: An opaque user data pointer
8150  *
8151  * This sets an opaque, named pointer on an object.
8152  * The name is specified through a #GQuark (retrived e.g. via
8153  * g_quark_from_static_string()), and the pointer
8154  * can be gotten back from the @object with g_object_get_qdata()
8155  * until the @object is finalized.
8156  * Setting a previously set user data pointer, overrides (frees)
8157  * the old pointer set, using #NULL as pointer essentially
8158  * removes the data stored.
8159  */
8160
8161
8162 /**
8163  * g_object_set_qdata_full: (skip)
8164  * @object: The GObject to set store a user data pointer
8165  * @quark: A #GQuark, naming the user data pointer
8166  * @data: An opaque user data pointer
8167  * @destroy: Function to invoke with @data as argument, when @data needs to be freed
8168  *
8169  * This function works like g_object_set_qdata(), but in addition,
8170  * a void (*destroy) (gpointer) function may be specified which is
8171  * called with @data as argument when the @object is finalized, or
8172  * the data is being overwritten by a call to g_object_set_qdata()
8173  * with the same @quark.
8174  */
8175
8176
8177 /**
8178  * g_object_set_valist: (skip)
8179  * @object: a #GObject
8180  * @first_property_name: name of the first property to set
8181  * @var_args: value for the first property, followed optionally by more name/value pairs, followed by %NULL
8182  *
8183  * Sets properties on an object.
8184  */
8185
8186
8187 /**
8188  * g_object_steal_data:
8189  * @object: #GObject containing the associations
8190  * @key: name of the key
8191  *
8192  * Remove a specified datum from the object's data associations,
8193  * without invoking the association's destroy handler.
8194  *
8195  * Returns: (transfer full): the data if found, or %NULL if no such data exists.
8196  */
8197
8198
8199 /**
8200  * g_object_steal_qdata:
8201  * @object: The GObject to get a stored user data pointer from
8202  * @quark: A #GQuark, naming the user data pointer
8203  *
8204  * This function gets back user data pointers stored via
8205  * g_object_set_qdata() and removes the @data from object
8206  * without invoking its destroy() function (if any was
8207  * set).
8208  * Usually, calling this function is only required to update
8209  * user data pointers with a destroy notifier, for example:
8210  * |[
8211  * void
8212  * object_add_to_user_list (GObject     *object,
8213  * const gchar *new_string)
8214  * {
8215  * // the quark, naming the object data
8216  * GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
8217  * // retrive the old string list
8218  * GList *list = g_object_steal_qdata (object, quark_string_list);
8219  *
8220  * // prepend new string
8221  * list = g_list_prepend (list, g_strdup (new_string));
8222  * // this changed 'list', so we need to set it again
8223  * g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
8224  * }
8225  * static void
8226  * free_string_list (gpointer data)
8227  * {
8228  * GList *node, *list = data;
8229  *
8230  * for (node = list; node; node = node->next)
8231  * g_free (node->data);
8232  * g_list_free (list);
8233  * }
8234  * ]|
8235  * Using g_object_get_qdata() in the above example, instead of
8236  * g_object_steal_qdata() would have left the destroy function set,
8237  * and thus the partial string list would have been freed upon
8238  * g_object_set_qdata_full().
8239  *
8240  * Returns: (transfer full): The user data pointer set, or %NULL
8241  */
8242
8243
8244 /**
8245  * g_object_thaw_notify:
8246  * @object: a #GObject
8247  *
8248  * Reverts the effect of a previous call to
8249  * g_object_freeze_notify(). The freeze count is decreased on @object
8250  * and when it reaches zero, all queued "notify" signals are emitted.
8251  *
8252  * It is an error to call this function when the freeze count is zero.
8253  */
8254
8255
8256 /**
8257  * g_object_unref:
8258  * @object: (type GObject.Object): a #GObject
8259  *
8260  * Decreases the reference count of @object. When its reference count
8261  * drops to 0, the object is finalized (i.e. its memory is freed).
8262  */
8263
8264
8265 /**
8266  * g_object_watch_closure:
8267  * @object: GObject restricting lifetime of @closure
8268  * @closure: GClosure to watch
8269  *
8270  * This function essentially limits the life time of the @closure to
8271  * the life time of the object. That is, when the object is finalized,
8272  * the @closure is invalidated by calling g_closure_invalidate() on
8273  * it, in order to prevent invocations of the closure with a finalized
8274  * (nonexisting) object. Also, g_object_ref() and g_object_unref() are
8275  * added as marshal guards to the @closure, to ensure that an extra
8276  * reference count is held on @object during invocation of the
8277  * @closure.  Usually, this function will be called on closures that
8278  * use this @object as closure data.
8279  */
8280
8281
8282 /**
8283  * g_object_weak_ref: (skip)
8284  * @object: #GObject to reference weakly
8285  * @notify: callback to invoke before the object is freed
8286  * @data: extra data to pass to notify
8287  *
8288  * Adds a weak reference callback to an object. Weak references are
8289  * used for notification when an object is finalized. They are called
8290  * "weak references" because they allow you to safely hold a pointer
8291  * to an object without calling g_object_ref() (g_object_ref() adds a
8292  * strong reference, that is, forces the object to stay alive).
8293  *
8294  * Note that the weak references created by this method are not
8295  * thread-safe: they cannot safely be used in one thread if the
8296  * object's last g_object_unref() might happen in another thread.
8297  * Use #GWeakRef if thread-safety is required.
8298  */
8299
8300
8301 /**
8302  * g_object_weak_unref: (skip)
8303  * @object: #GObject to remove a weak reference from
8304  * @notify: callback to search for
8305  * @data: data to search for
8306  *
8307  * Removes a weak reference callback to an object.
8308  */
8309
8310
8311 /**
8312  * g_param_spec_boolean: (skip)
8313  * @name: canonical name of the property specified
8314  * @nick: nick name for the property specified
8315  * @blurb: description of the property specified
8316  * @default_value: default value for the property specified
8317  * @flags: flags for the property specified
8318  *
8319  * Creates a new #GParamSpecBoolean instance specifying a %G_TYPE_BOOLEAN
8320  * property.
8321  *
8322  * See g_param_spec_internal() for details on property names.
8323  *
8324  * Returns: a newly created parameter specification
8325  */
8326
8327
8328 /**
8329  * g_param_spec_boxed: (skip)
8330  * @name: canonical name of the property specified
8331  * @nick: nick name for the property specified
8332  * @blurb: description of the property specified
8333  * @boxed_type: %G_TYPE_BOXED derived type of this property
8334  * @flags: flags for the property specified
8335  *
8336  * Creates a new #GParamSpecBoxed instance specifying a %G_TYPE_BOXED
8337  * derived property.
8338  *
8339  * See g_param_spec_internal() for details on property names.
8340  *
8341  * Returns: a newly created parameter specification
8342  */
8343
8344
8345 /**
8346  * g_param_spec_char: (skip)
8347  * @name: canonical name of the property specified
8348  * @nick: nick name for the property specified
8349  * @blurb: description of the property specified
8350  * @minimum: minimum value for the property specified
8351  * @maximum: maximum value for the property specified
8352  * @default_value: default value for the property specified
8353  * @flags: flags for the property specified
8354  *
8355  * Creates a new #GParamSpecChar instance specifying a %G_TYPE_CHAR property.
8356  *
8357  * Returns: a newly created parameter specification
8358  */
8359
8360
8361 /**
8362  * g_param_spec_double: (skip)
8363  * @name: canonical name of the property specified
8364  * @nick: nick name for the property specified
8365  * @blurb: description of the property specified
8366  * @minimum: minimum value for the property specified
8367  * @maximum: maximum value for the property specified
8368  * @default_value: default value for the property specified
8369  * @flags: flags for the property specified
8370  *
8371  * Creates a new #GParamSpecDouble instance specifying a %G_TYPE_DOUBLE
8372  * property.
8373  *
8374  * See g_param_spec_internal() for details on property names.
8375  *
8376  * Returns: a newly created parameter specification
8377  */
8378
8379
8380 /**
8381  * g_param_spec_enum: (skip)
8382  * @name: canonical name of the property specified
8383  * @nick: nick name for the property specified
8384  * @blurb: description of the property specified
8385  * @enum_type: a #GType derived from %G_TYPE_ENUM
8386  * @default_value: default value for the property specified
8387  * @flags: flags for the property specified
8388  *
8389  * Creates a new #GParamSpecEnum instance specifying a %G_TYPE_ENUM
8390  * property.
8391  *
8392  * See g_param_spec_internal() for details on property names.
8393  *
8394  * Returns: a newly created parameter specification
8395  */
8396
8397
8398 /**
8399  * g_param_spec_flags: (skip)
8400  * @name: canonical name of the property specified
8401  * @nick: nick name for the property specified
8402  * @blurb: description of the property specified
8403  * @flags_type: a #GType derived from %G_TYPE_FLAGS
8404  * @default_value: default value for the property specified
8405  * @flags: flags for the property specified
8406  *
8407  * Creates a new #GParamSpecFlags instance specifying a %G_TYPE_FLAGS
8408  * property.
8409  *
8410  * See g_param_spec_internal() for details on property names.
8411  *
8412  * Returns: a newly created parameter specification
8413  */
8414
8415
8416 /**
8417  * g_param_spec_float: (skip)
8418  * @name: canonical name of the property specified
8419  * @nick: nick name for the property specified
8420  * @blurb: description of the property specified
8421  * @minimum: minimum value for the property specified
8422  * @maximum: maximum value for the property specified
8423  * @default_value: default value for the property specified
8424  * @flags: flags for the property specified
8425  *
8426  * Creates a new #GParamSpecFloat instance specifying a %G_TYPE_FLOAT property.
8427  *
8428  * See g_param_spec_internal() for details on property names.
8429  *
8430  * Returns: a newly created parameter specification
8431  */
8432
8433
8434 /**
8435  * g_param_spec_get_blurb:
8436  * @pspec: a valid #GParamSpec
8437  *
8438  * Get the short description of a #GParamSpec.
8439  *
8440  * Returns: the short description of @pspec.
8441  */
8442
8443
8444 /**
8445  * g_param_spec_get_name:
8446  * @pspec: a valid #GParamSpec
8447  *
8448  * Get the name of a #GParamSpec.
8449  *
8450  * The name is always an "interned" string (as per g_intern_string()).
8451  * This allows for pointer-value comparisons.
8452  *
8453  * Returns: the name of @pspec.
8454  */
8455
8456
8457 /**
8458  * g_param_spec_get_nick:
8459  * @pspec: a valid #GParamSpec
8460  *
8461  * Get the nickname of a #GParamSpec.
8462  *
8463  * Returns: the nickname of @pspec.
8464  */
8465
8466
8467 /**
8468  * g_param_spec_get_qdata:
8469  * @pspec: a valid #GParamSpec
8470  * @quark: a #GQuark, naming the user data pointer
8471  *
8472  * Gets back user data pointers stored via g_param_spec_set_qdata().
8473  *
8474  * Returns: (transfer none): the user data pointer set, or %NULL
8475  */
8476
8477
8478 /**
8479  * g_param_spec_get_redirect_target:
8480  * @pspec: a #GParamSpec
8481  *
8482  * If the paramspec redirects operations to another paramspec,
8483  * returns that paramspec. Redirect is used typically for
8484  * providing a new implementation of a property in a derived
8485  * type while preserving all the properties from the parent
8486  * type. Redirection is established by creating a property
8487  * of type #GParamSpecOverride. See g_object_class_override_property()
8488  * for an example of the use of this capability.
8489  *
8490  *
8491  * paramspec should be redirected, or %NULL if none.
8492  *
8493  * Since: 2.4
8494  * Returns: (transfer none): paramspec to which requests on this
8495  */
8496
8497
8498 /**
8499  * g_param_spec_gtype: (skip)
8500  * @name: canonical name of the property specified
8501  * @nick: nick name for the property specified
8502  * @blurb: description of the property specified
8503  * @is_a_type: a #GType whose subtypes are allowed as values of the property (use %G_TYPE_NONE for any type)
8504  * @flags: flags for the property specified
8505  *
8506  * Creates a new #GParamSpecGType instance specifying a
8507  * %G_TYPE_GTYPE property.
8508  *
8509  * See g_param_spec_internal() for details on property names.
8510  *
8511  * Since: 2.10
8512  * Returns: a newly created parameter specification
8513  */
8514
8515
8516 /**
8517  * g_param_spec_int: (skip)
8518  * @name: canonical name of the property specified
8519  * @nick: nick name for the property specified
8520  * @blurb: description of the property specified
8521  * @minimum: minimum value for the property specified
8522  * @maximum: maximum value for the property specified
8523  * @default_value: default value for the property specified
8524  * @flags: flags for the property specified
8525  *
8526  * Creates a new #GParamSpecInt instance specifying a %G_TYPE_INT property.
8527  *
8528  * See g_param_spec_internal() for details on property names.
8529  *
8530  * Returns: a newly created parameter specification
8531  */
8532
8533
8534 /**
8535  * g_param_spec_int64: (skip)
8536  * @name: canonical name of the property specified
8537  * @nick: nick name for the property specified
8538  * @blurb: description of the property specified
8539  * @minimum: minimum value for the property specified
8540  * @maximum: maximum value for the property specified
8541  * @default_value: default value for the property specified
8542  * @flags: flags for the property specified
8543  *
8544  * Creates a new #GParamSpecInt64 instance specifying a %G_TYPE_INT64 property.
8545  *
8546  * See g_param_spec_internal() for details on property names.
8547  *
8548  * Returns: a newly created parameter specification
8549  */
8550
8551
8552 /**
8553  * g_param_spec_internal: (skip)
8554  * @param_type: the #GType for the property; must be derived from #G_TYPE_PARAM
8555  * @name: the canonical name of the property
8556  * @nick: the nickname of the property
8557  * @blurb: a short description of the property
8558  * @flags: a combination of #GParamFlags
8559  *
8560  * Creates a new #GParamSpec instance.
8561  *
8562  * A property name consists of segments consisting of ASCII letters and
8563  * digits, separated by either the '-' or '_' character. The first
8564  * character of a property name must be a letter. Names which violate these
8565  * rules lead to undefined behaviour.
8566  *
8567  * When creating and looking up a #GParamSpec, either separator can be
8568  * used, but they cannot be mixed. Using '-' is considerably more
8569  * efficient and in fact required when using property names as detail
8570  * strings for signals.
8571  *
8572  * Beyond the name, #GParamSpec<!-- -->s have two more descriptive
8573  * strings associated with them, the @nick, which should be suitable
8574  * for use as a label for the property in a property editor, and the
8575  * @blurb, which should be a somewhat longer description, suitable for
8576  * e.g. a tooltip. The @nick and @blurb should ideally be localized.
8577  *
8578  * Returns: a newly allocated #GParamSpec instance
8579  */
8580
8581
8582 /**
8583  * g_param_spec_long: (skip)
8584  * @name: canonical name of the property specified
8585  * @nick: nick name for the property specified
8586  * @blurb: description of the property specified
8587  * @minimum: minimum value for the property specified
8588  * @maximum: maximum value for the property specified
8589  * @default_value: default value for the property specified
8590  * @flags: flags for the property specified
8591  *
8592  * Creates a new #GParamSpecLong instance specifying a %G_TYPE_LONG property.
8593  *
8594  * See g_param_spec_internal() for details on property names.
8595  *
8596  * Returns: a newly created parameter specification
8597  */
8598
8599
8600 /**
8601  * g_param_spec_object: (skip)
8602  * @name: canonical name of the property specified
8603  * @nick: nick name for the property specified
8604  * @blurb: description of the property specified
8605  * @object_type: %G_TYPE_OBJECT derived type of this property
8606  * @flags: flags for the property specified
8607  *
8608  * Creates a new #GParamSpecBoxed instance specifying a %G_TYPE_OBJECT
8609  * derived property.
8610  *
8611  * See g_param_spec_internal() for details on property names.
8612  *
8613  * Returns: a newly created parameter specification
8614  */
8615
8616
8617 /**
8618  * g_param_spec_override: (skip)
8619  * @name: the name of the property.
8620  * @overridden: The property that is being overridden
8621  *
8622  * Creates a new property of type #GParamSpecOverride. This is used
8623  * to direct operations to another paramspec, and will not be directly
8624  * useful unless you are implementing a new base type similar to GObject.
8625  *
8626  * Since: 2.4
8627  * Returns: the newly created #GParamSpec
8628  */
8629
8630
8631 /**
8632  * g_param_spec_param: (skip)
8633  * @name: canonical name of the property specified
8634  * @nick: nick name for the property specified
8635  * @blurb: description of the property specified
8636  * @param_type: a #GType derived from %G_TYPE_PARAM
8637  * @flags: flags for the property specified
8638  *
8639  * Creates a new #GParamSpecParam instance specifying a %G_TYPE_PARAM
8640  * property.
8641  *
8642  * See g_param_spec_internal() for details on property names.
8643  *
8644  * Returns: a newly created parameter specification
8645  */
8646
8647
8648 /**
8649  * g_param_spec_pointer: (skip)
8650  * @name: canonical name of the property specified
8651  * @nick: nick name for the property specified
8652  * @blurb: description of the property specified
8653  * @flags: flags for the property specified
8654  *
8655  * Creates a new #GParamSpecPointer instance specifying a pointer property.
8656  *
8657  * See g_param_spec_internal() for details on property names.
8658  *
8659  * Returns: a newly created parameter specification
8660  */
8661
8662
8663 /**
8664  * g_param_spec_pool_insert:
8665  * @pool: a #GParamSpecPool.
8666  * @pspec: the #GParamSpec to insert
8667  * @owner_type: a #GType identifying the owner of @pspec
8668  *
8669  * Inserts a #GParamSpec in the pool.
8670  */
8671
8672
8673 /**
8674  * g_param_spec_pool_list:
8675  * @pool: a #GParamSpecPool
8676  * @owner_type: the owner to look for
8677  * @n_pspecs_p: (out): return location for the length of the returned array
8678  *
8679  * Gets an array of all #GParamSpec<!-- -->s owned by @owner_type in
8680  * the pool.
8681  *
8682  * allocated array containing pointers to all #GParamSpecs
8683  * owned by @owner_type in the pool
8684  *
8685  * Returns: (array length=n_pspecs_p) (transfer container): a newly
8686  */
8687
8688
8689 /**
8690  * g_param_spec_pool_list_owned:
8691  * @pool: a #GParamSpecPool
8692  * @owner_type: the owner to look for
8693  *
8694  * Gets an #GList of all #GParamSpec<!-- -->s owned by @owner_type in
8695  * the pool.
8696  *
8697  * #GList of all #GParamSpec<!-- -->s owned by @owner_type in
8698  * the pool#GParamSpec<!-- -->s.
8699  *
8700  * Returns: (transfer container) (element-type GObject.ParamSpec): a
8701  */
8702
8703
8704 /**
8705  * g_param_spec_pool_lookup:
8706  * @pool: a #GParamSpecPool
8707  * @param_name: the name to look for
8708  * @owner_type: the owner to look for
8709  * @walk_ancestors: If %TRUE, also try to find a #GParamSpec with @param_name owned by an ancestor of @owner_type.
8710  *
8711  * Looks up a #GParamSpec in the pool.
8712  *
8713  * matching #GParamSpec was found.
8714  *
8715  * Returns: (transfer none): The found #GParamSpec, or %NULL if no
8716  */
8717
8718
8719 /**
8720  * g_param_spec_pool_new:
8721  * @type_prefixing: Whether the pool will support type-prefixed property names.
8722  *
8723  * Creates a new #GParamSpecPool.
8724  *
8725  * If @type_prefixing is %TRUE, lookups in the newly created pool will
8726  * allow to specify the owner as a colon-separated prefix of the
8727  * property name, like "GtkContainer:border-width". This feature is
8728  * deprecated, so you should always set @type_prefixing to %FALSE.
8729  *
8730  * Returns: (transfer none): a newly allocated #GParamSpecPool.
8731  */
8732
8733
8734 /**
8735  * g_param_spec_pool_remove:
8736  * @pool: a #GParamSpecPool
8737  * @pspec: the #GParamSpec to remove
8738  *
8739  * Removes a #GParamSpec from the pool.
8740  */
8741
8742
8743 /**
8744  * g_param_spec_ref: (skip)
8745  * @pspec: a valid #GParamSpec
8746  *
8747  * Increments the reference count of @pspec.
8748  *
8749  * Returns: the #GParamSpec that was passed into this function
8750  */
8751
8752
8753 /**
8754  * g_param_spec_ref_sink: (skip)
8755  * @pspec: a valid #GParamSpec
8756  *
8757  * Convenience function to ref and sink a #GParamSpec.
8758  *
8759  * Since: 2.10
8760  * Returns: the #GParamSpec that was passed into this function
8761  */
8762
8763
8764 /**
8765  * g_param_spec_set_qdata:
8766  * @pspec: the #GParamSpec to set store a user data pointer
8767  * @quark: a #GQuark, naming the user data pointer
8768  * @data: an opaque user data pointer
8769  *
8770  * Sets an opaque, named pointer on a #GParamSpec. The name is
8771  * specified through a #GQuark (retrieved e.g. via
8772  * g_quark_from_static_string()), and the pointer can be gotten back
8773  * from the @pspec with g_param_spec_get_qdata().  Setting a
8774  * previously set user data pointer, overrides (frees) the old pointer
8775  * set, using %NULL as pointer essentially removes the data stored.
8776  */
8777
8778
8779 /**
8780  * g_param_spec_set_qdata_full: (skip)
8781  * @pspec: the #GParamSpec to set store a user data pointer
8782  * @quark: a #GQuark, naming the user data pointer
8783  * @data: an opaque user data pointer
8784  * @destroy: function to invoke with @data as argument, when @data needs to be freed
8785  *
8786  * This function works like g_param_spec_set_qdata(), but in addition,
8787  * a <literal>void (*destroy) (gpointer)</literal> function may be
8788  * specified which is called with @data as argument when the @pspec is
8789  * finalized, or the data is being overwritten by a call to
8790  * g_param_spec_set_qdata() with the same @quark.
8791  */
8792
8793
8794 /**
8795  * g_param_spec_sink:
8796  * @pspec: a valid #GParamSpec
8797  *
8798  * The initial reference count of a newly created #GParamSpec is 1,
8799  * even though no one has explicitly called g_param_spec_ref() on it
8800  * yet. So the initial reference count is flagged as "floating", until
8801  * someone calls <literal>g_param_spec_ref (pspec); g_param_spec_sink
8802  * (pspec);</literal> in sequence on it, taking over the initial
8803  * reference count (thus ending up with a @pspec that has a reference
8804  * count of 1 still, but is not flagged "floating" anymore).
8805  */
8806
8807
8808 /**
8809  * g_param_spec_steal_qdata:
8810  * @pspec: the #GParamSpec to get a stored user data pointer from
8811  * @quark: a #GQuark, naming the user data pointer
8812  *
8813  * Gets back user data pointers stored via g_param_spec_set_qdata()
8814  * and removes the @data from @pspec without invoking its destroy()
8815  * function (if any was set).  Usually, calling this function is only
8816  * required to update user data pointers with a destroy notifier.
8817  *
8818  * Returns: (transfer none): the user data pointer set, or %NULL
8819  */
8820
8821
8822 /**
8823  * g_param_spec_string: (skip)
8824  * @name: canonical name of the property specified
8825  * @nick: nick name for the property specified
8826  * @blurb: description of the property specified
8827  * @default_value: default value for the property specified
8828  * @flags: flags for the property specified
8829  *
8830  * Creates a new #GParamSpecString instance.
8831  *
8832  * See g_param_spec_internal() for details on property names.
8833  *
8834  * Returns: a newly created parameter specification
8835  */
8836
8837
8838 /**
8839  * g_param_spec_uchar: (skip)
8840  * @name: canonical name of the property specified
8841  * @nick: nick name for the property specified
8842  * @blurb: description of the property specified
8843  * @minimum: minimum value for the property specified
8844  * @maximum: maximum value for the property specified
8845  * @default_value: default value for the property specified
8846  * @flags: flags for the property specified
8847  *
8848  * Creates a new #GParamSpecUChar instance specifying a %G_TYPE_UCHAR property.
8849  *
8850  * Returns: a newly created parameter specification
8851  */
8852
8853
8854 /**
8855  * g_param_spec_uint: (skip)
8856  * @name: canonical name of the property specified
8857  * @nick: nick name for the property specified
8858  * @blurb: description of the property specified
8859  * @minimum: minimum value for the property specified
8860  * @maximum: maximum value for the property specified
8861  * @default_value: default value for the property specified
8862  * @flags: flags for the property specified
8863  *
8864  * Creates a new #GParamSpecUInt instance specifying a %G_TYPE_UINT property.
8865  *
8866  * See g_param_spec_internal() for details on property names.
8867  *
8868  * Returns: a newly created parameter specification
8869  */
8870
8871
8872 /**
8873  * g_param_spec_uint64: (skip)
8874  * @name: canonical name of the property specified
8875  * @nick: nick name for the property specified
8876  * @blurb: description of the property specified
8877  * @minimum: minimum value for the property specified
8878  * @maximum: maximum value for the property specified
8879  * @default_value: default value for the property specified
8880  * @flags: flags for the property specified
8881  *
8882  * Creates a new #GParamSpecUInt64 instance specifying a %G_TYPE_UINT64
8883  * property.
8884  *
8885  * See g_param_spec_internal() for details on property names.
8886  *
8887  * Returns: a newly created parameter specification
8888  */
8889
8890
8891 /**
8892  * g_param_spec_ulong: (skip)
8893  * @name: canonical name of the property specified
8894  * @nick: nick name for the property specified
8895  * @blurb: description of the property specified
8896  * @minimum: minimum value for the property specified
8897  * @maximum: maximum value for the property specified
8898  * @default_value: default value for the property specified
8899  * @flags: flags for the property specified
8900  *
8901  * Creates a new #GParamSpecULong instance specifying a %G_TYPE_ULONG
8902  * property.
8903  *
8904  * See g_param_spec_internal() for details on property names.
8905  *
8906  * Returns: a newly created parameter specification
8907  */
8908
8909
8910 /**
8911  * g_param_spec_unichar: (skip)
8912  * @name: canonical name of the property specified
8913  * @nick: nick name for the property specified
8914  * @blurb: description of the property specified
8915  * @default_value: default value for the property specified
8916  * @flags: flags for the property specified
8917  *
8918  * Creates a new #GParamSpecUnichar instance specifying a %G_TYPE_UINT
8919  * property. #GValue structures for this property can be accessed with
8920  * g_value_set_uint() and g_value_get_uint().
8921  *
8922  * See g_param_spec_internal() for details on property names.
8923  *
8924  * Returns: a newly created parameter specification
8925  */
8926
8927
8928 /**
8929  * g_param_spec_unref: (skip)
8930  * @pspec: a valid #GParamSpec
8931  *
8932  * Decrements the reference count of a @pspec.
8933  */
8934
8935
8936 /**
8937  * g_param_spec_value_array: (skip)
8938  * @name: canonical name of the property specified
8939  * @nick: nick name for the property specified
8940  * @blurb: description of the property specified
8941  * @element_spec: a #GParamSpec describing the elements contained in arrays of this property, may be %NULL
8942  * @flags: flags for the property specified
8943  *
8944  * Creates a new #GParamSpecValueArray instance specifying a
8945  * %G_TYPE_VALUE_ARRAY property. %G_TYPE_VALUE_ARRAY is a
8946  * %G_TYPE_BOXED type, as such, #GValue structures for this property
8947  * can be accessed with g_value_set_boxed() and g_value_get_boxed().
8948  *
8949  * See g_param_spec_internal() for details on property names.
8950  *
8951  * Returns: a newly created parameter specification
8952  */
8953
8954
8955 /**
8956  * g_param_spec_variant: (skip)
8957  * @name: canonical name of the property specified
8958  * @nick: nick name for the property specified
8959  * @blurb: description of the property specified
8960  * @type: a #GVariantType
8961  * @default_value: (allow-none): a #GVariant of type @type to use as the default value, or %NULL
8962  * @flags: flags for the property specified
8963  *
8964  * Creates a new #GParamSpecVariant instance specifying a #GVariant
8965  * property.
8966  *
8967  * If @default_value is floating, it is consumed.
8968  *
8969  * See g_param_spec_internal() for details on property names.
8970  *
8971  * Returns: the newly created #GParamSpec
8972  * Since: 2.26
8973  */
8974
8975
8976 /**
8977  * g_param_type_register_static:
8978  * @name: 0-terminated string used as the name of the new #GParamSpec type.
8979  * @pspec_info: The #GParamSpecTypeInfo for this #GParamSpec type.
8980  *
8981  * Registers @name as the name of a new static type derived from
8982  * #G_TYPE_PARAM. The type system uses the information contained in
8983  * the #GParamSpecTypeInfo structure pointed to by @info to manage the
8984  * #GParamSpec type and its instances.
8985  *
8986  * Returns: The new type identifier.
8987  */
8988
8989
8990 /**
8991  * g_param_value_convert:
8992  * @pspec: a valid #GParamSpec
8993  * @src_value: souce #GValue
8994  * @dest_value: destination #GValue of correct type for @pspec
8995  * @strict_validation: %TRUE requires @dest_value to conform to @pspec without modifications
8996  *
8997  * Transforms @src_value into @dest_value if possible, and then
8998  * validates @dest_value, in order for it to conform to @pspec.  If
8999  * @strict_validation is %TRUE this function will only succeed if the
9000  * transformed @dest_value complied to @pspec without modifications.
9001  *
9002  * See also g_value_type_transformable(), g_value_transform() and
9003  * g_param_value_validate().
9004  *
9005  * %FALSE otherwise and @dest_value is left untouched.
9006  *
9007  * Returns: %TRUE if transformation and validation were successful,
9008  */
9009
9010
9011 /**
9012  * g_param_value_defaults:
9013  * @pspec: a valid #GParamSpec
9014  * @value: a #GValue of correct type for @pspec
9015  *
9016  * Checks whether @value contains the default value as specified in @pspec.
9017  *
9018  * Returns: whether @value contains the canonical default for this @pspec
9019  */
9020
9021
9022 /**
9023  * g_param_value_set_default:
9024  * @pspec: a valid #GParamSpec
9025  * @value: a #GValue of correct type for @pspec
9026  *
9027  * Sets @value to its default value as specified in @pspec.
9028  */
9029
9030
9031 /**
9032  * g_param_value_validate:
9033  * @pspec: a valid #GParamSpec
9034  * @value: a #GValue of correct type for @pspec
9035  *
9036  * Ensures that the contents of @value comply with the specifications
9037  * set out by @pspec. For example, a #GParamSpecInt might require
9038  * that integers stored in @value may not be smaller than -42 and not be
9039  * greater than +42. If @value contains an integer outside of this range,
9040  * it is modified accordingly, so the resulting value will fit into the
9041  * range -42 .. +42.
9042  *
9043  * Returns: whether modifying @value was necessary to ensure validity
9044  */
9045
9046
9047 /**
9048  * g_param_values_cmp:
9049  * @pspec: a valid #GParamSpec
9050  * @value1: a #GValue of correct type for @pspec
9051  * @value2: a #GValue of correct type for @pspec
9052  *
9053  * Compares @value1 with @value2 according to @pspec, and return -1, 0 or +1,
9054  * if @value1 is found to be less than, equal to or greater than @value2,
9055  * respectively.
9056  *
9057  * Returns: -1, 0 or +1, for a less than, equal to or greater than result
9058  */
9059
9060
9061 /**
9062  * g_pointer_type_register_static:
9063  * @name: the name of the new pointer type.
9064  *
9065  * Creates a new %G_TYPE_POINTER derived type id for a new
9066  * pointer type with name @name.
9067  *
9068  * Returns: a new %G_TYPE_POINTER derived type id for @name.
9069  */
9070
9071
9072 /**
9073  * g_renew:
9074  * @struct_type: the type of the elements to allocate
9075  * @mem: the currently allocated memory
9076  * @n_structs: the number of elements to allocate
9077  *
9078  * Reallocates the memory pointed to by @mem, so that it now has space for
9079  * @n_structs elements of type @struct_type. It returns the new address of
9080  * the memory, which may have been moved.
9081  * Care is taken to avoid overflow when calculating the size of the allocated block.
9082  *
9083  * Returns: a pointer to the new allocated memory, cast to a pointer to @struct_type
9084  */
9085
9086
9087 /**
9088  * g_signal_accumulator_first_wins:
9089  * @ihint: standard #GSignalAccumulator parameter
9090  * @return_accu: standard #GSignalAccumulator parameter
9091  * @handler_return: standard #GSignalAccumulator parameter
9092  * @dummy: standard #GSignalAccumulator parameter
9093  *
9094  * A predefined #GSignalAccumulator for signals intended to be used as a
9095  * hook for application code to provide a particular value.  Usually
9096  * only one such value is desired and multiple handlers for the same
9097  * signal don't make much sense (except for the case of the default
9098  * handler defined in the class structure, in which case you will
9099  * usually want the signal connection to override the class handler).
9100  *
9101  * This accumulator will use the return value from the first signal
9102  * handler that is run as the return value for the signal and not run
9103  * any further handlers (ie: the first handler "wins").
9104  *
9105  * Returns: standard #GSignalAccumulator result
9106  * Since: 2.28
9107  */
9108
9109
9110 /**
9111  * g_signal_accumulator_true_handled:
9112  * @ihint: standard #GSignalAccumulator parameter
9113  * @return_accu: standard #GSignalAccumulator parameter
9114  * @handler_return: standard #GSignalAccumulator parameter
9115  * @dummy: standard #GSignalAccumulator parameter
9116  *
9117  * A predefined #GSignalAccumulator for signals that return a
9118  * boolean values. The behavior that this accumulator gives is
9119  * that a return of %TRUE stops the signal emission: no further
9120  * callbacks will be invoked, while a return of %FALSE allows
9121  * the emission to continue. The idea here is that a %TRUE return
9122  * indicates that the callback <emphasis>handled</emphasis> the signal,
9123  * and no further handling is needed.
9124  *
9125  * Since: 2.4
9126  * Returns: standard #GSignalAccumulator result
9127  */
9128
9129
9130 /**
9131  * g_signal_add_emission_hook:
9132  * @signal_id: the signal identifier, as returned by g_signal_lookup().
9133  * @detail: the detail on which to call the hook.
9134  * @hook_func: a #GSignalEmissionHook function.
9135  * @hook_data: user data for @hook_func.
9136  * @data_destroy: a #GDestroyNotify for @hook_data.
9137  *
9138  * Adds an emission hook for a signal, which will get called for any emission
9139  * of that signal, independent of the instance. This is possible only
9140  * for signals which don't have #G_SIGNAL_NO_HOOKS flag set.
9141  *
9142  * Returns: the hook id, for later use with g_signal_remove_emission_hook().
9143  */
9144
9145
9146 /**
9147  * g_signal_chain_from_overridden:
9148  * @instance_and_params: (array) the argument list of the signal emission. The first element in the array is a #GValue for the instance the signal is being emitted on. The rest are any arguments to be passed to the signal.
9149  * @return_value: Location for the return value.
9150  *
9151  * Calls the original class closure of a signal. This function should only
9152  * be called from an overridden class closure; see
9153  * g_signal_override_class_closure() and
9154  * g_signal_override_class_handler().
9155  */
9156
9157
9158 /**
9159  * g_signal_chain_from_overridden_handler:
9160  * @instance: the instance the signal is being emitted on.
9161  * @...: parameters to be passed to the parent class closure, followed by a location for the return value. If the return type of the signal is #G_TYPE_NONE, the return value location can be omitted.
9162  *
9163  * Calls the original class closure of a signal. This function should
9164  * only be called from an overridden class closure; see
9165  * g_signal_override_class_closure() and
9166  * g_signal_override_class_handler().
9167  *
9168  * Since: 2.18
9169  */
9170
9171
9172 /**
9173  * g_signal_connect:
9174  * @instance: the instance to connect to.
9175  * @detailed_signal: a string of the form "signal-name::detail".
9176  * @c_handler: the #GCallback to connect.
9177  * @data: data to pass to @c_handler calls.
9178  *
9179  * Connects a #GCallback function to a signal for a particular object.
9180  *
9181  * The handler will be called before the default handler of the signal.
9182  *
9183  * Returns: the handler id
9184  */
9185
9186
9187 /**
9188  * g_signal_connect_after:
9189  * @instance: the instance to connect to.
9190  * @detailed_signal: a string of the form "signal-name::detail".
9191  * @c_handler: the #GCallback to connect.
9192  * @data: data to pass to @c_handler calls.
9193  *
9194  * Connects a #GCallback function to a signal for a particular object.
9195  *
9196  * The handler will be called after the default handler of the signal.
9197  *
9198  * Returns: the handler id
9199  */
9200
9201
9202 /**
9203  * g_signal_connect_closure:
9204  * @instance: the instance to connect to.
9205  * @detailed_signal: a string of the form "signal-name::detail".
9206  * @closure: the closure to connect.
9207  * @after: whether the handler should be called before or after the default handler of the signal.
9208  *
9209  * Connects a closure to a signal for a particular object.
9210  *
9211  * Returns: the handler id
9212  */
9213
9214
9215 /**
9216  * g_signal_connect_closure_by_id:
9217  * @instance: the instance to connect to.
9218  * @signal_id: the id of the signal.
9219  * @detail: the detail.
9220  * @closure: the closure to connect.
9221  * @after: whether the handler should be called before or after the default handler of the signal.
9222  *
9223  * Connects a closure to a signal for a particular object.
9224  *
9225  * Returns: the handler id
9226  */
9227
9228
9229 /**
9230  * g_signal_connect_data:
9231  * @instance: the instance to connect to.
9232  * @detailed_signal: a string of the form "signal-name::detail".
9233  * @c_handler: the #GCallback to connect.
9234  * @data: data to pass to @c_handler calls.
9235  * @destroy_data: a #GClosureNotify for @data.
9236  * @connect_flags: a combination of #GConnectFlags.
9237  *
9238  * Connects a #GCallback function to a signal for a particular object. Similar
9239  * to g_signal_connect(), but allows to provide a #GClosureNotify for the data
9240  * which will be called when the signal handler is disconnected and no longer
9241  * used. Specify @connect_flags if you need <literal>..._after()</literal> or
9242  * <literal>..._swapped()</literal> variants of this function.
9243  *
9244  * Returns: the handler id
9245  */
9246
9247
9248 /**
9249  * g_signal_connect_object: (skip)
9250  * @instance: the instance to connect to.
9251  * @detailed_signal: a string of the form "signal-name::detail".
9252  * @c_handler: the #GCallback to connect.
9253  * @gobject: the object to pass as data to @c_handler.
9254  * @connect_flags: a combination of #GConnectFlags.
9255  *
9256  * This is similar to g_signal_connect_data(), but uses a closure which
9257  * ensures that the @gobject stays alive during the call to @c_handler
9258  * by temporarily adding a reference count to @gobject.
9259  *
9260  * Note that there is a bug in GObject that makes this function
9261  * much less useful than it might seem otherwise. Once @gobject is
9262  * disposed, the callback will no longer be called, but, the signal
9263  * handler is <emphasis>not</emphasis> currently disconnected. If the
9264  * @instance is itself being freed at the same time than this doesn't
9265  * matter, since the signal will automatically be removed, but
9266  * if @instance persists, then the signal handler will leak. You
9267  * should not remove the signal yourself because in a future versions of
9268  * GObject, the handler <emphasis>will</emphasis> automatically
9269  * be disconnected.
9270  *
9271  * It's possible to work around this problem in a way that will
9272  * continue to work with future versions of GObject by checking
9273  * that the signal handler is still connected before disconnected it:
9274  * <informalexample><programlisting>
9275  * if (g_signal_handler_is_connected (instance, id))
9276  * g_signal_handler_disconnect (instance, id);
9277  * </programlisting></informalexample>
9278  *
9279  * Returns: the handler id.
9280  */
9281
9282
9283 /**
9284  * g_signal_connect_swapped:
9285  * @instance: the instance to connect to.
9286  * @detailed_signal: a string of the form "signal-name::detail".
9287  * @c_handler: the #GCallback to connect.
9288  * @data: data to pass to @c_handler calls.
9289  *
9290  * Connects a #GCallback function to a signal for a particular object.
9291  *
9292  * The instance on which the signal is emitted and @data will be swapped when
9293  * calling the handler.
9294  *
9295  * Returns: the handler id
9296  */
9297
9298
9299 /**
9300  * g_signal_emit:
9301  * @instance: the instance the signal is being emitted on.
9302  * @signal_id: the signal id
9303  * @detail: the detail
9304  * @...: parameters to be passed to the signal, followed by a location for the return value. If the return type of the signal is #G_TYPE_NONE, the return value location can be omitted.
9305  *
9306  * Emits a signal.
9307  *
9308  * Note that g_signal_emit() resets the return value to the default
9309  * if no handlers are connected, in contrast to g_signal_emitv().
9310  */
9311
9312
9313 /**
9314  * g_signal_emit_by_name:
9315  * @instance: the instance the signal is being emitted on.
9316  * @detailed_signal: a string of the form "signal-name::detail".
9317  * @...: parameters to be passed to the signal, followed by a location for the return value. If the return type of the signal is #G_TYPE_NONE, the return value location can be omitted.
9318  *
9319  * Emits a signal.
9320  *
9321  * Note that g_signal_emit_by_name() resets the return value to the default
9322  * if no handlers are connected, in contrast to g_signal_emitv().
9323  */
9324
9325
9326 /**
9327  * g_signal_emit_valist:
9328  * @instance: the instance the signal is being emitted on.
9329  * @signal_id: the signal id
9330  * @detail: the detail
9331  * @var_args: a list of parameters to be passed to the signal, followed by a location for the return value. If the return type of the signal is #G_TYPE_NONE, the return value location can be omitted.
9332  *
9333  * Emits a signal.
9334  *
9335  * Note that g_signal_emit_valist() resets the return value to the default
9336  * if no handlers are connected, in contrast to g_signal_emitv().
9337  */
9338
9339
9340 /**
9341  * g_signal_emitv:
9342  * @instance_and_params: (array): argument list for the signal emission. The first element in the array is a #GValue for the instance the signal is being emitted on. The rest are any arguments to be passed to the signal.
9343  * @signal_id: the signal id
9344  * @detail: the detail
9345  * @return_value: Location to store the return value of the signal emission.
9346  *
9347  * Emits a signal.
9348  *
9349  * Note that g_signal_emitv() doesn't change @return_value if no handlers are
9350  * connected, in contrast to g_signal_emit() and g_signal_emit_valist().
9351  */
9352
9353
9354 /**
9355  * g_signal_get_invocation_hint:
9356  * @instance: the instance to query
9357  *
9358  * Returns the invocation hint of the innermost signal emission of instance.
9359  *
9360  * Returns: (transfer none): the invocation hint of the innermost signal  emission.
9361  */
9362
9363
9364 /**
9365  * g_signal_handler_block:
9366  * @instance: The instance to block the signal handler of.
9367  * @handler_id: Handler id of the handler to be blocked.
9368  *
9369  * Blocks a handler of an instance so it will not be called during any
9370  * signal emissions unless it is unblocked again. Thus "blocking" a
9371  * signal handler means to temporarily deactive it, a signal handler
9372  * has to be unblocked exactly the same amount of times it has been
9373  * blocked before to become active again.
9374  *
9375  * The @handler_id has to be a valid signal handler id, connected to a
9376  * signal of @instance.
9377  */
9378
9379
9380 /**
9381  * g_signal_handler_disconnect:
9382  * @instance: The instance to remove the signal handler from.
9383  * @handler_id: Handler id of the handler to be disconnected.
9384  *
9385  * Disconnects a handler from an instance so it will not be called during
9386  * any future or currently ongoing emissions of the signal it has been
9387  * connected to. The @handler_id becomes invalid and may be reused.
9388  *
9389  * The @handler_id has to be a valid signal handler id, connected to a
9390  * signal of @instance.
9391  */
9392
9393
9394 /**
9395  * g_signal_handler_find:
9396  * @instance: The instance owning the signal handler to be found.
9397  * @mask: Mask indicating which of @signal_id, @detail, @closure, @func and/or @data the handler has to match.
9398  * @signal_id: Signal the handler has to be connected to.
9399  * @detail: Signal detail the handler has to be connected to.
9400  * @closure: (allow-none): The closure the handler will invoke.
9401  * @func: The C closure callback of the handler (useless for non-C closures).
9402  * @data: The closure data of the handler's closure.
9403  *
9404  * Finds the first signal handler that matches certain selection criteria.
9405  * The criteria mask is passed as an OR-ed combination of #GSignalMatchType
9406  * flags, and the criteria values are passed as arguments.
9407  * The match @mask has to be non-0 for successful matches.
9408  * If no handler was found, 0 is returned.
9409  *
9410  * Returns: A valid non-0 signal handler id for a successful match.
9411  */
9412
9413
9414 /**
9415  * g_signal_handler_is_connected:
9416  * @instance: The instance where a signal handler is sought.
9417  * @handler_id: the handler id.
9418  *
9419  * Returns whether @handler_id is the id of a handler connected to @instance.
9420  *
9421  * Returns: whether @handler_id identifies a handler connected to @instance.
9422  */
9423
9424
9425 /**
9426  * g_signal_handler_unblock:
9427  * @instance: The instance to unblock the signal handler of.
9428  * @handler_id: Handler id of the handler to be unblocked.
9429  *
9430  * Undoes the effect of a previous g_signal_handler_block() call.  A
9431  * blocked handler is skipped during signal emissions and will not be
9432  * invoked, unblocking it (for exactly the amount of times it has been
9433  * blocked before) reverts its "blocked" state, so the handler will be
9434  * recognized by the signal system and is called upon future or
9435  * currently ongoing signal emissions (since the order in which
9436  * handlers are called during signal emissions is deterministic,
9437  * whether the unblocked handler in question is called as part of a
9438  * currently ongoing emission depends on how far that emission has
9439  * proceeded yet).
9440  *
9441  * The @handler_id has to be a valid id of a signal handler that is
9442  * connected to a signal of @instance and is currently blocked.
9443  */
9444
9445
9446 /**
9447  * g_signal_handlers_block_by_func:
9448  * @instance: The instance to block handlers from.
9449  * @func: The C closure callback of the handlers (useless for non-C closures).
9450  * @data: The closure data of the handlers' closures.
9451  *
9452  * Blocks all handlers on an instance that match @func and @data.
9453  *
9454  * Returns: The number of handlers that matched.
9455  */
9456
9457
9458 /**
9459  * g_signal_handlers_block_matched:
9460  * @instance: The instance to block handlers from.
9461  * @mask: Mask indicating which of @signal_id, @detail, @closure, @func and/or @data the handlers have to match.
9462  * @signal_id: Signal the handlers have to be connected to.
9463  * @detail: Signal detail the handlers have to be connected to.
9464  * @closure: (allow-none): The closure the handlers will invoke.
9465  * @func: The C closure callback of the handlers (useless for non-C closures).
9466  * @data: The closure data of the handlers' closures.
9467  *
9468  * Blocks all handlers on an instance that match a certain selection criteria.
9469  * The criteria mask is passed as an OR-ed combination of #GSignalMatchType
9470  * flags, and the criteria values are passed as arguments.
9471  * Passing at least one of the %G_SIGNAL_MATCH_CLOSURE, %G_SIGNAL_MATCH_FUNC
9472  * or %G_SIGNAL_MATCH_DATA match flags is required for successful matches.
9473  * If no handlers were found, 0 is returned, the number of blocked handlers
9474  * otherwise.
9475  *
9476  * Returns: The number of handlers that matched.
9477  */
9478
9479
9480 /**
9481  * g_signal_handlers_disconnect_by_data:
9482  * @instance: The instance to remove handlers from
9483  * @data: the closure data of the handlers' closures
9484  *
9485  * Disconnects all handlers on an instance that match @data.
9486  *
9487  * Returns: The number of handlers that matched.
9488  * Since: 2.32
9489  */
9490
9491
9492 /**
9493  * g_signal_handlers_disconnect_by_func:
9494  * @instance: The instance to remove handlers from.
9495  * @func: The C closure callback of the handlers (useless for non-C closures).
9496  * @data: The closure data of the handlers' closures.
9497  *
9498  * Disconnects all handlers on an instance that match @func and @data.
9499  *
9500  * Returns: The number of handlers that matched.
9501  */
9502
9503
9504 /**
9505  * g_signal_handlers_disconnect_matched:
9506  * @instance: The instance to remove handlers from.
9507  * @mask: Mask indicating which of @signal_id, @detail, @closure, @func and/or @data the handlers have to match.
9508  * @signal_id: Signal the handlers have to be connected to.
9509  * @detail: Signal detail the handlers have to be connected to.
9510  * @closure: (allow-none): The closure the handlers will invoke.
9511  * @func: The C closure callback of the handlers (useless for non-C closures).
9512  * @data: The closure data of the handlers' closures.
9513  *
9514  * Disconnects all handlers on an instance that match a certain
9515  * selection criteria. The criteria mask is passed as an OR-ed
9516  * combination of #GSignalMatchType flags, and the criteria values are
9517  * passed as arguments.  Passing at least one of the
9518  * %G_SIGNAL_MATCH_CLOSURE, %G_SIGNAL_MATCH_FUNC or
9519  * %G_SIGNAL_MATCH_DATA match flags is required for successful
9520  * matches.  If no handlers were found, 0 is returned, the number of
9521  * disconnected handlers otherwise.
9522  *
9523  * Returns: The number of handlers that matched.
9524  */
9525
9526
9527 /**
9528  * g_signal_handlers_unblock_by_func:
9529  * @instance: The instance to unblock handlers from.
9530  * @func: The C closure callback of the handlers (useless for non-C closures).
9531  * @data: The closure data of the handlers' closures.
9532  *
9533  * Unblocks all handlers on an instance that match @func and @data.
9534  *
9535  * Returns: The number of handlers that matched.
9536  */
9537
9538
9539 /**
9540  * g_signal_handlers_unblock_matched:
9541  * @instance: The instance to unblock handlers from.
9542  * @mask: Mask indicating which of @signal_id, @detail, @closure, @func and/or @data the handlers have to match.
9543  * @signal_id: Signal the handlers have to be connected to.
9544  * @detail: Signal detail the handlers have to be connected to.
9545  * @closure: (allow-none): The closure the handlers will invoke.
9546  * @func: The C closure callback of the handlers (useless for non-C closures).
9547  * @data: The closure data of the handlers' closures.
9548  *
9549  * Unblocks all handlers on an instance that match a certain selection
9550  * criteria. The criteria mask is passed as an OR-ed combination of
9551  * #GSignalMatchType flags, and the criteria values are passed as arguments.
9552  * Passing at least one of the %G_SIGNAL_MATCH_CLOSURE, %G_SIGNAL_MATCH_FUNC
9553  * or %G_SIGNAL_MATCH_DATA match flags is required for successful matches.
9554  * If no handlers were found, 0 is returned, the number of unblocked handlers
9555  * otherwise. The match criteria should not apply to any handlers that are
9556  * not currently blocked.
9557  *
9558  * Returns: The number of handlers that matched.
9559  */
9560
9561
9562 /**
9563  * g_signal_has_handler_pending:
9564  * @instance: the object whose signal handlers are sought.
9565  * @signal_id: the signal id.
9566  * @detail: the detail.
9567  * @may_be_blocked: whether blocked handlers should count as match.
9568  *
9569  * Returns whether there are any handlers connected to @instance for the
9570  * given signal id and detail.
9571  *
9572  * One example of when you might use this is when the arguments to the
9573  * signal are difficult to compute. A class implementor may opt to not
9574  * emit the signal if no one is attached anyway, thus saving the cost
9575  * of building the arguments.
9576  *
9577  * otherwise.
9578  *
9579  * Returns: %TRUE if a handler is connected to the signal, %FALSE
9580  */
9581
9582
9583 /**
9584  * g_signal_list_ids:
9585  * @itype: Instance or interface type.
9586  * @n_ids: Location to store the number of signal ids for @itype.
9587  *
9588  * Lists the signals by id that a certain instance or interface type
9589  * created. Further information about the signals can be acquired through
9590  * g_signal_query().
9591  *
9592  * Returns: (array length=n_ids): Newly allocated array of signal IDs.
9593  */
9594
9595
9596 /**
9597  * g_signal_lookup:
9598  * @name: the signal's name.
9599  * @itype: the type that the signal operates on.
9600  *
9601  * Given the name of the signal and the type of object it connects to, gets
9602  * the signal's identifying integer. Emitting the signal by number is
9603  * somewhat faster than using the name each time.
9604  *
9605  * Also tries the ancestors of the given type.
9606  *
9607  * See g_signal_new() for details on allowed signal names.
9608  *
9609  * Returns: the signal's identifying number, or 0 if no signal was found.
9610  */
9611
9612
9613 /**
9614  * g_signal_name:
9615  * @signal_id: the signal's identifying number.
9616  *
9617  * Given the signal's identifier, finds its name.
9618  *
9619  * Two different signals may have the same name, if they have differing types.
9620  *
9621  * Returns: the signal name, or %NULL if the signal number was invalid.
9622  */
9623
9624
9625 /**
9626  * g_signal_new:
9627  * @signal_name: the name for the signal
9628  * @itype: the type this signal pertains to. It will also pertain to types which are derived from this type.
9629  * @signal_flags: a combination of #GSignalFlags specifying detail of when the default handler is to be invoked. You should at least specify %G_SIGNAL_RUN_FIRST or %G_SIGNAL_RUN_LAST.
9630  * @class_offset: The offset of the function pointer in the class structure for this type. Used to invoke a class method generically. Pass 0 to not associate a class method slot with this signal.
9631  * @accumulator: the accumulator for this signal; may be %NULL.
9632  * @accu_data: user data for the @accumulator.
9633  * @c_marshaller: (allow-none): the function to translate arrays of parameter values to signal emissions into C language callback invocations or %NULL.
9634  * @return_type: the type of return value, or #G_TYPE_NONE for a signal without a return value.
9635  * @n_params: the number of parameter types to follow.
9636  * @...: a list of types, one for each parameter.
9637  *
9638  * Creates a new signal. (This is usually done in the class initializer.)
9639  *
9640  * A signal name consists of segments consisting of ASCII letters and
9641  * digits, separated by either the '-' or '_' character. The first
9642  * character of a signal name must be a letter. Names which violate these
9643  * rules lead to undefined behaviour of the GSignal system.
9644  *
9645  * When registering a signal and looking up a signal, either separator can
9646  * be used, but they cannot be mixed.
9647  *
9648  * If 0 is used for @class_offset subclasses cannot override the class handler
9649  * in their <code>class_init</code> method by doing
9650  * <code>super_class->signal_handler = my_signal_handler</code>. Instead they
9651  * will have to use g_signal_override_class_handler().
9652  *
9653  * If c_marshaller is %NULL, g_cclosure_marshal_generic() will be used as
9654  * the marshaller for this signal.
9655  *
9656  * Returns: the signal id
9657  */
9658
9659
9660 /**
9661  * g_signal_new_class_handler:
9662  * @signal_name: the name for the signal
9663  * @itype: the type this signal pertains to. It will also pertain to types which are derived from this type.
9664  * @signal_flags: a combination of #GSignalFlags specifying detail of when the default handler is to be invoked. You should at least specify %G_SIGNAL_RUN_FIRST or %G_SIGNAL_RUN_LAST.
9665  * @class_handler: a #GCallback which acts as class implementation of this signal. Used to invoke a class method generically. Pass %NULL to not associate a class method with this signal.
9666  * @accumulator: the accumulator for this signal; may be %NULL.
9667  * @accu_data: user data for the @accumulator.
9668  * @c_marshaller: (allow-none): the function to translate arrays of parameter values to signal emissions into C language callback invocations or %NULL.
9669  * @return_type: the type of return value, or #G_TYPE_NONE for a signal without a return value.
9670  * @n_params: the number of parameter types to follow.
9671  * @...: a list of types, one for each parameter.
9672  *
9673  * Creates a new signal. (This is usually done in the class initializer.)
9674  *
9675  * This is a variant of g_signal_new() that takes a C callback instead
9676  * off a class offset for the signal's class handler. This function
9677  * doesn't need a function pointer exposed in the class structure of
9678  * an object definition, instead the function pointer is passed
9679  * directly and can be overriden by derived classes with
9680  * g_signal_override_class_closure() or
9681  * g_signal_override_class_handler()and chained to with
9682  * g_signal_chain_from_overridden() or
9683  * g_signal_chain_from_overridden_handler().
9684  *
9685  * See g_signal_new() for information about signal names.
9686  *
9687  * If c_marshaller is %NULL @g_cclosure_marshal_generic will be used as
9688  * the marshaller for this signal.
9689  *
9690  * Returns: the signal id
9691  * Since: 2.18
9692  */
9693
9694
9695 /**
9696  * g_signal_new_valist:
9697  * @signal_name: the name for the signal
9698  * @itype: the type this signal pertains to. It will also pertain to types which are derived from this type.
9699  * @signal_flags: a combination of #GSignalFlags specifying detail of when the default handler is to be invoked. You should at least specify %G_SIGNAL_RUN_FIRST or %G_SIGNAL_RUN_LAST.
9700  * @class_closure: The closure to invoke on signal emission; may be %NULL.
9701  * @accumulator: the accumulator for this signal; may be %NULL.
9702  * @accu_data: user data for the @accumulator.
9703  * @c_marshaller: (allow-none): the function to translate arrays of parameter values to signal emissions into C language callback invocations or %NULL.
9704  * @return_type: the type of return value, or #G_TYPE_NONE for a signal without a return value.
9705  * @n_params: the number of parameter types in @args.
9706  * @args: va_list of #GType, one for each parameter.
9707  *
9708  * Creates a new signal. (This is usually done in the class initializer.)
9709  *
9710  * See g_signal_new() for details on allowed signal names.
9711  *
9712  * If c_marshaller is %NULL, g_cclosure_marshal_generic() will be used as
9713  * the marshaller for this signal.
9714  *
9715  * Returns: the signal id
9716  */
9717
9718
9719 /**
9720  * g_signal_newv:
9721  * @signal_name: the name for the signal
9722  * @itype: the type this signal pertains to. It will also pertain to types which are derived from this type
9723  * @signal_flags: a combination of #GSignalFlags specifying detail of when the default handler is to be invoked. You should at least specify %G_SIGNAL_RUN_FIRST or %G_SIGNAL_RUN_LAST
9724  * @class_closure: (allow-none): The closure to invoke on signal emission; may be %NULL
9725  * @accumulator: (allow-none): the accumulator for this signal; may be %NULL
9726  * @accu_data: user data for the @accumulator
9727  * @c_marshaller: (allow-none): the function to translate arrays of parameter values to signal emissions into C language callback invocations or %NULL
9728  * @return_type: the type of return value, or #G_TYPE_NONE for a signal without a return value
9729  * @n_params: the length of @param_types
9730  * @param_types: (array length=n_params): an array of types, one for each parameter
9731  *
9732  * Creates a new signal. (This is usually done in the class initializer.)
9733  *
9734  * See g_signal_new() for details on allowed signal names.
9735  *
9736  * If c_marshaller is %NULL @g_cclosure_marshal_generic will be used as
9737  * the marshaller for this signal.
9738  *
9739  * Returns: the signal id
9740  */
9741
9742
9743 /**
9744  * g_signal_override_class_closure:
9745  * @signal_id: the signal id
9746  * @instance_type: the instance type on which to override the class closure for the signal.
9747  * @class_closure: the closure.
9748  *
9749  * Overrides the class closure (i.e. the default handler) for the given signal
9750  * for emissions on instances of @instance_type. @instance_type must be derived
9751  * from the type to which the signal belongs.
9752  *
9753  * See g_signal_chain_from_overridden() and
9754  * g_signal_chain_from_overridden_handler() for how to chain up to the
9755  * parent class closure from inside the overridden one.
9756  */
9757
9758
9759 /**
9760  * g_signal_override_class_handler:
9761  * @signal_name: the name for the signal
9762  * @instance_type: the instance type on which to override the class handler for the signal.
9763  * @class_handler: the handler.
9764  *
9765  * Overrides the class closure (i.e. the default handler) for the
9766  * given signal for emissions on instances of @instance_type with
9767  * callabck @class_handler. @instance_type must be derived from the
9768  * type to which the signal belongs.
9769  *
9770  * See g_signal_chain_from_overridden() and
9771  * g_signal_chain_from_overridden_handler() for how to chain up to the
9772  * parent class closure from inside the overridden one.
9773  *
9774  * Since: 2.18
9775  */
9776
9777
9778 /**
9779  * g_signal_parse_name:
9780  * @detailed_signal: a string of the form "signal-name::detail".
9781  * @itype: The interface/instance type that introduced "signal-name".
9782  * @signal_id_p: (out): Location to store the signal id.
9783  * @detail_p: (out): Location to store the detail quark.
9784  * @force_detail_quark: %TRUE forces creation of a #GQuark for the detail.
9785  *
9786  * Internal function to parse a signal name into its @signal_id
9787  * and @detail quark.
9788  *
9789  * Returns: Whether the signal name could successfully be parsed and @signal_id_p and @detail_p contain valid return values.
9790  */
9791
9792
9793 /**
9794  * g_signal_query:
9795  * @signal_id: The signal id of the signal to query information for.
9796  * @query: (out caller-allocates): A user provided structure that is filled in with constant values upon success.
9797  *
9798  * Queries the signal system for in-depth information about a
9799  * specific signal. This function will fill in a user-provided
9800  * structure to hold signal-specific information. If an invalid
9801  * signal id is passed in, the @signal_id member of the #GSignalQuery
9802  * is 0. All members filled into the #GSignalQuery structure should
9803  * be considered constant and have to be left untouched.
9804  */
9805
9806
9807 /**
9808  * g_signal_remove_emission_hook:
9809  * @signal_id: the id of the signal
9810  * @hook_id: the id of the emission hook, as returned by g_signal_add_emission_hook()
9811  *
9812  * Deletes an emission hook.
9813  */
9814
9815
9816 /**
9817  * g_signal_stop_emission:
9818  * @instance: the object whose signal handlers you wish to stop.
9819  * @signal_id: the signal identifier, as returned by g_signal_lookup().
9820  * @detail: the detail which the signal was emitted with.
9821  *
9822  * Stops a signal's current emission.
9823  *
9824  * This will prevent the default method from running, if the signal was
9825  * %G_SIGNAL_RUN_LAST and you connected normally (i.e. without the "after"
9826  * flag).
9827  *
9828  * Prints a warning if used on a signal which isn't being emitted.
9829  */
9830
9831
9832 /**
9833  * g_signal_stop_emission_by_name:
9834  * @instance: the object whose signal handlers you wish to stop.
9835  * @detailed_signal: a string of the form "signal-name::detail".
9836  *
9837  * Stops a signal's current emission.
9838  *
9839  * This is just like g_signal_stop_emission() except it will look up the
9840  * signal id for you.
9841  */
9842
9843
9844 /**
9845  * g_signal_type_cclosure_new:
9846  * @itype: the #GType identifier of an interface or classed type
9847  * @struct_offset: the offset of the member function of @itype's class structure which is to be invoked by the new closure
9848  *
9849  * Creates a new closure which invokes the function found at the offset
9850  * @struct_offset in the class structure of the interface or classed type
9851  * identified by @itype.
9852  *
9853  * Returns: a new #GCClosure
9854  */
9855
9856
9857 /**
9858  * g_source_set_closure:
9859  * @source: the source
9860  * @closure: a #GClosure
9861  *
9862  * Set the callback for a source as a #GClosure.
9863  *
9864  * If the source is not one of the standard GLib types, the @closure_callback
9865  * and @closure_marshal fields of the #GSourceFuncs structure must have been
9866  * filled in with pointers to appropriate functions.
9867  */
9868
9869
9870 /**
9871  * g_source_set_dummy_callback:
9872  * @source: the source
9873  *
9874  * Sets a dummy callback for @source. The callback will do nothing, and
9875  * if the source expects a #gboolean return value, it will return %TRUE.
9876  * (If the source expects any other type of return value, it will return
9877  * a 0/%NULL value; whatever g_value_init() initializes a #GValue to for
9878  * that type.)
9879  *
9880  * If the source is not one of the standard GLib types, the
9881  * @closure_callback and @closure_marshal fields of the #GSourceFuncs
9882  * structure must have been filled in with pointers to appropriate
9883  * functions.
9884  */
9885
9886
9887 /**
9888  * g_strdup_value_contents:
9889  * @value: #GValue which contents are to be described.
9890  *
9891  * Return a newly allocated string, which describes the contents of a
9892  * #GValue.  The main purpose of this function is to describe #GValue
9893  * contents for debugging output, the way in which the contents are
9894  * described may change between different GLib versions.
9895  *
9896  * Returns: Newly allocated string.
9897  */
9898
9899
9900 /**
9901  * g_try_new:
9902  * @struct_type: the type of the elements to allocate
9903  * @n_structs: the number of elements to allocate
9904  *
9905  * Attempts to allocate @n_structs elements of type @struct_type, and returns
9906  * %NULL on failure. Contrast with g_new(), which aborts the program on failure.
9907  * The returned pointer is cast to a pointer to the given type.
9908  * The function returns %NULL when @n_structs is 0 of if an overflow occurs.
9909  *
9910  * Since: 2.8
9911  * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type
9912  */
9913
9914
9915 /**
9916  * g_try_new0:
9917  * @struct_type: the type of the elements to allocate
9918  * @n_structs: the number of elements to allocate
9919  *
9920  * Attempts to allocate @n_structs elements of type @struct_type, initialized
9921  * to 0's, and returns %NULL on failure. Contrast with g_new0(), which aborts
9922  * the program on failure.
9923  * The returned pointer is cast to a pointer to the given type.
9924  * The function returns %NULL when @n_structs is 0 of if an overflow occurs.
9925  *
9926  * Since: 2.8
9927  * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type
9928  */
9929
9930
9931 /**
9932  * g_try_renew:
9933  * @struct_type: the type of the elements to allocate
9934  * @mem: the currently allocated memory
9935  * @n_structs: the number of elements to allocate
9936  *
9937  * Attempts to reallocate the memory pointed to by @mem, so that it now has
9938  * space for @n_structs elements of type @struct_type, and returns %NULL on
9939  * failure. Contrast with g_renew(), which aborts the program on failure.
9940  * It returns the new address of the memory, which may have been moved.
9941  * The function returns %NULL if an overflow occurs.
9942  *
9943  * Since: 2.8
9944  * Returns: a pointer to the new allocated memory, cast to a pointer to @struct_type
9945  */
9946
9947
9948 /**
9949  * g_type_add_class_cache_func: (skip)
9950  * @cache_data: data to be passed to @cache_func
9951  * @cache_func: a #GTypeClassCacheFunc
9952  *
9953  * Adds a #GTypeClassCacheFunc to be called before the reference count of a
9954  * class goes from one to zero. This can be used to prevent premature class
9955  * destruction. All installed #GTypeClassCacheFunc functions will be chained
9956  * until one of them returns %TRUE. The functions have to check the class id
9957  * passed in to figure whether they actually want to cache the class of this
9958  * type, since all classes are routed through the same #GTypeClassCacheFunc
9959  * chain.
9960  */
9961
9962
9963 /**
9964  * g_type_add_class_private:
9965  * @class_type: GType of an classed type.
9966  * @private_size: size of private structure.
9967  *
9968  * Registers a private class structure for a classed type;
9969  * when the class is allocated, the private structures for
9970  * the class and all of its parent types are allocated
9971  * sequentially in the same memory block as the public
9972  * structures. This function should be called in the
9973  * type's get_type() function after the type is registered.
9974  * The private structure can be retrieved using the
9975  * G_TYPE_CLASS_GET_PRIVATE() macro.
9976  *
9977  * Since: 2.24
9978  */
9979
9980
9981 /**
9982  * g_type_add_interface_check: (skip)
9983  * @check_data: data to pass to @check_func
9984  * @check_func: function to be called after each interface is initialized.
9985  *
9986  * Adds a function to be called after an interface vtable is
9987  * initialized for any class (i.e. after the @interface_init member of
9988  * #GInterfaceInfo has been called).
9989  *
9990  * This function is useful when you want to check an invariant that
9991  * depends on the interfaces of a class. For instance, the
9992  * implementation of #GObject uses this facility to check that an
9993  * object implements all of the properties that are defined on its
9994  * interfaces.
9995  *
9996  * Since: 2.4
9997  */
9998
9999
10000 /**
10001  * g_type_add_interface_dynamic:
10002  * @instance_type: the #GType value of an instantiable type.
10003  * @interface_type: the #GType value of an interface type.
10004  * @plugin: the #GTypePlugin structure to retrieve the #GInterfaceInfo from.
10005  *
10006  * Adds the dynamic @interface_type to @instantiable_type. The information
10007  * contained in the #GTypePlugin structure pointed to by @plugin
10008  * is used to manage the relationship.
10009  */
10010
10011
10012 /**
10013  * g_type_add_interface_static:
10014  * @instance_type: #GType value of an instantiable type.
10015  * @interface_type: #GType value of an interface type.
10016  * @info: The #GInterfaceInfo structure for this (@instance_type, @interface_type) combination.
10017  *
10018  * Adds the static @interface_type to @instantiable_type.  The
10019  * information contained in the #GInterfaceInfo structure pointed to by
10020  * @info is used to manage the relationship.
10021  */
10022
10023
10024 /**
10025  * g_type_check_instance:
10026  * @instance: A valid #GTypeInstance structure.
10027  * @Returns: #TRUE if @instance is valid, #FALSE otherwise.
10028  *
10029  * Private helper function to aid implementation of the G_TYPE_CHECK_INSTANCE()
10030  * macro.
10031  */
10032
10033
10034 /**
10035  * g_type_children:
10036  * @type: The parent type.
10037  * @n_children: (out) (allow-none): Optional #guint pointer to contain the number of child types.
10038  *
10039  * Return a newly allocated and 0-terminated array of type IDs, listing the
10040  * child types of @type. The return value has to be g_free()ed after use.
10041  *
10042  * and 0-terminated array of child types.
10043  *
10044  * Returns: (array length=n_children) (transfer full): Newly allocated
10045  */
10046
10047
10048 /**
10049  * g_type_class_add_private:
10050  * @g_class: class structure for an instantiatable type
10051  * @private_size: size of private structure.
10052  *
10053  * Registers a private structure for an instantiatable type.
10054  *
10055  * When an object is allocated, the private structures for
10056  * the type and all of its parent types are allocated
10057  * sequentially in the same memory block as the public
10058  * structures.
10059  *
10060  * Note that the accumulated size of the private structures of
10061  * a type and all its parent types cannot excced 64 KiB.
10062  *
10063  * This function should be called in the type's class_init() function.
10064  * The private structure can be retrieved using the
10065  * G_TYPE_INSTANCE_GET_PRIVATE() macro.
10066  *
10067  * The following example shows attaching a private structure
10068  * <structname>MyObjectPrivate</structname> to an object
10069  * <structname>MyObject</structname> defined in the standard GObject
10070  * fashion.
10071  * type's class_init() function.
10072  * Note the use of a structure member "priv" to avoid the overhead
10073  * of repeatedly calling MY_OBJECT_GET_PRIVATE().
10074  *
10075  * |[
10076  * typedef struct _MyObject        MyObject;
10077  * typedef struct _MyObjectPrivate MyObjectPrivate;
10078  *
10079  * struct _MyObject {
10080  * GObject parent;
10081  *
10082  * MyObjectPrivate *priv;
10083  * };
10084  *
10085  * struct _MyObjectPrivate {
10086  * int some_field;
10087  * };
10088  *
10089  * static void
10090  * my_object_class_init (MyObjectClass *klass)
10091  * {
10092  * g_type_class_add_private (klass, sizeof (MyObjectPrivate));
10093  * }
10094  *
10095  * static void
10096  * my_object_init (MyObject *my_object)
10097  * {
10098  * my_object->priv = G_TYPE_INSTANCE_GET_PRIVATE (my_object,
10099  * MY_TYPE_OBJECT,
10100  * MyObjectPrivate);
10101  * }
10102  *
10103  * static int
10104  * my_object_get_some_field (MyObject *my_object)
10105  * {
10106  * MyObjectPrivate *priv;
10107  *
10108  * g_return_val_if_fail (MY_IS_OBJECT (my_object), 0);
10109  *
10110  * priv = my_object->priv;
10111  *
10112  * return priv->some_field;
10113  * }
10114  * ]|
10115  *
10116  * Since: 2.4
10117  */
10118
10119
10120 /**
10121  * g_type_class_peek:
10122  * @type: Type ID of a classed type.
10123  *
10124  * This function is essentially the same as g_type_class_ref(), except that
10125  * the classes reference count isn't incremented. As a consequence, this function
10126  * may return %NULL if the class of the type passed in does not currently
10127  * exist (hasn't been referenced before).
10128  *
10129  * structure for the given type ID or %NULL if the class does not
10130  * currently exist.
10131  *
10132  * Returns: (type GObject.TypeClass) (transfer none): The #GTypeClass
10133  */
10134
10135
10136 /**
10137  * g_type_class_peek_parent:
10138  * @g_class: (type GObject.TypeClass): The #GTypeClass structure to retrieve the parent class for.
10139  *
10140  * This is a convenience function often needed in class initializers.
10141  * It returns the class structure of the immediate parent type of the
10142  * class passed in.  Since derived classes hold a reference count on
10143  * their parent classes as long as they are instantiated, the returned
10144  * class will always exist. This function is essentially equivalent
10145  * to:
10146  *
10147  * <programlisting>
10148  * g_type_class_peek (g_type_parent (G_TYPE_FROM_CLASS (g_class)));
10149  * </programlisting>
10150  *
10151  * of @g_class.
10152  *
10153  * Returns: (type GObject.TypeClass) (transfer none): The parent class
10154  */
10155
10156
10157 /**
10158  * g_type_class_peek_static:
10159  * @type: Type ID of a classed type.
10160  *
10161  * A more efficient version of g_type_class_peek() which works only for
10162  * static types.
10163  *
10164  * structure for the given type ID or %NULL if the class does not
10165  * currently exist or is dynamically loaded.
10166  *
10167  * Since: 2.4
10168  * Returns: (type GObject.TypeClass) (transfer none): The #GTypeClass
10169  */
10170
10171
10172 /**
10173  * g_type_class_ref:
10174  * @type: Type ID of a classed type.
10175  *
10176  * Increments the reference count of the class structure belonging to
10177  * @type. This function will demand-create the class if it doesn't
10178  * exist already.
10179  *
10180  * structure for the given type ID.
10181  *
10182  * Returns: (type GObject.TypeClass) (transfer none): The #GTypeClass
10183  */
10184
10185
10186 /**
10187  * g_type_class_unref:
10188  * @g_class: (type GObject.TypeClass): The #GTypeClass structure to unreference.
10189  *
10190  * Decrements the reference count of the class structure being passed in.
10191  * Once the last reference count of a class has been released, classes
10192  * may be finalized by the type system, so further dereferencing of a
10193  * class pointer after g_type_class_unref() are invalid.
10194  */
10195
10196
10197 /**
10198  * g_type_class_unref_uncached: (skip)
10199  * @g_class: (type GObject.TypeClass): The #GTypeClass structure to unreference.
10200  *
10201  * A variant of g_type_class_unref() for use in #GTypeClassCacheFunc
10202  * implementations. It unreferences a class without consulting the chain
10203  * of #GTypeClassCacheFunc<!-- -->s, avoiding the recursion which would occur
10204  * otherwise.
10205  */
10206
10207
10208 /**
10209  * g_type_create_instance: (skip)
10210  * @type: An instantiatable type to create an instance for.
10211  *
10212  * Creates and initializes an instance of @type if @type is valid and
10213  * can be instantiated. The type system only performs basic allocation
10214  * and structure setups for instances: actual instance creation should
10215  * happen through functions supplied by the type's fundamental type
10216  * implementation.  So use of g_type_create_instance() is reserved for
10217  * implementators of fundamental types only. E.g. instances of the
10218  * #GObject hierarchy should be created via g_object_new() and
10219  * <emphasis>never</emphasis> directly through
10220  * g_type_create_instance() which doesn't handle things like singleton
10221  * objects or object construction.  Note: Do <emphasis>not</emphasis>
10222  * use this function, unless you're implementing a fundamental
10223  * type. Also language bindings should <emphasis>not</emphasis> use
10224  * this function but g_object_new() instead.
10225  *
10226  * treatment by the fundamental type implementation.
10227  *
10228  * Returns: An allocated and initialized instance, subject to further
10229  */
10230
10231
10232 /**
10233  * g_type_default_interface_peek:
10234  * @g_type: an interface type
10235  *
10236  * If the interface type @g_type is currently in use, returns its
10237  * default interface vtable.
10238  *
10239  *
10240  * vtable for the interface, or %NULL if the type is not currently in
10241  * use.
10242  *
10243  * Since: 2.4
10244  * Returns: (type GObject.TypeInterface) (transfer none): the default
10245  */
10246
10247
10248 /**
10249  * g_type_default_interface_ref:
10250  * @g_type: an interface type
10251  *
10252  * Increments the reference count for the interface type @g_type,
10253  * and returns the default interface vtable for the type.
10254  *
10255  * If the type is not currently in use, then the default vtable
10256  * for the type will be created and initalized by calling
10257  * the base interface init and default vtable init functions for
10258  * the type (the @<structfield>base_init</structfield>
10259  * and <structfield>class_init</structfield> members of #GTypeInfo).
10260  * Calling g_type_default_interface_ref() is useful when you
10261  * want to make sure that signals and properties for an interface
10262  * have been installed.
10263  *
10264  *
10265  * vtable for the interface; call g_type_default_interface_unref()
10266  * when you are done using the interface.
10267  *
10268  * Since: 2.4
10269  * Returns: (type GObject.TypeInterface) (transfer none): the default
10270  */
10271
10272
10273 /**
10274  * g_type_default_interface_unref:
10275  * @g_iface: (type GObject.TypeInterface): the default vtable structure for a interface, as returned by g_type_default_interface_ref()
10276  *
10277  * Decrements the reference count for the type corresponding to the
10278  * interface default vtable @g_iface. If the type is dynamic, then
10279  * when no one is using the interface and all references have
10280  * been released, the finalize function for the interface's default
10281  * vtable (the <structfield>class_finalize</structfield> member of
10282  * #GTypeInfo) will be called.
10283  *
10284  * Since: 2.4
10285  */
10286
10287
10288 /**
10289  * g_type_depth:
10290  * @type: A #GType value.
10291  *
10292  * Returns the length of the ancestry of the passed in type. This
10293  * includes the type itself, so that e.g. a fundamental type has depth 1.
10294  *
10295  * Returns: The depth of @type.
10296  */
10297
10298
10299 /**
10300  * g_type_free_instance:
10301  * @instance: an instance of a type.
10302  *
10303  * Frees an instance of a type, returning it to the instance pool for
10304  * the type, if there is one.
10305  *
10306  * Like g_type_create_instance(), this function is reserved for
10307  * implementors of fundamental types.
10308  */
10309
10310
10311 /**
10312  * g_type_from_name:
10313  * @name: Type name to lookup.
10314  *
10315  * Lookup the type ID from a given type name, returning 0 if no type
10316  * has been registered under this name (this is the preferred method
10317  * to find out by name whether a specific type has been registered
10318  * yet).
10319  *
10320  * Returns: Corresponding type ID or 0.
10321  */
10322
10323
10324 /**
10325  * g_type_fundamental:
10326  * @type_id: valid type ID
10327  *
10328  * Internal function, used to extract the fundamental type ID portion.
10329  * use G_TYPE_FUNDAMENTAL() instead.
10330  *
10331  * Returns: fundamental type ID
10332  */
10333
10334
10335 /**
10336  * g_type_fundamental_next:
10337  *
10338  * Returns the next free fundamental type id which can be used to
10339  * register a new fundamental type with g_type_register_fundamental().
10340  * The returned type ID represents the highest currently registered
10341  * fundamental type identifier.
10342  *
10343  * or 0 if the type system ran out of fundamental type IDs.
10344  *
10345  * Returns: The nextmost fundamental type ID to be registered,
10346  */
10347
10348
10349 /**
10350  * g_type_get_plugin:
10351  * @type: The #GType to retrieve the plugin for.
10352  *
10353  * Returns the #GTypePlugin structure for @type or
10354  * %NULL if @type does not have a #GTypePlugin structure.
10355  *
10356  * dynamic type, %NULL otherwise.
10357  *
10358  * Returns: (transfer none): The corresponding plugin if @type is a
10359  */
10360
10361
10362 /**
10363  * g_type_get_qdata:
10364  * @type: a #GType
10365  * @quark: a #GQuark id to identify the data
10366  *
10367  * Obtains data which has previously been attached to @type
10368  * with g_type_set_qdata().
10369  *
10370  * Note that this does not take subtyping into account; data
10371  * attached to one type with g_type_set_qdata() cannot
10372  * be retrieved from a subtype using g_type_get_qdata().
10373  *
10374  * Returns: (transfer none): the data, or %NULL if no data was found
10375  */
10376
10377
10378 /**
10379  * g_type_init:
10380  *
10381  * Prior to any use of the type system, g_type_init() has to be called
10382  * to initialize the type system and assorted other code portions
10383  * (such as the various fundamental type implementations or the signal
10384  * system).
10385  *
10386  * This function is idempotent.
10387  *
10388  * Since version 2.24 this also initializes the thread system
10389  */
10390
10391
10392 /**
10393  * g_type_init_with_debug_flags:
10394  * @debug_flags: Bitwise combination of #GTypeDebugFlags values for debugging purposes.
10395  *
10396  * Similar to g_type_init(), but additionally sets debug flags.
10397  *
10398  * This function is idempotent.
10399  */
10400
10401
10402 /**
10403  * g_type_interface_add_prerequisite:
10404  * @interface_type: #GType value of an interface type.
10405  * @prerequisite_type: #GType value of an interface or instantiatable type.
10406  *
10407  * Adds @prerequisite_type to the list of prerequisites of @interface_type.
10408  * This means that any type implementing @interface_type must also implement
10409  * @prerequisite_type. Prerequisites can be thought of as an alternative to
10410  * interface derivation (which GType doesn't support). An interface can have
10411  * at most one instantiatable prerequisite type.
10412  */
10413
10414
10415 /**
10416  * g_type_interface_get_plugin:
10417  * @instance_type: the #GType value of an instantiatable type.
10418  * @interface_type: the #GType value of an interface type.
10419  *
10420  * Returns the #GTypePlugin structure for the dynamic interface
10421  * @interface_type which has been added to @instance_type, or %NULL if
10422  * @interface_type has not been added to @instance_type or does not
10423  * have a #GTypePlugin structure. See g_type_add_interface_dynamic().
10424  *
10425  * interface @interface_type of @instance_type.
10426  *
10427  * Returns: (transfer none): the #GTypePlugin for the dynamic
10428  */
10429
10430
10431 /**
10432  * g_type_interface_peek:
10433  * @instance_class: (type GObject.TypeClass): A #GTypeClass structure.
10434  * @iface_type: An interface ID which this class conforms to.
10435  *
10436  * Returns the #GTypeInterface structure of an interface to which the
10437  * passed in class conforms.
10438  *
10439  * structure of iface_type if implemented by @instance_class, %NULL
10440  * otherwise
10441  *
10442  * Returns: (type GObject.TypeInterface) (transfer none): The GTypeInterface
10443  */
10444
10445
10446 /**
10447  * g_type_interface_peek_parent:
10448  * @g_iface: (type GObject.TypeInterface): A #GTypeInterface structure.
10449  *
10450  * Returns the corresponding #GTypeInterface structure of the parent type
10451  * of the instance type to which @g_iface belongs. This is useful when
10452  * deriving the implementation of an interface from the parent type and
10453  * then possibly overriding some methods.
10454  *
10455  * corresponding #GTypeInterface structure of the parent type of the
10456  * instance type to which @g_iface belongs, or %NULL if the parent
10457  * type doesn't conform to the interface.
10458  *
10459  * Returns: (transfer none) (type GObject.TypeInterface): The
10460  */
10461
10462
10463 /**
10464  * g_type_interface_prerequisites:
10465  * @interface_type: an interface type
10466  * @n_prerequisites: (out) (allow-none): location to return the number of prerequisites, or %NULL
10467  *
10468  * Returns the prerequisites of an interfaces type.
10469  *
10470  *
10471  * newly-allocated zero-terminated array of #GType containing
10472  * the prerequisites of @interface_type
10473  *
10474  * Since: 2.2
10475  * Returns: (array length=n_prerequisites) (transfer full): a
10476  */
10477
10478
10479 /**
10480  * g_type_interfaces:
10481  * @type: The type to list interface types for.
10482  * @n_interfaces: (out) (allow-none): Optional #guint pointer to contain the number of interface types.
10483  *
10484  * Return a newly allocated and 0-terminated array of type IDs, listing the
10485  * interface types that @type conforms to. The return value has to be
10486  * g_free()ed after use.
10487  *
10488  * allocated and 0-terminated array of interface types.
10489  *
10490  * Returns: (array length=n_interfaces) (transfer full): Newly
10491  */
10492
10493
10494 /**
10495  * g_type_is_a:
10496  * @type: Type to check anchestry for.
10497  * @is_a_type: Possible anchestor of @type or interface @type could conform to.
10498  *
10499  * If @is_a_type is a derivable type, check whether @type is a
10500  * descendant of @is_a_type.  If @is_a_type is an interface, check
10501  * whether @type conforms to it.
10502  *
10503  * Returns: %TRUE if @type is_a @is_a_type holds true.
10504  */
10505
10506
10507 /**
10508  * g_type_module_add_interface:
10509  * @module: a #GTypeModule
10510  * @instance_type: type to which to add the interface.
10511  * @interface_type: interface type to add
10512  * @interface_info: type information structure
10513  *
10514  * Registers an additional interface for a type, whose interface lives
10515  * in the given type plugin. If the interface was already registered
10516  * for the type in this plugin, nothing will be done.
10517  *
10518  * As long as any instances of the type exist, the type plugin will
10519  * not be unloaded.
10520  */
10521
10522
10523 /**
10524  * g_type_module_register_enum:
10525  * @module: a #GTypeModule
10526  * @name: name for the type
10527  * @const_static_values: an array of #GEnumValue structs for the possible enumeration values. The array is terminated by a struct with all members being 0.
10528  *
10529  * Looks up or registers an enumeration that is implemented with a particular
10530  * type plugin. If a type with name @type_name was previously registered,
10531  * the #GType identifier for the type is returned, otherwise the type
10532  * is newly registered, and the resulting #GType identifier returned.
10533  *
10534  * As long as any instances of the type exist, the type plugin will
10535  * not be unloaded.
10536  *
10537  * Since: 2.6
10538  * Returns: the new or existing type ID
10539  */
10540
10541
10542 /**
10543  * g_type_module_register_flags:
10544  * @module: a #GTypeModule
10545  * @name: name for the type
10546  * @const_static_values: an array of #GFlagsValue structs for the possible flags values. The array is terminated by a struct with all members being 0.
10547  *
10548  * Looks up or registers a flags type that is implemented with a particular
10549  * type plugin. If a type with name @type_name was previously registered,
10550  * the #GType identifier for the type is returned, otherwise the type
10551  * is newly registered, and the resulting #GType identifier returned.
10552  *
10553  * As long as any instances of the type exist, the type plugin will
10554  * not be unloaded.
10555  *
10556  * Since: 2.6
10557  * Returns: the new or existing type ID
10558  */
10559
10560
10561 /**
10562  * g_type_module_register_type:
10563  * @module: a #GTypeModule
10564  * @parent_type: the type for the parent class
10565  * @type_name: name for the type
10566  * @type_info: type information structure
10567  * @flags: flags field providing details about the type
10568  *
10569  * Looks up or registers a type that is implemented with a particular
10570  * type plugin. If a type with name @type_name was previously registered,
10571  * the #GType identifier for the type is returned, otherwise the type
10572  * is newly registered, and the resulting #GType identifier returned.
10573  *
10574  * When reregistering a type (typically because a module is unloaded
10575  * then reloaded, and reinitialized), @module and @parent_type must
10576  * be the same as they were previously.
10577  *
10578  * As long as any instances of the type exist, the type plugin will
10579  * not be unloaded.
10580  *
10581  * Returns: the new or existing type ID
10582  */
10583
10584
10585 /**
10586  * g_type_module_set_name:
10587  * @module: a #GTypeModule.
10588  * @name: a human-readable name to use in error messages.
10589  *
10590  * Sets the name for a #GTypeModule
10591  */
10592
10593
10594 /**
10595  * g_type_module_unuse:
10596  * @module: a #GTypeModule
10597  *
10598  * Decreases the use count of a #GTypeModule by one. If the
10599  * result is zero, the module will be unloaded. (However, the
10600  * #GTypeModule will not be freed, and types associated with the
10601  * #GTypeModule are not unregistered. Once a #GTypeModule is
10602  * initialized, it must exist forever.)
10603  */
10604
10605
10606 /**
10607  * g_type_module_use:
10608  * @module: a #GTypeModule
10609  *
10610  * Increases the use count of a #GTypeModule by one. If the
10611  * use count was zero before, the plugin will be loaded.
10612  * If loading the plugin fails, the use count is reset to
10613  * its prior value.
10614  *
10615  * loading the plugin failed.
10616  *
10617  * Returns: %FALSE if the plugin needed to be loaded and
10618  */
10619
10620
10621 /**
10622  * g_type_name:
10623  * @type: Type to return name for.
10624  *
10625  * Get the unique name that is assigned to a type ID.  Note that this
10626  * function (like all other GType API) cannot cope with invalid type
10627  * IDs. %G_TYPE_INVALID may be passed to this function, as may be any
10628  * other validly registered type ID, but randomized type IDs should
10629  * not be passed in and will most likely lead to a crash.
10630  *
10631  * Returns: Static type name or %NULL.
10632  */
10633
10634
10635 /**
10636  * g_type_next_base:
10637  * @leaf_type: Descendant of @root_type and the type to be returned.
10638  * @root_type: Immediate parent of the returned type.
10639  *
10640  * Given a @leaf_type and a @root_type which is contained in its
10641  * anchestry, return the type that @root_type is the immediate parent
10642  * of.  In other words, this function determines the type that is
10643  * derived directly from @root_type which is also a base class of
10644  * @leaf_type.  Given a root type and a leaf type, this function can
10645  * be used to determine the types and order in which the leaf type is
10646  * descended from the root type.
10647  *
10648  * Returns: Immediate child of @root_type and anchestor of @leaf_type.
10649  */
10650
10651
10652 /**
10653  * g_type_parent:
10654  * @type: The derived type.
10655  *
10656  * Return the direct parent type of the passed in type.  If the passed
10657  * in type has no parent, i.e. is a fundamental type, 0 is returned.
10658  *
10659  * Returns: The parent type.
10660  */
10661
10662
10663 /**
10664  * g_type_plugin_complete_interface_info:
10665  * @plugin: the #GTypePlugin
10666  * @instance_type: the #GType of an instantiable type to which the interface is added
10667  * @interface_type: the #GType of the interface whose info is completed
10668  * @info: the #GInterfaceInfo to fill in
10669  *
10670  * Calls the @complete_interface_info function from the
10671  * #GTypePluginClass of @plugin. There should be no need to use this
10672  * function outside of the GObject type system itself.
10673  */
10674
10675
10676 /**
10677  * g_type_plugin_complete_type_info:
10678  * @plugin: a #GTypePlugin
10679  * @g_type: the #GType whose info is completed
10680  * @info: the #GTypeInfo struct to fill in
10681  * @value_table: the #GTypeValueTable to fill in
10682  *
10683  * Calls the @complete_type_info function from the #GTypePluginClass of @plugin.
10684  * There should be no need to use this function outside of the GObject
10685  * type system itself.
10686  */
10687
10688
10689 /**
10690  * g_type_plugin_unuse:
10691  * @plugin: a #GTypePlugin
10692  *
10693  * Calls the @unuse_plugin function from the #GTypePluginClass of
10694  * @plugin.  There should be no need to use this function outside of
10695  * the GObject type system itself.
10696  */
10697
10698
10699 /**
10700  * g_type_plugin_use:
10701  * @plugin: a #GTypePlugin
10702  *
10703  * Calls the @use_plugin function from the #GTypePluginClass of
10704  * @plugin.  There should be no need to use this function outside of
10705  * the GObject type system itself.
10706  */
10707
10708
10709 /**
10710  * g_type_qname:
10711  * @type: Type to return quark of type name for.
10712  *
10713  * Get the corresponding quark of the type IDs name.
10714  *
10715  * Returns: The type names quark or 0.
10716  */
10717
10718
10719 /**
10720  * g_type_query:
10721  * @type: the #GType value of a static, classed type.
10722  * @query: (out caller-allocates): A user provided structure that is filled in with constant values upon success.
10723  *
10724  * Queries the type system for information about a specific type.
10725  * This function will fill in a user-provided structure to hold
10726  * type-specific information. If an invalid #GType is passed in, the
10727  * @type member of the #GTypeQuery is 0. All members filled into the
10728  * #GTypeQuery structure should be considered constant and have to be
10729  * left untouched.
10730  */
10731
10732
10733 /**
10734  * g_type_register_dynamic:
10735  * @parent_type: Type from which this type will be derived.
10736  * @type_name: 0-terminated string used as the name of the new type.
10737  * @plugin: The #GTypePlugin structure to retrieve the #GTypeInfo from.
10738  * @flags: Bitwise combination of #GTypeFlags values.
10739  *
10740  * Registers @type_name as the name of a new dynamic type derived from
10741  * @parent_type.  The type system uses the information contained in the
10742  * #GTypePlugin structure pointed to by @plugin to manage the type and its
10743  * instances (if not abstract).  The value of @flags determines the nature
10744  * (e.g. abstract or not) of the type.
10745  *
10746  * Returns: The new type identifier or #G_TYPE_INVALID if registration failed.
10747  */
10748
10749
10750 /**
10751  * g_type_register_fundamental:
10752  * @type_id: A predefined type identifier.
10753  * @type_name: 0-terminated string used as the name of the new type.
10754  * @info: The #GTypeInfo structure for this type.
10755  * @finfo: The #GTypeFundamentalInfo structure for this type.
10756  * @flags: Bitwise combination of #GTypeFlags values.
10757  *
10758  * Registers @type_id as the predefined identifier and @type_name as the
10759  * name of a fundamental type. If @type_id is already registered, or a type
10760  * named @type_name is already registered, the behaviour is undefined. The type
10761  * system uses the information contained in the #GTypeInfo structure pointed to
10762  * by @info and the #GTypeFundamentalInfo structure pointed to by @finfo to
10763  * manage the type and its instances. The value of @flags determines additional
10764  * characteristics of the fundamental type.
10765  *
10766  * Returns: The predefined type identifier.
10767  */
10768
10769
10770 /**
10771  * g_type_register_static:
10772  * @parent_type: Type from which this type will be derived.
10773  * @type_name: 0-terminated string used as the name of the new type.
10774  * @info: The #GTypeInfo structure for this type.
10775  * @flags: Bitwise combination of #GTypeFlags values.
10776  *
10777  * Registers @type_name as the name of a new static type derived from
10778  * @parent_type.  The type system uses the information contained in the
10779  * #GTypeInfo structure pointed to by @info to manage the type and its
10780  * instances (if not abstract).  The value of @flags determines the nature
10781  * (e.g. abstract or not) of the type.
10782  *
10783  * Returns: The new type identifier.
10784  */
10785
10786
10787 /**
10788  * g_type_register_static_simple: (skip)
10789  * @parent_type: Type from which this type will be derived.
10790  * @type_name: 0-terminated string used as the name of the new type.
10791  * @class_size: Size of the class structure (see #GTypeInfo)
10792  * @class_init: Location of the class initialization function (see #GTypeInfo)
10793  * @instance_size: Size of the instance structure (see #GTypeInfo)
10794  * @instance_init: Location of the instance initialization function (see #GTypeInfo)
10795  * @flags: Bitwise combination of #GTypeFlags values.
10796  *
10797  * Registers @type_name as the name of a new static type derived from
10798  * @parent_type.  The value of @flags determines the nature (e.g.
10799  * abstract or not) of the type. It works by filling a #GTypeInfo
10800  * struct and calling g_type_register_static().
10801  *
10802  * Since: 2.12
10803  * Returns: The new type identifier.
10804  */
10805
10806
10807 /**
10808  * g_type_remove_class_cache_func: (skip)
10809  * @cache_data: data that was given when adding @cache_func
10810  * @cache_func: a #GTypeClassCacheFunc
10811  *
10812  * Removes a previously installed #GTypeClassCacheFunc. The cache
10813  * maintained by @cache_func has to be empty when calling
10814  * g_type_remove_class_cache_func() to avoid leaks.
10815  */
10816
10817
10818 /**
10819  * g_type_remove_interface_check: (skip)
10820  * @check_data: callback data passed to g_type_add_interface_check()
10821  * @check_func: callback function passed to g_type_add_interface_check()
10822  *
10823  * Removes an interface check function added with
10824  * g_type_add_interface_check().
10825  *
10826  * Since: 2.4
10827  */
10828
10829
10830 /**
10831  * g_type_set_qdata:
10832  * @type: a #GType
10833  * @quark: a #GQuark id to identify the data
10834  * @data: the data
10835  *
10836  * Attaches arbitrary data to a type.
10837  */
10838
10839
10840 /**
10841  * g_type_value_table_peek: (skip)
10842  * @type: A #GType value.
10843  *
10844  * Returns the location of the #GTypeValueTable associated with @type.
10845  * <emphasis>Note that this function should only be used from source code
10846  * that implements or has internal knowledge of the implementation of
10847  * @type.</emphasis>
10848  *
10849  * %NULL if there is no #GTypeValueTable associated with @type.
10850  *
10851  * Returns: Location of the #GTypeValueTable associated with @type or
10852  */
10853
10854
10855 /**
10856  * g_utf8_next_char:
10857  * @p: Pointer to the start of a valid UTF-8 character
10858  *
10859  * Skips to the next character in a UTF-8 string. The string must be
10860  * valid; this macro is as fast as possible, and has no error-checking.
10861  * You would use this macro to iterate over a string character by
10862  * character. The macro returns the start of the next UTF-8 character.
10863  * Before using this macro, use g_utf8_validate() to validate strings
10864  * that may contain invalid UTF-8.
10865  */
10866
10867
10868 /**
10869  * g_value_array_append:
10870  * @value_array: #GValueArray to add an element to
10871  * @value: (allow-none): #GValue to copy into #GValueArray, or %NULL
10872  *
10873  * Insert a copy of @value as last element of @value_array. If @value is
10874  * %NULL, an uninitialized value is appended.
10875  *
10876  * Returns: (transfer none): the #GValueArray passed in as @value_array
10877  * Deprecated: 2.32: Use #GArray and g_array_append_val() instead.
10878  */
10879
10880
10881 /**
10882  * g_value_array_copy:
10883  * @value_array: #GValueArray to copy
10884  *
10885  * Construct an exact copy of a #GValueArray by duplicating all its
10886  * contents.
10887  *
10888  * Returns: (transfer full): Newly allocated copy of #GValueArray
10889  * Deprecated: 2.32: Use #GArray and g_array_ref() instead.
10890  */
10891
10892
10893 /**
10894  * g_value_array_free:
10895  * @value_array: #GValueArray to free
10896  *
10897  * Free a #GValueArray including its contents.
10898  *
10899  * Deprecated: 2.32: Use #GArray and g_array_unref() instead.
10900  */
10901
10902
10903 /**
10904  * g_value_array_get_nth:
10905  * @value_array: #GValueArray to get a value from
10906  * @index_: index of the value of interest
10907  *
10908  * Return a pointer to the value at @index_ containd in @value_array.
10909  *
10910  * Returns: (transfer none): pointer to a value at @index_ in @value_array
10911  * Deprecated: 2.32: Use g_array_index() instead.
10912  */
10913
10914
10915 /**
10916  * g_value_array_insert:
10917  * @value_array: #GValueArray to add an element to
10918  * @index_: insertion position, must be &lt;= value_array-&gt;n_values
10919  * @value: (allow-none): #GValue to copy into #GValueArray, or %NULL
10920  *
10921  * Insert a copy of @value at specified position into @value_array. If @value
10922  * is %NULL, an uninitialized value is inserted.
10923  *
10924  * Returns: (transfer none): the #GValueArray passed in as @value_array
10925  * Deprecated: 2.32: Use #GArray and g_array_insert_val() instead.
10926  */
10927
10928
10929 /**
10930  * g_value_array_new:
10931  * @n_prealloced: number of values to preallocate space for
10932  *
10933  * Allocate and initialize a new #GValueArray, optionally preserve space
10934  * for @n_prealloced elements. New arrays always contain 0 elements,
10935  * regardless of the value of @n_prealloced.
10936  *
10937  * Returns: a newly allocated #GValueArray with 0 values
10938  * Deprecated: 2.32: Use #GArray and g_array_sized_new() instead.
10939  */
10940
10941
10942 /**
10943  * g_value_array_prepend:
10944  * @value_array: #GValueArray to add an element to
10945  * @value: (allow-none): #GValue to copy into #GValueArray, or %NULL
10946  *
10947  * Insert a copy of @value as first element of @value_array. If @value is
10948  * %NULL, an uninitialized value is prepended.
10949  *
10950  * Returns: (transfer none): the #GValueArray passed in as @value_array
10951  * Deprecated: 2.32: Use #GArray and g_array_prepend_val() instead.
10952  */
10953
10954
10955 /**
10956  * g_value_array_remove:
10957  * @value_array: #GValueArray to remove an element from
10958  * @index_: position of value to remove, which must be less than <code>value_array-><link linkend="GValueArray.n-values">n_values</link></code>
10959  *
10960  * Remove the value at position @index_ from @value_array.
10961  *
10962  * Returns: (transfer none): the #GValueArray passed in as @value_array
10963  * Deprecated: 2.32: Use #GArray and g_array_remove_index() instead.
10964  */
10965
10966
10967 /**
10968  * g_value_array_sort:
10969  * @value_array: #GValueArray to sort
10970  * @compare_func: (scope call): function to compare elements
10971  *
10972  * Sort @value_array using @compare_func to compare the elements according to
10973  * the semantics of #GCompareFunc.
10974  *
10975  * The current implementation uses Quick-Sort as sorting algorithm.
10976  *
10977  * Returns: (transfer none): the #GValueArray passed in as @value_array
10978  * Deprecated: 2.32: Use #GArray and g_array_sort().
10979  */
10980
10981
10982 /**
10983  * g_value_array_sort_with_data:
10984  * @value_array: #GValueArray to sort
10985  * @compare_func: (scope call): function to compare elements
10986  * @user_data: (closure): extra data argument provided for @compare_func
10987  *
10988  * Sort @value_array using @compare_func to compare the elements according
10989  * to the semantics of #GCompareDataFunc.
10990  *
10991  * The current implementation uses Quick-Sort as sorting algorithm.
10992  *
10993  * Rename to: g_value_array_sort
10994  * Returns: (transfer none): the #GValueArray passed in as @value_array
10995  * Deprecated: 2.32: Use #GArray and g_array_sort_with_data().
10996  */
10997
10998
10999 /**
11000  * g_value_copy:
11001  * @src_value: An initialized #GValue structure.
11002  * @dest_value: An initialized #GValue structure of the same type as @src_value.
11003  *
11004  * Copies the value of @src_value into @dest_value.
11005  */
11006
11007
11008 /**
11009  * g_value_dup_boxed: (skip)
11010  * @value: a valid #GValue of %G_TYPE_BOXED derived type
11011  *
11012  * Get the contents of a %G_TYPE_BOXED derived #GValue.  Upon getting,
11013  * the boxed value is duplicated and needs to be later freed with
11014  * g_boxed_free(), e.g. like: g_boxed_free (G_VALUE_TYPE (@value),
11015  * return_value);
11016  *
11017  * Returns: boxed contents of @value
11018  */
11019
11020
11021 /**
11022  * g_value_dup_object:
11023  * @value: a valid #GValue whose type is derived from %G_TYPE_OBJECT
11024  *
11025  * Get the contents of a %G_TYPE_OBJECT derived #GValue, increasing
11026  * its reference count. If the contents of the #GValue are %NULL, then
11027  * %NULL will be returned.
11028  *
11029  * should be unreferenced when no longer needed.
11030  *
11031  * Returns: (type GObject.Object) (transfer full): object content of @value,
11032  */
11033
11034
11035 /**
11036  * g_value_dup_param: (skip)
11037  * @value: a valid #GValue whose type is derived from %G_TYPE_PARAM
11038  *
11039  * Get the contents of a %G_TYPE_PARAM #GValue, increasing its
11040  * reference count.
11041  *
11042  * no longer needed.
11043  *
11044  * Returns: #GParamSpec content of @value, should be unreferenced when
11045  */
11046
11047
11048 /**
11049  * g_value_dup_string:
11050  * @value: a valid #GValue of type %G_TYPE_STRING
11051  *
11052  * Get a copy the contents of a %G_TYPE_STRING #GValue.
11053  *
11054  * Returns: a newly allocated copy of the string content of @value
11055  */
11056
11057
11058 /**
11059  * g_value_dup_variant:
11060  * @value: a valid #GValue of type %G_TYPE_VARIANT
11061  *
11062  * Get the contents of a variant #GValue, increasing its refcount.
11063  *
11064  * g_variant_unref() when no longer needed
11065  *
11066  * Returns: variant contents of @value, should be unrefed using
11067  * Since: 2.26
11068  */
11069
11070
11071 /**
11072  * g_value_fits_pointer:
11073  * @value: An initialized #GValue structure.
11074  *
11075  * Determines if @value will fit inside the size of a pointer value.
11076  * This is an internal function introduced mainly for C marshallers.
11077  *
11078  * Returns: %TRUE if @value will fit inside a pointer value.
11079  */
11080
11081
11082 /**
11083  * g_value_get_boolean:
11084  * @value: a valid #GValue of type %G_TYPE_BOOLEAN
11085  *
11086  * Get the contents of a %G_TYPE_BOOLEAN #GValue.
11087  *
11088  * Returns: boolean contents of @value
11089  */
11090
11091
11092 /**
11093  * g_value_get_boxed:
11094  * @value: a valid #GValue of %G_TYPE_BOXED derived type
11095  *
11096  * Get the contents of a %G_TYPE_BOXED derived #GValue.
11097  *
11098  * Returns: (transfer none): boxed contents of @value
11099  */
11100
11101
11102 /**
11103  * g_value_get_char:
11104  * @value: a valid #GValue of type %G_TYPE_CHAR
11105  *
11106  * Do not use this function; it is broken on platforms where the %char
11107  * type is unsigned, such as ARM and PowerPC.  See g_value_get_schar().
11108  *
11109  * Get the contents of a %G_TYPE_CHAR #GValue.
11110  *
11111  * Returns: character contents of @value
11112  * Deprecated: 2.32: This function's return type is broken, see g_value_get_schar()
11113  */
11114
11115
11116 /**
11117  * g_value_get_double:
11118  * @value: a valid #GValue of type %G_TYPE_DOUBLE
11119  *
11120  * Get the contents of a %G_TYPE_DOUBLE #GValue.
11121  *
11122  * Returns: double contents of @value
11123  */
11124
11125
11126 /**
11127  * g_value_get_enum:
11128  * @value: a valid #GValue whose type is derived from %G_TYPE_ENUM
11129  *
11130  * Get the contents of a %G_TYPE_ENUM #GValue.
11131  *
11132  * Returns: enum contents of @value
11133  */
11134
11135
11136 /**
11137  * g_value_get_flags:
11138  * @value: a valid #GValue whose type is derived from %G_TYPE_FLAGS
11139  *
11140  * Get the contents of a %G_TYPE_FLAGS #GValue.
11141  *
11142  * Returns: flags contents of @value
11143  */
11144
11145
11146 /**
11147  * g_value_get_float:
11148  * @value: a valid #GValue of type %G_TYPE_FLOAT
11149  *
11150  * Get the contents of a %G_TYPE_FLOAT #GValue.
11151  *
11152  * Returns: float contents of @value
11153  */
11154
11155
11156 /**
11157  * g_value_get_gtype:
11158  * @value: a valid #GValue of type %G_TYPE_GTYPE
11159  *
11160  * Get the contents of a %G_TYPE_GTYPE #GValue.
11161  *
11162  * Since: 2.12
11163  * Returns: the #GType stored in @value
11164  */
11165
11166
11167 /**
11168  * g_value_get_int:
11169  * @value: a valid #GValue of type %G_TYPE_INT
11170  *
11171  * Get the contents of a %G_TYPE_INT #GValue.
11172  *
11173  * Returns: integer contents of @value
11174  */
11175
11176
11177 /**
11178  * g_value_get_int64:
11179  * @value: a valid #GValue of type %G_TYPE_INT64
11180  *
11181  * Get the contents of a %G_TYPE_INT64 #GValue.
11182  *
11183  * Returns: 64bit integer contents of @value
11184  */
11185
11186
11187 /**
11188  * g_value_get_long:
11189  * @value: a valid #GValue of type %G_TYPE_LONG
11190  *
11191  * Get the contents of a %G_TYPE_LONG #GValue.
11192  *
11193  * Returns: long integer contents of @value
11194  */
11195
11196
11197 /**
11198  * g_value_get_object:
11199  * @value: a valid #GValue of %G_TYPE_OBJECT derived type
11200  *
11201  * Get the contents of a %G_TYPE_OBJECT derived #GValue.
11202  *
11203  * Returns: (type GObject.Object) (transfer none): object contents of @value
11204  */
11205
11206
11207 /**
11208  * g_value_get_param:
11209  * @value: a valid #GValue whose type is derived from %G_TYPE_PARAM
11210  *
11211  * Get the contents of a %G_TYPE_PARAM #GValue.
11212  *
11213  * Returns: (transfer none): #GParamSpec content of @value
11214  */
11215
11216
11217 /**
11218  * g_value_get_pointer:
11219  * @value: a valid #GValue of %G_TYPE_POINTER
11220  *
11221  * Get the contents of a pointer #GValue.
11222  *
11223  * Returns: (transfer none): pointer contents of @value
11224  */
11225
11226
11227 /**
11228  * g_value_get_schar:
11229  * @value: a valid #GValue of type %G_TYPE_CHAR
11230  *
11231  * Get the contents of a %G_TYPE_CHAR #GValue.
11232  *
11233  * Returns: signed 8 bit integer contents of @value
11234  * Since: 2.32
11235  */
11236
11237
11238 /**
11239  * g_value_get_string:
11240  * @value: a valid #GValue of type %G_TYPE_STRING
11241  *
11242  * Get the contents of a %G_TYPE_STRING #GValue.
11243  *
11244  * Returns: string content of @value
11245  */
11246
11247
11248 /**
11249  * g_value_get_uchar:
11250  * @value: a valid #GValue of type %G_TYPE_UCHAR
11251  *
11252  * Get the contents of a %G_TYPE_UCHAR #GValue.
11253  *
11254  * Returns: unsigned character contents of @value
11255  */
11256
11257
11258 /**
11259  * g_value_get_uint:
11260  * @value: a valid #GValue of type %G_TYPE_UINT
11261  *
11262  * Get the contents of a %G_TYPE_UINT #GValue.
11263  *
11264  * Returns: unsigned integer contents of @value
11265  */
11266
11267
11268 /**
11269  * g_value_get_uint64:
11270  * @value: a valid #GValue of type %G_TYPE_UINT64
11271  *
11272  * Get the contents of a %G_TYPE_UINT64 #GValue.
11273  *
11274  * Returns: unsigned 64bit integer contents of @value
11275  */
11276
11277
11278 /**
11279  * g_value_get_ulong:
11280  * @value: a valid #GValue of type %G_TYPE_ULONG
11281  *
11282  * Get the contents of a %G_TYPE_ULONG #GValue.
11283  *
11284  * Returns: unsigned long integer contents of @value
11285  */
11286
11287
11288 /**
11289  * g_value_get_variant:
11290  * @value: a valid #GValue of type %G_TYPE_VARIANT
11291  *
11292  * Get the contents of a variant #GValue.
11293  *
11294  * Returns: variant contents of @value
11295  * Since: 2.26
11296  */
11297
11298
11299 /**
11300  * g_value_init:
11301  * @value: A zero-filled (uninitialized) #GValue structure.
11302  * @g_type: Type the #GValue should hold values of.
11303  *
11304  * Initializes @value with the default value of @type.
11305  *
11306  * Returns: (transfer none): the #GValue structure that has been passed in
11307  */
11308
11309
11310 /**
11311  * g_value_peek_pointer:
11312  * @value: An initialized #GValue structure.
11313  *
11314  * function asserts that g_value_fits_pointer() returned %TRUE for the
11315  * passed in value.  This is an internal function introduced mainly
11316  * for C marshallers.
11317  *
11318  * Returns: (transfer none): the value contents as pointer. This
11319  */
11320
11321
11322 /**
11323  * g_value_register_transform_func: (skip)
11324  * @src_type: Source type.
11325  * @dest_type: Target type.
11326  * @transform_func: a function which transforms values of type @src_type into value of type @dest_type
11327  *
11328  * Registers a value transformation function for use in g_value_transform().
11329  * A previously registered transformation function for @src_type and @dest_type
11330  * will be replaced.
11331  */
11332
11333
11334 /**
11335  * g_value_reset:
11336  * @value: An initialized #GValue structure.
11337  *
11338  * Clears the current value in @value and resets it to the default value
11339  * (as if the value had just been initialized).
11340  *
11341  * Returns: the #GValue structure that has been passed in
11342  */
11343
11344
11345 /**
11346  * g_value_set_boolean:
11347  * @value: a valid #GValue of type %G_TYPE_BOOLEAN
11348  * @v_boolean: boolean value to be set
11349  *
11350  * Set the contents of a %G_TYPE_BOOLEAN #GValue to @v_boolean.
11351  */
11352
11353
11354 /**
11355  * g_value_set_boxed:
11356  * @value: a valid #GValue of %G_TYPE_BOXED derived type
11357  * @v_boxed: (allow-none): boxed value to be set
11358  *
11359  * Set the contents of a %G_TYPE_BOXED derived #GValue to @v_boxed.
11360  */
11361
11362
11363 /**
11364  * g_value_set_boxed_take_ownership:
11365  * @value: a valid #GValue of %G_TYPE_BOXED derived type
11366  * @v_boxed: (allow-none): duplicated unowned boxed value to be set
11367  *
11368  * This is an internal function introduced mainly for C marshallers.
11369  *
11370  * Deprecated: 2.4: Use g_value_take_boxed() instead.
11371  */
11372
11373
11374 /**
11375  * g_value_set_char:
11376  * @value: a valid #GValue of type %G_TYPE_CHAR
11377  * @v_char: character value to be set
11378  *
11379  * Set the contents of a %G_TYPE_CHAR #GValue to @v_char.
11380  *
11381  * Deprecated: 2.32: This function's input type is broken, see g_value_set_schar()
11382  */
11383
11384
11385 /**
11386  * g_value_set_double:
11387  * @value: a valid #GValue of type %G_TYPE_DOUBLE
11388  * @v_double: double value to be set
11389  *
11390  * Set the contents of a %G_TYPE_DOUBLE #GValue to @v_double.
11391  */
11392
11393
11394 /**
11395  * g_value_set_enum:
11396  * @value: a valid #GValue whose type is derived from %G_TYPE_ENUM
11397  * @v_enum: enum value to be set
11398  *
11399  * Set the contents of a %G_TYPE_ENUM #GValue to @v_enum.
11400  */
11401
11402
11403 /**
11404  * g_value_set_flags:
11405  * @value: a valid #GValue whose type is derived from %G_TYPE_FLAGS
11406  * @v_flags: flags value to be set
11407  *
11408  * Set the contents of a %G_TYPE_FLAGS #GValue to @v_flags.
11409  */
11410
11411
11412 /**
11413  * g_value_set_float:
11414  * @value: a valid #GValue of type %G_TYPE_FLOAT
11415  * @v_float: float value to be set
11416  *
11417  * Set the contents of a %G_TYPE_FLOAT #GValue to @v_float.
11418  */
11419
11420
11421 /**
11422  * g_value_set_gtype:
11423  * @value: a valid #GValue of type %G_TYPE_GTYPE
11424  * @v_gtype: #GType to be set
11425  *
11426  * Set the contents of a %G_TYPE_GTYPE #GValue to @v_gtype.
11427  *
11428  * Since: 2.12
11429  */
11430
11431
11432 /**
11433  * g_value_set_instance:
11434  * @value: An initialized #GValue structure.
11435  * @instance: (allow-none): the instance
11436  *
11437  * Sets @value from an instantiatable type via the
11438  * value_table's collect_value() function.
11439  */
11440
11441
11442 /**
11443  * g_value_set_int:
11444  * @value: a valid #GValue of type %G_TYPE_INT
11445  * @v_int: integer value to be set
11446  *
11447  * Set the contents of a %G_TYPE_INT #GValue to @v_int.
11448  */
11449
11450
11451 /**
11452  * g_value_set_int64:
11453  * @value: a valid #GValue of type %G_TYPE_INT64
11454  * @v_int64: 64bit integer value to be set
11455  *
11456  * Set the contents of a %G_TYPE_INT64 #GValue to @v_int64.
11457  */
11458
11459
11460 /**
11461  * g_value_set_long:
11462  * @value: a valid #GValue of type %G_TYPE_LONG
11463  * @v_long: long integer value to be set
11464  *
11465  * Set the contents of a %G_TYPE_LONG #GValue to @v_long.
11466  */
11467
11468
11469 /**
11470  * g_value_set_object:
11471  * @value: a valid #GValue of %G_TYPE_OBJECT derived type
11472  * @v_object: (type GObject.Object) (allow-none): object value to be set
11473  *
11474  * Set the contents of a %G_TYPE_OBJECT derived #GValue to @v_object.
11475  *
11476  * g_value_set_object() increases the reference count of @v_object
11477  * (the #GValue holds a reference to @v_object).  If you do not wish
11478  * to increase the reference count of the object (i.e. you wish to
11479  * pass your current reference to the #GValue because you no longer
11480  * need it), use g_value_take_object() instead.
11481  *
11482  * It is important that your #GValue holds a reference to @v_object (either its
11483  * own, or one it has taken) to ensure that the object won't be destroyed while
11484  * the #GValue still exists).
11485  */
11486
11487
11488 /**
11489  * g_value_set_object_take_ownership: (skip)
11490  * @value: a valid #GValue of %G_TYPE_OBJECT derived type
11491  * @v_object: (allow-none): object value to be set
11492  *
11493  * This is an internal function introduced mainly for C marshallers.
11494  *
11495  * Deprecated: 2.4: Use g_value_take_object() instead.
11496  */
11497
11498
11499 /**
11500  * g_value_set_param:
11501  * @value: a valid #GValue of type %G_TYPE_PARAM
11502  * @param: (allow-none): the #GParamSpec to be set
11503  *
11504  * Set the contents of a %G_TYPE_PARAM #GValue to @param.
11505  */
11506
11507
11508 /**
11509  * g_value_set_param_take_ownership: (skip)
11510  * @value: a valid #GValue of type %G_TYPE_PARAM
11511  * @param: (allow-none): the #GParamSpec to be set
11512  *
11513  * This is an internal function introduced mainly for C marshallers.
11514  *
11515  * Deprecated: 2.4: Use g_value_take_param() instead.
11516  */
11517
11518
11519 /**
11520  * g_value_set_pointer:
11521  * @value: a valid #GValue of %G_TYPE_POINTER
11522  * @v_pointer: pointer value to be set
11523  *
11524  * Set the contents of a pointer #GValue to @v_pointer.
11525  */
11526
11527
11528 /**
11529  * g_value_set_schar:
11530  * @value: a valid #GValue of type %G_TYPE_CHAR
11531  * @v_char: signed 8 bit integer to be set
11532  *
11533  * Set the contents of a %G_TYPE_CHAR #GValue to @v_char.
11534  *
11535  * Since: 2.32
11536  */
11537
11538
11539 /**
11540  * g_value_set_static_boxed:
11541  * @value: a valid #GValue of %G_TYPE_BOXED derived type
11542  * @v_boxed: (allow-none): static boxed value to be set
11543  *
11544  * Set the contents of a %G_TYPE_BOXED derived #GValue to @v_boxed.
11545  * The boxed value is assumed to be static, and is thus not duplicated
11546  * when setting the #GValue.
11547  */
11548
11549
11550 /**
11551  * g_value_set_static_string:
11552  * @value: a valid #GValue of type %G_TYPE_STRING
11553  * @v_string: (allow-none): static string to be set
11554  *
11555  * Set the contents of a %G_TYPE_STRING #GValue to @v_string.
11556  * The string is assumed to be static, and is thus not duplicated
11557  * when setting the #GValue.
11558  */
11559
11560
11561 /**
11562  * g_value_set_string:
11563  * @value: a valid #GValue of type %G_TYPE_STRING
11564  * @v_string: (allow-none): caller-owned string to be duplicated for the #GValue
11565  *
11566  * Set the contents of a %G_TYPE_STRING #GValue to @v_string.
11567  */
11568
11569
11570 /**
11571  * g_value_set_string_take_ownership:
11572  * @value: a valid #GValue of type %G_TYPE_STRING
11573  * @v_string: (allow-none): duplicated unowned string to be set
11574  *
11575  * This is an internal function introduced mainly for C marshallers.
11576  *
11577  * Deprecated: 2.4: Use g_value_take_string() instead.
11578  */
11579
11580
11581 /**
11582  * g_value_set_uchar:
11583  * @value: a valid #GValue of type %G_TYPE_UCHAR
11584  * @v_uchar: unsigned character value to be set
11585  *
11586  * Set the contents of a %G_TYPE_UCHAR #GValue to @v_uchar.
11587  */
11588
11589
11590 /**
11591  * g_value_set_uint:
11592  * @value: a valid #GValue of type %G_TYPE_UINT
11593  * @v_uint: unsigned integer value to be set
11594  *
11595  * Set the contents of a %G_TYPE_UINT #GValue to @v_uint.
11596  */
11597
11598
11599 /**
11600  * g_value_set_uint64:
11601  * @value: a valid #GValue of type %G_TYPE_UINT64
11602  * @v_uint64: unsigned 64bit integer value to be set
11603  *
11604  * Set the contents of a %G_TYPE_UINT64 #GValue to @v_uint64.
11605  */
11606
11607
11608 /**
11609  * g_value_set_ulong:
11610  * @value: a valid #GValue of type %G_TYPE_ULONG
11611  * @v_ulong: unsigned long integer value to be set
11612  *
11613  * Set the contents of a %G_TYPE_ULONG #GValue to @v_ulong.
11614  */
11615
11616
11617 /**
11618  * g_value_set_variant:
11619  * @value: a valid #GValue of type %G_TYPE_VARIANT
11620  * @variant: (allow-none): a #GVariant, or %NULL
11621  *
11622  * Set the contents of a variant #GValue to @variant.
11623  * If the variant is floating, it is consumed.
11624  *
11625  * Since: 2.26
11626  */
11627
11628
11629 /**
11630  * g_value_take_boxed:
11631  * @value: a valid #GValue of %G_TYPE_BOXED derived type
11632  * @v_boxed: (allow-none): duplicated unowned boxed value to be set
11633  *
11634  * Sets the contents of a %G_TYPE_BOXED derived #GValue to @v_boxed
11635  * and takes over the ownership of the callers reference to @v_boxed;
11636  * the caller doesn't have to unref it any more.
11637  *
11638  * Since: 2.4
11639  */
11640
11641
11642 /**
11643  * g_value_take_object: (skip)
11644  * @value: a valid #GValue of %G_TYPE_OBJECT derived type
11645  * @v_object: (allow-none): object value to be set
11646  *
11647  * Sets the contents of a %G_TYPE_OBJECT derived #GValue to @v_object
11648  * and takes over the ownership of the callers reference to @v_object;
11649  * the caller doesn't have to unref it any more (i.e. the reference
11650  * count of the object is not increased).
11651  *
11652  * If you want the #GValue to hold its own reference to @v_object, use
11653  * g_value_set_object() instead.
11654  *
11655  * Since: 2.4
11656  */
11657
11658
11659 /**
11660  * g_value_take_param: (skip)
11661  * @value: a valid #GValue of type %G_TYPE_PARAM
11662  * @param: (allow-none): the #GParamSpec to be set
11663  *
11664  * Sets the contents of a %G_TYPE_PARAM #GValue to @param and takes
11665  * over the ownership of the callers reference to @param; the caller
11666  * doesn't have to unref it any more.
11667  *
11668  * Since: 2.4
11669  */
11670
11671
11672 /**
11673  * g_value_take_string:
11674  * @value: a valid #GValue of type %G_TYPE_STRING
11675  * @v_string: (allow-none): string to take ownership of
11676  *
11677  * Sets the contents of a %G_TYPE_STRING #GValue to @v_string.
11678  *
11679  * Since: 2.4
11680  */
11681
11682
11683 /**
11684  * g_value_take_variant:
11685  * @value: a valid #GValue of type %G_TYPE_VARIANT
11686  * @variant: (allow-none): a #GVariant, or %NULL
11687  *
11688  * Set the contents of a variant #GValue to @variant, and takes over
11689  * the ownership of the caller's reference to @variant;
11690  * the caller doesn't have to unref it any more (i.e. the reference
11691  * count of the variant is not increased).
11692  *
11693  * If @variant was floating then its floating reference is converted to
11694  * a hard reference.
11695  *
11696  * If you want the #GValue to hold its own reference to @variant, use
11697  * g_value_set_variant() instead.
11698  *
11699  * This is an internal function introduced mainly for C marshallers.
11700  *
11701  * Since: 2.26
11702  */
11703
11704
11705 /**
11706  * g_value_transform:
11707  * @src_value: Source value.
11708  * @dest_value: Target value.
11709  *
11710  * Tries to cast the contents of @src_value into a type appropriate
11711  * to store in @dest_value, e.g. to transform a %G_TYPE_INT value
11712  * into a %G_TYPE_FLOAT value. Performing transformations between
11713  * value types might incur precision lossage. Especially
11714  * transformations into strings might reveal seemingly arbitrary
11715  * results and shouldn't be relied upon for production code (such
11716  * as rcfile value or object property serialization).
11717  *
11718  * Upon failing transformations, @dest_value is left untouched.
11719  *
11720  * Returns: Whether a transformation rule was found and could be applied.
11721  */
11722
11723
11724 /**
11725  * g_value_type_compatible:
11726  * @src_type: source type to be copied.
11727  * @dest_type: destination type for copying.
11728  *
11729  * Returns whether a #GValue of type @src_type can be copied into
11730  * a #GValue of type @dest_type.
11731  *
11732  * Returns: %TRUE if g_value_copy() is possible with @src_type and @dest_type.
11733  */
11734
11735
11736 /**
11737  * g_value_type_transformable:
11738  * @src_type: Source type.
11739  * @dest_type: Target type.
11740  *
11741  * Check whether g_value_transform() is able to transform values
11742  * of type @src_type into values of type @dest_type.
11743  *
11744  * Returns: %TRUE if the transformation is possible, %FALSE otherwise.
11745  */
11746
11747
11748 /**
11749  * g_value_unset:
11750  * @value: An initialized #GValue structure.
11751  *
11752  * Clears the current value in @value and "unsets" the type,
11753  * this releases all resources associated with this GValue.
11754  * An unset value is the same as an uninitialized (zero-filled)
11755  * #GValue structure.
11756  */
11757
11758
11759 /**
11760  * g_variant_get_gtype:
11761  *
11762  *
11763  *
11764  * Since: 2.24
11765  * Deprecated: 2.26
11766  */
11767
11768
11769 /**
11770  * g_warn_if_fail:
11771  * @expr: the expression to check
11772  *
11773  * Logs a warning if the expression is not true.
11774  *
11775  * Since: 2.16
11776  */
11777
11778
11779 /**
11780  * g_warn_if_reached:
11781  *
11782  * Logs a critical warning.
11783  *
11784  * Since: 2.16
11785  */
11786
11787
11788 /**
11789  * g_weak_ref_clear: (skip)
11790  * @weak_ref: (inout): location of a weak reference, which may be empty
11791  *
11792  * Frees resources associated with a non-statically-allocated #GWeakRef.
11793  * After this call, the #GWeakRef is left in an undefined state.
11794  *
11795  * You should only call this on a #GWeakRef that previously had
11796  * g_weak_ref_init() called on it.
11797  *
11798  * Since: 2.32
11799  */
11800
11801
11802 /**
11803  * g_weak_ref_get: (skip)
11804  * @weak_ref: (inout): location of a weak reference to a #GObject
11805  *
11806  * If @weak_ref is not empty, atomically acquire a strong
11807  * reference to the object it points to, and return that reference.
11808  *
11809  * This function is needed because of the potential race between taking
11810  * the pointer value and g_object_ref() on it, if the object was losing
11811  * its last reference at the same time in a different thread.
11812  *
11813  * The caller should release the resulting reference in the usual way,
11814  * by using g_object_unref().
11815  *
11816  * by @weak_ref, or %NULL if it was empty
11817  *
11818  * Returns: (transfer full) (type GObject.Object): the object pointed to
11819  * Since: 2.32
11820  */
11821
11822
11823 /**
11824  * g_weak_ref_init: (skip)
11825  * @weak_ref: (inout): uninitialized or empty location for a weak reference
11826  * @object: (allow-none): a #GObject or %NULL
11827  *
11828  * Initialise a non-statically-allocated #GWeakRef.
11829  *
11830  * This function also calls g_weak_ref_set() with @object on the
11831  * freshly-initialised weak reference.
11832  *
11833  * This function should always be matched with a call to
11834  * g_weak_ref_clear().  It is not necessary to use this function for a
11835  * #GWeakRef in static storage because it will already be
11836  * properly initialised.  Just use g_weak_ref_set() directly.
11837  *
11838  * Since: 2.32
11839  */
11840
11841
11842 /**
11843  * g_weak_ref_set: (skip)
11844  * @weak_ref: location for a weak reference
11845  * @object: (allow-none): a #GObject or %NULL
11846  *
11847  * Change the object to which @weak_ref points, or set it to
11848  * %NULL.
11849  *
11850  * You must own a strong reference on @object while calling this
11851  * function.
11852  *
11853  * Since: 2.32
11854  */
11855
11856
11857 /**
11858  * gchararray:
11859  *
11860  * A C representable type name for #G_TYPE_STRING.
11861  */
11862
11863
11864 /**
11865  * gunichar:
11866  *
11867  * A type which can hold any UTF-32 or UCS-4 character code,
11868  * also known as a Unicode code point.
11869  *
11870  * If you want to produce the UTF-8 representation of a #gunichar,
11871  * use g_ucs4_to_utf8(). See also g_utf8_to_ucs4() for the reverse
11872  * process.
11873  *
11874  * To print/scan values of this type as integer, use
11875  * %G_GINT32_MODIFIER and/or %G_GUINT32_FORMAT.
11876  *
11877  * The notation to express a Unicode code point in running text is
11878  * as a hexadecimal number with four to six digits and uppercase
11879  * letters, prefixed by the string "U+". Leading zeros are omitted,
11880  * unless the code point would have fewer than four hexadecimal digits.
11881  * For example, "U+0041 LATIN CAPITAL LETTER A". To print a code point
11882  * in the U+-notation, use the format string "U+\%04"G_GINT32_FORMAT"X".
11883  * To scan, use the format string "U+\%06"G_GINT32_FORMAT"X".
11884  *
11885  * |[
11886  * gunichar c;
11887  * sscanf ("U+0041", "U+%06"G_GINT32_FORMAT"X", &amp;c)
11888  * g_print ("Read U+%04"G_GINT32_FORMAT"X", c);
11889  * ]|
11890  */
11891
11892
11893 /**
11894  * gunichar2:
11895  *
11896  * A type which can hold any UTF-16 code
11897  * point<footnote id="utf16_surrogate_pairs">UTF-16 also has so called
11898  * <firstterm>surrogate pairs</firstterm> to encode characters beyond
11899  * the BMP as pairs of 16bit numbers. Surrogate pairs cannot be stored
11900  * in a single gunichar2 field, but all GLib functions accepting gunichar2
11901  * arrays will correctly interpret surrogate pairs.</footnote>.
11902  *
11903  * To print/scan values of this type to/from text you need to convert
11904  * to/from UTF-8, using g_utf16_to_utf8()/g_utf8_to_utf16().
11905  *
11906  * To print/scan values of this type as integer, use
11907  * %G_GINT16_MODIFIER and/or %G_GUINT16_FORMAT.
11908  */
11909
11910
11911
11912 /************************************************************/
11913 /* THIS FILE IS GENERATED DO NOT EDIT */
11914 /************************************************************/