1 /************************************************************/
2 /* THIS FILE IS GENERATED DO NOT EDIT */
3 /************************************************************/
8 * Flags to be used to control the #GBinding
17 * The #GObject that should be used as the source of the binding
24 * GBinding:source-property:
26 * The name of the property of #GBinding:source that should be used
27 * as the source of the binding
36 * The #GObject that should be used as the target of the binding
43 * GBinding:target-property:
45 * The name of the property of #GBinding:target that should be used
46 * as the target of the binding
54 * @gobject: the object which received the signal.
55 * @pspec: the #GParamSpec of the property which changed.
57 * The notify signal is emitted on an object when one of its
58 * properties has been changed. Note that getting this signal
59 * doesn't guarantee that the value of the property has actually
60 * changed, it may also be emitted when the setter for the property
61 * is called to reinstate the previous value.
63 * This signal is typically used to obtain change notification for a
64 * single property, by specifying the property name as a detail in the
65 * g_signal_connect() call, like this:
67 * g_signal_connect (text_view->buffer, "notify::paste-target-list",
68 * G_CALLBACK (gtk_text_view_target_list_notify),
71 * It is important to note that you must use
72 * <link linkend="canonical-parameter-name">canonical</link> parameter names as
73 * detail strings for the notify signal.
80 * A #GParamSpecPool maintains a collection of #GParamSpec<!-- -->s which can be
81 * quickly accessed by owner and name. The implementation of the #GObject property
82 * system uses such a pool to store the #GParamSpecs of the properties all object
90 * A structure containing a weak reference to a #GObject. It can either
91 * be empty (i.e. point to %NULL), or point to an object for as long as
92 * at least one "strong" reference to that object exists. Before the
93 * object's #GObjectClass.dispose method is called, every #GWeakRef
94 * associated with becomes empty (i.e. points to %NULL).
96 * Like #GValue, #GWeakRef can be statically allocated, stack- or
97 * heap-allocated, or embedded in larger structures.
99 * Unlike g_object_weak_ref() and g_object_add_weak_pointer(), this weak
100 * reference is thread-safe: converting a weak pointer to a reference is
101 * atomic with respect to invalidation of weak pointers to destroyed
104 * If the object's #GObjectClass.dispose method results in additional
105 * references to the object being held, any #GWeakRef<!-- -->s taken
106 * before it was disposed will continue to point to %NULL. If
107 * #GWeakRef<!-- -->s are taken after the object is disposed and
108 * re-referenced, they will continue to point to it until its refcount
109 * goes back to zero, at which point they too will be invalidated.
114 * SECTION:enumerations_flags
115 * @short_description: Enumeration and flags types
116 * @title: Enumeration and Flag Types
117 * @see_also: #GParamSpecEnum, #GParamSpecFlags, g_param_spec_enum(), g_param_spec_flags()
119 * The GLib type system provides fundamental types for enumeration and
120 * flags types. (Flags types are like enumerations, but allow their
121 * values to be combined by bitwise or). A registered enumeration or
122 * flags type associates a name and a nickname with each allowed
123 * value, and the methods g_enum_get_value_by_name(),
124 * g_enum_get_value_by_nick(), g_flags_get_value_by_name() and
125 * g_flags_get_value_by_nick() can look up values by their name or
126 * nickname. When an enumeration or flags type is registered with the
127 * GLib type system, it can be used as value type for object
128 * properties, using g_param_spec_enum() or g_param_spec_flags().
130 * GObject ships with a utility called <link
131 * linkend="glib-mkenums">glib-mkenums</link> that can construct
132 * suitable type registration functions from C enumeration
140 * @Short_Description: Bind two object properties
142 * #GBinding is the representation of a binding between a property on a
143 * #GObject instance (or source) and another property on another #GObject
144 * instance (or target). Whenever the source property changes, the same
145 * value is applied to the target property; for instance, the following
149 * g_object_bind_property (object1, "property-a",
150 * object2, "property-b",
151 * G_BINDING_DEFAULT);
154 * will cause <emphasis>object2:property-b</emphasis> to be updated every
155 * time g_object_set() or the specific accessor changes the value of
156 * <emphasis>object1:property-a</emphasis>.
158 * It is possible to create a bidirectional binding between two properties
159 * of two #GObject instances, so that if either property changes, the
160 * other is updated as well, for instance:
163 * g_object_bind_property (object1, "property-a",
164 * object2, "property-b",
165 * G_BINDING_BIDIRECTIONAL);
168 * will keep the two properties in sync.
170 * It is also possible to set a custom transformation function (in both
171 * directions, in case of a bidirectional binding) to apply a custom
172 * transformation from the source value to the target value before
173 * applying it; for instance, the following binding:
176 * g_object_bind_property_full (adjustment1, "value",
177 * adjustment2, "value",
178 * G_BINDING_BIDIRECTIONAL,
179 * celsius_to_fahrenheit,
180 * fahrenheit_to_celsius,
184 * will keep the <emphasis>value</emphasis> property of the two adjustments
185 * in sync; the <function>celsius_to_fahrenheit</function> function will be
186 * called whenever the <emphasis>adjustment1:value</emphasis> property changes
187 * and will transform the current value of the property before applying it
188 * to the <emphasis>adjustment2:value</emphasis> property; vice versa, the
189 * <function>fahrenheit_to_celsius</function> function will be called whenever
190 * the <emphasis>adjustment2:value</emphasis> property changes, and will
191 * transform the current value of the property before applying it to the
192 * <emphasis>adjustment1:value</emphasis>.
194 * Note that #GBinding does not resolve cycles by itself; a cycle like
197 * object1:propertyA -> object2:propertyB
198 * object2:propertyB -> object3:propertyC
199 * object3:propertyC -> object1:propertyA
202 * might lead to an infinite loop. The loop, in this particular case,
203 * can be avoided if the objects emit the #GObject::notify signal only
204 * if the value has effectively been changed. A binding is implemented
205 * using the #GObject::notify signal, so it is susceptible to all the
206 * various ways of blocking a signal emission, like g_signal_stop_emission()
207 * or g_signal_handler_block().
209 * A binding will be severed, and the resources it allocates freed, whenever
210 * either one of the #GObject instances it refers to are finalized, or when
211 * the #GBinding instance loses its last reference.
213 * #GBinding is available since GObject 2.26
219 * @short_description: A mechanism to wrap opaque C structures registered by the type system
220 * @see_also: #GParamSpecBoxed, g_param_spec_boxed()
221 * @title: Boxed Types
223 * GBoxed is a generic wrapper mechanism for arbitrary C structures. The only
224 * thing the type system needs to know about the structures is how to copy and
225 * free them, beyond that they are treated as opaque chunks of memory.
227 * Boxed types are useful for simple value-holder structures like rectangles or
228 * points. They can also be used for wrapping structures defined in non-GObject
235 * @short_description: Functions as first-class objects
238 * A #GClosure represents a callback supplied by the programmer. It
239 * will generally comprise a function of some kind and a marshaller
240 * used to call it. It is the reponsibility of the marshaller to
241 * convert the arguments for the invocation from #GValue<!-- -->s into
242 * a suitable form, perform the callback on the converted arguments,
243 * and transform the return value back into a #GValue.
245 * In the case of C programs, a closure usually just holds a pointer
246 * to a function and maybe a data argument, and the marshaller
247 * converts between #GValue<!-- --> and native C types. The GObject
248 * library provides the #GCClosure type for this purpose. Bindings for
249 * other languages need marshallers which convert between #GValue<!--
250 * -->s and suitable representations in the runtime of the language in
251 * order to use functions written in that languages as callbacks.
253 * Within GObject, closures play an important role in the
254 * implementation of signals. When a signal is registered, the
255 * @c_marshaller argument to g_signal_new() specifies the default C
256 * marshaller for any closure which is connected to this
257 * signal. GObject provides a number of C marshallers for this
258 * purpose, see the g_cclosure_marshal_*() functions. Additional C
259 * marshallers can be generated with the <link
260 * linkend="glib-genmarshal">glib-genmarshal</link> utility. Closures
261 * can be explicitly connected to signals with
262 * g_signal_connect_closure(), but it usually more convenient to let
263 * GObject create a closure automatically by using one of the
264 * g_signal_connect_*() functions which take a callback function/user
267 * Using closures has a number of important advantages over a simple
268 * callback function/data pointer combination:
271 * Closures allow the callee to get the types of the callback parameters,
272 * which means that language bindings don't have to write individual glue
273 * for each callback type.
276 * The reference counting of #GClosure makes it easy to handle reentrancy
277 * right; if a callback is removed while it is being invoked, the closure
278 * and its parameters won't be freed until the invocation finishes.
281 * g_closure_invalidate() and invalidation notifiers allow callbacks to be
282 * automatically removed when the objects they point to go away.
289 * SECTION:generic_values
290 * @short_description: A polymorphic type that can hold values of any other type
291 * @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.
292 * @title: Generic values
294 * The #GValue structure is basically a variable container that consists
295 * of a type identifier and a specific value of that type.
296 * The type identifier within a #GValue structure always determines the
297 * type of the associated value.
298 * To create a undefined #GValue structure, simply create a zero-filled
299 * #GValue structure. To initialize the #GValue, use the g_value_init()
300 * function. A #GValue cannot be used until it is initialized.
301 * The basic type operations (such as freeing and copying) are determined
302 * by the #GTypeValueTable associated with the type ID stored in the #GValue.
303 * Other #GValue operations (such as converting values between types) are
304 * provided by this interface.
306 * The code in the example program below demonstrates #GValue's
310 * #include <glib-object.h>
313 * int2string (const GValue *src_value,
314 * GValue *dest_value)
316 * if (g_value_get_int (src_value) == 42)
317 * g_value_set_static_string (dest_value, "An important number");
319 * g_value_set_static_string (dest_value, "What's that?");
326 * /* GValues must be initialized */
327 * GValue a = G_VALUE_INIT;
328 * GValue b = G_VALUE_INIT;
329 * const gchar *message;
331 * /* The GValue starts empty */
332 * g_assert (!G_VALUE_HOLDS_STRING (&a));
334 * /* Put a string in it */
335 * g_value_init (&a, G_TYPE_STRING);
336 * g_assert (G_VALUE_HOLDS_STRING (&a));
337 * g_value_set_static_string (&a, "Hello, world!");
338 * g_printf ("%s\n", g_value_get_string (&a));
340 * /* Reset it to its pristine state */
341 * g_value_unset (&a);
343 * /* It can then be reused for another type */
344 * g_value_init (&a, G_TYPE_INT);
345 * g_value_set_int (&a, 42);
347 * /* Attempt to transform it into a GValue of type STRING */
348 * g_value_init (&b, G_TYPE_STRING);
350 * /* An INT is transformable to a STRING */
351 * g_assert (g_value_type_transformable (G_TYPE_INT, G_TYPE_STRING));
353 * g_value_transform (&a, &b);
354 * g_printf ("%s\n", g_value_get_string (&b));
356 * /* Attempt to transform it again using a custom transform function */
357 * g_value_register_transform_func (G_TYPE_INT, G_TYPE_STRING, int2string);
358 * g_value_transform (&a, &b);
359 * g_printf ("%s\n", g_value_get_string (&b));
368 * @short_description: Metadata for parameter specifications
369 * @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()
372 * #GParamSpec is an object structure that encapsulates the metadata
373 * required to specify parameters, such as e.g. #GObject properties.
375 * <para id="canonical-parameter-name">
376 * Parameter names need to start with a letter (a-z or A-Z). Subsequent
377 * characters can be letters, numbers or a '-'.
378 * All other characters are replaced by a '-' during construction.
379 * The result of this replacement is called the canonical name of the
387 * @short_description: The GLib Runtime type identification and management system
388 * @title: Type Information
390 * The GType API is the foundation of the GObject system. It provides the
391 * facilities for registering and managing all fundamental data types,
392 * user-defined object and interface types.
394 * For type creation and registration purposes, all types fall into one of
395 * two categories: static or dynamic. Static types are never loaded or
396 * unloaded at run-time as dynamic types may be. Static types are created
397 * with g_type_register_static() that gets type specific information passed
398 * in via a #GTypeInfo structure.
399 * Dynamic types are created with g_type_register_dynamic() which takes a
400 * #GTypePlugin structure instead. The remaining type information (the
401 * #GTypeInfo structure) is retrieved during runtime through #GTypePlugin
402 * and the g_type_plugin_*() API.
403 * These registration functions are usually called only once from a
404 * function whose only purpose is to return the type identifier for a
405 * specific class. Once the type (or class or interface) is registered,
406 * it may be instantiated, inherited, or implemented depending on exactly
407 * what sort of type it is.
408 * There is also a third registration function for registering fundamental
409 * types called g_type_register_fundamental() which requires both a #GTypeInfo
410 * structure and a #GTypeFundamentalInfo structure but it is seldom used
411 * since most fundamental types are predefined rather than user-defined.
413 * Type instance and class structs are limited to a total of 64 KiB,
414 * including all parent types. Similarly, type instances' private data
415 * (as created by g_type_class_add_private()) are limited to a total of
416 * 64 KiB. If a type instance needs a large static buffer, allocate it
417 * separately (typically by using #GArray or #GPtrArray) and put a pointer
418 * to the buffer in the structure.
420 * A final word about type names.
421 * Such an identifier needs to be at least three characters long. There is no
422 * upper length limit. The first character needs to be a letter (a-z or A-Z)
423 * or an underscore '_'. Subsequent characters can be letters, numbers or
429 * SECTION:gtypemodule
430 * @short_description: Type loading modules
431 * @see_also: <variablelist> <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>
432 * @title: GTypeModule
434 * #GTypeModule provides a simple implementation of the #GTypePlugin
435 * interface. The model of #GTypeModule is a dynamically loaded module
436 * which implements some number of types and interface
437 * implementations. When the module is loaded, it registers its types
438 * and interfaces using g_type_module_register_type() and
439 * g_type_module_add_interface(). As long as any instances of these
440 * types and interface implementations are in use, the module is kept
441 * loaded. When the types and interfaces are gone, the module may be
442 * unloaded. If the types and interfaces become used again, the module
443 * will be reloaded. Note that the last unref cannot happen in module
444 * code, since that would lead to the caller's code being unloaded before
445 * g_object_unref() returns to it.
447 * Keeping track of whether the module should be loaded or not is done by
448 * using a use count - it starts at zero, and whenever it is greater than
449 * zero, the module is loaded. The use count is maintained internally by
450 * the type system, but also can be explicitly controlled by
451 * g_type_module_use() and g_type_module_unuse(). Typically, when loading
452 * a module for the first type, g_type_module_use() will be used to load
453 * it so that it can initialize its types. At some later point, when the
454 * module no longer needs to be loaded except for the type
455 * implementations it contains, g_type_module_unuse() is called.
457 * #GTypeModule does not actually provide any implementation of module
458 * loading and unloading. To create a particular module type you must
459 * derive from #GTypeModule and implement the load and unload functions
460 * in #GTypeModuleClass.
465 * SECTION:gtypeplugin
466 * @short_description: An interface for dynamically loadable types
467 * @see_also: #GTypeModule and g_type_register_dynamic().
468 * @title: GTypePlugin
470 * The GObject type system supports dynamic loading of types. The
471 * #GTypePlugin interface is used to handle the lifecycle of
472 * dynamically loaded types. It goes as follows:
476 * The type is initially introduced (usually upon loading the module
477 * the first time, or by your main application that knows what modules
478 * introduces what types), like this:
480 * new_type_id = g_type_register_dynamic (parent_type_id,
485 * where <literal>new_type_plugin</literal> is an implementation of the
486 * #GTypePlugin interface.
489 * The type's implementation is referenced, e.g. through
490 * g_type_class_ref() or through g_type_create_instance() (this is
491 * being called by g_object_new()) or through one of the above done on
492 * a type derived from <literal>new_type_id</literal>.
495 * This causes the type system to load the type's implementation by calling
496 * g_type_plugin_use() and g_type_plugin_complete_type_info() on
497 * <literal>new_type_plugin</literal>.
500 * At some point the type's implementation isn't required anymore, e.g. after
501 * g_type_class_unref() or g_type_free_instance() (called when the reference
502 * count of an instance drops to zero).
505 * This causes the type system to throw away the information retrieved from
506 * g_type_plugin_complete_type_info() and then it calls
507 * g_type_plugin_unuse() on <literal>new_type_plugin</literal>.
510 * Things may repeat from the second step.
514 * So basically, you need to implement a #GTypePlugin type that
515 * carries a use_count, once use_count goes from zero to one, you need
516 * to load the implementation to successfully handle the upcoming
517 * g_type_plugin_complete_type_info() call. Later, maybe after
518 * succeeding use/unuse calls, once use_count drops to zero, you can
519 * unload the implementation again. The type system makes sure to call
520 * g_type_plugin_use() and g_type_plugin_complete_type_info() again
521 * when the type is needed again.
523 * #GTypeModule is an implementation of #GTypePlugin that already
524 * implements most of this except for the actual module loading and
525 * unloading. It even handles multiple registered types per module.
532 * @short_description: The base object type
533 * @see_also: #GParamSpecObject, g_param_spec_object()
535 * GObject is the fundamental type providing the common attributes and
536 * methods for all object types in GTK+, Pango and other libraries
537 * based on GObject. The GObject class provides methods for object
538 * construction and destruction, property access methods, and signal
539 * support. Signals are described in detail in <xref
540 * linkend="gobject-Signals"/>.
542 * <para id="floating-ref">
543 * GInitiallyUnowned is derived from GObject. The only difference between
544 * the two is that the initial reference of a GInitiallyUnowned is flagged
545 * as a <firstterm>floating</firstterm> reference.
546 * This means that it is not specifically claimed to be "owned" by
547 * any code portion. The main motivation for providing floating references is
548 * C convenience. In particular, it allows code to be written as:
550 * container = create_container ();
551 * container_add_child (container, create_child());
553 * If <function>container_add_child()</function> will g_object_ref_sink() the
554 * passed in child, no reference of the newly created child is leaked.
555 * Without floating references, <function>container_add_child()</function>
556 * can only g_object_ref() the new child, so to implement this code without
557 * reference leaks, it would have to be written as:
560 * container = create_container ();
561 * child = create_child ();
562 * container_add_child (container, child);
563 * g_object_unref (child);
565 * The floating reference can be converted into
566 * an ordinary reference by calling g_object_ref_sink().
567 * For already sunken objects (objects that don't have a floating reference
568 * anymore), g_object_ref_sink() is equivalent to g_object_ref() and returns
570 * Since floating references are useful almost exclusively for C convenience,
571 * language bindings that provide automated reference and memory ownership
572 * maintenance (such as smart pointers or garbage collection) should not
573 * expose floating references in their API.
576 * Some object implementations may need to save an objects floating state
577 * across certain code portions (an example is #GtkMenu), to achieve this,
578 * the following sequence can be used:
581 * /* save floating state */
582 * gboolean was_floating = g_object_is_floating (object);
583 * g_object_ref_sink (object);
584 * /* protected code portion */
586 * /* restore floating state */
588 * g_object_force_floating (object);
590 * g_object_unref (object); /* release previously acquired reference */
596 * SECTION:param_value_types
597 * @short_description: Standard Parameter and Value Types
598 * @see_also: #GParamSpec, #GValue, g_object_class_install_property().
599 * @title: Parameters and Values
601 * #GValue provides an abstract container structure which can be
602 * copied, transformed and compared while holding a value of any
603 * (derived) type, which is registered as a #GType with a
604 * #GTypeValueTable in its #GTypeInfo structure. Parameter
605 * specifications for most value types can be created as #GParamSpec
606 * derived instances, to implement e.g. #GObject properties which
607 * operate on #GValue containers.
609 * Parameter names need to start with a letter (a-z or A-Z). Subsequent
610 * characters can be letters, numbers or a '-'.
611 * All other characters are replaced by a '-' during construction.
617 * @short_description: A means for customization of object behaviour and a general purpose notification mechanism
620 * The basic concept of the signal system is that of the
621 * <emphasis>emission</emphasis> of a signal. Signals are introduced
622 * per-type and are identified through strings. Signals introduced
623 * for a parent type are available in derived types as well, so
624 * basically they are a per-type facility that is inherited. A signal
625 * emission mainly involves invocation of a certain set of callbacks
626 * in precisely defined manner. There are two main categories of such
627 * callbacks, per-object
628 * <footnote><para>Although signals can deal with any kind of instantiatable
629 * type, i'm referring to those types as "object types" in the following,
630 * simply because that is the context most users will encounter signals in.
632 * ones and user provided ones.
633 * The per-object callbacks are most often referred to as "object method
634 * handler" or "default (signal) handler", while user provided callbacks are
635 * usually just called "signal handler".
636 * The object method handler is provided at signal creation time (this most
637 * frequently happens at the end of an object class' creation), while user
638 * provided handlers are frequently connected and disconnected to/from a certain
639 * signal on certain object instances.
641 * A signal emission consists of five stages, unless prematurely stopped:
643 * <varlistentry><term></term><listitem><para>
644 * 1 - Invocation of the object method handler for %G_SIGNAL_RUN_FIRST signals
645 * </para></listitem></varlistentry>
646 * <varlistentry><term></term><listitem><para>
647 * 2 - Invocation of normal user-provided signal handlers (<emphasis>after</emphasis> flag %FALSE)
648 * </para></listitem></varlistentry>
649 * <varlistentry><term></term><listitem><para>
650 * 3 - Invocation of the object method handler for %G_SIGNAL_RUN_LAST signals
651 * </para></listitem></varlistentry>
652 * <varlistentry><term></term><listitem><para>
653 * 4 - Invocation of user provided signal handlers, connected with an <emphasis>after</emphasis> flag of %TRUE
654 * </para></listitem></varlistentry>
655 * <varlistentry><term></term><listitem><para>
656 * 5 - Invocation of the object method handler for %G_SIGNAL_RUN_CLEANUP signals
657 * </para></listitem></varlistentry>
659 * The user-provided signal handlers are called in the order they were
661 * All handlers may prematurely stop a signal emission, and any number of
662 * handlers may be connected, disconnected, blocked or unblocked during
664 * There are certain criteria for skipping user handlers in stages 2 and 4
665 * of a signal emission.
666 * First, user handlers may be <emphasis>blocked</emphasis>, blocked handlers are omitted
667 * during callback invocation, to return from the "blocked" state, a
668 * handler has to get unblocked exactly the same amount of times
669 * it has been blocked before.
670 * Second, upon emission of a %G_SIGNAL_DETAILED signal, an additional
671 * "detail" argument passed in to g_signal_emit() has to match the detail
672 * argument of the signal handler currently subject to invocation.
673 * Specification of no detail argument for signal handlers (omission of the
674 * detail part of the signal specification upon connection) serves as a
675 * wildcard and matches any detail argument passed in to emission.
680 * SECTION:value_arrays
681 * @short_description: A container structure to maintain an array of generic values
682 * @see_also: #GValue, #GParamSpecValueArray, g_param_spec_value_array()
683 * @title: Value arrays
685 * The prime purpose of a #GValueArray is for it to be used as an
686 * object property that holds an array of values. A #GValueArray wraps
687 * an array of #GValue elements in order for it to be used as a boxed
688 * type through %G_TYPE_VALUE_ARRAY.
690 * #GValueArray is deprecated in favour of #GArray since GLib 2.32. It
691 * is possible to create a #GArray that behaves like a #GValueArray by
692 * using the size of #GValue as the element size, and by setting
693 * g_value_unset() as the clear function using g_array_set_clear_func(),
694 * for instance, the following code:
697 * GValueArray *array = g_value_array_new (10);
700 * can be replaced by:
703 * GArray *array = g_array_sized_new (FALSE, TRUE, sizeof (GValue), 10);
704 * g_array_set_clear_func (array, (GDestroyNotify) g_value_unset);
710 * g_binding_get_flags:
711 * @binding: a #GBinding
713 * Retrieves the flags passed when constructing the #GBinding
715 * Returns: the #GBindingFlags used by the #GBinding
721 * g_binding_get_source:
722 * @binding: a #GBinding
724 * Retrieves the #GObject instance used as the source of the binding
726 * Returns: (transfer none): the source #GObject
732 * g_binding_get_source_property:
733 * @binding: a #GBinding
735 * Retrieves the name of the property of #GBinding:source used as the source
738 * Returns: the name of the source property
744 * g_binding_get_target:
745 * @binding: a #GBinding
747 * Retrieves the #GObject instance used as the target of the binding
749 * Returns: (transfer none): the target #GObject
755 * g_binding_get_target_property:
756 * @binding: a #GBinding
758 * Retrieves the name of the property of #GBinding:target used as the target
761 * Returns: the name of the target property
768 * @boxed_type: The type of @src_boxed.
769 * @src_boxed: The boxed structure to be copied.
771 * Provide a copy of a boxed structure @src_boxed which is of type @boxed_type.
773 * Returns: The newly created copy of the boxed structure.
779 * @boxed_type: The type of @boxed.
780 * @boxed: The boxed structure to be freed.
782 * Free the boxed structure @boxed which is of type @boxed_type.
787 * g_boxed_type_register_static:
788 * @name: Name of the new boxed type.
789 * @boxed_copy: Boxed structure copy function.
790 * @boxed_free: Boxed structure free function.
792 * This function creates a new %G_TYPE_BOXED derived type id for a new
793 * boxed type with name @name. Boxed type handling functions have to be
794 * provided to copy and free opaque boxed structures of this type.
796 * Returns: New %G_TYPE_BOXED derived type id for @name.
801 * g_cclosure_marshal_BOOLEAN__FLAGS:
802 * @closure: the #GClosure to which the marshaller belongs
803 * @return_value: a #GValue which can store the returned #gboolean
805 * @param_values: a #GValue array holding instance and arg1
806 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
807 * @marshal_data: additional data specified when registering the marshaller
809 * A marshaller for a #GCClosure with a callback of type
810 * <literal>gboolean (*callback) (gpointer instance, gint arg1, gpointer user_data)</literal> where the #gint parameter
811 * denotes a flags type.
816 * g_cclosure_marshal_BOOLEAN__OBJECT_BOXED_BOXED:
817 * @closure: the #GClosure to which the marshaller belongs
818 * @return_value: a #GValue, which can store the returned string
820 * @param_values: a #GValue array holding instance, arg1 and arg2
821 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
822 * @marshal_data: additional data specified when registering the marshaller
824 * A marshaller for a #GCClosure with a callback of type
825 * <literal>gboolean (*callback) (gpointer instance, GBoxed *arg1, GBoxed *arg2, gpointer user_data)</literal>.
832 * g_cclosure_marshal_BOOL__FLAGS:
834 * Another name for g_cclosure_marshal_BOOLEAN__FLAGS().
839 * g_cclosure_marshal_STRING__OBJECT_POINTER:
840 * @closure: the #GClosure to which the marshaller belongs
841 * @return_value: a #GValue, which can store the returned string
843 * @param_values: a #GValue array holding instance, arg1 and arg2
844 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
845 * @marshal_data: additional data specified when registering the marshaller
847 * A marshaller for a #GCClosure with a callback of type
848 * <literal>gchar* (*callback) (gpointer instance, GObject *arg1, gpointer arg2, gpointer user_data)</literal>.
853 * g_cclosure_marshal_VOID__BOOLEAN:
854 * @closure: the #GClosure to which the marshaller belongs
855 * @return_value: ignored
857 * @param_values: a #GValue array holding the instance and the #gboolean parameter
858 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
859 * @marshal_data: additional data specified when registering the marshaller
861 * A marshaller for a #GCClosure with a callback of type
862 * <literal>void (*callback) (gpointer instance, gboolean arg1, gpointer user_data)</literal>.
867 * g_cclosure_marshal_VOID__BOXED:
868 * @closure: the #GClosure to which the marshaller belongs
869 * @return_value: ignored
871 * @param_values: a #GValue array holding the instance and the #GBoxed* parameter
872 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
873 * @marshal_data: additional data specified when registering the marshaller
875 * A marshaller for a #GCClosure with a callback of type
876 * <literal>void (*callback) (gpointer instance, GBoxed *arg1, gpointer user_data)</literal>.
881 * g_cclosure_marshal_VOID__CHAR:
882 * @closure: the #GClosure to which the marshaller belongs
883 * @return_value: ignored
885 * @param_values: a #GValue array holding the instance and the #gchar parameter
886 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
887 * @marshal_data: additional data specified when registering the marshaller
889 * A marshaller for a #GCClosure with a callback of type
890 * <literal>void (*callback) (gpointer instance, gchar arg1, gpointer user_data)</literal>.
895 * g_cclosure_marshal_VOID__DOUBLE:
896 * @closure: the #GClosure to which the marshaller belongs
897 * @return_value: ignored
899 * @param_values: a #GValue array holding the instance and the #gdouble parameter
900 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
901 * @marshal_data: additional data specified when registering the marshaller
903 * A marshaller for a #GCClosure with a callback of type
904 * <literal>void (*callback) (gpointer instance, gdouble arg1, gpointer user_data)</literal>.
909 * g_cclosure_marshal_VOID__ENUM:
910 * @closure: the #GClosure to which the marshaller belongs
911 * @return_value: ignored
913 * @param_values: a #GValue array holding the instance and the enumeration parameter
914 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
915 * @marshal_data: additional data specified when registering the marshaller
917 * A marshaller for a #GCClosure with a callback of type
918 * <literal>void (*callback) (gpointer instance, gint arg1, gpointer user_data)</literal> where the #gint parameter denotes an enumeration type..
923 * g_cclosure_marshal_VOID__FLAGS:
924 * @closure: the #GClosure to which the marshaller belongs
925 * @return_value: ignored
927 * @param_values: a #GValue array holding the instance and the flags parameter
928 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
929 * @marshal_data: additional data specified when registering the marshaller
931 * A marshaller for a #GCClosure with a callback of type
932 * <literal>void (*callback) (gpointer instance, gint arg1, gpointer user_data)</literal> where the #gint parameter denotes a flags type.
937 * g_cclosure_marshal_VOID__FLOAT:
938 * @closure: the #GClosure to which the marshaller belongs
939 * @return_value: ignored
941 * @param_values: a #GValue array holding the instance and the #gfloat parameter
942 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
943 * @marshal_data: additional data specified when registering the marshaller
945 * A marshaller for a #GCClosure with a callback of type
946 * <literal>void (*callback) (gpointer instance, gfloat arg1, gpointer user_data)</literal>.
951 * g_cclosure_marshal_VOID__INT:
952 * @closure: the #GClosure to which the marshaller belongs
953 * @return_value: ignored
955 * @param_values: a #GValue array holding the instance and the #gint parameter
956 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
957 * @marshal_data: additional data specified when registering the marshaller
959 * A marshaller for a #GCClosure with a callback of type
960 * <literal>void (*callback) (gpointer instance, gint arg1, gpointer user_data)</literal>.
965 * g_cclosure_marshal_VOID__LONG:
966 * @closure: the #GClosure to which the marshaller belongs
967 * @return_value: ignored
969 * @param_values: a #GValue array holding the instance and the #glong parameter
970 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
971 * @marshal_data: additional data specified when registering the marshaller
973 * A marshaller for a #GCClosure with a callback of type
974 * <literal>void (*callback) (gpointer instance, glong arg1, gpointer user_data)</literal>.
979 * g_cclosure_marshal_VOID__OBJECT:
980 * @closure: the #GClosure to which the marshaller belongs
981 * @return_value: ignored
983 * @param_values: a #GValue array holding the instance and the #GObject* parameter
984 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
985 * @marshal_data: additional data specified when registering the marshaller
987 * A marshaller for a #GCClosure with a callback of type
988 * <literal>void (*callback) (gpointer instance, GObject *arg1, gpointer user_data)</literal>.
993 * g_cclosure_marshal_VOID__PARAM:
994 * @closure: the #GClosure to which the marshaller belongs
995 * @return_value: ignored
997 * @param_values: a #GValue array holding the instance and the #GParamSpec* parameter
998 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
999 * @marshal_data: additional data specified when registering the marshaller
1001 * A marshaller for a #GCClosure with a callback of type
1002 * <literal>void (*callback) (gpointer instance, GParamSpec *arg1, gpointer user_data)</literal>.
1007 * g_cclosure_marshal_VOID__POINTER:
1008 * @closure: the #GClosure to which the marshaller belongs
1009 * @return_value: ignored
1010 * @n_param_values: 2
1011 * @param_values: a #GValue array holding the instance and the #gpointer parameter
1012 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
1013 * @marshal_data: additional data specified when registering the marshaller
1015 * A marshaller for a #GCClosure with a callback of type
1016 * <literal>void (*callback) (gpointer instance, gpointer arg1, gpointer user_data)</literal>.
1021 * g_cclosure_marshal_VOID__STRING:
1022 * @closure: the #GClosure to which the marshaller belongs
1023 * @return_value: ignored
1024 * @n_param_values: 2
1025 * @param_values: a #GValue array holding the instance and the #gchar* parameter
1026 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
1027 * @marshal_data: additional data specified when registering the marshaller
1029 * A marshaller for a #GCClosure with a callback of type
1030 * <literal>void (*callback) (gpointer instance, const gchar *arg1, gpointer user_data)</literal>.
1035 * g_cclosure_marshal_VOID__UCHAR:
1036 * @closure: the #GClosure to which the marshaller belongs
1037 * @return_value: ignored
1038 * @n_param_values: 2
1039 * @param_values: a #GValue array holding the instance and the #guchar parameter
1040 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
1041 * @marshal_data: additional data specified when registering the marshaller
1043 * A marshaller for a #GCClosure with a callback of type
1044 * <literal>void (*callback) (gpointer instance, guchar arg1, gpointer user_data)</literal>.
1049 * g_cclosure_marshal_VOID__UINT:
1050 * @closure: the #GClosure to which the marshaller belongs
1051 * @return_value: ignored
1052 * @n_param_values: 2
1053 * @param_values: a #GValue array holding the instance and the #guint parameter
1054 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
1055 * @marshal_data: additional data specified when registering the marshaller
1057 * A marshaller for a #GCClosure with a callback of type
1058 * <literal>void (*callback) (gpointer instance, guint arg1, gpointer user_data)</literal>.
1063 * g_cclosure_marshal_VOID__UINT_POINTER:
1064 * @closure: the #GClosure to which the marshaller belongs
1065 * @return_value: ignored
1066 * @n_param_values: 3
1067 * @param_values: a #GValue array holding instance, arg1 and arg2
1068 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
1069 * @marshal_data: additional data specified when registering the marshaller
1071 * A marshaller for a #GCClosure with a callback of type
1072 * <literal>void (*callback) (gpointer instance, guint arg1, gpointer arg2, gpointer user_data)</literal>.
1077 * g_cclosure_marshal_VOID__ULONG:
1078 * @closure: the #GClosure to which the marshaller belongs
1079 * @return_value: ignored
1080 * @n_param_values: 2
1081 * @param_values: a #GValue array holding the instance and the #gulong parameter
1082 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
1083 * @marshal_data: additional data specified when registering the marshaller
1085 * A marshaller for a #GCClosure with a callback of type
1086 * <literal>void (*callback) (gpointer instance, gulong arg1, gpointer user_data)</literal>.
1091 * g_cclosure_marshal_VOID__VARIANT:
1092 * @closure: the #GClosure to which the marshaller belongs
1093 * @return_value: ignored
1094 * @n_param_values: 2
1095 * @param_values: a #GValue array holding the instance and the #GVariant* parameter
1096 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
1097 * @marshal_data: additional data specified when registering the marshaller
1099 * A marshaller for a #GCClosure with a callback of type
1100 * <literal>void (*callback) (gpointer instance, GVariant *arg1, gpointer user_data)</literal>.
1107 * g_cclosure_marshal_VOID__VOID:
1108 * @closure: the #GClosure to which the marshaller belongs
1109 * @return_value: ignored
1110 * @n_param_values: 1
1111 * @param_values: a #GValue array holding only the instance
1112 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
1113 * @marshal_data: additional data specified when registering the marshaller
1115 * A marshaller for a #GCClosure with a callback of type
1116 * <literal>void (*callback) (gpointer instance, gpointer user_data)</literal>.
1121 * g_cclosure_marshal_generic:
1122 * @closure: A #GClosure.
1123 * @return_gvalue: A #GValue to store the return value. May be %NULL if the callback of closure doesn't return a value.
1124 * @n_param_values: The length of the @param_values array.
1125 * @param_values: An array of #GValue<!-- -->s holding the arguments on which to invoke the callback of closure.
1126 * @invocation_hint: The invocation hint given as the last argument to g_closure_invoke().
1127 * @marshal_data: Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
1129 * A generic marshaller function implemented via <ulink
1130 * url="http://sourceware.org/libffi/">libffi</ulink>.
1137 * g_cclosure_new: (skip)
1138 * @callback_func: the function to invoke
1139 * @user_data: user data to pass to @callback_func
1140 * @destroy_data: destroy notify to be called when @user_data is no longer used
1142 * Creates a new closure which invokes @callback_func with @user_data as
1143 * the last parameter.
1145 * Returns: a new #GCClosure
1150 * g_cclosure_new_object: (skip)
1151 * @callback_func: the function to invoke
1152 * @object: a #GObject pointer to pass to @callback_func
1154 * A variant of g_cclosure_new() which uses @object as @user_data and
1155 * calls g_object_watch_closure() on @object and the created
1156 * closure. This function is useful when you have a callback closely
1157 * associated with a #GObject, and want the callback to no longer run
1158 * after the object is is freed.
1160 * Returns: a new #GCClosure
1165 * g_cclosure_new_object_swap: (skip)
1166 * @callback_func: the function to invoke
1167 * @object: a #GObject pointer to pass to @callback_func
1169 * A variant of g_cclosure_new_swap() which uses @object as @user_data
1170 * and calls g_object_watch_closure() on @object and the created
1171 * closure. This function is useful when you have a callback closely
1172 * associated with a #GObject, and want the callback to no longer run
1173 * after the object is is freed.
1175 * Returns: a new #GCClosure
1180 * g_cclosure_new_swap: (skip)
1181 * @callback_func: the function to invoke
1182 * @user_data: user data to pass to @callback_func
1183 * @destroy_data: destroy notify to be called when @user_data is no longer used
1185 * Creates a new closure which invokes @callback_func with @user_data as
1186 * the first parameter.
1188 * Returns: (transfer full): a new #GCClosure
1193 * g_clear_object: (skip)
1194 * @object_ptr: a pointer to a #GObject reference
1196 * Clears a reference to a #GObject.
1198 * @object_ptr must not be %NULL.
1200 * If the reference is %NULL then this function does nothing.
1201 * Otherwise, the reference count of the object is decreased and the
1202 * pointer is set to %NULL.
1204 * This function is threadsafe and modifies the pointer atomically,
1205 * using memory barriers where needed.
1207 * A macro is also included that allows this function to be used without
1215 * g_closure_add_finalize_notifier: (skip)
1216 * @closure: a #GClosure
1217 * @notify_data: data to pass to @notify_func
1218 * @notify_func: the callback function to register
1220 * Registers a finalization notifier which will be called when the
1221 * reference count of @closure goes down to 0. Multiple finalization
1222 * notifiers on a single closure are invoked in unspecified order. If
1223 * a single call to g_closure_unref() results in the closure being
1224 * both invalidated and finalized, then the invalidate notifiers will
1225 * be run before the finalize notifiers.
1230 * g_closure_add_invalidate_notifier: (skip)
1231 * @closure: a #GClosure
1232 * @notify_data: data to pass to @notify_func
1233 * @notify_func: the callback function to register
1235 * Registers an invalidation notifier which will be called when the
1236 * @closure is invalidated with g_closure_invalidate(). Invalidation
1237 * notifiers are invoked before finalization notifiers, in an
1238 * unspecified order.
1243 * g_closure_add_marshal_guards: (skip)
1244 * @closure: a #GClosure
1245 * @pre_marshal_data: data to pass to @pre_marshal_notify
1246 * @pre_marshal_notify: a function to call before the closure callback
1247 * @post_marshal_data: data to pass to @post_marshal_notify
1248 * @post_marshal_notify: a function to call after the closure callback
1250 * Adds a pair of notifiers which get invoked before and after the
1251 * closure callback, respectively. This is typically used to protect
1252 * the extra arguments for the duration of the callback. See
1253 * g_object_watch_closure() for an example of marshal guards.
1258 * g_closure_invalidate:
1259 * @closure: GClosure to invalidate
1261 * Sets a flag on the closure to indicate that its calling
1262 * environment has become invalid, and thus causes any future
1263 * invocations of g_closure_invoke() on this @closure to be
1264 * ignored. Also, invalidation notifiers installed on the closure will
1265 * be called at this point. Note that unless you are holding a
1266 * reference to the closure yourself, the invalidation notifiers may
1267 * unref the closure and cause it to be destroyed, so if you need to
1268 * access the closure after calling g_closure_invalidate(), make sure
1269 * that you've previously called g_closure_ref().
1271 * Note that g_closure_invalidate() will also be called when the
1272 * reference count of a closure drops to zero (unless it has already
1273 * been invalidated before).
1279 * @closure: a #GClosure
1280 * @return_value: (allow-none): a #GValue to store the return value. May be %NULL if the callback of @closure doesn't return a value.
1281 * @n_param_values: the length of the @param_values array
1282 * @param_values: (array length=n_param_values): an array of #GValue<!-- -->s holding the arguments on which to invoke the callback of @closure
1283 * @invocation_hint: (allow-none): a context-dependent invocation hint
1285 * Invokes the closure, i.e. executes the callback represented by the @closure.
1290 * g_closure_new_object:
1291 * @sizeof_closure: the size of the structure to allocate, must be at least <literal>sizeof (GClosure)</literal>
1292 * @object: a #GObject pointer to store in the @data field of the newly allocated #GClosure
1294 * A variant of g_closure_new_simple() which stores @object in the
1295 * @data field of the closure and calls g_object_watch_closure() on
1296 * @object and the created closure. This function is mainly useful
1297 * when implementing new types of closures.
1299 * Returns: (transfer full): a newly allocated #GClosure
1304 * g_closure_new_simple:
1305 * @sizeof_closure: the size of the structure to allocate, must be at least <literal>sizeof (GClosure)</literal>
1306 * @data: data to store in the @data field of the newly allocated #GClosure
1308 * Allocates a struct of the given size and initializes the initial
1309 * part as a #GClosure. This function is mainly useful when
1310 * implementing new types of closures.
1313 * typedef struct _MyClosure MyClosure;
1317 * // extra data goes here
1321 * my_closure_finalize (gpointer notify_data,
1322 * GClosure *closure)
1324 * MyClosure *my_closure = (MyClosure *)closure;
1326 * // free extra data here
1329 * MyClosure *my_closure_new (gpointer data)
1331 * GClosure *closure;
1332 * MyClosure *my_closure;
1334 * closure = g_closure_new_simple (sizeof (MyClosure), data);
1335 * my_closure = (MyClosure *) closure;
1337 * // initialize extra data here
1339 * g_closure_add_finalize_notifier (closure, notify_data,
1340 * my_closure_finalize);
1341 * return my_closure;
1345 * Returns: (transfer full): a newly allocated #GClosure
1351 * @closure: #GClosure to increment the reference count on
1353 * Increments the reference count on a closure to force it staying
1354 * alive while the caller holds a pointer to it.
1356 * Returns: (transfer none): The @closure passed in, for convenience
1361 * g_closure_remove_finalize_notifier: (skip)
1362 * @closure: a #GClosure
1363 * @notify_data: data which was passed to g_closure_add_finalize_notifier() when registering @notify_func
1364 * @notify_func: the callback function to remove
1366 * Removes a finalization notifier.
1368 * Notice that notifiers are automatically removed after they are run.
1373 * g_closure_remove_invalidate_notifier: (skip)
1374 * @closure: a #GClosure
1375 * @notify_data: data which was passed to g_closure_add_invalidate_notifier() when registering @notify_func
1376 * @notify_func: the callback function to remove
1378 * Removes an invalidation notifier.
1380 * Notice that notifiers are automatically removed after they are run.
1385 * g_closure_set_marshal: (skip)
1386 * @closure: a #GClosure
1387 * @marshal: a #GClosureMarshal function
1389 * Sets the marshaller of @closure. The <literal>marshal_data</literal>
1390 * of @marshal provides a way for a meta marshaller to provide additional
1391 * information to the marshaller. (See g_closure_set_meta_marshal().) For
1392 * GObject's C predefined marshallers (the g_cclosure_marshal_*()
1393 * functions), what it provides is a callback function to use instead of
1394 * @closure->callback.
1399 * g_closure_set_meta_marshal: (skip)
1400 * @closure: a #GClosure
1401 * @marshal_data: context-dependent data to pass to @meta_marshal
1402 * @meta_marshal: a #GClosureMarshal function
1404 * Sets the meta marshaller of @closure. A meta marshaller wraps
1405 * @closure->marshal and modifies the way it is called in some
1406 * fashion. The most common use of this facility is for C callbacks.
1407 * The same marshallers (generated by <link
1408 * linkend="glib-genmarshal">glib-genmarshal</link>) are used
1409 * everywhere, but the way that we get the callback function
1410 * differs. In most cases we want to use @closure->callback, but in
1411 * other cases we want to use some different technique to retrieve the
1412 * callback function.
1414 * For example, class closures for signals (see
1415 * g_signal_type_cclosure_new()) retrieve the callback function from a
1416 * fixed offset in the class structure. The meta marshaller retrieves
1417 * the right callback and passes it to the marshaller as the
1418 * @marshal_data argument.
1424 * @closure: #GClosure to decrement the initial reference count on, if it's still being held
1426 * Takes over the initial ownership of a closure. Each closure is
1427 * initially created in a <firstterm>floating</firstterm> state, which
1428 * means that the initial reference count is not owned by any caller.
1429 * g_closure_sink() checks to see if the object is still floating, and
1430 * if so, unsets the floating state and decreases the reference
1431 * count. If the closure is not floating, g_closure_sink() does
1432 * nothing. The reason for the existence of the floating state is to
1433 * prevent cumbersome code sequences like:
1435 * closure = g_cclosure_new (cb_func, cb_data);
1436 * g_source_set_closure (source, closure);
1437 * g_closure_unref (closure); // XXX GObject doesn't really need this
1439 * Because g_source_set_closure() (and similar functions) take ownership of the
1440 * initial reference count, if it is unowned, we instead can write:
1442 * g_source_set_closure (source, g_cclosure_new (cb_func, cb_data));
1445 * Generally, this function is used together with g_closure_ref(). Ane example
1446 * of storing a closure for later notification looks like:
1448 * static GClosure *notify_closure = NULL;
1450 * foo_notify_set_closure (GClosure *closure)
1452 * if (notify_closure)
1453 * g_closure_unref (notify_closure);
1454 * notify_closure = closure;
1455 * if (notify_closure)
1457 * g_closure_ref (notify_closure);
1458 * g_closure_sink (notify_closure);
1463 * Because g_closure_sink() may decrement the reference count of a closure
1464 * (if it hasn't been called on @closure yet) just like g_closure_unref(),
1465 * g_closure_ref() should be called prior to this function.
1471 * @closure: #GClosure to decrement the reference count on
1473 * Decrements the reference count of a closure after it was previously
1474 * incremented by the same caller. If no other callers are using the
1475 * closure, then the closure will be destroyed and freed.
1480 * g_enum_complete_type_info:
1481 * @g_enum_type: the type identifier of the type being completed
1482 * @info: the #GTypeInfo struct to be filled in
1483 * @const_values: An array of #GEnumValue structs for the possible enumeration values. The array is terminated by a struct with all members being 0.
1485 * This function is meant to be called from the <literal>complete_type_info</literal>
1486 * function of a #GTypePlugin implementation, as in the following
1491 * my_enum_complete_type_info (GTypePlugin *plugin,
1494 * GTypeValueTable *value_table)
1496 * static const GEnumValue values[] = {
1497 * { MY_ENUM_FOO, "MY_ENUM_FOO", "foo" },
1498 * { MY_ENUM_BAR, "MY_ENUM_BAR", "bar" },
1502 * g_enum_complete_type_info (type, info, values);
1510 * @enum_class: a #GEnumClass
1511 * @value: the value to look up
1513 * Returns the #GEnumValue for a value.
1515 * Returns: the #GEnumValue for @value, or %NULL if @value is not a member of the enumeration
1520 * g_enum_get_value_by_name:
1521 * @enum_class: a #GEnumClass
1522 * @name: the name to look up
1524 * Looks up a #GEnumValue by name.
1526 * Returns: the #GEnumValue with name @name, or %NULL if the enumeration doesn't have a member with that name
1531 * g_enum_get_value_by_nick:
1532 * @enum_class: a #GEnumClass
1533 * @nick: the nickname to look up
1535 * Looks up a #GEnumValue by nickname.
1537 * Returns: the #GEnumValue with nickname @nick, or %NULL if the enumeration doesn't have a member with that nickname
1542 * g_enum_register_static:
1543 * @name: A nul-terminated string used as the name of the new type.
1544 * @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.
1546 * Registers a new static enumeration type with the name @name.
1548 * It is normally more convenient to let <link
1549 * linkend="glib-mkenums">glib-mkenums</link> generate a
1550 * my_enum_get_type() function from a usual C enumeration definition
1551 * than to write one yourself using g_enum_register_static().
1553 * Returns: The new type identifier.
1558 * g_flags_complete_type_info:
1559 * @g_flags_type: the type identifier of the type being completed
1560 * @info: the #GTypeInfo struct to be filled in
1561 * @const_values: An array of #GFlagsValue structs for the possible enumeration values. The array is terminated by a struct with all members being 0.
1563 * This function is meant to be called from the complete_type_info()
1564 * function of a #GTypePlugin implementation, see the example for
1565 * g_enum_complete_type_info() above.
1570 * g_flags_get_first_value:
1571 * @flags_class: a #GFlagsClass
1574 * Returns the first #GFlagsValue which is set in @value.
1576 * Returns: the first #GFlagsValue which is set in @value, or %NULL if none is set
1581 * g_flags_get_value_by_name:
1582 * @flags_class: a #GFlagsClass
1583 * @name: the name to look up
1585 * Looks up a #GFlagsValue by name.
1587 * Returns: the #GFlagsValue with name @name, or %NULL if there is no flag with that name
1592 * g_flags_get_value_by_nick:
1593 * @flags_class: a #GFlagsClass
1594 * @nick: the nickname to look up
1596 * Looks up a #GFlagsValue by nickname.
1598 * Returns: the #GFlagsValue with nickname @nick, or %NULL if there is no flag with that nickname
1603 * g_flags_register_static:
1604 * @name: A nul-terminated string used as the name of the new type.
1605 * @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.
1607 * Registers a new static flags type with the name @name.
1609 * It is normally more convenient to let <link
1610 * linkend="glib-mkenums">glib-mkenums</link> generate a
1611 * my_flags_get_type() function from a usual C enumeration definition
1612 * than to write one yourself using g_flags_register_static().
1614 * Returns: The new type identifier.
1619 * g_object_add_toggle_ref: (skip)
1620 * @object: a #GObject
1621 * @notify: a function to call when this reference is the last reference to the object, or is no longer the last reference.
1622 * @data: data to pass to @notify
1624 * Increases the reference count of the object by one and sets a
1625 * callback to be called when all other references to the object are
1626 * dropped, or when this is already the last reference to the object
1627 * and another reference is established.
1629 * This functionality is intended for binding @object to a proxy
1630 * object managed by another memory manager. This is done with two
1631 * paired references: the strong reference added by
1632 * g_object_add_toggle_ref() and a reverse reference to the proxy
1633 * object which is either a strong reference or weak reference.
1635 * The setup is that when there are no other references to @object,
1636 * only a weak reference is held in the reverse direction from @object
1637 * to the proxy object, but when there are other references held to
1638 * @object, a strong reference is held. The @notify callback is called
1639 * when the reference from @object to the proxy object should be
1640 * <firstterm>toggled</firstterm> from strong to weak (@is_last_ref
1641 * true) or weak to strong (@is_last_ref false).
1643 * Since a (normal) reference must be held to the object before
1644 * calling g_object_add_toggle_ref(), the initial state of the reverse
1645 * link is always strong.
1647 * Multiple toggle references may be added to the same gobject,
1648 * however if there are multiple toggle references to an object, none
1649 * of them will ever be notified until all but one are removed. For
1650 * this reason, you should only ever use a toggle reference if there
1651 * is important state in the proxy object.
1658 * g_object_add_weak_pointer: (skip)
1659 * @object: The object that should be weak referenced.
1660 * @weak_pointer_location: (inout): The memory address of a pointer.
1662 * Adds a weak reference from weak_pointer to @object to indicate that
1663 * the pointer located at @weak_pointer_location is only valid during
1664 * the lifetime of @object. When the @object is finalized,
1665 * @weak_pointer will be set to %NULL.
1667 * Note that as with g_object_weak_ref(), the weak references created by
1668 * this method are not thread-safe: they cannot safely be used in one
1669 * thread if the object's last g_object_unref() might happen in another
1670 * thread. Use #GWeakRef if thread-safety is required.
1675 * g_object_bind_property:
1676 * @source: (type GObject.Object): the source #GObject
1677 * @source_property: the property on @source to bind
1678 * @target: (type GObject.Object): the target #GObject
1679 * @target_property: the property on @target to bind
1680 * @flags: flags to pass to #GBinding
1682 * Creates a binding between @source_property on @source and @target_property
1683 * on @target. Whenever the @source_property is changed the @target_property is
1684 * updated using the same value. For instance:
1687 * g_object_bind_property (action, "active", widget, "sensitive", 0);
1690 * Will result in the "sensitive" property of the widget #GObject instance to be
1691 * updated with the same value of the "active" property of the action #GObject
1694 * If @flags contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
1695 * if @target_property on @target changes then the @source_property on @source
1696 * will be updated as well.
1698 * The binding will automatically be removed when either the @source or the
1699 * @target instances are finalized. To remove the binding without affecting the
1700 * @source and the @target you can just call g_object_unref() on the returned
1701 * #GBinding instance.
1703 * A #GObject can have multiple bindings.
1705 * Returns: (transfer none): the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
1711 * g_object_bind_property_full:
1712 * @source: (type GObject.Object): the source #GObject
1713 * @source_property: the property on @source to bind
1714 * @target: (type GObject.Object): the target #GObject
1715 * @target_property: the property on @target to bind
1716 * @flags: flags to pass to #GBinding
1717 * @transform_to: (scope notified) (allow-none): the transformation function from the @source to the @target, or %NULL to use the default
1718 * @transform_from: (scope notified) (allow-none): the transformation function from the @target to the @source, or %NULL to use the default
1719 * @user_data: custom data to be passed to the transformation functions, or %NULL
1720 * @notify: function to be called when disposing the binding, to free the resources used by the transformation functions
1722 * Complete version of g_object_bind_property().
1724 * Creates a binding between @source_property on @source and @target_property
1725 * on @target, allowing you to set the transformation functions to be used by
1728 * If @flags contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
1729 * if @target_property on @target changes then the @source_property on @source
1730 * will be updated as well. The @transform_from function is only used in case
1731 * of bidirectional bindings, otherwise it will be ignored
1733 * The binding will automatically be removed when either the @source or the
1734 * @target instances are finalized. To remove the binding without affecting the
1735 * @source and the @target you can just call g_object_unref() on the returned
1736 * #GBinding instance.
1738 * A #GObject can have multiple bindings.
1740 * <note>The same @user_data parameter will be used for both @transform_to
1741 * and @transform_from transformation functions; the @notify function will
1742 * be called once, when the binding is removed. If you need different data
1743 * for each transformation function, please use
1744 * g_object_bind_property_with_closures() instead.</note>
1746 * Returns: (transfer none): the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
1752 * g_object_bind_property_with_closures:
1753 * @source: (type GObject.Object): the source #GObject
1754 * @source_property: the property on @source to bind
1755 * @target: (type GObject.Object): the target #GObject
1756 * @target_property: the property on @target to bind
1757 * @flags: flags to pass to #GBinding
1758 * @transform_to: a #GClosure wrapping the transformation function from the @source to the @target, or %NULL to use the default
1759 * @transform_from: a #GClosure wrapping the transformation function from the @target to the @source, or %NULL to use the default
1761 * Creates a binding between @source_property on @source and @target_property
1762 * on @target, allowing you to set the transformation functions to be used by
1765 * This function is the language bindings friendly version of
1766 * g_object_bind_property_full(), using #GClosure<!-- -->s instead of
1767 * function pointers.
1769 * Rename to: g_object_bind_property_full
1770 * Returns: (transfer none): the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
1776 * g_object_class_find_property:
1777 * @oclass: a #GObjectClass
1778 * @property_name: the name of the property to look up
1780 * Looks up the #GParamSpec for a property of a class.
1782 * Returns: (transfer none): the #GParamSpec for the property, or %NULL if the class doesn't have a property of that name
1787 * g_object_class_install_properties:
1788 * @oclass: a #GObjectClass
1789 * @n_pspecs: the length of the #GParamSpec<!-- -->s array
1790 * @pspecs: (array length=n_pspecs): the #GParamSpec<!-- -->s array defining the new properties
1792 * Installs new properties from an array of #GParamSpec<!-- -->s. This is
1793 * usually done in the class initializer.
1795 * The property id of each property is the index of each #GParamSpec in
1796 * the @pspecs array.
1798 * The property id of 0 is treated specially by #GObject and it should not
1799 * be used to store a #GParamSpec.
1801 * This function should be used if you plan to use a static array of
1802 * #GParamSpec<!-- -->s and g_object_notify_by_pspec(). For instance, this
1803 * class initialization:
1807 * PROP_0, PROP_FOO, PROP_BAR, N_PROPERTIES
1810 * static GParamSpec *obj_properties[N_PROPERTIES] = { NULL, };
1813 * my_object_class_init (MyObjectClass *klass)
1815 * GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
1817 * obj_properties[PROP_FOO] =
1818 * g_param_spec_int ("foo", "Foo", "Foo",
1821 * G_PARAM_READWRITE);
1823 * obj_properties[PROP_BAR] =
1824 * g_param_spec_string ("bar", "Bar", "Bar",
1826 * G_PARAM_READWRITE);
1828 * gobject_class->set_property = my_object_set_property;
1829 * gobject_class->get_property = my_object_get_property;
1830 * g_object_class_install_properties (gobject_class,
1836 * allows calling g_object_notify_by_pspec() to notify of property changes:
1840 * my_object_set_foo (MyObject *self, gint foo)
1842 * if (self->foo != foo)
1845 * g_object_notify_by_pspec (G_OBJECT (self), obj_properties[PROP_FOO]);
1855 * g_object_class_install_property:
1856 * @oclass: a #GObjectClass
1857 * @property_id: the id for the new property
1858 * @pspec: the #GParamSpec for the new property
1860 * Installs a new property. This is usually done in the class initializer.
1862 * Note that it is possible to redefine a property in a derived class,
1863 * by installing a property with the same name. This can be useful at times,
1864 * e.g. to change the range of allowed values or the default value.
1869 * g_object_class_list_properties:
1870 * @oclass: a #GObjectClass
1871 * @n_properties: (out): return location for the length of the returned array
1873 * Get an array of #GParamSpec* for all properties of a class.
1875 * Returns: (array length=n_properties) (transfer container): an array of #GParamSpec* which should be freed after use
1880 * g_object_class_override_property:
1881 * @oclass: a #GObjectClass
1882 * @property_id: the new property ID
1883 * @name: the name of a property registered in a parent class or in an interface of this class.
1885 * Registers @property_id as referring to a property with the
1886 * name @name in a parent class or in an interface implemented
1887 * by @oclass. This allows this class to <firstterm>override</firstterm>
1888 * a property implementation in a parent class or to provide
1889 * the implementation of a property from an interface.
1892 * Internally, overriding is implemented by creating a property of type
1893 * #GParamSpecOverride; generally operations that query the properties of
1894 * the object class, such as g_object_class_find_property() or
1895 * g_object_class_list_properties() will return the overridden
1896 * property. However, in one case, the @construct_properties argument of
1897 * the @constructor virtual function, the #GParamSpecOverride is passed
1898 * instead, so that the @param_id field of the #GParamSpec will be
1899 * correct. For virtually all uses, this makes no difference. If you
1900 * need to get the overridden property, you can call
1901 * g_param_spec_get_redirect_target().
1909 * g_object_connect: (skip)
1910 * @object: a #GObject
1911 * @signal_spec: the spec for the first signal
1912 * @...: #GCallback for the first signal, followed by data for the first signal, followed optionally by more signal spec/callback/data triples, followed by %NULL
1914 * A convenience function to connect multiple signals at once.
1916 * The signal specs expected by this function have the form
1917 * "modifier::signal_name", where modifier can be one of the following:
1920 * <term>signal</term>
1922 * equivalent to <literal>g_signal_connect_data (..., NULL, 0)</literal>
1923 * </para></listitem>
1926 * <term>object_signal</term>
1927 * <term>object-signal</term>
1929 * equivalent to <literal>g_signal_connect_object (..., 0)</literal>
1930 * </para></listitem>
1933 * <term>swapped_signal</term>
1934 * <term>swapped-signal</term>
1936 * equivalent to <literal>g_signal_connect_data (..., NULL, G_CONNECT_SWAPPED)</literal>
1937 * </para></listitem>
1940 * <term>swapped_object_signal</term>
1941 * <term>swapped-object-signal</term>
1943 * equivalent to <literal>g_signal_connect_object (..., G_CONNECT_SWAPPED)</literal>
1944 * </para></listitem>
1947 * <term>signal_after</term>
1948 * <term>signal-after</term>
1950 * equivalent to <literal>g_signal_connect_data (..., NULL, G_CONNECT_AFTER)</literal>
1951 * </para></listitem>
1954 * <term>object_signal_after</term>
1955 * <term>object-signal-after</term>
1957 * equivalent to <literal>g_signal_connect_object (..., G_CONNECT_AFTER)</literal>
1958 * </para></listitem>
1961 * <term>swapped_signal_after</term>
1962 * <term>swapped-signal-after</term>
1964 * equivalent to <literal>g_signal_connect_data (..., NULL, G_CONNECT_SWAPPED | G_CONNECT_AFTER)</literal>
1965 * </para></listitem>
1968 * <term>swapped_object_signal_after</term>
1969 * <term>swapped-object-signal-after</term>
1971 * equivalent to <literal>g_signal_connect_object (..., G_CONNECT_SWAPPED | G_CONNECT_AFTER)</literal>
1972 * </para></listitem>
1977 * menu->toplevel = g_object_connect (g_object_new (GTK_TYPE_WINDOW,
1978 * "type", GTK_WINDOW_POPUP,
1981 * "signal::event", gtk_menu_window_event, menu,
1982 * "signal::size_request", gtk_menu_window_size_request, menu,
1983 * "signal::destroy", gtk_widget_destroyed, &menu->toplevel,
1987 * Returns: (transfer none): @object
1992 * g_object_disconnect: (skip)
1993 * @object: a #GObject
1994 * @signal_spec: the spec for the first signal
1995 * @...: #GCallback for the first signal, followed by data for the first signal, followed optionally by more signal spec/callback/data triples, followed by %NULL
1997 * A convenience function to disconnect multiple signals at once.
1999 * The signal specs expected by this function have the form
2000 * "any_signal", which means to disconnect any signal with matching
2001 * callback and data, or "any_signal::signal_name", which only
2002 * disconnects the signal named "signal_name".
2007 * g_object_dup_data:
2008 * @object: the #GObject to store user data on
2009 * @key: a string, naming the user data pointer
2010 * @dup_func: (allow-none): function to dup the value
2011 * @user_data: (allow-none): passed as user_data to @dup_func
2013 * This is a variant of g_object_get_data() which returns
2014 * a 'duplicate' of the value. @dup_func defines the
2015 * meaning of 'duplicate' in this context, it could e.g.
2016 * take a reference on a ref-counted object.
2018 * If the @key is not set on the object then @dup_func
2019 * will be called with a %NULL argument.
2021 * Note that @dup_func is called while user data of @object
2024 * This function can be useful to avoid races when multiple
2025 * threads are using object data on the same key on the same
2028 * Returns: the result of calling @dup_func on the value associated with @key on @object, or %NULL if not set. If @dup_func is %NULL, the value is returned unmodified.
2034 * g_object_dup_qdata:
2035 * @object: the #GObject to store user data on
2036 * @quark: a #GQuark, naming the user data pointer
2037 * @dup_func: (allow-none): function to dup the value
2038 * @user_data: (allow-none): passed as user_data to @dup_func
2040 * This is a variant of g_object_get_qdata() which returns
2041 * a 'duplicate' of the value. @dup_func defines the
2042 * meaning of 'duplicate' in this context, it could e.g.
2043 * take a reference on a ref-counted object.
2045 * If the @quark is not set on the object then @dup_func
2046 * will be called with a %NULL argument.
2048 * Note that @dup_func is called while user data of @object
2051 * This function can be useful to avoid races when multiple
2052 * threads are using object data on the same key on the same
2055 * Returns: the result of calling @dup_func on the value associated with @quark on @object, or %NULL if not set. If @dup_func is %NULL, the value is returned unmodified.
2061 * g_object_force_floating:
2062 * @object: a #GObject
2064 * This function is intended for #GObject implementations to re-enforce a
2065 * <link linkend="floating-ref">floating</link> object reference.
2066 * Doing this is seldom required: all
2067 * #GInitiallyUnowned<!-- -->s are created with a floating reference which
2068 * usually just needs to be sunken by calling g_object_ref_sink().
2075 * g_object_freeze_notify:
2076 * @object: a #GObject
2078 * Increases the freeze count on @object. If the freeze count is
2079 * non-zero, the emission of "notify" signals on @object is
2080 * stopped. The signals are queued until the freeze count is decreased
2081 * to zero. Duplicate notifications are squashed so that at most one
2082 * #GObject::notify signal is emitted for each property modified while the
2085 * This is necessary for accessors that modify multiple properties to prevent
2086 * premature notification while the object is still being modified.
2091 * g_object_get: (skip)
2092 * @object: a #GObject
2093 * @first_property_name: name of the first property to get
2094 * @...: return location for the first property, followed optionally by more name/return location pairs, followed by %NULL
2096 * Gets properties of an object.
2098 * In general, a copy is made of the property contents and the caller
2099 * is responsible for freeing the memory in the appropriate manner for
2100 * the type, for instance by calling g_free() or g_object_unref().
2103 * <title>Using g_object_get(<!-- -->)</title>
2104 * An example of using g_object_get() to get the contents
2105 * of three properties - one of type #G_TYPE_INT,
2106 * one of type #G_TYPE_STRING, and one of type #G_TYPE_OBJECT:
2112 * g_object_get (my_object,
2113 * "int-property", &intval,
2114 * "str-property", &strval,
2115 * "obj-property", &objval,
2118 * // Do something with intval, strval, objval
2121 * g_object_unref (objval);
2128 * g_object_get_data:
2129 * @object: #GObject containing the associations
2130 * @key: name of the key for that association
2132 * Gets a named field from the objects table of associations (see g_object_set_data()).
2134 * Returns: (transfer none): the data if found, or %NULL if no such data exists.
2139 * g_object_get_property:
2140 * @object: a #GObject
2141 * @property_name: the name of the property to get
2142 * @value: return location for the property value
2144 * Gets a property of an object. @value must have been initialized to the
2145 * expected type of the property (or a type to which the expected type can be
2146 * transformed) using g_value_init().
2148 * In general, a copy is made of the property contents and the caller is
2149 * responsible for freeing the memory by calling g_value_unset().
2151 * Note that g_object_get_property() is really intended for language
2152 * bindings, g_object_get() is much more convenient for C programming.
2157 * g_object_get_qdata:
2158 * @object: The GObject to get a stored user data pointer from
2159 * @quark: A #GQuark, naming the user data pointer
2161 * This function gets back user data pointers stored via
2162 * g_object_set_qdata().
2164 * Returns: (transfer none): The user data pointer set, or %NULL
2169 * g_object_get_valist: (skip)
2170 * @object: a #GObject
2171 * @first_property_name: name of the first property to get
2172 * @var_args: return location for the first property, followed optionally by more name/return location pairs, followed by %NULL
2174 * Gets properties of an object.
2176 * In general, a copy is made of the property contents and the caller
2177 * is responsible for freeing the memory in the appropriate manner for
2178 * the type, for instance by calling g_free() or g_object_unref().
2180 * See g_object_get().
2185 * g_object_interface_find_property:
2186 * @g_iface: any interface vtable for the interface, or the default vtable for the interface
2187 * @property_name: name of a property to lookup.
2189 * Find the #GParamSpec with the given name for an
2190 * interface. Generally, the interface vtable passed in as @g_iface
2191 * will be the default vtable from g_type_default_interface_ref(), or,
2192 * if you know the interface has already been loaded,
2193 * g_type_default_interface_peek().
2196 * Returns: (transfer none): the #GParamSpec for the property of the interface with the name @property_name, or %NULL if no such property exists.
2201 * g_object_interface_install_property:
2202 * @g_iface: any interface vtable for the interface, or the default vtable for the interface.
2203 * @pspec: the #GParamSpec for the new property
2205 * Add a property to an interface; this is only useful for interfaces
2206 * that are added to GObject-derived types. Adding a property to an
2207 * interface forces all objects classes with that interface to have a
2208 * compatible property. The compatible property could be a newly
2209 * created #GParamSpec, but normally
2210 * g_object_class_override_property() will be used so that the object
2211 * class only needs to provide an implementation and inherits the
2212 * property description, default value, bounds, and so forth from the
2213 * interface property.
2215 * This function is meant to be called from the interface's default
2216 * vtable initialization function (the @class_init member of
2217 * #GTypeInfo.) It must not be called after after @class_init has
2218 * been called for any object types implementing this interface.
2225 * g_object_interface_list_properties:
2226 * @g_iface: any interface vtable for the interface, or the default vtable for the interface
2227 * @n_properties_p: (out): location to store number of properties returned.
2229 * Lists the properties of an interface.Generally, the interface
2230 * vtable passed in as @g_iface will be the default vtable from
2231 * g_type_default_interface_ref(), or, if you know the interface has
2232 * already been loaded, g_type_default_interface_peek().
2235 * Returns: (array length=n_properties_p) (transfer container): a pointer to an array of pointers to #GParamSpec structures. The paramspecs are owned by GLib, but the array should be freed with g_free() when you are done with it.
2240 * g_object_is_floating:
2241 * @object: (type GObject.Object): a #GObject
2243 * Checks whether @object has a <link linkend="floating-ref">floating</link>
2247 * Returns: %TRUE if @object has a floating reference
2252 * g_object_new: (skip)
2253 * @object_type: the type id of the #GObject subtype to instantiate
2254 * @first_property_name: the name of the first property
2255 * @...: the value of the first property, followed optionally by more name/value pairs, followed by %NULL
2257 * Creates a new instance of a #GObject subtype and sets its properties.
2259 * Construction parameters (see #G_PARAM_CONSTRUCT, #G_PARAM_CONSTRUCT_ONLY)
2260 * which are not explicitly specified are set to their default values.
2262 * Returns: (transfer full): a new instance of @object_type
2267 * g_object_new_valist: (skip)
2268 * @object_type: the type id of the #GObject subtype to instantiate
2269 * @first_property_name: the name of the first property
2270 * @var_args: the value of the first property, followed optionally by more name/value pairs, followed by %NULL
2272 * Creates a new instance of a #GObject subtype and sets its properties.
2274 * Construction parameters (see #G_PARAM_CONSTRUCT, #G_PARAM_CONSTRUCT_ONLY)
2275 * which are not explicitly specified are set to their default values.
2277 * Returns: a new instance of @object_type
2283 * @object_type: the type id of the #GObject subtype to instantiate
2284 * @n_parameters: the length of the @parameters array
2285 * @parameters: (array length=n_parameters): an array of #GParameter
2287 * Creates a new instance of a #GObject subtype and sets its properties.
2289 * Construction parameters (see #G_PARAM_CONSTRUCT, #G_PARAM_CONSTRUCT_ONLY)
2290 * which are not explicitly specified are set to their default values.
2292 * Rename to: g_object_new
2293 * Returns: (type GObject.Object) (transfer full): a new instance of @object_type
2299 * @object: a #GObject
2300 * @property_name: the name of a property installed on the class of @object.
2302 * Emits a "notify" signal for the property @property_name on @object.
2304 * When possible, eg. when signaling a property change from within the class
2305 * that registered the property, you should use g_object_notify_by_pspec()
2311 * g_object_notify_by_pspec:
2312 * @object: a #GObject
2313 * @pspec: the #GParamSpec of a property installed on the class of @object.
2315 * Emits a "notify" signal for the property specified by @pspec on @object.
2317 * This function omits the property name lookup, hence it is faster than
2318 * g_object_notify().
2320 * One way to avoid using g_object_notify() from within the
2321 * class that registered the properties, and using g_object_notify_by_pspec()
2322 * instead, is to store the GParamSpec used with
2323 * g_object_class_install_property() inside a static array, e.g.:
2333 * static GParamSpec *properties[PROP_LAST];
2336 * my_object_class_init (MyObjectClass *klass)
2338 * properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
2341 * G_PARAM_READWRITE);
2342 * g_object_class_install_property (gobject_class,
2344 * properties[PROP_FOO]);
2348 * and then notify a change on the "foo" property with:
2351 * g_object_notify_by_pspec (self, properties[PROP_FOO]);
2360 * @object: (type GObject.Object): a #GObject
2362 * Increases the reference count of @object.
2364 * Returns: (type GObject.Object) (transfer none): the same @object
2369 * g_object_ref_sink:
2370 * @object: (type GObject.Object): a #GObject
2372 * Increase the reference count of @object, and possibly remove the
2373 * <link linkend="floating-ref">floating</link> reference, if @object
2374 * has a floating reference.
2376 * In other words, if the object is floating, then this call "assumes
2377 * ownership" of the floating reference, converting it to a normal
2378 * reference by clearing the floating flag while leaving the reference
2379 * count unchanged. If the object is not floating, then this call
2380 * adds a new normal reference increasing the reference count by one.
2383 * Returns: (type GObject.Object) (transfer none): @object
2388 * g_object_remove_toggle_ref: (skip)
2389 * @object: a #GObject
2390 * @notify: a function to call when this reference is the last reference to the object, or is no longer the last reference.
2391 * @data: data to pass to @notify
2393 * Removes a reference added with g_object_add_toggle_ref(). The
2394 * reference count of the object is decreased by one.
2401 * g_object_remove_weak_pointer: (skip)
2402 * @object: The object that is weak referenced.
2403 * @weak_pointer_location: (inout): The memory address of a pointer.
2405 * Removes a weak reference from @object that was previously added
2406 * using g_object_add_weak_pointer(). The @weak_pointer_location has
2407 * to match the one used with g_object_add_weak_pointer().
2412 * g_object_replace_data:
2413 * @object: the #GObject to store user data on
2414 * @key: a string, naming the user data pointer
2415 * @oldval: (allow-none): the old value to compare against
2416 * @newval: (allow-none): the new value
2417 * @destroy: (allow-none): a destroy notify for the new value
2418 * @old_destroy: (allow-none): destroy notify for the existing value
2420 * Compares the user data for the key @key on @object with
2421 * @oldval, and if they are the same, replaces @oldval with
2424 * This is like a typical atomic compare-and-exchange
2425 * operation, for user data on an object.
2427 * If the previous value was replaced then ownership of the
2428 * old value (@oldval) is passed to the caller, including
2429 * the registred destroy notify for it (passed out in @old_destroy).
2430 * Its up to the caller to free this as he wishes, which may
2431 * or may not include using @old_destroy as sometimes replacement
2432 * should not destroy the object in the normal way.
2434 * Return: %TRUE if the existing value for @key was replaced
2435 * by @newval, %FALSE otherwise.
2442 * g_object_replace_qdata:
2443 * @object: the #GObject to store user data on
2444 * @quark: a #GQuark, naming the user data pointer
2445 * @oldval: (allow-none): the old value to compare against
2446 * @newval: (allow-none): the new value
2447 * @destroy: (allow-none): a destroy notify for the new value
2448 * @old_destroy: (allow-none): destroy notify for the existing value
2450 * Compares the user data for the key @quark on @object with
2451 * @oldval, and if they are the same, replaces @oldval with
2454 * This is like a typical atomic compare-and-exchange
2455 * operation, for user data on an object.
2457 * If the previous value was replaced then ownership of the
2458 * old value (@oldval) is passed to the caller, including
2459 * the registred destroy notify for it (passed out in @old_destroy).
2460 * Its up to the caller to free this as he wishes, which may
2461 * or may not include using @old_destroy as sometimes replacement
2462 * should not destroy the object in the normal way.
2464 * Return: %TRUE if the existing value for @quark was replaced
2465 * by @newval, %FALSE otherwise.
2472 * g_object_run_dispose:
2473 * @object: a #GObject
2475 * Releases all references to other objects. This can be used to break
2478 * This functions should only be called from object system implementations.
2483 * g_object_set: (skip)
2484 * @object: a #GObject
2485 * @first_property_name: name of the first property to set
2486 * @...: value for the first property, followed optionally by more name/value pairs, followed by %NULL
2488 * Sets properties on an object.
2493 * g_object_set_data:
2494 * @object: #GObject containing the associations.
2495 * @key: name of the key
2496 * @data: data to associate with that key
2498 * Each object carries around a table of associations from
2499 * strings to pointers. This function lets you set an association.
2501 * If the object already had an association with that name,
2502 * the old association will be destroyed.
2507 * g_object_set_data_full: (skip)
2508 * @object: #GObject containing the associations
2509 * @key: name of the key
2510 * @data: data to associate with that key
2511 * @destroy: function to call when the association is destroyed
2513 * Like g_object_set_data() except it adds notification
2514 * for when the association is destroyed, either by setting it
2515 * to a different value or when the object is destroyed.
2517 * Note that the @destroy callback is not called if @data is %NULL.
2522 * g_object_set_property:
2523 * @object: a #GObject
2524 * @property_name: the name of the property to set
2527 * Sets a property on an object.
2532 * g_object_set_qdata: (skip)
2533 * @object: The GObject to set store a user data pointer
2534 * @quark: A #GQuark, naming the user data pointer
2535 * @data: An opaque user data pointer
2537 * This sets an opaque, named pointer on an object.
2538 * The name is specified through a #GQuark (retrived e.g. via
2539 * g_quark_from_static_string()), and the pointer
2540 * can be gotten back from the @object with g_object_get_qdata()
2541 * until the @object is finalized.
2542 * Setting a previously set user data pointer, overrides (frees)
2543 * the old pointer set, using #NULL as pointer essentially
2544 * removes the data stored.
2549 * g_object_set_qdata_full: (skip)
2550 * @object: The GObject to set store a user data pointer
2551 * @quark: A #GQuark, naming the user data pointer
2552 * @data: An opaque user data pointer
2553 * @destroy: Function to invoke with @data as argument, when @data needs to be freed
2555 * This function works like g_object_set_qdata(), but in addition,
2556 * a void (*destroy) (gpointer) function may be specified which is
2557 * called with @data as argument when the @object is finalized, or
2558 * the data is being overwritten by a call to g_object_set_qdata()
2559 * with the same @quark.
2564 * g_object_set_valist: (skip)
2565 * @object: a #GObject
2566 * @first_property_name: name of the first property to set
2567 * @var_args: value for the first property, followed optionally by more name/value pairs, followed by %NULL
2569 * Sets properties on an object.
2574 * g_object_steal_data:
2575 * @object: #GObject containing the associations
2576 * @key: name of the key
2578 * Remove a specified datum from the object's data associations,
2579 * without invoking the association's destroy handler.
2581 * Returns: (transfer full): the data if found, or %NULL if no such data exists.
2586 * g_object_steal_qdata:
2587 * @object: The GObject to get a stored user data pointer from
2588 * @quark: A #GQuark, naming the user data pointer
2590 * This function gets back user data pointers stored via
2591 * g_object_set_qdata() and removes the @data from object
2592 * without invoking its destroy() function (if any was
2594 * Usually, calling this function is only required to update
2595 * user data pointers with a destroy notifier, for example:
2598 * object_add_to_user_list (GObject *object,
2599 * const gchar *new_string)
2601 * // the quark, naming the object data
2602 * GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
2603 * // retrive the old string list
2604 * GList *list = g_object_steal_qdata (object, quark_string_list);
2606 * // prepend new string
2607 * list = g_list_prepend (list, g_strdup (new_string));
2608 * // this changed 'list', so we need to set it again
2609 * g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
2612 * free_string_list (gpointer data)
2614 * GList *node, *list = data;
2616 * for (node = list; node; node = node->next)
2617 * g_free (node->data);
2618 * g_list_free (list);
2621 * Using g_object_get_qdata() in the above example, instead of
2622 * g_object_steal_qdata() would have left the destroy function set,
2623 * and thus the partial string list would have been freed upon
2624 * g_object_set_qdata_full().
2626 * Returns: (transfer full): The user data pointer set, or %NULL
2631 * g_object_thaw_notify:
2632 * @object: a #GObject
2634 * Reverts the effect of a previous call to
2635 * g_object_freeze_notify(). The freeze count is decreased on @object
2636 * and when it reaches zero, queued "notify" signals are emitted.
2638 * Duplicate notifications for each property are squashed so that at most one
2639 * #GObject::notify signal is emitted for each property.
2641 * It is an error to call this function when the freeze count is zero.
2647 * @object: (type GObject.Object): a #GObject
2649 * Decreases the reference count of @object. When its reference count
2650 * drops to 0, the object is finalized (i.e. its memory is freed).
2655 * g_object_watch_closure:
2656 * @object: GObject restricting lifetime of @closure
2657 * @closure: GClosure to watch
2659 * This function essentially limits the life time of the @closure to
2660 * the life time of the object. That is, when the object is finalized,
2661 * the @closure is invalidated by calling g_closure_invalidate() on
2662 * it, in order to prevent invocations of the closure with a finalized
2663 * (nonexisting) object. Also, g_object_ref() and g_object_unref() are
2664 * added as marshal guards to the @closure, to ensure that an extra
2665 * reference count is held on @object during invocation of the
2666 * @closure. Usually, this function will be called on closures that
2667 * use this @object as closure data.
2672 * g_object_weak_ref: (skip)
2673 * @object: #GObject to reference weakly
2674 * @notify: callback to invoke before the object is freed
2675 * @data: extra data to pass to notify
2677 * Adds a weak reference callback to an object. Weak references are
2678 * used for notification when an object is finalized. They are called
2679 * "weak references" because they allow you to safely hold a pointer
2680 * to an object without calling g_object_ref() (g_object_ref() adds a
2681 * strong reference, that is, forces the object to stay alive).
2683 * Note that the weak references created by this method are not
2684 * thread-safe: they cannot safely be used in one thread if the
2685 * object's last g_object_unref() might happen in another thread.
2686 * Use #GWeakRef if thread-safety is required.
2691 * g_object_weak_unref: (skip)
2692 * @object: #GObject to remove a weak reference from
2693 * @notify: callback to search for
2694 * @data: data to search for
2696 * Removes a weak reference callback to an object.
2701 * g_param_spec_boolean:
2702 * @name: canonical name of the property specified
2703 * @nick: nick name for the property specified
2704 * @blurb: description of the property specified
2705 * @default_value: default value for the property specified
2706 * @flags: flags for the property specified
2708 * Creates a new #GParamSpecBoolean instance specifying a %G_TYPE_BOOLEAN
2711 * See g_param_spec_internal() for details on property names.
2713 * Returns: (transfer full): a newly created parameter specification
2718 * g_param_spec_boxed:
2719 * @name: canonical name of the property specified
2720 * @nick: nick name for the property specified
2721 * @blurb: description of the property specified
2722 * @boxed_type: %G_TYPE_BOXED derived type of this property
2723 * @flags: flags for the property specified
2725 * Creates a new #GParamSpecBoxed instance specifying a %G_TYPE_BOXED
2728 * See g_param_spec_internal() for details on property names.
2730 * Returns: (transfer full): a newly created parameter specification
2735 * g_param_spec_char:
2736 * @name: canonical name of the property specified
2737 * @nick: nick name for the property specified
2738 * @blurb: description of the property specified
2739 * @minimum: minimum value for the property specified
2740 * @maximum: maximum value for the property specified
2741 * @default_value: default value for the property specified
2742 * @flags: flags for the property specified
2744 * Creates a new #GParamSpecChar instance specifying a %G_TYPE_CHAR property.
2746 * Returns: (transfer full): a newly created parameter specification
2751 * g_param_spec_double:
2752 * @name: canonical name of the property specified
2753 * @nick: nick name for the property specified
2754 * @blurb: description of the property specified
2755 * @minimum: minimum value for the property specified
2756 * @maximum: maximum value for the property specified
2757 * @default_value: default value for the property specified
2758 * @flags: flags for the property specified
2760 * Creates a new #GParamSpecDouble instance specifying a %G_TYPE_DOUBLE
2763 * See g_param_spec_internal() for details on property names.
2765 * Returns: (transfer full): a newly created parameter specification
2770 * g_param_spec_enum:
2771 * @name: canonical name of the property specified
2772 * @nick: nick name for the property specified
2773 * @blurb: description of the property specified
2774 * @enum_type: a #GType derived from %G_TYPE_ENUM
2775 * @default_value: default value for the property specified
2776 * @flags: flags for the property specified
2778 * Creates a new #GParamSpecEnum instance specifying a %G_TYPE_ENUM
2781 * See g_param_spec_internal() for details on property names.
2783 * Returns: (transfer full): a newly created parameter specification
2788 * g_param_spec_flags:
2789 * @name: canonical name of the property specified
2790 * @nick: nick name for the property specified
2791 * @blurb: description of the property specified
2792 * @flags_type: a #GType derived from %G_TYPE_FLAGS
2793 * @default_value: default value for the property specified
2794 * @flags: flags for the property specified
2796 * Creates a new #GParamSpecFlags instance specifying a %G_TYPE_FLAGS
2799 * See g_param_spec_internal() for details on property names.
2801 * Returns: (transfer full): a newly created parameter specification
2806 * g_param_spec_float:
2807 * @name: canonical name of the property specified
2808 * @nick: nick name for the property specified
2809 * @blurb: description of the property specified
2810 * @minimum: minimum value for the property specified
2811 * @maximum: maximum value for the property specified
2812 * @default_value: default value for the property specified
2813 * @flags: flags for the property specified
2815 * Creates a new #GParamSpecFloat instance specifying a %G_TYPE_FLOAT property.
2817 * See g_param_spec_internal() for details on property names.
2819 * Returns: (transfer full): a newly created parameter specification
2824 * g_param_spec_get_blurb:
2825 * @pspec: a valid #GParamSpec
2827 * Get the short description of a #GParamSpec.
2829 * Returns: the short description of @pspec.
2834 * g_param_spec_get_name:
2835 * @pspec: a valid #GParamSpec
2837 * Get the name of a #GParamSpec.
2839 * The name is always an "interned" string (as per g_intern_string()).
2840 * This allows for pointer-value comparisons.
2842 * Returns: the name of @pspec.
2847 * g_param_spec_get_nick:
2848 * @pspec: a valid #GParamSpec
2850 * Get the nickname of a #GParamSpec.
2852 * Returns: the nickname of @pspec.
2857 * g_param_spec_get_qdata:
2858 * @pspec: a valid #GParamSpec
2859 * @quark: a #GQuark, naming the user data pointer
2861 * Gets back user data pointers stored via g_param_spec_set_qdata().
2863 * Returns: (transfer none): the user data pointer set, or %NULL
2868 * g_param_spec_get_redirect_target:
2869 * @pspec: a #GParamSpec
2871 * If the paramspec redirects operations to another paramspec,
2872 * returns that paramspec. Redirect is used typically for
2873 * providing a new implementation of a property in a derived
2874 * type while preserving all the properties from the parent
2875 * type. Redirection is established by creating a property
2876 * of type #GParamSpecOverride. See g_object_class_override_property()
2877 * for an example of the use of this capability.
2880 * Returns: (transfer none): paramspec to which requests on this paramspec should be redirected, or %NULL if none.
2885 * g_param_spec_gtype:
2886 * @name: canonical name of the property specified
2887 * @nick: nick name for the property specified
2888 * @blurb: description of the property specified
2889 * @is_a_type: a #GType whose subtypes are allowed as values of the property (use %G_TYPE_NONE for any type)
2890 * @flags: flags for the property specified
2892 * Creates a new #GParamSpecGType instance specifying a
2893 * %G_TYPE_GTYPE property.
2895 * See g_param_spec_internal() for details on property names.
2898 * Returns: (transfer full): a newly created parameter specification
2904 * @name: canonical name of the property specified
2905 * @nick: nick name for the property specified
2906 * @blurb: description of the property specified
2907 * @minimum: minimum value for the property specified
2908 * @maximum: maximum value for the property specified
2909 * @default_value: default value for the property specified
2910 * @flags: flags for the property specified
2912 * Creates a new #GParamSpecInt instance specifying a %G_TYPE_INT property.
2914 * See g_param_spec_internal() for details on property names.
2916 * Returns: (transfer full): a newly created parameter specification
2921 * g_param_spec_int64:
2922 * @name: canonical name of the property specified
2923 * @nick: nick name for the property specified
2924 * @blurb: description of the property specified
2925 * @minimum: minimum value for the property specified
2926 * @maximum: maximum value for the property specified
2927 * @default_value: default value for the property specified
2928 * @flags: flags for the property specified
2930 * Creates a new #GParamSpecInt64 instance specifying a %G_TYPE_INT64 property.
2932 * See g_param_spec_internal() for details on property names.
2934 * Returns: (transfer full): a newly created parameter specification
2939 * g_param_spec_internal: (skip)
2940 * @param_type: the #GType for the property; must be derived from #G_TYPE_PARAM
2941 * @name: the canonical name of the property
2942 * @nick: the nickname of the property
2943 * @blurb: a short description of the property
2944 * @flags: a combination of #GParamFlags
2946 * Creates a new #GParamSpec instance.
2948 * A property name consists of segments consisting of ASCII letters and
2949 * digits, separated by either the '-' or '_' character. The first
2950 * character of a property name must be a letter. Names which violate these
2951 * rules lead to undefined behaviour.
2953 * When creating and looking up a #GParamSpec, either separator can be
2954 * used, but they cannot be mixed. Using '-' is considerably more
2955 * efficient and in fact required when using property names as detail
2956 * strings for signals.
2958 * Beyond the name, #GParamSpec<!-- -->s have two more descriptive
2959 * strings associated with them, the @nick, which should be suitable
2960 * for use as a label for the property in a property editor, and the
2961 * @blurb, which should be a somewhat longer description, suitable for
2962 * e.g. a tooltip. The @nick and @blurb should ideally be localized.
2964 * Returns: a newly allocated #GParamSpec instance
2969 * g_param_spec_long:
2970 * @name: canonical name of the property specified
2971 * @nick: nick name for the property specified
2972 * @blurb: description of the property specified
2973 * @minimum: minimum value for the property specified
2974 * @maximum: maximum value for the property specified
2975 * @default_value: default value for the property specified
2976 * @flags: flags for the property specified
2978 * Creates a new #GParamSpecLong instance specifying a %G_TYPE_LONG property.
2980 * See g_param_spec_internal() for details on property names.
2982 * Returns: (transfer full): a newly created parameter specification
2987 * g_param_spec_object:
2988 * @name: canonical name of the property specified
2989 * @nick: nick name for the property specified
2990 * @blurb: description of the property specified
2991 * @object_type: %G_TYPE_OBJECT derived type of this property
2992 * @flags: flags for the property specified
2994 * Creates a new #GParamSpecBoxed instance specifying a %G_TYPE_OBJECT
2997 * See g_param_spec_internal() for details on property names.
2999 * Returns: (transfer full): a newly created parameter specification
3004 * g_param_spec_override: (skip)
3005 * @name: the name of the property.
3006 * @overridden: The property that is being overridden
3008 * Creates a new property of type #GParamSpecOverride. This is used
3009 * to direct operations to another paramspec, and will not be directly
3010 * useful unless you are implementing a new base type similar to GObject.
3013 * Returns: the newly created #GParamSpec
3018 * g_param_spec_param:
3019 * @name: canonical name of the property specified
3020 * @nick: nick name for the property specified
3021 * @blurb: description of the property specified
3022 * @param_type: a #GType derived from %G_TYPE_PARAM
3023 * @flags: flags for the property specified
3025 * Creates a new #GParamSpecParam instance specifying a %G_TYPE_PARAM
3028 * See g_param_spec_internal() for details on property names.
3030 * Returns: (transfer full): a newly created parameter specification
3035 * g_param_spec_pointer:
3036 * @name: canonical name of the property specified
3037 * @nick: nick name for the property specified
3038 * @blurb: description of the property specified
3039 * @flags: flags for the property specified
3041 * Creates a new #GParamSpecPointer instance specifying a pointer property.
3043 * See g_param_spec_internal() for details on property names.
3045 * Returns: (transfer full): a newly created parameter specification
3050 * g_param_spec_pool_insert:
3051 * @pool: a #GParamSpecPool.
3052 * @pspec: the #GParamSpec to insert
3053 * @owner_type: a #GType identifying the owner of @pspec
3055 * Inserts a #GParamSpec in the pool.
3060 * g_param_spec_pool_list:
3061 * @pool: a #GParamSpecPool
3062 * @owner_type: the owner to look for
3063 * @n_pspecs_p: (out): return location for the length of the returned array
3065 * Gets an array of all #GParamSpec<!-- -->s owned by @owner_type in
3068 * Returns: (array length=n_pspecs_p) (transfer container): a newly allocated array containing pointers to all #GParamSpecs owned by @owner_type in the pool
3073 * g_param_spec_pool_list_owned:
3074 * @pool: a #GParamSpecPool
3075 * @owner_type: the owner to look for
3077 * Gets an #GList of all #GParamSpec<!-- -->s owned by @owner_type in
3080 * Returns: (transfer container) (element-type GObject.ParamSpec): a #GList of all #GParamSpec<!-- -->s owned by @owner_type in the pool#GParamSpec<!-- -->s.
3085 * g_param_spec_pool_lookup:
3086 * @pool: a #GParamSpecPool
3087 * @param_name: the name to look for
3088 * @owner_type: the owner to look for
3089 * @walk_ancestors: If %TRUE, also try to find a #GParamSpec with @param_name owned by an ancestor of @owner_type.
3091 * Looks up a #GParamSpec in the pool.
3093 * Returns: (transfer none): The found #GParamSpec, or %NULL if no matching #GParamSpec was found.
3098 * g_param_spec_pool_new:
3099 * @type_prefixing: Whether the pool will support type-prefixed property names.
3101 * Creates a new #GParamSpecPool.
3103 * If @type_prefixing is %TRUE, lookups in the newly created pool will
3104 * allow to specify the owner as a colon-separated prefix of the
3105 * property name, like "GtkContainer:border-width". This feature is
3106 * deprecated, so you should always set @type_prefixing to %FALSE.
3108 * Returns: (transfer none): a newly allocated #GParamSpecPool.
3113 * g_param_spec_pool_remove:
3114 * @pool: a #GParamSpecPool
3115 * @pspec: the #GParamSpec to remove
3117 * Removes a #GParamSpec from the pool.
3122 * g_param_spec_ref: (skip)
3123 * @pspec: a valid #GParamSpec
3125 * Increments the reference count of @pspec.
3127 * Returns: the #GParamSpec that was passed into this function
3132 * g_param_spec_ref_sink: (skip)
3133 * @pspec: a valid #GParamSpec
3135 * Convenience function to ref and sink a #GParamSpec.
3138 * Returns: the #GParamSpec that was passed into this function
3143 * g_param_spec_set_qdata:
3144 * @pspec: the #GParamSpec to set store a user data pointer
3145 * @quark: a #GQuark, naming the user data pointer
3146 * @data: an opaque user data pointer
3148 * Sets an opaque, named pointer on a #GParamSpec. The name is
3149 * specified through a #GQuark (retrieved e.g. via
3150 * g_quark_from_static_string()), and the pointer can be gotten back
3151 * from the @pspec with g_param_spec_get_qdata(). Setting a
3152 * previously set user data pointer, overrides (frees) the old pointer
3153 * set, using %NULL as pointer essentially removes the data stored.
3158 * g_param_spec_set_qdata_full: (skip)
3159 * @pspec: the #GParamSpec to set store a user data pointer
3160 * @quark: a #GQuark, naming the user data pointer
3161 * @data: an opaque user data pointer
3162 * @destroy: function to invoke with @data as argument, when @data needs to be freed
3164 * This function works like g_param_spec_set_qdata(), but in addition,
3165 * a <literal>void (*destroy) (gpointer)</literal> function may be
3166 * specified which is called with @data as argument when the @pspec is
3167 * finalized, or the data is being overwritten by a call to
3168 * g_param_spec_set_qdata() with the same @quark.
3173 * g_param_spec_sink:
3174 * @pspec: a valid #GParamSpec
3176 * The initial reference count of a newly created #GParamSpec is 1,
3177 * even though no one has explicitly called g_param_spec_ref() on it
3178 * yet. So the initial reference count is flagged as "floating", until
3179 * someone calls <literal>g_param_spec_ref (pspec); g_param_spec_sink
3180 * (pspec);</literal> in sequence on it, taking over the initial
3181 * reference count (thus ending up with a @pspec that has a reference
3182 * count of 1 still, but is not flagged "floating" anymore).
3187 * g_param_spec_steal_qdata:
3188 * @pspec: the #GParamSpec to get a stored user data pointer from
3189 * @quark: a #GQuark, naming the user data pointer
3191 * Gets back user data pointers stored via g_param_spec_set_qdata()
3192 * and removes the @data from @pspec without invoking its destroy()
3193 * function (if any was set). Usually, calling this function is only
3194 * required to update user data pointers with a destroy notifier.
3196 * Returns: (transfer none): the user data pointer set, or %NULL
3201 * g_param_spec_string:
3202 * @name: canonical name of the property specified
3203 * @nick: nick name for the property specified
3204 * @blurb: description of the property specified
3205 * @default_value: default value for the property specified
3206 * @flags: flags for the property specified
3208 * Creates a new #GParamSpecString instance.
3210 * See g_param_spec_internal() for details on property names.
3212 * Returns: (transfer full): a newly created parameter specification
3217 * g_param_spec_uchar:
3218 * @name: canonical name of the property specified
3219 * @nick: nick name for the property specified
3220 * @blurb: description of the property specified
3221 * @minimum: minimum value for the property specified
3222 * @maximum: maximum value for the property specified
3223 * @default_value: default value for the property specified
3224 * @flags: flags for the property specified
3226 * Creates a new #GParamSpecUChar instance specifying a %G_TYPE_UCHAR property.
3228 * Returns: (transfer full): a newly created parameter specification
3233 * g_param_spec_uint:
3234 * @name: canonical name of the property specified
3235 * @nick: nick name for the property specified
3236 * @blurb: description of the property specified
3237 * @minimum: minimum value for the property specified
3238 * @maximum: maximum value for the property specified
3239 * @default_value: default value for the property specified
3240 * @flags: flags for the property specified
3242 * Creates a new #GParamSpecUInt instance specifying a %G_TYPE_UINT property.
3244 * See g_param_spec_internal() for details on property names.
3246 * Returns: (transfer full): a newly created parameter specification
3251 * g_param_spec_uint64:
3252 * @name: canonical name of the property specified
3253 * @nick: nick name for the property specified
3254 * @blurb: description of the property specified
3255 * @minimum: minimum value for the property specified
3256 * @maximum: maximum value for the property specified
3257 * @default_value: default value for the property specified
3258 * @flags: flags for the property specified
3260 * Creates a new #GParamSpecUInt64 instance specifying a %G_TYPE_UINT64
3263 * See g_param_spec_internal() for details on property names.
3265 * Returns: (transfer full): a newly created parameter specification
3270 * g_param_spec_ulong:
3271 * @name: canonical name of the property specified
3272 * @nick: nick name for the property specified
3273 * @blurb: description of the property specified
3274 * @minimum: minimum value for the property specified
3275 * @maximum: maximum value for the property specified
3276 * @default_value: default value for the property specified
3277 * @flags: flags for the property specified
3279 * Creates a new #GParamSpecULong instance specifying a %G_TYPE_ULONG
3282 * See g_param_spec_internal() for details on property names.
3284 * Returns: (transfer full): a newly created parameter specification
3289 * g_param_spec_unichar:
3290 * @name: canonical name of the property specified
3291 * @nick: nick name for the property specified
3292 * @blurb: description of the property specified
3293 * @default_value: default value for the property specified
3294 * @flags: flags for the property specified
3296 * Creates a new #GParamSpecUnichar instance specifying a %G_TYPE_UINT
3297 * property. #GValue structures for this property can be accessed with
3298 * g_value_set_uint() and g_value_get_uint().
3300 * See g_param_spec_internal() for details on property names.
3302 * Returns: (transfer full): a newly created parameter specification
3307 * g_param_spec_unref: (skip)
3308 * @pspec: a valid #GParamSpec
3310 * Decrements the reference count of a @pspec.
3315 * g_param_spec_value_array: (skip)
3316 * @name: canonical name of the property specified
3317 * @nick: nick name for the property specified
3318 * @blurb: description of the property specified
3319 * @element_spec: a #GParamSpec describing the elements contained in arrays of this property, may be %NULL
3320 * @flags: flags for the property specified
3322 * Creates a new #GParamSpecValueArray instance specifying a
3323 * %G_TYPE_VALUE_ARRAY property. %G_TYPE_VALUE_ARRAY is a
3324 * %G_TYPE_BOXED type, as such, #GValue structures for this property
3325 * can be accessed with g_value_set_boxed() and g_value_get_boxed().
3327 * See g_param_spec_internal() for details on property names.
3329 * Returns: a newly created parameter specification
3334 * g_param_spec_variant:
3335 * @name: canonical name of the property specified
3336 * @nick: nick name for the property specified
3337 * @blurb: description of the property specified
3338 * @type: a #GVariantType
3339 * @default_value: (allow-none) (transfer full): a #GVariant of type @type to use as the default value, or %NULL
3340 * @flags: flags for the property specified
3342 * Creates a new #GParamSpecVariant instance specifying a #GVariant
3345 * If @default_value is floating, it is consumed.
3347 * See g_param_spec_internal() for details on property names.
3349 * Returns: (transfer full): the newly created #GParamSpec
3355 * g_param_type_register_static:
3356 * @name: 0-terminated string used as the name of the new #GParamSpec type.
3357 * @pspec_info: The #GParamSpecTypeInfo for this #GParamSpec type.
3359 * Registers @name as the name of a new static type derived from
3360 * #G_TYPE_PARAM. The type system uses the information contained in
3361 * the #GParamSpecTypeInfo structure pointed to by @info to manage the
3362 * #GParamSpec type and its instances.
3364 * Returns: The new type identifier.
3369 * g_param_value_convert:
3370 * @pspec: a valid #GParamSpec
3371 * @src_value: souce #GValue
3372 * @dest_value: destination #GValue of correct type for @pspec
3373 * @strict_validation: %TRUE requires @dest_value to conform to @pspec without modifications
3375 * Transforms @src_value into @dest_value if possible, and then
3376 * validates @dest_value, in order for it to conform to @pspec. If
3377 * @strict_validation is %TRUE this function will only succeed if the
3378 * transformed @dest_value complied to @pspec without modifications.
3380 * See also g_value_type_transformable(), g_value_transform() and
3381 * g_param_value_validate().
3383 * Returns: %TRUE if transformation and validation were successful, %FALSE otherwise and @dest_value is left untouched.
3388 * g_param_value_defaults:
3389 * @pspec: a valid #GParamSpec
3390 * @value: a #GValue of correct type for @pspec
3392 * Checks whether @value contains the default value as specified in @pspec.
3394 * Returns: whether @value contains the canonical default for this @pspec
3399 * g_param_value_set_default:
3400 * @pspec: a valid #GParamSpec
3401 * @value: a #GValue of correct type for @pspec
3403 * Sets @value to its default value as specified in @pspec.
3408 * g_param_value_validate:
3409 * @pspec: a valid #GParamSpec
3410 * @value: a #GValue of correct type for @pspec
3412 * Ensures that the contents of @value comply with the specifications
3413 * set out by @pspec. For example, a #GParamSpecInt might require
3414 * that integers stored in @value may not be smaller than -42 and not be
3415 * greater than +42. If @value contains an integer outside of this range,
3416 * it is modified accordingly, so the resulting value will fit into the
3419 * Returns: whether modifying @value was necessary to ensure validity
3424 * g_param_values_cmp:
3425 * @pspec: a valid #GParamSpec
3426 * @value1: a #GValue of correct type for @pspec
3427 * @value2: a #GValue of correct type for @pspec
3429 * Compares @value1 with @value2 according to @pspec, and return -1, 0 or +1,
3430 * if @value1 is found to be less than, equal to or greater than @value2,
3433 * Returns: -1, 0 or +1, for a less than, equal to or greater than result
3438 * g_pointer_type_register_static:
3439 * @name: the name of the new pointer type.
3441 * Creates a new %G_TYPE_POINTER derived type id for a new
3442 * pointer type with name @name.
3444 * Returns: a new %G_TYPE_POINTER derived type id for @name.
3449 * g_signal_accumulator_first_wins:
3450 * @ihint: standard #GSignalAccumulator parameter
3451 * @return_accu: standard #GSignalAccumulator parameter
3452 * @handler_return: standard #GSignalAccumulator parameter
3453 * @dummy: standard #GSignalAccumulator parameter
3455 * A predefined #GSignalAccumulator for signals intended to be used as a
3456 * hook for application code to provide a particular value. Usually
3457 * only one such value is desired and multiple handlers for the same
3458 * signal don't make much sense (except for the case of the default
3459 * handler defined in the class structure, in which case you will
3460 * usually want the signal connection to override the class handler).
3462 * This accumulator will use the return value from the first signal
3463 * handler that is run as the return value for the signal and not run
3464 * any further handlers (ie: the first handler "wins").
3466 * Returns: standard #GSignalAccumulator result
3472 * g_signal_accumulator_true_handled:
3473 * @ihint: standard #GSignalAccumulator parameter
3474 * @return_accu: standard #GSignalAccumulator parameter
3475 * @handler_return: standard #GSignalAccumulator parameter
3476 * @dummy: standard #GSignalAccumulator parameter
3478 * A predefined #GSignalAccumulator for signals that return a
3479 * boolean values. The behavior that this accumulator gives is
3480 * that a return of %TRUE stops the signal emission: no further
3481 * callbacks will be invoked, while a return of %FALSE allows
3482 * the emission to continue. The idea here is that a %TRUE return
3483 * indicates that the callback <emphasis>handled</emphasis> the signal,
3484 * and no further handling is needed.
3487 * Returns: standard #GSignalAccumulator result
3492 * g_signal_add_emission_hook:
3493 * @signal_id: the signal identifier, as returned by g_signal_lookup().
3494 * @detail: the detail on which to call the hook.
3495 * @hook_func: a #GSignalEmissionHook function.
3496 * @hook_data: user data for @hook_func.
3497 * @data_destroy: a #GDestroyNotify for @hook_data.
3499 * Adds an emission hook for a signal, which will get called for any emission
3500 * of that signal, independent of the instance. This is possible only
3501 * for signals which don't have #G_SIGNAL_NO_HOOKS flag set.
3503 * Returns: the hook id, for later use with g_signal_remove_emission_hook().
3508 * g_signal_chain_from_overridden:
3509 * @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.
3510 * @return_value: Location for the return value.
3512 * Calls the original class closure of a signal. This function should only
3513 * be called from an overridden class closure; see
3514 * g_signal_override_class_closure() and
3515 * g_signal_override_class_handler().
3520 * g_signal_chain_from_overridden_handler:
3521 * @instance: the instance the signal is being emitted on.
3522 * @...: 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.
3524 * Calls the original class closure of a signal. This function should
3525 * only be called from an overridden class closure; see
3526 * g_signal_override_class_closure() and
3527 * g_signal_override_class_handler().
3534 * g_signal_connect_closure:
3535 * @instance: the instance to connect to.
3536 * @detailed_signal: a string of the form "signal-name::detail".
3537 * @closure: the closure to connect.
3538 * @after: whether the handler should be called before or after the default handler of the signal.
3540 * Connects a closure to a signal for a particular object.
3542 * Returns: the handler id
3547 * g_signal_connect_closure_by_id:
3548 * @instance: the instance to connect to.
3549 * @signal_id: the id of the signal.
3550 * @detail: the detail.
3551 * @closure: the closure to connect.
3552 * @after: whether the handler should be called before or after the default handler of the signal.
3554 * Connects a closure to a signal for a particular object.
3556 * Returns: the handler id
3561 * g_signal_connect_data:
3562 * @instance: the instance to connect to.
3563 * @detailed_signal: a string of the form "signal-name::detail".
3564 * @c_handler: the #GCallback to connect.
3565 * @data: data to pass to @c_handler calls.
3566 * @destroy_data: a #GClosureNotify for @data.
3567 * @connect_flags: a combination of #GConnectFlags.
3569 * Connects a #GCallback function to a signal for a particular object. Similar
3570 * to g_signal_connect(), but allows to provide a #GClosureNotify for the data
3571 * which will be called when the signal handler is disconnected and no longer
3572 * used. Specify @connect_flags if you need <literal>..._after()</literal> or
3573 * <literal>..._swapped()</literal> variants of this function.
3575 * Returns: the handler id
3580 * g_signal_connect_object: (skip)
3581 * @instance: the instance to connect to.
3582 * @detailed_signal: a string of the form "signal-name::detail".
3583 * @c_handler: the #GCallback to connect.
3584 * @gobject: the object to pass as data to @c_handler.
3585 * @connect_flags: a combination of #GConnectFlags.
3587 * This is similar to g_signal_connect_data(), but uses a closure which
3588 * ensures that the @gobject stays alive during the call to @c_handler
3589 * by temporarily adding a reference count to @gobject.
3591 * When the @gobject is destroyed the signal handler will be automatically
3592 * disconnected. Note that this is not currently threadsafe (ie:
3593 * emitting a signal while @gobject is being destroyed in another thread
3596 * Returns: the handler id.
3602 * @instance: the instance the signal is being emitted on.
3603 * @signal_id: the signal id
3604 * @detail: the detail
3605 * @...: 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.
3609 * Note that g_signal_emit() resets the return value to the default
3610 * if no handlers are connected, in contrast to g_signal_emitv().
3615 * g_signal_emit_by_name:
3616 * @instance: the instance the signal is being emitted on.
3617 * @detailed_signal: a string of the form "signal-name::detail".
3618 * @...: 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.
3622 * Note that g_signal_emit_by_name() resets the return value to the default
3623 * if no handlers are connected, in contrast to g_signal_emitv().
3628 * g_signal_emit_valist:
3629 * @instance: the instance the signal is being emitted on.
3630 * @signal_id: the signal id
3631 * @detail: the detail
3632 * @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.
3636 * Note that g_signal_emit_valist() resets the return value to the default
3637 * if no handlers are connected, in contrast to g_signal_emitv().
3643 * @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.
3644 * @signal_id: the signal id
3645 * @detail: the detail
3646 * @return_value: Location to store the return value of the signal emission.
3650 * Note that g_signal_emitv() doesn't change @return_value if no handlers are
3651 * connected, in contrast to g_signal_emit() and g_signal_emit_valist().
3656 * g_signal_get_invocation_hint:
3657 * @instance: the instance to query
3659 * Returns the invocation hint of the innermost signal emission of instance.
3661 * Returns: (transfer none): the invocation hint of the innermost signal emission.
3666 * g_signal_handler_block:
3667 * @instance: The instance to block the signal handler of.
3668 * @handler_id: Handler id of the handler to be blocked.
3670 * Blocks a handler of an instance so it will not be called during any
3671 * signal emissions unless it is unblocked again. Thus "blocking" a
3672 * signal handler means to temporarily deactive it, a signal handler
3673 * has to be unblocked exactly the same amount of times it has been
3674 * blocked before to become active again.
3676 * The @handler_id has to be a valid signal handler id, connected to a
3677 * signal of @instance.
3682 * g_signal_handler_disconnect:
3683 * @instance: The instance to remove the signal handler from.
3684 * @handler_id: Handler id of the handler to be disconnected.
3686 * Disconnects a handler from an instance so it will not be called during
3687 * any future or currently ongoing emissions of the signal it has been
3688 * connected to. The @handler_id becomes invalid and may be reused.
3690 * The @handler_id has to be a valid signal handler id, connected to a
3691 * signal of @instance.
3696 * g_signal_handler_find:
3697 * @instance: The instance owning the signal handler to be found.
3698 * @mask: Mask indicating which of @signal_id, @detail, @closure, @func and/or @data the handler has to match.
3699 * @signal_id: Signal the handler has to be connected to.
3700 * @detail: Signal detail the handler has to be connected to.
3701 * @closure: (allow-none): The closure the handler will invoke.
3702 * @func: The C closure callback of the handler (useless for non-C closures).
3703 * @data: The closure data of the handler's closure.
3705 * Finds the first signal handler that matches certain selection criteria.
3706 * The criteria mask is passed as an OR-ed combination of #GSignalMatchType
3707 * flags, and the criteria values are passed as arguments.
3708 * The match @mask has to be non-0 for successful matches.
3709 * If no handler was found, 0 is returned.
3711 * Returns: A valid non-0 signal handler id for a successful match.
3716 * g_signal_handler_is_connected:
3717 * @instance: The instance where a signal handler is sought.
3718 * @handler_id: the handler id.
3720 * Returns whether @handler_id is the id of a handler connected to @instance.
3722 * Returns: whether @handler_id identifies a handler connected to @instance.
3727 * g_signal_handler_unblock:
3728 * @instance: The instance to unblock the signal handler of.
3729 * @handler_id: Handler id of the handler to be unblocked.
3731 * Undoes the effect of a previous g_signal_handler_block() call. A
3732 * blocked handler is skipped during signal emissions and will not be
3733 * invoked, unblocking it (for exactly the amount of times it has been
3734 * blocked before) reverts its "blocked" state, so the handler will be
3735 * recognized by the signal system and is called upon future or
3736 * currently ongoing signal emissions (since the order in which
3737 * handlers are called during signal emissions is deterministic,
3738 * whether the unblocked handler in question is called as part of a
3739 * currently ongoing emission depends on how far that emission has
3742 * The @handler_id has to be a valid id of a signal handler that is
3743 * connected to a signal of @instance and is currently blocked.
3748 * g_signal_handlers_block_matched:
3749 * @instance: The instance to block handlers from.
3750 * @mask: Mask indicating which of @signal_id, @detail, @closure, @func and/or @data the handlers have to match.
3751 * @signal_id: Signal the handlers have to be connected to.
3752 * @detail: Signal detail the handlers have to be connected to.
3753 * @closure: (allow-none): The closure the handlers will invoke.
3754 * @func: The C closure callback of the handlers (useless for non-C closures).
3755 * @data: The closure data of the handlers' closures.
3757 * Blocks all handlers on an instance that match a certain selection criteria.
3758 * The criteria mask is passed as an OR-ed combination of #GSignalMatchType
3759 * flags, and the criteria values are passed as arguments.
3760 * Passing at least one of the %G_SIGNAL_MATCH_CLOSURE, %G_SIGNAL_MATCH_FUNC
3761 * or %G_SIGNAL_MATCH_DATA match flags is required for successful matches.
3762 * If no handlers were found, 0 is returned, the number of blocked handlers
3765 * Returns: The number of handlers that matched.
3770 * g_signal_handlers_disconnect_matched:
3771 * @instance: The instance to remove handlers from.
3772 * @mask: Mask indicating which of @signal_id, @detail, @closure, @func and/or @data the handlers have to match.
3773 * @signal_id: Signal the handlers have to be connected to.
3774 * @detail: Signal detail the handlers have to be connected to.
3775 * @closure: (allow-none): The closure the handlers will invoke.
3776 * @func: The C closure callback of the handlers (useless for non-C closures).
3777 * @data: The closure data of the handlers' closures.
3779 * Disconnects all handlers on an instance that match a certain
3780 * selection criteria. The criteria mask is passed as an OR-ed
3781 * combination of #GSignalMatchType flags, and the criteria values are
3782 * passed as arguments. Passing at least one of the
3783 * %G_SIGNAL_MATCH_CLOSURE, %G_SIGNAL_MATCH_FUNC or
3784 * %G_SIGNAL_MATCH_DATA match flags is required for successful
3785 * matches. If no handlers were found, 0 is returned, the number of
3786 * disconnected handlers otherwise.
3788 * Returns: The number of handlers that matched.
3793 * g_signal_handlers_unblock_matched:
3794 * @instance: The instance to unblock handlers from.
3795 * @mask: Mask indicating which of @signal_id, @detail, @closure, @func and/or @data the handlers have to match.
3796 * @signal_id: Signal the handlers have to be connected to.
3797 * @detail: Signal detail the handlers have to be connected to.
3798 * @closure: (allow-none): The closure the handlers will invoke.
3799 * @func: The C closure callback of the handlers (useless for non-C closures).
3800 * @data: The closure data of the handlers' closures.
3802 * Unblocks all handlers on an instance that match a certain selection
3803 * criteria. The criteria mask is passed as an OR-ed combination of
3804 * #GSignalMatchType flags, and the criteria values are passed as arguments.
3805 * Passing at least one of the %G_SIGNAL_MATCH_CLOSURE, %G_SIGNAL_MATCH_FUNC
3806 * or %G_SIGNAL_MATCH_DATA match flags is required for successful matches.
3807 * If no handlers were found, 0 is returned, the number of unblocked handlers
3808 * otherwise. The match criteria should not apply to any handlers that are
3809 * not currently blocked.
3811 * Returns: The number of handlers that matched.
3816 * g_signal_has_handler_pending:
3817 * @instance: the object whose signal handlers are sought.
3818 * @signal_id: the signal id.
3819 * @detail: the detail.
3820 * @may_be_blocked: whether blocked handlers should count as match.
3822 * Returns whether there are any handlers connected to @instance for the
3823 * given signal id and detail.
3825 * One example of when you might use this is when the arguments to the
3826 * signal are difficult to compute. A class implementor may opt to not
3827 * emit the signal if no one is attached anyway, thus saving the cost
3828 * of building the arguments.
3830 * Returns: %TRUE if a handler is connected to the signal, %FALSE otherwise.
3835 * g_signal_list_ids:
3836 * @itype: Instance or interface type.
3837 * @n_ids: Location to store the number of signal ids for @itype.
3839 * Lists the signals by id that a certain instance or interface type
3840 * created. Further information about the signals can be acquired through
3843 * Returns: (array length=n_ids): Newly allocated array of signal IDs.
3849 * @name: the signal's name.
3850 * @itype: the type that the signal operates on.
3852 * Given the name of the signal and the type of object it connects to, gets
3853 * the signal's identifying integer. Emitting the signal by number is
3854 * somewhat faster than using the name each time.
3856 * Also tries the ancestors of the given type.
3858 * See g_signal_new() for details on allowed signal names.
3860 * Returns: the signal's identifying number, or 0 if no signal was found.
3866 * @signal_id: the signal's identifying number.
3868 * Given the signal's identifier, finds its name.
3870 * Two different signals may have the same name, if they have differing types.
3872 * Returns: the signal name, or %NULL if the signal number was invalid.
3878 * @signal_name: the name for the signal
3879 * @itype: the type this signal pertains to. It will also pertain to types which are derived from this type.
3880 * @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.
3881 * @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.
3882 * @accumulator: the accumulator for this signal; may be %NULL.
3883 * @accu_data: user data for the @accumulator.
3884 * @c_marshaller: (allow-none): the function to translate arrays of parameter values to signal emissions into C language callback invocations or %NULL.
3885 * @return_type: the type of return value, or #G_TYPE_NONE for a signal without a return value.
3886 * @n_params: the number of parameter types to follow.
3887 * @...: a list of types, one for each parameter.
3889 * Creates a new signal. (This is usually done in the class initializer.)
3891 * A signal name consists of segments consisting of ASCII letters and
3892 * digits, separated by either the '-' or '_' character. The first
3893 * character of a signal name must be a letter. Names which violate these
3894 * rules lead to undefined behaviour of the GSignal system.
3896 * When registering a signal and looking up a signal, either separator can
3897 * be used, but they cannot be mixed.
3899 * If 0 is used for @class_offset subclasses cannot override the class handler
3900 * in their <code>class_init</code> method by doing
3901 * <code>super_class->signal_handler = my_signal_handler</code>. Instead they
3902 * will have to use g_signal_override_class_handler().
3904 * If c_marshaller is %NULL, g_cclosure_marshal_generic() will be used as
3905 * the marshaller for this signal.
3907 * Returns: the signal id
3912 * g_signal_new_class_handler:
3913 * @signal_name: the name for the signal
3914 * @itype: the type this signal pertains to. It will also pertain to types which are derived from this type.
3915 * @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.
3916 * @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.
3917 * @accumulator: the accumulator for this signal; may be %NULL.
3918 * @accu_data: user data for the @accumulator.
3919 * @c_marshaller: (allow-none): the function to translate arrays of parameter values to signal emissions into C language callback invocations or %NULL.
3920 * @return_type: the type of return value, or #G_TYPE_NONE for a signal without a return value.
3921 * @n_params: the number of parameter types to follow.
3922 * @...: a list of types, one for each parameter.
3924 * Creates a new signal. (This is usually done in the class initializer.)
3926 * This is a variant of g_signal_new() that takes a C callback instead
3927 * off a class offset for the signal's class handler. This function
3928 * doesn't need a function pointer exposed in the class structure of
3929 * an object definition, instead the function pointer is passed
3930 * directly and can be overriden by derived classes with
3931 * g_signal_override_class_closure() or
3932 * g_signal_override_class_handler()and chained to with
3933 * g_signal_chain_from_overridden() or
3934 * g_signal_chain_from_overridden_handler().
3936 * See g_signal_new() for information about signal names.
3938 * If c_marshaller is %NULL @g_cclosure_marshal_generic will be used as
3939 * the marshaller for this signal.
3941 * Returns: the signal id
3947 * g_signal_new_valist:
3948 * @signal_name: the name for the signal
3949 * @itype: the type this signal pertains to. It will also pertain to types which are derived from this type.
3950 * @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.
3951 * @class_closure: The closure to invoke on signal emission; may be %NULL.
3952 * @accumulator: the accumulator for this signal; may be %NULL.
3953 * @accu_data: user data for the @accumulator.
3954 * @c_marshaller: (allow-none): the function to translate arrays of parameter values to signal emissions into C language callback invocations or %NULL.
3955 * @return_type: the type of return value, or #G_TYPE_NONE for a signal without a return value.
3956 * @n_params: the number of parameter types in @args.
3957 * @args: va_list of #GType, one for each parameter.
3959 * Creates a new signal. (This is usually done in the class initializer.)
3961 * See g_signal_new() for details on allowed signal names.
3963 * If c_marshaller is %NULL, g_cclosure_marshal_generic() will be used as
3964 * the marshaller for this signal.
3966 * Returns: the signal id
3972 * @signal_name: the name for the signal
3973 * @itype: the type this signal pertains to. It will also pertain to types which are derived from this type
3974 * @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
3975 * @class_closure: (allow-none): The closure to invoke on signal emission; may be %NULL
3976 * @accumulator: (allow-none): the accumulator for this signal; may be %NULL
3977 * @accu_data: user data for the @accumulator
3978 * @c_marshaller: (allow-none): the function to translate arrays of parameter values to signal emissions into C language callback invocations or %NULL
3979 * @return_type: the type of return value, or #G_TYPE_NONE for a signal without a return value
3980 * @n_params: the length of @param_types
3981 * @param_types: (array length=n_params): an array of types, one for each parameter
3983 * Creates a new signal. (This is usually done in the class initializer.)
3985 * See g_signal_new() for details on allowed signal names.
3987 * If c_marshaller is %NULL @g_cclosure_marshal_generic will be used as
3988 * the marshaller for this signal.
3990 * Returns: the signal id
3995 * g_signal_override_class_closure:
3996 * @signal_id: the signal id
3997 * @instance_type: the instance type on which to override the class closure for the signal.
3998 * @class_closure: the closure.
4000 * Overrides the class closure (i.e. the default handler) for the given signal
4001 * for emissions on instances of @instance_type. @instance_type must be derived
4002 * from the type to which the signal belongs.
4004 * See g_signal_chain_from_overridden() and
4005 * g_signal_chain_from_overridden_handler() for how to chain up to the
4006 * parent class closure from inside the overridden one.
4011 * g_signal_override_class_handler:
4012 * @signal_name: the name for the signal
4013 * @instance_type: the instance type on which to override the class handler for the signal.
4014 * @class_handler: the handler.
4016 * Overrides the class closure (i.e. the default handler) for the
4017 * given signal for emissions on instances of @instance_type with
4018 * callabck @class_handler. @instance_type must be derived from the
4019 * type to which the signal belongs.
4021 * See g_signal_chain_from_overridden() and
4022 * g_signal_chain_from_overridden_handler() for how to chain up to the
4023 * parent class closure from inside the overridden one.
4030 * g_signal_parse_name:
4031 * @detailed_signal: a string of the form "signal-name::detail".
4032 * @itype: The interface/instance type that introduced "signal-name".
4033 * @signal_id_p: (out): Location to store the signal id.
4034 * @detail_p: (out): Location to store the detail quark.
4035 * @force_detail_quark: %TRUE forces creation of a #GQuark for the detail.
4037 * Internal function to parse a signal name into its @signal_id
4038 * and @detail quark.
4040 * Returns: Whether the signal name could successfully be parsed and @signal_id_p and @detail_p contain valid return values.
4046 * @signal_id: The signal id of the signal to query information for.
4047 * @query: (out caller-allocates): A user provided structure that is filled in with constant values upon success.
4049 * Queries the signal system for in-depth information about a
4050 * specific signal. This function will fill in a user-provided
4051 * structure to hold signal-specific information. If an invalid
4052 * signal id is passed in, the @signal_id member of the #GSignalQuery
4053 * is 0. All members filled into the #GSignalQuery structure should
4054 * be considered constant and have to be left untouched.
4059 * g_signal_remove_emission_hook:
4060 * @signal_id: the id of the signal
4061 * @hook_id: the id of the emission hook, as returned by g_signal_add_emission_hook()
4063 * Deletes an emission hook.
4068 * g_signal_stop_emission:
4069 * @instance: the object whose signal handlers you wish to stop.
4070 * @signal_id: the signal identifier, as returned by g_signal_lookup().
4071 * @detail: the detail which the signal was emitted with.
4073 * Stops a signal's current emission.
4075 * This will prevent the default method from running, if the signal was
4076 * %G_SIGNAL_RUN_LAST and you connected normally (i.e. without the "after"
4079 * Prints a warning if used on a signal which isn't being emitted.
4084 * g_signal_stop_emission_by_name:
4085 * @instance: the object whose signal handlers you wish to stop.
4086 * @detailed_signal: a string of the form "signal-name::detail".
4088 * Stops a signal's current emission.
4090 * This is just like g_signal_stop_emission() except it will look up the
4091 * signal id for you.
4096 * g_signal_type_cclosure_new:
4097 * @itype: the #GType identifier of an interface or classed type
4098 * @struct_offset: the offset of the member function of @itype's class structure which is to be invoked by the new closure
4100 * Creates a new closure which invokes the function found at the offset
4101 * @struct_offset in the class structure of the interface or classed type
4102 * identified by @itype.
4104 * Returns: a new #GCClosure
4109 * g_source_set_closure:
4110 * @source: the source
4111 * @closure: a #GClosure
4113 * Set the callback for a source as a #GClosure.
4115 * If the source is not one of the standard GLib types, the @closure_callback
4116 * and @closure_marshal fields of the #GSourceFuncs structure must have been
4117 * filled in with pointers to appropriate functions.
4122 * g_source_set_dummy_callback:
4123 * @source: the source
4125 * Sets a dummy callback for @source. The callback will do nothing, and
4126 * if the source expects a #gboolean return value, it will return %TRUE.
4127 * (If the source expects any other type of return value, it will return
4128 * a 0/%NULL value; whatever g_value_init() initializes a #GValue to for
4131 * If the source is not one of the standard GLib types, the
4132 * @closure_callback and @closure_marshal fields of the #GSourceFuncs
4133 * structure must have been filled in with pointers to appropriate
4139 * g_strdup_value_contents:
4140 * @value: #GValue which contents are to be described.
4142 * Return a newly allocated string, which describes the contents of a
4143 * #GValue. The main purpose of this function is to describe #GValue
4144 * contents for debugging output, the way in which the contents are
4145 * described may change between different GLib versions.
4147 * Returns: Newly allocated string.
4152 * g_type_add_class_cache_func: (skip)
4153 * @cache_data: data to be passed to @cache_func
4154 * @cache_func: a #GTypeClassCacheFunc
4156 * Adds a #GTypeClassCacheFunc to be called before the reference count of a
4157 * class goes from one to zero. This can be used to prevent premature class
4158 * destruction. All installed #GTypeClassCacheFunc functions will be chained
4159 * until one of them returns %TRUE. The functions have to check the class id
4160 * passed in to figure whether they actually want to cache the class of this
4161 * type, since all classes are routed through the same #GTypeClassCacheFunc
4167 * g_type_add_class_private:
4168 * @class_type: GType of an classed type.
4169 * @private_size: size of private structure.
4171 * Registers a private class structure for a classed type;
4172 * when the class is allocated, the private structures for
4173 * the class and all of its parent types are allocated
4174 * sequentially in the same memory block as the public
4175 * structures. This function should be called in the
4176 * type's get_type() function after the type is registered.
4177 * The private structure can be retrieved using the
4178 * G_TYPE_CLASS_GET_PRIVATE() macro.
4185 * g_type_add_interface_check: (skip)
4186 * @check_data: data to pass to @check_func
4187 * @check_func: function to be called after each interface is initialized.
4189 * Adds a function to be called after an interface vtable is
4190 * initialized for any class (i.e. after the @interface_init member of
4191 * #GInterfaceInfo has been called).
4193 * This function is useful when you want to check an invariant that
4194 * depends on the interfaces of a class. For instance, the
4195 * implementation of #GObject uses this facility to check that an
4196 * object implements all of the properties that are defined on its
4204 * g_type_add_interface_dynamic:
4205 * @instance_type: the #GType value of an instantiable type.
4206 * @interface_type: the #GType value of an interface type.
4207 * @plugin: the #GTypePlugin structure to retrieve the #GInterfaceInfo from.
4209 * Adds the dynamic @interface_type to @instantiable_type. The information
4210 * contained in the #GTypePlugin structure pointed to by @plugin
4211 * is used to manage the relationship.
4216 * g_type_add_interface_static:
4217 * @instance_type: #GType value of an instantiable type.
4218 * @interface_type: #GType value of an interface type.
4219 * @info: The #GInterfaceInfo structure for this (@instance_type, @interface_type) combination.
4221 * Adds the static @interface_type to @instantiable_type. The
4222 * information contained in the #GInterfaceInfo structure pointed to by
4223 * @info is used to manage the relationship.
4228 * g_type_check_instance:
4229 * @instance: A valid #GTypeInstance structure.
4231 * Private helper function to aid implementation of the G_TYPE_CHECK_INSTANCE()
4234 * Returns: %TRUE if @instance is valid, %FALSE otherwise.
4240 * @type: The parent type.
4241 * @n_children: (out) (allow-none): Optional #guint pointer to contain the number of child types.
4243 * Return a newly allocated and 0-terminated array of type IDs, listing the
4244 * child types of @type. The return value has to be g_free()ed after use.
4246 * Returns: (array length=n_children) (transfer full): Newly allocated and 0-terminated array of child types.
4251 * g_type_class_add_private:
4252 * @g_class: class structure for an instantiatable type
4253 * @private_size: size of private structure.
4255 * Registers a private structure for an instantiatable type.
4257 * When an object is allocated, the private structures for
4258 * the type and all of its parent types are allocated
4259 * sequentially in the same memory block as the public
4262 * Note that the accumulated size of the private structures of
4263 * a type and all its parent types cannot exceed 64 KiB.
4265 * This function should be called in the type's class_init() function.
4266 * The private structure can be retrieved using the
4267 * G_TYPE_INSTANCE_GET_PRIVATE() macro.
4269 * The following example shows attaching a private structure
4270 * <structname>MyObjectPrivate</structname> to an object
4271 * <structname>MyObject</structname> defined in the standard GObject
4273 * type's class_init() function.
4274 * Note the use of a structure member "priv" to avoid the overhead
4275 * of repeatedly calling MY_OBJECT_GET_PRIVATE().
4278 * typedef struct _MyObject MyObject;
4279 * typedef struct _MyObjectPrivate MyObjectPrivate;
4281 * struct _MyObject {
4284 * MyObjectPrivate *priv;
4287 * struct _MyObjectPrivate {
4292 * my_object_class_init (MyObjectClass *klass)
4294 * g_type_class_add_private (klass, sizeof (MyObjectPrivate));
4298 * my_object_init (MyObject *my_object)
4300 * my_object->priv = G_TYPE_INSTANCE_GET_PRIVATE (my_object,
4306 * my_object_get_some_field (MyObject *my_object)
4308 * MyObjectPrivate *priv;
4310 * g_return_val_if_fail (MY_IS_OBJECT (my_object), 0);
4312 * priv = my_object->priv;
4314 * return priv->some_field;
4323 * g_type_class_peek:
4324 * @type: Type ID of a classed type.
4326 * This function is essentially the same as g_type_class_ref(), except that
4327 * the classes reference count isn't incremented. As a consequence, this function
4328 * may return %NULL if the class of the type passed in does not currently
4329 * exist (hasn't been referenced before).
4331 * Returns: (type GObject.TypeClass) (transfer none): The #GTypeClass structure for the given type ID or %NULL if the class does not currently exist.
4336 * g_type_class_peek_parent:
4337 * @g_class: (type GObject.TypeClass): The #GTypeClass structure to retrieve the parent class for.
4339 * This is a convenience function often needed in class initializers.
4340 * It returns the class structure of the immediate parent type of the
4341 * class passed in. Since derived classes hold a reference count on
4342 * their parent classes as long as they are instantiated, the returned
4343 * class will always exist. This function is essentially equivalent
4347 * g_type_class_peek (g_type_parent (G_TYPE_FROM_CLASS (g_class)));
4350 * Returns: (type GObject.TypeClass) (transfer none): The parent class of @g_class.
4355 * g_type_class_peek_static:
4356 * @type: Type ID of a classed type.
4358 * A more efficient version of g_type_class_peek() which works only for
4362 * Returns: (type GObject.TypeClass) (transfer none): The #GTypeClass structure for the given type ID or %NULL if the class does not currently exist or is dynamically loaded.
4368 * @type: Type ID of a classed type.
4370 * Increments the reference count of the class structure belonging to
4371 * @type. This function will demand-create the class if it doesn't
4374 * Returns: (type GObject.TypeClass) (transfer none): The #GTypeClass structure for the given type ID.
4379 * g_type_class_unref:
4380 * @g_class: (type GObject.TypeClass): The #GTypeClass structure to unreference.
4382 * Decrements the reference count of the class structure being passed in.
4383 * Once the last reference count of a class has been released, classes
4384 * may be finalized by the type system, so further dereferencing of a
4385 * class pointer after g_type_class_unref() are invalid.
4390 * g_type_class_unref_uncached: (skip)
4391 * @g_class: (type GObject.TypeClass): The #GTypeClass structure to unreference.
4393 * A variant of g_type_class_unref() for use in #GTypeClassCacheFunc
4394 * implementations. It unreferences a class without consulting the chain
4395 * of #GTypeClassCacheFunc<!-- -->s, avoiding the recursion which would occur
4401 * g_type_create_instance: (skip)
4402 * @type: An instantiatable type to create an instance for.
4404 * Creates and initializes an instance of @type if @type is valid and
4405 * can be instantiated. The type system only performs basic allocation
4406 * and structure setups for instances: actual instance creation should
4407 * happen through functions supplied by the type's fundamental type
4408 * implementation. So use of g_type_create_instance() is reserved for
4409 * implementators of fundamental types only. E.g. instances of the
4410 * #GObject hierarchy should be created via g_object_new() and
4411 * <emphasis>never</emphasis> directly through
4412 * g_type_create_instance() which doesn't handle things like singleton
4413 * objects or object construction. Note: Do <emphasis>not</emphasis>
4414 * use this function, unless you're implementing a fundamental
4415 * type. Also language bindings should <emphasis>not</emphasis> use
4416 * this function but g_object_new() instead.
4418 * Returns: An allocated and initialized instance, subject to further treatment by the fundamental type implementation.
4423 * g_type_default_interface_peek:
4424 * @g_type: an interface type
4426 * If the interface type @g_type is currently in use, returns its
4427 * default interface vtable.
4430 * Returns: (type GObject.TypeInterface) (transfer none): the default vtable for the interface, or %NULL if the type is not currently in use.
4435 * g_type_default_interface_ref:
4436 * @g_type: an interface type
4438 * Increments the reference count for the interface type @g_type,
4439 * and returns the default interface vtable for the type.
4441 * If the type is not currently in use, then the default vtable
4442 * for the type will be created and initalized by calling
4443 * the base interface init and default vtable init functions for
4444 * the type (the @<structfield>base_init</structfield>
4445 * and <structfield>class_init</structfield> members of #GTypeInfo).
4446 * Calling g_type_default_interface_ref() is useful when you
4447 * want to make sure that signals and properties for an interface
4448 * have been installed.
4451 * Returns: (type GObject.TypeInterface) (transfer none): the default vtable for the interface; call g_type_default_interface_unref() when you are done using the interface.
4456 * g_type_default_interface_unref:
4457 * @g_iface: (type GObject.TypeInterface): the default vtable structure for a interface, as returned by g_type_default_interface_ref()
4459 * Decrements the reference count for the type corresponding to the
4460 * interface default vtable @g_iface. If the type is dynamic, then
4461 * when no one is using the interface and all references have
4462 * been released, the finalize function for the interface's default
4463 * vtable (the <structfield>class_finalize</structfield> member of
4464 * #GTypeInfo) will be called.
4472 * @type: A #GType value.
4474 * Returns the length of the ancestry of the passed in type. This
4475 * includes the type itself, so that e.g. a fundamental type has depth 1.
4477 * Returns: The depth of @type.
4485 * Ensures that the indicated @type has been registered with the
4486 * type system, and its _class_init() method has been run.
4488 * In theory, simply calling the type's _get_type() method (or using
4489 * the corresponding macro) is supposed take care of this. However,
4490 * _get_type() methods are often marked %G_GNUC_CONST for performance
4491 * reasons, even though this is technically incorrect (since
4492 * %G_GNUC_CONST requires that the function not have side effects,
4493 * which _get_type() methods do on the first call). As a result, if
4494 * you write a bare call to a _get_type() macro, it may get optimized
4495 * out by the compiler. Using g_type_ensure() guarantees that the
4496 * type's _get_type() method is called.
4503 * g_type_free_instance:
4504 * @instance: an instance of a type.
4506 * Frees an instance of a type, returning it to the instance pool for
4507 * the type, if there is one.
4509 * Like g_type_create_instance(), this function is reserved for
4510 * implementors of fundamental types.
4516 * @name: Type name to lookup.
4518 * Lookup the type ID from a given type name, returning 0 if no type
4519 * has been registered under this name (this is the preferred method
4520 * to find out by name whether a specific type has been registered
4523 * Returns: Corresponding type ID or 0.
4528 * g_type_fundamental:
4529 * @type_id: valid type ID
4531 * Internal function, used to extract the fundamental type ID portion.
4532 * use G_TYPE_FUNDAMENTAL() instead.
4534 * Returns: fundamental type ID
4539 * g_type_fundamental_next:
4541 * Returns the next free fundamental type id which can be used to
4542 * register a new fundamental type with g_type_register_fundamental().
4543 * The returned type ID represents the highest currently registered
4544 * fundamental type identifier.
4546 * Returns: The nextmost fundamental type ID to be registered, or 0 if the type system ran out of fundamental type IDs.
4551 * g_type_get_plugin:
4552 * @type: The #GType to retrieve the plugin for.
4554 * Returns the #GTypePlugin structure for @type or
4555 * %NULL if @type does not have a #GTypePlugin structure.
4557 * Returns: (transfer none): The corresponding plugin if @type is a dynamic type, %NULL otherwise.
4564 * @quark: a #GQuark id to identify the data
4566 * Obtains data which has previously been attached to @type
4567 * with g_type_set_qdata().
4569 * Note that this does not take subtyping into account; data
4570 * attached to one type with g_type_set_qdata() cannot
4571 * be retrieved from a subtype using g_type_get_qdata().
4573 * Returns: (transfer none): the data, or %NULL if no data was found
4578 * g_type_get_type_registration_serial:
4580 * Returns an opaque serial number that represents the state of the set of registered
4581 * types. Any time a type is registred this serial changes, which means you can
4582 * cache information based on type lookups (such as g_type_from_name) and know if
4583 * the cache is still valid at a later time by comparing the current serial with
4584 * the one at the type lookup.
4587 * Returns: An unsigned int, representing the state of type registrations.
4594 * This function used to initialise the type system. Since GLib 2.36,
4595 * the type system is initialised automatically and this function does
4598 * Deprecated: 2.36: the type system is now initialised automatically
4603 * g_type_init_with_debug_flags:
4604 * @debug_flags: Bitwise combination of #GTypeDebugFlags values for debugging purposes.
4606 * This function used to initialise the type system with debugging
4607 * flags. Since GLib 2.36, the type system is initialised automatically
4608 * and this function does nothing.
4610 * If you need to enable debugging features, use the GOBJECT_DEBUG
4611 * environment variable.
4613 * Deprecated: 2.36: the type system is now initialised automatically
4618 * g_type_interface_add_prerequisite:
4619 * @interface_type: #GType value of an interface type.
4620 * @prerequisite_type: #GType value of an interface or instantiatable type.
4622 * Adds @prerequisite_type to the list of prerequisites of @interface_type.
4623 * This means that any type implementing @interface_type must also implement
4624 * @prerequisite_type. Prerequisites can be thought of as an alternative to
4625 * interface derivation (which GType doesn't support). An interface can have
4626 * at most one instantiatable prerequisite type.
4631 * g_type_interface_get_plugin:
4632 * @instance_type: the #GType value of an instantiatable type.
4633 * @interface_type: the #GType value of an interface type.
4635 * Returns the #GTypePlugin structure for the dynamic interface
4636 * @interface_type which has been added to @instance_type, or %NULL if
4637 * @interface_type has not been added to @instance_type or does not
4638 * have a #GTypePlugin structure. See g_type_add_interface_dynamic().
4640 * Returns: (transfer none): the #GTypePlugin for the dynamic interface @interface_type of @instance_type.
4645 * g_type_interface_peek:
4646 * @instance_class: (type GObject.TypeClass): A #GTypeClass structure.
4647 * @iface_type: An interface ID which this class conforms to.
4649 * Returns the #GTypeInterface structure of an interface to which the
4650 * passed in class conforms.
4652 * Returns: (type GObject.TypeInterface) (transfer none): The GTypeInterface structure of iface_type if implemented by @instance_class, %NULL otherwise
4657 * g_type_interface_peek_parent:
4658 * @g_iface: (type GObject.TypeInterface): A #GTypeInterface structure.
4660 * Returns the corresponding #GTypeInterface structure of the parent type
4661 * of the instance type to which @g_iface belongs. This is useful when
4662 * deriving the implementation of an interface from the parent type and
4663 * then possibly overriding some methods.
4665 * Returns: (transfer none) (type GObject.TypeInterface): The corresponding #GTypeInterface structure of the parent type of the instance type to which @g_iface belongs, or %NULL if the parent type doesn't conform to the interface.
4670 * g_type_interface_prerequisites:
4671 * @interface_type: an interface type
4672 * @n_prerequisites: (out) (allow-none): location to return the number of prerequisites, or %NULL
4674 * Returns the prerequisites of an interfaces type.
4677 * Returns: (array length=n_prerequisites) (transfer full): a newly-allocated zero-terminated array of #GType containing the prerequisites of @interface_type
4682 * g_type_interfaces:
4683 * @type: The type to list interface types for.
4684 * @n_interfaces: (out) (allow-none): Optional #guint pointer to contain the number of interface types.
4686 * Return a newly allocated and 0-terminated array of type IDs, listing the
4687 * interface types that @type conforms to. The return value has to be
4688 * g_free()ed after use.
4690 * Returns: (array length=n_interfaces) (transfer full): Newly allocated and 0-terminated array of interface types.
4696 * @type: Type to check anchestry for.
4697 * @is_a_type: Possible anchestor of @type or interface @type could conform to.
4699 * If @is_a_type is a derivable type, check whether @type is a
4700 * descendant of @is_a_type. If @is_a_type is an interface, check
4701 * whether @type conforms to it.
4703 * Returns: %TRUE if @type is_a @is_a_type holds true.
4708 * g_type_module_add_interface:
4709 * @module: a #GTypeModule
4710 * @instance_type: type to which to add the interface.
4711 * @interface_type: interface type to add
4712 * @interface_info: type information structure
4714 * Registers an additional interface for a type, whose interface lives
4715 * in the given type plugin. If the interface was already registered
4716 * for the type in this plugin, nothing will be done.
4718 * As long as any instances of the type exist, the type plugin will
4724 * g_type_module_register_enum:
4725 * @module: a #GTypeModule
4726 * @name: name for the type
4727 * @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.
4729 * Looks up or registers an enumeration that is implemented with a particular
4730 * type plugin. If a type with name @type_name was previously registered,
4731 * the #GType identifier for the type is returned, otherwise the type
4732 * is newly registered, and the resulting #GType identifier returned.
4734 * As long as any instances of the type exist, the type plugin will
4738 * Returns: the new or existing type ID
4743 * g_type_module_register_flags:
4744 * @module: a #GTypeModule
4745 * @name: name for the type
4746 * @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.
4748 * Looks up or registers a flags type that is implemented with a particular
4749 * type plugin. If a type with name @type_name was previously registered,
4750 * the #GType identifier for the type is returned, otherwise the type
4751 * is newly registered, and the resulting #GType identifier returned.
4753 * As long as any instances of the type exist, the type plugin will
4757 * Returns: the new or existing type ID
4762 * g_type_module_register_type:
4763 * @module: a #GTypeModule
4764 * @parent_type: the type for the parent class
4765 * @type_name: name for the type
4766 * @type_info: type information structure
4767 * @flags: flags field providing details about the type
4769 * Looks up or registers a type that is implemented with a particular
4770 * type plugin. If a type with name @type_name was previously registered,
4771 * the #GType identifier for the type is returned, otherwise the type
4772 * is newly registered, and the resulting #GType identifier returned.
4774 * When reregistering a type (typically because a module is unloaded
4775 * then reloaded, and reinitialized), @module and @parent_type must
4776 * be the same as they were previously.
4778 * As long as any instances of the type exist, the type plugin will
4781 * Returns: the new or existing type ID
4786 * g_type_module_set_name:
4787 * @module: a #GTypeModule.
4788 * @name: a human-readable name to use in error messages.
4790 * Sets the name for a #GTypeModule
4795 * g_type_module_unuse:
4796 * @module: a #GTypeModule
4798 * Decreases the use count of a #GTypeModule by one. If the
4799 * result is zero, the module will be unloaded. (However, the
4800 * #GTypeModule will not be freed, and types associated with the
4801 * #GTypeModule are not unregistered. Once a #GTypeModule is
4802 * initialized, it must exist forever.)
4807 * g_type_module_use:
4808 * @module: a #GTypeModule
4810 * Increases the use count of a #GTypeModule by one. If the
4811 * use count was zero before, the plugin will be loaded.
4812 * If loading the plugin fails, the use count is reset to
4815 * Returns: %FALSE if the plugin needed to be loaded and loading the plugin failed.
4821 * @type: Type to return name for.
4823 * Get the unique name that is assigned to a type ID. Note that this
4824 * function (like all other GType API) cannot cope with invalid type
4825 * IDs. %G_TYPE_INVALID may be passed to this function, as may be any
4826 * other validly registered type ID, but randomized type IDs should
4827 * not be passed in and will most likely lead to a crash.
4829 * Returns: Static type name or %NULL.
4835 * @leaf_type: Descendant of @root_type and the type to be returned.
4836 * @root_type: Immediate parent of the returned type.
4838 * Given a @leaf_type and a @root_type which is contained in its
4839 * anchestry, return the type that @root_type is the immediate parent
4840 * of. In other words, this function determines the type that is
4841 * derived directly from @root_type which is also a base class of
4842 * @leaf_type. Given a root type and a leaf type, this function can
4843 * be used to determine the types and order in which the leaf type is
4844 * descended from the root type.
4846 * Returns: Immediate child of @root_type and anchestor of @leaf_type.
4852 * @type: The derived type.
4854 * Return the direct parent type of the passed in type. If the passed
4855 * in type has no parent, i.e. is a fundamental type, 0 is returned.
4857 * Returns: The parent type.
4862 * g_type_plugin_complete_interface_info:
4863 * @plugin: the #GTypePlugin
4864 * @instance_type: the #GType of an instantiable type to which the interface is added
4865 * @interface_type: the #GType of the interface whose info is completed
4866 * @info: the #GInterfaceInfo to fill in
4868 * Calls the @complete_interface_info function from the
4869 * #GTypePluginClass of @plugin. There should be no need to use this
4870 * function outside of the GObject type system itself.
4875 * g_type_plugin_complete_type_info:
4876 * @plugin: a #GTypePlugin
4877 * @g_type: the #GType whose info is completed
4878 * @info: the #GTypeInfo struct to fill in
4879 * @value_table: the #GTypeValueTable to fill in
4881 * Calls the @complete_type_info function from the #GTypePluginClass of @plugin.
4882 * There should be no need to use this function outside of the GObject
4883 * type system itself.
4888 * g_type_plugin_unuse:
4889 * @plugin: a #GTypePlugin
4891 * Calls the @unuse_plugin function from the #GTypePluginClass of
4892 * @plugin. There should be no need to use this function outside of
4893 * the GObject type system itself.
4898 * g_type_plugin_use:
4899 * @plugin: a #GTypePlugin
4901 * Calls the @use_plugin function from the #GTypePluginClass of
4902 * @plugin. There should be no need to use this function outside of
4903 * the GObject type system itself.
4909 * @type: Type to return quark of type name for.
4911 * Get the corresponding quark of the type IDs name.
4913 * Returns: The type names quark or 0.
4919 * @type: the #GType value of a static, classed type.
4920 * @query: (out caller-allocates): A user provided structure that is filled in with constant values upon success.
4922 * Queries the type system for information about a specific type.
4923 * This function will fill in a user-provided structure to hold
4924 * type-specific information. If an invalid #GType is passed in, the
4925 * @type member of the #GTypeQuery is 0. All members filled into the
4926 * #GTypeQuery structure should be considered constant and have to be
4932 * g_type_register_dynamic:
4933 * @parent_type: Type from which this type will be derived.
4934 * @type_name: 0-terminated string used as the name of the new type.
4935 * @plugin: The #GTypePlugin structure to retrieve the #GTypeInfo from.
4936 * @flags: Bitwise combination of #GTypeFlags values.
4938 * Registers @type_name as the name of a new dynamic type derived from
4939 * @parent_type. The type system uses the information contained in the
4940 * #GTypePlugin structure pointed to by @plugin to manage the type and its
4941 * instances (if not abstract). The value of @flags determines the nature
4942 * (e.g. abstract or not) of the type.
4944 * Returns: The new type identifier or #G_TYPE_INVALID if registration failed.
4949 * g_type_register_fundamental:
4950 * @type_id: A predefined type identifier.
4951 * @type_name: 0-terminated string used as the name of the new type.
4952 * @info: The #GTypeInfo structure for this type.
4953 * @finfo: The #GTypeFundamentalInfo structure for this type.
4954 * @flags: Bitwise combination of #GTypeFlags values.
4956 * Registers @type_id as the predefined identifier and @type_name as the
4957 * name of a fundamental type. If @type_id is already registered, or a type
4958 * named @type_name is already registered, the behaviour is undefined. The type
4959 * system uses the information contained in the #GTypeInfo structure pointed to
4960 * by @info and the #GTypeFundamentalInfo structure pointed to by @finfo to
4961 * manage the type and its instances. The value of @flags determines additional
4962 * characteristics of the fundamental type.
4964 * Returns: The predefined type identifier.
4969 * g_type_register_static:
4970 * @parent_type: Type from which this type will be derived.
4971 * @type_name: 0-terminated string used as the name of the new type.
4972 * @info: The #GTypeInfo structure for this type.
4973 * @flags: Bitwise combination of #GTypeFlags values.
4975 * Registers @type_name as the name of a new static type derived from
4976 * @parent_type. The type system uses the information contained in the
4977 * #GTypeInfo structure pointed to by @info to manage the type and its
4978 * instances (if not abstract). The value of @flags determines the nature
4979 * (e.g. abstract or not) of the type.
4981 * Returns: The new type identifier.
4986 * g_type_register_static_simple: (skip)
4987 * @parent_type: Type from which this type will be derived.
4988 * @type_name: 0-terminated string used as the name of the new type.
4989 * @class_size: Size of the class structure (see #GTypeInfo)
4990 * @class_init: Location of the class initialization function (see #GTypeInfo)
4991 * @instance_size: Size of the instance structure (see #GTypeInfo)
4992 * @instance_init: Location of the instance initialization function (see #GTypeInfo)
4993 * @flags: Bitwise combination of #GTypeFlags values.
4995 * Registers @type_name as the name of a new static type derived from
4996 * @parent_type. The value of @flags determines the nature (e.g.
4997 * abstract or not) of the type. It works by filling a #GTypeInfo
4998 * struct and calling g_type_register_static().
5001 * Returns: The new type identifier.
5006 * g_type_remove_class_cache_func: (skip)
5007 * @cache_data: data that was given when adding @cache_func
5008 * @cache_func: a #GTypeClassCacheFunc
5010 * Removes a previously installed #GTypeClassCacheFunc. The cache
5011 * maintained by @cache_func has to be empty when calling
5012 * g_type_remove_class_cache_func() to avoid leaks.
5017 * g_type_remove_interface_check: (skip)
5018 * @check_data: callback data passed to g_type_add_interface_check()
5019 * @check_func: callback function passed to g_type_add_interface_check()
5021 * Removes an interface check function added with
5022 * g_type_add_interface_check().
5031 * @quark: a #GQuark id to identify the data
5034 * Attaches arbitrary data to a type.
5039 * g_type_value_table_peek: (skip)
5040 * @type: A #GType value.
5042 * Returns the location of the #GTypeValueTable associated with @type.
5043 * <emphasis>Note that this function should only be used from source code
5044 * that implements or has internal knowledge of the implementation of
5047 * Returns: Location of the #GTypeValueTable associated with @type or %NULL if there is no #GTypeValueTable associated with @type.
5052 * g_value_array_append:
5053 * @value_array: #GValueArray to add an element to
5054 * @value: (allow-none): #GValue to copy into #GValueArray, or %NULL
5056 * Insert a copy of @value as last element of @value_array. If @value is
5057 * %NULL, an uninitialized value is appended.
5059 * Returns: (transfer none): the #GValueArray passed in as @value_array
5060 * Deprecated: 2.32: Use #GArray and g_array_append_val() instead.
5065 * g_value_array_copy:
5066 * @value_array: #GValueArray to copy
5068 * Construct an exact copy of a #GValueArray by duplicating all its
5071 * Returns: (transfer full): Newly allocated copy of #GValueArray
5072 * Deprecated: 2.32: Use #GArray and g_array_ref() instead.
5077 * g_value_array_free:
5078 * @value_array: #GValueArray to free
5080 * Free a #GValueArray including its contents.
5082 * Deprecated: 2.32: Use #GArray and g_array_unref() instead.
5087 * g_value_array_get_nth:
5088 * @value_array: #GValueArray to get a value from
5089 * @index_: index of the value of interest
5091 * Return a pointer to the value at @index_ containd in @value_array.
5093 * Returns: (transfer none): pointer to a value at @index_ in @value_array
5094 * Deprecated: 2.32: Use g_array_index() instead.
5099 * g_value_array_insert:
5100 * @value_array: #GValueArray to add an element to
5101 * @index_: insertion position, must be <= value_array->n_values
5102 * @value: (allow-none): #GValue to copy into #GValueArray, or %NULL
5104 * Insert a copy of @value at specified position into @value_array. If @value
5105 * is %NULL, an uninitialized value is inserted.
5107 * Returns: (transfer none): the #GValueArray passed in as @value_array
5108 * Deprecated: 2.32: Use #GArray and g_array_insert_val() instead.
5113 * g_value_array_new:
5114 * @n_prealloced: number of values to preallocate space for
5116 * Allocate and initialize a new #GValueArray, optionally preserve space
5117 * for @n_prealloced elements. New arrays always contain 0 elements,
5118 * regardless of the value of @n_prealloced.
5120 * Returns: a newly allocated #GValueArray with 0 values
5121 * Deprecated: 2.32: Use #GArray and g_array_sized_new() instead.
5126 * g_value_array_prepend:
5127 * @value_array: #GValueArray to add an element to
5128 * @value: (allow-none): #GValue to copy into #GValueArray, or %NULL
5130 * Insert a copy of @value as first element of @value_array. If @value is
5131 * %NULL, an uninitialized value is prepended.
5133 * Returns: (transfer none): the #GValueArray passed in as @value_array
5134 * Deprecated: 2.32: Use #GArray and g_array_prepend_val() instead.
5139 * g_value_array_remove:
5140 * @value_array: #GValueArray to remove an element from
5141 * @index_: position of value to remove, which must be less than <code>value_array-><link linkend="GValueArray.n-values">n_values</link></code>
5143 * Remove the value at position @index_ from @value_array.
5145 * Returns: (transfer none): the #GValueArray passed in as @value_array
5146 * Deprecated: 2.32: Use #GArray and g_array_remove_index() instead.
5151 * g_value_array_sort:
5152 * @value_array: #GValueArray to sort
5153 * @compare_func: (scope call): function to compare elements
5155 * Sort @value_array using @compare_func to compare the elements according to
5156 * the semantics of #GCompareFunc.
5158 * The current implementation uses Quick-Sort as sorting algorithm.
5160 * Returns: (transfer none): the #GValueArray passed in as @value_array
5161 * Deprecated: 2.32: Use #GArray and g_array_sort().
5166 * g_value_array_sort_with_data:
5167 * @value_array: #GValueArray to sort
5168 * @compare_func: (scope call): function to compare elements
5169 * @user_data: (closure): extra data argument provided for @compare_func
5171 * Sort @value_array using @compare_func to compare the elements according
5172 * to the semantics of #GCompareDataFunc.
5174 * The current implementation uses Quick-Sort as sorting algorithm.
5176 * Rename to: g_value_array_sort
5177 * Returns: (transfer none): the #GValueArray passed in as @value_array
5178 * Deprecated: 2.32: Use #GArray and g_array_sort_with_data().
5184 * @src_value: An initialized #GValue structure.
5185 * @dest_value: An initialized #GValue structure of the same type as @src_value.
5187 * Copies the value of @src_value into @dest_value.
5192 * g_value_dup_boxed: (skip)
5193 * @value: a valid #GValue of %G_TYPE_BOXED derived type
5195 * Get the contents of a %G_TYPE_BOXED derived #GValue. Upon getting,
5196 * the boxed value is duplicated and needs to be later freed with
5197 * g_boxed_free(), e.g. like: g_boxed_free (G_VALUE_TYPE (@value),
5200 * Returns: boxed contents of @value
5205 * g_value_dup_object:
5206 * @value: a valid #GValue whose type is derived from %G_TYPE_OBJECT
5208 * Get the contents of a %G_TYPE_OBJECT derived #GValue, increasing
5209 * its reference count. If the contents of the #GValue are %NULL, then
5210 * %NULL will be returned.
5212 * Returns: (type GObject.Object) (transfer full): object content of @value, should be unreferenced when no longer needed.
5217 * g_value_dup_param: (skip)
5218 * @value: a valid #GValue whose type is derived from %G_TYPE_PARAM
5220 * Get the contents of a %G_TYPE_PARAM #GValue, increasing its
5223 * Returns: #GParamSpec content of @value, should be unreferenced when no longer needed.
5228 * g_value_dup_string:
5229 * @value: a valid #GValue of type %G_TYPE_STRING
5231 * Get a copy the contents of a %G_TYPE_STRING #GValue.
5233 * Returns: a newly allocated copy of the string content of @value
5238 * g_value_dup_variant:
5239 * @value: a valid #GValue of type %G_TYPE_VARIANT
5241 * Get the contents of a variant #GValue, increasing its refcount.
5243 * Returns: variant contents of @value, should be unrefed using g_variant_unref() when no longer needed
5249 * g_value_fits_pointer:
5250 * @value: An initialized #GValue structure.
5252 * Determines if @value will fit inside the size of a pointer value.
5253 * This is an internal function introduced mainly for C marshallers.
5255 * Returns: %TRUE if @value will fit inside a pointer value.
5260 * g_value_get_boolean:
5261 * @value: a valid #GValue of type %G_TYPE_BOOLEAN
5263 * Get the contents of a %G_TYPE_BOOLEAN #GValue.
5265 * Returns: boolean contents of @value
5270 * g_value_get_boxed:
5271 * @value: a valid #GValue of %G_TYPE_BOXED derived type
5273 * Get the contents of a %G_TYPE_BOXED derived #GValue.
5275 * Returns: (transfer none): boxed contents of @value
5281 * @value: a valid #GValue of type %G_TYPE_CHAR
5283 * Do not use this function; it is broken on platforms where the %char
5284 * type is unsigned, such as ARM and PowerPC. See g_value_get_schar().
5286 * Get the contents of a %G_TYPE_CHAR #GValue.
5288 * Returns: character contents of @value
5289 * Deprecated: 2.32: This function's return type is broken, see g_value_get_schar()
5294 * g_value_get_double:
5295 * @value: a valid #GValue of type %G_TYPE_DOUBLE
5297 * Get the contents of a %G_TYPE_DOUBLE #GValue.
5299 * Returns: double contents of @value
5305 * @value: a valid #GValue whose type is derived from %G_TYPE_ENUM
5307 * Get the contents of a %G_TYPE_ENUM #GValue.
5309 * Returns: enum contents of @value
5314 * g_value_get_flags:
5315 * @value: a valid #GValue whose type is derived from %G_TYPE_FLAGS
5317 * Get the contents of a %G_TYPE_FLAGS #GValue.
5319 * Returns: flags contents of @value
5324 * g_value_get_float:
5325 * @value: a valid #GValue of type %G_TYPE_FLOAT
5327 * Get the contents of a %G_TYPE_FLOAT #GValue.
5329 * Returns: float contents of @value
5334 * g_value_get_gtype:
5335 * @value: a valid #GValue of type %G_TYPE_GTYPE
5337 * Get the contents of a %G_TYPE_GTYPE #GValue.
5340 * Returns: the #GType stored in @value
5346 * @value: a valid #GValue of type %G_TYPE_INT
5348 * Get the contents of a %G_TYPE_INT #GValue.
5350 * Returns: integer contents of @value
5355 * g_value_get_int64:
5356 * @value: a valid #GValue of type %G_TYPE_INT64
5358 * Get the contents of a %G_TYPE_INT64 #GValue.
5360 * Returns: 64bit integer contents of @value
5366 * @value: a valid #GValue of type %G_TYPE_LONG
5368 * Get the contents of a %G_TYPE_LONG #GValue.
5370 * Returns: long integer contents of @value
5375 * g_value_get_object:
5376 * @value: a valid #GValue of %G_TYPE_OBJECT derived type
5378 * Get the contents of a %G_TYPE_OBJECT derived #GValue.
5380 * Returns: (type GObject.Object) (transfer none): object contents of @value
5385 * g_value_get_param:
5386 * @value: a valid #GValue whose type is derived from %G_TYPE_PARAM
5388 * Get the contents of a %G_TYPE_PARAM #GValue.
5390 * Returns: (transfer none): #GParamSpec content of @value
5395 * g_value_get_pointer:
5396 * @value: a valid #GValue of %G_TYPE_POINTER
5398 * Get the contents of a pointer #GValue.
5400 * Returns: (transfer none): pointer contents of @value
5405 * g_value_get_schar:
5406 * @value: a valid #GValue of type %G_TYPE_CHAR
5408 * Get the contents of a %G_TYPE_CHAR #GValue.
5410 * Returns: signed 8 bit integer contents of @value
5416 * g_value_get_string:
5417 * @value: a valid #GValue of type %G_TYPE_STRING
5419 * Get the contents of a %G_TYPE_STRING #GValue.
5421 * Returns: string content of @value
5426 * g_value_get_uchar:
5427 * @value: a valid #GValue of type %G_TYPE_UCHAR
5429 * Get the contents of a %G_TYPE_UCHAR #GValue.
5431 * Returns: unsigned character contents of @value
5437 * @value: a valid #GValue of type %G_TYPE_UINT
5439 * Get the contents of a %G_TYPE_UINT #GValue.
5441 * Returns: unsigned integer contents of @value
5446 * g_value_get_uint64:
5447 * @value: a valid #GValue of type %G_TYPE_UINT64
5449 * Get the contents of a %G_TYPE_UINT64 #GValue.
5451 * Returns: unsigned 64bit integer contents of @value
5456 * g_value_get_ulong:
5457 * @value: a valid #GValue of type %G_TYPE_ULONG
5459 * Get the contents of a %G_TYPE_ULONG #GValue.
5461 * Returns: unsigned long integer contents of @value
5466 * g_value_get_variant:
5467 * @value: a valid #GValue of type %G_TYPE_VARIANT
5469 * Get the contents of a variant #GValue.
5471 * Returns: variant contents of @value
5478 * @value: A zero-filled (uninitialized) #GValue structure.
5479 * @g_type: Type the #GValue should hold values of.
5481 * Initializes @value with the default value of @type.
5483 * Returns: (transfer none): the #GValue structure that has been passed in
5488 * g_value_peek_pointer:
5489 * @value: An initialized #GValue structure.
5491 * Returns: (transfer none): the value contents as pointer. This function asserts that g_value_fits_pointer() returned %TRUE for the passed in value. This is an internal function introduced mainly for C marshallers.
5496 * g_value_register_transform_func: (skip)
5497 * @src_type: Source type.
5498 * @dest_type: Target type.
5499 * @transform_func: a function which transforms values of type @src_type into value of type @dest_type
5501 * Registers a value transformation function for use in g_value_transform().
5502 * A previously registered transformation function for @src_type and @dest_type
5509 * @value: An initialized #GValue structure.
5511 * Clears the current value in @value and resets it to the default value
5512 * (as if the value had just been initialized).
5514 * Returns: the #GValue structure that has been passed in
5519 * g_value_set_boolean:
5520 * @value: a valid #GValue of type %G_TYPE_BOOLEAN
5521 * @v_boolean: boolean value to be set
5523 * Set the contents of a %G_TYPE_BOOLEAN #GValue to @v_boolean.
5528 * g_value_set_boxed:
5529 * @value: a valid #GValue of %G_TYPE_BOXED derived type
5530 * @v_boxed: (allow-none): boxed value to be set
5532 * Set the contents of a %G_TYPE_BOXED derived #GValue to @v_boxed.
5537 * g_value_set_boxed_take_ownership:
5538 * @value: a valid #GValue of %G_TYPE_BOXED derived type
5539 * @v_boxed: (allow-none): duplicated unowned boxed value to be set
5541 * This is an internal function introduced mainly for C marshallers.
5543 * Deprecated: 2.4: Use g_value_take_boxed() instead.
5549 * @value: a valid #GValue of type %G_TYPE_CHAR
5550 * @v_char: character value to be set
5552 * Set the contents of a %G_TYPE_CHAR #GValue to @v_char.
5554 * Deprecated: 2.32: This function's input type is broken, see g_value_set_schar()
5559 * g_value_set_double:
5560 * @value: a valid #GValue of type %G_TYPE_DOUBLE
5561 * @v_double: double value to be set
5563 * Set the contents of a %G_TYPE_DOUBLE #GValue to @v_double.
5569 * @value: a valid #GValue whose type is derived from %G_TYPE_ENUM
5570 * @v_enum: enum value to be set
5572 * Set the contents of a %G_TYPE_ENUM #GValue to @v_enum.
5577 * g_value_set_flags:
5578 * @value: a valid #GValue whose type is derived from %G_TYPE_FLAGS
5579 * @v_flags: flags value to be set
5581 * Set the contents of a %G_TYPE_FLAGS #GValue to @v_flags.
5586 * g_value_set_float:
5587 * @value: a valid #GValue of type %G_TYPE_FLOAT
5588 * @v_float: float value to be set
5590 * Set the contents of a %G_TYPE_FLOAT #GValue to @v_float.
5595 * g_value_set_gtype:
5596 * @value: a valid #GValue of type %G_TYPE_GTYPE
5597 * @v_gtype: #GType to be set
5599 * Set the contents of a %G_TYPE_GTYPE #GValue to @v_gtype.
5606 * g_value_set_instance:
5607 * @value: An initialized #GValue structure.
5608 * @instance: (allow-none): the instance
5610 * Sets @value from an instantiatable type via the
5611 * value_table's collect_value() function.
5617 * @value: a valid #GValue of type %G_TYPE_INT
5618 * @v_int: integer value to be set
5620 * Set the contents of a %G_TYPE_INT #GValue to @v_int.
5625 * g_value_set_int64:
5626 * @value: a valid #GValue of type %G_TYPE_INT64
5627 * @v_int64: 64bit integer value to be set
5629 * Set the contents of a %G_TYPE_INT64 #GValue to @v_int64.
5635 * @value: a valid #GValue of type %G_TYPE_LONG
5636 * @v_long: long integer value to be set
5638 * Set the contents of a %G_TYPE_LONG #GValue to @v_long.
5643 * g_value_set_object:
5644 * @value: a valid #GValue of %G_TYPE_OBJECT derived type
5645 * @v_object: (type GObject.Object) (allow-none): object value to be set
5647 * Set the contents of a %G_TYPE_OBJECT derived #GValue to @v_object.
5649 * g_value_set_object() increases the reference count of @v_object
5650 * (the #GValue holds a reference to @v_object). If you do not wish
5651 * to increase the reference count of the object (i.e. you wish to
5652 * pass your current reference to the #GValue because you no longer
5653 * need it), use g_value_take_object() instead.
5655 * It is important that your #GValue holds a reference to @v_object (either its
5656 * own, or one it has taken) to ensure that the object won't be destroyed while
5657 * the #GValue still exists).
5662 * g_value_set_object_take_ownership: (skip)
5663 * @value: a valid #GValue of %G_TYPE_OBJECT derived type
5664 * @v_object: (allow-none): object value to be set
5666 * This is an internal function introduced mainly for C marshallers.
5668 * Deprecated: 2.4: Use g_value_take_object() instead.
5673 * g_value_set_param:
5674 * @value: a valid #GValue of type %G_TYPE_PARAM
5675 * @param: (allow-none): the #GParamSpec to be set
5677 * Set the contents of a %G_TYPE_PARAM #GValue to @param.
5682 * g_value_set_param_take_ownership: (skip)
5683 * @value: a valid #GValue of type %G_TYPE_PARAM
5684 * @param: (allow-none): the #GParamSpec to be set
5686 * This is an internal function introduced mainly for C marshallers.
5688 * Deprecated: 2.4: Use g_value_take_param() instead.
5693 * g_value_set_pointer:
5694 * @value: a valid #GValue of %G_TYPE_POINTER
5695 * @v_pointer: pointer value to be set
5697 * Set the contents of a pointer #GValue to @v_pointer.
5702 * g_value_set_schar:
5703 * @value: a valid #GValue of type %G_TYPE_CHAR
5704 * @v_char: signed 8 bit integer to be set
5706 * Set the contents of a %G_TYPE_CHAR #GValue to @v_char.
5713 * g_value_set_static_boxed:
5714 * @value: a valid #GValue of %G_TYPE_BOXED derived type
5715 * @v_boxed: (allow-none): static boxed value to be set
5717 * Set the contents of a %G_TYPE_BOXED derived #GValue to @v_boxed.
5718 * The boxed value is assumed to be static, and is thus not duplicated
5719 * when setting the #GValue.
5724 * g_value_set_static_string:
5725 * @value: a valid #GValue of type %G_TYPE_STRING
5726 * @v_string: (allow-none): static string to be set
5728 * Set the contents of a %G_TYPE_STRING #GValue to @v_string.
5729 * The string is assumed to be static, and is thus not duplicated
5730 * when setting the #GValue.
5735 * g_value_set_string:
5736 * @value: a valid #GValue of type %G_TYPE_STRING
5737 * @v_string: (allow-none): caller-owned string to be duplicated for the #GValue
5739 * Set the contents of a %G_TYPE_STRING #GValue to @v_string.
5744 * g_value_set_string_take_ownership:
5745 * @value: a valid #GValue of type %G_TYPE_STRING
5746 * @v_string: (allow-none): duplicated unowned string to be set
5748 * This is an internal function introduced mainly for C marshallers.
5750 * Deprecated: 2.4: Use g_value_take_string() instead.
5755 * g_value_set_uchar:
5756 * @value: a valid #GValue of type %G_TYPE_UCHAR
5757 * @v_uchar: unsigned character value to be set
5759 * Set the contents of a %G_TYPE_UCHAR #GValue to @v_uchar.
5765 * @value: a valid #GValue of type %G_TYPE_UINT
5766 * @v_uint: unsigned integer value to be set
5768 * Set the contents of a %G_TYPE_UINT #GValue to @v_uint.
5773 * g_value_set_uint64:
5774 * @value: a valid #GValue of type %G_TYPE_UINT64
5775 * @v_uint64: unsigned 64bit integer value to be set
5777 * Set the contents of a %G_TYPE_UINT64 #GValue to @v_uint64.
5782 * g_value_set_ulong:
5783 * @value: a valid #GValue of type %G_TYPE_ULONG
5784 * @v_ulong: unsigned long integer value to be set
5786 * Set the contents of a %G_TYPE_ULONG #GValue to @v_ulong.
5791 * g_value_set_variant:
5792 * @value: a valid #GValue of type %G_TYPE_VARIANT
5793 * @variant: (allow-none): a #GVariant, or %NULL
5795 * Set the contents of a variant #GValue to @variant.
5796 * If the variant is floating, it is consumed.
5803 * g_value_take_boxed:
5804 * @value: a valid #GValue of %G_TYPE_BOXED derived type
5805 * @v_boxed: (allow-none): duplicated unowned boxed value to be set
5807 * Sets the contents of a %G_TYPE_BOXED derived #GValue to @v_boxed
5808 * and takes over the ownership of the callers reference to @v_boxed;
5809 * the caller doesn't have to unref it any more.
5816 * g_value_take_object: (skip)
5817 * @value: a valid #GValue of %G_TYPE_OBJECT derived type
5818 * @v_object: (allow-none): object value to be set
5820 * Sets the contents of a %G_TYPE_OBJECT derived #GValue to @v_object
5821 * and takes over the ownership of the callers reference to @v_object;
5822 * the caller doesn't have to unref it any more (i.e. the reference
5823 * count of the object is not increased).
5825 * If you want the #GValue to hold its own reference to @v_object, use
5826 * g_value_set_object() instead.
5833 * g_value_take_param: (skip)
5834 * @value: a valid #GValue of type %G_TYPE_PARAM
5835 * @param: (allow-none): the #GParamSpec to be set
5837 * Sets the contents of a %G_TYPE_PARAM #GValue to @param and takes
5838 * over the ownership of the callers reference to @param; the caller
5839 * doesn't have to unref it any more.
5846 * g_value_take_string:
5847 * @value: a valid #GValue of type %G_TYPE_STRING
5848 * @v_string: (allow-none): string to take ownership of
5850 * Sets the contents of a %G_TYPE_STRING #GValue to @v_string.
5857 * g_value_take_variant:
5858 * @value: a valid #GValue of type %G_TYPE_VARIANT
5859 * @variant: (allow-none): a #GVariant, or %NULL
5861 * Set the contents of a variant #GValue to @variant, and takes over
5862 * the ownership of the caller's reference to @variant;
5863 * the caller doesn't have to unref it any more (i.e. the reference
5864 * count of the variant is not increased).
5866 * If @variant was floating then its floating reference is converted to
5869 * If you want the #GValue to hold its own reference to @variant, use
5870 * g_value_set_variant() instead.
5872 * This is an internal function introduced mainly for C marshallers.
5879 * g_value_transform:
5880 * @src_value: Source value.
5881 * @dest_value: Target value.
5883 * Tries to cast the contents of @src_value into a type appropriate
5884 * to store in @dest_value, e.g. to transform a %G_TYPE_INT value
5885 * into a %G_TYPE_FLOAT value. Performing transformations between
5886 * value types might incur precision lossage. Especially
5887 * transformations into strings might reveal seemingly arbitrary
5888 * results and shouldn't be relied upon for production code (such
5889 * as rcfile value or object property serialization).
5891 * Returns: Whether a transformation rule was found and could be applied. Upon failing transformations, @dest_value is left untouched.
5896 * g_value_type_compatible:
5897 * @src_type: source type to be copied.
5898 * @dest_type: destination type for copying.
5900 * Returns whether a #GValue of type @src_type can be copied into
5901 * a #GValue of type @dest_type.
5903 * Returns: %TRUE if g_value_copy() is possible with @src_type and @dest_type.
5908 * g_value_type_transformable:
5909 * @src_type: Source type.
5910 * @dest_type: Target type.
5912 * Check whether g_value_transform() is able to transform values
5913 * of type @src_type into values of type @dest_type.
5915 * Returns: %TRUE if the transformation is possible, %FALSE otherwise.
5921 * @value: An initialized #GValue structure.
5923 * Clears the current value in @value and "unsets" the type,
5924 * this releases all resources associated with this GValue.
5925 * An unset value is the same as an uninitialized (zero-filled)
5926 * #GValue structure.
5931 * g_variant_get_gtype:
5939 * g_weak_ref_clear: (skip)
5940 * @weak_ref: (inout): location of a weak reference, which may be empty
5942 * Frees resources associated with a non-statically-allocated #GWeakRef.
5943 * After this call, the #GWeakRef is left in an undefined state.
5945 * You should only call this on a #GWeakRef that previously had
5946 * g_weak_ref_init() called on it.
5953 * g_weak_ref_get: (skip)
5954 * @weak_ref: (inout): location of a weak reference to a #GObject
5956 * If @weak_ref is not empty, atomically acquire a strong
5957 * reference to the object it points to, and return that reference.
5959 * This function is needed because of the potential race between taking
5960 * the pointer value and g_object_ref() on it, if the object was losing
5961 * its last reference at the same time in a different thread.
5963 * The caller should release the resulting reference in the usual way,
5964 * by using g_object_unref().
5966 * Returns: (transfer full) (type GObject.Object): the object pointed to by @weak_ref, or %NULL if it was empty
5972 * g_weak_ref_init: (skip)
5973 * @weak_ref: (inout): uninitialized or empty location for a weak reference
5974 * @object: (allow-none): a #GObject or %NULL
5976 * Initialise a non-statically-allocated #GWeakRef.
5978 * This function also calls g_weak_ref_set() with @object on the
5979 * freshly-initialised weak reference.
5981 * This function should always be matched with a call to
5982 * g_weak_ref_clear(). It is not necessary to use this function for a
5983 * #GWeakRef in static storage because it will already be
5984 * properly initialised. Just use g_weak_ref_set() directly.
5991 * g_weak_ref_set: (skip)
5992 * @weak_ref: location for a weak reference
5993 * @object: (allow-none): a #GObject or %NULL
5995 * Change the object to which @weak_ref points, or set it to
5998 * You must own a strong reference on @object while calling this
6006 /************************************************************/
6007 /* THIS FILE IS GENERATED DO NOT EDIT */
6008 /************************************************************/