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);
589 * g_object_unref (object); /* release previously acquired reference */
595 * SECTION:param_value_types
596 * @short_description: Standard Parameter and Value Types
597 * @see_also: #GParamSpec, #GValue, g_object_class_install_property().
598 * @title: Parameters and Values
600 * #GValue provides an abstract container structure which can be
601 * copied, transformed and compared while holding a value of any
602 * (derived) type, which is registered as a #GType with a
603 * #GTypeValueTable in its #GTypeInfo structure. Parameter
604 * specifications for most value types can be created as #GParamSpec
605 * derived instances, to implement e.g. #GObject properties which
606 * operate on #GValue containers.
608 * Parameter names need to start with a letter (a-z or A-Z). Subsequent
609 * characters can be letters, numbers or a '-'.
610 * All other characters are replaced by a '-' during construction.
616 * @short_description: A means for customization of object behaviour and a general purpose notification mechanism
619 * The basic concept of the signal system is that of the
620 * <emphasis>emission</emphasis> of a signal. Signals are introduced
621 * per-type and are identified through strings. Signals introduced
622 * for a parent type are available in derived types as well, so
623 * basically they are a per-type facility that is inherited. A signal
624 * emission mainly involves invocation of a certain set of callbacks
625 * in precisely defined manner. There are two main categories of such
626 * callbacks, per-object
627 * <footnote><para>Although signals can deal with any kind of instantiatable
628 * type, i'm referring to those types as "object types" in the following,
629 * simply because that is the context most users will encounter signals in.
631 * ones and user provided ones.
632 * The per-object callbacks are most often referred to as "object method
633 * handler" or "default (signal) handler", while user provided callbacks are
634 * usually just called "signal handler".
635 * The object method handler is provided at signal creation time (this most
636 * frequently happens at the end of an object class' creation), while user
637 * provided handlers are frequently connected and disconnected to/from a certain
638 * signal on certain object instances.
640 * A signal emission consists of five stages, unless prematurely stopped:
642 * <varlistentry><term></term><listitem><para>
643 * 1 - Invocation of the object method handler for %G_SIGNAL_RUN_FIRST signals
644 * </para></listitem></varlistentry>
645 * <varlistentry><term></term><listitem><para>
646 * 2 - Invocation of normal user-provided signal handlers (<emphasis>after</emphasis> flag %FALSE)
647 * </para></listitem></varlistentry>
648 * <varlistentry><term></term><listitem><para>
649 * 3 - Invocation of the object method handler for %G_SIGNAL_RUN_LAST signals
650 * </para></listitem></varlistentry>
651 * <varlistentry><term></term><listitem><para>
652 * 4 - Invocation of user provided signal handlers, connected with an <emphasis>after</emphasis> flag of %TRUE
653 * </para></listitem></varlistentry>
654 * <varlistentry><term></term><listitem><para>
655 * 5 - Invocation of the object method handler for %G_SIGNAL_RUN_CLEANUP signals
656 * </para></listitem></varlistentry>
658 * The user-provided signal handlers are called in the order they were
660 * All handlers may prematurely stop a signal emission, and any number of
661 * handlers may be connected, disconnected, blocked or unblocked during
663 * There are certain criteria for skipping user handlers in stages 2 and 4
664 * of a signal emission.
665 * First, user handlers may be <emphasis>blocked</emphasis>, blocked handlers are omitted
666 * during callback invocation, to return from the "blocked" state, a
667 * handler has to get unblocked exactly the same amount of times
668 * it has been blocked before.
669 * Second, upon emission of a %G_SIGNAL_DETAILED signal, an additional
670 * "detail" argument passed in to g_signal_emit() has to match the detail
671 * argument of the signal handler currently subject to invocation.
672 * Specification of no detail argument for signal handlers (omission of the
673 * detail part of the signal specification upon connection) serves as a
674 * wildcard and matches any detail argument passed in to emission.
679 * SECTION:value_arrays
680 * @short_description: A container structure to maintain an array of generic values
681 * @see_also: #GValue, #GParamSpecValueArray, g_param_spec_value_array()
682 * @title: Value arrays
684 * The prime purpose of a #GValueArray is for it to be used as an
685 * object property that holds an array of values. A #GValueArray wraps
686 * an array of #GValue elements in order for it to be used as a boxed
687 * type through %G_TYPE_VALUE_ARRAY.
689 * #GValueArray is deprecated in favour of #GArray since GLib 2.32. It
690 * is possible to create a #GArray that behaves like a #GValueArray by
691 * using the size of #GValue as the element size, and by setting
692 * g_value_unset() as the clear function using g_array_set_clear_func(),
693 * for instance, the following code:
696 * GValueArray *array = g_value_array_new (10);
699 * can be replaced by:
702 * GArray *array = g_array_sized_new (FALSE, TRUE, sizeof (GValue), 10);
703 * g_array_set_clear_func (array, (GDestroyNotify) g_value_unset);
709 * g_binding_get_flags:
710 * @binding: a #GBinding
712 * Retrieves the flags passed when constructing the #GBinding
714 * Returns: the #GBindingFlags used by the #GBinding
720 * g_binding_get_source:
721 * @binding: a #GBinding
723 * Retrieves the #GObject instance used as the source of the binding
725 * Returns: (transfer none): the source #GObject
731 * g_binding_get_source_property:
732 * @binding: a #GBinding
734 * Retrieves the name of the property of #GBinding:source used as the source
737 * Returns: the name of the source property
743 * g_binding_get_target:
744 * @binding: a #GBinding
746 * Retrieves the #GObject instance used as the target of the binding
748 * Returns: (transfer none): the target #GObject
754 * g_binding_get_target_property:
755 * @binding: a #GBinding
757 * Retrieves the name of the property of #GBinding:target used as the target
760 * Returns: the name of the target property
767 * @boxed_type: The type of @src_boxed.
768 * @src_boxed: The boxed structure to be copied.
770 * Provide a copy of a boxed structure @src_boxed which is of type @boxed_type.
772 * Returns: The newly created copy of the boxed structure.
778 * @boxed_type: The type of @boxed.
779 * @boxed: The boxed structure to be freed.
781 * Free the boxed structure @boxed which is of type @boxed_type.
786 * g_boxed_type_register_static:
787 * @name: Name of the new boxed type.
788 * @boxed_copy: Boxed structure copy function.
789 * @boxed_free: Boxed structure free function.
791 * This function creates a new %G_TYPE_BOXED derived type id for a new
792 * boxed type with name @name. Boxed type handling functions have to be
793 * provided to copy and free opaque boxed structures of this type.
795 * Returns: New %G_TYPE_BOXED derived type id for @name.
800 * g_cclosure_marshal_BOOLEAN__FLAGS:
801 * @closure: the #GClosure to which the marshaller belongs
802 * @return_value: a #GValue which can store the returned #gboolean
804 * @param_values: a #GValue array holding instance and arg1
805 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
806 * @marshal_data: additional data specified when registering the marshaller
808 * A marshaller for a #GCClosure with a callback of type
809 * <literal>gboolean (*callback) (gpointer instance, gint arg1, gpointer user_data)</literal> where the #gint parameter
810 * denotes a flags type.
815 * g_cclosure_marshal_BOOLEAN__OBJECT_BOXED_BOXED:
816 * @closure: the #GClosure to which the marshaller belongs
817 * @return_value: a #GValue, which can store the returned string
819 * @param_values: a #GValue array holding instance, arg1 and arg2
820 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
821 * @marshal_data: additional data specified when registering the marshaller
823 * A marshaller for a #GCClosure with a callback of type
824 * <literal>gboolean (*callback) (gpointer instance, GBoxed *arg1, GBoxed *arg2, gpointer user_data)</literal>.
831 * g_cclosure_marshal_BOOL__FLAGS:
833 * Another name for g_cclosure_marshal_BOOLEAN__FLAGS().
838 * g_cclosure_marshal_STRING__OBJECT_POINTER:
839 * @closure: the #GClosure to which the marshaller belongs
840 * @return_value: a #GValue, which can store the returned string
842 * @param_values: a #GValue array holding instance, arg1 and arg2
843 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
844 * @marshal_data: additional data specified when registering the marshaller
846 * A marshaller for a #GCClosure with a callback of type
847 * <literal>gchar* (*callback) (gpointer instance, GObject *arg1, gpointer arg2, gpointer user_data)</literal>.
852 * g_cclosure_marshal_VOID__BOOLEAN:
853 * @closure: the #GClosure to which the marshaller belongs
854 * @return_value: ignored
856 * @param_values: a #GValue array holding the instance and the #gboolean parameter
857 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
858 * @marshal_data: additional data specified when registering the marshaller
860 * A marshaller for a #GCClosure with a callback of type
861 * <literal>void (*callback) (gpointer instance, gboolean arg1, gpointer user_data)</literal>.
866 * g_cclosure_marshal_VOID__BOXED:
867 * @closure: the #GClosure to which the marshaller belongs
868 * @return_value: ignored
870 * @param_values: a #GValue array holding the instance and the #GBoxed* parameter
871 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
872 * @marshal_data: additional data specified when registering the marshaller
874 * A marshaller for a #GCClosure with a callback of type
875 * <literal>void (*callback) (gpointer instance, GBoxed *arg1, gpointer user_data)</literal>.
880 * g_cclosure_marshal_VOID__CHAR:
881 * @closure: the #GClosure to which the marshaller belongs
882 * @return_value: ignored
884 * @param_values: a #GValue array holding the instance and the #gchar parameter
885 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
886 * @marshal_data: additional data specified when registering the marshaller
888 * A marshaller for a #GCClosure with a callback of type
889 * <literal>void (*callback) (gpointer instance, gchar arg1, gpointer user_data)</literal>.
894 * g_cclosure_marshal_VOID__DOUBLE:
895 * @closure: the #GClosure to which the marshaller belongs
896 * @return_value: ignored
898 * @param_values: a #GValue array holding the instance and the #gdouble parameter
899 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
900 * @marshal_data: additional data specified when registering the marshaller
902 * A marshaller for a #GCClosure with a callback of type
903 * <literal>void (*callback) (gpointer instance, gdouble arg1, gpointer user_data)</literal>.
908 * g_cclosure_marshal_VOID__ENUM:
909 * @closure: the #GClosure to which the marshaller belongs
910 * @return_value: ignored
912 * @param_values: a #GValue array holding the instance and the enumeration parameter
913 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
914 * @marshal_data: additional data specified when registering the marshaller
916 * A marshaller for a #GCClosure with a callback of type
917 * <literal>void (*callback) (gpointer instance, gint arg1, gpointer user_data)</literal> where the #gint parameter denotes an enumeration type..
922 * g_cclosure_marshal_VOID__FLAGS:
923 * @closure: the #GClosure to which the marshaller belongs
924 * @return_value: ignored
926 * @param_values: a #GValue array holding the instance and the flags parameter
927 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
928 * @marshal_data: additional data specified when registering the marshaller
930 * A marshaller for a #GCClosure with a callback of type
931 * <literal>void (*callback) (gpointer instance, gint arg1, gpointer user_data)</literal> where the #gint parameter denotes a flags type.
936 * g_cclosure_marshal_VOID__FLOAT:
937 * @closure: the #GClosure to which the marshaller belongs
938 * @return_value: ignored
940 * @param_values: a #GValue array holding the instance and the #gfloat parameter
941 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
942 * @marshal_data: additional data specified when registering the marshaller
944 * A marshaller for a #GCClosure with a callback of type
945 * <literal>void (*callback) (gpointer instance, gfloat arg1, gpointer user_data)</literal>.
950 * g_cclosure_marshal_VOID__INT:
951 * @closure: the #GClosure to which the marshaller belongs
952 * @return_value: ignored
954 * @param_values: a #GValue array holding the instance and the #gint parameter
955 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
956 * @marshal_data: additional data specified when registering the marshaller
958 * A marshaller for a #GCClosure with a callback of type
959 * <literal>void (*callback) (gpointer instance, gint arg1, gpointer user_data)</literal>.
964 * g_cclosure_marshal_VOID__LONG:
965 * @closure: the #GClosure to which the marshaller belongs
966 * @return_value: ignored
968 * @param_values: a #GValue array holding the instance and the #glong parameter
969 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
970 * @marshal_data: additional data specified when registering the marshaller
972 * A marshaller for a #GCClosure with a callback of type
973 * <literal>void (*callback) (gpointer instance, glong arg1, gpointer user_data)</literal>.
978 * g_cclosure_marshal_VOID__OBJECT:
979 * @closure: the #GClosure to which the marshaller belongs
980 * @return_value: ignored
982 * @param_values: a #GValue array holding the instance and the #GObject* parameter
983 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
984 * @marshal_data: additional data specified when registering the marshaller
986 * A marshaller for a #GCClosure with a callback of type
987 * <literal>void (*callback) (gpointer instance, GObject *arg1, gpointer user_data)</literal>.
992 * g_cclosure_marshal_VOID__PARAM:
993 * @closure: the #GClosure to which the marshaller belongs
994 * @return_value: ignored
996 * @param_values: a #GValue array holding the instance and the #GParamSpec* parameter
997 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
998 * @marshal_data: additional data specified when registering the marshaller
1000 * A marshaller for a #GCClosure with a callback of type
1001 * <literal>void (*callback) (gpointer instance, GParamSpec *arg1, gpointer user_data)</literal>.
1006 * g_cclosure_marshal_VOID__POINTER:
1007 * @closure: the #GClosure to which the marshaller belongs
1008 * @return_value: ignored
1009 * @n_param_values: 2
1010 * @param_values: a #GValue array holding the instance and the #gpointer parameter
1011 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
1012 * @marshal_data: additional data specified when registering the marshaller
1014 * A marshaller for a #GCClosure with a callback of type
1015 * <literal>void (*callback) (gpointer instance, gpointer arg1, gpointer user_data)</literal>.
1020 * g_cclosure_marshal_VOID__STRING:
1021 * @closure: the #GClosure to which the marshaller belongs
1022 * @return_value: ignored
1023 * @n_param_values: 2
1024 * @param_values: a #GValue array holding the instance and the #gchar* parameter
1025 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
1026 * @marshal_data: additional data specified when registering the marshaller
1028 * A marshaller for a #GCClosure with a callback of type
1029 * <literal>void (*callback) (gpointer instance, const gchar *arg1, gpointer user_data)</literal>.
1034 * g_cclosure_marshal_VOID__UCHAR:
1035 * @closure: the #GClosure to which the marshaller belongs
1036 * @return_value: ignored
1037 * @n_param_values: 2
1038 * @param_values: a #GValue array holding the instance and the #guchar parameter
1039 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
1040 * @marshal_data: additional data specified when registering the marshaller
1042 * A marshaller for a #GCClosure with a callback of type
1043 * <literal>void (*callback) (gpointer instance, guchar arg1, gpointer user_data)</literal>.
1048 * g_cclosure_marshal_VOID__UINT:
1049 * @closure: the #GClosure to which the marshaller belongs
1050 * @return_value: ignored
1051 * @n_param_values: 2
1052 * @param_values: a #GValue array holding the instance and the #guint parameter
1053 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
1054 * @marshal_data: additional data specified when registering the marshaller
1056 * A marshaller for a #GCClosure with a callback of type
1057 * <literal>void (*callback) (gpointer instance, guint arg1, gpointer user_data)</literal>.
1062 * g_cclosure_marshal_VOID__UINT_POINTER:
1063 * @closure: the #GClosure to which the marshaller belongs
1064 * @return_value: ignored
1065 * @n_param_values: 3
1066 * @param_values: a #GValue array holding instance, arg1 and arg2
1067 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
1068 * @marshal_data: additional data specified when registering the marshaller
1070 * A marshaller for a #GCClosure with a callback of type
1071 * <literal>void (*callback) (gpointer instance, guint arg1, gpointer arg2, gpointer user_data)</literal>.
1076 * g_cclosure_marshal_VOID__ULONG:
1077 * @closure: the #GClosure to which the marshaller belongs
1078 * @return_value: ignored
1079 * @n_param_values: 2
1080 * @param_values: a #GValue array holding the instance and the #gulong parameter
1081 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
1082 * @marshal_data: additional data specified when registering the marshaller
1084 * A marshaller for a #GCClosure with a callback of type
1085 * <literal>void (*callback) (gpointer instance, gulong arg1, gpointer user_data)</literal>.
1090 * g_cclosure_marshal_VOID__VARIANT:
1091 * @closure: the #GClosure to which the marshaller belongs
1092 * @return_value: ignored
1093 * @n_param_values: 2
1094 * @param_values: a #GValue array holding the instance and the #GVariant* parameter
1095 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
1096 * @marshal_data: additional data specified when registering the marshaller
1098 * A marshaller for a #GCClosure with a callback of type
1099 * <literal>void (*callback) (gpointer instance, GVariant *arg1, gpointer user_data)</literal>.
1106 * g_cclosure_marshal_VOID__VOID:
1107 * @closure: the #GClosure to which the marshaller belongs
1108 * @return_value: ignored
1109 * @n_param_values: 1
1110 * @param_values: a #GValue array holding only the instance
1111 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
1112 * @marshal_data: additional data specified when registering the marshaller
1114 * A marshaller for a #GCClosure with a callback of type
1115 * <literal>void (*callback) (gpointer instance, gpointer user_data)</literal>.
1120 * g_cclosure_marshal_generic:
1121 * @closure: A #GClosure.
1122 * @return_gvalue: A #GValue to store the return value. May be %NULL if the callback of closure doesn't return a value.
1123 * @n_param_values: The length of the @param_values array.
1124 * @param_values: An array of #GValue<!-- -->s holding the arguments on which to invoke the callback of closure.
1125 * @invocation_hint: The invocation hint given as the last argument to g_closure_invoke().
1126 * @marshal_data: Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
1128 * A generic marshaller function implemented via <ulink
1129 * url="http://sourceware.org/libffi/">libffi</ulink>.
1136 * g_cclosure_new: (skip)
1137 * @callback_func: the function to invoke
1138 * @user_data: user data to pass to @callback_func
1139 * @destroy_data: destroy notify to be called when @user_data is no longer used
1141 * Creates a new closure which invokes @callback_func with @user_data as
1142 * the last parameter.
1144 * Returns: a new #GCClosure
1149 * g_cclosure_new_object: (skip)
1150 * @callback_func: the function to invoke
1151 * @object: a #GObject pointer to pass to @callback_func
1153 * A variant of g_cclosure_new() which uses @object as @user_data and
1154 * calls g_object_watch_closure() on @object and the created
1155 * closure. This function is useful when you have a callback closely
1156 * associated with a #GObject, and want the callback to no longer run
1157 * after the object is is freed.
1159 * Returns: a new #GCClosure
1164 * g_cclosure_new_object_swap: (skip)
1165 * @callback_func: the function to invoke
1166 * @object: a #GObject pointer to pass to @callback_func
1168 * A variant of g_cclosure_new_swap() which uses @object as @user_data
1169 * and calls g_object_watch_closure() on @object and the created
1170 * closure. This function is useful when you have a callback closely
1171 * associated with a #GObject, and want the callback to no longer run
1172 * after the object is is freed.
1174 * Returns: a new #GCClosure
1179 * g_cclosure_new_swap: (skip)
1180 * @callback_func: the function to invoke
1181 * @user_data: user data to pass to @callback_func
1182 * @destroy_data: destroy notify to be called when @user_data is no longer used
1184 * Creates a new closure which invokes @callback_func with @user_data as
1185 * the first parameter.
1187 * Returns: (transfer full): a new #GCClosure
1192 * g_clear_object: (skip)
1193 * @object_ptr: a pointer to a #GObject reference
1195 * Clears a reference to a #GObject.
1197 * @object_ptr must not be %NULL.
1199 * If the reference is %NULL then this function does nothing.
1200 * Otherwise, the reference count of the object is decreased and the
1201 * pointer is set to %NULL.
1203 * This function is threadsafe and modifies the pointer atomically,
1204 * using memory barriers where needed.
1206 * A macro is also included that allows this function to be used without
1214 * g_closure_add_finalize_notifier: (skip)
1215 * @closure: a #GClosure
1216 * @notify_data: data to pass to @notify_func
1217 * @notify_func: the callback function to register
1219 * Registers a finalization notifier which will be called when the
1220 * reference count of @closure goes down to 0. Multiple finalization
1221 * notifiers on a single closure are invoked in unspecified order. If
1222 * a single call to g_closure_unref() results in the closure being
1223 * both invalidated and finalized, then the invalidate notifiers will
1224 * be run before the finalize notifiers.
1229 * g_closure_add_invalidate_notifier: (skip)
1230 * @closure: a #GClosure
1231 * @notify_data: data to pass to @notify_func
1232 * @notify_func: the callback function to register
1234 * Registers an invalidation notifier which will be called when the
1235 * @closure is invalidated with g_closure_invalidate(). Invalidation
1236 * notifiers are invoked before finalization notifiers, in an
1237 * unspecified order.
1242 * g_closure_add_marshal_guards: (skip)
1243 * @closure: a #GClosure
1244 * @pre_marshal_data: data to pass to @pre_marshal_notify
1245 * @pre_marshal_notify: a function to call before the closure callback
1246 * @post_marshal_data: data to pass to @post_marshal_notify
1247 * @post_marshal_notify: a function to call after the closure callback
1249 * Adds a pair of notifiers which get invoked before and after the
1250 * closure callback, respectively. This is typically used to protect
1251 * the extra arguments for the duration of the callback. See
1252 * g_object_watch_closure() for an example of marshal guards.
1257 * g_closure_invalidate:
1258 * @closure: GClosure to invalidate
1260 * Sets a flag on the closure to indicate that its calling
1261 * environment has become invalid, and thus causes any future
1262 * invocations of g_closure_invoke() on this @closure to be
1263 * ignored. Also, invalidation notifiers installed on the closure will
1264 * be called at this point. Note that unless you are holding a
1265 * reference to the closure yourself, the invalidation notifiers may
1266 * unref the closure and cause it to be destroyed, so if you need to
1267 * access the closure after calling g_closure_invalidate(), make sure
1268 * that you've previously called g_closure_ref().
1270 * Note that g_closure_invalidate() will also be called when the
1271 * reference count of a closure drops to zero (unless it has already
1272 * been invalidated before).
1278 * @closure: a #GClosure
1279 * @return_value: (allow-none): a #GValue to store the return value. May be %NULL if the callback of @closure doesn't return a value.
1280 * @n_param_values: the length of the @param_values array
1281 * @param_values: (array length=n_param_values): an array of #GValue<!-- -->s holding the arguments on which to invoke the callback of @closure
1282 * @invocation_hint: (allow-none): a context-dependent invocation hint
1284 * Invokes the closure, i.e. executes the callback represented by the @closure.
1289 * g_closure_new_object:
1290 * @sizeof_closure: the size of the structure to allocate, must be at least <literal>sizeof (GClosure)</literal>
1291 * @object: a #GObject pointer to store in the @data field of the newly allocated #GClosure
1293 * A variant of g_closure_new_simple() which stores @object in the
1294 * @data field of the closure and calls g_object_watch_closure() on
1295 * @object and the created closure. This function is mainly useful
1296 * when implementing new types of closures.
1298 * Returns: (transfer full): a newly allocated #GClosure
1303 * g_closure_new_simple:
1304 * @sizeof_closure: the size of the structure to allocate, must be at least <literal>sizeof (GClosure)</literal>
1305 * @data: data to store in the @data field of the newly allocated #GClosure
1307 * Allocates a struct of the given size and initializes the initial
1308 * part as a #GClosure. This function is mainly useful when
1309 * implementing new types of closures.
1312 * typedef struct _MyClosure MyClosure;
1316 * // extra data goes here
1320 * my_closure_finalize (gpointer notify_data,
1321 * GClosure *closure)
1323 * MyClosure *my_closure = (MyClosure *)closure;
1325 * // free extra data here
1328 * MyClosure *my_closure_new (gpointer data)
1330 * GClosure *closure;
1331 * MyClosure *my_closure;
1333 * closure = g_closure_new_simple (sizeof (MyClosure), data);
1334 * my_closure = (MyClosure *) closure;
1336 * // initialize extra data here
1338 * g_closure_add_finalize_notifier (closure, notify_data,
1339 * my_closure_finalize);
1340 * return my_closure;
1344 * Returns: (transfer full): a newly allocated #GClosure
1350 * @closure: #GClosure to increment the reference count on
1352 * Increments the reference count on a closure to force it staying
1353 * alive while the caller holds a pointer to it.
1355 * Returns: (transfer none): The @closure passed in, for convenience
1360 * g_closure_remove_finalize_notifier: (skip)
1361 * @closure: a #GClosure
1362 * @notify_data: data which was passed to g_closure_add_finalize_notifier() when registering @notify_func
1363 * @notify_func: the callback function to remove
1365 * Removes a finalization notifier.
1367 * Notice that notifiers are automatically removed after they are run.
1372 * g_closure_remove_invalidate_notifier: (skip)
1373 * @closure: a #GClosure
1374 * @notify_data: data which was passed to g_closure_add_invalidate_notifier() when registering @notify_func
1375 * @notify_func: the callback function to remove
1377 * Removes an invalidation notifier.
1379 * Notice that notifiers are automatically removed after they are run.
1384 * g_closure_set_marshal: (skip)
1385 * @closure: a #GClosure
1386 * @marshal: a #GClosureMarshal function
1388 * Sets the marshaller of @closure. The <literal>marshal_data</literal>
1389 * of @marshal provides a way for a meta marshaller to provide additional
1390 * information to the marshaller. (See g_closure_set_meta_marshal().) For
1391 * GObject's C predefined marshallers (the g_cclosure_marshal_*()
1392 * functions), what it provides is a callback function to use instead of
1393 * @closure->callback.
1398 * g_closure_set_meta_marshal: (skip)
1399 * @closure: a #GClosure
1400 * @marshal_data: context-dependent data to pass to @meta_marshal
1401 * @meta_marshal: a #GClosureMarshal function
1403 * Sets the meta marshaller of @closure. A meta marshaller wraps
1404 * @closure->marshal and modifies the way it is called in some
1405 * fashion. The most common use of this facility is for C callbacks.
1406 * The same marshallers (generated by <link
1407 * linkend="glib-genmarshal">glib-genmarshal</link>) are used
1408 * everywhere, but the way that we get the callback function
1409 * differs. In most cases we want to use @closure->callback, but in
1410 * other cases we want to use some different technique to retrieve the
1411 * callback function.
1413 * For example, class closures for signals (see
1414 * g_signal_type_cclosure_new()) retrieve the callback function from a
1415 * fixed offset in the class structure. The meta marshaller retrieves
1416 * the right callback and passes it to the marshaller as the
1417 * @marshal_data argument.
1423 * @closure: #GClosure to decrement the initial reference count on, if it's still being held
1425 * Takes over the initial ownership of a closure. Each closure is
1426 * initially created in a <firstterm>floating</firstterm> state, which
1427 * means that the initial reference count is not owned by any caller.
1428 * g_closure_sink() checks to see if the object is still floating, and
1429 * if so, unsets the floating state and decreases the reference
1430 * count. If the closure is not floating, g_closure_sink() does
1431 * nothing. The reason for the existence of the floating state is to
1432 * prevent cumbersome code sequences like:
1434 * closure = g_cclosure_new (cb_func, cb_data);
1435 * g_source_set_closure (source, closure);
1436 * g_closure_unref (closure); // XXX GObject doesn't really need this
1438 * Because g_source_set_closure() (and similar functions) take ownership of the
1439 * initial reference count, if it is unowned, we instead can write:
1441 * g_source_set_closure (source, g_cclosure_new (cb_func, cb_data));
1444 * Generally, this function is used together with g_closure_ref(). Ane example
1445 * of storing a closure for later notification looks like:
1447 * static GClosure *notify_closure = NULL;
1449 * foo_notify_set_closure (GClosure *closure)
1451 * if (notify_closure)
1452 * g_closure_unref (notify_closure);
1453 * notify_closure = closure;
1454 * if (notify_closure)
1456 * g_closure_ref (notify_closure);
1457 * g_closure_sink (notify_closure);
1462 * Because g_closure_sink() may decrement the reference count of a closure
1463 * (if it hasn't been called on @closure yet) just like g_closure_unref(),
1464 * g_closure_ref() should be called prior to this function.
1470 * @closure: #GClosure to decrement the reference count on
1472 * Decrements the reference count of a closure after it was previously
1473 * incremented by the same caller. If no other callers are using the
1474 * closure, then the closure will be destroyed and freed.
1479 * g_enum_complete_type_info:
1480 * @g_enum_type: the type identifier of the type being completed
1481 * @info: the #GTypeInfo struct to be filled in
1482 * @const_values: An array of #GEnumValue structs for the possible enumeration values. The array is terminated by a struct with all members being 0.
1484 * This function is meant to be called from the <literal>complete_type_info</literal>
1485 * function of a #GTypePlugin implementation, as in the following
1490 * my_enum_complete_type_info (GTypePlugin *plugin,
1493 * GTypeValueTable *value_table)
1495 * static const GEnumValue values[] = {
1496 * { MY_ENUM_FOO, "MY_ENUM_FOO", "foo" },
1497 * { MY_ENUM_BAR, "MY_ENUM_BAR", "bar" },
1501 * g_enum_complete_type_info (type, info, values);
1509 * @enum_class: a #GEnumClass
1510 * @value: the value to look up
1512 * Returns the #GEnumValue for a value.
1514 * Returns: the #GEnumValue for @value, or %NULL if @value is not a member of the enumeration
1519 * g_enum_get_value_by_name:
1520 * @enum_class: a #GEnumClass
1521 * @name: the name to look up
1523 * Looks up a #GEnumValue by name.
1525 * Returns: the #GEnumValue with name @name, or %NULL if the enumeration doesn't have a member with that name
1530 * g_enum_get_value_by_nick:
1531 * @enum_class: a #GEnumClass
1532 * @nick: the nickname to look up
1534 * Looks up a #GEnumValue by nickname.
1536 * Returns: the #GEnumValue with nickname @nick, or %NULL if the enumeration doesn't have a member with that nickname
1541 * g_enum_register_static:
1542 * @name: A nul-terminated string used as the name of the new type.
1543 * @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.
1545 * Registers a new static enumeration type with the name @name.
1547 * It is normally more convenient to let <link
1548 * linkend="glib-mkenums">glib-mkenums</link> generate a
1549 * my_enum_get_type() function from a usual C enumeration definition
1550 * than to write one yourself using g_enum_register_static().
1552 * Returns: The new type identifier.
1557 * g_flags_complete_type_info:
1558 * @g_flags_type: the type identifier of the type being completed
1559 * @info: the #GTypeInfo struct to be filled in
1560 * @const_values: An array of #GFlagsValue structs for the possible enumeration values. The array is terminated by a struct with all members being 0.
1562 * This function is meant to be called from the complete_type_info()
1563 * function of a #GTypePlugin implementation, see the example for
1564 * g_enum_complete_type_info() above.
1569 * g_flags_get_first_value:
1570 * @flags_class: a #GFlagsClass
1573 * Returns the first #GFlagsValue which is set in @value.
1575 * Returns: the first #GFlagsValue which is set in @value, or %NULL if none is set
1580 * g_flags_get_value_by_name:
1581 * @flags_class: a #GFlagsClass
1582 * @name: the name to look up
1584 * Looks up a #GFlagsValue by name.
1586 * Returns: the #GFlagsValue with name @name, or %NULL if there is no flag with that name
1591 * g_flags_get_value_by_nick:
1592 * @flags_class: a #GFlagsClass
1593 * @nick: the nickname to look up
1595 * Looks up a #GFlagsValue by nickname.
1597 * Returns: the #GFlagsValue with nickname @nick, or %NULL if there is no flag with that nickname
1602 * g_flags_register_static:
1603 * @name: A nul-terminated string used as the name of the new type.
1604 * @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.
1606 * Registers a new static flags type with the name @name.
1608 * It is normally more convenient to let <link
1609 * linkend="glib-mkenums">glib-mkenums</link> generate a
1610 * my_flags_get_type() function from a usual C enumeration definition
1611 * than to write one yourself using g_flags_register_static().
1613 * Returns: The new type identifier.
1618 * g_object_add_toggle_ref: (skip)
1619 * @object: a #GObject
1620 * @notify: a function to call when this reference is the last reference to the object, or is no longer the last reference.
1621 * @data: data to pass to @notify
1623 * Increases the reference count of the object by one and sets a
1624 * callback to be called when all other references to the object are
1625 * dropped, or when this is already the last reference to the object
1626 * and another reference is established.
1628 * This functionality is intended for binding @object to a proxy
1629 * object managed by another memory manager. This is done with two
1630 * paired references: the strong reference added by
1631 * g_object_add_toggle_ref() and a reverse reference to the proxy
1632 * object which is either a strong reference or weak reference.
1634 * The setup is that when there are no other references to @object,
1635 * only a weak reference is held in the reverse direction from @object
1636 * to the proxy object, but when there are other references held to
1637 * @object, a strong reference is held. The @notify callback is called
1638 * when the reference from @object to the proxy object should be
1639 * <firstterm>toggled</firstterm> from strong to weak (@is_last_ref
1640 * true) or weak to strong (@is_last_ref false).
1642 * Since a (normal) reference must be held to the object before
1643 * calling g_object_add_toggle_ref(), the initial state of the reverse
1644 * link is always strong.
1646 * Multiple toggle references may be added to the same gobject,
1647 * however if there are multiple toggle references to an object, none
1648 * of them will ever be notified until all but one are removed. For
1649 * this reason, you should only ever use a toggle reference if there
1650 * is important state in the proxy object.
1657 * g_object_add_weak_pointer: (skip)
1658 * @object: The object that should be weak referenced.
1659 * @weak_pointer_location: (inout): The memory address of a pointer.
1661 * Adds a weak reference from weak_pointer to @object to indicate that
1662 * the pointer located at @weak_pointer_location is only valid during
1663 * the lifetime of @object. When the @object is finalized,
1664 * @weak_pointer will be set to %NULL.
1666 * Note that as with g_object_weak_ref(), the weak references created by
1667 * this method are not thread-safe: they cannot safely be used in one
1668 * thread if the object's last g_object_unref() might happen in another
1669 * thread. Use #GWeakRef if thread-safety is required.
1674 * g_object_bind_property:
1675 * @source: (type GObject.Object): the source #GObject
1676 * @source_property: the property on @source to bind
1677 * @target: (type GObject.Object): the target #GObject
1678 * @target_property: the property on @target to bind
1679 * @flags: flags to pass to #GBinding
1681 * Creates a binding between @source_property on @source and @target_property
1682 * on @target. Whenever the @source_property is changed the @target_property is
1683 * updated using the same value. For instance:
1686 * g_object_bind_property (action, "active", widget, "sensitive", 0);
1689 * Will result in the "sensitive" property of the widget #GObject instance to be
1690 * updated with the same value of the "active" property of the action #GObject
1693 * If @flags contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
1694 * if @target_property on @target changes then the @source_property on @source
1695 * will be updated as well.
1697 * The binding will automatically be removed when either the @source or the
1698 * @target instances are finalized. To remove the binding without affecting the
1699 * @source and the @target you can just call g_object_unref() on the returned
1700 * #GBinding instance.
1702 * A #GObject can have multiple bindings.
1704 * 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.
1710 * g_object_bind_property_full:
1711 * @source: (type GObject.Object): the source #GObject
1712 * @source_property: the property on @source to bind
1713 * @target: (type GObject.Object): the target #GObject
1714 * @target_property: the property on @target to bind
1715 * @flags: flags to pass to #GBinding
1716 * @transform_to: (scope notified) (allow-none): the transformation function from the @source to the @target, or %NULL to use the default
1717 * @transform_from: (scope notified) (allow-none): the transformation function from the @target to the @source, or %NULL to use the default
1718 * @user_data: custom data to be passed to the transformation functions, or %NULL
1719 * @notify: function to be called when disposing the binding, to free the resources used by the transformation functions
1721 * Complete version of g_object_bind_property().
1723 * Creates a binding between @source_property on @source and @target_property
1724 * on @target, allowing you to set the transformation functions to be used by
1727 * If @flags contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
1728 * if @target_property on @target changes then the @source_property on @source
1729 * will be updated as well. The @transform_from function is only used in case
1730 * of bidirectional bindings, otherwise it will be ignored
1732 * The binding will automatically be removed when either the @source or the
1733 * @target instances are finalized. To remove the binding without affecting the
1734 * @source and the @target you can just call g_object_unref() on the returned
1735 * #GBinding instance.
1737 * A #GObject can have multiple bindings.
1739 * <note>The same @user_data parameter will be used for both @transform_to
1740 * and @transform_from transformation functions; the @notify function will
1741 * be called once, when the binding is removed. If you need different data
1742 * for each transformation function, please use
1743 * g_object_bind_property_with_closures() instead.</note>
1745 * 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.
1751 * g_object_bind_property_with_closures:
1752 * @source: (type GObject.Object): the source #GObject
1753 * @source_property: the property on @source to bind
1754 * @target: (type GObject.Object): the target #GObject
1755 * @target_property: the property on @target to bind
1756 * @flags: flags to pass to #GBinding
1757 * @transform_to: a #GClosure wrapping the transformation function from the @source to the @target, or %NULL to use the default
1758 * @transform_from: a #GClosure wrapping the transformation function from the @target to the @source, or %NULL to use the default
1760 * Creates a binding between @source_property on @source and @target_property
1761 * on @target, allowing you to set the transformation functions to be used by
1764 * This function is the language bindings friendly version of
1765 * g_object_bind_property_full(), using #GClosure<!-- -->s instead of
1766 * function pointers.
1768 * Rename to: g_object_bind_property_full
1769 * 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.
1775 * g_object_class_find_property:
1776 * @oclass: a #GObjectClass
1777 * @property_name: the name of the property to look up
1779 * Looks up the #GParamSpec for a property of a class.
1781 * Returns: (transfer none): the #GParamSpec for the property, or %NULL if the class doesn't have a property of that name
1786 * g_object_class_install_properties:
1787 * @oclass: a #GObjectClass
1788 * @n_pspecs: the length of the #GParamSpec<!-- -->s array
1789 * @pspecs: (array length=n_pspecs): the #GParamSpec<!-- -->s array defining the new properties
1791 * Installs new properties from an array of #GParamSpec<!-- -->s. This is
1792 * usually done in the class initializer.
1794 * The property id of each property is the index of each #GParamSpec in
1795 * the @pspecs array.
1797 * The property id of 0 is treated specially by #GObject and it should not
1798 * be used to store a #GParamSpec.
1800 * This function should be used if you plan to use a static array of
1801 * #GParamSpec<!-- -->s and g_object_notify_by_pspec(). For instance, this
1802 * class initialization:
1806 * PROP_0, PROP_FOO, PROP_BAR, N_PROPERTIES
1809 * static GParamSpec *obj_properties[N_PROPERTIES] = { NULL, };
1812 * my_object_class_init (MyObjectClass *klass)
1814 * GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
1816 * obj_properties[PROP_FOO] =
1817 * g_param_spec_int ("foo", "Foo", "Foo",
1820 * G_PARAM_READWRITE);
1822 * obj_properties[PROP_BAR] =
1823 * g_param_spec_string ("bar", "Bar", "Bar",
1825 * G_PARAM_READWRITE);
1827 * gobject_class->set_property = my_object_set_property;
1828 * gobject_class->get_property = my_object_get_property;
1829 * g_object_class_install_properties (gobject_class,
1835 * allows calling g_object_notify_by_pspec() to notify of property changes:
1839 * my_object_set_foo (MyObject *self, gint foo)
1841 * if (self->foo != foo)
1844 * g_object_notify_by_pspec (G_OBJECT (self), obj_properties[PROP_FOO]);
1854 * g_object_class_install_property:
1855 * @oclass: a #GObjectClass
1856 * @property_id: the id for the new property
1857 * @pspec: the #GParamSpec for the new property
1859 * Installs a new property. This is usually done in the class initializer.
1861 * Note that it is possible to redefine a property in a derived class,
1862 * by installing a property with the same name. This can be useful at times,
1863 * e.g. to change the range of allowed values or the default value.
1868 * g_object_class_list_properties:
1869 * @oclass: a #GObjectClass
1870 * @n_properties: (out): return location for the length of the returned array
1872 * Get an array of #GParamSpec* for all properties of a class.
1874 * Returns: (array length=n_properties) (transfer container): an array of #GParamSpec* which should be freed after use
1879 * g_object_class_override_property:
1880 * @oclass: a #GObjectClass
1881 * @property_id: the new property ID
1882 * @name: the name of a property registered in a parent class or in an interface of this class.
1884 * Registers @property_id as referring to a property with the
1885 * name @name in a parent class or in an interface implemented
1886 * by @oclass. This allows this class to <firstterm>override</firstterm>
1887 * a property implementation in a parent class or to provide
1888 * the implementation of a property from an interface.
1891 * Internally, overriding is implemented by creating a property of type
1892 * #GParamSpecOverride; generally operations that query the properties of
1893 * the object class, such as g_object_class_find_property() or
1894 * g_object_class_list_properties() will return the overridden
1895 * property. However, in one case, the @construct_properties argument of
1896 * the @constructor virtual function, the #GParamSpecOverride is passed
1897 * instead, so that the @param_id field of the #GParamSpec will be
1898 * correct. For virtually all uses, this makes no difference. If you
1899 * need to get the overridden property, you can call
1900 * g_param_spec_get_redirect_target().
1908 * g_object_connect: (skip)
1909 * @object: a #GObject
1910 * @signal_spec: the spec for the first signal
1911 * @...: #GCallback for the first signal, followed by data for the first signal, followed optionally by more signal spec/callback/data triples, followed by %NULL
1913 * A convenience function to connect multiple signals at once.
1915 * The signal specs expected by this function have the form
1916 * "modifier::signal_name", where modifier can be one of the following:
1919 * <term>signal</term>
1921 * equivalent to <literal>g_signal_connect_data (..., NULL, 0)</literal>
1922 * </para></listitem>
1925 * <term>object_signal</term>
1926 * <term>object-signal</term>
1928 * equivalent to <literal>g_signal_connect_object (..., 0)</literal>
1929 * </para></listitem>
1932 * <term>swapped_signal</term>
1933 * <term>swapped-signal</term>
1935 * equivalent to <literal>g_signal_connect_data (..., NULL, G_CONNECT_SWAPPED)</literal>
1936 * </para></listitem>
1939 * <term>swapped_object_signal</term>
1940 * <term>swapped-object-signal</term>
1942 * equivalent to <literal>g_signal_connect_object (..., G_CONNECT_SWAPPED)</literal>
1943 * </para></listitem>
1946 * <term>signal_after</term>
1947 * <term>signal-after</term>
1949 * equivalent to <literal>g_signal_connect_data (..., NULL, G_CONNECT_AFTER)</literal>
1950 * </para></listitem>
1953 * <term>object_signal_after</term>
1954 * <term>object-signal-after</term>
1956 * equivalent to <literal>g_signal_connect_object (..., G_CONNECT_AFTER)</literal>
1957 * </para></listitem>
1960 * <term>swapped_signal_after</term>
1961 * <term>swapped-signal-after</term>
1963 * equivalent to <literal>g_signal_connect_data (..., NULL, G_CONNECT_SWAPPED | G_CONNECT_AFTER)</literal>
1964 * </para></listitem>
1967 * <term>swapped_object_signal_after</term>
1968 * <term>swapped-object-signal-after</term>
1970 * equivalent to <literal>g_signal_connect_object (..., G_CONNECT_SWAPPED | G_CONNECT_AFTER)</literal>
1971 * </para></listitem>
1976 * menu->toplevel = g_object_connect (g_object_new (GTK_TYPE_WINDOW,
1977 * "type", GTK_WINDOW_POPUP,
1980 * "signal::event", gtk_menu_window_event, menu,
1981 * "signal::size_request", gtk_menu_window_size_request, menu,
1982 * "signal::destroy", gtk_widget_destroyed, &menu->toplevel,
1986 * Returns: (transfer none): @object
1991 * g_object_disconnect: (skip)
1992 * @object: a #GObject
1993 * @signal_spec: the spec for the first signal
1994 * @...: #GCallback for the first signal, followed by data for the first signal, followed optionally by more signal spec/callback/data triples, followed by %NULL
1996 * A convenience function to disconnect multiple signals at once.
1998 * The signal specs expected by this function have the form
1999 * "any_signal", which means to disconnect any signal with matching
2000 * callback and data, or "any_signal::signal_name", which only
2001 * disconnects the signal named "signal_name".
2006 * g_object_dup_data:
2007 * @object: the #GObject to store user data on
2008 * @key: a string, naming the user data pointer
2009 * @dup_func: (allow-none): function to dup the value
2010 * @user_data: (allow-none): passed as user_data to @dup_func
2012 * This is a variant of g_object_get_data() which returns
2013 * a 'duplicate' of the value. @dup_func defines the
2014 * meaning of 'duplicate' in this context, it could e.g.
2015 * take a reference on a ref-counted object.
2017 * If the @key is not set on the object then @dup_func
2018 * will be called with a %NULL argument.
2020 * Note that @dup_func is called while user data of @object
2023 * This function can be useful to avoid races when multiple
2024 * threads are using object data on the same key on the same
2027 * 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.
2033 * g_object_dup_qdata:
2034 * @object: the #GObject to store user data on
2035 * @quark: a #GQuark, naming the user data pointer
2036 * @dup_func: (allow-none): function to dup the value
2037 * @user_data: (allow-none): passed as user_data to @dup_func
2039 * This is a variant of g_object_get_qdata() which returns
2040 * a 'duplicate' of the value. @dup_func defines the
2041 * meaning of 'duplicate' in this context, it could e.g.
2042 * take a reference on a ref-counted object.
2044 * If the @quark is not set on the object then @dup_func
2045 * will be called with a %NULL argument.
2047 * Note that @dup_func is called while user data of @object
2050 * This function can be useful to avoid races when multiple
2051 * threads are using object data on the same key on the same
2054 * 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.
2060 * g_object_force_floating:
2061 * @object: a #GObject
2063 * This function is intended for #GObject implementations to re-enforce a
2064 * <link linkend="floating-ref">floating</link> object reference.
2065 * Doing this is seldom required: all
2066 * #GInitiallyUnowned<!-- -->s are created with a floating reference which
2067 * usually just needs to be sunken by calling g_object_ref_sink().
2074 * g_object_freeze_notify:
2075 * @object: a #GObject
2077 * Increases the freeze count on @object. If the freeze count is
2078 * non-zero, the emission of "notify" signals on @object is
2079 * stopped. The signals are queued until the freeze count is decreased
2080 * to zero. Duplicate notifications are squashed so that at most one
2081 * #GObject::notify signal is emitted for each property modified while the
2084 * This is necessary for accessors that modify multiple properties to prevent
2085 * premature notification while the object is still being modified.
2090 * g_object_get: (skip)
2091 * @object: a #GObject
2092 * @first_property_name: name of the first property to get
2093 * @...: return location for the first property, followed optionally by more name/return location pairs, followed by %NULL
2095 * Gets properties of an object.
2097 * In general, a copy is made of the property contents and the caller
2098 * is responsible for freeing the memory in the appropriate manner for
2099 * the type, for instance by calling g_free() or g_object_unref().
2102 * <title>Using g_object_get(<!-- -->)</title>
2103 * An example of using g_object_get() to get the contents
2104 * of three properties - one of type #G_TYPE_INT,
2105 * one of type #G_TYPE_STRING, and one of type #G_TYPE_OBJECT:
2111 * g_object_get (my_object,
2112 * "int-property", &intval,
2113 * "str-property", &strval,
2114 * "obj-property", &objval,
2117 * // Do something with intval, strval, objval
2120 * g_object_unref (objval);
2127 * g_object_get_data:
2128 * @object: #GObject containing the associations
2129 * @key: name of the key for that association
2131 * Gets a named field from the objects table of associations (see g_object_set_data()).
2133 * Returns: (transfer none): the data if found, or %NULL if no such data exists.
2138 * g_object_get_property:
2139 * @object: a #GObject
2140 * @property_name: the name of the property to get
2141 * @value: return location for the property value
2143 * Gets a property of an object. @value must have been initialized to the
2144 * expected type of the property (or a type to which the expected type can be
2145 * transformed) using g_value_init().
2147 * In general, a copy is made of the property contents and the caller is
2148 * responsible for freeing the memory by calling g_value_unset().
2150 * Note that g_object_get_property() is really intended for language
2151 * bindings, g_object_get() is much more convenient for C programming.
2156 * g_object_get_qdata:
2157 * @object: The GObject to get a stored user data pointer from
2158 * @quark: A #GQuark, naming the user data pointer
2160 * This function gets back user data pointers stored via
2161 * g_object_set_qdata().
2163 * Returns: (transfer none): The user data pointer set, or %NULL
2168 * g_object_get_valist: (skip)
2169 * @object: a #GObject
2170 * @first_property_name: name of the first property to get
2171 * @var_args: return location for the first property, followed optionally by more name/return location pairs, followed by %NULL
2173 * Gets properties of an object.
2175 * In general, a copy is made of the property contents and the caller
2176 * is responsible for freeing the memory in the appropriate manner for
2177 * the type, for instance by calling g_free() or g_object_unref().
2179 * See g_object_get().
2184 * g_object_interface_find_property:
2185 * @g_iface: any interface vtable for the interface, or the default vtable for the interface
2186 * @property_name: name of a property to lookup.
2188 * Find the #GParamSpec with the given name for an
2189 * interface. Generally, the interface vtable passed in as @g_iface
2190 * will be the default vtable from g_type_default_interface_ref(), or,
2191 * if you know the interface has already been loaded,
2192 * g_type_default_interface_peek().
2195 * Returns: (transfer none): the #GParamSpec for the property of the interface with the name @property_name, or %NULL if no such property exists.
2200 * g_object_interface_install_property:
2201 * @g_iface: any interface vtable for the interface, or the default vtable for the interface.
2202 * @pspec: the #GParamSpec for the new property
2204 * Add a property to an interface; this is only useful for interfaces
2205 * that are added to GObject-derived types. Adding a property to an
2206 * interface forces all objects classes with that interface to have a
2207 * compatible property. The compatible property could be a newly
2208 * created #GParamSpec, but normally
2209 * g_object_class_override_property() will be used so that the object
2210 * class only needs to provide an implementation and inherits the
2211 * property description, default value, bounds, and so forth from the
2212 * interface property.
2214 * This function is meant to be called from the interface's default
2215 * vtable initialization function (the @class_init member of
2216 * #GTypeInfo.) It must not be called after after @class_init has
2217 * been called for any object types implementing this interface.
2224 * g_object_interface_list_properties:
2225 * @g_iface: any interface vtable for the interface, or the default vtable for the interface
2226 * @n_properties_p: (out): location to store number of properties returned.
2228 * Lists the properties of an interface.Generally, the interface
2229 * vtable passed in as @g_iface will be the default vtable from
2230 * g_type_default_interface_ref(), or, if you know the interface has
2231 * already been loaded, g_type_default_interface_peek().
2234 * 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.
2239 * g_object_is_floating:
2240 * @object: (type GObject.Object): a #GObject
2242 * Checks whether @object has a <link linkend="floating-ref">floating</link>
2246 * Returns: %TRUE if @object has a floating reference
2251 * g_object_new: (skip)
2252 * @object_type: the type id of the #GObject subtype to instantiate
2253 * @first_property_name: the name of the first property
2254 * @...: the value of the first property, followed optionally by more name/value pairs, followed by %NULL
2256 * Creates a new instance of a #GObject subtype and sets its properties.
2258 * Construction parameters (see #G_PARAM_CONSTRUCT, #G_PARAM_CONSTRUCT_ONLY)
2259 * which are not explicitly specified are set to their default values.
2261 * Returns: (transfer full): a new instance of @object_type
2266 * g_object_new_valist: (skip)
2267 * @object_type: the type id of the #GObject subtype to instantiate
2268 * @first_property_name: the name of the first property
2269 * @var_args: the value of the first property, followed optionally by more name/value pairs, followed by %NULL
2271 * Creates a new instance of a #GObject subtype and sets its properties.
2273 * Construction parameters (see #G_PARAM_CONSTRUCT, #G_PARAM_CONSTRUCT_ONLY)
2274 * which are not explicitly specified are set to their default values.
2276 * Returns: a new instance of @object_type
2282 * @object_type: the type id of the #GObject subtype to instantiate
2283 * @n_parameters: the length of the @parameters array
2284 * @parameters: (array length=n_parameters): an array of #GParameter
2286 * Creates a new instance of a #GObject subtype and sets its properties.
2288 * Construction parameters (see #G_PARAM_CONSTRUCT, #G_PARAM_CONSTRUCT_ONLY)
2289 * which are not explicitly specified are set to their default values.
2291 * Rename to: g_object_new
2292 * Returns: (type GObject.Object) (transfer full): a new instance of @object_type
2298 * @object: a #GObject
2299 * @property_name: the name of a property installed on the class of @object.
2301 * Emits a "notify" signal for the property @property_name on @object.
2303 * When possible, eg. when signaling a property change from within the class
2304 * that registered the property, you should use g_object_notify_by_pspec()
2310 * g_object_notify_by_pspec:
2311 * @object: a #GObject
2312 * @pspec: the #GParamSpec of a property installed on the class of @object.
2314 * Emits a "notify" signal for the property specified by @pspec on @object.
2316 * This function omits the property name lookup, hence it is faster than
2317 * g_object_notify().
2319 * One way to avoid using g_object_notify() from within the
2320 * class that registered the properties, and using g_object_notify_by_pspec()
2321 * instead, is to store the GParamSpec used with
2322 * g_object_class_install_property() inside a static array, e.g.:
2332 * static GParamSpec *properties[PROP_LAST];
2335 * my_object_class_init (MyObjectClass *klass)
2337 * properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
2340 * G_PARAM_READWRITE);
2341 * g_object_class_install_property (gobject_class,
2343 * properties[PROP_FOO]);
2347 * and then notify a change on the "foo" property with:
2350 * g_object_notify_by_pspec (self, properties[PROP_FOO]);
2359 * @object: (type GObject.Object): a #GObject
2361 * Increases the reference count of @object.
2363 * Returns: (type GObject.Object) (transfer none): the same @object
2368 * g_object_ref_sink:
2369 * @object: (type GObject.Object): a #GObject
2371 * Increase the reference count of @object, and possibly remove the
2372 * <link linkend="floating-ref">floating</link> reference, if @object
2373 * has a floating reference.
2375 * In other words, if the object is floating, then this call "assumes
2376 * ownership" of the floating reference, converting it to a normal
2377 * reference by clearing the floating flag while leaving the reference
2378 * count unchanged. If the object is not floating, then this call
2379 * adds a new normal reference increasing the reference count by one.
2382 * Returns: (type GObject.Object) (transfer none): @object
2387 * g_object_remove_toggle_ref: (skip)
2388 * @object: a #GObject
2389 * @notify: a function to call when this reference is the last reference to the object, or is no longer the last reference.
2390 * @data: data to pass to @notify
2392 * Removes a reference added with g_object_add_toggle_ref(). The
2393 * reference count of the object is decreased by one.
2400 * g_object_remove_weak_pointer: (skip)
2401 * @object: The object that is weak referenced.
2402 * @weak_pointer_location: (inout): The memory address of a pointer.
2404 * Removes a weak reference from @object that was previously added
2405 * using g_object_add_weak_pointer(). The @weak_pointer_location has
2406 * to match the one used with g_object_add_weak_pointer().
2411 * g_object_replace_data:
2412 * @object: the #GObject to store user data on
2413 * @key: a string, naming the user data pointer
2414 * @oldval: (allow-none): the old value to compare against
2415 * @newval: (allow-none): the new value
2416 * @destroy: (allow-none): a destroy notify for the new value
2417 * @old_destroy: (allow-none): destroy notify for the existing value
2419 * Compares the user data for the key @key on @object with
2420 * @oldval, and if they are the same, replaces @oldval with
2423 * This is like a typical atomic compare-and-exchange
2424 * operation, for user data on an object.
2426 * If the previous value was replaced then ownership of the
2427 * old value (@oldval) is passed to the caller, including
2428 * the registred destroy notify for it (passed out in @old_destroy).
2429 * Its up to the caller to free this as he wishes, which may
2430 * or may not include using @old_destroy as sometimes replacement
2431 * should not destroy the object in the normal way.
2433 * Return: %TRUE if the existing value for @key was replaced
2434 * by @newval, %FALSE otherwise.
2441 * g_object_replace_qdata:
2442 * @object: the #GObject to store user data on
2443 * @quark: a #GQuark, naming the user data pointer
2444 * @oldval: (allow-none): the old value to compare against
2445 * @newval: (allow-none): the new value
2446 * @destroy: (allow-none): a destroy notify for the new value
2447 * @old_destroy: (allow-none): destroy notify for the existing value
2449 * Compares the user data for the key @quark on @object with
2450 * @oldval, and if they are the same, replaces @oldval with
2453 * This is like a typical atomic compare-and-exchange
2454 * operation, for user data on an object.
2456 * If the previous value was replaced then ownership of the
2457 * old value (@oldval) is passed to the caller, including
2458 * the registred destroy notify for it (passed out in @old_destroy).
2459 * Its up to the caller to free this as he wishes, which may
2460 * or may not include using @old_destroy as sometimes replacement
2461 * should not destroy the object in the normal way.
2463 * Return: %TRUE if the existing value for @quark was replaced
2464 * by @newval, %FALSE otherwise.
2471 * g_object_run_dispose:
2472 * @object: a #GObject
2474 * Releases all references to other objects. This can be used to break
2477 * This functions should only be called from object system implementations.
2482 * g_object_set: (skip)
2483 * @object: a #GObject
2484 * @first_property_name: name of the first property to set
2485 * @...: value for the first property, followed optionally by more name/value pairs, followed by %NULL
2487 * Sets properties on an object.
2492 * g_object_set_data:
2493 * @object: #GObject containing the associations.
2494 * @key: name of the key
2495 * @data: data to associate with that key
2497 * Each object carries around a table of associations from
2498 * strings to pointers. This function lets you set an association.
2500 * If the object already had an association with that name,
2501 * the old association will be destroyed.
2506 * g_object_set_data_full: (skip)
2507 * @object: #GObject containing the associations
2508 * @key: name of the key
2509 * @data: data to associate with that key
2510 * @destroy: function to call when the association is destroyed
2512 * Like g_object_set_data() except it adds notification
2513 * for when the association is destroyed, either by setting it
2514 * to a different value or when the object is destroyed.
2516 * Note that the @destroy callback is not called if @data is %NULL.
2521 * g_object_set_property:
2522 * @object: a #GObject
2523 * @property_name: the name of the property to set
2526 * Sets a property on an object.
2531 * g_object_set_qdata: (skip)
2532 * @object: The GObject to set store a user data pointer
2533 * @quark: A #GQuark, naming the user data pointer
2534 * @data: An opaque user data pointer
2536 * This sets an opaque, named pointer on an object.
2537 * The name is specified through a #GQuark (retrived e.g. via
2538 * g_quark_from_static_string()), and the pointer
2539 * can be gotten back from the @object with g_object_get_qdata()
2540 * until the @object is finalized.
2541 * Setting a previously set user data pointer, overrides (frees)
2542 * the old pointer set, using #NULL as pointer essentially
2543 * removes the data stored.
2548 * g_object_set_qdata_full: (skip)
2549 * @object: The GObject to set store a user data pointer
2550 * @quark: A #GQuark, naming the user data pointer
2551 * @data: An opaque user data pointer
2552 * @destroy: Function to invoke with @data as argument, when @data needs to be freed
2554 * This function works like g_object_set_qdata(), but in addition,
2555 * a void (*destroy) (gpointer) function may be specified which is
2556 * called with @data as argument when the @object is finalized, or
2557 * the data is being overwritten by a call to g_object_set_qdata()
2558 * with the same @quark.
2563 * g_object_set_valist: (skip)
2564 * @object: a #GObject
2565 * @first_property_name: name of the first property to set
2566 * @var_args: value for the first property, followed optionally by more name/value pairs, followed by %NULL
2568 * Sets properties on an object.
2573 * g_object_steal_data:
2574 * @object: #GObject containing the associations
2575 * @key: name of the key
2577 * Remove a specified datum from the object's data associations,
2578 * without invoking the association's destroy handler.
2580 * Returns: (transfer full): the data if found, or %NULL if no such data exists.
2585 * g_object_steal_qdata:
2586 * @object: The GObject to get a stored user data pointer from
2587 * @quark: A #GQuark, naming the user data pointer
2589 * This function gets back user data pointers stored via
2590 * g_object_set_qdata() and removes the @data from object
2591 * without invoking its destroy() function (if any was
2593 * Usually, calling this function is only required to update
2594 * user data pointers with a destroy notifier, for example:
2597 * object_add_to_user_list (GObject *object,
2598 * const gchar *new_string)
2600 * // the quark, naming the object data
2601 * GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
2602 * // retrive the old string list
2603 * GList *list = g_object_steal_qdata (object, quark_string_list);
2605 * // prepend new string
2606 * list = g_list_prepend (list, g_strdup (new_string));
2607 * // this changed 'list', so we need to set it again
2608 * g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
2611 * free_string_list (gpointer data)
2613 * GList *node, *list = data;
2615 * for (node = list; node; node = node->next)
2616 * g_free (node->data);
2617 * g_list_free (list);
2620 * Using g_object_get_qdata() in the above example, instead of
2621 * g_object_steal_qdata() would have left the destroy function set,
2622 * and thus the partial string list would have been freed upon
2623 * g_object_set_qdata_full().
2625 * Returns: (transfer full): The user data pointer set, or %NULL
2630 * g_object_thaw_notify:
2631 * @object: a #GObject
2633 * Reverts the effect of a previous call to
2634 * g_object_freeze_notify(). The freeze count is decreased on @object
2635 * and when it reaches zero, queued "notify" signals are emitted.
2637 * Duplicate notifications for each property are squashed so that at most one
2638 * #GObject::notify signal is emitted for each property.
2640 * It is an error to call this function when the freeze count is zero.
2646 * @object: (type GObject.Object): a #GObject
2648 * Decreases the reference count of @object. When its reference count
2649 * drops to 0, the object is finalized (i.e. its memory is freed).
2654 * g_object_watch_closure:
2655 * @object: GObject restricting lifetime of @closure
2656 * @closure: GClosure to watch
2658 * This function essentially limits the life time of the @closure to
2659 * the life time of the object. That is, when the object is finalized,
2660 * the @closure is invalidated by calling g_closure_invalidate() on
2661 * it, in order to prevent invocations of the closure with a finalized
2662 * (nonexisting) object. Also, g_object_ref() and g_object_unref() are
2663 * added as marshal guards to the @closure, to ensure that an extra
2664 * reference count is held on @object during invocation of the
2665 * @closure. Usually, this function will be called on closures that
2666 * use this @object as closure data.
2671 * g_object_weak_ref: (skip)
2672 * @object: #GObject to reference weakly
2673 * @notify: callback to invoke before the object is freed
2674 * @data: extra data to pass to notify
2676 * Adds a weak reference callback to an object. Weak references are
2677 * used for notification when an object is finalized. They are called
2678 * "weak references" because they allow you to safely hold a pointer
2679 * to an object without calling g_object_ref() (g_object_ref() adds a
2680 * strong reference, that is, forces the object to stay alive).
2682 * Note that the weak references created by this method are not
2683 * thread-safe: they cannot safely be used in one thread if the
2684 * object's last g_object_unref() might happen in another thread.
2685 * Use #GWeakRef if thread-safety is required.
2690 * g_object_weak_unref: (skip)
2691 * @object: #GObject to remove a weak reference from
2692 * @notify: callback to search for
2693 * @data: data to search for
2695 * Removes a weak reference callback to an object.
2700 * g_param_spec_boolean: (skip)
2701 * @name: canonical name of the property specified
2702 * @nick: nick name for the property specified
2703 * @blurb: description of the property specified
2704 * @default_value: default value for the property specified
2705 * @flags: flags for the property specified
2707 * Creates a new #GParamSpecBoolean instance specifying a %G_TYPE_BOOLEAN
2710 * See g_param_spec_internal() for details on property names.
2712 * Returns: a newly created parameter specification
2717 * g_param_spec_boxed: (skip)
2718 * @name: canonical name of the property specified
2719 * @nick: nick name for the property specified
2720 * @blurb: description of the property specified
2721 * @boxed_type: %G_TYPE_BOXED derived type of this property
2722 * @flags: flags for the property specified
2724 * Creates a new #GParamSpecBoxed instance specifying a %G_TYPE_BOXED
2727 * See g_param_spec_internal() for details on property names.
2729 * Returns: a newly created parameter specification
2734 * g_param_spec_char: (skip)
2735 * @name: canonical name of the property specified
2736 * @nick: nick name for the property specified
2737 * @blurb: description of the property specified
2738 * @minimum: minimum value for the property specified
2739 * @maximum: maximum value for the property specified
2740 * @default_value: default value for the property specified
2741 * @flags: flags for the property specified
2743 * Creates a new #GParamSpecChar instance specifying a %G_TYPE_CHAR property.
2745 * Returns: a newly created parameter specification
2750 * g_param_spec_double: (skip)
2751 * @name: canonical name of the property specified
2752 * @nick: nick name for the property specified
2753 * @blurb: description of the property specified
2754 * @minimum: minimum value for the property specified
2755 * @maximum: maximum value for the property specified
2756 * @default_value: default value for the property specified
2757 * @flags: flags for the property specified
2759 * Creates a new #GParamSpecDouble instance specifying a %G_TYPE_DOUBLE
2762 * See g_param_spec_internal() for details on property names.
2764 * Returns: a newly created parameter specification
2769 * g_param_spec_enum: (skip)
2770 * @name: canonical name of the property specified
2771 * @nick: nick name for the property specified
2772 * @blurb: description of the property specified
2773 * @enum_type: a #GType derived from %G_TYPE_ENUM
2774 * @default_value: default value for the property specified
2775 * @flags: flags for the property specified
2777 * Creates a new #GParamSpecEnum instance specifying a %G_TYPE_ENUM
2780 * See g_param_spec_internal() for details on property names.
2782 * Returns: a newly created parameter specification
2787 * g_param_spec_flags: (skip)
2788 * @name: canonical name of the property specified
2789 * @nick: nick name for the property specified
2790 * @blurb: description of the property specified
2791 * @flags_type: a #GType derived from %G_TYPE_FLAGS
2792 * @default_value: default value for the property specified
2793 * @flags: flags for the property specified
2795 * Creates a new #GParamSpecFlags instance specifying a %G_TYPE_FLAGS
2798 * See g_param_spec_internal() for details on property names.
2800 * Returns: a newly created parameter specification
2805 * g_param_spec_float: (skip)
2806 * @name: canonical name of the property specified
2807 * @nick: nick name for the property specified
2808 * @blurb: description of the property specified
2809 * @minimum: minimum value for the property specified
2810 * @maximum: maximum value for the property specified
2811 * @default_value: default value for the property specified
2812 * @flags: flags for the property specified
2814 * Creates a new #GParamSpecFloat instance specifying a %G_TYPE_FLOAT property.
2816 * See g_param_spec_internal() for details on property names.
2818 * Returns: a newly created parameter specification
2823 * g_param_spec_get_blurb:
2824 * @pspec: a valid #GParamSpec
2826 * Get the short description of a #GParamSpec.
2828 * Returns: the short description of @pspec.
2833 * g_param_spec_get_name:
2834 * @pspec: a valid #GParamSpec
2836 * Get the name of a #GParamSpec.
2838 * The name is always an "interned" string (as per g_intern_string()).
2839 * This allows for pointer-value comparisons.
2841 * Returns: the name of @pspec.
2846 * g_param_spec_get_nick:
2847 * @pspec: a valid #GParamSpec
2849 * Get the nickname of a #GParamSpec.
2851 * Returns: the nickname of @pspec.
2856 * g_param_spec_get_qdata:
2857 * @pspec: a valid #GParamSpec
2858 * @quark: a #GQuark, naming the user data pointer
2860 * Gets back user data pointers stored via g_param_spec_set_qdata().
2862 * Returns: (transfer none): the user data pointer set, or %NULL
2867 * g_param_spec_get_redirect_target:
2868 * @pspec: a #GParamSpec
2870 * If the paramspec redirects operations to another paramspec,
2871 * returns that paramspec. Redirect is used typically for
2872 * providing a new implementation of a property in a derived
2873 * type while preserving all the properties from the parent
2874 * type. Redirection is established by creating a property
2875 * of type #GParamSpecOverride. See g_object_class_override_property()
2876 * for an example of the use of this capability.
2879 * Returns: (transfer none): paramspec to which requests on this paramspec should be redirected, or %NULL if none.
2884 * g_param_spec_gtype: (skip)
2885 * @name: canonical name of the property specified
2886 * @nick: nick name for the property specified
2887 * @blurb: description of the property specified
2888 * @is_a_type: a #GType whose subtypes are allowed as values of the property (use %G_TYPE_NONE for any type)
2889 * @flags: flags for the property specified
2891 * Creates a new #GParamSpecGType instance specifying a
2892 * %G_TYPE_GTYPE property.
2894 * See g_param_spec_internal() for details on property names.
2897 * Returns: a newly created parameter specification
2902 * g_param_spec_int: (skip)
2903 * @name: canonical name of the property specified
2904 * @nick: nick name for the property specified
2905 * @blurb: description of the property specified
2906 * @minimum: minimum value for the property specified
2907 * @maximum: maximum value for the property specified
2908 * @default_value: default value for the property specified
2909 * @flags: flags for the property specified
2911 * Creates a new #GParamSpecInt instance specifying a %G_TYPE_INT property.
2913 * See g_param_spec_internal() for details on property names.
2915 * Returns: a newly created parameter specification
2920 * g_param_spec_int64: (skip)
2921 * @name: canonical name of the property specified
2922 * @nick: nick name for the property specified
2923 * @blurb: description of the property specified
2924 * @minimum: minimum value for the property specified
2925 * @maximum: maximum value for the property specified
2926 * @default_value: default value for the property specified
2927 * @flags: flags for the property specified
2929 * Creates a new #GParamSpecInt64 instance specifying a %G_TYPE_INT64 property.
2931 * See g_param_spec_internal() for details on property names.
2933 * Returns: a newly created parameter specification
2938 * g_param_spec_internal: (skip)
2939 * @param_type: the #GType for the property; must be derived from #G_TYPE_PARAM
2940 * @name: the canonical name of the property
2941 * @nick: the nickname of the property
2942 * @blurb: a short description of the property
2943 * @flags: a combination of #GParamFlags
2945 * Creates a new #GParamSpec instance.
2947 * A property name consists of segments consisting of ASCII letters and
2948 * digits, separated by either the '-' or '_' character. The first
2949 * character of a property name must be a letter. Names which violate these
2950 * rules lead to undefined behaviour.
2952 * When creating and looking up a #GParamSpec, either separator can be
2953 * used, but they cannot be mixed. Using '-' is considerably more
2954 * efficient and in fact required when using property names as detail
2955 * strings for signals.
2957 * Beyond the name, #GParamSpec<!-- -->s have two more descriptive
2958 * strings associated with them, the @nick, which should be suitable
2959 * for use as a label for the property in a property editor, and the
2960 * @blurb, which should be a somewhat longer description, suitable for
2961 * e.g. a tooltip. The @nick and @blurb should ideally be localized.
2963 * Returns: a newly allocated #GParamSpec instance
2968 * g_param_spec_long: (skip)
2969 * @name: canonical name of the property specified
2970 * @nick: nick name for the property specified
2971 * @blurb: description of the property specified
2972 * @minimum: minimum value for the property specified
2973 * @maximum: maximum value for the property specified
2974 * @default_value: default value for the property specified
2975 * @flags: flags for the property specified
2977 * Creates a new #GParamSpecLong instance specifying a %G_TYPE_LONG property.
2979 * See g_param_spec_internal() for details on property names.
2981 * Returns: a newly created parameter specification
2986 * g_param_spec_object: (skip)
2987 * @name: canonical name of the property specified
2988 * @nick: nick name for the property specified
2989 * @blurb: description of the property specified
2990 * @object_type: %G_TYPE_OBJECT derived type of this property
2991 * @flags: flags for the property specified
2993 * Creates a new #GParamSpecBoxed instance specifying a %G_TYPE_OBJECT
2996 * See g_param_spec_internal() for details on property names.
2998 * Returns: a newly created parameter specification
3003 * g_param_spec_override: (skip)
3004 * @name: the name of the property.
3005 * @overridden: The property that is being overridden
3007 * Creates a new property of type #GParamSpecOverride. This is used
3008 * to direct operations to another paramspec, and will not be directly
3009 * useful unless you are implementing a new base type similar to GObject.
3012 * Returns: the newly created #GParamSpec
3017 * g_param_spec_param: (skip)
3018 * @name: canonical name of the property specified
3019 * @nick: nick name for the property specified
3020 * @blurb: description of the property specified
3021 * @param_type: a #GType derived from %G_TYPE_PARAM
3022 * @flags: flags for the property specified
3024 * Creates a new #GParamSpecParam instance specifying a %G_TYPE_PARAM
3027 * See g_param_spec_internal() for details on property names.
3029 * Returns: a newly created parameter specification
3034 * g_param_spec_pointer: (skip)
3035 * @name: canonical name of the property specified
3036 * @nick: nick name for the property specified
3037 * @blurb: description of the property specified
3038 * @flags: flags for the property specified
3040 * Creates a new #GParamSpecPointer instance specifying a pointer property.
3042 * See g_param_spec_internal() for details on property names.
3044 * Returns: a newly created parameter specification
3049 * g_param_spec_pool_insert:
3050 * @pool: a #GParamSpecPool.
3051 * @pspec: the #GParamSpec to insert
3052 * @owner_type: a #GType identifying the owner of @pspec
3054 * Inserts a #GParamSpec in the pool.
3059 * g_param_spec_pool_list:
3060 * @pool: a #GParamSpecPool
3061 * @owner_type: the owner to look for
3062 * @n_pspecs_p: (out): return location for the length of the returned array
3064 * Gets an array of all #GParamSpec<!-- -->s owned by @owner_type in
3067 * Returns: (array length=n_pspecs_p) (transfer container): a newly allocated array containing pointers to all #GParamSpecs owned by @owner_type in the pool
3072 * g_param_spec_pool_list_owned:
3073 * @pool: a #GParamSpecPool
3074 * @owner_type: the owner to look for
3076 * Gets an #GList of all #GParamSpec<!-- -->s owned by @owner_type in
3079 * Returns: (transfer container) (element-type GObject.ParamSpec): a #GList of all #GParamSpec<!-- -->s owned by @owner_type in the pool#GParamSpec<!-- -->s.
3084 * g_param_spec_pool_lookup:
3085 * @pool: a #GParamSpecPool
3086 * @param_name: the name to look for
3087 * @owner_type: the owner to look for
3088 * @walk_ancestors: If %TRUE, also try to find a #GParamSpec with @param_name owned by an ancestor of @owner_type.
3090 * Looks up a #GParamSpec in the pool.
3092 * Returns: (transfer none): The found #GParamSpec, or %NULL if no matching #GParamSpec was found.
3097 * g_param_spec_pool_new:
3098 * @type_prefixing: Whether the pool will support type-prefixed property names.
3100 * Creates a new #GParamSpecPool.
3102 * If @type_prefixing is %TRUE, lookups in the newly created pool will
3103 * allow to specify the owner as a colon-separated prefix of the
3104 * property name, like "GtkContainer:border-width". This feature is
3105 * deprecated, so you should always set @type_prefixing to %FALSE.
3107 * Returns: (transfer none): a newly allocated #GParamSpecPool.
3112 * g_param_spec_pool_remove:
3113 * @pool: a #GParamSpecPool
3114 * @pspec: the #GParamSpec to remove
3116 * Removes a #GParamSpec from the pool.
3121 * g_param_spec_ref: (skip)
3122 * @pspec: a valid #GParamSpec
3124 * Increments the reference count of @pspec.
3126 * Returns: the #GParamSpec that was passed into this function
3131 * g_param_spec_ref_sink: (skip)
3132 * @pspec: a valid #GParamSpec
3134 * Convenience function to ref and sink a #GParamSpec.
3137 * Returns: the #GParamSpec that was passed into this function
3142 * g_param_spec_set_qdata:
3143 * @pspec: the #GParamSpec to set store a user data pointer
3144 * @quark: a #GQuark, naming the user data pointer
3145 * @data: an opaque user data pointer
3147 * Sets an opaque, named pointer on a #GParamSpec. The name is
3148 * specified through a #GQuark (retrieved e.g. via
3149 * g_quark_from_static_string()), and the pointer can be gotten back
3150 * from the @pspec with g_param_spec_get_qdata(). Setting a
3151 * previously set user data pointer, overrides (frees) the old pointer
3152 * set, using %NULL as pointer essentially removes the data stored.
3157 * g_param_spec_set_qdata_full: (skip)
3158 * @pspec: the #GParamSpec to set store a user data pointer
3159 * @quark: a #GQuark, naming the user data pointer
3160 * @data: an opaque user data pointer
3161 * @destroy: function to invoke with @data as argument, when @data needs to be freed
3163 * This function works like g_param_spec_set_qdata(), but in addition,
3164 * a <literal>void (*destroy) (gpointer)</literal> function may be
3165 * specified which is called with @data as argument when the @pspec is
3166 * finalized, or the data is being overwritten by a call to
3167 * g_param_spec_set_qdata() with the same @quark.
3172 * g_param_spec_sink:
3173 * @pspec: a valid #GParamSpec
3175 * The initial reference count of a newly created #GParamSpec is 1,
3176 * even though no one has explicitly called g_param_spec_ref() on it
3177 * yet. So the initial reference count is flagged as "floating", until
3178 * someone calls <literal>g_param_spec_ref (pspec); g_param_spec_sink
3179 * (pspec);</literal> in sequence on it, taking over the initial
3180 * reference count (thus ending up with a @pspec that has a reference
3181 * count of 1 still, but is not flagged "floating" anymore).
3186 * g_param_spec_steal_qdata:
3187 * @pspec: the #GParamSpec to get a stored user data pointer from
3188 * @quark: a #GQuark, naming the user data pointer
3190 * Gets back user data pointers stored via g_param_spec_set_qdata()
3191 * and removes the @data from @pspec without invoking its destroy()
3192 * function (if any was set). Usually, calling this function is only
3193 * required to update user data pointers with a destroy notifier.
3195 * Returns: (transfer none): the user data pointer set, or %NULL
3200 * g_param_spec_string: (skip)
3201 * @name: canonical name of the property specified
3202 * @nick: nick name for the property specified
3203 * @blurb: description of the property specified
3204 * @default_value: default value for the property specified
3205 * @flags: flags for the property specified
3207 * Creates a new #GParamSpecString instance.
3209 * See g_param_spec_internal() for details on property names.
3211 * Returns: a newly created parameter specification
3216 * g_param_spec_uchar: (skip)
3217 * @name: canonical name of the property specified
3218 * @nick: nick name for the property specified
3219 * @blurb: description of the property specified
3220 * @minimum: minimum value for the property specified
3221 * @maximum: maximum value for the property specified
3222 * @default_value: default value for the property specified
3223 * @flags: flags for the property specified
3225 * Creates a new #GParamSpecUChar instance specifying a %G_TYPE_UCHAR property.
3227 * Returns: a newly created parameter specification
3232 * g_param_spec_uint: (skip)
3233 * @name: canonical name of the property specified
3234 * @nick: nick name for the property specified
3235 * @blurb: description of the property specified
3236 * @minimum: minimum value for the property specified
3237 * @maximum: maximum value for the property specified
3238 * @default_value: default value for the property specified
3239 * @flags: flags for the property specified
3241 * Creates a new #GParamSpecUInt instance specifying a %G_TYPE_UINT property.
3243 * See g_param_spec_internal() for details on property names.
3245 * Returns: a newly created parameter specification
3250 * g_param_spec_uint64: (skip)
3251 * @name: canonical name of the property specified
3252 * @nick: nick name for the property specified
3253 * @blurb: description of the property specified
3254 * @minimum: minimum value for the property specified
3255 * @maximum: maximum value for the property specified
3256 * @default_value: default value for the property specified
3257 * @flags: flags for the property specified
3259 * Creates a new #GParamSpecUInt64 instance specifying a %G_TYPE_UINT64
3262 * See g_param_spec_internal() for details on property names.
3264 * Returns: a newly created parameter specification
3269 * g_param_spec_ulong: (skip)
3270 * @name: canonical name of the property specified
3271 * @nick: nick name for the property specified
3272 * @blurb: description of the property specified
3273 * @minimum: minimum value for the property specified
3274 * @maximum: maximum value for the property specified
3275 * @default_value: default value for the property specified
3276 * @flags: flags for the property specified
3278 * Creates a new #GParamSpecULong instance specifying a %G_TYPE_ULONG
3281 * See g_param_spec_internal() for details on property names.
3283 * Returns: a newly created parameter specification
3288 * g_param_spec_unichar: (skip)
3289 * @name: canonical name of the property specified
3290 * @nick: nick name for the property specified
3291 * @blurb: description of the property specified
3292 * @default_value: default value for the property specified
3293 * @flags: flags for the property specified
3295 * Creates a new #GParamSpecUnichar instance specifying a %G_TYPE_UINT
3296 * property. #GValue structures for this property can be accessed with
3297 * g_value_set_uint() and g_value_get_uint().
3299 * See g_param_spec_internal() for details on property names.
3301 * Returns: a newly created parameter specification
3306 * g_param_spec_unref: (skip)
3307 * @pspec: a valid #GParamSpec
3309 * Decrements the reference count of a @pspec.
3314 * g_param_spec_value_array: (skip)
3315 * @name: canonical name of the property specified
3316 * @nick: nick name for the property specified
3317 * @blurb: description of the property specified
3318 * @element_spec: a #GParamSpec describing the elements contained in arrays of this property, may be %NULL
3319 * @flags: flags for the property specified
3321 * Creates a new #GParamSpecValueArray instance specifying a
3322 * %G_TYPE_VALUE_ARRAY property. %G_TYPE_VALUE_ARRAY is a
3323 * %G_TYPE_BOXED type, as such, #GValue structures for this property
3324 * can be accessed with g_value_set_boxed() and g_value_get_boxed().
3326 * See g_param_spec_internal() for details on property names.
3328 * Returns: a newly created parameter specification
3333 * g_param_spec_variant: (skip)
3334 * @name: canonical name of the property specified
3335 * @nick: nick name for the property specified
3336 * @blurb: description of the property specified
3337 * @type: a #GVariantType
3338 * @default_value: (allow-none): a #GVariant of type @type to use as the default value, or %NULL
3339 * @flags: flags for the property specified
3341 * Creates a new #GParamSpecVariant instance specifying a #GVariant
3344 * If @default_value is floating, it is consumed.
3346 * See g_param_spec_internal() for details on property names.
3348 * Returns: the newly created #GParamSpec
3354 * g_param_type_register_static:
3355 * @name: 0-terminated string used as the name of the new #GParamSpec type.
3356 * @pspec_info: The #GParamSpecTypeInfo for this #GParamSpec type.
3358 * Registers @name as the name of a new static type derived from
3359 * #G_TYPE_PARAM. The type system uses the information contained in
3360 * the #GParamSpecTypeInfo structure pointed to by @info to manage the
3361 * #GParamSpec type and its instances.
3363 * Returns: The new type identifier.
3368 * g_param_value_convert:
3369 * @pspec: a valid #GParamSpec
3370 * @src_value: souce #GValue
3371 * @dest_value: destination #GValue of correct type for @pspec
3372 * @strict_validation: %TRUE requires @dest_value to conform to @pspec without modifications
3374 * Transforms @src_value into @dest_value if possible, and then
3375 * validates @dest_value, in order for it to conform to @pspec. If
3376 * @strict_validation is %TRUE this function will only succeed if the
3377 * transformed @dest_value complied to @pspec without modifications.
3379 * See also g_value_type_transformable(), g_value_transform() and
3380 * g_param_value_validate().
3382 * Returns: %TRUE if transformation and validation were successful, %FALSE otherwise and @dest_value is left untouched.
3387 * g_param_value_defaults:
3388 * @pspec: a valid #GParamSpec
3389 * @value: a #GValue of correct type for @pspec
3391 * Checks whether @value contains the default value as specified in @pspec.
3393 * Returns: whether @value contains the canonical default for this @pspec
3398 * g_param_value_set_default:
3399 * @pspec: a valid #GParamSpec
3400 * @value: a #GValue of correct type for @pspec
3402 * Sets @value to its default value as specified in @pspec.
3407 * g_param_value_validate:
3408 * @pspec: a valid #GParamSpec
3409 * @value: a #GValue of correct type for @pspec
3411 * Ensures that the contents of @value comply with the specifications
3412 * set out by @pspec. For example, a #GParamSpecInt might require
3413 * that integers stored in @value may not be smaller than -42 and not be
3414 * greater than +42. If @value contains an integer outside of this range,
3415 * it is modified accordingly, so the resulting value will fit into the
3418 * Returns: whether modifying @value was necessary to ensure validity
3423 * g_param_values_cmp:
3424 * @pspec: a valid #GParamSpec
3425 * @value1: a #GValue of correct type for @pspec
3426 * @value2: a #GValue of correct type for @pspec
3428 * Compares @value1 with @value2 according to @pspec, and return -1, 0 or +1,
3429 * if @value1 is found to be less than, equal to or greater than @value2,
3432 * Returns: -1, 0 or +1, for a less than, equal to or greater than result
3437 * g_pointer_type_register_static:
3438 * @name: the name of the new pointer type.
3440 * Creates a new %G_TYPE_POINTER derived type id for a new
3441 * pointer type with name @name.
3443 * Returns: a new %G_TYPE_POINTER derived type id for @name.
3448 * g_signal_accumulator_first_wins:
3449 * @ihint: standard #GSignalAccumulator parameter
3450 * @return_accu: standard #GSignalAccumulator parameter
3451 * @handler_return: standard #GSignalAccumulator parameter
3452 * @dummy: standard #GSignalAccumulator parameter
3454 * A predefined #GSignalAccumulator for signals intended to be used as a
3455 * hook for application code to provide a particular value. Usually
3456 * only one such value is desired and multiple handlers for the same
3457 * signal don't make much sense (except for the case of the default
3458 * handler defined in the class structure, in which case you will
3459 * usually want the signal connection to override the class handler).
3461 * This accumulator will use the return value from the first signal
3462 * handler that is run as the return value for the signal and not run
3463 * any further handlers (ie: the first handler "wins").
3465 * Returns: standard #GSignalAccumulator result
3471 * g_signal_accumulator_true_handled:
3472 * @ihint: standard #GSignalAccumulator parameter
3473 * @return_accu: standard #GSignalAccumulator parameter
3474 * @handler_return: standard #GSignalAccumulator parameter
3475 * @dummy: standard #GSignalAccumulator parameter
3477 * A predefined #GSignalAccumulator for signals that return a
3478 * boolean values. The behavior that this accumulator gives is
3479 * that a return of %TRUE stops the signal emission: no further
3480 * callbacks will be invoked, while a return of %FALSE allows
3481 * the emission to continue. The idea here is that a %TRUE return
3482 * indicates that the callback <emphasis>handled</emphasis> the signal,
3483 * and no further handling is needed.
3486 * Returns: standard #GSignalAccumulator result
3491 * g_signal_add_emission_hook:
3492 * @signal_id: the signal identifier, as returned by g_signal_lookup().
3493 * @detail: the detail on which to call the hook.
3494 * @hook_func: a #GSignalEmissionHook function.
3495 * @hook_data: user data for @hook_func.
3496 * @data_destroy: a #GDestroyNotify for @hook_data.
3498 * Adds an emission hook for a signal, which will get called for any emission
3499 * of that signal, independent of the instance. This is possible only
3500 * for signals which don't have #G_SIGNAL_NO_HOOKS flag set.
3502 * Returns: the hook id, for later use with g_signal_remove_emission_hook().
3507 * g_signal_chain_from_overridden:
3508 * @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.
3509 * @return_value: Location for the return value.
3511 * Calls the original class closure of a signal. This function should only
3512 * be called from an overridden class closure; see
3513 * g_signal_override_class_closure() and
3514 * g_signal_override_class_handler().
3519 * g_signal_chain_from_overridden_handler:
3520 * @instance: the instance the signal is being emitted on.
3521 * @...: 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.
3523 * Calls the original class closure of a signal. This function should
3524 * only be called from an overridden class closure; see
3525 * g_signal_override_class_closure() and
3526 * g_signal_override_class_handler().
3533 * g_signal_connect_closure:
3534 * @instance: the instance to connect to.
3535 * @detailed_signal: a string of the form "signal-name::detail".
3536 * @closure: the closure to connect.
3537 * @after: whether the handler should be called before or after the default handler of the signal.
3539 * Connects a closure to a signal for a particular object.
3541 * Returns: the handler id
3546 * g_signal_connect_closure_by_id:
3547 * @instance: the instance to connect to.
3548 * @signal_id: the id of the signal.
3549 * @detail: the detail.
3550 * @closure: the closure to connect.
3551 * @after: whether the handler should be called before or after the default handler of the signal.
3553 * Connects a closure to a signal for a particular object.
3555 * Returns: the handler id
3560 * g_signal_connect_data:
3561 * @instance: the instance to connect to.
3562 * @detailed_signal: a string of the form "signal-name::detail".
3563 * @c_handler: the #GCallback to connect.
3564 * @data: data to pass to @c_handler calls.
3565 * @destroy_data: a #GClosureNotify for @data.
3566 * @connect_flags: a combination of #GConnectFlags.
3568 * Connects a #GCallback function to a signal for a particular object. Similar
3569 * to g_signal_connect(), but allows to provide a #GClosureNotify for the data
3570 * which will be called when the signal handler is disconnected and no longer
3571 * used. Specify @connect_flags if you need <literal>..._after()</literal> or
3572 * <literal>..._swapped()</literal> variants of this function.
3574 * Returns: the handler id
3579 * g_signal_connect_object: (skip)
3580 * @instance: the instance to connect to.
3581 * @detailed_signal: a string of the form "signal-name::detail".
3582 * @c_handler: the #GCallback to connect.
3583 * @gobject: the object to pass as data to @c_handler.
3584 * @connect_flags: a combination of #GConnectFlags.
3586 * This is similar to g_signal_connect_data(), but uses a closure which
3587 * ensures that the @gobject stays alive during the call to @c_handler
3588 * by temporarily adding a reference count to @gobject.
3590 * When the object is destroyed the signal handler will be automatically
3591 * disconnected. Note that this is not currently threadsafe (ie:
3592 * emitting a signal while @gobject is being destroyed in another thread
3595 * Returns: the handler id.
3601 * @instance: the instance the signal is being emitted on.
3602 * @signal_id: the signal id
3603 * @detail: the detail
3604 * @...: 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.
3608 * Note that g_signal_emit() resets the return value to the default
3609 * if no handlers are connected, in contrast to g_signal_emitv().
3614 * g_signal_emit_by_name:
3615 * @instance: the instance the signal is being emitted on.
3616 * @detailed_signal: a string of the form "signal-name::detail".
3617 * @...: 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.
3621 * Note that g_signal_emit_by_name() resets the return value to the default
3622 * if no handlers are connected, in contrast to g_signal_emitv().
3627 * g_signal_emit_valist:
3628 * @instance: the instance the signal is being emitted on.
3629 * @signal_id: the signal id
3630 * @detail: the detail
3631 * @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.
3635 * Note that g_signal_emit_valist() resets the return value to the default
3636 * if no handlers are connected, in contrast to g_signal_emitv().
3642 * @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.
3643 * @signal_id: the signal id
3644 * @detail: the detail
3645 * @return_value: Location to store the return value of the signal emission.
3649 * Note that g_signal_emitv() doesn't change @return_value if no handlers are
3650 * connected, in contrast to g_signal_emit() and g_signal_emit_valist().
3655 * g_signal_get_invocation_hint:
3656 * @instance: the instance to query
3658 * Returns the invocation hint of the innermost signal emission of instance.
3660 * Returns: (transfer none): the invocation hint of the innermost signal emission.
3665 * g_signal_handler_block:
3666 * @instance: The instance to block the signal handler of.
3667 * @handler_id: Handler id of the handler to be blocked.
3669 * Blocks a handler of an instance so it will not be called during any
3670 * signal emissions unless it is unblocked again. Thus "blocking" a
3671 * signal handler means to temporarily deactive it, a signal handler
3672 * has to be unblocked exactly the same amount of times it has been
3673 * blocked before to become active again.
3675 * The @handler_id has to be a valid signal handler id, connected to a
3676 * signal of @instance.
3681 * g_signal_handler_disconnect:
3682 * @instance: The instance to remove the signal handler from.
3683 * @handler_id: Handler id of the handler to be disconnected.
3685 * Disconnects a handler from an instance so it will not be called during
3686 * any future or currently ongoing emissions of the signal it has been
3687 * connected to. The @handler_id becomes invalid and may be reused.
3689 * The @handler_id has to be a valid signal handler id, connected to a
3690 * signal of @instance.
3695 * g_signal_handler_find:
3696 * @instance: The instance owning the signal handler to be found.
3697 * @mask: Mask indicating which of @signal_id, @detail, @closure, @func and/or @data the handler has to match.
3698 * @signal_id: Signal the handler has to be connected to.
3699 * @detail: Signal detail the handler has to be connected to.
3700 * @closure: (allow-none): The closure the handler will invoke.
3701 * @func: The C closure callback of the handler (useless for non-C closures).
3702 * @data: The closure data of the handler's closure.
3704 * Finds the first signal handler that matches certain selection criteria.
3705 * The criteria mask is passed as an OR-ed combination of #GSignalMatchType
3706 * flags, and the criteria values are passed as arguments.
3707 * The match @mask has to be non-0 for successful matches.
3708 * If no handler was found, 0 is returned.
3710 * Returns: A valid non-0 signal handler id for a successful match.
3715 * g_signal_handler_is_connected:
3716 * @instance: The instance where a signal handler is sought.
3717 * @handler_id: the handler id.
3719 * Returns whether @handler_id is the id of a handler connected to @instance.
3721 * Returns: whether @handler_id identifies a handler connected to @instance.
3726 * g_signal_handler_unblock:
3727 * @instance: The instance to unblock the signal handler of.
3728 * @handler_id: Handler id of the handler to be unblocked.
3730 * Undoes the effect of a previous g_signal_handler_block() call. A
3731 * blocked handler is skipped during signal emissions and will not be
3732 * invoked, unblocking it (for exactly the amount of times it has been
3733 * blocked before) reverts its "blocked" state, so the handler will be
3734 * recognized by the signal system and is called upon future or
3735 * currently ongoing signal emissions (since the order in which
3736 * handlers are called during signal emissions is deterministic,
3737 * whether the unblocked handler in question is called as part of a
3738 * currently ongoing emission depends on how far that emission has
3741 * The @handler_id has to be a valid id of a signal handler that is
3742 * connected to a signal of @instance and is currently blocked.
3747 * g_signal_handlers_block_matched:
3748 * @instance: The instance to block handlers from.
3749 * @mask: Mask indicating which of @signal_id, @detail, @closure, @func and/or @data the handlers have to match.
3750 * @signal_id: Signal the handlers have to be connected to.
3751 * @detail: Signal detail the handlers have to be connected to.
3752 * @closure: (allow-none): The closure the handlers will invoke.
3753 * @func: The C closure callback of the handlers (useless for non-C closures).
3754 * @data: The closure data of the handlers' closures.
3756 * Blocks all handlers on an instance that match a certain selection criteria.
3757 * The criteria mask is passed as an OR-ed combination of #GSignalMatchType
3758 * flags, and the criteria values are passed as arguments.
3759 * Passing at least one of the %G_SIGNAL_MATCH_CLOSURE, %G_SIGNAL_MATCH_FUNC
3760 * or %G_SIGNAL_MATCH_DATA match flags is required for successful matches.
3761 * If no handlers were found, 0 is returned, the number of blocked handlers
3764 * Returns: The number of handlers that matched.
3769 * g_signal_handlers_disconnect_matched:
3770 * @instance: The instance to remove handlers from.
3771 * @mask: Mask indicating which of @signal_id, @detail, @closure, @func and/or @data the handlers have to match.
3772 * @signal_id: Signal the handlers have to be connected to.
3773 * @detail: Signal detail the handlers have to be connected to.
3774 * @closure: (allow-none): The closure the handlers will invoke.
3775 * @func: The C closure callback of the handlers (useless for non-C closures).
3776 * @data: The closure data of the handlers' closures.
3778 * Disconnects all handlers on an instance that match a certain
3779 * selection criteria. The criteria mask is passed as an OR-ed
3780 * combination of #GSignalMatchType flags, and the criteria values are
3781 * passed as arguments. Passing at least one of the
3782 * %G_SIGNAL_MATCH_CLOSURE, %G_SIGNAL_MATCH_FUNC or
3783 * %G_SIGNAL_MATCH_DATA match flags is required for successful
3784 * matches. If no handlers were found, 0 is returned, the number of
3785 * disconnected handlers otherwise.
3787 * Returns: The number of handlers that matched.
3792 * g_signal_handlers_unblock_matched:
3793 * @instance: The instance to unblock handlers from.
3794 * @mask: Mask indicating which of @signal_id, @detail, @closure, @func and/or @data the handlers have to match.
3795 * @signal_id: Signal the handlers have to be connected to.
3796 * @detail: Signal detail the handlers have to be connected to.
3797 * @closure: (allow-none): The closure the handlers will invoke.
3798 * @func: The C closure callback of the handlers (useless for non-C closures).
3799 * @data: The closure data of the handlers' closures.
3801 * Unblocks all handlers on an instance that match a certain selection
3802 * criteria. The criteria mask is passed as an OR-ed combination of
3803 * #GSignalMatchType flags, and the criteria values are passed as arguments.
3804 * Passing at least one of the %G_SIGNAL_MATCH_CLOSURE, %G_SIGNAL_MATCH_FUNC
3805 * or %G_SIGNAL_MATCH_DATA match flags is required for successful matches.
3806 * If no handlers were found, 0 is returned, the number of unblocked handlers
3807 * otherwise. The match criteria should not apply to any handlers that are
3808 * not currently blocked.
3810 * Returns: The number of handlers that matched.
3815 * g_signal_has_handler_pending:
3816 * @instance: the object whose signal handlers are sought.
3817 * @signal_id: the signal id.
3818 * @detail: the detail.
3819 * @may_be_blocked: whether blocked handlers should count as match.
3821 * Returns whether there are any handlers connected to @instance for the
3822 * given signal id and detail.
3824 * One example of when you might use this is when the arguments to the
3825 * signal are difficult to compute. A class implementor may opt to not
3826 * emit the signal if no one is attached anyway, thus saving the cost
3827 * of building the arguments.
3829 * Returns: %TRUE if a handler is connected to the signal, %FALSE otherwise.
3834 * g_signal_list_ids:
3835 * @itype: Instance or interface type.
3836 * @n_ids: Location to store the number of signal ids for @itype.
3838 * Lists the signals by id that a certain instance or interface type
3839 * created. Further information about the signals can be acquired through
3842 * Returns: (array length=n_ids): Newly allocated array of signal IDs.
3848 * @name: the signal's name.
3849 * @itype: the type that the signal operates on.
3851 * Given the name of the signal and the type of object it connects to, gets
3852 * the signal's identifying integer. Emitting the signal by number is
3853 * somewhat faster than using the name each time.
3855 * Also tries the ancestors of the given type.
3857 * See g_signal_new() for details on allowed signal names.
3859 * Returns: the signal's identifying number, or 0 if no signal was found.
3865 * @signal_id: the signal's identifying number.
3867 * Given the signal's identifier, finds its name.
3869 * Two different signals may have the same name, if they have differing types.
3871 * Returns: the signal name, or %NULL if the signal number was invalid.
3877 * @signal_name: the name for the signal
3878 * @itype: the type this signal pertains to. It will also pertain to types which are derived from this type.
3879 * @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.
3880 * @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.
3881 * @accumulator: the accumulator for this signal; may be %NULL.
3882 * @accu_data: user data for the @accumulator.
3883 * @c_marshaller: (allow-none): the function to translate arrays of parameter values to signal emissions into C language callback invocations or %NULL.
3884 * @return_type: the type of return value, or #G_TYPE_NONE for a signal without a return value.
3885 * @n_params: the number of parameter types to follow.
3886 * @...: a list of types, one for each parameter.
3888 * Creates a new signal. (This is usually done in the class initializer.)
3890 * A signal name consists of segments consisting of ASCII letters and
3891 * digits, separated by either the '-' or '_' character. The first
3892 * character of a signal name must be a letter. Names which violate these
3893 * rules lead to undefined behaviour of the GSignal system.
3895 * When registering a signal and looking up a signal, either separator can
3896 * be used, but they cannot be mixed.
3898 * If 0 is used for @class_offset subclasses cannot override the class handler
3899 * in their <code>class_init</code> method by doing
3900 * <code>super_class->signal_handler = my_signal_handler</code>. Instead they
3901 * will have to use g_signal_override_class_handler().
3903 * If c_marshaller is %NULL, g_cclosure_marshal_generic() will be used as
3904 * the marshaller for this signal.
3906 * Returns: the signal id
3911 * g_signal_new_class_handler:
3912 * @signal_name: the name for the signal
3913 * @itype: the type this signal pertains to. It will also pertain to types which are derived from this type.
3914 * @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.
3915 * @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.
3916 * @accumulator: the accumulator for this signal; may be %NULL.
3917 * @accu_data: user data for the @accumulator.
3918 * @c_marshaller: (allow-none): the function to translate arrays of parameter values to signal emissions into C language callback invocations or %NULL.
3919 * @return_type: the type of return value, or #G_TYPE_NONE for a signal without a return value.
3920 * @n_params: the number of parameter types to follow.
3921 * @...: a list of types, one for each parameter.
3923 * Creates a new signal. (This is usually done in the class initializer.)
3925 * This is a variant of g_signal_new() that takes a C callback instead
3926 * off a class offset for the signal's class handler. This function
3927 * doesn't need a function pointer exposed in the class structure of
3928 * an object definition, instead the function pointer is passed
3929 * directly and can be overriden by derived classes with
3930 * g_signal_override_class_closure() or
3931 * g_signal_override_class_handler()and chained to with
3932 * g_signal_chain_from_overridden() or
3933 * g_signal_chain_from_overridden_handler().
3935 * See g_signal_new() for information about signal names.
3937 * If c_marshaller is %NULL @g_cclosure_marshal_generic will be used as
3938 * the marshaller for this signal.
3940 * Returns: the signal id
3946 * g_signal_new_valist:
3947 * @signal_name: the name for the signal
3948 * @itype: the type this signal pertains to. It will also pertain to types which are derived from this type.
3949 * @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.
3950 * @class_closure: The closure to invoke on signal emission; may be %NULL.
3951 * @accumulator: the accumulator for this signal; may be %NULL.
3952 * @accu_data: user data for the @accumulator.
3953 * @c_marshaller: (allow-none): the function to translate arrays of parameter values to signal emissions into C language callback invocations or %NULL.
3954 * @return_type: the type of return value, or #G_TYPE_NONE for a signal without a return value.
3955 * @n_params: the number of parameter types in @args.
3956 * @args: va_list of #GType, one for each parameter.
3958 * Creates a new signal. (This is usually done in the class initializer.)
3960 * See g_signal_new() for details on allowed signal names.
3962 * If c_marshaller is %NULL, g_cclosure_marshal_generic() will be used as
3963 * the marshaller for this signal.
3965 * Returns: the signal id
3971 * @signal_name: the name for the signal
3972 * @itype: the type this signal pertains to. It will also pertain to types which are derived from this type
3973 * @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
3974 * @class_closure: (allow-none): The closure to invoke on signal emission; may be %NULL
3975 * @accumulator: (allow-none): the accumulator for this signal; may be %NULL
3976 * @accu_data: user data for the @accumulator
3977 * @c_marshaller: (allow-none): the function to translate arrays of parameter values to signal emissions into C language callback invocations or %NULL
3978 * @return_type: the type of return value, or #G_TYPE_NONE for a signal without a return value
3979 * @n_params: the length of @param_types
3980 * @param_types: (array length=n_params): an array of types, one for each parameter
3982 * Creates a new signal. (This is usually done in the class initializer.)
3984 * See g_signal_new() for details on allowed signal names.
3986 * If c_marshaller is %NULL @g_cclosure_marshal_generic will be used as
3987 * the marshaller for this signal.
3989 * Returns: the signal id
3994 * g_signal_override_class_closure:
3995 * @signal_id: the signal id
3996 * @instance_type: the instance type on which to override the class closure for the signal.
3997 * @class_closure: the closure.
3999 * Overrides the class closure (i.e. the default handler) for the given signal
4000 * for emissions on instances of @instance_type. @instance_type must be derived
4001 * from the type to which the signal belongs.
4003 * See g_signal_chain_from_overridden() and
4004 * g_signal_chain_from_overridden_handler() for how to chain up to the
4005 * parent class closure from inside the overridden one.
4010 * g_signal_override_class_handler:
4011 * @signal_name: the name for the signal
4012 * @instance_type: the instance type on which to override the class handler for the signal.
4013 * @class_handler: the handler.
4015 * Overrides the class closure (i.e. the default handler) for the
4016 * given signal for emissions on instances of @instance_type with
4017 * callabck @class_handler. @instance_type must be derived from the
4018 * type to which the signal belongs.
4020 * See g_signal_chain_from_overridden() and
4021 * g_signal_chain_from_overridden_handler() for how to chain up to the
4022 * parent class closure from inside the overridden one.
4029 * g_signal_parse_name:
4030 * @detailed_signal: a string of the form "signal-name::detail".
4031 * @itype: The interface/instance type that introduced "signal-name".
4032 * @signal_id_p: (out): Location to store the signal id.
4033 * @detail_p: (out): Location to store the detail quark.
4034 * @force_detail_quark: %TRUE forces creation of a #GQuark for the detail.
4036 * Internal function to parse a signal name into its @signal_id
4037 * and @detail quark.
4039 * Returns: Whether the signal name could successfully be parsed and @signal_id_p and @detail_p contain valid return values.
4045 * @signal_id: The signal id of the signal to query information for.
4046 * @query: (out caller-allocates): A user provided structure that is filled in with constant values upon success.
4048 * Queries the signal system for in-depth information about a
4049 * specific signal. This function will fill in a user-provided
4050 * structure to hold signal-specific information. If an invalid
4051 * signal id is passed in, the @signal_id member of the #GSignalQuery
4052 * is 0. All members filled into the #GSignalQuery structure should
4053 * be considered constant and have to be left untouched.
4058 * g_signal_remove_emission_hook:
4059 * @signal_id: the id of the signal
4060 * @hook_id: the id of the emission hook, as returned by g_signal_add_emission_hook()
4062 * Deletes an emission hook.
4067 * g_signal_stop_emission:
4068 * @instance: the object whose signal handlers you wish to stop.
4069 * @signal_id: the signal identifier, as returned by g_signal_lookup().
4070 * @detail: the detail which the signal was emitted with.
4072 * Stops a signal's current emission.
4074 * This will prevent the default method from running, if the signal was
4075 * %G_SIGNAL_RUN_LAST and you connected normally (i.e. without the "after"
4078 * Prints a warning if used on a signal which isn't being emitted.
4083 * g_signal_stop_emission_by_name:
4084 * @instance: the object whose signal handlers you wish to stop.
4085 * @detailed_signal: a string of the form "signal-name::detail".
4087 * Stops a signal's current emission.
4089 * This is just like g_signal_stop_emission() except it will look up the
4090 * signal id for you.
4095 * g_signal_type_cclosure_new:
4096 * @itype: the #GType identifier of an interface or classed type
4097 * @struct_offset: the offset of the member function of @itype's class structure which is to be invoked by the new closure
4099 * Creates a new closure which invokes the function found at the offset
4100 * @struct_offset in the class structure of the interface or classed type
4101 * identified by @itype.
4103 * Returns: a new #GCClosure
4108 * g_source_set_closure:
4109 * @source: the source
4110 * @closure: a #GClosure
4112 * Set the callback for a source as a #GClosure.
4114 * If the source is not one of the standard GLib types, the @closure_callback
4115 * and @closure_marshal fields of the #GSourceFuncs structure must have been
4116 * filled in with pointers to appropriate functions.
4121 * g_source_set_dummy_callback:
4122 * @source: the source
4124 * Sets a dummy callback for @source. The callback will do nothing, and
4125 * if the source expects a #gboolean return value, it will return %TRUE.
4126 * (If the source expects any other type of return value, it will return
4127 * a 0/%NULL value; whatever g_value_init() initializes a #GValue to for
4130 * If the source is not one of the standard GLib types, the
4131 * @closure_callback and @closure_marshal fields of the #GSourceFuncs
4132 * structure must have been filled in with pointers to appropriate
4138 * g_strdup_value_contents:
4139 * @value: #GValue which contents are to be described.
4141 * Return a newly allocated string, which describes the contents of a
4142 * #GValue. The main purpose of this function is to describe #GValue
4143 * contents for debugging output, the way in which the contents are
4144 * described may change between different GLib versions.
4146 * Returns: Newly allocated string.
4151 * g_type_add_class_cache_func: (skip)
4152 * @cache_data: data to be passed to @cache_func
4153 * @cache_func: a #GTypeClassCacheFunc
4155 * Adds a #GTypeClassCacheFunc to be called before the reference count of a
4156 * class goes from one to zero. This can be used to prevent premature class
4157 * destruction. All installed #GTypeClassCacheFunc functions will be chained
4158 * until one of them returns %TRUE. The functions have to check the class id
4159 * passed in to figure whether they actually want to cache the class of this
4160 * type, since all classes are routed through the same #GTypeClassCacheFunc
4166 * g_type_add_class_private:
4167 * @class_type: GType of an classed type.
4168 * @private_size: size of private structure.
4170 * Registers a private class structure for a classed type;
4171 * when the class is allocated, the private structures for
4172 * the class and all of its parent types are allocated
4173 * sequentially in the same memory block as the public
4174 * structures. This function should be called in the
4175 * type's get_type() function after the type is registered.
4176 * The private structure can be retrieved using the
4177 * G_TYPE_CLASS_GET_PRIVATE() macro.
4184 * g_type_add_interface_check: (skip)
4185 * @check_data: data to pass to @check_func
4186 * @check_func: function to be called after each interface is initialized.
4188 * Adds a function to be called after an interface vtable is
4189 * initialized for any class (i.e. after the @interface_init member of
4190 * #GInterfaceInfo has been called).
4192 * This function is useful when you want to check an invariant that
4193 * depends on the interfaces of a class. For instance, the
4194 * implementation of #GObject uses this facility to check that an
4195 * object implements all of the properties that are defined on its
4203 * g_type_add_interface_dynamic:
4204 * @instance_type: the #GType value of an instantiable type.
4205 * @interface_type: the #GType value of an interface type.
4206 * @plugin: the #GTypePlugin structure to retrieve the #GInterfaceInfo from.
4208 * Adds the dynamic @interface_type to @instantiable_type. The information
4209 * contained in the #GTypePlugin structure pointed to by @plugin
4210 * is used to manage the relationship.
4215 * g_type_add_interface_static:
4216 * @instance_type: #GType value of an instantiable type.
4217 * @interface_type: #GType value of an interface type.
4218 * @info: The #GInterfaceInfo structure for this (@instance_type, @interface_type) combination.
4220 * Adds the static @interface_type to @instantiable_type. The
4221 * information contained in the #GInterfaceInfo structure pointed to by
4222 * @info is used to manage the relationship.
4227 * g_type_check_instance:
4228 * @instance: A valid #GTypeInstance structure.
4230 * Private helper function to aid implementation of the G_TYPE_CHECK_INSTANCE()
4233 * Returns: %TRUE if @instance is valid, %FALSE otherwise.
4239 * @type: The parent type.
4240 * @n_children: (out) (allow-none): Optional #guint pointer to contain the number of child types.
4242 * Return a newly allocated and 0-terminated array of type IDs, listing the
4243 * child types of @type. The return value has to be g_free()ed after use.
4245 * Returns: (array length=n_children) (transfer full): Newly allocated and 0-terminated array of child types.
4250 * g_type_class_add_private:
4251 * @g_class: class structure for an instantiatable type
4252 * @private_size: size of private structure.
4254 * Registers a private structure for an instantiatable type.
4256 * When an object is allocated, the private structures for
4257 * the type and all of its parent types are allocated
4258 * sequentially in the same memory block as the public
4261 * Note that the accumulated size of the private structures of
4262 * a type and all its parent types cannot exceed 64 KiB.
4264 * This function should be called in the type's class_init() function.
4265 * The private structure can be retrieved using the
4266 * G_TYPE_INSTANCE_GET_PRIVATE() macro.
4268 * The following example shows attaching a private structure
4269 * <structname>MyObjectPrivate</structname> to an object
4270 * <structname>MyObject</structname> defined in the standard GObject
4272 * type's class_init() function.
4273 * Note the use of a structure member "priv" to avoid the overhead
4274 * of repeatedly calling MY_OBJECT_GET_PRIVATE().
4277 * typedef struct _MyObject MyObject;
4278 * typedef struct _MyObjectPrivate MyObjectPrivate;
4280 * struct _MyObject {
4283 * MyObjectPrivate *priv;
4286 * struct _MyObjectPrivate {
4291 * my_object_class_init (MyObjectClass *klass)
4293 * g_type_class_add_private (klass, sizeof (MyObjectPrivate));
4297 * my_object_init (MyObject *my_object)
4299 * my_object->priv = G_TYPE_INSTANCE_GET_PRIVATE (my_object,
4305 * my_object_get_some_field (MyObject *my_object)
4307 * MyObjectPrivate *priv;
4309 * g_return_val_if_fail (MY_IS_OBJECT (my_object), 0);
4311 * priv = my_object->priv;
4313 * return priv->some_field;
4322 * g_type_class_peek:
4323 * @type: Type ID of a classed type.
4325 * This function is essentially the same as g_type_class_ref(), except that
4326 * the classes reference count isn't incremented. As a consequence, this function
4327 * may return %NULL if the class of the type passed in does not currently
4328 * exist (hasn't been referenced before).
4330 * Returns: (type GObject.TypeClass) (transfer none): The #GTypeClass structure for the given type ID or %NULL if the class does not currently exist.
4335 * g_type_class_peek_parent:
4336 * @g_class: (type GObject.TypeClass): The #GTypeClass structure to retrieve the parent class for.
4338 * This is a convenience function often needed in class initializers.
4339 * It returns the class structure of the immediate parent type of the
4340 * class passed in. Since derived classes hold a reference count on
4341 * their parent classes as long as they are instantiated, the returned
4342 * class will always exist. This function is essentially equivalent
4346 * g_type_class_peek (g_type_parent (G_TYPE_FROM_CLASS (g_class)));
4349 * Returns: (type GObject.TypeClass) (transfer none): The parent class of @g_class.
4354 * g_type_class_peek_static:
4355 * @type: Type ID of a classed type.
4357 * A more efficient version of g_type_class_peek() which works only for
4361 * 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.
4367 * @type: Type ID of a classed type.
4369 * Increments the reference count of the class structure belonging to
4370 * @type. This function will demand-create the class if it doesn't
4373 * Returns: (type GObject.TypeClass) (transfer none): The #GTypeClass structure for the given type ID.
4378 * g_type_class_unref:
4379 * @g_class: (type GObject.TypeClass): The #GTypeClass structure to unreference.
4381 * Decrements the reference count of the class structure being passed in.
4382 * Once the last reference count of a class has been released, classes
4383 * may be finalized by the type system, so further dereferencing of a
4384 * class pointer after g_type_class_unref() are invalid.
4389 * g_type_class_unref_uncached: (skip)
4390 * @g_class: (type GObject.TypeClass): The #GTypeClass structure to unreference.
4392 * A variant of g_type_class_unref() for use in #GTypeClassCacheFunc
4393 * implementations. It unreferences a class without consulting the chain
4394 * of #GTypeClassCacheFunc<!-- -->s, avoiding the recursion which would occur
4400 * g_type_create_instance: (skip)
4401 * @type: An instantiatable type to create an instance for.
4403 * Creates and initializes an instance of @type if @type is valid and
4404 * can be instantiated. The type system only performs basic allocation
4405 * and structure setups for instances: actual instance creation should
4406 * happen through functions supplied by the type's fundamental type
4407 * implementation. So use of g_type_create_instance() is reserved for
4408 * implementators of fundamental types only. E.g. instances of the
4409 * #GObject hierarchy should be created via g_object_new() and
4410 * <emphasis>never</emphasis> directly through
4411 * g_type_create_instance() which doesn't handle things like singleton
4412 * objects or object construction. Note: Do <emphasis>not</emphasis>
4413 * use this function, unless you're implementing a fundamental
4414 * type. Also language bindings should <emphasis>not</emphasis> use
4415 * this function but g_object_new() instead.
4417 * Returns: An allocated and initialized instance, subject to further treatment by the fundamental type implementation.
4422 * g_type_default_interface_peek:
4423 * @g_type: an interface type
4425 * If the interface type @g_type is currently in use, returns its
4426 * default interface vtable.
4429 * Returns: (type GObject.TypeInterface) (transfer none): the default vtable for the interface, or %NULL if the type is not currently in use.
4434 * g_type_default_interface_ref:
4435 * @g_type: an interface type
4437 * Increments the reference count for the interface type @g_type,
4438 * and returns the default interface vtable for the type.
4440 * If the type is not currently in use, then the default vtable
4441 * for the type will be created and initalized by calling
4442 * the base interface init and default vtable init functions for
4443 * the type (the @<structfield>base_init</structfield>
4444 * and <structfield>class_init</structfield> members of #GTypeInfo).
4445 * Calling g_type_default_interface_ref() is useful when you
4446 * want to make sure that signals and properties for an interface
4447 * have been installed.
4450 * 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.
4455 * g_type_default_interface_unref:
4456 * @g_iface: (type GObject.TypeInterface): the default vtable structure for a interface, as returned by g_type_default_interface_ref()
4458 * Decrements the reference count for the type corresponding to the
4459 * interface default vtable @g_iface. If the type is dynamic, then
4460 * when no one is using the interface and all references have
4461 * been released, the finalize function for the interface's default
4462 * vtable (the <structfield>class_finalize</structfield> member of
4463 * #GTypeInfo) will be called.
4471 * @type: A #GType value.
4473 * Returns the length of the ancestry of the passed in type. This
4474 * includes the type itself, so that e.g. a fundamental type has depth 1.
4476 * Returns: The depth of @type.
4484 * Ensures that the indicated @type has been registered with the
4485 * type system, and its _class_init() method has been run.
4487 * In theory, simply calling the type's _get_type() method (or using
4488 * the corresponding macro) is supposed take care of this. However,
4489 * _get_type() methods are often marked %G_GNUC_CONST for performance
4490 * reasons, even though this is technically incorrect (since
4491 * %G_GNUC_CONST requires that the function not have side effects,
4492 * which _get_type() methods do on the first call). As a result, if
4493 * you write a bare call to a _get_type() macro, it may get optimized
4494 * out by the compiler. Using g_type_ensure() guarantees that the
4495 * type's _get_type() method is called.
4502 * g_type_free_instance:
4503 * @instance: an instance of a type.
4505 * Frees an instance of a type, returning it to the instance pool for
4506 * the type, if there is one.
4508 * Like g_type_create_instance(), this function is reserved for
4509 * implementors of fundamental types.
4515 * @name: Type name to lookup.
4517 * Lookup the type ID from a given type name, returning 0 if no type
4518 * has been registered under this name (this is the preferred method
4519 * to find out by name whether a specific type has been registered
4522 * Returns: Corresponding type ID or 0.
4527 * g_type_fundamental:
4528 * @type_id: valid type ID
4530 * Internal function, used to extract the fundamental type ID portion.
4531 * use G_TYPE_FUNDAMENTAL() instead.
4533 * Returns: fundamental type ID
4538 * g_type_fundamental_next:
4540 * Returns the next free fundamental type id which can be used to
4541 * register a new fundamental type with g_type_register_fundamental().
4542 * The returned type ID represents the highest currently registered
4543 * fundamental type identifier.
4545 * Returns: The nextmost fundamental type ID to be registered, or 0 if the type system ran out of fundamental type IDs.
4550 * g_type_get_plugin:
4551 * @type: The #GType to retrieve the plugin for.
4553 * Returns the #GTypePlugin structure for @type or
4554 * %NULL if @type does not have a #GTypePlugin structure.
4556 * Returns: (transfer none): The corresponding plugin if @type is a dynamic type, %NULL otherwise.
4563 * @quark: a #GQuark id to identify the data
4565 * Obtains data which has previously been attached to @type
4566 * with g_type_set_qdata().
4568 * Note that this does not take subtyping into account; data
4569 * attached to one type with g_type_set_qdata() cannot
4570 * be retrieved from a subtype using g_type_get_qdata().
4572 * Returns: (transfer none): the data, or %NULL if no data was found
4579 * This function used to initialise the type system. Since GLib 2.36,
4580 * the type system is initialised automatically and this function does
4583 * Deprecated: 2.36: the type system is now initialised automatically
4588 * g_type_init_with_debug_flags:
4589 * @debug_flags: Bitwise combination of #GTypeDebugFlags values for debugging purposes.
4591 * This function used to initialise the type system with debugging
4592 * flags. Since GLib 2.36, the type system is initialised automatically
4593 * and this function does nothing.
4595 * If you need to enable debugging features, use the GOBJECT_DEBUG
4596 * environment variable.
4598 * Deprecated: 2.36: the type system is now initialised automatically
4603 * g_type_interface_add_prerequisite:
4604 * @interface_type: #GType value of an interface type.
4605 * @prerequisite_type: #GType value of an interface or instantiatable type.
4607 * Adds @prerequisite_type to the list of prerequisites of @interface_type.
4608 * This means that any type implementing @interface_type must also implement
4609 * @prerequisite_type. Prerequisites can be thought of as an alternative to
4610 * interface derivation (which GType doesn't support). An interface can have
4611 * at most one instantiatable prerequisite type.
4616 * g_type_interface_get_plugin:
4617 * @instance_type: the #GType value of an instantiatable type.
4618 * @interface_type: the #GType value of an interface type.
4620 * Returns the #GTypePlugin structure for the dynamic interface
4621 * @interface_type which has been added to @instance_type, or %NULL if
4622 * @interface_type has not been added to @instance_type or does not
4623 * have a #GTypePlugin structure. See g_type_add_interface_dynamic().
4625 * Returns: (transfer none): the #GTypePlugin for the dynamic interface @interface_type of @instance_type.
4630 * g_type_interface_peek:
4631 * @instance_class: (type GObject.TypeClass): A #GTypeClass structure.
4632 * @iface_type: An interface ID which this class conforms to.
4634 * Returns the #GTypeInterface structure of an interface to which the
4635 * passed in class conforms.
4637 * Returns: (type GObject.TypeInterface) (transfer none): The GTypeInterface structure of iface_type if implemented by @instance_class, %NULL otherwise
4642 * g_type_interface_peek_parent:
4643 * @g_iface: (type GObject.TypeInterface): A #GTypeInterface structure.
4645 * Returns the corresponding #GTypeInterface structure of the parent type
4646 * of the instance type to which @g_iface belongs. This is useful when
4647 * deriving the implementation of an interface from the parent type and
4648 * then possibly overriding some methods.
4650 * 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.
4655 * g_type_interface_prerequisites:
4656 * @interface_type: an interface type
4657 * @n_prerequisites: (out) (allow-none): location to return the number of prerequisites, or %NULL
4659 * Returns the prerequisites of an interfaces type.
4662 * Returns: (array length=n_prerequisites) (transfer full): a newly-allocated zero-terminated array of #GType containing the prerequisites of @interface_type
4667 * g_type_interfaces:
4668 * @type: The type to list interface types for.
4669 * @n_interfaces: (out) (allow-none): Optional #guint pointer to contain the number of interface types.
4671 * Return a newly allocated and 0-terminated array of type IDs, listing the
4672 * interface types that @type conforms to. The return value has to be
4673 * g_free()ed after use.
4675 * Returns: (array length=n_interfaces) (transfer full): Newly allocated and 0-terminated array of interface types.
4681 * @type: Type to check anchestry for.
4682 * @is_a_type: Possible anchestor of @type or interface @type could conform to.
4684 * If @is_a_type is a derivable type, check whether @type is a
4685 * descendant of @is_a_type. If @is_a_type is an interface, check
4686 * whether @type conforms to it.
4688 * Returns: %TRUE if @type is_a @is_a_type holds true.
4693 * g_type_module_add_interface:
4694 * @module: a #GTypeModule
4695 * @instance_type: type to which to add the interface.
4696 * @interface_type: interface type to add
4697 * @interface_info: type information structure
4699 * Registers an additional interface for a type, whose interface lives
4700 * in the given type plugin. If the interface was already registered
4701 * for the type in this plugin, nothing will be done.
4703 * As long as any instances of the type exist, the type plugin will
4709 * g_type_module_register_enum:
4710 * @module: a #GTypeModule
4711 * @name: name for the type
4712 * @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.
4714 * Looks up or registers an enumeration that is implemented with a particular
4715 * type plugin. If a type with name @type_name was previously registered,
4716 * the #GType identifier for the type is returned, otherwise the type
4717 * is newly registered, and the resulting #GType identifier returned.
4719 * As long as any instances of the type exist, the type plugin will
4723 * Returns: the new or existing type ID
4728 * g_type_module_register_flags:
4729 * @module: a #GTypeModule
4730 * @name: name for the type
4731 * @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.
4733 * Looks up or registers a flags type that is implemented with a particular
4734 * type plugin. If a type with name @type_name was previously registered,
4735 * the #GType identifier for the type is returned, otherwise the type
4736 * is newly registered, and the resulting #GType identifier returned.
4738 * As long as any instances of the type exist, the type plugin will
4742 * Returns: the new or existing type ID
4747 * g_type_module_register_type:
4748 * @module: a #GTypeModule
4749 * @parent_type: the type for the parent class
4750 * @type_name: name for the type
4751 * @type_info: type information structure
4752 * @flags: flags field providing details about the type
4754 * Looks up or registers a type that is implemented with a particular
4755 * type plugin. If a type with name @type_name was previously registered,
4756 * the #GType identifier for the type is returned, otherwise the type
4757 * is newly registered, and the resulting #GType identifier returned.
4759 * When reregistering a type (typically because a module is unloaded
4760 * then reloaded, and reinitialized), @module and @parent_type must
4761 * be the same as they were previously.
4763 * As long as any instances of the type exist, the type plugin will
4766 * Returns: the new or existing type ID
4771 * g_type_module_set_name:
4772 * @module: a #GTypeModule.
4773 * @name: a human-readable name to use in error messages.
4775 * Sets the name for a #GTypeModule
4780 * g_type_module_unuse:
4781 * @module: a #GTypeModule
4783 * Decreases the use count of a #GTypeModule by one. If the
4784 * result is zero, the module will be unloaded. (However, the
4785 * #GTypeModule will not be freed, and types associated with the
4786 * #GTypeModule are not unregistered. Once a #GTypeModule is
4787 * initialized, it must exist forever.)
4792 * g_type_module_use:
4793 * @module: a #GTypeModule
4795 * Increases the use count of a #GTypeModule by one. If the
4796 * use count was zero before, the plugin will be loaded.
4797 * If loading the plugin fails, the use count is reset to
4800 * Returns: %FALSE if the plugin needed to be loaded and loading the plugin failed.
4806 * @type: Type to return name for.
4808 * Get the unique name that is assigned to a type ID. Note that this
4809 * function (like all other GType API) cannot cope with invalid type
4810 * IDs. %G_TYPE_INVALID may be passed to this function, as may be any
4811 * other validly registered type ID, but randomized type IDs should
4812 * not be passed in and will most likely lead to a crash.
4814 * Returns: Static type name or %NULL.
4820 * @leaf_type: Descendant of @root_type and the type to be returned.
4821 * @root_type: Immediate parent of the returned type.
4823 * Given a @leaf_type and a @root_type which is contained in its
4824 * anchestry, return the type that @root_type is the immediate parent
4825 * of. In other words, this function determines the type that is
4826 * derived directly from @root_type which is also a base class of
4827 * @leaf_type. Given a root type and a leaf type, this function can
4828 * be used to determine the types and order in which the leaf type is
4829 * descended from the root type.
4831 * Returns: Immediate child of @root_type and anchestor of @leaf_type.
4837 * @type: The derived type.
4839 * Return the direct parent type of the passed in type. If the passed
4840 * in type has no parent, i.e. is a fundamental type, 0 is returned.
4842 * Returns: The parent type.
4847 * g_type_plugin_complete_interface_info:
4848 * @plugin: the #GTypePlugin
4849 * @instance_type: the #GType of an instantiable type to which the interface is added
4850 * @interface_type: the #GType of the interface whose info is completed
4851 * @info: the #GInterfaceInfo to fill in
4853 * Calls the @complete_interface_info function from the
4854 * #GTypePluginClass of @plugin. There should be no need to use this
4855 * function outside of the GObject type system itself.
4860 * g_type_plugin_complete_type_info:
4861 * @plugin: a #GTypePlugin
4862 * @g_type: the #GType whose info is completed
4863 * @info: the #GTypeInfo struct to fill in
4864 * @value_table: the #GTypeValueTable to fill in
4866 * Calls the @complete_type_info function from the #GTypePluginClass of @plugin.
4867 * There should be no need to use this function outside of the GObject
4868 * type system itself.
4873 * g_type_plugin_unuse:
4874 * @plugin: a #GTypePlugin
4876 * Calls the @unuse_plugin function from the #GTypePluginClass of
4877 * @plugin. There should be no need to use this function outside of
4878 * the GObject type system itself.
4883 * g_type_plugin_use:
4884 * @plugin: a #GTypePlugin
4886 * Calls the @use_plugin function from the #GTypePluginClass of
4887 * @plugin. There should be no need to use this function outside of
4888 * the GObject type system itself.
4894 * @type: Type to return quark of type name for.
4896 * Get the corresponding quark of the type IDs name.
4898 * Returns: The type names quark or 0.
4904 * @type: the #GType value of a static, classed type.
4905 * @query: (out caller-allocates): A user provided structure that is filled in with constant values upon success.
4907 * Queries the type system for information about a specific type.
4908 * This function will fill in a user-provided structure to hold
4909 * type-specific information. If an invalid #GType is passed in, the
4910 * @type member of the #GTypeQuery is 0. All members filled into the
4911 * #GTypeQuery structure should be considered constant and have to be
4917 * g_type_register_dynamic:
4918 * @parent_type: Type from which this type will be derived.
4919 * @type_name: 0-terminated string used as the name of the new type.
4920 * @plugin: The #GTypePlugin structure to retrieve the #GTypeInfo from.
4921 * @flags: Bitwise combination of #GTypeFlags values.
4923 * Registers @type_name as the name of a new dynamic type derived from
4924 * @parent_type. The type system uses the information contained in the
4925 * #GTypePlugin structure pointed to by @plugin to manage the type and its
4926 * instances (if not abstract). The value of @flags determines the nature
4927 * (e.g. abstract or not) of the type.
4929 * Returns: The new type identifier or #G_TYPE_INVALID if registration failed.
4934 * g_type_register_fundamental:
4935 * @type_id: A predefined type identifier.
4936 * @type_name: 0-terminated string used as the name of the new type.
4937 * @info: The #GTypeInfo structure for this type.
4938 * @finfo: The #GTypeFundamentalInfo structure for this type.
4939 * @flags: Bitwise combination of #GTypeFlags values.
4941 * Registers @type_id as the predefined identifier and @type_name as the
4942 * name of a fundamental type. If @type_id is already registered, or a type
4943 * named @type_name is already registered, the behaviour is undefined. The type
4944 * system uses the information contained in the #GTypeInfo structure pointed to
4945 * by @info and the #GTypeFundamentalInfo structure pointed to by @finfo to
4946 * manage the type and its instances. The value of @flags determines additional
4947 * characteristics of the fundamental type.
4949 * Returns: The predefined type identifier.
4954 * g_type_register_static:
4955 * @parent_type: Type from which this type will be derived.
4956 * @type_name: 0-terminated string used as the name of the new type.
4957 * @info: The #GTypeInfo structure for this type.
4958 * @flags: Bitwise combination of #GTypeFlags values.
4960 * Registers @type_name as the name of a new static type derived from
4961 * @parent_type. The type system uses the information contained in the
4962 * #GTypeInfo structure pointed to by @info to manage the type and its
4963 * instances (if not abstract). The value of @flags determines the nature
4964 * (e.g. abstract or not) of the type.
4966 * Returns: The new type identifier.
4971 * g_type_register_static_simple: (skip)
4972 * @parent_type: Type from which this type will be derived.
4973 * @type_name: 0-terminated string used as the name of the new type.
4974 * @class_size: Size of the class structure (see #GTypeInfo)
4975 * @class_init: Location of the class initialization function (see #GTypeInfo)
4976 * @instance_size: Size of the instance structure (see #GTypeInfo)
4977 * @instance_init: Location of the instance initialization function (see #GTypeInfo)
4978 * @flags: Bitwise combination of #GTypeFlags values.
4980 * Registers @type_name as the name of a new static type derived from
4981 * @parent_type. The value of @flags determines the nature (e.g.
4982 * abstract or not) of the type. It works by filling a #GTypeInfo
4983 * struct and calling g_type_register_static().
4986 * Returns: The new type identifier.
4991 * g_type_remove_class_cache_func: (skip)
4992 * @cache_data: data that was given when adding @cache_func
4993 * @cache_func: a #GTypeClassCacheFunc
4995 * Removes a previously installed #GTypeClassCacheFunc. The cache
4996 * maintained by @cache_func has to be empty when calling
4997 * g_type_remove_class_cache_func() to avoid leaks.
5002 * g_type_remove_interface_check: (skip)
5003 * @check_data: callback data passed to g_type_add_interface_check()
5004 * @check_func: callback function passed to g_type_add_interface_check()
5006 * Removes an interface check function added with
5007 * g_type_add_interface_check().
5016 * @quark: a #GQuark id to identify the data
5019 * Attaches arbitrary data to a type.
5024 * g_type_value_table_peek: (skip)
5025 * @type: A #GType value.
5027 * Returns the location of the #GTypeValueTable associated with @type.
5028 * <emphasis>Note that this function should only be used from source code
5029 * that implements or has internal knowledge of the implementation of
5032 * Returns: Location of the #GTypeValueTable associated with @type or %NULL if there is no #GTypeValueTable associated with @type.
5037 * g_value_array_append:
5038 * @value_array: #GValueArray to add an element to
5039 * @value: (allow-none): #GValue to copy into #GValueArray, or %NULL
5041 * Insert a copy of @value as last element of @value_array. If @value is
5042 * %NULL, an uninitialized value is appended.
5044 * Returns: (transfer none): the #GValueArray passed in as @value_array
5045 * Deprecated: 2.32: Use #GArray and g_array_append_val() instead.
5050 * g_value_array_copy:
5051 * @value_array: #GValueArray to copy
5053 * Construct an exact copy of a #GValueArray by duplicating all its
5056 * Returns: (transfer full): Newly allocated copy of #GValueArray
5057 * Deprecated: 2.32: Use #GArray and g_array_ref() instead.
5062 * g_value_array_free:
5063 * @value_array: #GValueArray to free
5065 * Free a #GValueArray including its contents.
5067 * Deprecated: 2.32: Use #GArray and g_array_unref() instead.
5072 * g_value_array_get_nth:
5073 * @value_array: #GValueArray to get a value from
5074 * @index_: index of the value of interest
5076 * Return a pointer to the value at @index_ containd in @value_array.
5078 * Returns: (transfer none): pointer to a value at @index_ in @value_array
5079 * Deprecated: 2.32: Use g_array_index() instead.
5084 * g_value_array_insert:
5085 * @value_array: #GValueArray to add an element to
5086 * @index_: insertion position, must be <= value_array->n_values
5087 * @value: (allow-none): #GValue to copy into #GValueArray, or %NULL
5089 * Insert a copy of @value at specified position into @value_array. If @value
5090 * is %NULL, an uninitialized value is inserted.
5092 * Returns: (transfer none): the #GValueArray passed in as @value_array
5093 * Deprecated: 2.32: Use #GArray and g_array_insert_val() instead.
5098 * g_value_array_new:
5099 * @n_prealloced: number of values to preallocate space for
5101 * Allocate and initialize a new #GValueArray, optionally preserve space
5102 * for @n_prealloced elements. New arrays always contain 0 elements,
5103 * regardless of the value of @n_prealloced.
5105 * Returns: a newly allocated #GValueArray with 0 values
5106 * Deprecated: 2.32: Use #GArray and g_array_sized_new() instead.
5111 * g_value_array_prepend:
5112 * @value_array: #GValueArray to add an element to
5113 * @value: (allow-none): #GValue to copy into #GValueArray, or %NULL
5115 * Insert a copy of @value as first element of @value_array. If @value is
5116 * %NULL, an uninitialized value is prepended.
5118 * Returns: (transfer none): the #GValueArray passed in as @value_array
5119 * Deprecated: 2.32: Use #GArray and g_array_prepend_val() instead.
5124 * g_value_array_remove:
5125 * @value_array: #GValueArray to remove an element from
5126 * @index_: position of value to remove, which must be less than <code>value_array-><link linkend="GValueArray.n-values">n_values</link></code>
5128 * Remove the value at position @index_ from @value_array.
5130 * Returns: (transfer none): the #GValueArray passed in as @value_array
5131 * Deprecated: 2.32: Use #GArray and g_array_remove_index() instead.
5136 * g_value_array_sort:
5137 * @value_array: #GValueArray to sort
5138 * @compare_func: (scope call): function to compare elements
5140 * Sort @value_array using @compare_func to compare the elements according to
5141 * the semantics of #GCompareFunc.
5143 * The current implementation uses Quick-Sort as sorting algorithm.
5145 * Returns: (transfer none): the #GValueArray passed in as @value_array
5146 * Deprecated: 2.32: Use #GArray and g_array_sort().
5151 * g_value_array_sort_with_data:
5152 * @value_array: #GValueArray to sort
5153 * @compare_func: (scope call): function to compare elements
5154 * @user_data: (closure): extra data argument provided for @compare_func
5156 * Sort @value_array using @compare_func to compare the elements according
5157 * to the semantics of #GCompareDataFunc.
5159 * The current implementation uses Quick-Sort as sorting algorithm.
5161 * Rename to: g_value_array_sort
5162 * Returns: (transfer none): the #GValueArray passed in as @value_array
5163 * Deprecated: 2.32: Use #GArray and g_array_sort_with_data().
5169 * @src_value: An initialized #GValue structure.
5170 * @dest_value: An initialized #GValue structure of the same type as @src_value.
5172 * Copies the value of @src_value into @dest_value.
5177 * g_value_dup_boxed: (skip)
5178 * @value: a valid #GValue of %G_TYPE_BOXED derived type
5180 * Get the contents of a %G_TYPE_BOXED derived #GValue. Upon getting,
5181 * the boxed value is duplicated and needs to be later freed with
5182 * g_boxed_free(), e.g. like: g_boxed_free (G_VALUE_TYPE (@value),
5185 * Returns: boxed contents of @value
5190 * g_value_dup_object:
5191 * @value: a valid #GValue whose type is derived from %G_TYPE_OBJECT
5193 * Get the contents of a %G_TYPE_OBJECT derived #GValue, increasing
5194 * its reference count. If the contents of the #GValue are %NULL, then
5195 * %NULL will be returned.
5197 * Returns: (type GObject.Object) (transfer full): object content of @value, should be unreferenced when no longer needed.
5202 * g_value_dup_param: (skip)
5203 * @value: a valid #GValue whose type is derived from %G_TYPE_PARAM
5205 * Get the contents of a %G_TYPE_PARAM #GValue, increasing its
5208 * Returns: #GParamSpec content of @value, should be unreferenced when no longer needed.
5213 * g_value_dup_string:
5214 * @value: a valid #GValue of type %G_TYPE_STRING
5216 * Get a copy the contents of a %G_TYPE_STRING #GValue.
5218 * Returns: a newly allocated copy of the string content of @value
5223 * g_value_dup_variant:
5224 * @value: a valid #GValue of type %G_TYPE_VARIANT
5226 * Get the contents of a variant #GValue, increasing its refcount.
5228 * Returns: variant contents of @value, should be unrefed using g_variant_unref() when no longer needed
5234 * g_value_fits_pointer:
5235 * @value: An initialized #GValue structure.
5237 * Determines if @value will fit inside the size of a pointer value.
5238 * This is an internal function introduced mainly for C marshallers.
5240 * Returns: %TRUE if @value will fit inside a pointer value.
5245 * g_value_get_boolean:
5246 * @value: a valid #GValue of type %G_TYPE_BOOLEAN
5248 * Get the contents of a %G_TYPE_BOOLEAN #GValue.
5250 * Returns: boolean contents of @value
5255 * g_value_get_boxed:
5256 * @value: a valid #GValue of %G_TYPE_BOXED derived type
5258 * Get the contents of a %G_TYPE_BOXED derived #GValue.
5260 * Returns: (transfer none): boxed contents of @value
5266 * @value: a valid #GValue of type %G_TYPE_CHAR
5268 * Do not use this function; it is broken on platforms where the %char
5269 * type is unsigned, such as ARM and PowerPC. See g_value_get_schar().
5271 * Get the contents of a %G_TYPE_CHAR #GValue.
5273 * Returns: character contents of @value
5274 * Deprecated: 2.32: This function's return type is broken, see g_value_get_schar()
5279 * g_value_get_double:
5280 * @value: a valid #GValue of type %G_TYPE_DOUBLE
5282 * Get the contents of a %G_TYPE_DOUBLE #GValue.
5284 * Returns: double contents of @value
5290 * @value: a valid #GValue whose type is derived from %G_TYPE_ENUM
5292 * Get the contents of a %G_TYPE_ENUM #GValue.
5294 * Returns: enum contents of @value
5299 * g_value_get_flags:
5300 * @value: a valid #GValue whose type is derived from %G_TYPE_FLAGS
5302 * Get the contents of a %G_TYPE_FLAGS #GValue.
5304 * Returns: flags contents of @value
5309 * g_value_get_float:
5310 * @value: a valid #GValue of type %G_TYPE_FLOAT
5312 * Get the contents of a %G_TYPE_FLOAT #GValue.
5314 * Returns: float contents of @value
5319 * g_value_get_gtype:
5320 * @value: a valid #GValue of type %G_TYPE_GTYPE
5322 * Get the contents of a %G_TYPE_GTYPE #GValue.
5325 * Returns: the #GType stored in @value
5331 * @value: a valid #GValue of type %G_TYPE_INT
5333 * Get the contents of a %G_TYPE_INT #GValue.
5335 * Returns: integer contents of @value
5340 * g_value_get_int64:
5341 * @value: a valid #GValue of type %G_TYPE_INT64
5343 * Get the contents of a %G_TYPE_INT64 #GValue.
5345 * Returns: 64bit integer contents of @value
5351 * @value: a valid #GValue of type %G_TYPE_LONG
5353 * Get the contents of a %G_TYPE_LONG #GValue.
5355 * Returns: long integer contents of @value
5360 * g_value_get_object:
5361 * @value: a valid #GValue of %G_TYPE_OBJECT derived type
5363 * Get the contents of a %G_TYPE_OBJECT derived #GValue.
5365 * Returns: (type GObject.Object) (transfer none): object contents of @value
5370 * g_value_get_param:
5371 * @value: a valid #GValue whose type is derived from %G_TYPE_PARAM
5373 * Get the contents of a %G_TYPE_PARAM #GValue.
5375 * Returns: (transfer none): #GParamSpec content of @value
5380 * g_value_get_pointer:
5381 * @value: a valid #GValue of %G_TYPE_POINTER
5383 * Get the contents of a pointer #GValue.
5385 * Returns: (transfer none): pointer contents of @value
5390 * g_value_get_schar:
5391 * @value: a valid #GValue of type %G_TYPE_CHAR
5393 * Get the contents of a %G_TYPE_CHAR #GValue.
5395 * Returns: signed 8 bit integer contents of @value
5401 * g_value_get_string:
5402 * @value: a valid #GValue of type %G_TYPE_STRING
5404 * Get the contents of a %G_TYPE_STRING #GValue.
5406 * Returns: string content of @value
5411 * g_value_get_uchar:
5412 * @value: a valid #GValue of type %G_TYPE_UCHAR
5414 * Get the contents of a %G_TYPE_UCHAR #GValue.
5416 * Returns: unsigned character contents of @value
5422 * @value: a valid #GValue of type %G_TYPE_UINT
5424 * Get the contents of a %G_TYPE_UINT #GValue.
5426 * Returns: unsigned integer contents of @value
5431 * g_value_get_uint64:
5432 * @value: a valid #GValue of type %G_TYPE_UINT64
5434 * Get the contents of a %G_TYPE_UINT64 #GValue.
5436 * Returns: unsigned 64bit integer contents of @value
5441 * g_value_get_ulong:
5442 * @value: a valid #GValue of type %G_TYPE_ULONG
5444 * Get the contents of a %G_TYPE_ULONG #GValue.
5446 * Returns: unsigned long integer contents of @value
5451 * g_value_get_variant:
5452 * @value: a valid #GValue of type %G_TYPE_VARIANT
5454 * Get the contents of a variant #GValue.
5456 * Returns: variant contents of @value
5463 * @value: A zero-filled (uninitialized) #GValue structure.
5464 * @g_type: Type the #GValue should hold values of.
5466 * Initializes @value with the default value of @type.
5468 * Returns: (transfer none): the #GValue structure that has been passed in
5473 * g_value_peek_pointer:
5474 * @value: An initialized #GValue structure.
5476 * 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.
5481 * g_value_register_transform_func: (skip)
5482 * @src_type: Source type.
5483 * @dest_type: Target type.
5484 * @transform_func: a function which transforms values of type @src_type into value of type @dest_type
5486 * Registers a value transformation function for use in g_value_transform().
5487 * A previously registered transformation function for @src_type and @dest_type
5494 * @value: An initialized #GValue structure.
5496 * Clears the current value in @value and resets it to the default value
5497 * (as if the value had just been initialized).
5499 * Returns: the #GValue structure that has been passed in
5504 * g_value_set_boolean:
5505 * @value: a valid #GValue of type %G_TYPE_BOOLEAN
5506 * @v_boolean: boolean value to be set
5508 * Set the contents of a %G_TYPE_BOOLEAN #GValue to @v_boolean.
5513 * g_value_set_boxed:
5514 * @value: a valid #GValue of %G_TYPE_BOXED derived type
5515 * @v_boxed: (allow-none): boxed value to be set
5517 * Set the contents of a %G_TYPE_BOXED derived #GValue to @v_boxed.
5522 * g_value_set_boxed_take_ownership:
5523 * @value: a valid #GValue of %G_TYPE_BOXED derived type
5524 * @v_boxed: (allow-none): duplicated unowned boxed value to be set
5526 * This is an internal function introduced mainly for C marshallers.
5528 * Deprecated: 2.4: Use g_value_take_boxed() instead.
5534 * @value: a valid #GValue of type %G_TYPE_CHAR
5535 * @v_char: character value to be set
5537 * Set the contents of a %G_TYPE_CHAR #GValue to @v_char.
5539 * Deprecated: 2.32: This function's input type is broken, see g_value_set_schar()
5544 * g_value_set_double:
5545 * @value: a valid #GValue of type %G_TYPE_DOUBLE
5546 * @v_double: double value to be set
5548 * Set the contents of a %G_TYPE_DOUBLE #GValue to @v_double.
5554 * @value: a valid #GValue whose type is derived from %G_TYPE_ENUM
5555 * @v_enum: enum value to be set
5557 * Set the contents of a %G_TYPE_ENUM #GValue to @v_enum.
5562 * g_value_set_flags:
5563 * @value: a valid #GValue whose type is derived from %G_TYPE_FLAGS
5564 * @v_flags: flags value to be set
5566 * Set the contents of a %G_TYPE_FLAGS #GValue to @v_flags.
5571 * g_value_set_float:
5572 * @value: a valid #GValue of type %G_TYPE_FLOAT
5573 * @v_float: float value to be set
5575 * Set the contents of a %G_TYPE_FLOAT #GValue to @v_float.
5580 * g_value_set_gtype:
5581 * @value: a valid #GValue of type %G_TYPE_GTYPE
5582 * @v_gtype: #GType to be set
5584 * Set the contents of a %G_TYPE_GTYPE #GValue to @v_gtype.
5591 * g_value_set_instance:
5592 * @value: An initialized #GValue structure.
5593 * @instance: (allow-none): the instance
5595 * Sets @value from an instantiatable type via the
5596 * value_table's collect_value() function.
5602 * @value: a valid #GValue of type %G_TYPE_INT
5603 * @v_int: integer value to be set
5605 * Set the contents of a %G_TYPE_INT #GValue to @v_int.
5610 * g_value_set_int64:
5611 * @value: a valid #GValue of type %G_TYPE_INT64
5612 * @v_int64: 64bit integer value to be set
5614 * Set the contents of a %G_TYPE_INT64 #GValue to @v_int64.
5620 * @value: a valid #GValue of type %G_TYPE_LONG
5621 * @v_long: long integer value to be set
5623 * Set the contents of a %G_TYPE_LONG #GValue to @v_long.
5628 * g_value_set_object:
5629 * @value: a valid #GValue of %G_TYPE_OBJECT derived type
5630 * @v_object: (type GObject.Object) (allow-none): object value to be set
5632 * Set the contents of a %G_TYPE_OBJECT derived #GValue to @v_object.
5634 * g_value_set_object() increases the reference count of @v_object
5635 * (the #GValue holds a reference to @v_object). If you do not wish
5636 * to increase the reference count of the object (i.e. you wish to
5637 * pass your current reference to the #GValue because you no longer
5638 * need it), use g_value_take_object() instead.
5640 * It is important that your #GValue holds a reference to @v_object (either its
5641 * own, or one it has taken) to ensure that the object won't be destroyed while
5642 * the #GValue still exists).
5647 * g_value_set_object_take_ownership: (skip)
5648 * @value: a valid #GValue of %G_TYPE_OBJECT derived type
5649 * @v_object: (allow-none): object value to be set
5651 * This is an internal function introduced mainly for C marshallers.
5653 * Deprecated: 2.4: Use g_value_take_object() instead.
5658 * g_value_set_param:
5659 * @value: a valid #GValue of type %G_TYPE_PARAM
5660 * @param: (allow-none): the #GParamSpec to be set
5662 * Set the contents of a %G_TYPE_PARAM #GValue to @param.
5667 * g_value_set_param_take_ownership: (skip)
5668 * @value: a valid #GValue of type %G_TYPE_PARAM
5669 * @param: (allow-none): the #GParamSpec to be set
5671 * This is an internal function introduced mainly for C marshallers.
5673 * Deprecated: 2.4: Use g_value_take_param() instead.
5678 * g_value_set_pointer:
5679 * @value: a valid #GValue of %G_TYPE_POINTER
5680 * @v_pointer: pointer value to be set
5682 * Set the contents of a pointer #GValue to @v_pointer.
5687 * g_value_set_schar:
5688 * @value: a valid #GValue of type %G_TYPE_CHAR
5689 * @v_char: signed 8 bit integer to be set
5691 * Set the contents of a %G_TYPE_CHAR #GValue to @v_char.
5698 * g_value_set_static_boxed:
5699 * @value: a valid #GValue of %G_TYPE_BOXED derived type
5700 * @v_boxed: (allow-none): static boxed value to be set
5702 * Set the contents of a %G_TYPE_BOXED derived #GValue to @v_boxed.
5703 * The boxed value is assumed to be static, and is thus not duplicated
5704 * when setting the #GValue.
5709 * g_value_set_static_string:
5710 * @value: a valid #GValue of type %G_TYPE_STRING
5711 * @v_string: (allow-none): static string to be set
5713 * Set the contents of a %G_TYPE_STRING #GValue to @v_string.
5714 * The string is assumed to be static, and is thus not duplicated
5715 * when setting the #GValue.
5720 * g_value_set_string:
5721 * @value: a valid #GValue of type %G_TYPE_STRING
5722 * @v_string: (allow-none): caller-owned string to be duplicated for the #GValue
5724 * Set the contents of a %G_TYPE_STRING #GValue to @v_string.
5729 * g_value_set_string_take_ownership:
5730 * @value: a valid #GValue of type %G_TYPE_STRING
5731 * @v_string: (allow-none): duplicated unowned string to be set
5733 * This is an internal function introduced mainly for C marshallers.
5735 * Deprecated: 2.4: Use g_value_take_string() instead.
5740 * g_value_set_uchar:
5741 * @value: a valid #GValue of type %G_TYPE_UCHAR
5742 * @v_uchar: unsigned character value to be set
5744 * Set the contents of a %G_TYPE_UCHAR #GValue to @v_uchar.
5750 * @value: a valid #GValue of type %G_TYPE_UINT
5751 * @v_uint: unsigned integer value to be set
5753 * Set the contents of a %G_TYPE_UINT #GValue to @v_uint.
5758 * g_value_set_uint64:
5759 * @value: a valid #GValue of type %G_TYPE_UINT64
5760 * @v_uint64: unsigned 64bit integer value to be set
5762 * Set the contents of a %G_TYPE_UINT64 #GValue to @v_uint64.
5767 * g_value_set_ulong:
5768 * @value: a valid #GValue of type %G_TYPE_ULONG
5769 * @v_ulong: unsigned long integer value to be set
5771 * Set the contents of a %G_TYPE_ULONG #GValue to @v_ulong.
5776 * g_value_set_variant:
5777 * @value: a valid #GValue of type %G_TYPE_VARIANT
5778 * @variant: (allow-none): a #GVariant, or %NULL
5780 * Set the contents of a variant #GValue to @variant.
5781 * If the variant is floating, it is consumed.
5788 * g_value_take_boxed:
5789 * @value: a valid #GValue of %G_TYPE_BOXED derived type
5790 * @v_boxed: (allow-none): duplicated unowned boxed value to be set
5792 * Sets the contents of a %G_TYPE_BOXED derived #GValue to @v_boxed
5793 * and takes over the ownership of the callers reference to @v_boxed;
5794 * the caller doesn't have to unref it any more.
5801 * g_value_take_object: (skip)
5802 * @value: a valid #GValue of %G_TYPE_OBJECT derived type
5803 * @v_object: (allow-none): object value to be set
5805 * Sets the contents of a %G_TYPE_OBJECT derived #GValue to @v_object
5806 * and takes over the ownership of the callers reference to @v_object;
5807 * the caller doesn't have to unref it any more (i.e. the reference
5808 * count of the object is not increased).
5810 * If you want the #GValue to hold its own reference to @v_object, use
5811 * g_value_set_object() instead.
5818 * g_value_take_param: (skip)
5819 * @value: a valid #GValue of type %G_TYPE_PARAM
5820 * @param: (allow-none): the #GParamSpec to be set
5822 * Sets the contents of a %G_TYPE_PARAM #GValue to @param and takes
5823 * over the ownership of the callers reference to @param; the caller
5824 * doesn't have to unref it any more.
5831 * g_value_take_string:
5832 * @value: a valid #GValue of type %G_TYPE_STRING
5833 * @v_string: (allow-none): string to take ownership of
5835 * Sets the contents of a %G_TYPE_STRING #GValue to @v_string.
5842 * g_value_take_variant:
5843 * @value: a valid #GValue of type %G_TYPE_VARIANT
5844 * @variant: (allow-none): a #GVariant, or %NULL
5846 * Set the contents of a variant #GValue to @variant, and takes over
5847 * the ownership of the caller's reference to @variant;
5848 * the caller doesn't have to unref it any more (i.e. the reference
5849 * count of the variant is not increased).
5851 * If @variant was floating then its floating reference is converted to
5854 * If you want the #GValue to hold its own reference to @variant, use
5855 * g_value_set_variant() instead.
5857 * This is an internal function introduced mainly for C marshallers.
5864 * g_value_transform:
5865 * @src_value: Source value.
5866 * @dest_value: Target value.
5868 * Tries to cast the contents of @src_value into a type appropriate
5869 * to store in @dest_value, e.g. to transform a %G_TYPE_INT value
5870 * into a %G_TYPE_FLOAT value. Performing transformations between
5871 * value types might incur precision lossage. Especially
5872 * transformations into strings might reveal seemingly arbitrary
5873 * results and shouldn't be relied upon for production code (such
5874 * as rcfile value or object property serialization).
5876 * Returns: Whether a transformation rule was found and could be applied. Upon failing transformations, @dest_value is left untouched.
5881 * g_value_type_compatible:
5882 * @src_type: source type to be copied.
5883 * @dest_type: destination type for copying.
5885 * Returns whether a #GValue of type @src_type can be copied into
5886 * a #GValue of type @dest_type.
5888 * Returns: %TRUE if g_value_copy() is possible with @src_type and @dest_type.
5893 * g_value_type_transformable:
5894 * @src_type: Source type.
5895 * @dest_type: Target type.
5897 * Check whether g_value_transform() is able to transform values
5898 * of type @src_type into values of type @dest_type.
5900 * Returns: %TRUE if the transformation is possible, %FALSE otherwise.
5906 * @value: An initialized #GValue structure.
5908 * Clears the current value in @value and "unsets" the type,
5909 * this releases all resources associated with this GValue.
5910 * An unset value is the same as an uninitialized (zero-filled)
5911 * #GValue structure.
5916 * g_variant_get_gtype:
5924 * g_weak_ref_clear: (skip)
5925 * @weak_ref: (inout): location of a weak reference, which may be empty
5927 * Frees resources associated with a non-statically-allocated #GWeakRef.
5928 * After this call, the #GWeakRef is left in an undefined state.
5930 * You should only call this on a #GWeakRef that previously had
5931 * g_weak_ref_init() called on it.
5938 * g_weak_ref_get: (skip)
5939 * @weak_ref: (inout): location of a weak reference to a #GObject
5941 * If @weak_ref is not empty, atomically acquire a strong
5942 * reference to the object it points to, and return that reference.
5944 * This function is needed because of the potential race between taking
5945 * the pointer value and g_object_ref() on it, if the object was losing
5946 * its last reference at the same time in a different thread.
5948 * The caller should release the resulting reference in the usual way,
5949 * by using g_object_unref().
5951 * Returns: (transfer full) (type GObject.Object): the object pointed to by @weak_ref, or %NULL if it was empty
5957 * g_weak_ref_init: (skip)
5958 * @weak_ref: (inout): uninitialized or empty location for a weak reference
5959 * @object: (allow-none): a #GObject or %NULL
5961 * Initialise a non-statically-allocated #GWeakRef.
5963 * This function also calls g_weak_ref_set() with @object on the
5964 * freshly-initialised weak reference.
5966 * This function should always be matched with a call to
5967 * g_weak_ref_clear(). It is not necessary to use this function for a
5968 * #GWeakRef in static storage because it will already be
5969 * properly initialised. Just use g_weak_ref_set() directly.
5976 * g_weak_ref_set: (skip)
5977 * @weak_ref: location for a weak reference
5978 * @object: (allow-none): a #GObject or %NULL
5980 * Change the object to which @weak_ref points, or set it to
5983 * You must own a strong reference on @object while calling this
5991 /************************************************************/
5992 /* THIS FILE IS GENERATED DO NOT EDIT */
5993 /************************************************************/