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