1 /************************************************************/
2 /* THIS FILE IS GENERATED DO NOT EDIT */
3 /************************************************************/
7 * @g_class: The #GTypeClass structure to finalize.
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.
19 * @g_class: The #GTypeClass structure to initialize.
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.
35 * <structname>GBinding</structname> is an opaque structure whose members
36 * cannot be accessed directly.
45 * Flags to be used to control the #GBinding
54 * The #GObject that should be used as the source of the binding
61 * GBinding:source-property:
63 * The name of the property of #GBinding:source that should be used
64 * as the source of the binding
73 * The #GObject that should be used as the target of the binding
80 * GBinding:target-property:
82 * The name of the property of #GBinding:target that should be used
83 * as the target of the binding
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().
96 * Flags to be passed to g_object_bind_property() or
97 * g_object_bind_property_full().
99 * This enumeration can be extended at later date.
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
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.
118 * Returns: %TRUE if the transformation was successful, and %FALSE
126 * The <structname>GBookmarkFile</structname> struct contains only
127 * private data and should not be directly accessed.
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
142 * Error codes returned by bookmark file parsing.
148 * @boxed: The boxed structure to be copied.
150 * This function is provided by the user and should produce a copy
151 * of the passed in boxed structure.
153 * Returns: The newly created copy of the boxed structure.
159 * @boxed: The boxed structure to be freed.
161 * This function is provided by the user and should free the boxed
168 * @closure: the #GClosure
169 * @callback: the callback function
171 * A #GCClosure is a specialization of #GClosure for C function callbacks.
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.
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().
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
203 * The hashing algorithm to be used by #GChecksum when performing the
204 * digest of some data.
206 * Note that the #GChecksumType enumeration may be extended at a later
207 * date to include new hashing algorithm types.
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()
219 * The type of functions to be called when a child exists.
224 * GClassFinalizeFunc:
225 * @g_class: The #GTypeClass structure to finalize.
226 * @class_data: The @class_data member supplied via the #GTypeInfo structure.
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).
240 * @g_class: The #GTypeClass structure to initialize.
241 * @class_data: The @class_data member supplied via the #GTypeInfo structure.
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
246 * The initialization process of a class involves:
249 * 1 - Copying common members from the parent class over to the
250 * derived class structure.
253 * 2 - Zero initialization of the remaining members not copied
254 * over from the parent class.
257 * 3 - Invocation of the GBaseInitFunc() initializers of all parent
258 * types and the class' type.
261 * 4 - Invocation of the class' GClassInitFunc() initializer.
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
279 * GObjectClass parent_class;
280 * gint static_integer;
281 * gchar *dynamic_string;
284 * type_a_base_class_init (TypeAClass *class)
286 * class->dynamic_string = g_strdup ("some string");
289 * type_a_base_class_finalize (TypeAClass *class)
291 * g_free (class->dynamic_string);
294 * type_a_class_init (TypeAClass *class)
296 * class->static_integer = 42;
300 * TypeAClass parent_class;
301 * gfloat static_float;
302 * GString *dynamic_gstring;
305 * type_b_base_class_init (TypeBClass *class)
307 * class->dynamic_gstring = g_string_new ("some other string");
310 * type_b_base_class_finalize (TypeBClass *class)
312 * g_string_free (class->dynamic_gstring);
315 * type_b_class_init (TypeBClass *class)
317 * class->static_float = 3.14159265358979323846;
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
338 * Corresponding finalization counter parts to the GBaseInitFunc() functions
339 * have to be provided to release allocated resources at class finalization
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()
349 * A #GClosure represents a callback supplied by the programmer.
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()
362 * The type used for marshaller functions.
368 * @data: data specified when registering the notification callback
369 * @closure: the #GClosure on which the notification is emitted
371 * The type used for the various notification callbacks which can be registered
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.
381 * The connection flags are used to specify the behaviour of a signal's
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.
395 * Error codes returned by character set conversion routines.
401 * @src: A pointer to the data which should be copied
402 * @data: Additional data
404 * A function of this signature is used to copy the node data
405 * when doing a deep-copy of a tree.
407 * Returns: A pointer to the copy
415 * <structname>GDateTime</structname> is an opaque structure whose members
416 * cannot be accessed directly.
427 * Associates a string with a bit flag.
428 * Used in g_parse_debug_string().
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.
440 * The class of an enumeration type holds information about its
447 * @value: the enum value
448 * @value_name: the name of the value
449 * @value_nick: the nickname of the value
451 * A structure which contains a single enum value, its name, and its
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
462 * The <structname>GError</structname> structure contains
463 * information about an error that has occurred.
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.
474 * The class of a flags type holds information about its
481 * @value: the flags value
482 * @value_name: the name of the value
483 * @value_nick: the nickname of the value
485 * A structure which contains a single flags value, its name, and its
492 * @data: a data pointer
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+.
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().
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.
523 * All the fields in the <structname>GInitiallyUnowned</structname> structure
524 * are private to the #GInitiallyUnowned implementation and should never be
530 * GInitiallyUnownedClass:
532 * The class structure for the <structname>GInitiallyUnowned</structname> type.
538 * @instance: The instance to initialize.
539 * @g_class: The class of the type the instance is created for.
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.
552 * GInterfaceFinalizeFunc:
553 * @g_iface: The interface structure to finalize.
554 * @iface_data: The @interface_data supplied via the #GInterfaceInfo structure.
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.
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
568 * A structure that provides information to the type system which is
569 * used specifically for managing interface types.
574 * GInterfaceInitFunc:
575 * @g_iface: The interface structure to initialize.
576 * @iface_data: The @interface_data supplied via the #GInterfaceInfo structure.
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.
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
590 * Checks the version of the GLib library that is being compiled
594 * <title>Checking the version of the GLib library</title>
596 * if (!GLIB_CHECK_VERSION (1, 2, 0))
597 * g_error ("GLib version 1.2.0 or above is needed");
601 * See glib_check_version() for a runtime check.
603 * is the same as or newer than the passed-in version.
605 * Returns: %TRUE if the version of the GLib header files
612 * The <structname>GMainContext</structname> struct is an opaque data
613 * type representing a set of sources to be handled in a main loop.
620 * The <structname>GMainLoop</structname> struct is an opaque data type
621 * representing the main event loop of a GLib or GTK+ application.
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
635 * Error codes returned by markup parsing.
640 * GMarkupParseContext:
642 * A parse context is used to parse a stream of bytes that
643 * you expect to contain marked-up text.
645 * See g_markup_parse_context_new(), #GMarkupParser, and so
646 * on for more details.
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><![CDATA[</literal> and <literal>]]></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
656 * Flags that affect the behaviour of the parser.
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><empty/></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.
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.
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.
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.
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
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.
715 * All the fields in the <structname>GObject</structname> structure are private
716 * to the #GObject implementation and should never be accessed directly.
722 * @gobject: the object which received the signal.
723 * @pspec: the #GParamSpec of the property which changed.
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.
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:
735 * g_signal_connect (text_view->buffer, "notify::paste-target-list",
736 * G_CALLBACK (gtk_text_view_target_list_notify),
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.
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.
757 * The class structure for the <structname>GObject</structname> type.
760 * <title>Implementing singletons using a constructor</title>
762 * static MySingleton *the_singleton = NULL;
765 * my_singleton_constructor (GType type,
766 * guint n_construct_params,
767 * GObjectConstructParam *construct_params)
771 * if (!the_singleton)
773 * object = G_OBJECT_CLASS (parent_class)->constructor (type,
774 * n_construct_params,
776 * the_singleton = MY_SINGLETON (object);
779 * object = g_object_ref (G_OBJECT (the_singleton));
783 * </programlisting></example>
788 * GObjectConstructParam:
789 * @pspec: the #GParamSpec of the construct parameter
790 * @value: the value to set the parameter to
792 * The <structname>GObjectConstructParam</structname> struct is an auxiliary
793 * structure used to hand #GParamSpec/#GValue pairs to the @constructor of
799 * GObjectFinalizeFunc:
800 * @object: the #GObject being finalized
802 * The type of the @finalize function of #GObjectClass.
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
813 * The type of the @get_property function of #GObjectClass.
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
824 * The type of the @set_property function of #GObjectClass.
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
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>.
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.
855 * The type of function to be passed as callback for %G_OPTION_ARG_CALLBACK
858 * occurred, in which case @error should be set with g_set_error()
860 * Returns: %TRUE if the option was successfully parsed, %FALSE if an error
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.
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().
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().
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.
895 * Error codes returned by option parsing.
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
906 * The type of function to be used as callback when a parse error occurs.
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.
920 * Flags which modify individual options.
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.
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.
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
944 * The type of function that can be called before and after parsing.
946 * occurred, in which case @error should be set with g_set_error()
948 * Returns: %TRUE if the function completed successfully, %FALSE if an error
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
965 * Through the #GParamFlags flag values, certain aspects of parameters
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
978 * All other fields of the <structname>GParamSpec</structname> struct are private and
979 * should not be used directly.
985 * @parent_instance: private #GParamSpec portion
986 * @default_value: default value for the property specified
988 * A #GParamSpec derived structure that contains the meta data for boolean properties.
994 * @parent_instance: private #GParamSpec portion
996 * A #GParamSpec derived structure that contains the meta data for boxed properties.
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
1007 * A #GParamSpec derived structure that contains the meta data for character properties.
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().
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().
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.
1034 * A #GParamSpec derived structure that contains the meta data for double properties.
1040 * @parent_instance: private #GParamSpec portion
1041 * @enum_class: the #GEnumClass for the enum
1042 * @default_value: default value for the property specified
1044 * A #GParamSpec derived structure that contains the meta data for enum
1051 * @parent_instance: private #GParamSpec portion
1052 * @flags_class: the #GFlagsClass for the flags
1053 * @default_value: default value for the property specified
1055 * A #GParamSpec derived structure that contains the meta data for flags
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.
1068 * A #GParamSpec derived structure that contains the meta data for float properties.
1074 * @parent_instance: private #GParamSpec portion
1075 * @is_a_type: a #GType whose subtypes can occur as values
1077 * A #GParamSpec derived structure that contains the meta data for #GType properties.
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
1090 * A #GParamSpec derived structure that contains the meta data for integer properties.
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
1101 * A #GParamSpec derived structure that contains the meta data for 64bit integer properties.
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
1112 * A #GParamSpec derived structure that contains the meta data for long integer properties.
1118 * @parent_instance: private #GParamSpec portion
1120 * A #GParamSpec derived structure that contains the meta data for object properties.
1125 * GParamSpecOverride:
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.
1142 * @parent_instance: private #GParamSpec portion
1144 * A #GParamSpec derived structure that contains the meta data for %G_TYPE_PARAM
1150 * GParamSpecPointer:
1151 * @parent_instance: private #GParamSpec portion
1153 * A #GParamSpec derived structure that contains the meta data for pointer properties.
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
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
1177 * A #GParamSpec derived structure that contains the meta data for string
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().
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().
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
1210 * A #GParamSpec derived structure that contains the meta data for unsigned character properties.
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
1221 * A #GParamSpec derived structure that contains the meta data for unsigned integer properties.
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
1232 * A #GParamSpec derived structure that contains the meta data for unsigned 64bit integer properties.
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
1243 * A #GParamSpec derived structure that contains the meta data for unsigned long integer properties.
1248 * GParamSpecUnichar:
1249 * @parent_instance: private #GParamSpec portion
1250 * @default_value: default value for the property specified
1252 * A #GParamSpec derived structure that contains the meta data for unichar (unsigned integer) properties.
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
1262 * A #GParamSpec derived structure that contains the meta data for #GValueArray properties.
1267 * GParamSpecVariant:
1268 * @parent_instance: private #GParamSpec portion
1269 * @type: a #GVariantType, or %NULL
1270 * @default_value: a #GVariant, or %NULL
1272 * A #GParamSpec derived structure that contains the meta data for #GVariant properties.
1280 * @name: the parameter name
1281 * @value: the parameter value
1283 * The <structname>GParameter</structname> struct is an auxiliary structure used
1284 * to hand parameter name/value pairs to g_object_newv().
1291 * A type which is used to hold a process identification.
1293 * On UNIX, processes are identified by a process id (an integer),
1294 * while Windows uses process handles (which are pointers).
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.
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.
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.
1317 * reported, or -1 if an error occurred.
1319 * Returns: the number of #GPollFD elements which have events or errors
1325 * @string: the message to output
1327 * Specifies the type of the print handler functions.
1328 * These are called with the complete formatted string to output.
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
1338 * Contains the public fields of a
1339 * <link linkend="glib-Double-ended-Queues">Queue</link>.
1346 * A GRegex is the "compiled" form of a regular expression pattern. This
1347 * structure is opaque and its fields cannot be accessed directly.
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'.
1369 * Flags specifying compile-time options.
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 "(?", "(?<" 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
1420 * Error codes returned by regular expressions functions.
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()
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
1437 * Returns: %FALSE to continue the replacement process, %TRUE to stop it
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.
1454 * Flags specifying match-time options.
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.
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.
1474 * should be aborted. Returning %FALSE means to abort the
1475 * current emission and %TRUE is returned for continuation.
1477 * Returns: The accumulator function returns whether the signal emission
1482 * GSignalCMarshaller:
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
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.
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.
1503 * You may not attach these to signals created with the #G_SIGNAL_NO_HOOKS flag.
1505 * hook is disconnected (and destroyed).
1507 * Returns: whether it wants to stay connected. If it returns %FALSE, the signal
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.
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.
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.
1534 * The #GSignalInvocationHint structure is used to pass on additional information
1535 * to callbacks during a signal emission.
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.
1548 * The match types specify what g_signal_handlers_block_matched(),
1549 * g_signal_handlers_unblock_matched() and g_signal_handlers_disconnect_matched()
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>
1564 * A structure holding in-depth information for a specific signal. It is
1565 * filled in by the g_signal_query() function.
1572 * The <structname>GSource</structname> struct is an opaque data type
1573 * representing an event source.
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.
1588 * GSourceDummyMarshal:
1590 * This is just a placeholder for #GClosureMarshal,
1591 * which cannot be used here for dependency reasons.
1597 * @user_data: data passed to the function, set when the source was created with one of the above functions
1599 * Specifies the type of function passed to g_timeout_add(),
1600 * g_timeout_add_full(), g_idle_add(), and g_idle_add_full().
1602 * Returns: %FALSE if the source should be removed
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.
1613 * The <structname>GSourceFuncs</structname> struct contains a table of
1614 * functions used to handle event sources in a generic manner.
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).
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.
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.
1637 * GSpawnChildSetupFunc:
1638 * @user_data: user data to pass to the function.
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.
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.
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.
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
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->message</literal> should explain.
1685 * Error codes returned by spawning processes.
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.
1699 * Flags passed to g_spawn_sync(), g_spawn_async() and g_spawn_async_with_pipes().
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.
1709 * The #GString struct contains the public fields of a #GString.
1716 * A C representable type name for #G_TYPE_STRV.
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()
1727 * Specifies the prototype of fatal log handler functions.
1729 * Returns: %TRUE if the program should abort, %FALSE otherwise
1737 * A value representing an interval of time, in microseconds.
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
1749 * Disambiguates a given time in two ways.
1751 * First, specifies if the given time is in universal or local time.
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).
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.
1766 * A callback function used for notification when the state
1767 * of a toggle reference changes. See g_object_add_toggle_ref().
1773 * @str: the untranslated string
1774 * @data: user data specified when installing the function, e.g. in g_option_group_set_translate_func()
1776 * The type of functions which are used to translate user-visible
1777 * strings, for <option>--help</option> output.
1779 * The returned string is owned by GLib and must not be freed.
1781 * Returns: a translation of the string for the current locale.
1788 * A numerical value which represents the unique identifier of a registered
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
1801 * A union holding one collected value.
1808 * An opaque structure used as the base of all classes.
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
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.
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.
1827 * called, %FALSE to continue.
1829 * Returns: %TRUE to stop further #GTypeClassCacheFunc<!-- -->s from being
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.
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".
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().
1853 * Bit masks used to check or determine characteristics of a type.
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).
1864 * Bit masks used to check or determine specific characteristics of a
1870 * GTypeFundamentalInfo:
1871 * @type_flags: #GTypeFundamentalFlags describing the characteristics of the fundamental type
1873 * A structure that provides information to the type system which is
1874 * used specifically for managing fundamental types.
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).
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
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().
1905 * An opaque structure used as the base of all type instances.
1912 * An opaque structure used as the base of all interface types.
1917 * GTypeInterfaceCheckFunc:
1918 * @check_data: data passed to g_type_add_interface_check().
1919 * @g_iface: the interface that has been initialized
1921 * A callback called after an interface vtable is initialized.
1922 * See g_type_add_interface_check().
1930 * @name: the name of the module
1932 * The members of the <structname>GTypeModule</structname> structure should not
1933 * be accessed directly, except for the @name field.
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
1943 * In order to implement dynamic loading of types based on #GTypeModule,
1944 * the @load and @unload functions in #GTypeModuleClass must be implemented.
1951 * The <structname>GTypePlugin</structname> typedef is used as a placeholder
1952 * for objects that implement the <structname>GTypePlugin</structname>
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.
1964 * The #GTypePlugin interface is used by the type system in order to handle
1965 * the lifecycle of dynamically loaded types.
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
1976 * The type of the @complete_interface_info function of #GTypePluginClass.
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
1987 * The type of the @complete_type_info function of #GTypePluginClass.
1993 * @plugin: the #GTypePlugin whose use count should be decreased
1995 * The type of the @unuse_plugin function of #GTypePluginClass.
2001 * @plugin: the #GTypePlugin whose use count should be increased
2003 * The type of the @use_plugin function of #GTypePluginClass, which gets called
2004 * to increase the use count of @plugin.
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.
2015 * A structure holding information for a specific type. It is
2016 * filled in by the g_type_query() function.
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) /* always honour */ *object_p = value->data[0].v_pointer; else *object_p = g_object_ref (value->data[0].v_pointer); return NULL; ]|
2031 * The #GTypeValueTable provides the functions required by the #GValue implementation,
2032 * to serve as a container for values of a type.
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
2076 * These are the possible line break classifications.
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.
2083 * See <ulink url="http://www.unicode.org/unicode/reports/tr14/">http://www.unicode.org/unicode/reports/tr14/</ulink>.
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
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.
2181 * Note that new types may be added in the future. Applications
2182 * should be ready to handle unknown values.
2184 * url="http://www.unicode.org/reports/tr24/">Unicode Standard Annex
2185 * #24: Script names</ulink>.
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)
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>.
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
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.
2244 * The #GUserDirectory enumeration can be extended at later date. Not
2245 * every platform has a directory for every logical id in this
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
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.
2268 * @n_values: number of values contained in the array
2269 * @values: array of values
2271 * A #GValueArray contains an array of #GValue elements.
2277 * @src_value: Source value.
2278 * @dest_value: Target value.
2280 * The type of value transformation functions which can be registered with
2281 * g_value_register_transform_func().
2288 * A type in the GVariant type system.
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().
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().
2307 * @data: data that was provided when the weak reference was established
2308 * @where_the_object_was: the object being finalized
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.
2318 * G_BOOKMARK_FILE_ERROR:
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.
2329 * Inserts a breakpoint instruction into the code.
2331 * On x86 and alpha systems this is implemented as a soft interrupt
2332 * and on other architectures it raises a %SIGTRAP signal.
2338 * @f: a function pointer.
2340 * Cast a function pointer to a #GCallback.
2345 * G_CCLOSURE_SWAP_DATA:
2346 * @cclosure: a #GCClosure
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().
2351 * Returns: %TRUE if data has to be swapped.
2356 * G_CLOSURE_NEEDS_MARSHAL:
2357 * @closure: a #GClosure
2359 * Check if the closure still needs a marshaller. See g_closure_set_marshal().
2363 * Returns: %TRUE if a #GClosureMarshal marshaller has not yet been set on
2368 * G_CLOSURE_N_NOTIFIERS:
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().
2377 * Returns: number of notifiers
2384 * Error domain for character set conversions. Errors in this domain will
2385 * be from the #GConvertError enumeration. See #GError for information on
2391 * G_DATALIST_FLAGS_MASK:
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.
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.
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.
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.
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.
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
2436 * A convenience macro for boxed type implementations, which defines a
2437 * type_name_get_type() function registering the boxed type.
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.
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().
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.
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.
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.
2487 * A more general version of G_DEFINE_DYNAMIC_TYPE() which
2488 * allows to specify #GTypeFlags and custom code.
2491 * G_DEFINE_DYNAMIC_TYPE_EXTENDED (GtkGadget,
2495 * G_IMPLEMENT_INTERFACE_DYNAMIC (TYPE_GIZMO,
2496 * gtk_gadget_gizmo_init));
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);
2504 * static gpointer gtk_gadget_parent_class = NULL;
2505 * static GType gtk_gadget_type_id = 0;
2507 * static void gtk_gadget_class_intern_init (gpointer klass)
2509 * gtk_gadget_parent_class = g_type_class_peek_parent (klass);
2510 * gtk_gadget_class_init ((GtkGadgetClass*) klass);
2514 * gtk_gadget_get_type (void)
2516 * return gtk_gadget_type_id;
2520 * gtk_gadget_register_type (GTypeModule *type_module)
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),
2531 * (GInstanceInitFunc) gtk_gadget_init,
2532 * NULL // value_table
2534 * gtk_gadget_type_id = g_type_module_register_type (type_module,
2537 * &g_define_type_info,
2538 * (GTypeFlags) flags);
2540 * const GInterfaceInfo g_implement_interface_info = {
2541 * (GInterfaceInitFunc) gtk_gadget_gizmo_init
2543 * g_type_module_add_interface (type_module, g_define_type_id, TYPE_GIZMO, &g_implement_interface_info);
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.
2558 * A convenience macro for #GTypeInterface definitions, which declares
2559 * a default vtable initialization function and defines a *_get_type()
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>.
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.
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().
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 '_'.
2593 * A convenience macro for pointer type implementations, which defines a
2594 * type_name_get_type() function registering the pointer type.
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.
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.
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.
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.
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.
2637 * The most general convenience macro for type implementations, on which
2638 * G_DEFINE_TYPE(), etc are based.
2641 * G_DEFINE_TYPE_EXTENDED (GtkGadget,
2645 * G_IMPLEMENT_INTERFACE (TYPE_GIZMO,
2646 * gtk_gadget_gizmo_init));
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)
2655 * gtk_gadget_parent_class = g_type_class_peek_parent (klass);
2656 * gtk_gadget_class_init ((GtkGadgetClass*) klass);
2660 * gtk_gadget_get_type (void)
2662 * static volatile gsize g_define_type_id__volatile = 0;
2663 * if (g_once_init_enter (&g_define_type_id__volatile))
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);
2674 * static const GInterfaceInfo g_implement_interface_info = {
2675 * (GInterfaceInitFunc) gtk_gadget_gizmo_init
2677 * g_type_add_interface_static (g_define_type_id, TYPE_GIZMO, &g_implement_interface_info);
2679 * g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
2681 * return g_define_type_id__volatile;
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.
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.
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.
2710 * @class: a valid #GEnumClass
2712 * Casts a derived #GEnumClass structure into a #GEnumClass structure.
2717 * G_ENUM_CLASS_TYPE:
2718 * @class: a #GEnumClass
2720 * Get the type identifier from a given #GEnumClass structure.
2722 * Returns: the #GType
2727 * G_ENUM_CLASS_TYPE_NAME:
2728 * @class: a #GEnumClass
2730 * Get the static type name from a given #GEnumClass structure.
2732 * Returns: the type name.
2738 * @class: a valid #GFlagsClass
2740 * Casts a derived #GFlagsClass structure into a #GFlagsClass structure.
2745 * G_FLAGS_CLASS_TYPE:
2746 * @class: a #GFlagsClass
2748 * Get the type identifier from a given #GFlagsClass structure.
2750 * Returns: the #GType
2755 * G_FLAGS_CLASS_TYPE_NAME:
2756 * @class: a #GFlagsClass
2758 * Get the static type name from a given #GFlagsClass structure.
2760 * Returns: the type name.
2765 * G_IMPLEMENT_INTERFACE:
2766 * @TYPE_IFACE: The #GType of the interface to add
2767 * @iface_init: The interface init function
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.
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.
2781 * G_IMPLEMENT_INTERFACE_DYNAMIC:
2782 * @TYPE_IFACE: The #GType of the interface to add
2783 * @iface_init: The interface init function
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()
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.
2798 * G_INITIALLY_UNOWNED:
2799 * @object: Object which is subject to casting.
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.
2808 * G_INITIALLY_UNOWNED_CLASS:
2809 * @class: a valid #GInitiallyUnownedClass
2811 * Casts a derived #GInitiallyUnownedClass structure into a
2812 * #GInitiallyUnownedClass structure.
2817 * G_INITIALLY_UNOWNED_GET_CLASS:
2818 * @object: a #GInitiallyUnowned instance.
2820 * Get the class structure associated to a #GInitiallyUnowned instance.
2822 * Returns: pointer to object class structure.
2828 * @class: a #GEnumClass
2830 * Checks whether @class "is a" valid #GEnumClass structure of type %G_TYPE_ENUM
2837 * @class: a #GFlagsClass
2839 * Checks whether @class "is a" valid #GFlagsClass structure of type %G_TYPE_FLAGS
2845 * G_IS_INITIALLY_UNOWNED:
2846 * @object: Instance to check for being a %G_TYPE_INITIALLY_UNOWNED.
2848 * Checks whether a valid #GTypeInstance pointer is of type %G_TYPE_INITIALLY_UNOWNED.
2853 * G_IS_INITIALLY_UNOWNED_CLASS:
2854 * @class: a #GInitiallyUnownedClass
2856 * Checks whether @class "is a" valid #GInitiallyUnownedClass structure of type
2857 * %G_TYPE_INITIALLY_UNOWNED or derived.
2863 * @object: Instance to check for being a %G_TYPE_OBJECT.
2865 * Checks whether a valid #GTypeInstance pointer is of type %G_TYPE_OBJECT.
2870 * G_IS_OBJECT_CLASS:
2871 * @class: a #GObjectClass
2873 * Checks whether @class "is a" valid #GObjectClass structure of type
2874 * %G_TYPE_OBJECT or derived.
2880 * @pspec: a #GParamSpec
2882 * Checks whether @pspec "is a" valid #GParamSpec structure of type %G_TYPE_PARAM
2888 * G_IS_PARAM_SPEC_BOOLEAN:
2889 * @pspec: a valid #GParamSpec instance
2891 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_BOOLEAN.
2893 * Returns: %TRUE on success.
2898 * G_IS_PARAM_SPEC_BOXED:
2899 * @pspec: a valid #GParamSpec instance
2901 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_BOXED.
2903 * Returns: %TRUE on success.
2908 * G_IS_PARAM_SPEC_CHAR:
2909 * @pspec: a valid #GParamSpec instance
2911 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_CHAR.
2913 * Returns: %TRUE on success.
2918 * G_IS_PARAM_SPEC_CLASS:
2919 * @pclass: a #GParamSpecClass
2921 * Checks whether @pclass "is a" valid #GParamSpecClass structure of type
2922 * %G_TYPE_PARAM or derived.
2927 * G_IS_PARAM_SPEC_DOUBLE:
2928 * @pspec: a valid #GParamSpec instance
2930 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_DOUBLE.
2932 * Returns: %TRUE on success.
2937 * G_IS_PARAM_SPEC_ENUM:
2938 * @pspec: a valid #GParamSpec instance
2940 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_ENUM.
2942 * Returns: %TRUE on success.
2947 * G_IS_PARAM_SPEC_FLAGS:
2948 * @pspec: a valid #GParamSpec instance
2950 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_FLAGS.
2952 * Returns: %TRUE on success.
2957 * G_IS_PARAM_SPEC_FLOAT:
2958 * @pspec: a valid #GParamSpec instance
2960 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_FLOAT.
2962 * Returns: %TRUE on success.
2967 * G_IS_PARAM_SPEC_GTYPE:
2968 * @pspec: a #GParamSpec
2970 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_GTYPE.
2973 * Returns: %TRUE on success.
2978 * G_IS_PARAM_SPEC_INT:
2979 * @pspec: a valid #GParamSpec instance
2981 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_INT.
2983 * Returns: %TRUE on success.
2988 * G_IS_PARAM_SPEC_INT64:
2989 * @pspec: a valid #GParamSpec instance
2991 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_INT64.
2993 * Returns: %TRUE on success.
2998 * G_IS_PARAM_SPEC_LONG:
2999 * @pspec: a valid #GParamSpec instance
3001 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_LONG.
3003 * Returns: %TRUE on success.
3008 * G_IS_PARAM_SPEC_OBJECT:
3009 * @pspec: a valid #GParamSpec instance
3011 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_OBJECT.
3013 * Returns: %TRUE on success.
3018 * G_IS_PARAM_SPEC_OVERRIDE:
3019 * @pspec: a #GParamSpec
3021 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_OVERRIDE.
3024 * Returns: %TRUE on success.
3029 * G_IS_PARAM_SPEC_PARAM:
3030 * @pspec: a valid #GParamSpec instance
3032 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_PARAM.
3034 * Returns: %TRUE on success.
3039 * G_IS_PARAM_SPEC_POINTER:
3040 * @pspec: a valid #GParamSpec instance
3042 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_POINTER.
3044 * Returns: %TRUE on success.
3049 * G_IS_PARAM_SPEC_STRING:
3050 * @pspec: a valid #GParamSpec instance
3052 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_STRING.
3054 * Returns: %TRUE on success.
3059 * G_IS_PARAM_SPEC_UCHAR:
3060 * @pspec: a valid #GParamSpec instance
3062 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UCHAR.
3064 * Returns: %TRUE on success.
3069 * G_IS_PARAM_SPEC_UINT:
3070 * @pspec: a valid #GParamSpec instance
3072 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UINT.
3074 * Returns: %TRUE on success.
3079 * G_IS_PARAM_SPEC_UINT64:
3080 * @pspec: a valid #GParamSpec instance
3082 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UINT64.
3084 * Returns: %TRUE on success.
3089 * G_IS_PARAM_SPEC_ULONG:
3090 * @pspec: a valid #GParamSpec instance
3092 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_ULONG.
3094 * Returns: %TRUE on success.
3099 * G_IS_PARAM_SPEC_UNICHAR:
3100 * @pspec: a valid #GParamSpec instance
3102 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UNICHAR.
3104 * Returns: %TRUE on success.
3109 * G_IS_PARAM_SPEC_VALUE_ARRAY:
3110 * @pspec: a valid #GParamSpec instance
3112 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_VALUE_ARRAY.
3114 * Returns: %TRUE on success.
3119 * G_IS_PARAM_SPEC_VARIANT:
3120 * @pspec: a #GParamSpec
3122 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_VARIANT.
3124 * Returns: %TRUE on success
3131 * @value: A #GValue structure.
3133 * Checks if @value is a valid and initialized #GValue structure.
3135 * Returns: %TRUE on success.
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.
3152 * Returns %TRUE if a #GNode is a leaf node.
3154 * (i.e. it has no children)
3156 * Returns: %TRUE if the #GNode is a leaf node
3164 * Returns %TRUE if a #GNode is the root of a tree.
3166 * (i.e. it has no parent or siblings)
3168 * Returns: %TRUE if the #GNode is the root of a tree
3174 * @object: Object which is subject to casting.
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.
3184 * @class: a valid #GObjectClass
3186 * Casts a derived #GObjectClass structure into a #GObjectClass structure.
3191 * G_OBJECT_CLASS_NAME:
3192 * @class: a valid #GObjectClass
3194 * Return the name of a class structure's type.
3196 * should not be freed.
3198 * Returns: Type name of @class. The string is owned by the type system and
3203 * G_OBJECT_CLASS_TYPE:
3204 * @class: a valid #GObjectClass
3206 * Get the type id of a class structure.
3208 * Returns: Type id of @class.
3213 * G_OBJECT_GET_CLASS:
3214 * @object: a #GObject instance.
3216 * Get the class structure associated to a #GObject instance.
3218 * Returns: pointer to object class structure.
3224 * @object: Object to return the type id for.
3226 * Get the type id of an object.
3228 * Returns: Type id of @object.
3233 * G_OBJECT_TYPE_NAME:
3234 * @object: Object to return the type name for.
3236 * Get the name of an object's type.
3238 * should not be freed.
3240 * Returns: Type name of @object. The string is owned by the type system and
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
3250 * This macro should be used to emit a standard warning about unexpected
3251 * properties in set_property() and get_property() implementations.
3258 * Error domain for option parsing. Errors in this domain will
3259 * be from the #GOptionError enumeration. See #GError for information on
3265 * G_OPTION_REMAINING:
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.
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.
3285 * Mask containing the bits of #GParamSpec.flags which are reserved for GLib.
3290 * G_PARAM_READWRITE:
3292 * #GParamFlags value alias for %G_PARAM_READABLE | %G_PARAM_WRITABLE.
3298 * @pspec: a valid #GParamSpec
3300 * Casts a derived #GParamSpec object (e.g. of type #GParamSpecInt) into
3301 * a #GParamSpec object.
3306 * G_PARAM_SPEC_BOOLEAN:
3307 * @pspec: a valid #GParamSpec instance
3309 * Cast a #GParamSpec instance into a #GParamSpecBoolean.
3314 * G_PARAM_SPEC_BOXED:
3315 * @pspec: a valid #GParamSpec instance
3317 * Cast a #GParamSpec instance into a #GParamSpecBoxed.
3322 * G_PARAM_SPEC_CHAR:
3323 * @pspec: a valid #GParamSpec instance
3325 * Cast a #GParamSpec instance into a #GParamSpecChar.
3330 * G_PARAM_SPEC_CLASS:
3331 * @pclass: a valid #GParamSpecClass
3333 * Casts a derived #GParamSpecClass structure into a #GParamSpecClass structure.
3338 * G_PARAM_SPEC_DOUBLE:
3339 * @pspec: a valid #GParamSpec instance
3341 * Cast a #GParamSpec instance into a #GParamSpecDouble.
3346 * G_PARAM_SPEC_ENUM:
3347 * @pspec: a valid #GParamSpec instance
3349 * Cast a #GParamSpec instance into a #GParamSpecEnum.
3354 * G_PARAM_SPEC_FLAGS:
3355 * @pspec: a valid #GParamSpec instance
3357 * Cast a #GParamSpec instance into a #GParamSpecFlags.
3362 * G_PARAM_SPEC_FLOAT:
3363 * @pspec: a valid #GParamSpec instance
3365 * Cast a #GParamSpec instance into a #GParamSpecFloat.
3370 * G_PARAM_SPEC_GET_CLASS:
3371 * @pspec: a valid #GParamSpec
3373 * Retrieves the #GParamSpecClass of a #GParamSpec.
3378 * G_PARAM_SPEC_GTYPE:
3379 * @pspec: a #GParamSpec
3381 * Casts a #GParamSpec into a #GParamSpecGType.
3389 * @pspec: a valid #GParamSpec instance
3391 * Cast a #GParamSpec instance into a #GParamSpecInt.
3396 * G_PARAM_SPEC_INT64:
3397 * @pspec: a valid #GParamSpec instance
3399 * Cast a #GParamSpec instance into a #GParamSpecInt64.
3404 * G_PARAM_SPEC_LONG:
3405 * @pspec: a valid #GParamSpec instance
3407 * Cast a #GParamSpec instance into a #GParamSpecLong.
3412 * G_PARAM_SPEC_OBJECT:
3413 * @pspec: a valid #GParamSpec instance
3415 * Casts a #GParamSpec instance into a #GParamSpecObject.
3420 * G_PARAM_SPEC_OVERRIDE:
3421 * @pspec: a #GParamSpec
3423 * Casts a #GParamSpec into a #GParamSpecOverride.
3430 * G_PARAM_SPEC_PARAM:
3431 * @pspec: a valid #GParamSpec instance
3433 * Casts a #GParamSpec instance into a #GParamSpecParam.
3438 * G_PARAM_SPEC_POINTER:
3439 * @pspec: a valid #GParamSpec instance
3441 * Casts a #GParamSpec instance into a #GParamSpecPointer.
3446 * G_PARAM_SPEC_STRING:
3447 * @pspec: a valid #GParamSpec instance
3449 * Casts a #GParamSpec instance into a #GParamSpecString.
3454 * G_PARAM_SPEC_TYPE:
3455 * @pspec: a valid #GParamSpec
3457 * Retrieves the #GType of this @pspec.
3462 * G_PARAM_SPEC_TYPE_NAME:
3463 * @pspec: a valid #GParamSpec
3465 * Retrieves the #GType name of this @pspec.
3470 * G_PARAM_SPEC_UCHAR:
3471 * @pspec: a valid #GParamSpec instance
3473 * Cast a #GParamSpec instance into a #GParamSpecUChar.
3478 * G_PARAM_SPEC_UINT:
3479 * @pspec: a valid #GParamSpec instance
3481 * Cast a #GParamSpec instance into a #GParamSpecUInt.
3486 * G_PARAM_SPEC_UINT64:
3487 * @pspec: a valid #GParamSpec instance
3489 * Cast a #GParamSpec instance into a #GParamSpecUInt64.
3494 * G_PARAM_SPEC_ULONG:
3495 * @pspec: a valid #GParamSpec instance
3497 * Cast a #GParamSpec instance into a #GParamSpecULong.
3502 * G_PARAM_SPEC_UNICHAR:
3503 * @pspec: a valid #GParamSpec instance
3505 * Cast a #GParamSpec instance into a #GParamSpecUnichar.
3510 * G_PARAM_SPEC_VALUE_ARRAY:
3511 * @pspec: a valid #GParamSpec instance
3513 * Cast a #GParamSpec instance into a #GParamSpecValueArray.
3518 * G_PARAM_SPEC_VALUE_TYPE:
3519 * @pspec: a valid #GParamSpec
3521 * Retrieves the #GType to initialize a #GValue for this parameter.
3526 * G_PARAM_SPEC_VARIANT:
3527 * @pspec: a #GParamSpec
3529 * Casts a #GParamSpec into a #GParamSpecVariant.
3536 * G_PARAM_STATIC_STRINGS:
3538 * #GParamFlags value alias for %G_PARAM_STATIC_NAME | %G_PARAM_STATIC_NICK | %G_PARAM_STATIC_BLURB.
3545 * G_PARAM_USER_SHIFT:
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.
3553 * G_PRIORITY_DEFAULT:
3555 * Use this for default priority event sources.
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.
3564 * G_PRIORITY_DEFAULT_IDLE:
3566 * Use this for default priority idle functions.
3568 * In GLib this priority is used when adding idle functions with
3576 * Use this for high priority event sources.
3578 * It is not used within GLib or GTK+.
3583 * G_PRIORITY_HIGH_IDLE:
3585 * Use this for high priority idle functions.
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.)
3597 * Use this for very low priority background tasks.
3599 * It is not used within GLib or GTK+.
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().
3612 * GQueue my_queue = G_QUEUE_INIT;
3622 * Error domain for regular expressions. Errors in this domain will be
3623 * from the #GRegexError enumeration. See #GError for information on
3631 * G_SIGNAL_FLAGS_MASK:
3633 * A mask for all #GSignalFlags bits.
3638 * G_SIGNAL_MATCH_MASK:
3640 * A mask for all #GSignalMatchType bits.
3645 * G_SIGNAL_TYPE_STATIC_SCOPE:
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.
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().
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),
3660 * _gtk_marshal_VOID__BOXED,
3662 * GTK_TYPE_REQUISITION | G_SIGNAL_TYPE_STATIC_SCOPE);
3670 * Error domain for spawning processes. Errors in this domain will
3671 * be from the #GSpawnError enumeration. See #GError for information on
3679 * Evaluates to a time span of one day.
3688 * Evaluates to a time span of one hour.
3695 * G_TIME_SPAN_MILLISECOND:
3697 * Evaluates to a time span of one millisecond.
3704 * G_TIME_SPAN_MINUTE:
3706 * Evaluates to a time span of one minute.
3713 * G_TIME_SPAN_SECOND:
3715 * Evaluates to a time span of one second.
3724 * The #GType for a boxed type holding a #GArray reference.
3733 * The fundamental type corresponding to #gboolean.
3740 * The fundamental type from which all boxed types are derived.
3745 * G_TYPE_BYTE_ARRAY:
3747 * The #GType for a boxed type holding a #GByteArray reference.
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".
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.
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.
3772 * This macro should only be used in type implementations.
3777 * G_TYPE_CHECK_CLASS_TYPE:
3778 * @g_class: Location of a #GTypeClass structure.
3779 * @g_type: The type to be checked.
3781 * Checks if @g_class is a class structure of the type identified by
3784 * This macro should only be used in type implementations.
3786 * Returns: %TRUE on success.
3791 * G_TYPE_CHECK_INSTANCE:
3792 * @instance: Location of a #GTypeInstance structure.
3794 * Checks if @instance is a valid #GTypeInstance structure,
3795 * otherwise issues a warning and returns %FALSE.
3797 * This macro should only be used in type implementations.
3799 * Returns: %TRUE on success.
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.
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.
3813 * This macro should only be used in type implementations.
3818 * G_TYPE_CHECK_INSTANCE_TYPE:
3819 * @instance: Location of a #GTypeInstance structure.
3820 * @g_type: The type to be checked
3822 * Checks if @instance is an instance of the type identified by @g_type.
3824 * This macro should only be used in type implementations.
3826 * Returns: %TRUE on success.
3831 * G_TYPE_CHECK_VALUE:
3834 * Checks if @value has been initialized to hold values
3837 * This macro should only be used in type implementations.
3839 * Returns: %TRUE on success.
3844 * G_TYPE_CHECK_VALUE_TYPE:
3846 * @g_type: The type to be checked.
3848 * Checks if @value has been initialized to hold values
3851 * This macro should only be used in type implementations.
3853 * Returns: %TRUE on success.
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.
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().
3867 * This macro should only be used in type implementations.
3870 * Returns: a pointer to the private data structure.
3877 * The #GType for #GClosure.
3884 * The #GType for #GDate.
3891 * The #GType for a boxed type holding a #GDateTime.
3900 * The fundamental type corresponding to #gdouble.
3907 * The fundamental type from which all enumeration types are derived.
3914 * The #GType for a boxed type holding a #GError.
3923 * The fundamental type from which all flags types are derived.
3928 * G_TYPE_FLAG_RESERVED_ID_BIT:
3930 * A bit in the type number that's supposed to be left untouched.
3937 * The fundamental type corresponding to #gfloat.
3942 * G_TYPE_FROM_CLASS:
3943 * @g_class: Location of a valid #GTypeClass structure.
3945 * Get the type identifier from a given @class structure.
3947 * This macro should only be used in type implementations.
3949 * Returns: the #GType
3954 * G_TYPE_FROM_INSTANCE:
3955 * @instance: Location of a valid #GTypeInstance structure.
3957 * Get the type identifier from a given @instance structure.
3959 * This macro should only be used in type implementations.
3961 * Returns: the #GType
3966 * G_TYPE_FROM_INTERFACE:
3967 * @g_iface: Location of a valid #GTypeInterface structure.
3969 * Get the type identifier from a given @interface structure.
3971 * This macro should only be used in type implementations.
3973 * Returns: the #GType
3978 * G_TYPE_FUNDAMENTAL:
3979 * @type: A #GType value.
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.
3988 * G_TYPE_FUNDAMENTAL_MAX:
3990 * An integer constant that represents the number of identifiers reserved
3991 * for types that are assigned at compile-time.
3996 * G_TYPE_FUNDAMENTAL_SHIFT:
3998 * Shift value used in converting numbers to type IDs.
4005 * The #GType for #GString.
4012 * The type for #GType.
4017 * G_TYPE_HASH_TABLE:
4019 * The #GType for a boxed type holding a #GHashTable reference.
4026 * G_TYPE_HAS_VALUE_TABLE:
4027 * @type: A #GType value.
4029 * Checks if @type has a #GTypeValueTable.
4031 * Returns: %TRUE on success.
4036 * G_TYPE_INITIALLY_UNOWNED:
4038 * The type for #GInitiallyUnowned.
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.
4048 * Get the class structure of a given @instance, casted
4049 * to a specified ancestor type @g_type of the instance.
4051 * Note that while calling a GInstanceInitFunc(), the class pointer gets
4052 * modified, so it might not always return the expected pointer.
4054 * This macro should only be used in type implementations.
4056 * Returns: a pointer to the class structure
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.
4066 * Get the interface structure for interface @g_type of a given @instance.
4068 * This macro should only be used in type implementations.
4070 * Returns: a pointer to the interface structure
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.
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().
4084 * This macro should only be used in type implementations.
4087 * Returns: a pointer to the private data structure.
4094 * The fundamental type corresponding to #gint.
4101 * The fundamental type corresponding to #gint64.
4108 * The fundamental type from which all interfaces are derived.
4115 * An invalid #GType used as error return value in some functions which return
4121 * G_TYPE_IO_CHANNEL:
4123 * The #GType for #GIOChannel.
4128 * G_TYPE_IO_CONDITION:
4130 * The #GType for #GIOCondition.
4135 * G_TYPE_IS_ABSTRACT:
4136 * @type: A #GType value.
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
4142 * Returns: %TRUE on success.
4147 * G_TYPE_IS_CLASSED:
4148 * @type: A #GType value.
4150 * Checks if @type is a classed type.
4152 * Returns: %TRUE on success.
4157 * G_TYPE_IS_DEEP_DERIVABLE:
4158 * @type: A #GType value.
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.
4163 * Returns: %TRUE on success.
4168 * G_TYPE_IS_DERIVABLE:
4169 * @type: A #GType value.
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.
4174 * Returns: %TRUE on success.
4179 * G_TYPE_IS_DERIVED:
4180 * @type: A #GType value.
4182 * Checks if @type is derived (or in object-oriented terminology:
4183 * inherited) from another type (this holds true for all non-fundamental
4186 * Returns: %TRUE on success.
4192 * @type: a #GType ID.
4194 * Checks whether @type "is a" %G_TYPE_ENUM.
4196 * Returns: %TRUE if @type "is a" %G_TYPE_ENUM.
4202 * @type: a #GType ID.
4204 * Checks whether @type "is a" %G_TYPE_FLAGS.
4206 * Returns: %TRUE if @type "is a" %G_TYPE_FLAGS.
4211 * G_TYPE_IS_FUNDAMENTAL:
4212 * @type: A #GType value.
4214 * Checks if @type is a fundamental type.
4216 * Returns: %TRUE on success.
4221 * G_TYPE_IS_INSTANTIATABLE:
4222 * @type: A #GType value.
4224 * Checks if @type can be instantiated. Instantiation is the
4225 * process of creating an instance (object) of this type.
4227 * Returns: %TRUE on success.
4232 * G_TYPE_IS_INTERFACE:
4233 * @type: A #GType value.
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).
4243 * Returns: %TRUE on success.
4249 * @type: Type id to check
4251 * Check if the passed in type id is a %G_TYPE_OBJECT or derived from it.
4253 * Returns: %FALSE or %TRUE, indicating whether @type is a %G_TYPE_OBJECT.
4259 * @type: a #GType ID
4261 * Checks whether @type "is a" %G_TYPE_PARAM.
4267 * @type: A #GType value.
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.
4273 * Returns: Whether @type is suitable as a #GValue type.
4278 * G_TYPE_IS_VALUE_ABSTRACT:
4279 * @type: A #GType value.
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.
4285 * Returns: %TRUE on success.
4290 * G_TYPE_IS_VALUE_TYPE:
4291 * @type: A #GType value.
4293 * Checks if @type is a value type and can be used with g_value_init().
4295 * Returns: %TRUE on success.
4302 * The fundamental type corresponding to #glong.
4307 * G_TYPE_MAIN_CONTEXT:
4309 * The #GType for a boxed type holding a #GMainContext.
4318 * The #GType for a boxed type holding a #GMainLoop.
4325 * G_TYPE_MAKE_FUNDAMENTAL:
4326 * @x: the fundamental type number.
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
4332 * Returns: the GType
4337 * G_TYPE_MATCH_INFO:
4339 * The #GType for a boxed type holding a #GMatchInfo reference.
4348 * A fundamental type which is used as a replacement for the C
4349 * <literal>void</literal> return type.
4356 * The fundamental type for #GObject.
4363 * The fundamental type from which all #GParamSpec types are derived.
4368 * G_TYPE_PARAM_BOOLEAN:
4370 * The #GType of #GParamSpecBoolean.
4375 * G_TYPE_PARAM_BOXED:
4377 * The #GType of #GParamSpecBoxed.
4382 * G_TYPE_PARAM_CHAR:
4384 * The #GType of #GParamSpecChar.
4389 * G_TYPE_PARAM_DOUBLE:
4391 * The #GType of #GParamSpecDouble.
4396 * G_TYPE_PARAM_ENUM:
4398 * The #GType of #GParamSpecEnum.
4403 * G_TYPE_PARAM_FLAGS:
4405 * The #GType of #GParamSpecFlags.
4410 * G_TYPE_PARAM_FLOAT:
4412 * The #GType of #GParamSpecFloat.
4417 * G_TYPE_PARAM_GTYPE:
4419 * The #GType of #GParamSpecGType.
4428 * The #GType of #GParamSpecInt.
4433 * G_TYPE_PARAM_INT64:
4435 * The #GType of #GParamSpecInt64.
4440 * G_TYPE_PARAM_LONG:
4442 * The #GType of #GParamSpecLong.
4447 * G_TYPE_PARAM_OBJECT:
4449 * The #GType of #GParamSpecObject.
4454 * G_TYPE_PARAM_OVERRIDE:
4456 * The #GType of #GParamSpecOverride.
4463 * G_TYPE_PARAM_PARAM:
4465 * The #GType of #GParamSpecParam.
4470 * G_TYPE_PARAM_POINTER:
4472 * The #GType of #GParamSpecPointer.
4477 * G_TYPE_PARAM_STRING:
4479 * The #GType of #GParamSpecString.
4484 * G_TYPE_PARAM_UCHAR:
4486 * The #GType of #GParamSpecUChar.
4491 * G_TYPE_PARAM_UINT:
4493 * The #GType of #GParamSpecUInt.
4498 * G_TYPE_PARAM_UINT64:
4500 * The #GType of #GParamSpecUInt64.
4505 * G_TYPE_PARAM_ULONG:
4507 * The #GType of #GParamSpecULong.
4512 * G_TYPE_PARAM_UNICHAR:
4514 * The #GType of #GParamSpecUnichar.
4519 * G_TYPE_PARAM_VALUE_ARRAY:
4521 * The #GType of #GParamSpecValueArray.
4526 * G_TYPE_PARAM_VARIANT:
4528 * The #GType of #GParamSpecVariant.
4537 * The fundamental type corresponding to #gpointer.
4544 * The #GType for a boxed type holding a #GPtrArray reference.
4553 * The #GType for a boxed type holding a #GRegex reference.
4560 * G_TYPE_RESERVED_BSE_FIRST:
4562 * First fundamental type number to create a new fundamental type id with
4563 * G_TYPE_MAKE_FUNDAMENTAL() reserved for BSE.
4568 * G_TYPE_RESERVED_BSE_LAST:
4570 * Last fundamental type number reserved for BSE.
4575 * G_TYPE_RESERVED_GLIB_FIRST:
4577 * First fundamental type number to create a new fundamental type id with
4578 * G_TYPE_MAKE_FUNDAMENTAL() reserved for GLib.
4583 * G_TYPE_RESERVED_GLIB_LAST:
4585 * Last fundamental type number reserved for GLib.
4590 * G_TYPE_RESERVED_USER_FIRST:
4592 * First available fundamental type number to create new fundamental
4593 * type id with G_TYPE_MAKE_FUNDAMENTAL().
4600 * The #GType for a boxed type holding a #GSource.
4609 * The fundamental type corresponding to nul-terminated C strings.
4616 * The #GType for a boxed type holding a %NULL-terminated array of strings.
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().
4623 * g_object_class_install_property (object_class,
4625 * g_param_spec_boxed ("authors",
4627 * _("List of authors"),
4629 * G_PARAM_READWRITE));
4631 * gchar *authors[] = { "Owen", "Tim", NULL };
4632 * g_object_set (obj, "authors", authors, NULL);
4635 * g_object_get (obj, "authors", &writers, NULL);
4636 * /* do something with writers */
4637 * g_strfreev (writers);
4647 * The fundamental type corresponding to #guchar.
4654 * The fundamental type corresponding to #guint.
4661 * The fundamental type corresponding to #guint64.
4668 * The fundamental type corresponding to #gulong.
4675 * The type ID of the "GValue" type which is a boxed type,
4676 * used to pass around pointers to GValues.
4681 * G_TYPE_VALUE_ARRAY:
4683 * The type ID of the "GValueArray" type which is a boxed type,
4684 * used to pass around pointers to GValueArrays.
4691 * The fundamental type corresponding to #GVariant.
4693 * All floating #GVariant instances passed through the #GType system are
4696 * Note that callbacks in closures, and signal handlers
4697 * for signals of return type %G_TYPE_VARIANT, must never return floating
4700 * Note: GLib 2.24 did include a boxed type with this name. It was replaced
4701 * with this fundamental type in 2.26.
4708 * G_TYPE_VARIANT_BUILDER:
4710 * The #GType for a boxed type holding a #GVariantBuilder.
4717 * G_TYPE_VARIANT_TYPE:
4719 * The #GType for a boxed type holding a #GVariantType.
4726 * G_UNICODE_COMBINING_MARK:
4728 * Older name for %G_UNICODE_SPACING_MARK.
4730 * Deprecated: 2.30: Use %G_UNICODE_SPACING_MARK.
4735 * G_URI_RESERVED_CHARS_ALLOWED_IN_PATH:
4737 * Allowed characters in a path. Includes "!$&'()*+,;=:@/".
4742 * G_URI_RESERVED_CHARS_ALLOWED_IN_PATH_ELEMENT:
4744 * Allowed characters in path elements. Includes "!$&'()*+,;=:@".
4749 * G_URI_RESERVED_CHARS_ALLOWED_IN_USERINFO:
4751 * Allowed characters in userinfo as defined in RFC 3986. Includes "!$&'()*+,;=:".
4756 * G_URI_RESERVED_CHARS_GENERIC_DELIMITERS:
4758 * Generic delimiters characters as defined in RFC 3986. Includes ":/?#[]@".
4763 * G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS:
4765 * Subcomponent delimiter characters as defined in RFC 3986. Includes "!$&'()*+,;=".
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
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.
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.
4787 * G_VALUE_COLLECT_FORMAT_MAX_LENGTH:
4789 * The maximal number of #GTypeCValue<!-- -->s which can be collected for a
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
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.
4812 * @value: A #GValue structure.
4813 * @type: A #GType value.
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.
4819 * Returns: %TRUE if @value holds the @type.
4824 * G_VALUE_HOLDS_BOOLEAN:
4825 * @value: a valid #GValue structure
4827 * Checks whether the given #GValue can hold values of type %G_TYPE_BOOLEAN.
4829 * Returns: %TRUE on success.
4834 * G_VALUE_HOLDS_BOXED:
4835 * @value: a valid #GValue structure
4837 * Checks whether the given #GValue can hold values derived
4838 * from type %G_TYPE_BOXED.
4840 * Returns: %TRUE on success.
4845 * G_VALUE_HOLDS_CHAR:
4846 * @value: a valid #GValue structure
4848 * Checks whether the given #GValue can hold values of type %G_TYPE_CHAR.
4850 * Returns: %TRUE on success.
4855 * G_VALUE_HOLDS_DOUBLE:
4856 * @value: a valid #GValue structure
4858 * Checks whether the given #GValue can hold values of type %G_TYPE_DOUBLE.
4860 * Returns: %TRUE on success.
4865 * G_VALUE_HOLDS_ENUM:
4866 * @value: a valid #GValue structure
4868 * Checks whether the given #GValue can hold values derived from type %G_TYPE_ENUM.
4870 * Returns: %TRUE on success.
4875 * G_VALUE_HOLDS_FLAGS:
4876 * @value: a valid #GValue structure
4878 * Checks whether the given #GValue can hold values derived from type %G_TYPE_FLAGS.
4880 * Returns: %TRUE on success.
4885 * G_VALUE_HOLDS_FLOAT:
4886 * @value: a valid #GValue structure
4888 * Checks whether the given #GValue can hold values of type %G_TYPE_FLOAT.
4890 * Returns: %TRUE on success.
4895 * G_VALUE_HOLDS_GTYPE:
4896 * @value: a valid #GValue structure
4898 * Checks whether the given #GValue can hold values of type %G_TYPE_GTYPE.
4901 * Returns: %TRUE on success.
4906 * G_VALUE_HOLDS_INT:
4907 * @value: a valid #GValue structure
4909 * Checks whether the given #GValue can hold values of type %G_TYPE_INT.
4911 * Returns: %TRUE on success.
4916 * G_VALUE_HOLDS_INT64:
4917 * @value: a valid #GValue structure
4919 * Checks whether the given #GValue can hold values of type %G_TYPE_INT64.
4921 * Returns: %TRUE on success.
4926 * G_VALUE_HOLDS_LONG:
4927 * @value: a valid #GValue structure
4929 * Checks whether the given #GValue can hold values of type %G_TYPE_LONG.
4931 * Returns: %TRUE on success.
4936 * G_VALUE_HOLDS_OBJECT:
4937 * @value: a valid #GValue structure
4939 * Checks whether the given #GValue can hold values derived from type %G_TYPE_OBJECT.
4941 * Returns: %TRUE on success.
4946 * G_VALUE_HOLDS_PARAM:
4947 * @value: a valid #GValue structure
4949 * Checks whether the given #GValue can hold values derived from type %G_TYPE_PARAM.
4951 * Returns: %TRUE on success.
4956 * G_VALUE_HOLDS_POINTER:
4957 * @value: a valid #GValue structure
4959 * Checks whether the given #GValue can hold values of type %G_TYPE_POINTER.
4961 * Returns: %TRUE on success.
4966 * G_VALUE_HOLDS_STRING:
4967 * @value: a valid #GValue structure
4969 * Checks whether the given #GValue can hold values of type %G_TYPE_STRING.
4971 * Returns: %TRUE on success.
4976 * G_VALUE_HOLDS_UCHAR:
4977 * @value: a valid #GValue structure
4979 * Checks whether the given #GValue can hold values of type %G_TYPE_UCHAR.
4981 * Returns: %TRUE on success.
4986 * G_VALUE_HOLDS_UINT:
4987 * @value: a valid #GValue structure
4989 * Checks whether the given #GValue can hold values of type %G_TYPE_UINT.
4991 * Returns: %TRUE on success.
4996 * G_VALUE_HOLDS_UINT64:
4997 * @value: a valid #GValue structure
4999 * Checks whether the given #GValue can hold values of type %G_TYPE_UINT64.
5001 * Returns: %TRUE on success.
5006 * G_VALUE_HOLDS_ULONG:
5007 * @value: a valid #GValue structure
5009 * Checks whether the given #GValue can hold values of type %G_TYPE_ULONG.
5011 * Returns: %TRUE on success.
5016 * G_VALUE_HOLDS_VARIANT:
5017 * @value: a valid #GValue structure
5019 * Checks whether the given #GValue can hold values of type %G_TYPE_VARIANT.
5021 * Returns: %TRUE on success.
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.
5035 * GValue value = G_VALUE_INIT;
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
5049 * Collects a value's variable argument locations from a va_list. Usage is
5050 * analogous to G_VALUE_COLLECT().
5055 * G_VALUE_NOCOPY_CONTENTS:
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.
5065 * @value: A #GValue structure.
5067 * Get the type identifier of @value.
5069 * Returns: the #GType.
5074 * G_VALUE_TYPE_NAME:
5075 * @value: A #GValue structure.
5077 * Gets the the type name of @value.
5079 * Returns: the type name.
5085 * @type_string: a well-formed #GVariantType type string
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.
5091 * It is always a programmer error to use this macro with an invalid
5099 * G_VARIANT_TYPE_ANY:
5101 * An indefinite type that is a supertype of every type (including
5107 * G_VARIANT_TYPE_ARRAY:
5109 * An indefinite type that is a supertype of every array type.
5114 * G_VARIANT_TYPE_BASIC:
5116 * An indefinite type that is a supertype of every basic (ie:
5117 * non-container) type.
5122 * G_VARIANT_TYPE_BOOLEAN:
5124 * The type of a value that can be either %TRUE or %FALSE.
5129 * G_VARIANT_TYPE_BYTE:
5131 * The type of an integer value that can range from 0 to 255.
5136 * G_VARIANT_TYPE_BYTESTRING:
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.
5146 * G_VARIANT_TYPE_BYTESTRING_ARRAY:
5148 * The type of an array of byte strings (an array of arrays of bytes).
5153 * G_VARIANT_TYPE_DICTIONARY:
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.
5162 * G_VARIANT_TYPE_DICT_ENTRY:
5164 * An indefinite type that is a supertype of every dictionary entry
5170 * G_VARIANT_TYPE_DOUBLE:
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
5181 * G_VARIANT_TYPE_HANDLE:
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
5187 * If you are not interacting with D-Bus, then there is no reason to make
5193 * G_VARIANT_TYPE_INT16:
5195 * The type of an integer value that can range from -32768 to 32767.
5200 * G_VARIANT_TYPE_INT32:
5202 * The type of an integer value that can range from -2147483648 to
5208 * G_VARIANT_TYPE_INT64:
5210 * The type of an integer value that can range from
5211 * -9223372036854775808 to 9223372036854775807.
5216 * G_VARIANT_TYPE_MAYBE:
5218 * An indefinite type that is a supertype of every maybe type.
5223 * G_VARIANT_TYPE_OBJECT_PATH:
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
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.
5236 * G_VARIANT_TYPE_OBJECT_PATH_ARRAY:
5238 * The type of an array of object paths.
5243 * G_VARIANT_TYPE_SIGNATURE:
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.
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.
5255 * G_VARIANT_TYPE_STRING:
5257 * The type of a string. "" is a string. %NULL is not a string.
5262 * G_VARIANT_TYPE_STRING_ARRAY:
5264 * The type of an array of strings.
5269 * G_VARIANT_TYPE_TUPLE:
5271 * An indefinite type that is a supertype of every tuple type,
5272 * regardless of the number of items in the tuple.
5277 * G_VARIANT_TYPE_UINT16:
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.
5285 * G_VARIANT_TYPE_UINT32:
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.
5293 * G_VARIANT_TYPE_UINT64:
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.
5302 * G_VARIANT_TYPE_UNIT:
5304 * The empty tuple type. Has only one instance. Known also as "triv"
5310 * G_VARIANT_TYPE_VARDICT:
5312 * The type of a dictionary mapping strings to variants (the ubiquitous
5320 * G_VARIANT_TYPE_VARIANT:
5322 * The type of a box that contains any other value (including another
5328 * SECTION:enumerations_flags
5329 * @short_description: Enumeration and flags types
5330 * @title: Enumeration and Flag Types g_param_spec_flags()
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().
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
5353 * @Short_Description: Bind two object properties
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
5362 * g_object_bind_property (object1, "property-a",
5363 * object2, "property-b",
5364 * G_BINDING_DEFAULT);
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>.
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:
5376 * g_object_bind_property (object1, "property-a",
5377 * object2, "property-b",
5378 * G_BINDING_BIDIRECTIONAL);
5381 * will keep the two properties in sync.
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:
5389 * g_object_bind_property_full (adjustment1, "value",
5390 * adjustment2, "value",
5391 * G_BINDING_BIDIRECTIONAL,
5392 * celsius_to_fahrenheit,
5393 * fahrenheit_to_celsius,
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>.
5407 * Note that #GBinding does not resolve cycles by itself; a cycle like
5410 * object1:propertyA -> object2:propertyB
5411 * object2:propertyB -> object3:propertyC
5412 * object3:propertyC -> object1:propertyA
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().
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.
5426 * #GBinding is available since GObject 2.26
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
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.
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
5448 * @short_description: Functions as first-class objects
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.
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.
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
5480 * Using closures has a number of important advantages over a simple
5481 * callback function/data pointer combination:
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>
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>
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>
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
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.
5519 * The code in the example program below demonstrates #GValue's
5523 * #include <glib-object.h>
5526 * int2string (const GValue *src_value,
5527 * GValue *dest_value)
5529 * if (g_value_get_int (src_value) == 42)
5530 * g_value_set_static_string (dest_value, "An important number");
5532 * g_value_set_static_string (dest_value, "What's that?");
5539 * /* GValues must be initialized */
5540 * GValue a = G_VALUE_INIT;
5541 * GValue b = G_VALUE_INIT;
5542 * const gchar *message;
5546 * /* The GValue starts empty */
5547 * g_assert (!G_VALUE_HOLDS_STRING (&a));
5549 * /* Put a string in it */
5550 * g_value_init (&a, G_TYPE_STRING);
5551 * g_assert (G_VALUE_HOLDS_STRING (&a));
5552 * g_value_set_static_string (&a, "Hello, world!");
5553 * g_printf ("%s\n", g_value_get_string (&a));
5555 * /* Reset it to its pristine state */
5556 * g_value_unset (&a);
5558 * /* It can then be reused for another type */
5559 * g_value_init (&a, G_TYPE_INT);
5560 * g_value_set_int (&a, 42);
5562 * /* Attempt to transform it into a GValue of type STRING */
5563 * g_value_init (&b, G_TYPE_STRING);
5565 * /* An INT is transformable to a STRING */
5566 * g_assert (g_value_type_transformable (G_TYPE_INT, G_TYPE_STRING));
5568 * g_value_transform (&a, &b);
5569 * g_printf ("%s\n", g_value_get_string (&b));
5571 * /* Attempt to transform it again using a custom transform function */
5572 * g_value_register_transform_func (G_TYPE_INT, G_TYPE_STRING, int2string);
5573 * g_value_transform (&a, &b);
5574 * g_printf ("%s\n", g_value_get_string (&b));
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
5587 * #GParamSpec is an object structure that encapsulates the metadata
5588 * required to specify parameters, such as e.g. #GObject properties.
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
5602 * @short_description: The GLib Runtime type identification and management system
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
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.
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
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
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.
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.
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.
5673 * SECTION:gtypeplugin
5674 * @short_description: An interface for dynamically loadable types
5675 * @see_also: #GTypeModule and g_type_register_dynamic().
5676 * @title: GTypePlugin
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:
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:
5688 * new_type_id = g_type_register_dynamic (parent_type_id,
5693 * where <literal>new_type_plugin</literal> is an implementation of the
5694 * #GTypePlugin interface.
5695 * </para></listitem>
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>
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>
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>
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>
5718 * Things may repeat from the second step.
5719 * </para></listitem>
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.
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.
5739 * @short_description: The base object type
5740 * @see_also: #GParamSpecObject, g_param_spec_object()
5741 * @title: The Base Object Type
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"/>.
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:
5758 * container = create_container ();
5759 * container_add_child (container, create_child());
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:
5768 * container = create_container ();
5769 * child = create_child ();
5770 * container_add_child (container, child);
5771 * g_object_unref (child);
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
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.
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:
5789 * /* save floating state */
5790 * gboolean was_floating = g_object_is_floating (object);
5791 * g_object_ref_sink (object);
5792 * /* protected code portion */
5794 * /* restore floating state */
5796 * g_object_force_floating (object);
5797 * g_object_unref (object); /* release previously acquired reference */
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
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.
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.
5824 * @short_description: A means for customization of object behaviour and a general purpose notification mechanism
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.
5848 * A signal emission consists of five stages, unless prematurely stopped:
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>
5866 * The user-provided signal handlers are called in the order they were
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.
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
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.
5900 * SECTION:value_collection
5901 * @Short_description: Converting varargs to generic values
5902 * @Title: Varargs Value Collection
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.
5913 * @size: number of bytes to allocate.
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():
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>
5947 * Returns: space for @size bytes, allocated on the stack
5952 * g_binding_get_flags:
5953 * @binding: a #GBinding
5955 * Retrieves the flags passed when constructing the #GBinding
5957 * Returns: the #GBindingFlags used by the #GBinding
5963 * g_binding_get_source:
5964 * @binding: a #GBinding
5966 * Retrieves the #GObject instance used as the source of the binding
5968 * Returns: (transfer none): the source #GObject
5974 * g_binding_get_source_property:
5975 * @binding: a #GBinding
5977 * Retrieves the name of the property of #GBinding:source used as the source
5980 * Returns: the name of the source property
5986 * g_binding_get_target:
5987 * @binding: a #GBinding
5989 * Retrieves the #GObject instance used as the target of the binding
5991 * Returns: (transfer none): the target #GObject
5997 * g_binding_get_target_property:
5998 * @binding: a #GBinding
6000 * Retrieves the name of the property of #GBinding:target used as the target
6003 * Returns: the name of the target property
6010 * @boxed_type: The type of @src_boxed.
6011 * @src_boxed: The boxed structure to be copied.
6013 * Provide a copy of a boxed structure @src_boxed which is of type @boxed_type.
6015 * Returns: The newly created copy of the boxed structure.
6021 * @boxed_type: The type of @boxed.
6022 * @boxed: The boxed structure to be freed.
6024 * Free the boxed structure @boxed which is of type @boxed_type.
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.
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.
6038 * Returns: New %G_TYPE_BOXED derived type id for @name.
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
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.
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
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>.
6074 * g_cclosure_marshal_BOOL__FLAGS:
6076 * Another name for g_cclosure_marshal_BOOLEAN__FLAGS().
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
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>.
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
6103 * A marshaller for a #GCClosure with a callback of type
6104 * <literal>void (*callback) (gpointer instance, gboolean arg1, gpointer user_data)</literal>.
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
6117 * A marshaller for a #GCClosure with a callback of type
6118 * <literal>void (*callback) (gpointer instance, GBoxed *arg1, gpointer user_data)</literal>.
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
6131 * A marshaller for a #GCClosure with a callback of type
6132 * <literal>void (*callback) (gpointer instance, gchar arg1, gpointer user_data)</literal>.
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
6145 * A marshaller for a #GCClosure with a callback of type
6146 * <literal>void (*callback) (gpointer instance, gdouble arg1, gpointer user_data)</literal>.
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
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..
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
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.
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
6187 * A marshaller for a #GCClosure with a callback of type
6188 * <literal>void (*callback) (gpointer instance, gfloat arg1, gpointer user_data)</literal>.
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
6201 * A marshaller for a #GCClosure with a callback of type
6202 * <literal>void (*callback) (gpointer instance, gint arg1, gpointer user_data)</literal>.
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
6215 * A marshaller for a #GCClosure with a callback of type
6216 * <literal>void (*callback) (gpointer instance, glong arg1, gpointer user_data)</literal>.
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
6229 * A marshaller for a #GCClosure with a callback of type
6230 * <literal>void (*callback) (gpointer instance, GObject *arg1, gpointer user_data)</literal>.
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
6243 * A marshaller for a #GCClosure with a callback of type
6244 * <literal>void (*callback) (gpointer instance, GParamSpec *arg1, gpointer user_data)</literal>.
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
6257 * A marshaller for a #GCClosure with a callback of type
6258 * <literal>void (*callback) (gpointer instance, gpointer arg1, gpointer user_data)</literal>.
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
6271 * A marshaller for a #GCClosure with a callback of type
6272 * <literal>void (*callback) (gpointer instance, const gchar *arg1, gpointer user_data)</literal>.
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
6285 * A marshaller for a #GCClosure with a callback of type
6286 * <literal>void (*callback) (gpointer instance, guchar arg1, gpointer user_data)</literal>.
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
6299 * A marshaller for a #GCClosure with a callback of type
6300 * <literal>void (*callback) (gpointer instance, guint arg1, gpointer user_data)</literal>.
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
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>.
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
6327 * A marshaller for a #GCClosure with a callback of type
6328 * <literal>void (*callback) (gpointer instance, gulong arg1, gpointer user_data)</literal>.
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
6341 * A marshaller for a #GCClosure with a callback of type
6342 * <literal>void (*callback) (gpointer instance, GVariant *arg1, gpointer user_data)</literal>.
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
6357 * A marshaller for a #GCClosure with a callback of type
6358 * <literal>void (*callback) (gpointer instance, gpointer user_data)</literal>.
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()
6371 * A generic marshaller function implemented via <ulink
6372 * url="http://sourceware.org/libffi/">libffi</ulink>.
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
6384 * Creates a new closure which invokes @callback_func with @user_data as
6385 * the last parameter.
6387 * Returns: a new #GCClosure
6392 * g_cclosure_new_object: (skip)
6393 * @callback_func: the function to invoke
6394 * @object: a #GObject pointer to pass to @callback_func
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.
6402 * Returns: a new #GCClosure
6407 * g_cclosure_new_object_swap: (skip)
6408 * @callback_func: the function to invoke
6409 * @object: a #GObject pointer to pass to @callback_func
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.
6417 * Returns: a new #GCClosure
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
6427 * Creates a new closure which invokes @callback_func with @user_data as
6428 * the first parameter.
6430 * Returns: (transfer full): a new #GCClosure
6435 * g_clear_object: (skip)
6436 * @object_ptr: a pointer to a #GObject reference
6438 * Clears a reference to a #GObject.
6440 * @object_ptr must not be %NULL.
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.
6446 * This function is threadsafe and modifies the pointer atomically,
6447 * using memory barriers where needed.
6449 * A macro is also included that allows this function to be used without
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
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.
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
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.
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
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.
6500 * g_closure_invalidate:
6501 * @closure: GClosure to invalidate
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().
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).
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
6527 * Invokes the closure, i.e. executes the callback represented by the @closure.
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
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.
6541 * Returns: (transfer full): a newly allocated #GClosure
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
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.
6555 * typedef struct _MyClosure MyClosure;
6559 * // extra data goes here
6563 * my_closure_finalize (gpointer notify_data,
6564 * GClosure *closure)
6566 * MyClosure *my_closure = (MyClosure *)closure;
6568 * // free extra data here
6571 * MyClosure *my_closure_new (gpointer data)
6573 * GClosure *closure;
6574 * MyClosure *my_closure;
6576 * closure = g_closure_new_simple (sizeof (MyClosure), data);
6577 * my_closure = (MyClosure *) closure;
6579 * // initialize extra data here
6581 * g_closure_add_finalize_notifier (closure, notify_data,
6582 * my_closure_finalize);
6583 * return my_closure;
6587 * Returns: (transfer full): a newly allocated #GClosure
6593 * @closure: #GClosure to increment the reference count on
6595 * Increments the reference count on a closure to force it staying
6596 * alive while the caller holds a pointer to it.
6598 * Returns: (transfer none): The @closure passed in, for convenience
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
6608 * Removes a finalization notifier.
6610 * Notice that notifiers are automatically removed after they are run.
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
6620 * Removes an invalidation notifier.
6622 * Notice that notifiers are automatically removed after they are run.
6627 * g_closure_set_marshal: (skip)
6628 * @closure: a #GClosure
6629 * @marshal: a #GClosureMarshal function
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.
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
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.
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.
6666 * @closure: #GClosure to decrement the initial reference count on, if it's still being held
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:
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
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:
6684 * g_source_set_closure (source, g_cclosure_new (cb_func, cb_data));
6687 * Generally, this function is used together with g_closure_ref(). Ane example
6688 * of storing a closure for later notification looks like:
6690 * static GClosure *notify_closure = NULL;
6692 * foo_notify_set_closure (GClosure *closure)
6694 * if (notify_closure)
6695 * g_closure_unref (notify_closure);
6696 * notify_closure = closure;
6697 * if (notify_closure)
6699 * g_closure_ref (notify_closure);
6700 * g_closure_sink (notify_closure);
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.
6713 * @closure: #GClosure to decrement the reference count on
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.
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.
6727 * This function is meant to be called from the complete_type_info()
6728 * function of a #GTypePlugin implementation, as in the following
6733 * my_enum_complete_type_info (GTypePlugin *plugin,
6736 * GTypeValueTable *value_table)
6738 * static const GEnumValue values[] = {
6739 * { MY_ENUM_FOO, "MY_ENUM_FOO", "foo" },
6740 * { MY_ENUM_BAR, "MY_ENUM_BAR", "bar" },
6744 * g_enum_complete_type_info (type, info, values);
6752 * @enum_class: a #GEnumClass
6753 * @value: the value to look up
6755 * Returns the #GEnumValue for a value.
6757 * member of the enumeration
6759 * Returns: the #GEnumValue for @value, or %NULL if @value is not a
6764 * g_enum_get_value_by_name:
6765 * @enum_class: a #GEnumClass
6766 * @name: the name to look up
6768 * Looks up a #GEnumValue by name.
6770 * enumeration doesn't have a member with that name
6772 * Returns: the #GEnumValue with name @name, or %NULL if the
6777 * g_enum_get_value_by_nick:
6778 * @enum_class: a #GEnumClass
6779 * @nick: the nickname to look up
6781 * Looks up a #GEnumValue by nickname.
6783 * enumeration doesn't have a member with that nickname
6785 * Returns: the #GEnumValue with nickname @nick, or %NULL if the
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.
6794 * Registers a new static enumeration type with the name @name.
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().
6801 * Returns: The new type identifier.
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.
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.
6818 * g_flags_get_first_value:
6819 * @flags_class: a #GFlagsClass
6822 * Returns the first #GFlagsValue which is set in @value.
6826 * Returns: the first #GFlagsValue which is set in @value, or %NULL if
6831 * g_flags_get_value_by_name:
6832 * @flags_class: a #GFlagsClass
6833 * @name: the name to look up
6835 * Looks up a #GFlagsValue by name.
6837 * flag with that name
6839 * Returns: the #GFlagsValue with name @name, or %NULL if there is no
6844 * g_flags_get_value_by_nick:
6845 * @flags_class: a #GFlagsClass
6846 * @nick: the nickname to look up
6848 * Looks up a #GFlagsValue by nickname.
6850 * no flag with that nickname
6852 * Returns: the #GFlagsValue with nickname @nick, or %NULL if there is
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.
6861 * Registers a new static flags type with the name @name.
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().
6868 * Returns: The new type identifier.
6873 * g_hash_table_freeze:
6874 * @hash_table: a #GHashTable
6876 * This function is deprecated and will be removed in the next major
6877 * release of GLib. It does nothing.
6882 * g_hash_table_thaw:
6883 * @hash_table: a #GHashTable
6885 * This function is deprecated and will be removed in the next major
6886 * release of GLib. It does nothing.
6892 * @loop: a #GMainLoop
6894 * Frees the memory allocated for the #GMainLoop.
6896 * Deprecated: 2.2: Use g_main_loop_unref() instead
6901 * g_main_is_running:
6902 * @loop: a #GMainLoop
6904 * Checks if the main loop is running.
6906 * Returns: %TRUE if the main loop is running
6907 * Deprecated: 2.2: Use g_main_loop_is_running() instead
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.
6915 * Runs a single iteration for the default #GMainContext.
6917 * Returns: %TRUE if more events are pending.
6918 * Deprecated: 2.2: Use g_main_context_iteration() instead.
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.
6926 * Creates a new #GMainLoop for th default main context.
6928 * Returns: a new #GMainLoop
6929 * Deprecated: 2.2: Use g_main_loop_new() instead
6936 * Checks if any events are pending for the default #GMainContext
6937 * (i.e. ready to be processed).
6940 * Deprected: 2.2: Use g_main_context_pending() instead.
6942 * Returns: %TRUE if any events are pending.
6948 * @loop: a #GMainLoop
6950 * Stops the #GMainLoop.
6951 * If g_main_run() was called to run the #GMainLoop, it will now return.
6953 * Deprecated: 2.2: Use g_main_loop_quit() instead
6959 * @loop: a #GMainLoop
6961 * Runs a main loop until it stops running.
6963 * Deprecated: 2.2: Use g_main_loop_run() instead
6968 * g_main_set_poll_func:
6969 * @func: the function to call to poll all file descriptors
6971 * Sets the function to use for the handle polling of file descriptors
6972 * for the default main context.
6974 * Deprecated: 2.2: Use g_main_context_set_poll_func() again
6980 * @struct_type: the type of the elements to allocate
6981 * @n_structs: the number of elements to allocate
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.
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.
6992 * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type
6998 * @struct_type: the type of the elements to allocate.
6999 * @n_structs: the number of elements to allocate.
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.
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.
7010 * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type.
7016 * @struct_type: Type of memory chunks to be allocated
7017 * @n_structs: Number of chunks to be allocated
7019 * Wraps g_alloca() in a more typesafe manner.
7021 * Returns: Pointer to stack space for @n_structs chunks of type @struct_type
7027 * @parent: the #GNode to place the new #GNode under
7028 * @node: the #GNode to insert
7030 * Inserts a #GNode as the last child of the given parent.
7032 * Returns: the inserted #GNode
7037 * g_node_append_data:
7038 * @parent: the #GNode to place the new #GNode under
7039 * @data: the data for the new #GNode
7041 * Inserts a new #GNode as the last child of the given parent.
7043 * Returns: the new #GNode
7048 * g_node_first_child:
7051 * Gets the first child of a #GNode.
7053 * or has no children
7055 * Returns: the first child of @node, or %NULL if @node is %NULL
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
7065 * Inserts a new #GNode at the given position.
7067 * Returns: the new #GNode
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
7077 * Inserts a new #GNode before the given sibling.
7079 * Returns: the new #GNode
7084 * g_node_next_sibling:
7087 * Gets the next sibling of a #GNode.
7091 * Returns: the next sibling of @node, or %NULL if @node is the last node
7096 * g_node_prepend_data:
7097 * @parent: the #GNode to place the new #GNode under
7098 * @data: the data for the new #GNode
7100 * Inserts a new #GNode as the first child of the given parent.
7102 * Returns: the new #GNode
7107 * g_node_prev_sibling:
7110 * Gets the previous sibling of a #GNode.
7114 * Returns: the previous sibling of @node, or %NULL if @node is the first
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
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.
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.
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).
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.
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.
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.
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.
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
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:
7182 * g_object_bind_property (action, "active", widget, "sensitive", 0);
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
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.
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.
7198 * A #GObject can have multiple bindings.
7200 * binding between the two #GObject instances. The binding is released
7201 * whenever the #GBinding reference count reaches zero.
7203 * Returns: (transfer none): the #GBinding instance representing the
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
7220 * Complete version of g_object_bind_property().
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
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
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.
7236 * A #GObject can have multiple bindings.
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>
7244 * binding between the two #GObject instances. The binding is released
7245 * whenever the #GBinding reference count reaches zero.
7247 * Returns: (transfer none): the #GBinding instance representing the
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
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
7266 * This function is the language bindings friendly version of
7267 * g_object_bind_property_full(), using #GClosure<!-- -->s instead of
7268 * function pointers.
7271 * binding between the two #GObject instances. The binding is released
7272 * whenever the #GBinding reference count reaches zero.
7274 * Rename to: g_object_bind_property_full
7275 * Returns: (transfer none): the #GBinding instance representing the
7281 * g_object_class_find_property:
7282 * @oclass: a #GObjectClass
7283 * @property_name: the name of the property to look up
7285 * Looks up the #GParamSpec for a property of a class.
7287 * %NULL if the class doesn't have a property of that name
7289 * Returns: (transfer none): the #GParamSpec for the property, or
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
7299 * Installs new properties from an array of #GParamSpec<!-- -->s. This is
7300 * usually done in the class initializer.
7302 * The property id of each property is the index of each #GParamSpec in
7303 * the @pspecs array.
7305 * The property id of 0 is treated specially by #GObject and it should not
7306 * be used to store a #GParamSpec.
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:
7314 * PROP_0, PROP_FOO, PROP_BAR, N_PROPERTIES
7317 * static GParamSpec *obj_properties[N_PROPERTIES] = { NULL, };
7320 * my_object_class_init (MyObjectClass *klass)
7322 * GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
7324 * obj_properties[PROP_FOO] =
7325 * g_param_spec_int ("foo", "Foo", "Foo",
7328 * G_PARAM_READWRITE);
7330 * obj_properties[PROP_BAR] =
7331 * g_param_spec_string ("bar", "Bar", "Bar",
7333 * G_PARAM_READWRITE);
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,
7343 * allows calling g_object_notify_by_pspec() to notify of property changes:
7347 * my_object_set_foo (MyObject *self, gint foo)
7349 * if (self->foo != foo)
7352 * g_object_notify_by_pspec (G_OBJECT (self), obj_properties[PROP_FOO]);
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
7367 * Installs a new property. This is usually done in the class initializer.
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.
7376 * g_object_class_list_properties:
7377 * @oclass: a #GObjectClass
7378 * @n_properties: (out): return location for the length of the returned array
7380 * Get an array of #GParamSpec* for all properties of a class.
7382 * #GParamSpec* which should be freed after use
7384 * Returns: (array length=n_properties) (transfer container): an array of
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.
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.
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().
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
7423 * A convenience function to connect multiple signals at once.
7425 * The signal specs expected by this function have the form
7426 * "modifier::signal_name", where modifier can be one of the following:
7429 * <term>signal</term>
7431 * equivalent to <literal>g_signal_connect_data (..., NULL, 0)</literal>
7432 * </para></listitem>
7435 * <term>object_signal</term>
7436 * <term>object-signal</term>
7438 * equivalent to <literal>g_signal_connect_object (..., 0)</literal>
7439 * </para></listitem>
7442 * <term>swapped_signal</term>
7443 * <term>swapped-signal</term>
7445 * equivalent to <literal>g_signal_connect_data (..., NULL, G_CONNECT_SWAPPED)</literal>
7446 * </para></listitem>
7449 * <term>swapped_object_signal</term>
7450 * <term>swapped-object-signal</term>
7452 * equivalent to <literal>g_signal_connect_object (..., G_CONNECT_SWAPPED)</literal>
7453 * </para></listitem>
7456 * <term>signal_after</term>
7457 * <term>signal-after</term>
7459 * equivalent to <literal>g_signal_connect_data (..., NULL, G_CONNECT_AFTER)</literal>
7460 * </para></listitem>
7463 * <term>object_signal_after</term>
7464 * <term>object-signal-after</term>
7466 * equivalent to <literal>g_signal_connect_object (..., G_CONNECT_AFTER)</literal>
7467 * </para></listitem>
7470 * <term>swapped_signal_after</term>
7471 * <term>swapped-signal-after</term>
7473 * equivalent to <literal>g_signal_connect_data (..., NULL, G_CONNECT_SWAPPED | G_CONNECT_AFTER)</literal>
7474 * </para></listitem>
7477 * <term>swapped_object_signal_after</term>
7478 * <term>swapped-object-signal-after</term>
7480 * equivalent to <literal>g_signal_connect_object (..., G_CONNECT_SWAPPED | G_CONNECT_AFTER)</literal>
7481 * </para></listitem>
7486 * menu->toplevel = g_object_connect (g_object_new (GTK_TYPE_WINDOW,
7487 * "type", GTK_WINDOW_POPUP,
7490 * "signal::event", gtk_menu_window_event, menu,
7491 * "signal::size_request", gtk_menu_window_size_request, menu,
7492 * "signal::destroy", gtk_widget_destroyed, &menu->toplevel,
7496 * Returns: (transfer none): @object
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
7506 * A convenience function to disconnect multiple signals at once.
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".
7516 * g_object_force_floating:
7517 * @object: a #GObject
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().
7530 * g_object_freeze_notify:
7531 * @object: a #GObject
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
7538 * This is necessary for accessors that modify multiple properties to prevent
7539 * premature notification while the object is still being modified.
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
7549 * Gets properties of an object.
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().
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:
7565 * g_object_get (my_object,
7566 * "int-property", &intval,
7567 * "str-property", &strval,
7568 * "obj-property", &objval,
7571 * // Do something with intval, strval, objval
7574 * g_object_unref (objval);
7581 * g_object_get_data:
7582 * @object: #GObject containing the associations
7583 * @key: name of the key for that association
7585 * Gets a named field from the objects table of associations (see g_object_set_data()).
7587 * Returns: (transfer none): the data if found, or %NULL if no such data exists.
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
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().
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().
7604 * Note that g_object_get_property() is really intended for language
7605 * bindings, g_object_get() is much more convenient for C programming.
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
7614 * This function gets back user data pointers stored via
7615 * g_object_set_qdata().
7617 * Returns: (transfer none): The user data pointer set, or %NULL
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
7627 * Gets properties of an object.
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().
7633 * See g_object_get().
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.
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().
7649 * interface with the name @property_name, or %NULL if no
7650 * such property exists.
7653 * Returns: (transfer none): the #GParamSpec for the property of the
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
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.
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.
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.
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().
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
7698 * Returns: (array length=n_properties_p) (transfer container): a
7703 * g_object_is_floating:
7704 * @object: (type GObject.Object): a #GObject
7706 * Checks whether @object has a <link linkend="floating-ref">floating</link>
7710 * Returns: %TRUE if @object has a floating reference
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
7720 * Creates a new instance of a #GObject subtype and sets its properties.
7722 * Construction parameters (see #G_PARAM_CONSTRUCT, #G_PARAM_CONSTRUCT_ONLY)
7723 * which are not explicitly specified are set to their default values.
7725 * Returns: (transfer full): a new instance of @object_type
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
7735 * Creates a new instance of a #GObject subtype and sets its properties.
7737 * Construction parameters (see #G_PARAM_CONSTRUCT, #G_PARAM_CONSTRUCT_ONLY)
7738 * which are not explicitly specified are set to their default values.
7740 * Returns: a new instance of @object_type
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
7750 * Creates a new instance of a #GObject subtype and sets its properties.
7752 * Construction parameters (see #G_PARAM_CONSTRUCT, #G_PARAM_CONSTRUCT_ONLY)
7753 * which are not explicitly specified are set to their default values.
7757 * Rename to: g_object_new
7758 * Returns: (type GObject.Object) (transfer full): a new instance of
7764 * @object: a #GObject
7765 * @property_name: the name of a property installed on the class of @object.
7767 * Emits a "notify" signal for the property @property_name on @object.
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()
7776 * g_object_notify_by_pspec:
7777 * @object: a #GObject
7778 * @pspec: the #GParamSpec of a property installed on the class of @object.
7780 * Emits a "notify" signal for the property specified by @pspec on @object.
7782 * This function omits the property name lookup, hence it is faster than
7783 * g_object_notify().
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.:
7798 * static GParamSpec *properties[PROP_LAST];
7801 * my_object_class_init (MyObjectClass *klass)
7803 * properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
7806 * G_PARAM_READWRITE);
7807 * g_object_class_install_property (gobject_class,
7809 * properties[PROP_FOO]);
7813 * and then notify a change on the "foo" property with:
7816 * g_object_notify_by_pspec (self, properties[PROP_FOO]);
7825 * @object: (type GObject.Object): a #GObject
7827 * Increases the reference count of @object.
7829 * Returns: (type GObject.Object) (transfer none): the same @object
7834 * g_object_ref_sink:
7835 * @object: (type GObject.Object): a #GObject
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.
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.
7848 * Returns: (type GObject.Object) (transfer none): @object
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
7858 * Removes a reference added with g_object_add_toggle_ref(). The
7859 * reference count of the object is decreased by one.
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.
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().
7877 * g_object_run_dispose:
7878 * @object: a #GObject
7880 * Releases all references to other objects. This can be used to break
7883 * This functions should only be called from object system implementations.
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
7893 * Sets properties on an object.
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
7903 * Each object carries around a table of associations from
7904 * strings to pointers. This function lets you set an association.
7906 * If the object already had an association with that name,
7907 * the old association will be destroyed.
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
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.
7922 * Note that the @destroy callback is not called if @data is %NULL.
7927 * g_object_set_property:
7928 * @object: a #GObject
7929 * @property_name: the name of the property to set
7932 * Sets a property on an object.
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
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.
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
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.
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
7974 * Sets properties on an object.
7979 * g_object_steal_data:
7980 * @object: #GObject containing the associations
7981 * @key: name of the key
7983 * Remove a specified datum from the object's data associations,
7984 * without invoking the association's destroy handler.
7986 * Returns: (transfer full): the data if found, or %NULL if no such data exists.
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
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
7999 * Usually, calling this function is only required to update
8000 * user data pointers with a destroy notifier, for example:
8003 * object_add_to_user_list (GObject *object,
8004 * const gchar *new_string)
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);
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);
8017 * free_string_list (gpointer data)
8019 * GList *node, *list = data;
8021 * for (node = list; node; node = node->next)
8022 * g_free (node->data);
8023 * g_list_free (list);
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().
8031 * Returns: (transfer full): The user data pointer set, or %NULL
8036 * g_object_thaw_notify:
8037 * @object: a #GObject
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.
8043 * It is an error to call this function when the freeze count is zero.
8049 * @object: (type GObject.Object): a #GObject
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).
8057 * g_object_watch_closure:
8058 * @object: GObject restricting lifetime of @closure
8059 * @closure: GClosure to watch
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.
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
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).
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
8093 * Removes a weak reference callback to an object.
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
8105 * Creates a new #GParamSpecBoolean instance specifying a %G_TYPE_BOOLEAN
8108 * See g_param_spec_internal() for details on property names.
8110 * Returns: a newly created parameter specification
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
8122 * Creates a new #GParamSpecBoxed instance specifying a %G_TYPE_BOXED
8125 * See g_param_spec_internal() for details on property names.
8127 * Returns: a newly created parameter specification
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
8141 * Creates a new #GParamSpecChar instance specifying a %G_TYPE_CHAR property.
8143 * Returns: a newly created parameter specification
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
8157 * Creates a new #GParamSpecDouble instance specifying a %G_TYPE_DOUBLE
8160 * See g_param_spec_internal() for details on property names.
8162 * Returns: a newly created parameter specification
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
8175 * Creates a new #GParamSpecEnum instance specifying a %G_TYPE_ENUM
8178 * See g_param_spec_internal() for details on property names.
8180 * Returns: a newly created parameter specification
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
8193 * Creates a new #GParamSpecFlags instance specifying a %G_TYPE_FLAGS
8196 * See g_param_spec_internal() for details on property names.
8198 * Returns: a newly created parameter specification
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
8212 * Creates a new #GParamSpecFloat instance specifying a %G_TYPE_FLOAT property.
8214 * See g_param_spec_internal() for details on property names.
8216 * Returns: a newly created parameter specification
8221 * g_param_spec_get_blurb:
8222 * @pspec: a valid #GParamSpec
8224 * Get the short description of a #GParamSpec.
8226 * Returns: the short description of @pspec.
8231 * g_param_spec_get_name:
8232 * @pspec: a valid #GParamSpec
8234 * Get the name of a #GParamSpec.
8236 * The name is always an "interned" string (as per g_intern_string()).
8237 * This allows for pointer-value comparisons.
8239 * Returns: the name of @pspec.
8244 * g_param_spec_get_nick:
8245 * @pspec: a valid #GParamSpec
8247 * Get the nickname of a #GParamSpec.
8249 * Returns: the nickname of @pspec.
8254 * g_param_spec_get_qdata:
8255 * @pspec: a valid #GParamSpec
8256 * @quark: a #GQuark, naming the user data pointer
8258 * Gets back user data pointers stored via g_param_spec_set_qdata().
8260 * Returns: (transfer none): the user data pointer set, or %NULL
8265 * g_param_spec_get_redirect_target:
8266 * @pspec: a #GParamSpec
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.
8277 * paramspec should be redirected, or %NULL if none.
8280 * Returns: (transfer none): paramspec to which requests on this
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
8292 * Creates a new #GParamSpecGType instance specifying a
8293 * %G_TYPE_GTYPE property.
8295 * See g_param_spec_internal() for details on property names.
8298 * Returns: a newly created parameter specification
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
8312 * Creates a new #GParamSpecInt instance specifying a %G_TYPE_INT property.
8314 * See g_param_spec_internal() for details on property names.
8316 * Returns: a newly created parameter specification
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
8330 * Creates a new #GParamSpecInt64 instance specifying a %G_TYPE_INT64 property.
8332 * See g_param_spec_internal() for details on property names.
8334 * Returns: a newly created parameter specification
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
8346 * Creates a new #GParamSpec instance.
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.
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.
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.
8364 * Returns: a newly allocated #GParamSpec instance
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
8378 * Creates a new #GParamSpecLong instance specifying a %G_TYPE_LONG property.
8380 * See g_param_spec_internal() for details on property names.
8382 * Returns: a newly created parameter specification
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
8394 * Creates a new #GParamSpecBoxed instance specifying a %G_TYPE_OBJECT
8397 * See g_param_spec_internal() for details on property names.
8399 * Returns: a newly created parameter specification
8404 * g_param_spec_override: (skip)
8405 * @name: the name of the property.
8406 * @overridden: The property that is being overridden
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.
8413 * Returns: the newly created #GParamSpec
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
8425 * Creates a new #GParamSpecParam instance specifying a %G_TYPE_PARAM
8428 * See g_param_spec_internal() for details on property names.
8430 * Returns: a newly created parameter specification
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
8441 * Creates a new #GParamSpecPoiner instance specifying a pointer property.
8443 * See g_param_spec_internal() for details on property names.
8445 * Returns: a newly created parameter specification
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
8455 * Inserts a #GParamSpec in the pool.
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
8465 * Gets an array of all #GParamSpec<!-- -->s owned by @owner_type in
8468 * allocated array containing pointers to all #GParamSpecs
8469 * owned by @owner_type in the pool
8471 * Returns: (array length=n_pspecs_p) (transfer container): a newly
8476 * g_param_spec_pool_list_owned:
8477 * @pool: a #GParamSpecPool
8478 * @owner_type: the owner to look for
8480 * Gets an #GList of all #GParamSpec<!-- -->s owned by @owner_type in
8483 * #GList of all #GParamSpec<!-- -->s owned by @owner_type in
8484 * the pool#GParamSpec<!-- -->s.
8486 * Returns: (transfer container) (element-type GObject.ParamSpec): a
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.
8497 * Looks up a #GParamSpec in the pool.
8499 * matching #GParamSpec was found.
8501 * Returns: (transfer none): The found #GParamSpec, or %NULL if no
8506 * g_param_spec_pool_new:
8507 * @type_prefixing: Whether the pool will support type-prefixed property names.
8509 * Creates a new #GParamSpecPool.
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.
8516 * Returns: (transfer none): a newly allocated #GParamSpecPool.
8521 * g_param_spec_pool_remove:
8522 * @pool: a #GParamSpecPool
8523 * @pspec: the #GParamSpec to remove
8525 * Removes a #GParamSpec from the pool.
8530 * g_param_spec_ref: (skip)
8531 * @pspec: a valid #GParamSpec
8533 * Increments the reference count of @pspec.
8535 * Returns: the #GParamSpec that was passed into this function
8540 * g_param_spec_ref_sink: (skip)
8541 * @pspec: a valid #GParamSpec
8543 * Convenience function to ref and sink a #GParamSpec.
8546 * Returns: the #GParamSpec that was passed into this function
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
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.
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
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.
8581 * g_param_spec_sink:
8582 * @pspec: a valid #GParamSpec
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).
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
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.
8604 * Returns: (transfer none): the user data pointer set, or %NULL
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
8616 * Creates a new #GParamSpecString instance.
8618 * See g_param_spec_internal() for details on property names.
8620 * Returns: a newly created parameter specification
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
8634 * Creates a new #GParamSpecUChar instance specifying a %G_TYPE_UCHAR property.
8636 * Returns: a newly created parameter specification
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
8650 * Creates a new #GParamSpecUInt instance specifying a %G_TYPE_UINT property.
8652 * See g_param_spec_internal() for details on property names.
8654 * Returns: a newly created parameter specification
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
8668 * Creates a new #GParamSpecUInt64 instance specifying a %G_TYPE_UINT64
8671 * See g_param_spec_internal() for details on property names.
8673 * Returns: a newly created parameter specification
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
8687 * Creates a new #GParamSpecULong instance specifying a %G_TYPE_ULONG
8690 * See g_param_spec_internal() for details on property names.
8692 * Returns: a newly created parameter specification
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
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().
8708 * See g_param_spec_internal() for details on property names.
8710 * Returns: a newly created parameter specification
8715 * g_param_spec_unref: (skip)
8716 * @pspec: a valid #GParamSpec
8718 * Decrements the reference count of a @pspec.
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
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().
8735 * See g_param_spec_internal() for details on property names.
8737 * Returns: a newly created parameter specification
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
8750 * Creates a new #GParamSpecVariant instance specifying a #GVariant
8753 * If @default_value is floating, it is consumed.
8755 * See g_param_spec_internal() for details on property names.
8757 * Returns: the newly created #GParamSpec
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.
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.
8772 * Returns: The new type identifier.
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
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.
8788 * See also g_value_type_transformable(), g_value_transform() and
8789 * g_param_value_validate().
8791 * %FALSE otherwise and @dest_value is left untouched.
8793 * Returns: %TRUE if transformation and validation were successful,
8798 * g_param_value_defaults:
8799 * @pspec: a valid #GParamSpec
8800 * @value: a #GValue of correct type for @pspec
8802 * Checks whether @value contains the default value as specified in @pspec.
8804 * Returns: whether @value contains the canonical default for this @pspec
8809 * g_param_value_set_default:
8810 * @pspec: a valid #GParamSpec
8811 * @value: a #GValue of correct type for @pspec
8813 * Sets @value to its default value as specified in @pspec.
8818 * g_param_value_validate:
8819 * @pspec: a valid #GParamSpec
8820 * @value: a #GValue of correct type for @pspec
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
8829 * Returns: whether modifying @value was necessary to ensure validity
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
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,
8843 * Returns: -1, 0 or +1, for a less than, equal to or greater than result
8848 * g_pointer_type_register_static:
8849 * @name: the name of the new pointer type.
8851 * Creates a new %G_TYPE_POINTER derived type id for a new
8852 * pointer type with name @name.
8854 * Returns: a new %G_TYPE_POINTER derived type id for @name.
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
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.
8869 * Returns: a pointer to the new allocated memory, cast to a pointer to @struct_type
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
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).
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").
8891 * Returns: standard #GSignalAccumulator result
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
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.
8912 * Returns: standard #GSignalAccumulator result
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.
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.
8928 * Returns: the hook id, for later use with g_signal_remove_emission_hook().
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.
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().
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.
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().
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.
8965 * Connects a #GCallback function to a signal for a particular object.
8967 * The handler will be called before the default handler of the signal.
8969 * Returns: the handler id
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.
8980 * Connects a #GCallback function to a signal for a particular object.
8982 * The handler will be called after the default handler of the signal.
8984 * Returns: the handler id
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.
8995 * Connects a closure to a signal for a particular object.
8997 * Returns: the handler id
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.
9009 * Connects a closure to a signal for a particular object.
9011 * Returns: the handler id
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.
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.
9030 * Returns: the handler id
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.
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.
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
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>
9065 * Returns: the handler id.
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.
9076 * Connects a #GCallback function to a signal for a particular object.
9078 * The instance on which the signal is emitted and @data will be swapped when
9079 * calling the handler.
9081 * Returns: the handler id
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.
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().
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.
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().
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.
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().
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.
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().
9141 * g_signal_get_invocation_hint:
9142 * @instance: the instance to query
9144 * Returns the invocation hint of the innermost signal emission of instance.
9146 * Returns: (transfer none): the invocation hint of the innermost signal emission.
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.
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.
9161 * The @handler_id has to be a valid signal handler id, connected to a
9162 * signal of @instance.
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.
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.
9175 * The @handler_id has to be a valid signal handler id, connected to a
9176 * signal of @instance.
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.
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.
9196 * Returns: A valid non-0 signal handler id for a successful match.
9201 * g_signal_handler_is_connected:
9202 * @instance: The instance where a signal handler is sought.
9203 * @handler_id: the handler id.
9205 * Returns whether @handler_id is the id of a handler connected to @instance.
9207 * Returns: whether @handler_id identifies a handler connected to @instance.
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.
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
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.
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.
9238 * Blocks all handlers on an instance that match @func and @data.
9240 * Returns: The number of handlers that matched.
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.
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
9262 * Returns: The number of handlers that matched.
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.
9272 * Disconnects all handlers on an instance that match @func and @data.
9274 * Returns: The number of handlers that matched.
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.
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.
9297 * Returns: The number of handlers that matched.
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.
9307 * Unblocks all handlers on an instance that match @func and @data.
9309 * Returns: The number of handlers that matched.
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.
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.
9332 * Returns: The number of handlers that matched.
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.
9343 * Returns whether there are any handlers connected to @instance for the
9344 * given signal id and detail.
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.
9353 * Returns: %TRUE if a handler is connected to the signal, %FALSE
9358 * g_signal_list_ids:
9359 * @itype: Instance or interface type.
9360 * @n_ids: Location to store the number of signal ids for @itype.
9362 * Lists the signals by id that a certain instance or interface type
9363 * created. Further information about the signals can be acquired through
9366 * Returns: (array length=n_ids): Newly allocated array of signal IDs.
9372 * @name: the signal's name.
9373 * @itype: the type that the signal operates on.
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.
9379 * Also tries the ancestors of the given type.
9381 * See g_signal_new() for details on allowed signal names.
9383 * Returns: the signal's identifying number, or 0 if no signal was found.
9389 * @signal_id: the signal's identifying number.
9391 * Given the signal's identifier, finds its name.
9393 * Two different signals may have the same name, if they have differing types.
9395 * Returns: the signal name, or %NULL if the signal number was invalid.
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.
9412 * Creates a new signal. (This is usually done in the class initializer.)
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.
9419 * When registering a signal and looking up a signal, either separator can
9420 * be used, but they cannot be mixed.
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().
9427 * If c_marshaller is %NULL, g_cclosure_marshal_generic() will be used as
9428 * the marshaller for this signal.
9430 * Returns: the signal id
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.
9447 * Creates a new signal. (This is usually done in the class initializer.)
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().
9459 * See g_signal_new() for information about signal names.
9461 * If c_marshaller is %NULL @g_cclosure_marshal_generic will be used as
9462 * the marshaller for this signal.
9464 * Returns: the signal id
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.
9482 * Creates a new signal. (This is usually done in the class initializer.)
9484 * See g_signal_new() for details on allowed signal names.
9486 * If c_marshaller is %NULL, g_cclosure_marshal_generic() will be used as
9487 * the marshaller for this signal.
9489 * Returns: the signal id
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
9506 * Creates a new signal. (This is usually done in the class initializer.)
9508 * See g_signal_new() for details on allowed signal names.
9510 * If c_marshaller is %NULL @g_cclosure_marshal_generic will be used as
9511 * the marshaller for this signal.
9513 * Returns: the signal id
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.
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.
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.
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.
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.
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.
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.
9560 * Internal function to parse a signal name into its @signal_id
9561 * and @detail quark.
9563 * Returns: Whether the signal name could successfully be parsed and @signal_id_p and @detail_p contain valid return values.
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.
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.
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()
9586 * Deletes an emission hook.
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.
9596 * Stops a signal's current emission.
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"
9602 * Prints a warning if used on a signal which isn't being emitted.
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".
9611 * Stops a signal's current emission.
9613 * This is just like g_signal_stop_emission() except it will look up the
9614 * signal id for you.
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
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.
9627 * Returns: a new #GCClosure
9632 * g_source_set_closure:
9633 * @source: the source
9634 * @closure: a #GClosure
9636 * Set the callback for a source as a #GClosure.
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.
9645 * g_source_set_dummy_callback:
9646 * @source: the source
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
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
9662 * g_strdup_value_contents:
9663 * @value: #GValue which contents are to be described.
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.
9670 * Returns: Newly allocated string.
9676 * @struct_type: the type of the elements to allocate
9677 * @n_structs: the number of elements to allocate
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.
9685 * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type
9691 * @struct_type: the type of the elements to allocate
9692 * @n_structs: the number of elements to allocate
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.
9701 * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type
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
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.
9718 * Returns: a pointer to the new allocated memory, cast to a pointer to @struct_type
9723 * g_type_add_class_cache_func: (skip)
9724 * @cache_data: data to be passed to @cache_func
9725 * @cache_func: a #GTypeClassCacheFunc
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
9738 * g_type_add_class_private:
9739 * @class_type: GType of an classed type.
9740 * @private_size: size of private structure.
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.
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.
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).
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
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.
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.
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.
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.
9799 * g_type_check_instance:
9800 * @instance: A valid #GTypeInstance structure.
9801 * @Returns: #TRUE if @instance is valid, #FALSE otherwise.
9803 * Private helper function to aid implementation of the G_TYPE_CHECK_INSTANCE()
9810 * @type: The parent type.
9811 * @n_children: (out) (allow-none): Optional #guint pointer to contain the number of child types.
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.
9816 * and 0-terminated array of child types.
9818 * Returns: (array length=n_children) (transfer full): Newly allocated
9823 * g_type_class_add_private:
9824 * @g_class: class structure for an instantiatable type
9825 * @private_size: size of private structure.
9827 * Registers a private structure for an instantiatable type.
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
9834 * Note that the accumulated size of the private structures of
9835 * a type and all its parent types cannot excced 64kB.
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.
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
9845 * type's class_init() function.
9848 * typedef struct _MyObject MyObject;
9849 * typedef struct _MyObjectPrivate MyObjectPrivate;
9851 * struct _MyObject {
9854 * MyObjectPrivate *priv;
9857 * struct _MyObjectPrivate {
9862 * my_object_class_init (MyObjectClass *klass)
9864 * g_type_class_add_private (klass, sizeof (MyObjectPrivate));
9868 * my_object_init (MyObject *my_object)
9870 * my_object->priv = G_TYPE_INSTANCE_GET_PRIVATE (my_object,
9876 * my_object_get_some_field (MyObject *my_object)
9878 * MyObjectPrivate *priv = my_object->priv;
9880 * return priv->some_field;
9889 * g_type_class_peek:
9890 * @type: Type ID of a classed type.
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).
9897 * structure for the given type ID or %NULL if the class does not
9900 * Returns: (type GObject.TypeClass) (transfer none): The #GTypeClass
9905 * g_type_class_peek_parent:
9906 * @g_class: (type GObject.TypeClass): The #GTypeClass structure to retrieve the parent class for.
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
9916 * g_type_class_peek (g_type_parent (G_TYPE_FROM_CLASS (g_class)));
9921 * Returns: (type GObject.TypeClass) (transfer none): The parent class
9926 * g_type_class_peek_static:
9927 * @type: Type ID of a classed type.
9929 * A more efficient version of g_type_class_peek() which works only for
9932 * structure for the given type ID or %NULL if the class does not
9933 * currently exist or is dynamically loaded.
9936 * Returns: (type GObject.TypeClass) (transfer none): The #GTypeClass
9942 * @type: Type ID of a classed type.
9944 * Increments the reference count of the class structure belonging to
9945 * @type. This function will demand-create the class if it doesn't
9948 * structure for the given type ID.
9950 * Returns: (type GObject.TypeClass) (transfer none): The #GTypeClass
9955 * g_type_class_unref:
9956 * @g_class: (type GObject.TypeClass): The #GTypeClass structure to unreference.
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.
9966 * g_type_class_unref_uncached: (skip)
9967 * @g_class: (type GObject.TypeClass): The #GTypeClass structure to unreference.
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
9977 * g_type_create_instance: (skip)
9978 * @type: An instantiatable type to create an instance for.
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.
9994 * treatment by the fundamental type implementation.
9996 * Returns: An allocated and initialized instance, subject to further
10001 * g_type_default_interface_peek:
10002 * @g_type: an interface type
10004 * If the interface type @g_type is currently in use, returns its
10005 * default interface vtable.
10008 * vtable for the interface, or %NULL if the type is not currently in
10012 * Returns: (type GObject.TypeInterface) (transfer none): the default
10017 * g_type_default_interface_ref:
10018 * @g_type: an interface type
10020 * Increments the reference count for the interface type @g_type,
10021 * and returns the default interface vtable for the type.
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.
10033 * vtable for the interface; call g_type_default_interface_unref()
10034 * when you are done using the interface.
10037 * Returns: (type GObject.TypeInterface) (transfer none): the default
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()
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.
10058 * @type: A #GType value.
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.
10063 * Returns: The depth of @type.
10068 * g_type_free_instance:
10069 * @instance: an instance of a type.
10071 * Frees an instance of a type, returning it to the instance pool for
10072 * the type, if there is one.
10074 * Like g_type_create_instance(), this function is reserved for
10075 * implementors of fundamental types.
10080 * g_type_from_name:
10081 * @name: Type name to lookup.
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
10088 * Returns: Corresponding type ID or 0.
10093 * g_type_fundamental:
10094 * @type_id: valid type ID
10096 * Internal function, used to extract the fundamental type ID portion.
10097 * use G_TYPE_FUNDAMENTAL() instead.
10099 * Returns: fundamental type ID
10104 * g_type_fundamental_next:
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.
10111 * or 0 if the type system ran out of fundamental type IDs.
10113 * Returns: The nextmost fundamental type ID to be registered,
10118 * g_type_get_plugin:
10119 * @type: The #GType to retrieve the plugin for.
10121 * Returns the #GTypePlugin structure for @type or
10122 * %NULL if @type does not have a #GTypePlugin structure.
10124 * dynamic type, %NULL otherwise.
10126 * Returns: (transfer none): The corresponding plugin if @type is a
10131 * g_type_get_qdata:
10133 * @quark: a #GQuark id to identify the data
10135 * Obtains data which has previously been attached to @type
10136 * with g_type_set_qdata().
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().
10142 * Returns: (transfer none): the data, or %NULL if no data was found
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
10154 * Since version 2.24 this also initializes the thread system
10159 * g_type_init_with_debug_flags:
10160 * @debug_flags: Bitwise combination of #GTypeDebugFlags values for debugging purposes.
10162 * Similar to g_type_init(), but additionally sets debug flags.
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.
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.
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.
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().
10189 * interface @interface_type of @instance_type.
10191 * Returns: (transfer none): the #GTypePlugin for the dynamic
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.
10200 * Returns the #GTypeInterface structure of an interface to which the
10201 * passed in class conforms.
10203 * structure of iface_type if implemented by @instance_class, %NULL
10206 * Returns: (type GObject.TypeInterface) (transfer none): The GTypeInterface
10211 * g_type_interface_peek_parent:
10212 * @g_iface: (type GObject.TypeInterface): A #GTypeInterface structure.
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.
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.
10223 * Returns: (transfer none) (type GObject.TypeInterface): The
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
10232 * Returns the prerequisites of an interfaces type.
10235 * newly-allocated zero-terminated array of #GType containing
10236 * the prerequisites of @interface_type
10239 * Returns: (array length=n_prerequisites) (transfer full): a
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.
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.
10252 * allocated and 0-terminated array of interface types.
10254 * Returns: (array length=n_interfaces) (transfer full): Newly
10260 * @type: Type to check anchestry for.
10261 * @is_a_type: Possible anchestor of @type or interface @type could conform to.
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.
10267 * Returns: %TRUE if @type is_a @is_a_type holds true.
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
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.
10282 * As long as any instances of the type exist, the type plugin will
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.
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.
10298 * As long as any instances of the type exist, the type plugin will
10302 * Returns: the new or existing type ID
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.
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.
10317 * As long as any instances of the type exist, the type plugin will
10321 * Returns: the new or existing type ID
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
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.
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.
10342 * As long as any instances of the type exist, the type plugin will
10345 * Returns: the new or existing type ID
10350 * g_type_module_set_name:
10351 * @module: a #GTypeModule.
10352 * @name: a human-readable name to use in error messages.
10354 * Sets the name for a #GTypeModule
10359 * g_type_module_unuse:
10360 * @module: a #GTypeModule
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.)
10371 * g_type_module_use:
10372 * @module: a #GTypeModule
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
10379 * loading the plugin failed.
10381 * Returns: %FALSE if the plugin needed to be loaded and
10387 * @type: Type to return name for.
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.
10395 * Returns: Static type name or %NULL.
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.
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.
10412 * Returns: Immediate child of @root_type and anchestor of @leaf_type.
10418 * @type: The derived type.
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.
10423 * Returns: The parent type.
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
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.
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
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.
10454 * g_type_plugin_unuse:
10455 * @plugin: a #GTypePlugin
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.
10464 * g_type_plugin_use:
10465 * @plugin: a #GTypePlugin
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.
10475 * @type: Type to return quark of type name for.
10477 * Get the corresponding quark of the type IDs name.
10479 * Returns: The type names quark or 0.
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.
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
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.
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.
10510 * Returns: The new type identifier or #G_TYPE_INVALID if registration failed.
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.
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.
10529 * Returns: The predefined type identifier.
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.
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.
10546 * Returns: The new type identifier.
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.
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().
10566 * Returns: The new type identifier.
10571 * g_type_remove_class_cache_func: (skip)
10572 * @cache_data: data that was given when adding @cache_func
10573 * @cache_func: a #GTypeClassCacheFunc
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.
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()
10586 * Removes an interface check function added with
10587 * g_type_add_interface_check().
10594 * g_type_set_qdata:
10596 * @quark: a #GQuark id to identify the data
10599 * Attaches arbitrary data to a type.
10604 * g_type_value_table_peek: (skip)
10605 * @type: A #GType value.
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>
10612 * %NULL if there is no #GTypeValueTable associated with @type.
10614 * Returns: Location of the #GTypeValueTable associated with @type or
10619 * g_utf8_next_char:
10620 * @p: Pointer to the start of a valid UTF-8 character
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.
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
10636 * Insert a copy of @value as last element of @value_array. If @value is
10637 * %NULL, an uninitialized value is appended.
10639 * Returns: (transfer none): the #GValueArray passed in as @value_array
10644 * g_value_array_copy:
10645 * @value_array: #GValueArray to copy
10647 * Construct an exact copy of a #GValueArray by duplicating all its
10650 * Returns: (transfer full): Newly allocated copy of #GValueArray
10655 * g_value_array_free:
10656 * @value_array: #GValueArray to free
10658 * Free a #GValueArray including its contents.
10663 * g_value_array_get_nth:
10664 * @value_array: #GValueArray to get a value from
10665 * @index_: index of the value of interest
10667 * Return a pointer to the value at @index_ containd in @value_array.
10669 * Returns: (transfer none): pointer to a value at @index_ in @value_array
10674 * g_value_array_insert:
10675 * @value_array: #GValueArray to add an element to
10676 * @index_: insertion position, must be <= value_array->n_values
10677 * @value: (allow-none): #GValue to copy into #GValueArray, or %NULL
10679 * Insert a copy of @value at specified position into @value_array. If @value
10680 * is %NULL, an uninitialized value is inserted.
10682 * Returns: (transfer none): the #GValueArray passed in as @value_array
10687 * g_value_array_new:
10688 * @n_prealloced: number of values to preallocate space for
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.
10694 * Returns: a newly allocated #GValueArray with 0 values
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
10703 * Insert a copy of @value as first element of @value_array. If @value is
10704 * %NULL, an uninitialized value is prepended.
10706 * Returns: (transfer none): the #GValueArray passed in as @value_array
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>
10715 * Remove the value at position @index_ from @value_array.
10717 * Returns: (transfer none): the #GValueArray passed in as @value_array
10722 * g_value_array_sort:
10723 * @value_array: #GValueArray to sort
10724 * @compare_func: (scope call): function to compare elements
10726 * Sort @value_array using @compare_func to compare the elements according to
10727 * the semantics of #GCompareFunc.
10729 * The current implementation uses Quick-Sort as sorting algorithm.
10731 * Returns: (transfer none): the #GValueArray passed in as @value_array
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
10741 * Sort @value_array using @compare_func to compare the elements according
10742 * to the semantics of #GCompareDataFunc.
10744 * The current implementation uses Quick-Sort as sorting algorithm.
10746 * Rename to: g_value_array_sort
10747 * Returns: (transfer none): the #GValueArray passed in as @value_array
10753 * @src_value: An initialized #GValue structure.
10754 * @dest_value: An initialized #GValue structure of the same type as @src_value.
10756 * Copies the value of @src_value into @dest_value.
10761 * g_value_dup_boxed: (skip)
10762 * @value: a valid #GValue of %G_TYPE_BOXED derived type
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),
10769 * Returns: boxed contents of @value
10774 * g_value_dup_object:
10775 * @value: a valid #GValue whose type is derived from %G_TYPE_OBJECT
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.
10781 * should be unreferenced when no longer needed.
10783 * Returns: (type GObject.Object) (transfer full): object content of @value,
10788 * g_value_dup_param: (skip)
10789 * @value: a valid #GValue whose type is derived from %G_TYPE_PARAM
10791 * Get the contents of a %G_TYPE_PARAM #GValue, increasing its
10794 * no longer needed.
10796 * Returns: #GParamSpec content of @value, should be unreferenced when
10801 * g_value_dup_string:
10802 * @value: a valid #GValue of type %G_TYPE_STRING
10804 * Get a copy the contents of a %G_TYPE_STRING #GValue.
10806 * Returns: a newly allocated copy of the string content of @value
10811 * g_value_dup_variant:
10812 * @value: a valid #GValue of type %G_TYPE_VARIANT
10814 * Get the contents of a variant #GValue, increasing its refcount.
10816 * g_variant_unref() when no longer needed
10818 * Returns: variant contents of @value, should be unrefed using
10824 * g_value_fits_pointer:
10825 * @value: An initialized #GValue structure.
10827 * Determines if @value will fit inside the size of a pointer value.
10828 * This is an internal function introduced mainly for C marshallers.
10830 * Returns: %TRUE if @value will fit inside a pointer value.
10835 * g_value_get_boolean:
10836 * @value: a valid #GValue of type %G_TYPE_BOOLEAN
10838 * Get the contents of a %G_TYPE_BOOLEAN #GValue.
10840 * Returns: boolean contents of @value
10845 * g_value_get_boxed:
10846 * @value: a valid #GValue of %G_TYPE_BOXED derived type
10848 * Get the contents of a %G_TYPE_BOXED derived #GValue.
10850 * Returns: (transfer none): boxed contents of @value
10855 * g_value_get_char:
10856 * @value: a valid #GValue of type %G_TYPE_CHAR
10858 * Get the contents of a %G_TYPE_CHAR #GValue.
10860 * Returns: character contents of @value
10865 * g_value_get_double:
10866 * @value: a valid #GValue of type %G_TYPE_DOUBLE
10868 * Get the contents of a %G_TYPE_DOUBLE #GValue.
10870 * Returns: double contents of @value
10875 * g_value_get_enum:
10876 * @value: a valid #GValue whose type is derived from %G_TYPE_ENUM
10878 * Get the contents of a %G_TYPE_ENUM #GValue.
10880 * Returns: enum contents of @value
10885 * g_value_get_flags:
10886 * @value: a valid #GValue whose type is derived from %G_TYPE_FLAGS
10888 * Get the contents of a %G_TYPE_FLAGS #GValue.
10890 * Returns: flags contents of @value
10895 * g_value_get_float:
10896 * @value: a valid #GValue of type %G_TYPE_FLOAT
10898 * Get the contents of a %G_TYPE_FLOAT #GValue.
10900 * Returns: float contents of @value
10905 * g_value_get_gtype:
10906 * @value: a valid #GValue of type %G_TYPE_GTYPE
10908 * Get the contents of a %G_TYPE_GTYPE #GValue.
10911 * Returns: the #GType stored in @value
10917 * @value: a valid #GValue of type %G_TYPE_INT
10919 * Get the contents of a %G_TYPE_INT #GValue.
10921 * Returns: integer contents of @value
10926 * g_value_get_int64:
10927 * @value: a valid #GValue of type %G_TYPE_INT64
10929 * Get the contents of a %G_TYPE_INT64 #GValue.
10931 * Returns: 64bit integer contents of @value
10936 * g_value_get_long:
10937 * @value: a valid #GValue of type %G_TYPE_LONG
10939 * Get the contents of a %G_TYPE_LONG #GValue.
10941 * Returns: long integer contents of @value
10946 * g_value_get_object:
10947 * @value: a valid #GValue of %G_TYPE_OBJECT derived type
10949 * Get the contents of a %G_TYPE_OBJECT derived #GValue.
10951 * Returns: (type GObject.Object) (transfer none): object contents of @value
10956 * g_value_get_param:
10957 * @value: a valid #GValue whose type is derived from %G_TYPE_PARAM
10959 * Get the contents of a %G_TYPE_PARAM #GValue.
10961 * Returns: (transfer none): #GParamSpec content of @value
10966 * g_value_get_pointer:
10967 * @value: a valid #GValue of %G_TYPE_POINTER
10969 * Get the contents of a pointer #GValue.
10971 * Returns: (transfer none): pointer contents of @value
10976 * g_value_get_string:
10977 * @value: a valid #GValue of type %G_TYPE_STRING
10979 * Get the contents of a %G_TYPE_STRING #GValue.
10981 * Returns: string content of @value
10986 * g_value_get_uchar:
10987 * @value: a valid #GValue of type %G_TYPE_UCHAR
10989 * Get the contents of a %G_TYPE_UCHAR #GValue.
10991 * Returns: unsigned character contents of @value
10996 * g_value_get_uint:
10997 * @value: a valid #GValue of type %G_TYPE_UINT
10999 * Get the contents of a %G_TYPE_UINT #GValue.
11001 * Returns: unsigned integer contents of @value
11006 * g_value_get_uint64:
11007 * @value: a valid #GValue of type %G_TYPE_UINT64
11009 * Get the contents of a %G_TYPE_UINT64 #GValue.
11011 * Returns: unsigned 64bit integer contents of @value
11016 * g_value_get_ulong:
11017 * @value: a valid #GValue of type %G_TYPE_ULONG
11019 * Get the contents of a %G_TYPE_ULONG #GValue.
11021 * Returns: unsigned long integer contents of @value
11026 * g_value_get_variant:
11027 * @value: a valid #GValue of type %G_TYPE_VARIANT
11029 * Get the contents of a variant #GValue.
11031 * Returns: variant contents of @value
11038 * @value: A zero-filled (uninitialized) #GValue structure.
11039 * @g_type: Type the #GValue should hold values of.
11041 * Initializes @value with the default value of @type.
11043 * Returns: (transfer none): the #GValue structure that has been passed in
11048 * g_value_peek_pointer:
11049 * @value: An initialized #GValue structure.
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.
11055 * Returns: (transfer none): the value contents as pointer. This
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
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.
11073 * @value: An initialized #GValue structure.
11075 * Clears the current value in @value and resets it to the default value
11076 * (as if the value had just been initialized).
11078 * Returns: the #GValue structure that has been passed in
11083 * g_value_set_boolean:
11084 * @value: a valid #GValue of type %G_TYPE_BOOLEAN
11085 * @v_boolean: boolean value to be set
11087 * Set the contents of a %G_TYPE_BOOLEAN #GValue to @v_boolean.
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
11096 * Set the contents of a %G_TYPE_BOXED derived #GValue to @v_boxed.
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
11105 * This is an internal function introduced mainly for C marshallers.
11107 * Deprecated: 2.4: Use g_value_take_boxed() instead.
11112 * g_value_set_char:
11113 * @value: a valid #GValue of type %G_TYPE_CHAR
11114 * @v_char: character value to be set
11116 * Set the contents of a %G_TYPE_CHAR #GValue to @v_char.
11121 * g_value_set_double:
11122 * @value: a valid #GValue of type %G_TYPE_DOUBLE
11123 * @v_double: double value to be set
11125 * Set the contents of a %G_TYPE_DOUBLE #GValue to @v_double.
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
11134 * Set the contents of a %G_TYPE_ENUM #GValue to @v_enum.
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
11143 * Set the contents of a %G_TYPE_FLAGS #GValue to @v_flags.
11148 * g_value_set_float:
11149 * @value: a valid #GValue of type %G_TYPE_FLOAT
11150 * @v_float: float value to be set
11152 * Set the contents of a %G_TYPE_FLOAT #GValue to @v_float.
11157 * g_value_set_gtype:
11158 * @value: a valid #GValue of type %G_TYPE_GTYPE
11159 * @v_gtype: #GType to be set
11161 * Set the contents of a %G_TYPE_GTYPE #GValue to @v_gtype.
11168 * g_value_set_instance:
11169 * @value: An initialized #GValue structure.
11170 * @instance: (allow-none): the instance
11172 * Sets @value from an instantiatable type via the
11173 * value_table's collect_value() function.
11179 * @value: a valid #GValue of type %G_TYPE_INT
11180 * @v_int: integer value to be set
11182 * Set the contents of a %G_TYPE_INT #GValue to @v_int.
11187 * g_value_set_int64:
11188 * @value: a valid #GValue of type %G_TYPE_INT64
11189 * @v_int64: 64bit integer value to be set
11191 * Set the contents of a %G_TYPE_INT64 #GValue to @v_int64.
11196 * g_value_set_long:
11197 * @value: a valid #GValue of type %G_TYPE_LONG
11198 * @v_long: long integer value to be set
11200 * Set the contents of a %G_TYPE_LONG #GValue to @v_long.
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
11209 * Set the contents of a %G_TYPE_OBJECT derived #GValue to @v_object.
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.
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).
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
11228 * This is an internal function introduced mainly for C marshallers.
11230 * Deprecated: 2.4: Use g_value_take_object() instead.
11235 * g_value_set_param:
11236 * @value: a valid #GValue of type %G_TYPE_PARAM
11237 * @param: (allow-none): the #GParamSpec to be set
11239 * Set the contents of a %G_TYPE_PARAM #GValue to @param.
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
11248 * This is an internal function introduced mainly for C marshallers.
11250 * Deprecated: 2.4: Use g_value_take_param() instead.
11255 * g_value_set_pointer:
11256 * @value: a valid #GValue of %G_TYPE_POINTER
11257 * @v_pointer: pointer value to be set
11259 * Set the contents of a pointer #GValue to @v_pointer.
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
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.
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
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.
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
11290 * Set the contents of a %G_TYPE_STRING #GValue to @v_string.
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
11299 * This is an internal function introduced mainly for C marshallers.
11301 * Deprecated: 2.4: Use g_value_take_string() instead.
11306 * g_value_set_uchar:
11307 * @value: a valid #GValue of type %G_TYPE_UCHAR
11308 * @v_uchar: unsigned character value to be set
11310 * Set the contents of a %G_TYPE_UCHAR #GValue to @v_uchar.
11315 * g_value_set_uint:
11316 * @value: a valid #GValue of type %G_TYPE_UINT
11317 * @v_uint: unsigned integer value to be set
11319 * Set the contents of a %G_TYPE_UINT #GValue to @v_uint.
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
11328 * Set the contents of a %G_TYPE_UINT64 #GValue to @v_uint64.
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
11337 * Set the contents of a %G_TYPE_ULONG #GValue to @v_ulong.
11342 * g_value_set_variant:
11343 * @value: a valid #GValue of type %G_TYPE_VARIANT
11344 * @variant: (allow-none): a #GVariant, or %NULL
11346 * Set the contents of a variant #GValue to @variant.
11347 * If the variant is floating, it is consumed.
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
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.
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
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).
11376 * If you want the #GValue to hold its own reference to @v_object, use
11377 * g_value_set_object() instead.
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
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.
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
11401 * Sets the contents of a %G_TYPE_STRING #GValue to @v_string.
11408 * g_value_take_variant:
11409 * @value: a valid #GValue of type %G_TYPE_VARIANT
11410 * @variant: (allow-none): a #GVariant, or %NULL
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).
11417 * If @variant was floating then its floating reference is converted to
11418 * a hard reference.
11420 * If you want the #GValue to hold its own reference to @variant, use
11421 * g_value_set_variant() instead.
11423 * This is an internal function introduced mainly for C marshallers.
11430 * g_value_transform:
11431 * @src_value: Source value.
11432 * @dest_value: Target value.
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).
11442 * Upon failing transformations, @dest_value is left untouched.
11444 * Returns: Whether a transformation rule was found and could be applied.
11449 * g_value_type_compatible:
11450 * @src_type: source type to be copied.
11451 * @dest_type: destination type for copying.
11453 * Returns whether a #GValue of type @src_type can be copied into
11454 * a #GValue of type @dest_type.
11456 * Returns: %TRUE if g_value_copy() is possible with @src_type and @dest_type.
11461 * g_value_type_transformable:
11462 * @src_type: Source type.
11463 * @dest_type: Target type.
11465 * Check whether g_value_transform() is able to transform values
11466 * of type @src_type into values of type @dest_type.
11468 * Returns: %TRUE if the transformation is possible, %FALSE otherwise.
11474 * @value: An initialized #GValue structure.
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.
11484 * g_variant_get_gtype:
11495 * @expr: the expression to check
11497 * Logs a warning if the expression is not true.
11504 * g_warn_if_reached:
11506 * Logs a critical warning.
11515 * A C representable type name for #G_TYPE_STRING.
11522 * A type which can hold any UTF-32 or UCS-4 character code,
11523 * also known as a Unicode code point.
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
11529 * To print/scan values of this type as integer, use
11530 * %G_GINT32_MODIFIER and/or %G_GUINT32_FORMAT.
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".
11542 * sscanf ("U+0041", "U+%06"G_GINT32_FORMAT"X", &c)
11543 * g_print ("Read U+%04"G_GINT32_FORMAT"X", c);
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>.
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().
11561 * To print/scan values of this type as integer, use
11562 * %G_GINT16_MODIFIER and/or %G_GUINT16_FORMAT.
11567 /************************************************************/
11568 /* THIS FILE IS GENERATED DO NOT EDIT */
11569 /************************************************************/