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 * <note><para>Bindings for languages with garbage collection can use
214 * g_binding_unbind() to explicitly release a binding between the source
215 * and target properties, instead of relying on the last reference on the
216 * binding, source, and target instances to drop.</para></note>
218 * #GBinding is available since GObject 2.26
224 * @short_description: A mechanism to wrap opaque C structures registered by the type system
225 * @see_also: #GParamSpecBoxed, g_param_spec_boxed()
226 * @title: Boxed Types
228 * GBoxed is a generic wrapper mechanism for arbitrary C structures. The only
229 * thing the type system needs to know about the structures is how to copy and
230 * free them, beyond that they are treated as opaque chunks of memory.
232 * Boxed types are useful for simple value-holder structures like rectangles or
233 * points. They can also be used for wrapping structures defined in non-GObject
240 * @short_description: Functions as first-class objects
243 * A #GClosure represents a callback supplied by the programmer. It
244 * will generally comprise a function of some kind and a marshaller
245 * used to call it. It is the reponsibility of the marshaller to
246 * convert the arguments for the invocation from #GValue<!-- -->s into
247 * a suitable form, perform the callback on the converted arguments,
248 * and transform the return value back into a #GValue.
250 * In the case of C programs, a closure usually just holds a pointer
251 * to a function and maybe a data argument, and the marshaller
252 * converts between #GValue<!-- --> and native C types. The GObject
253 * library provides the #GCClosure type for this purpose. Bindings for
254 * other languages need marshallers which convert between #GValue<!--
255 * -->s and suitable representations in the runtime of the language in
256 * order to use functions written in that languages as callbacks.
258 * Within GObject, closures play an important role in the
259 * implementation of signals. When a signal is registered, the
260 * @c_marshaller argument to g_signal_new() specifies the default C
261 * marshaller for any closure which is connected to this
262 * signal. GObject provides a number of C marshallers for this
263 * purpose, see the g_cclosure_marshal_*() functions. Additional C
264 * marshallers can be generated with the <link
265 * linkend="glib-genmarshal">glib-genmarshal</link> utility. Closures
266 * can be explicitly connected to signals with
267 * g_signal_connect_closure(), but it usually more convenient to let
268 * GObject create a closure automatically by using one of the
269 * g_signal_connect_*() functions which take a callback function/user
272 * Using closures has a number of important advantages over a simple
273 * callback function/data pointer combination:
276 * Closures allow the callee to get the types of the callback parameters,
277 * which means that language bindings don't have to write individual glue
278 * for each callback type.
281 * The reference counting of #GClosure makes it easy to handle reentrancy
282 * right; if a callback is removed while it is being invoked, the closure
283 * and its parameters won't be freed until the invocation finishes.
286 * g_closure_invalidate() and invalidation notifiers allow callbacks to be
287 * automatically removed when the objects they point to go away.
294 * SECTION:generic_values
295 * @short_description: A polymorphic type that can hold values of any other type
296 * @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.
297 * @title: Generic values
299 * The #GValue structure is basically a variable container that consists
300 * of a type identifier and a specific value of that type.
301 * The type identifier within a #GValue structure always determines the
302 * type of the associated value.
303 * To create a undefined #GValue structure, simply create a zero-filled
304 * #GValue structure. To initialize the #GValue, use the g_value_init()
305 * function. A #GValue cannot be used until it is initialized.
306 * The basic type operations (such as freeing and copying) are determined
307 * by the #GTypeValueTable associated with the type ID stored in the #GValue.
308 * Other #GValue operations (such as converting values between types) are
309 * provided by this interface.
311 * The code in the example program below demonstrates #GValue's
315 * #include <glib-object.h>
318 * int2string (const GValue *src_value,
319 * GValue *dest_value)
321 * if (g_value_get_int (src_value) == 42)
322 * g_value_set_static_string (dest_value, "An important number");
324 * g_value_set_static_string (dest_value, "What's that?");
331 * /* GValues must be initialized */
332 * GValue a = G_VALUE_INIT;
333 * GValue b = G_VALUE_INIT;
334 * const gchar *message;
336 * /* The GValue starts empty */
337 * g_assert (!G_VALUE_HOLDS_STRING (&a));
339 * /* Put a string in it */
340 * g_value_init (&a, G_TYPE_STRING);
341 * g_assert (G_VALUE_HOLDS_STRING (&a));
342 * g_value_set_static_string (&a, "Hello, world!");
343 * g_printf ("%s\n", g_value_get_string (&a));
345 * /* Reset it to its pristine state */
346 * g_value_unset (&a);
348 * /* It can then be reused for another type */
349 * g_value_init (&a, G_TYPE_INT);
350 * g_value_set_int (&a, 42);
352 * /* Attempt to transform it into a GValue of type STRING */
353 * g_value_init (&b, G_TYPE_STRING);
355 * /* An INT is transformable to a STRING */
356 * g_assert (g_value_type_transformable (G_TYPE_INT, G_TYPE_STRING));
358 * g_value_transform (&a, &b);
359 * g_printf ("%s\n", g_value_get_string (&b));
361 * /* Attempt to transform it again using a custom transform function */
362 * g_value_register_transform_func (G_TYPE_INT, G_TYPE_STRING, int2string);
363 * g_value_transform (&a, &b);
364 * g_printf ("%s\n", g_value_get_string (&b));
373 * @short_description: Metadata for parameter specifications
374 * @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()
377 * #GParamSpec is an object structure that encapsulates the metadata
378 * required to specify parameters, such as e.g. #GObject properties.
380 * <para id="canonical-parameter-name">
381 * Parameter names need to start with a letter (a-z or A-Z). Subsequent
382 * characters can be letters, numbers or a '-'.
383 * All other characters are replaced by a '-' during construction.
384 * The result of this replacement is called the canonical name of the
392 * @short_description: The GLib Runtime type identification and management system
393 * @title: Type Information
395 * The GType API is the foundation of the GObject system. It provides the
396 * facilities for registering and managing all fundamental data types,
397 * user-defined object and interface types.
399 * For type creation and registration purposes, all types fall into one of
400 * two categories: static or dynamic. Static types are never loaded or
401 * unloaded at run-time as dynamic types may be. Static types are created
402 * with g_type_register_static() that gets type specific information passed
403 * in via a #GTypeInfo structure.
404 * Dynamic types are created with g_type_register_dynamic() which takes a
405 * #GTypePlugin structure instead. The remaining type information (the
406 * #GTypeInfo structure) is retrieved during runtime through #GTypePlugin
407 * and the g_type_plugin_*() API.
408 * These registration functions are usually called only once from a
409 * function whose only purpose is to return the type identifier for a
410 * specific class. Once the type (or class or interface) is registered,
411 * it may be instantiated, inherited, or implemented depending on exactly
412 * what sort of type it is.
413 * There is also a third registration function for registering fundamental
414 * types called g_type_register_fundamental() which requires both a #GTypeInfo
415 * structure and a #GTypeFundamentalInfo structure but it is seldom used
416 * since most fundamental types are predefined rather than user-defined.
418 * Type instance and class structs are limited to a total of 64 KiB,
419 * including all parent types. Similarly, type instances' private data
420 * (as created by g_type_class_add_private()) are limited to a total of
421 * 64 KiB. If a type instance needs a large static buffer, allocate it
422 * separately (typically by using #GArray or #GPtrArray) and put a pointer
423 * to the buffer in the structure.
425 * A final word about type names.
426 * Such an identifier needs to be at least three characters long. There is no
427 * upper length limit. The first character needs to be a letter (a-z or A-Z)
428 * or an underscore '_'. Subsequent characters can be letters, numbers or
434 * SECTION:gtypemodule
435 * @short_description: Type loading modules
436 * @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>
437 * @title: GTypeModule
439 * #GTypeModule provides a simple implementation of the #GTypePlugin
440 * interface. The model of #GTypeModule is a dynamically loaded module
441 * which implements some number of types and interface
442 * implementations. When the module is loaded, it registers its types
443 * and interfaces using g_type_module_register_type() and
444 * g_type_module_add_interface(). As long as any instances of these
445 * types and interface implementations are in use, the module is kept
446 * loaded. When the types and interfaces are gone, the module may be
447 * unloaded. If the types and interfaces become used again, the module
448 * will be reloaded. Note that the last unref cannot happen in module
449 * code, since that would lead to the caller's code being unloaded before
450 * g_object_unref() returns to it.
452 * Keeping track of whether the module should be loaded or not is done by
453 * using a use count - it starts at zero, and whenever it is greater than
454 * zero, the module is loaded. The use count is maintained internally by
455 * the type system, but also can be explicitly controlled by
456 * g_type_module_use() and g_type_module_unuse(). Typically, when loading
457 * a module for the first type, g_type_module_use() will be used to load
458 * it so that it can initialize its types. At some later point, when the
459 * module no longer needs to be loaded except for the type
460 * implementations it contains, g_type_module_unuse() is called.
462 * #GTypeModule does not actually provide any implementation of module
463 * loading and unloading. To create a particular module type you must
464 * derive from #GTypeModule and implement the load and unload functions
465 * in #GTypeModuleClass.
470 * SECTION:gtypeplugin
471 * @short_description: An interface for dynamically loadable types
472 * @see_also: #GTypeModule and g_type_register_dynamic().
473 * @title: GTypePlugin
475 * The GObject type system supports dynamic loading of types. The
476 * #GTypePlugin interface is used to handle the lifecycle of
477 * dynamically loaded types. It goes as follows:
481 * The type is initially introduced (usually upon loading the module
482 * the first time, or by your main application that knows what modules
483 * introduces what types), like this:
485 * new_type_id = g_type_register_dynamic (parent_type_id,
490 * where <literal>new_type_plugin</literal> is an implementation of the
491 * #GTypePlugin interface.
494 * The type's implementation is referenced, e.g. through
495 * g_type_class_ref() or through g_type_create_instance() (this is
496 * being called by g_object_new()) or through one of the above done on
497 * a type derived from <literal>new_type_id</literal>.
500 * This causes the type system to load the type's implementation by calling
501 * g_type_plugin_use() and g_type_plugin_complete_type_info() on
502 * <literal>new_type_plugin</literal>.
505 * At some point the type's implementation isn't required anymore, e.g. after
506 * g_type_class_unref() or g_type_free_instance() (called when the reference
507 * count of an instance drops to zero).
510 * This causes the type system to throw away the information retrieved from
511 * g_type_plugin_complete_type_info() and then it calls
512 * g_type_plugin_unuse() on <literal>new_type_plugin</literal>.
515 * Things may repeat from the second step.
519 * So basically, you need to implement a #GTypePlugin type that
520 * carries a use_count, once use_count goes from zero to one, you need
521 * to load the implementation to successfully handle the upcoming
522 * g_type_plugin_complete_type_info() call. Later, maybe after
523 * succeeding use/unuse calls, once use_count drops to zero, you can
524 * unload the implementation again. The type system makes sure to call
525 * g_type_plugin_use() and g_type_plugin_complete_type_info() again
526 * when the type is needed again.
528 * #GTypeModule is an implementation of #GTypePlugin that already
529 * implements most of this except for the actual module loading and
530 * unloading. It even handles multiple registered types per module.
537 * @short_description: The base object type
538 * @see_also: #GParamSpecObject, g_param_spec_object()
540 * GObject is the fundamental type providing the common attributes and
541 * methods for all object types in GTK+, Pango and other libraries
542 * based on GObject. The GObject class provides methods for object
543 * construction and destruction, property access methods, and signal
544 * support. Signals are described in detail in <xref
545 * linkend="gobject-Signals"/>.
547 * <para id="floating-ref">
548 * GInitiallyUnowned is derived from GObject. The only difference between
549 * the two is that the initial reference of a GInitiallyUnowned is flagged
550 * as a <firstterm>floating</firstterm> reference.
551 * This means that it is not specifically claimed to be "owned" by
552 * any code portion. The main motivation for providing floating references is
553 * C convenience. In particular, it allows code to be written as:
555 * container = create_container ();
556 * container_add_child (container, create_child());
558 * If <function>container_add_child()</function> will g_object_ref_sink() the
559 * passed in child, no reference of the newly created child is leaked.
560 * Without floating references, <function>container_add_child()</function>
561 * can only g_object_ref() the new child, so to implement this code without
562 * reference leaks, it would have to be written as:
565 * container = create_container ();
566 * child = create_child ();
567 * container_add_child (container, child);
568 * g_object_unref (child);
570 * The floating reference can be converted into
571 * an ordinary reference by calling g_object_ref_sink().
572 * For already sunken objects (objects that don't have a floating reference
573 * anymore), g_object_ref_sink() is equivalent to g_object_ref() and returns
575 * Since floating references are useful almost exclusively for C convenience,
576 * language bindings that provide automated reference and memory ownership
577 * maintenance (such as smart pointers or garbage collection) should not
578 * expose floating references in their API.
581 * Some object implementations may need to save an objects floating state
582 * across certain code portions (an example is #GtkMenu), to achieve this,
583 * the following sequence can be used:
586 * /* save floating state */
587 * gboolean was_floating = g_object_is_floating (object);
588 * g_object_ref_sink (object);
589 * /* protected code portion */
591 * /* restore floating state */
593 * g_object_force_floating (object);
595 * g_object_unref (object); /* release previously acquired reference */
601 * SECTION:param_value_types
602 * @short_description: Standard Parameter and Value Types
603 * @see_also: #GParamSpec, #GValue, g_object_class_install_property().
604 * @title: Parameters and Values
606 * #GValue provides an abstract container structure which can be
607 * copied, transformed and compared while holding a value of any
608 * (derived) type, which is registered as a #GType with a
609 * #GTypeValueTable in its #GTypeInfo structure. Parameter
610 * specifications for most value types can be created as #GParamSpec
611 * derived instances, to implement e.g. #GObject properties which
612 * operate on #GValue containers.
614 * Parameter names need to start with a letter (a-z or A-Z). Subsequent
615 * characters can be letters, numbers or a '-'.
616 * All other characters are replaced by a '-' during construction.
622 * @short_description: A means for customization of object behaviour and a general purpose notification mechanism
625 * The basic concept of the signal system is that of the
626 * <emphasis>emission</emphasis> of a signal. Signals are introduced
627 * per-type and are identified through strings. Signals introduced
628 * for a parent type are available in derived types as well, so
629 * basically they are a per-type facility that is inherited. A signal
630 * emission mainly involves invocation of a certain set of callbacks
631 * in precisely defined manner. There are two main categories of such
632 * callbacks, per-object
633 * <footnote><para>Although signals can deal with any kind of instantiatable
634 * type, i'm referring to those types as "object types" in the following,
635 * simply because that is the context most users will encounter signals in.
637 * ones and user provided ones.
638 * The per-object callbacks are most often referred to as "object method
639 * handler" or "default (signal) handler", while user provided callbacks are
640 * usually just called "signal handler".
641 * The object method handler is provided at signal creation time (this most
642 * frequently happens at the end of an object class' creation), while user
643 * provided handlers are frequently connected and disconnected to/from a certain
644 * signal on certain object instances.
646 * A signal emission consists of five stages, unless prematurely stopped:
648 * <varlistentry><term></term><listitem><para>
649 * 1 - Invocation of the object method handler for %G_SIGNAL_RUN_FIRST signals
650 * </para></listitem></varlistentry>
651 * <varlistentry><term></term><listitem><para>
652 * 2 - Invocation of normal user-provided signal handlers (<emphasis>after</emphasis> flag %FALSE)
653 * </para></listitem></varlistentry>
654 * <varlistentry><term></term><listitem><para>
655 * 3 - Invocation of the object method handler for %G_SIGNAL_RUN_LAST signals
656 * </para></listitem></varlistentry>
657 * <varlistentry><term></term><listitem><para>
658 * 4 - Invocation of user provided signal handlers, connected with an <emphasis>after</emphasis> flag of %TRUE
659 * </para></listitem></varlistentry>
660 * <varlistentry><term></term><listitem><para>
661 * 5 - Invocation of the object method handler for %G_SIGNAL_RUN_CLEANUP signals
662 * </para></listitem></varlistentry>
664 * The user-provided signal handlers are called in the order they were
666 * All handlers may prematurely stop a signal emission, and any number of
667 * handlers may be connected, disconnected, blocked or unblocked during
669 * There are certain criteria for skipping user handlers in stages 2 and 4
670 * of a signal emission.
671 * First, user handlers may be <emphasis>blocked</emphasis>, blocked handlers are omitted
672 * during callback invocation, to return from the "blocked" state, a
673 * handler has to get unblocked exactly the same amount of times
674 * it has been blocked before.
675 * Second, upon emission of a %G_SIGNAL_DETAILED signal, an additional
676 * "detail" argument passed in to g_signal_emit() has to match the detail
677 * argument of the signal handler currently subject to invocation.
678 * Specification of no detail argument for signal handlers (omission of the
679 * detail part of the signal specification upon connection) serves as a
680 * wildcard and matches any detail argument passed in to emission.
685 * SECTION:value_arrays
686 * @short_description: A container structure to maintain an array of generic values
687 * @see_also: #GValue, #GParamSpecValueArray, g_param_spec_value_array()
688 * @title: Value arrays
690 * The prime purpose of a #GValueArray is for it to be used as an
691 * object property that holds an array of values. A #GValueArray wraps
692 * an array of #GValue elements in order for it to be used as a boxed
693 * type through %G_TYPE_VALUE_ARRAY.
695 * #GValueArray is deprecated in favour of #GArray since GLib 2.32. It
696 * is possible to create a #GArray that behaves like a #GValueArray by
697 * using the size of #GValue as the element size, and by setting
698 * g_value_unset() as the clear function using g_array_set_clear_func(),
699 * for instance, the following code:
702 * GValueArray *array = g_value_array_new (10);
705 * can be replaced by:
708 * GArray *array = g_array_sized_new (FALSE, TRUE, sizeof (GValue), 10);
709 * g_array_set_clear_func (array, (GDestroyNotify) g_value_unset);
715 * g_binding_get_flags:
716 * @binding: a #GBinding
718 * Retrieves the flags passed when constructing the #GBinding
720 * Returns: the #GBindingFlags used by the #GBinding
726 * g_binding_get_source:
727 * @binding: a #GBinding
729 * Retrieves the #GObject instance used as the source of the binding
731 * Returns: (transfer none): the source #GObject
737 * g_binding_get_source_property:
738 * @binding: a #GBinding
740 * Retrieves the name of the property of #GBinding:source used as the source
743 * Returns: the name of the source property
749 * g_binding_get_target:
750 * @binding: a #GBinding
752 * Retrieves the #GObject instance used as the target of the binding
754 * Returns: (transfer none): the target #GObject
760 * g_binding_get_target_property:
761 * @binding: a #GBinding
763 * Retrieves the name of the property of #GBinding:target used as the target
766 * Returns: the name of the target property
773 * @binding: a #GBinding
775 * Explicitly releases the binding between the source and the target
776 * property expressed by @binding.
778 * <note>This function will release the reference that is being held on
779 * the @binding instance; if you want to hold on to the #GBinding instance
780 * after calling g_binding_unbind(), you will need to hold a reference
789 * @boxed_type: The type of @src_boxed.
790 * @src_boxed: The boxed structure to be copied.
792 * Provide a copy of a boxed structure @src_boxed which is of type @boxed_type.
794 * Returns: The newly created copy of the boxed structure.
800 * @boxed_type: The type of @boxed.
801 * @boxed: The boxed structure to be freed.
803 * Free the boxed structure @boxed which is of type @boxed_type.
808 * g_boxed_type_register_static:
809 * @name: Name of the new boxed type.
810 * @boxed_copy: Boxed structure copy function.
811 * @boxed_free: Boxed structure free function.
813 * This function creates a new %G_TYPE_BOXED derived type id for a new
814 * boxed type with name @name. Boxed type handling functions have to be
815 * provided to copy and free opaque boxed structures of this type.
817 * Returns: New %G_TYPE_BOXED derived type id for @name.
822 * g_cclosure_marshal_BOOLEAN__FLAGS:
823 * @closure: the #GClosure to which the marshaller belongs
824 * @return_value: a #GValue which can store the returned #gboolean
826 * @param_values: a #GValue array holding instance and arg1
827 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
828 * @marshal_data: additional data specified when registering the marshaller
830 * A marshaller for a #GCClosure with a callback of type
831 * <literal>gboolean (*callback) (gpointer instance, gint arg1, gpointer user_data)</literal> where the #gint parameter
832 * denotes a flags type.
837 * g_cclosure_marshal_BOOLEAN__OBJECT_BOXED_BOXED:
838 * @closure: the #GClosure to which the marshaller belongs
839 * @return_value: a #GValue, which can store the returned string
841 * @param_values: a #GValue array holding instance, arg1 and arg2
842 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
843 * @marshal_data: additional data specified when registering the marshaller
845 * A marshaller for a #GCClosure with a callback of type
846 * <literal>gboolean (*callback) (gpointer instance, GBoxed *arg1, GBoxed *arg2, gpointer user_data)</literal>.
853 * g_cclosure_marshal_BOOL__FLAGS:
855 * Another name for g_cclosure_marshal_BOOLEAN__FLAGS().
860 * g_cclosure_marshal_STRING__OBJECT_POINTER:
861 * @closure: the #GClosure to which the marshaller belongs
862 * @return_value: a #GValue, which can store the returned string
864 * @param_values: a #GValue array holding instance, arg1 and arg2
865 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
866 * @marshal_data: additional data specified when registering the marshaller
868 * A marshaller for a #GCClosure with a callback of type
869 * <literal>gchar* (*callback) (gpointer instance, GObject *arg1, gpointer arg2, gpointer user_data)</literal>.
874 * g_cclosure_marshal_VOID__BOOLEAN:
875 * @closure: the #GClosure to which the marshaller belongs
876 * @return_value: ignored
878 * @param_values: a #GValue array holding the instance and the #gboolean parameter
879 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
880 * @marshal_data: additional data specified when registering the marshaller
882 * A marshaller for a #GCClosure with a callback of type
883 * <literal>void (*callback) (gpointer instance, gboolean arg1, gpointer user_data)</literal>.
888 * g_cclosure_marshal_VOID__BOXED:
889 * @closure: the #GClosure to which the marshaller belongs
890 * @return_value: ignored
892 * @param_values: a #GValue array holding the instance and the #GBoxed* parameter
893 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
894 * @marshal_data: additional data specified when registering the marshaller
896 * A marshaller for a #GCClosure with a callback of type
897 * <literal>void (*callback) (gpointer instance, GBoxed *arg1, gpointer user_data)</literal>.
902 * g_cclosure_marshal_VOID__CHAR:
903 * @closure: the #GClosure to which the marshaller belongs
904 * @return_value: ignored
906 * @param_values: a #GValue array holding the instance and the #gchar parameter
907 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
908 * @marshal_data: additional data specified when registering the marshaller
910 * A marshaller for a #GCClosure with a callback of type
911 * <literal>void (*callback) (gpointer instance, gchar arg1, gpointer user_data)</literal>.
916 * g_cclosure_marshal_VOID__DOUBLE:
917 * @closure: the #GClosure to which the marshaller belongs
918 * @return_value: ignored
920 * @param_values: a #GValue array holding the instance and the #gdouble parameter
921 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
922 * @marshal_data: additional data specified when registering the marshaller
924 * A marshaller for a #GCClosure with a callback of type
925 * <literal>void (*callback) (gpointer instance, gdouble arg1, gpointer user_data)</literal>.
930 * g_cclosure_marshal_VOID__ENUM:
931 * @closure: the #GClosure to which the marshaller belongs
932 * @return_value: ignored
934 * @param_values: a #GValue array holding the instance and the enumeration parameter
935 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
936 * @marshal_data: additional data specified when registering the marshaller
938 * A marshaller for a #GCClosure with a callback of type
939 * <literal>void (*callback) (gpointer instance, gint arg1, gpointer user_data)</literal> where the #gint parameter denotes an enumeration type..
944 * g_cclosure_marshal_VOID__FLAGS:
945 * @closure: the #GClosure to which the marshaller belongs
946 * @return_value: ignored
948 * @param_values: a #GValue array holding the instance and the flags parameter
949 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
950 * @marshal_data: additional data specified when registering the marshaller
952 * A marshaller for a #GCClosure with a callback of type
953 * <literal>void (*callback) (gpointer instance, gint arg1, gpointer user_data)</literal> where the #gint parameter denotes a flags type.
958 * g_cclosure_marshal_VOID__FLOAT:
959 * @closure: the #GClosure to which the marshaller belongs
960 * @return_value: ignored
962 * @param_values: a #GValue array holding the instance and the #gfloat parameter
963 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
964 * @marshal_data: additional data specified when registering the marshaller
966 * A marshaller for a #GCClosure with a callback of type
967 * <literal>void (*callback) (gpointer instance, gfloat arg1, gpointer user_data)</literal>.
972 * g_cclosure_marshal_VOID__INT:
973 * @closure: the #GClosure to which the marshaller belongs
974 * @return_value: ignored
976 * @param_values: a #GValue array holding the instance and the #gint parameter
977 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
978 * @marshal_data: additional data specified when registering the marshaller
980 * A marshaller for a #GCClosure with a callback of type
981 * <literal>void (*callback) (gpointer instance, gint arg1, gpointer user_data)</literal>.
986 * g_cclosure_marshal_VOID__LONG:
987 * @closure: the #GClosure to which the marshaller belongs
988 * @return_value: ignored
990 * @param_values: a #GValue array holding the instance and the #glong parameter
991 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
992 * @marshal_data: additional data specified when registering the marshaller
994 * A marshaller for a #GCClosure with a callback of type
995 * <literal>void (*callback) (gpointer instance, glong arg1, gpointer user_data)</literal>.
1000 * g_cclosure_marshal_VOID__OBJECT:
1001 * @closure: the #GClosure to which the marshaller belongs
1002 * @return_value: ignored
1003 * @n_param_values: 2
1004 * @param_values: a #GValue array holding the instance and the #GObject* parameter
1005 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
1006 * @marshal_data: additional data specified when registering the marshaller
1008 * A marshaller for a #GCClosure with a callback of type
1009 * <literal>void (*callback) (gpointer instance, GObject *arg1, gpointer user_data)</literal>.
1014 * g_cclosure_marshal_VOID__PARAM:
1015 * @closure: the #GClosure to which the marshaller belongs
1016 * @return_value: ignored
1017 * @n_param_values: 2
1018 * @param_values: a #GValue array holding the instance and the #GParamSpec* parameter
1019 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
1020 * @marshal_data: additional data specified when registering the marshaller
1022 * A marshaller for a #GCClosure with a callback of type
1023 * <literal>void (*callback) (gpointer instance, GParamSpec *arg1, gpointer user_data)</literal>.
1028 * g_cclosure_marshal_VOID__POINTER:
1029 * @closure: the #GClosure to which the marshaller belongs
1030 * @return_value: ignored
1031 * @n_param_values: 2
1032 * @param_values: a #GValue array holding the instance and the #gpointer parameter
1033 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
1034 * @marshal_data: additional data specified when registering the marshaller
1036 * A marshaller for a #GCClosure with a callback of type
1037 * <literal>void (*callback) (gpointer instance, gpointer arg1, gpointer user_data)</literal>.
1042 * g_cclosure_marshal_VOID__STRING:
1043 * @closure: the #GClosure to which the marshaller belongs
1044 * @return_value: ignored
1045 * @n_param_values: 2
1046 * @param_values: a #GValue array holding the instance and the #gchar* parameter
1047 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
1048 * @marshal_data: additional data specified when registering the marshaller
1050 * A marshaller for a #GCClosure with a callback of type
1051 * <literal>void (*callback) (gpointer instance, const gchar *arg1, gpointer user_data)</literal>.
1056 * g_cclosure_marshal_VOID__UCHAR:
1057 * @closure: the #GClosure to which the marshaller belongs
1058 * @return_value: ignored
1059 * @n_param_values: 2
1060 * @param_values: a #GValue array holding the instance and the #guchar parameter
1061 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
1062 * @marshal_data: additional data specified when registering the marshaller
1064 * A marshaller for a #GCClosure with a callback of type
1065 * <literal>void (*callback) (gpointer instance, guchar arg1, gpointer user_data)</literal>.
1070 * g_cclosure_marshal_VOID__UINT:
1071 * @closure: the #GClosure to which the marshaller belongs
1072 * @return_value: ignored
1073 * @n_param_values: 2
1074 * @param_values: a #GValue array holding the instance and the #guint parameter
1075 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
1076 * @marshal_data: additional data specified when registering the marshaller
1078 * A marshaller for a #GCClosure with a callback of type
1079 * <literal>void (*callback) (gpointer instance, guint arg1, gpointer user_data)</literal>.
1084 * g_cclosure_marshal_VOID__UINT_POINTER:
1085 * @closure: the #GClosure to which the marshaller belongs
1086 * @return_value: ignored
1087 * @n_param_values: 3
1088 * @param_values: a #GValue array holding instance, arg1 and arg2
1089 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
1090 * @marshal_data: additional data specified when registering the marshaller
1092 * A marshaller for a #GCClosure with a callback of type
1093 * <literal>void (*callback) (gpointer instance, guint arg1, gpointer arg2, gpointer user_data)</literal>.
1098 * g_cclosure_marshal_VOID__ULONG:
1099 * @closure: the #GClosure to which the marshaller belongs
1100 * @return_value: ignored
1101 * @n_param_values: 2
1102 * @param_values: a #GValue array holding the instance and the #gulong parameter
1103 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
1104 * @marshal_data: additional data specified when registering the marshaller
1106 * A marshaller for a #GCClosure with a callback of type
1107 * <literal>void (*callback) (gpointer instance, gulong arg1, gpointer user_data)</literal>.
1112 * g_cclosure_marshal_VOID__VARIANT:
1113 * @closure: the #GClosure to which the marshaller belongs
1114 * @return_value: ignored
1115 * @n_param_values: 2
1116 * @param_values: a #GValue array holding the instance and the #GVariant* parameter
1117 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
1118 * @marshal_data: additional data specified when registering the marshaller
1120 * A marshaller for a #GCClosure with a callback of type
1121 * <literal>void (*callback) (gpointer instance, GVariant *arg1, gpointer user_data)</literal>.
1128 * g_cclosure_marshal_VOID__VOID:
1129 * @closure: the #GClosure to which the marshaller belongs
1130 * @return_value: ignored
1131 * @n_param_values: 1
1132 * @param_values: a #GValue array holding only the instance
1133 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
1134 * @marshal_data: additional data specified when registering the marshaller
1136 * A marshaller for a #GCClosure with a callback of type
1137 * <literal>void (*callback) (gpointer instance, gpointer user_data)</literal>.
1142 * g_cclosure_marshal_generic:
1143 * @closure: A #GClosure.
1144 * @return_gvalue: A #GValue to store the return value. May be %NULL if the callback of closure doesn't return a value.
1145 * @n_param_values: The length of the @param_values array.
1146 * @param_values: An array of #GValue<!-- -->s holding the arguments on which to invoke the callback of closure.
1147 * @invocation_hint: The invocation hint given as the last argument to g_closure_invoke().
1148 * @marshal_data: Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
1150 * A generic marshaller function implemented via <ulink
1151 * url="http://sourceware.org/libffi/">libffi</ulink>.
1158 * g_cclosure_new: (skip)
1159 * @callback_func: the function to invoke
1160 * @user_data: user data to pass to @callback_func
1161 * @destroy_data: destroy notify to be called when @user_data is no longer used
1163 * Creates a new closure which invokes @callback_func with @user_data as
1164 * the last parameter.
1166 * Returns: a new #GCClosure
1171 * g_cclosure_new_object: (skip)
1172 * @callback_func: the function to invoke
1173 * @object: a #GObject pointer to pass to @callback_func
1175 * A variant of g_cclosure_new() which uses @object as @user_data and
1176 * calls g_object_watch_closure() on @object and the created
1177 * closure. This function is useful when you have a callback closely
1178 * associated with a #GObject, and want the callback to no longer run
1179 * after the object is is freed.
1181 * Returns: a new #GCClosure
1186 * g_cclosure_new_object_swap: (skip)
1187 * @callback_func: the function to invoke
1188 * @object: a #GObject pointer to pass to @callback_func
1190 * A variant of g_cclosure_new_swap() which uses @object as @user_data
1191 * and calls g_object_watch_closure() on @object and the created
1192 * closure. This function is useful when you have a callback closely
1193 * associated with a #GObject, and want the callback to no longer run
1194 * after the object is is freed.
1196 * Returns: a new #GCClosure
1201 * g_cclosure_new_swap: (skip)
1202 * @callback_func: the function to invoke
1203 * @user_data: user data to pass to @callback_func
1204 * @destroy_data: destroy notify to be called when @user_data is no longer used
1206 * Creates a new closure which invokes @callback_func with @user_data as
1207 * the first parameter.
1209 * Returns: (transfer full): a new #GCClosure
1214 * g_clear_object: (skip)
1215 * @object_ptr: a pointer to a #GObject reference
1217 * Clears a reference to a #GObject.
1219 * @object_ptr must not be %NULL.
1221 * If the reference is %NULL then this function does nothing.
1222 * Otherwise, the reference count of the object is decreased and the
1223 * pointer is set to %NULL.
1225 * This function is threadsafe and modifies the pointer atomically,
1226 * using memory barriers where needed.
1228 * A macro is also included that allows this function to be used without
1236 * g_closure_add_finalize_notifier: (skip)
1237 * @closure: a #GClosure
1238 * @notify_data: data to pass to @notify_func
1239 * @notify_func: the callback function to register
1241 * Registers a finalization notifier which will be called when the
1242 * reference count of @closure goes down to 0. Multiple finalization
1243 * notifiers on a single closure are invoked in unspecified order. If
1244 * a single call to g_closure_unref() results in the closure being
1245 * both invalidated and finalized, then the invalidate notifiers will
1246 * be run before the finalize notifiers.
1251 * g_closure_add_invalidate_notifier: (skip)
1252 * @closure: a #GClosure
1253 * @notify_data: data to pass to @notify_func
1254 * @notify_func: the callback function to register
1256 * Registers an invalidation notifier which will be called when the
1257 * @closure is invalidated with g_closure_invalidate(). Invalidation
1258 * notifiers are invoked before finalization notifiers, in an
1259 * unspecified order.
1264 * g_closure_add_marshal_guards: (skip)
1265 * @closure: a #GClosure
1266 * @pre_marshal_data: data to pass to @pre_marshal_notify
1267 * @pre_marshal_notify: a function to call before the closure callback
1268 * @post_marshal_data: data to pass to @post_marshal_notify
1269 * @post_marshal_notify: a function to call after the closure callback
1271 * Adds a pair of notifiers which get invoked before and after the
1272 * closure callback, respectively. This is typically used to protect
1273 * the extra arguments for the duration of the callback. See
1274 * g_object_watch_closure() for an example of marshal guards.
1279 * g_closure_invalidate:
1280 * @closure: GClosure to invalidate
1282 * Sets a flag on the closure to indicate that its calling
1283 * environment has become invalid, and thus causes any future
1284 * invocations of g_closure_invoke() on this @closure to be
1285 * ignored. Also, invalidation notifiers installed on the closure will
1286 * be called at this point. Note that unless you are holding a
1287 * reference to the closure yourself, the invalidation notifiers may
1288 * unref the closure and cause it to be destroyed, so if you need to
1289 * access the closure after calling g_closure_invalidate(), make sure
1290 * that you've previously called g_closure_ref().
1292 * Note that g_closure_invalidate() will also be called when the
1293 * reference count of a closure drops to zero (unless it has already
1294 * been invalidated before).
1300 * @closure: a #GClosure
1301 * @return_value: (allow-none): a #GValue to store the return value. May be %NULL if the callback of @closure doesn't return a value.
1302 * @n_param_values: the length of the @param_values array
1303 * @param_values: (array length=n_param_values): an array of #GValue<!-- -->s holding the arguments on which to invoke the callback of @closure
1304 * @invocation_hint: (allow-none): a context-dependent invocation hint
1306 * Invokes the closure, i.e. executes the callback represented by the @closure.
1311 * g_closure_new_object:
1312 * @sizeof_closure: the size of the structure to allocate, must be at least <literal>sizeof (GClosure)</literal>
1313 * @object: a #GObject pointer to store in the @data field of the newly allocated #GClosure
1315 * A variant of g_closure_new_simple() which stores @object in the
1316 * @data field of the closure and calls g_object_watch_closure() on
1317 * @object and the created closure. This function is mainly useful
1318 * when implementing new types of closures.
1320 * Returns: (transfer full): a newly allocated #GClosure
1325 * g_closure_new_simple:
1326 * @sizeof_closure: the size of the structure to allocate, must be at least <literal>sizeof (GClosure)</literal>
1327 * @data: data to store in the @data field of the newly allocated #GClosure
1329 * Allocates a struct of the given size and initializes the initial
1330 * part as a #GClosure. This function is mainly useful when
1331 * implementing new types of closures.
1334 * typedef struct _MyClosure MyClosure;
1338 * // extra data goes here
1342 * my_closure_finalize (gpointer notify_data,
1343 * GClosure *closure)
1345 * MyClosure *my_closure = (MyClosure *)closure;
1347 * // free extra data here
1350 * MyClosure *my_closure_new (gpointer data)
1352 * GClosure *closure;
1353 * MyClosure *my_closure;
1355 * closure = g_closure_new_simple (sizeof (MyClosure), data);
1356 * my_closure = (MyClosure *) closure;
1358 * // initialize extra data here
1360 * g_closure_add_finalize_notifier (closure, notify_data,
1361 * my_closure_finalize);
1362 * return my_closure;
1366 * Returns: (transfer full): a newly allocated #GClosure
1372 * @closure: #GClosure to increment the reference count on
1374 * Increments the reference count on a closure to force it staying
1375 * alive while the caller holds a pointer to it.
1377 * Returns: (transfer none): The @closure passed in, for convenience
1382 * g_closure_remove_finalize_notifier: (skip)
1383 * @closure: a #GClosure
1384 * @notify_data: data which was passed to g_closure_add_finalize_notifier() when registering @notify_func
1385 * @notify_func: the callback function to remove
1387 * Removes a finalization notifier.
1389 * Notice that notifiers are automatically removed after they are run.
1394 * g_closure_remove_invalidate_notifier: (skip)
1395 * @closure: a #GClosure
1396 * @notify_data: data which was passed to g_closure_add_invalidate_notifier() when registering @notify_func
1397 * @notify_func: the callback function to remove
1399 * Removes an invalidation notifier.
1401 * Notice that notifiers are automatically removed after they are run.
1406 * g_closure_set_marshal: (skip)
1407 * @closure: a #GClosure
1408 * @marshal: a #GClosureMarshal function
1410 * Sets the marshaller of @closure. The <literal>marshal_data</literal>
1411 * of @marshal provides a way for a meta marshaller to provide additional
1412 * information to the marshaller. (See g_closure_set_meta_marshal().) For
1413 * GObject's C predefined marshallers (the g_cclosure_marshal_*()
1414 * functions), what it provides is a callback function to use instead of
1415 * @closure->callback.
1420 * g_closure_set_meta_marshal: (skip)
1421 * @closure: a #GClosure
1422 * @marshal_data: context-dependent data to pass to @meta_marshal
1423 * @meta_marshal: a #GClosureMarshal function
1425 * Sets the meta marshaller of @closure. A meta marshaller wraps
1426 * @closure->marshal and modifies the way it is called in some
1427 * fashion. The most common use of this facility is for C callbacks.
1428 * The same marshallers (generated by <link
1429 * linkend="glib-genmarshal">glib-genmarshal</link>) are used
1430 * everywhere, but the way that we get the callback function
1431 * differs. In most cases we want to use @closure->callback, but in
1432 * other cases we want to use some different technique to retrieve the
1433 * callback function.
1435 * For example, class closures for signals (see
1436 * g_signal_type_cclosure_new()) retrieve the callback function from a
1437 * fixed offset in the class structure. The meta marshaller retrieves
1438 * the right callback and passes it to the marshaller as the
1439 * @marshal_data argument.
1445 * @closure: #GClosure to decrement the initial reference count on, if it's still being held
1447 * Takes over the initial ownership of a closure. Each closure is
1448 * initially created in a <firstterm>floating</firstterm> state, which
1449 * means that the initial reference count is not owned by any caller.
1450 * g_closure_sink() checks to see if the object is still floating, and
1451 * if so, unsets the floating state and decreases the reference
1452 * count. If the closure is not floating, g_closure_sink() does
1453 * nothing. The reason for the existence of the floating state is to
1454 * prevent cumbersome code sequences like:
1456 * closure = g_cclosure_new (cb_func, cb_data);
1457 * g_source_set_closure (source, closure);
1458 * g_closure_unref (closure); // XXX GObject doesn't really need this
1460 * Because g_source_set_closure() (and similar functions) take ownership of the
1461 * initial reference count, if it is unowned, we instead can write:
1463 * g_source_set_closure (source, g_cclosure_new (cb_func, cb_data));
1466 * Generally, this function is used together with g_closure_ref(). Ane example
1467 * of storing a closure for later notification looks like:
1469 * static GClosure *notify_closure = NULL;
1471 * foo_notify_set_closure (GClosure *closure)
1473 * if (notify_closure)
1474 * g_closure_unref (notify_closure);
1475 * notify_closure = closure;
1476 * if (notify_closure)
1478 * g_closure_ref (notify_closure);
1479 * g_closure_sink (notify_closure);
1484 * Because g_closure_sink() may decrement the reference count of a closure
1485 * (if it hasn't been called on @closure yet) just like g_closure_unref(),
1486 * g_closure_ref() should be called prior to this function.
1492 * @closure: #GClosure to decrement the reference count on
1494 * Decrements the reference count of a closure after it was previously
1495 * incremented by the same caller. If no other callers are using the
1496 * closure, then the closure will be destroyed and freed.
1501 * g_enum_complete_type_info:
1502 * @g_enum_type: the type identifier of the type being completed
1503 * @info: the #GTypeInfo struct to be filled in
1504 * @const_values: An array of #GEnumValue structs for the possible enumeration values. The array is terminated by a struct with all members being 0.
1506 * This function is meant to be called from the <literal>complete_type_info</literal>
1507 * function of a #GTypePlugin implementation, as in the following
1512 * my_enum_complete_type_info (GTypePlugin *plugin,
1515 * GTypeValueTable *value_table)
1517 * static const GEnumValue values[] = {
1518 * { MY_ENUM_FOO, "MY_ENUM_FOO", "foo" },
1519 * { MY_ENUM_BAR, "MY_ENUM_BAR", "bar" },
1523 * g_enum_complete_type_info (type, info, values);
1531 * @enum_class: a #GEnumClass
1532 * @value: the value to look up
1534 * Returns the #GEnumValue for a value.
1536 * Returns: the #GEnumValue for @value, or %NULL if @value is not a member of the enumeration
1541 * g_enum_get_value_by_name:
1542 * @enum_class: a #GEnumClass
1543 * @name: the name to look up
1545 * Looks up a #GEnumValue by name.
1547 * Returns: the #GEnumValue with name @name, or %NULL if the enumeration doesn't have a member with that name
1552 * g_enum_get_value_by_nick:
1553 * @enum_class: a #GEnumClass
1554 * @nick: the nickname to look up
1556 * Looks up a #GEnumValue by nickname.
1558 * Returns: the #GEnumValue with nickname @nick, or %NULL if the enumeration doesn't have a member with that nickname
1563 * g_enum_register_static:
1564 * @name: A nul-terminated string used as the name of the new type.
1565 * @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.
1567 * Registers a new static enumeration type with the name @name.
1569 * It is normally more convenient to let <link
1570 * linkend="glib-mkenums">glib-mkenums</link> generate a
1571 * my_enum_get_type() function from a usual C enumeration definition
1572 * than to write one yourself using g_enum_register_static().
1574 * Returns: The new type identifier.
1579 * g_flags_complete_type_info:
1580 * @g_flags_type: the type identifier of the type being completed
1581 * @info: the #GTypeInfo struct to be filled in
1582 * @const_values: An array of #GFlagsValue structs for the possible enumeration values. The array is terminated by a struct with all members being 0.
1584 * This function is meant to be called from the complete_type_info()
1585 * function of a #GTypePlugin implementation, see the example for
1586 * g_enum_complete_type_info() above.
1591 * g_flags_get_first_value:
1592 * @flags_class: a #GFlagsClass
1595 * Returns the first #GFlagsValue which is set in @value.
1597 * Returns: the first #GFlagsValue which is set in @value, or %NULL if none is set
1602 * g_flags_get_value_by_name:
1603 * @flags_class: a #GFlagsClass
1604 * @name: the name to look up
1606 * Looks up a #GFlagsValue by name.
1608 * Returns: the #GFlagsValue with name @name, or %NULL if there is no flag with that name
1613 * g_flags_get_value_by_nick:
1614 * @flags_class: a #GFlagsClass
1615 * @nick: the nickname to look up
1617 * Looks up a #GFlagsValue by nickname.
1619 * Returns: the #GFlagsValue with nickname @nick, or %NULL if there is no flag with that nickname
1624 * g_flags_register_static:
1625 * @name: A nul-terminated string used as the name of the new type.
1626 * @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.
1628 * Registers a new static flags type with the name @name.
1630 * It is normally more convenient to let <link
1631 * linkend="glib-mkenums">glib-mkenums</link> generate a
1632 * my_flags_get_type() function from a usual C enumeration definition
1633 * than to write one yourself using g_flags_register_static().
1635 * Returns: The new type identifier.
1640 * g_object_add_toggle_ref: (skip)
1641 * @object: a #GObject
1642 * @notify: a function to call when this reference is the last reference to the object, or is no longer the last reference.
1643 * @data: data to pass to @notify
1645 * Increases the reference count of the object by one and sets a
1646 * callback to be called when all other references to the object are
1647 * dropped, or when this is already the last reference to the object
1648 * and another reference is established.
1650 * This functionality is intended for binding @object to a proxy
1651 * object managed by another memory manager. This is done with two
1652 * paired references: the strong reference added by
1653 * g_object_add_toggle_ref() and a reverse reference to the proxy
1654 * object which is either a strong reference or weak reference.
1656 * The setup is that when there are no other references to @object,
1657 * only a weak reference is held in the reverse direction from @object
1658 * to the proxy object, but when there are other references held to
1659 * @object, a strong reference is held. The @notify callback is called
1660 * when the reference from @object to the proxy object should be
1661 * <firstterm>toggled</firstterm> from strong to weak (@is_last_ref
1662 * true) or weak to strong (@is_last_ref false).
1664 * Since a (normal) reference must be held to the object before
1665 * calling g_object_add_toggle_ref(), the initial state of the reverse
1666 * link is always strong.
1668 * Multiple toggle references may be added to the same gobject,
1669 * however if there are multiple toggle references to an object, none
1670 * of them will ever be notified until all but one are removed. For
1671 * this reason, you should only ever use a toggle reference if there
1672 * is important state in the proxy object.
1679 * g_object_add_weak_pointer: (skip)
1680 * @object: The object that should be weak referenced.
1681 * @weak_pointer_location: (inout): The memory address of a pointer.
1683 * Adds a weak reference from weak_pointer to @object to indicate that
1684 * the pointer located at @weak_pointer_location is only valid during
1685 * the lifetime of @object. When the @object is finalized,
1686 * @weak_pointer will be set to %NULL.
1688 * Note that as with g_object_weak_ref(), the weak references created by
1689 * this method are not thread-safe: they cannot safely be used in one
1690 * thread if the object's last g_object_unref() might happen in another
1691 * thread. Use #GWeakRef if thread-safety is required.
1696 * g_object_bind_property:
1697 * @source: (type GObject.Object): the source #GObject
1698 * @source_property: the property on @source to bind
1699 * @target: (type GObject.Object): the target #GObject
1700 * @target_property: the property on @target to bind
1701 * @flags: flags to pass to #GBinding
1703 * Creates a binding between @source_property on @source and @target_property
1704 * on @target. Whenever the @source_property is changed the @target_property is
1705 * updated using the same value. For instance:
1708 * g_object_bind_property (action, "active", widget, "sensitive", 0);
1711 * Will result in the "sensitive" property of the widget #GObject instance to be
1712 * updated with the same value of the "active" property of the action #GObject
1715 * If @flags contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
1716 * if @target_property on @target changes then the @source_property on @source
1717 * will be updated as well.
1719 * The binding will automatically be removed when either the @source or the
1720 * @target instances are finalized. To remove the binding without affecting the
1721 * @source and the @target you can just call g_object_unref() on the returned
1722 * #GBinding instance.
1724 * A #GObject can have multiple bindings.
1726 * 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.
1732 * g_object_bind_property_full:
1733 * @source: (type GObject.Object): the source #GObject
1734 * @source_property: the property on @source to bind
1735 * @target: (type GObject.Object): the target #GObject
1736 * @target_property: the property on @target to bind
1737 * @flags: flags to pass to #GBinding
1738 * @transform_to: (scope notified) (allow-none): the transformation function from the @source to the @target, or %NULL to use the default
1739 * @transform_from: (scope notified) (allow-none): the transformation function from the @target to the @source, or %NULL to use the default
1740 * @user_data: custom data to be passed to the transformation functions, or %NULL
1741 * @notify: function to be called when disposing the binding, to free the resources used by the transformation functions
1743 * Complete version of g_object_bind_property().
1745 * Creates a binding between @source_property on @source and @target_property
1746 * on @target, allowing you to set the transformation functions to be used by
1749 * If @flags contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
1750 * if @target_property on @target changes then the @source_property on @source
1751 * will be updated as well. The @transform_from function is only used in case
1752 * of bidirectional bindings, otherwise it will be ignored
1754 * The binding will automatically be removed when either the @source or the
1755 * @target instances are finalized. To remove the binding without affecting the
1756 * @source and the @target you can just call g_object_unref() on the returned
1757 * #GBinding instance.
1759 * A #GObject can have multiple bindings.
1761 * <note>The same @user_data parameter will be used for both @transform_to
1762 * and @transform_from transformation functions; the @notify function will
1763 * be called once, when the binding is removed. If you need different data
1764 * for each transformation function, please use
1765 * g_object_bind_property_with_closures() instead.</note>
1767 * 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.
1773 * g_object_bind_property_with_closures:
1774 * @source: (type GObject.Object): the source #GObject
1775 * @source_property: the property on @source to bind
1776 * @target: (type GObject.Object): the target #GObject
1777 * @target_property: the property on @target to bind
1778 * @flags: flags to pass to #GBinding
1779 * @transform_to: a #GClosure wrapping the transformation function from the @source to the @target, or %NULL to use the default
1780 * @transform_from: a #GClosure wrapping the transformation function from the @target to the @source, or %NULL to use the default
1782 * Creates a binding between @source_property on @source and @target_property
1783 * on @target, allowing you to set the transformation functions to be used by
1786 * This function is the language bindings friendly version of
1787 * g_object_bind_property_full(), using #GClosure<!-- -->s instead of
1788 * function pointers.
1790 * Rename to: g_object_bind_property_full
1791 * 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.
1797 * g_object_class_find_property:
1798 * @oclass: a #GObjectClass
1799 * @property_name: the name of the property to look up
1801 * Looks up the #GParamSpec for a property of a class.
1803 * Returns: (transfer none): the #GParamSpec for the property, or %NULL if the class doesn't have a property of that name
1808 * g_object_class_install_properties:
1809 * @oclass: a #GObjectClass
1810 * @n_pspecs: the length of the #GParamSpec<!-- -->s array
1811 * @pspecs: (array length=n_pspecs): the #GParamSpec<!-- -->s array defining the new properties
1813 * Installs new properties from an array of #GParamSpec<!-- -->s. This is
1814 * usually done in the class initializer.
1816 * The property id of each property is the index of each #GParamSpec in
1817 * the @pspecs array.
1819 * The property id of 0 is treated specially by #GObject and it should not
1820 * be used to store a #GParamSpec.
1822 * This function should be used if you plan to use a static array of
1823 * #GParamSpec<!-- -->s and g_object_notify_by_pspec(). For instance, this
1824 * class initialization:
1828 * PROP_0, PROP_FOO, PROP_BAR, N_PROPERTIES
1831 * static GParamSpec *obj_properties[N_PROPERTIES] = { NULL, };
1834 * my_object_class_init (MyObjectClass *klass)
1836 * GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
1838 * obj_properties[PROP_FOO] =
1839 * g_param_spec_int ("foo", "Foo", "Foo",
1842 * G_PARAM_READWRITE);
1844 * obj_properties[PROP_BAR] =
1845 * g_param_spec_string ("bar", "Bar", "Bar",
1847 * G_PARAM_READWRITE);
1849 * gobject_class->set_property = my_object_set_property;
1850 * gobject_class->get_property = my_object_get_property;
1851 * g_object_class_install_properties (gobject_class,
1857 * allows calling g_object_notify_by_pspec() to notify of property changes:
1861 * my_object_set_foo (MyObject *self, gint foo)
1863 * if (self->foo != foo)
1866 * g_object_notify_by_pspec (G_OBJECT (self), obj_properties[PROP_FOO]);
1876 * g_object_class_install_property:
1877 * @oclass: a #GObjectClass
1878 * @property_id: the id for the new property
1879 * @pspec: the #GParamSpec for the new property
1881 * Installs a new property. This is usually done in the class initializer.
1883 * Note that it is possible to redefine a property in a derived class,
1884 * by installing a property with the same name. This can be useful at times,
1885 * e.g. to change the range of allowed values or the default value.
1890 * g_object_class_list_properties:
1891 * @oclass: a #GObjectClass
1892 * @n_properties: (out): return location for the length of the returned array
1894 * Get an array of #GParamSpec* for all properties of a class.
1896 * Returns: (array length=n_properties) (transfer container): an array of #GParamSpec* which should be freed after use
1901 * g_object_class_override_property:
1902 * @oclass: a #GObjectClass
1903 * @property_id: the new property ID
1904 * @name: the name of a property registered in a parent class or in an interface of this class.
1906 * Registers @property_id as referring to a property with the
1907 * name @name in a parent class or in an interface implemented
1908 * by @oclass. This allows this class to <firstterm>override</firstterm>
1909 * a property implementation in a parent class or to provide
1910 * the implementation of a property from an interface.
1913 * Internally, overriding is implemented by creating a property of type
1914 * #GParamSpecOverride; generally operations that query the properties of
1915 * the object class, such as g_object_class_find_property() or
1916 * g_object_class_list_properties() will return the overridden
1917 * property. However, in one case, the @construct_properties argument of
1918 * the @constructor virtual function, the #GParamSpecOverride is passed
1919 * instead, so that the @param_id field of the #GParamSpec will be
1920 * correct. For virtually all uses, this makes no difference. If you
1921 * need to get the overridden property, you can call
1922 * g_param_spec_get_redirect_target().
1930 * g_object_connect: (skip)
1931 * @object: a #GObject
1932 * @signal_spec: the spec for the first signal
1933 * @...: #GCallback for the first signal, followed by data for the first signal, followed optionally by more signal spec/callback/data triples, followed by %NULL
1935 * A convenience function to connect multiple signals at once.
1937 * The signal specs expected by this function have the form
1938 * "modifier::signal_name", where modifier can be one of the following:
1941 * <term>signal</term>
1943 * equivalent to <literal>g_signal_connect_data (..., NULL, 0)</literal>
1944 * </para></listitem>
1947 * <term>object_signal</term>
1948 * <term>object-signal</term>
1950 * equivalent to <literal>g_signal_connect_object (..., 0)</literal>
1951 * </para></listitem>
1954 * <term>swapped_signal</term>
1955 * <term>swapped-signal</term>
1957 * equivalent to <literal>g_signal_connect_data (..., NULL, G_CONNECT_SWAPPED)</literal>
1958 * </para></listitem>
1961 * <term>swapped_object_signal</term>
1962 * <term>swapped-object-signal</term>
1964 * equivalent to <literal>g_signal_connect_object (..., G_CONNECT_SWAPPED)</literal>
1965 * </para></listitem>
1968 * <term>signal_after</term>
1969 * <term>signal-after</term>
1971 * equivalent to <literal>g_signal_connect_data (..., NULL, G_CONNECT_AFTER)</literal>
1972 * </para></listitem>
1975 * <term>object_signal_after</term>
1976 * <term>object-signal-after</term>
1978 * equivalent to <literal>g_signal_connect_object (..., G_CONNECT_AFTER)</literal>
1979 * </para></listitem>
1982 * <term>swapped_signal_after</term>
1983 * <term>swapped-signal-after</term>
1985 * equivalent to <literal>g_signal_connect_data (..., NULL, G_CONNECT_SWAPPED | G_CONNECT_AFTER)</literal>
1986 * </para></listitem>
1989 * <term>swapped_object_signal_after</term>
1990 * <term>swapped-object-signal-after</term>
1992 * equivalent to <literal>g_signal_connect_object (..., G_CONNECT_SWAPPED | G_CONNECT_AFTER)</literal>
1993 * </para></listitem>
1998 * menu->toplevel = g_object_connect (g_object_new (GTK_TYPE_WINDOW,
1999 * "type", GTK_WINDOW_POPUP,
2002 * "signal::event", gtk_menu_window_event, menu,
2003 * "signal::size_request", gtk_menu_window_size_request, menu,
2004 * "signal::destroy", gtk_widget_destroyed, &menu->toplevel,
2008 * Returns: (transfer none): @object
2013 * g_object_disconnect: (skip)
2014 * @object: a #GObject
2015 * @signal_spec: the spec for the first signal
2016 * @...: #GCallback for the first signal, followed by data for the first signal, followed optionally by more signal spec/callback/data triples, followed by %NULL
2018 * A convenience function to disconnect multiple signals at once.
2020 * The signal specs expected by this function have the form
2021 * "any_signal", which means to disconnect any signal with matching
2022 * callback and data, or "any_signal::signal_name", which only
2023 * disconnects the signal named "signal_name".
2028 * g_object_dup_data:
2029 * @object: the #GObject to store user data on
2030 * @key: a string, naming the user data pointer
2031 * @dup_func: (allow-none): function to dup the value
2032 * @user_data: (allow-none): passed as user_data to @dup_func
2034 * This is a variant of g_object_get_data() which returns
2035 * a 'duplicate' of the value. @dup_func defines the
2036 * meaning of 'duplicate' in this context, it could e.g.
2037 * take a reference on a ref-counted object.
2039 * If the @key is not set on the object then @dup_func
2040 * will be called with a %NULL argument.
2042 * Note that @dup_func is called while user data of @object
2045 * This function can be useful to avoid races when multiple
2046 * threads are using object data on the same key on the same
2049 * 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.
2055 * g_object_dup_qdata:
2056 * @object: the #GObject to store user data on
2057 * @quark: a #GQuark, naming the user data pointer
2058 * @dup_func: (allow-none): function to dup the value
2059 * @user_data: (allow-none): passed as user_data to @dup_func
2061 * This is a variant of g_object_get_qdata() which returns
2062 * a 'duplicate' of the value. @dup_func defines the
2063 * meaning of 'duplicate' in this context, it could e.g.
2064 * take a reference on a ref-counted object.
2066 * If the @quark is not set on the object then @dup_func
2067 * will be called with a %NULL argument.
2069 * Note that @dup_func is called while user data of @object
2072 * This function can be useful to avoid races when multiple
2073 * threads are using object data on the same key on the same
2076 * 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.
2082 * g_object_force_floating:
2083 * @object: a #GObject
2085 * This function is intended for #GObject implementations to re-enforce a
2086 * <link linkend="floating-ref">floating</link> object reference.
2087 * Doing this is seldom required: all
2088 * #GInitiallyUnowned<!-- -->s are created with a floating reference which
2089 * usually just needs to be sunken by calling g_object_ref_sink().
2096 * g_object_freeze_notify:
2097 * @object: a #GObject
2099 * Increases the freeze count on @object. If the freeze count is
2100 * non-zero, the emission of "notify" signals on @object is
2101 * stopped. The signals are queued until the freeze count is decreased
2102 * to zero. Duplicate notifications are squashed so that at most one
2103 * #GObject::notify signal is emitted for each property modified while the
2106 * This is necessary for accessors that modify multiple properties to prevent
2107 * premature notification while the object is still being modified.
2112 * g_object_get: (skip)
2113 * @object: a #GObject
2114 * @first_property_name: name of the first property to get
2115 * @...: return location for the first property, followed optionally by more name/return location pairs, followed by %NULL
2117 * Gets properties of an object.
2119 * In general, a copy is made of the property contents and the caller
2120 * is responsible for freeing the memory in the appropriate manner for
2121 * the type, for instance by calling g_free() or g_object_unref().
2124 * <title>Using g_object_get(<!-- -->)</title>
2125 * An example of using g_object_get() to get the contents
2126 * of three properties - one of type #G_TYPE_INT,
2127 * one of type #G_TYPE_STRING, and one of type #G_TYPE_OBJECT:
2133 * g_object_get (my_object,
2134 * "int-property", &intval,
2135 * "str-property", &strval,
2136 * "obj-property", &objval,
2139 * // Do something with intval, strval, objval
2142 * g_object_unref (objval);
2149 * g_object_get_data:
2150 * @object: #GObject containing the associations
2151 * @key: name of the key for that association
2153 * Gets a named field from the objects table of associations (see g_object_set_data()).
2155 * Returns: (transfer none): the data if found, or %NULL if no such data exists.
2160 * g_object_get_property:
2161 * @object: a #GObject
2162 * @property_name: the name of the property to get
2163 * @value: return location for the property value
2165 * Gets a property of an object. @value must have been initialized to the
2166 * expected type of the property (or a type to which the expected type can be
2167 * transformed) using g_value_init().
2169 * In general, a copy is made of the property contents and the caller is
2170 * responsible for freeing the memory by calling g_value_unset().
2172 * Note that g_object_get_property() is really intended for language
2173 * bindings, g_object_get() is much more convenient for C programming.
2178 * g_object_get_qdata:
2179 * @object: The GObject to get a stored user data pointer from
2180 * @quark: A #GQuark, naming the user data pointer
2182 * This function gets back user data pointers stored via
2183 * g_object_set_qdata().
2185 * Returns: (transfer none): The user data pointer set, or %NULL
2190 * g_object_get_valist: (skip)
2191 * @object: a #GObject
2192 * @first_property_name: name of the first property to get
2193 * @var_args: return location for the first property, followed optionally by more name/return location pairs, followed by %NULL
2195 * Gets properties of an object.
2197 * In general, a copy is made of the property contents and the caller
2198 * is responsible for freeing the memory in the appropriate manner for
2199 * the type, for instance by calling g_free() or g_object_unref().
2201 * See g_object_get().
2206 * g_object_interface_find_property:
2207 * @g_iface: any interface vtable for the interface, or the default vtable for the interface
2208 * @property_name: name of a property to lookup.
2210 * Find the #GParamSpec with the given name for an
2211 * interface. Generally, the interface vtable passed in as @g_iface
2212 * will be the default vtable from g_type_default_interface_ref(), or,
2213 * if you know the interface has already been loaded,
2214 * g_type_default_interface_peek().
2217 * Returns: (transfer none): the #GParamSpec for the property of the interface with the name @property_name, or %NULL if no such property exists.
2222 * g_object_interface_install_property:
2223 * @g_iface: any interface vtable for the interface, or the default vtable for the interface.
2224 * @pspec: the #GParamSpec for the new property
2226 * Add a property to an interface; this is only useful for interfaces
2227 * that are added to GObject-derived types. Adding a property to an
2228 * interface forces all objects classes with that interface to have a
2229 * compatible property. The compatible property could be a newly
2230 * created #GParamSpec, but normally
2231 * g_object_class_override_property() will be used so that the object
2232 * class only needs to provide an implementation and inherits the
2233 * property description, default value, bounds, and so forth from the
2234 * interface property.
2236 * This function is meant to be called from the interface's default
2237 * vtable initialization function (the @class_init member of
2238 * #GTypeInfo.) It must not be called after after @class_init has
2239 * been called for any object types implementing this interface.
2246 * g_object_interface_list_properties:
2247 * @g_iface: any interface vtable for the interface, or the default vtable for the interface
2248 * @n_properties_p: (out): location to store number of properties returned.
2250 * Lists the properties of an interface.Generally, the interface
2251 * vtable passed in as @g_iface will be the default vtable from
2252 * g_type_default_interface_ref(), or, if you know the interface has
2253 * already been loaded, g_type_default_interface_peek().
2256 * 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.
2261 * g_object_is_floating:
2262 * @object: (type GObject.Object): a #GObject
2264 * Checks whether @object has a <link linkend="floating-ref">floating</link>
2268 * Returns: %TRUE if @object has a floating reference
2273 * g_object_new: (skip)
2274 * @object_type: the type id of the #GObject subtype to instantiate
2275 * @first_property_name: the name of the first property
2276 * @...: the value of the first property, followed optionally by more name/value pairs, followed by %NULL
2278 * Creates a new instance of a #GObject subtype and sets its properties.
2280 * Construction parameters (see #G_PARAM_CONSTRUCT, #G_PARAM_CONSTRUCT_ONLY)
2281 * which are not explicitly specified are set to their default values.
2283 * Returns: (transfer full): a new instance of @object_type
2288 * g_object_new_valist: (skip)
2289 * @object_type: the type id of the #GObject subtype to instantiate
2290 * @first_property_name: the name of the first property
2291 * @var_args: the value of the first property, followed optionally by more name/value pairs, followed by %NULL
2293 * Creates a new instance of a #GObject subtype and sets its properties.
2295 * Construction parameters (see #G_PARAM_CONSTRUCT, #G_PARAM_CONSTRUCT_ONLY)
2296 * which are not explicitly specified are set to their default values.
2298 * Returns: a new instance of @object_type
2304 * @object_type: the type id of the #GObject subtype to instantiate
2305 * @n_parameters: the length of the @parameters array
2306 * @parameters: (array length=n_parameters): an array of #GParameter
2308 * Creates a new instance of a #GObject subtype and sets its properties.
2310 * Construction parameters (see #G_PARAM_CONSTRUCT, #G_PARAM_CONSTRUCT_ONLY)
2311 * which are not explicitly specified are set to their default values.
2313 * Rename to: g_object_new
2314 * Returns: (type GObject.Object) (transfer full): a new instance of @object_type
2320 * @object: a #GObject
2321 * @property_name: the name of a property installed on the class of @object.
2323 * Emits a "notify" signal for the property @property_name on @object.
2325 * When possible, eg. when signaling a property change from within the class
2326 * that registered the property, you should use g_object_notify_by_pspec()
2332 * g_object_notify_by_pspec:
2333 * @object: a #GObject
2334 * @pspec: the #GParamSpec of a property installed on the class of @object.
2336 * Emits a "notify" signal for the property specified by @pspec on @object.
2338 * This function omits the property name lookup, hence it is faster than
2339 * g_object_notify().
2341 * One way to avoid using g_object_notify() from within the
2342 * class that registered the properties, and using g_object_notify_by_pspec()
2343 * instead, is to store the GParamSpec used with
2344 * g_object_class_install_property() inside a static array, e.g.:
2354 * static GParamSpec *properties[PROP_LAST];
2357 * my_object_class_init (MyObjectClass *klass)
2359 * properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
2362 * G_PARAM_READWRITE);
2363 * g_object_class_install_property (gobject_class,
2365 * properties[PROP_FOO]);
2369 * and then notify a change on the "foo" property with:
2372 * g_object_notify_by_pspec (self, properties[PROP_FOO]);
2381 * @object: (type GObject.Object): a #GObject
2383 * Increases the reference count of @object.
2385 * Returns: (type GObject.Object) (transfer none): the same @object
2390 * g_object_ref_sink:
2391 * @object: (type GObject.Object): a #GObject
2393 * Increase the reference count of @object, and possibly remove the
2394 * <link linkend="floating-ref">floating</link> reference, if @object
2395 * has a floating reference.
2397 * In other words, if the object is floating, then this call "assumes
2398 * ownership" of the floating reference, converting it to a normal
2399 * reference by clearing the floating flag while leaving the reference
2400 * count unchanged. If the object is not floating, then this call
2401 * adds a new normal reference increasing the reference count by one.
2404 * Returns: (type GObject.Object) (transfer none): @object
2409 * g_object_remove_toggle_ref: (skip)
2410 * @object: a #GObject
2411 * @notify: a function to call when this reference is the last reference to the object, or is no longer the last reference.
2412 * @data: data to pass to @notify
2414 * Removes a reference added with g_object_add_toggle_ref(). The
2415 * reference count of the object is decreased by one.
2422 * g_object_remove_weak_pointer: (skip)
2423 * @object: The object that is weak referenced.
2424 * @weak_pointer_location: (inout): The memory address of a pointer.
2426 * Removes a weak reference from @object that was previously added
2427 * using g_object_add_weak_pointer(). The @weak_pointer_location has
2428 * to match the one used with g_object_add_weak_pointer().
2433 * g_object_replace_data:
2434 * @object: the #GObject to store user data on
2435 * @key: a string, naming the user data pointer
2436 * @oldval: (allow-none): the old value to compare against
2437 * @newval: (allow-none): the new value
2438 * @destroy: (allow-none): a destroy notify for the new value
2439 * @old_destroy: (allow-none): destroy notify for the existing value
2441 * Compares the user data for the key @key on @object with
2442 * @oldval, and if they are the same, replaces @oldval with
2445 * This is like a typical atomic compare-and-exchange
2446 * operation, for user data on an object.
2448 * If the previous value was replaced then ownership of the
2449 * old value (@oldval) is passed to the caller, including
2450 * the registered destroy notify for it (passed out in @old_destroy).
2451 * Its up to the caller to free this as he wishes, which may
2452 * or may not include using @old_destroy as sometimes replacement
2453 * should not destroy the object in the normal way.
2455 * Return: %TRUE if the existing value for @key was replaced
2456 * by @newval, %FALSE otherwise.
2463 * g_object_replace_qdata:
2464 * @object: the #GObject to store user data on
2465 * @quark: a #GQuark, naming the user data pointer
2466 * @oldval: (allow-none): the old value to compare against
2467 * @newval: (allow-none): the new value
2468 * @destroy: (allow-none): a destroy notify for the new value
2469 * @old_destroy: (allow-none): destroy notify for the existing value
2471 * Compares the user data for the key @quark on @object with
2472 * @oldval, and if they are the same, replaces @oldval with
2475 * This is like a typical atomic compare-and-exchange
2476 * operation, for user data on an object.
2478 * If the previous value was replaced then ownership of the
2479 * old value (@oldval) is passed to the caller, including
2480 * the registered destroy notify for it (passed out in @old_destroy).
2481 * Its up to the caller to free this as he wishes, which may
2482 * or may not include using @old_destroy as sometimes replacement
2483 * should not destroy the object in the normal way.
2485 * Return: %TRUE if the existing value for @quark was replaced
2486 * by @newval, %FALSE otherwise.
2493 * g_object_run_dispose:
2494 * @object: a #GObject
2496 * Releases all references to other objects. This can be used to break
2499 * This functions should only be called from object system implementations.
2504 * g_object_set: (skip)
2505 * @object: a #GObject
2506 * @first_property_name: name of the first property to set
2507 * @...: value for the first property, followed optionally by more name/value pairs, followed by %NULL
2509 * Sets properties on an object.
2514 * g_object_set_data:
2515 * @object: #GObject containing the associations.
2516 * @key: name of the key
2517 * @data: data to associate with that key
2519 * Each object carries around a table of associations from
2520 * strings to pointers. This function lets you set an association.
2522 * If the object already had an association with that name,
2523 * the old association will be destroyed.
2528 * g_object_set_data_full: (skip)
2529 * @object: #GObject containing the associations
2530 * @key: name of the key
2531 * @data: data to associate with that key
2532 * @destroy: function to call when the association is destroyed
2534 * Like g_object_set_data() except it adds notification
2535 * for when the association is destroyed, either by setting it
2536 * to a different value or when the object is destroyed.
2538 * Note that the @destroy callback is not called if @data is %NULL.
2543 * g_object_set_property:
2544 * @object: a #GObject
2545 * @property_name: the name of the property to set
2548 * Sets a property on an object.
2553 * g_object_set_qdata: (skip)
2554 * @object: The GObject to set store a user data pointer
2555 * @quark: A #GQuark, naming the user data pointer
2556 * @data: An opaque user data pointer
2558 * This sets an opaque, named pointer on an object.
2559 * The name is specified through a #GQuark (retrived e.g. via
2560 * g_quark_from_static_string()), and the pointer
2561 * can be gotten back from the @object with g_object_get_qdata()
2562 * until the @object is finalized.
2563 * Setting a previously set user data pointer, overrides (frees)
2564 * the old pointer set, using #NULL as pointer essentially
2565 * removes the data stored.
2570 * g_object_set_qdata_full: (skip)
2571 * @object: The GObject to set store a user data pointer
2572 * @quark: A #GQuark, naming the user data pointer
2573 * @data: An opaque user data pointer
2574 * @destroy: Function to invoke with @data as argument, when @data needs to be freed
2576 * This function works like g_object_set_qdata(), but in addition,
2577 * a void (*destroy) (gpointer) function may be specified which is
2578 * called with @data as argument when the @object is finalized, or
2579 * the data is being overwritten by a call to g_object_set_qdata()
2580 * with the same @quark.
2585 * g_object_set_valist: (skip)
2586 * @object: a #GObject
2587 * @first_property_name: name of the first property to set
2588 * @var_args: value for the first property, followed optionally by more name/value pairs, followed by %NULL
2590 * Sets properties on an object.
2595 * g_object_steal_data:
2596 * @object: #GObject containing the associations
2597 * @key: name of the key
2599 * Remove a specified datum from the object's data associations,
2600 * without invoking the association's destroy handler.
2602 * Returns: (transfer full): the data if found, or %NULL if no such data exists.
2607 * g_object_steal_qdata:
2608 * @object: The GObject to get a stored user data pointer from
2609 * @quark: A #GQuark, naming the user data pointer
2611 * This function gets back user data pointers stored via
2612 * g_object_set_qdata() and removes the @data from object
2613 * without invoking its destroy() function (if any was
2615 * Usually, calling this function is only required to update
2616 * user data pointers with a destroy notifier, for example:
2619 * object_add_to_user_list (GObject *object,
2620 * const gchar *new_string)
2622 * // the quark, naming the object data
2623 * GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
2624 * // retrive the old string list
2625 * GList *list = g_object_steal_qdata (object, quark_string_list);
2627 * // prepend new string
2628 * list = g_list_prepend (list, g_strdup (new_string));
2629 * // this changed 'list', so we need to set it again
2630 * g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
2633 * free_string_list (gpointer data)
2635 * GList *node, *list = data;
2637 * for (node = list; node; node = node->next)
2638 * g_free (node->data);
2639 * g_list_free (list);
2642 * Using g_object_get_qdata() in the above example, instead of
2643 * g_object_steal_qdata() would have left the destroy function set,
2644 * and thus the partial string list would have been freed upon
2645 * g_object_set_qdata_full().
2647 * Returns: (transfer full): The user data pointer set, or %NULL
2652 * g_object_thaw_notify:
2653 * @object: a #GObject
2655 * Reverts the effect of a previous call to
2656 * g_object_freeze_notify(). The freeze count is decreased on @object
2657 * and when it reaches zero, queued "notify" signals are emitted.
2659 * Duplicate notifications for each property are squashed so that at most one
2660 * #GObject::notify signal is emitted for each property.
2662 * It is an error to call this function when the freeze count is zero.
2668 * @object: (type GObject.Object): a #GObject
2670 * Decreases the reference count of @object. When its reference count
2671 * drops to 0, the object is finalized (i.e. its memory is freed).
2676 * g_object_watch_closure:
2677 * @object: GObject restricting lifetime of @closure
2678 * @closure: GClosure to watch
2680 * This function essentially limits the life time of the @closure to
2681 * the life time of the object. That is, when the object is finalized,
2682 * the @closure is invalidated by calling g_closure_invalidate() on
2683 * it, in order to prevent invocations of the closure with a finalized
2684 * (nonexisting) object. Also, g_object_ref() and g_object_unref() are
2685 * added as marshal guards to the @closure, to ensure that an extra
2686 * reference count is held on @object during invocation of the
2687 * @closure. Usually, this function will be called on closures that
2688 * use this @object as closure data.
2693 * g_object_weak_ref: (skip)
2694 * @object: #GObject to reference weakly
2695 * @notify: callback to invoke before the object is freed
2696 * @data: extra data to pass to notify
2698 * Adds a weak reference callback to an object. Weak references are
2699 * used for notification when an object is finalized. They are called
2700 * "weak references" because they allow you to safely hold a pointer
2701 * to an object without calling g_object_ref() (g_object_ref() adds a
2702 * strong reference, that is, forces the object to stay alive).
2704 * Note that the weak references created by this method are not
2705 * thread-safe: they cannot safely be used in one thread if the
2706 * object's last g_object_unref() might happen in another thread.
2707 * Use #GWeakRef if thread-safety is required.
2712 * g_object_weak_unref: (skip)
2713 * @object: #GObject to remove a weak reference from
2714 * @notify: callback to search for
2715 * @data: data to search for
2717 * Removes a weak reference callback to an object.
2722 * g_param_get_default_value:
2723 * @param: a #GParamSpec
2725 * Gets the default value of @param as a pointer to a #GValue.
2727 * The #GValue will remain value for the life of @param.
2729 * Returns: a pointer to a #GValue which must not be modified
2735 * g_param_spec_boolean:
2736 * @name: canonical name of the property specified
2737 * @nick: nick name for the property specified
2738 * @blurb: description of the property specified
2739 * @default_value: default value for the property specified
2740 * @flags: flags for the property specified
2742 * Creates a new #GParamSpecBoolean instance specifying a %G_TYPE_BOOLEAN
2745 * See g_param_spec_internal() for details on property names.
2747 * Returns: (transfer full): a newly created parameter specification
2752 * g_param_spec_boxed:
2753 * @name: canonical name of the property specified
2754 * @nick: nick name for the property specified
2755 * @blurb: description of the property specified
2756 * @boxed_type: %G_TYPE_BOXED derived type of this property
2757 * @flags: flags for the property specified
2759 * Creates a new #GParamSpecBoxed instance specifying a %G_TYPE_BOXED
2762 * See g_param_spec_internal() for details on property names.
2764 * Returns: (transfer full): a newly created parameter specification
2769 * g_param_spec_char:
2770 * @name: canonical name of the property specified
2771 * @nick: nick name for the property specified
2772 * @blurb: description of the property specified
2773 * @minimum: minimum value for the property specified
2774 * @maximum: maximum value for the property specified
2775 * @default_value: default value for the property specified
2776 * @flags: flags for the property specified
2778 * Creates a new #GParamSpecChar instance specifying a %G_TYPE_CHAR property.
2780 * Returns: (transfer full): a newly created parameter specification
2785 * g_param_spec_double:
2786 * @name: canonical name of the property specified
2787 * @nick: nick name for the property specified
2788 * @blurb: description of the property specified
2789 * @minimum: minimum value for the property specified
2790 * @maximum: maximum value for the property specified
2791 * @default_value: default value for the property specified
2792 * @flags: flags for the property specified
2794 * Creates a new #GParamSpecDouble instance specifying a %G_TYPE_DOUBLE
2797 * See g_param_spec_internal() for details on property names.
2799 * Returns: (transfer full): a newly created parameter specification
2804 * g_param_spec_enum:
2805 * @name: canonical name of the property specified
2806 * @nick: nick name for the property specified
2807 * @blurb: description of the property specified
2808 * @enum_type: a #GType derived from %G_TYPE_ENUM
2809 * @default_value: default value for the property specified
2810 * @flags: flags for the property specified
2812 * Creates a new #GParamSpecEnum instance specifying a %G_TYPE_ENUM
2815 * See g_param_spec_internal() for details on property names.
2817 * Returns: (transfer full): a newly created parameter specification
2822 * g_param_spec_flags:
2823 * @name: canonical name of the property specified
2824 * @nick: nick name for the property specified
2825 * @blurb: description of the property specified
2826 * @flags_type: a #GType derived from %G_TYPE_FLAGS
2827 * @default_value: default value for the property specified
2828 * @flags: flags for the property specified
2830 * Creates a new #GParamSpecFlags instance specifying a %G_TYPE_FLAGS
2833 * See g_param_spec_internal() for details on property names.
2835 * Returns: (transfer full): a newly created parameter specification
2840 * g_param_spec_float:
2841 * @name: canonical name of the property specified
2842 * @nick: nick name for the property specified
2843 * @blurb: description of the property specified
2844 * @minimum: minimum value for the property specified
2845 * @maximum: maximum value for the property specified
2846 * @default_value: default value for the property specified
2847 * @flags: flags for the property specified
2849 * Creates a new #GParamSpecFloat instance specifying a %G_TYPE_FLOAT property.
2851 * See g_param_spec_internal() for details on property names.
2853 * Returns: (transfer full): a newly created parameter specification
2858 * g_param_spec_get_blurb:
2859 * @pspec: a valid #GParamSpec
2861 * Get the short description of a #GParamSpec.
2863 * Returns: the short description of @pspec.
2868 * g_param_spec_get_name:
2869 * @pspec: a valid #GParamSpec
2871 * Get the name of a #GParamSpec.
2873 * The name is always an "interned" string (as per g_intern_string()).
2874 * This allows for pointer-value comparisons.
2876 * Returns: the name of @pspec.
2881 * g_param_spec_get_nick:
2882 * @pspec: a valid #GParamSpec
2884 * Get the nickname of a #GParamSpec.
2886 * Returns: the nickname of @pspec.
2891 * g_param_spec_get_qdata:
2892 * @pspec: a valid #GParamSpec
2893 * @quark: a #GQuark, naming the user data pointer
2895 * Gets back user data pointers stored via g_param_spec_set_qdata().
2897 * Returns: (transfer none): the user data pointer set, or %NULL
2902 * g_param_spec_get_redirect_target:
2903 * @pspec: a #GParamSpec
2905 * If the paramspec redirects operations to another paramspec,
2906 * returns that paramspec. Redirect is used typically for
2907 * providing a new implementation of a property in a derived
2908 * type while preserving all the properties from the parent
2909 * type. Redirection is established by creating a property
2910 * of type #GParamSpecOverride. See g_object_class_override_property()
2911 * for an example of the use of this capability.
2914 * Returns: (transfer none): paramspec to which requests on this paramspec should be redirected, or %NULL if none.
2919 * g_param_spec_gtype:
2920 * @name: canonical name of the property specified
2921 * @nick: nick name for the property specified
2922 * @blurb: description of the property specified
2923 * @is_a_type: a #GType whose subtypes are allowed as values of the property (use %G_TYPE_NONE for any type)
2924 * @flags: flags for the property specified
2926 * Creates a new #GParamSpecGType instance specifying a
2927 * %G_TYPE_GTYPE property.
2929 * See g_param_spec_internal() for details on property names.
2932 * Returns: (transfer full): a newly created parameter specification
2938 * @name: canonical name of the property specified
2939 * @nick: nick name for the property specified
2940 * @blurb: description of the property specified
2941 * @minimum: minimum value for the property specified
2942 * @maximum: maximum value for the property specified
2943 * @default_value: default value for the property specified
2944 * @flags: flags for the property specified
2946 * Creates a new #GParamSpecInt instance specifying a %G_TYPE_INT property.
2948 * See g_param_spec_internal() for details on property names.
2950 * Returns: (transfer full): a newly created parameter specification
2955 * g_param_spec_int64:
2956 * @name: canonical name of the property specified
2957 * @nick: nick name for the property specified
2958 * @blurb: description of the property specified
2959 * @minimum: minimum value for the property specified
2960 * @maximum: maximum value for the property specified
2961 * @default_value: default value for the property specified
2962 * @flags: flags for the property specified
2964 * Creates a new #GParamSpecInt64 instance specifying a %G_TYPE_INT64 property.
2966 * See g_param_spec_internal() for details on property names.
2968 * Returns: (transfer full): a newly created parameter specification
2973 * g_param_spec_internal: (skip)
2974 * @param_type: the #GType for the property; must be derived from #G_TYPE_PARAM
2975 * @name: the canonical name of the property
2976 * @nick: the nickname of the property
2977 * @blurb: a short description of the property
2978 * @flags: a combination of #GParamFlags
2980 * Creates a new #GParamSpec instance.
2982 * A property name consists of segments consisting of ASCII letters and
2983 * digits, separated by either the '-' or '_' character. The first
2984 * character of a property name must be a letter. Names which violate these
2985 * rules lead to undefined behaviour.
2987 * When creating and looking up a #GParamSpec, either separator can be
2988 * used, but they cannot be mixed. Using '-' is considerably more
2989 * efficient and in fact required when using property names as detail
2990 * strings for signals.
2992 * Beyond the name, #GParamSpec<!-- -->s have two more descriptive
2993 * strings associated with them, the @nick, which should be suitable
2994 * for use as a label for the property in a property editor, and the
2995 * @blurb, which should be a somewhat longer description, suitable for
2996 * e.g. a tooltip. The @nick and @blurb should ideally be localized.
2998 * Returns: a newly allocated #GParamSpec instance
3003 * g_param_spec_long:
3004 * @name: canonical name of the property specified
3005 * @nick: nick name for the property specified
3006 * @blurb: description of the property specified
3007 * @minimum: minimum value for the property specified
3008 * @maximum: maximum value for the property specified
3009 * @default_value: default value for the property specified
3010 * @flags: flags for the property specified
3012 * Creates a new #GParamSpecLong instance specifying a %G_TYPE_LONG property.
3014 * See g_param_spec_internal() for details on property names.
3016 * Returns: (transfer full): a newly created parameter specification
3021 * g_param_spec_object:
3022 * @name: canonical name of the property specified
3023 * @nick: nick name for the property specified
3024 * @blurb: description of the property specified
3025 * @object_type: %G_TYPE_OBJECT derived type of this property
3026 * @flags: flags for the property specified
3028 * Creates a new #GParamSpecBoxed instance specifying a %G_TYPE_OBJECT
3031 * See g_param_spec_internal() for details on property names.
3033 * Returns: (transfer full): a newly created parameter specification
3038 * g_param_spec_override: (skip)
3039 * @name: the name of the property.
3040 * @overridden: The property that is being overridden
3042 * Creates a new property of type #GParamSpecOverride. This is used
3043 * to direct operations to another paramspec, and will not be directly
3044 * useful unless you are implementing a new base type similar to GObject.
3047 * Returns: the newly created #GParamSpec
3052 * g_param_spec_param:
3053 * @name: canonical name of the property specified
3054 * @nick: nick name for the property specified
3055 * @blurb: description of the property specified
3056 * @param_type: a #GType derived from %G_TYPE_PARAM
3057 * @flags: flags for the property specified
3059 * Creates a new #GParamSpecParam instance specifying a %G_TYPE_PARAM
3062 * See g_param_spec_internal() for details on property names.
3064 * Returns: (transfer full): a newly created parameter specification
3069 * g_param_spec_pointer:
3070 * @name: canonical name of the property specified
3071 * @nick: nick name for the property specified
3072 * @blurb: description of the property specified
3073 * @flags: flags for the property specified
3075 * Creates a new #GParamSpecPointer instance specifying a pointer property.
3077 * See g_param_spec_internal() for details on property names.
3079 * Returns: (transfer full): a newly created parameter specification
3084 * g_param_spec_pool_insert:
3085 * @pool: a #GParamSpecPool.
3086 * @pspec: the #GParamSpec to insert
3087 * @owner_type: a #GType identifying the owner of @pspec
3089 * Inserts a #GParamSpec in the pool.
3094 * g_param_spec_pool_list:
3095 * @pool: a #GParamSpecPool
3096 * @owner_type: the owner to look for
3097 * @n_pspecs_p: (out): return location for the length of the returned array
3099 * Gets an array of all #GParamSpec<!-- -->s owned by @owner_type in
3102 * Returns: (array length=n_pspecs_p) (transfer container): a newly allocated array containing pointers to all #GParamSpecs owned by @owner_type in the pool
3107 * g_param_spec_pool_list_owned:
3108 * @pool: a #GParamSpecPool
3109 * @owner_type: the owner to look for
3111 * Gets an #GList of all #GParamSpec<!-- -->s owned by @owner_type in
3114 * Returns: (transfer container) (element-type GObject.ParamSpec): a #GList of all #GParamSpec<!-- -->s owned by @owner_type in the pool#GParamSpec<!-- -->s.
3119 * g_param_spec_pool_lookup:
3120 * @pool: a #GParamSpecPool
3121 * @param_name: the name to look for
3122 * @owner_type: the owner to look for
3123 * @walk_ancestors: If %TRUE, also try to find a #GParamSpec with @param_name owned by an ancestor of @owner_type.
3125 * Looks up a #GParamSpec in the pool.
3127 * Returns: (transfer none): The found #GParamSpec, or %NULL if no matching #GParamSpec was found.
3132 * g_param_spec_pool_new:
3133 * @type_prefixing: Whether the pool will support type-prefixed property names.
3135 * Creates a new #GParamSpecPool.
3137 * If @type_prefixing is %TRUE, lookups in the newly created pool will
3138 * allow to specify the owner as a colon-separated prefix of the
3139 * property name, like "GtkContainer:border-width". This feature is
3140 * deprecated, so you should always set @type_prefixing to %FALSE.
3142 * Returns: (transfer none): a newly allocated #GParamSpecPool.
3147 * g_param_spec_pool_remove:
3148 * @pool: a #GParamSpecPool
3149 * @pspec: the #GParamSpec to remove
3151 * Removes a #GParamSpec from the pool.
3156 * g_param_spec_ref: (skip)
3157 * @pspec: a valid #GParamSpec
3159 * Increments the reference count of @pspec.
3161 * Returns: the #GParamSpec that was passed into this function
3166 * g_param_spec_ref_sink: (skip)
3167 * @pspec: a valid #GParamSpec
3169 * Convenience function to ref and sink a #GParamSpec.
3172 * Returns: the #GParamSpec that was passed into this function
3177 * g_param_spec_set_qdata:
3178 * @pspec: the #GParamSpec to set store a user data pointer
3179 * @quark: a #GQuark, naming the user data pointer
3180 * @data: an opaque user data pointer
3182 * Sets an opaque, named pointer on a #GParamSpec. The name is
3183 * specified through a #GQuark (retrieved e.g. via
3184 * g_quark_from_static_string()), and the pointer can be gotten back
3185 * from the @pspec with g_param_spec_get_qdata(). Setting a
3186 * previously set user data pointer, overrides (frees) the old pointer
3187 * set, using %NULL as pointer essentially removes the data stored.
3192 * g_param_spec_set_qdata_full: (skip)
3193 * @pspec: the #GParamSpec to set store a user data pointer
3194 * @quark: a #GQuark, naming the user data pointer
3195 * @data: an opaque user data pointer
3196 * @destroy: function to invoke with @data as argument, when @data needs to be freed
3198 * This function works like g_param_spec_set_qdata(), but in addition,
3199 * a <literal>void (*destroy) (gpointer)</literal> function may be
3200 * specified which is called with @data as argument when the @pspec is
3201 * finalized, or the data is being overwritten by a call to
3202 * g_param_spec_set_qdata() with the same @quark.
3207 * g_param_spec_sink:
3208 * @pspec: a valid #GParamSpec
3210 * The initial reference count of a newly created #GParamSpec is 1,
3211 * even though no one has explicitly called g_param_spec_ref() on it
3212 * yet. So the initial reference count is flagged as "floating", until
3213 * someone calls <literal>g_param_spec_ref (pspec); g_param_spec_sink
3214 * (pspec);</literal> in sequence on it, taking over the initial
3215 * reference count (thus ending up with a @pspec that has a reference
3216 * count of 1 still, but is not flagged "floating" anymore).
3221 * g_param_spec_steal_qdata:
3222 * @pspec: the #GParamSpec to get a stored user data pointer from
3223 * @quark: a #GQuark, naming the user data pointer
3225 * Gets back user data pointers stored via g_param_spec_set_qdata()
3226 * and removes the @data from @pspec without invoking its destroy()
3227 * function (if any was set). Usually, calling this function is only
3228 * required to update user data pointers with a destroy notifier.
3230 * Returns: (transfer none): the user data pointer set, or %NULL
3235 * g_param_spec_string:
3236 * @name: canonical name of the property specified
3237 * @nick: nick name for the property specified
3238 * @blurb: description of the property specified
3239 * @default_value: default value for the property specified
3240 * @flags: flags for the property specified
3242 * Creates a new #GParamSpecString instance.
3244 * See g_param_spec_internal() for details on property names.
3246 * Returns: (transfer full): a newly created parameter specification
3251 * g_param_spec_uchar:
3252 * @name: canonical name of the property specified
3253 * @nick: nick name for the property specified
3254 * @blurb: description of the property specified
3255 * @minimum: minimum value for the property specified
3256 * @maximum: maximum value for the property specified
3257 * @default_value: default value for the property specified
3258 * @flags: flags for the property specified
3260 * Creates a new #GParamSpecUChar instance specifying a %G_TYPE_UCHAR property.
3262 * Returns: (transfer full): a newly created parameter specification
3267 * g_param_spec_uint:
3268 * @name: canonical name of the property specified
3269 * @nick: nick name for the property specified
3270 * @blurb: description of the property specified
3271 * @minimum: minimum value for the property specified
3272 * @maximum: maximum value for the property specified
3273 * @default_value: default value for the property specified
3274 * @flags: flags for the property specified
3276 * Creates a new #GParamSpecUInt instance specifying a %G_TYPE_UINT property.
3278 * See g_param_spec_internal() for details on property names.
3280 * Returns: (transfer full): a newly created parameter specification
3285 * g_param_spec_uint64:
3286 * @name: canonical name of the property specified
3287 * @nick: nick name for the property specified
3288 * @blurb: description of the property specified
3289 * @minimum: minimum value for the property specified
3290 * @maximum: maximum value for the property specified
3291 * @default_value: default value for the property specified
3292 * @flags: flags for the property specified
3294 * Creates a new #GParamSpecUInt64 instance specifying a %G_TYPE_UINT64
3297 * See g_param_spec_internal() for details on property names.
3299 * Returns: (transfer full): a newly created parameter specification
3304 * g_param_spec_ulong:
3305 * @name: canonical name of the property specified
3306 * @nick: nick name for the property specified
3307 * @blurb: description of the property specified
3308 * @minimum: minimum value for the property specified
3309 * @maximum: maximum value for the property specified
3310 * @default_value: default value for the property specified
3311 * @flags: flags for the property specified
3313 * Creates a new #GParamSpecULong instance specifying a %G_TYPE_ULONG
3316 * See g_param_spec_internal() for details on property names.
3318 * Returns: (transfer full): a newly created parameter specification
3323 * g_param_spec_unichar:
3324 * @name: canonical name of the property specified
3325 * @nick: nick name for the property specified
3326 * @blurb: description of the property specified
3327 * @default_value: default value for the property specified
3328 * @flags: flags for the property specified
3330 * Creates a new #GParamSpecUnichar instance specifying a %G_TYPE_UINT
3331 * property. #GValue structures for this property can be accessed with
3332 * g_value_set_uint() and g_value_get_uint().
3334 * See g_param_spec_internal() for details on property names.
3336 * Returns: (transfer full): a newly created parameter specification
3341 * g_param_spec_unref: (skip)
3342 * @pspec: a valid #GParamSpec
3344 * Decrements the reference count of a @pspec.
3349 * g_param_spec_value_array: (skip)
3350 * @name: canonical name of the property specified
3351 * @nick: nick name for the property specified
3352 * @blurb: description of the property specified
3353 * @element_spec: a #GParamSpec describing the elements contained in arrays of this property, may be %NULL
3354 * @flags: flags for the property specified
3356 * Creates a new #GParamSpecValueArray instance specifying a
3357 * %G_TYPE_VALUE_ARRAY property. %G_TYPE_VALUE_ARRAY is a
3358 * %G_TYPE_BOXED type, as such, #GValue structures for this property
3359 * can be accessed with g_value_set_boxed() and g_value_get_boxed().
3361 * See g_param_spec_internal() for details on property names.
3363 * Returns: a newly created parameter specification
3368 * g_param_spec_variant:
3369 * @name: canonical name of the property specified
3370 * @nick: nick name for the property specified
3371 * @blurb: description of the property specified
3372 * @type: a #GVariantType
3373 * @default_value: (allow-none) (transfer full): a #GVariant of type @type to use as the default value, or %NULL
3374 * @flags: flags for the property specified
3376 * Creates a new #GParamSpecVariant instance specifying a #GVariant
3379 * If @default_value is floating, it is consumed.
3381 * See g_param_spec_internal() for details on property names.
3383 * Returns: (transfer full): the newly created #GParamSpec
3389 * g_param_type_register_static:
3390 * @name: 0-terminated string used as the name of the new #GParamSpec type.
3391 * @pspec_info: The #GParamSpecTypeInfo for this #GParamSpec type.
3393 * Registers @name as the name of a new static type derived from
3394 * #G_TYPE_PARAM. The type system uses the information contained in
3395 * the #GParamSpecTypeInfo structure pointed to by @info to manage the
3396 * #GParamSpec type and its instances.
3398 * Returns: The new type identifier.
3403 * g_param_value_convert:
3404 * @pspec: a valid #GParamSpec
3405 * @src_value: souce #GValue
3406 * @dest_value: destination #GValue of correct type for @pspec
3407 * @strict_validation: %TRUE requires @dest_value to conform to @pspec without modifications
3409 * Transforms @src_value into @dest_value if possible, and then
3410 * validates @dest_value, in order for it to conform to @pspec. If
3411 * @strict_validation is %TRUE this function will only succeed if the
3412 * transformed @dest_value complied to @pspec without modifications.
3414 * See also g_value_type_transformable(), g_value_transform() and
3415 * g_param_value_validate().
3417 * Returns: %TRUE if transformation and validation were successful, %FALSE otherwise and @dest_value is left untouched.
3422 * g_param_value_defaults:
3423 * @pspec: a valid #GParamSpec
3424 * @value: a #GValue of correct type for @pspec
3426 * Checks whether @value contains the default value as specified in @pspec.
3428 * Returns: whether @value contains the canonical default for this @pspec
3433 * g_param_value_set_default:
3434 * @pspec: a valid #GParamSpec
3435 * @value: a #GValue of correct type for @pspec
3437 * Sets @value to its default value as specified in @pspec.
3442 * g_param_value_validate:
3443 * @pspec: a valid #GParamSpec
3444 * @value: a #GValue of correct type for @pspec
3446 * Ensures that the contents of @value comply with the specifications
3447 * set out by @pspec. For example, a #GParamSpecInt might require
3448 * that integers stored in @value may not be smaller than -42 and not be
3449 * greater than +42. If @value contains an integer outside of this range,
3450 * it is modified accordingly, so the resulting value will fit into the
3453 * Returns: whether modifying @value was necessary to ensure validity
3458 * g_param_values_cmp:
3459 * @pspec: a valid #GParamSpec
3460 * @value1: a #GValue of correct type for @pspec
3461 * @value2: a #GValue of correct type for @pspec
3463 * Compares @value1 with @value2 according to @pspec, and return -1, 0 or +1,
3464 * if @value1 is found to be less than, equal to or greater than @value2,
3467 * Returns: -1, 0 or +1, for a less than, equal to or greater than result
3472 * g_pointer_type_register_static:
3473 * @name: the name of the new pointer type.
3475 * Creates a new %G_TYPE_POINTER derived type id for a new
3476 * pointer type with name @name.
3478 * Returns: a new %G_TYPE_POINTER derived type id for @name.
3483 * g_signal_accumulator_first_wins:
3484 * @ihint: standard #GSignalAccumulator parameter
3485 * @return_accu: standard #GSignalAccumulator parameter
3486 * @handler_return: standard #GSignalAccumulator parameter
3487 * @dummy: standard #GSignalAccumulator parameter
3489 * A predefined #GSignalAccumulator for signals intended to be used as a
3490 * hook for application code to provide a particular value. Usually
3491 * only one such value is desired and multiple handlers for the same
3492 * signal don't make much sense (except for the case of the default
3493 * handler defined in the class structure, in which case you will
3494 * usually want the signal connection to override the class handler).
3496 * This accumulator will use the return value from the first signal
3497 * handler that is run as the return value for the signal and not run
3498 * any further handlers (ie: the first handler "wins").
3500 * Returns: standard #GSignalAccumulator result
3506 * g_signal_accumulator_true_handled:
3507 * @ihint: standard #GSignalAccumulator parameter
3508 * @return_accu: standard #GSignalAccumulator parameter
3509 * @handler_return: standard #GSignalAccumulator parameter
3510 * @dummy: standard #GSignalAccumulator parameter
3512 * A predefined #GSignalAccumulator for signals that return a
3513 * boolean values. The behavior that this accumulator gives is
3514 * that a return of %TRUE stops the signal emission: no further
3515 * callbacks will be invoked, while a return of %FALSE allows
3516 * the emission to continue. The idea here is that a %TRUE return
3517 * indicates that the callback <emphasis>handled</emphasis> the signal,
3518 * and no further handling is needed.
3521 * Returns: standard #GSignalAccumulator result
3526 * g_signal_add_emission_hook:
3527 * @signal_id: the signal identifier, as returned by g_signal_lookup().
3528 * @detail: the detail on which to call the hook.
3529 * @hook_func: a #GSignalEmissionHook function.
3530 * @hook_data: user data for @hook_func.
3531 * @data_destroy: a #GDestroyNotify for @hook_data.
3533 * Adds an emission hook for a signal, which will get called for any emission
3534 * of that signal, independent of the instance. This is possible only
3535 * for signals which don't have #G_SIGNAL_NO_HOOKS flag set.
3537 * Returns: the hook id, for later use with g_signal_remove_emission_hook().
3542 * g_signal_chain_from_overridden:
3543 * @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.
3544 * @return_value: Location for the return value.
3546 * Calls the original class closure of a signal. This function should only
3547 * be called from an overridden class closure; see
3548 * g_signal_override_class_closure() and
3549 * g_signal_override_class_handler().
3554 * g_signal_chain_from_overridden_handler: (skip)
3555 * @instance: the instance the signal is being emitted on.
3556 * @...: 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.
3558 * Calls the original class closure of a signal. This function should
3559 * only be called from an overridden class closure; see
3560 * g_signal_override_class_closure() and
3561 * g_signal_override_class_handler().
3568 * g_signal_connect_closure:
3569 * @instance: (type GObject.Object): the instance to connect to.
3570 * @detailed_signal: a string of the form "signal-name::detail".
3571 * @closure: the closure to connect.
3572 * @after: whether the handler should be called before or after the default handler of the signal.
3574 * Connects a closure to a signal for a particular object.
3576 * Returns: the handler id
3581 * g_signal_connect_closure_by_id:
3582 * @instance: (type GObject.Object): the instance to connect to.
3583 * @signal_id: the id of the signal.
3584 * @detail: the detail.
3585 * @closure: the closure to connect.
3586 * @after: whether the handler should be called before or after the default handler of the signal.
3588 * Connects a closure to a signal for a particular object.
3590 * Returns: the handler id
3595 * g_signal_connect_data:
3596 * @instance: (type GObject.Object): the instance to connect to.
3597 * @detailed_signal: a string of the form "signal-name::detail".
3598 * @c_handler: the #GCallback to connect.
3599 * @data: data to pass to @c_handler calls.
3600 * @destroy_data: a #GClosureNotify for @data.
3601 * @connect_flags: a combination of #GConnectFlags.
3603 * Connects a #GCallback function to a signal for a particular object. Similar
3604 * to g_signal_connect(), but allows to provide a #GClosureNotify for the data
3605 * which will be called when the signal handler is disconnected and no longer
3606 * used. Specify @connect_flags if you need <literal>..._after()</literal> or
3607 * <literal>..._swapped()</literal> variants of this function.
3609 * Returns: the handler id
3614 * g_signal_connect_object: (skip)
3615 * @instance: the instance to connect to.
3616 * @detailed_signal: a string of the form "signal-name::detail".
3617 * @c_handler: the #GCallback to connect.
3618 * @gobject: the object to pass as data to @c_handler.
3619 * @connect_flags: a combination of #GConnectFlags.
3621 * This is similar to g_signal_connect_data(), but uses a closure which
3622 * ensures that the @gobject stays alive during the call to @c_handler
3623 * by temporarily adding a reference count to @gobject.
3625 * When the @gobject is destroyed the signal handler will be automatically
3626 * disconnected. Note that this is not currently threadsafe (ie:
3627 * emitting a signal while @gobject is being destroyed in another thread
3630 * Returns: the handler id.
3636 * @instance: (type GObject.Object): the instance the signal is being emitted on.
3637 * @signal_id: the signal id
3638 * @detail: the detail
3639 * @...: 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.
3643 * Note that g_signal_emit() resets the return value to the default
3644 * if no handlers are connected, in contrast to g_signal_emitv().
3649 * g_signal_emit_by_name:
3650 * @instance: (type GObject.Object): the instance the signal is being emitted on.
3651 * @detailed_signal: a string of the form "signal-name::detail".
3652 * @...: 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.
3656 * Note that g_signal_emit_by_name() resets the return value to the default
3657 * if no handlers are connected, in contrast to g_signal_emitv().
3662 * g_signal_emit_valist: (skip)
3663 * @instance: the instance the signal is being emitted on.
3664 * @signal_id: the signal id
3665 * @detail: the detail
3666 * @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.
3670 * Note that g_signal_emit_valist() resets the return value to the default
3671 * if no handlers are connected, in contrast to g_signal_emitv().
3677 * @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.
3678 * @signal_id: the signal id
3679 * @detail: the detail
3680 * @return_value: Location to store the return value of the signal emission.
3684 * Note that g_signal_emitv() doesn't change @return_value if no handlers are
3685 * connected, in contrast to g_signal_emit() and g_signal_emit_valist().
3690 * g_signal_get_invocation_hint:
3691 * @instance: (type GObject.Object): the instance to query
3693 * Returns the invocation hint of the innermost signal emission of instance.
3695 * Returns: (transfer none): the invocation hint of the innermost signal emission.
3700 * g_signal_handler_block:
3701 * @instance: (type GObject.Object): The instance to block the signal handler of.
3702 * @handler_id: Handler id of the handler to be blocked.
3704 * Blocks a handler of an instance so it will not be called during any
3705 * signal emissions unless it is unblocked again. Thus "blocking" a
3706 * signal handler means to temporarily deactive it, a signal handler
3707 * has to be unblocked exactly the same amount of times it has been
3708 * blocked before to become active again.
3710 * The @handler_id has to be a valid signal handler id, connected to a
3711 * signal of @instance.
3716 * g_signal_handler_disconnect:
3717 * @instance: (type GObject.Object): The instance to remove the signal handler from.
3718 * @handler_id: Handler id of the handler to be disconnected.
3720 * Disconnects a handler from an instance so it will not be called during
3721 * any future or currently ongoing emissions of the signal it has been
3722 * connected to. The @handler_id becomes invalid and may be reused.
3724 * The @handler_id has to be a valid signal handler id, connected to a
3725 * signal of @instance.
3730 * g_signal_handler_find:
3731 * @instance: (type GObject.Object): The instance owning the signal handler to be found.
3732 * @mask: Mask indicating which of @signal_id, @detail, @closure, @func and/or @data the handler has to match.
3733 * @signal_id: Signal the handler has to be connected to.
3734 * @detail: Signal detail the handler has to be connected to.
3735 * @closure: (allow-none): The closure the handler will invoke.
3736 * @func: The C closure callback of the handler (useless for non-C closures).
3737 * @data: The closure data of the handler's closure.
3739 * Finds the first signal handler that matches certain selection criteria.
3740 * The criteria mask is passed as an OR-ed combination of #GSignalMatchType
3741 * flags, and the criteria values are passed as arguments.
3742 * The match @mask has to be non-0 for successful matches.
3743 * If no handler was found, 0 is returned.
3745 * Returns: A valid non-0 signal handler id for a successful match.
3750 * g_signal_handler_is_connected:
3751 * @instance: (type GObject.Object): The instance where a signal handler is sought.
3752 * @handler_id: the handler id.
3754 * Returns whether @handler_id is the id of a handler connected to @instance.
3756 * Returns: whether @handler_id identifies a handler connected to @instance.
3761 * g_signal_handler_unblock:
3762 * @instance: (type GObject.Object): The instance to unblock the signal handler of.
3763 * @handler_id: Handler id of the handler to be unblocked.
3765 * Undoes the effect of a previous g_signal_handler_block() call. A
3766 * blocked handler is skipped during signal emissions and will not be
3767 * invoked, unblocking it (for exactly the amount of times it has been
3768 * blocked before) reverts its "blocked" state, so the handler will be
3769 * recognized by the signal system and is called upon future or
3770 * currently ongoing signal emissions (since the order in which
3771 * handlers are called during signal emissions is deterministic,
3772 * whether the unblocked handler in question is called as part of a
3773 * currently ongoing emission depends on how far that emission has
3776 * The @handler_id has to be a valid id of a signal handler that is
3777 * connected to a signal of @instance and is currently blocked.
3782 * g_signal_handlers_block_matched:
3783 * @instance: (type GObject.Object): The instance to block handlers from.
3784 * @mask: Mask indicating which of @signal_id, @detail, @closure, @func and/or @data the handlers have to match.
3785 * @signal_id: Signal the handlers have to be connected to.
3786 * @detail: Signal detail the handlers have to be connected to.
3787 * @closure: (allow-none): The closure the handlers will invoke.
3788 * @func: The C closure callback of the handlers (useless for non-C closures).
3789 * @data: The closure data of the handlers' closures.
3791 * Blocks all handlers on an instance that match a certain selection criteria.
3792 * The criteria mask is passed as an OR-ed combination of #GSignalMatchType
3793 * flags, and the criteria values are passed as arguments.
3794 * Passing at least one of the %G_SIGNAL_MATCH_CLOSURE, %G_SIGNAL_MATCH_FUNC
3795 * or %G_SIGNAL_MATCH_DATA match flags is required for successful matches.
3796 * If no handlers were found, 0 is returned, the number of blocked handlers
3799 * Returns: The number of handlers that matched.
3804 * g_signal_handlers_destroy:
3805 * @instance: (type GObject.Object): The instance where a signal handler is sought.
3810 * g_signal_handlers_disconnect_matched:
3811 * @instance: (type GObject.Object): The instance to remove handlers from.
3812 * @mask: Mask indicating which of @signal_id, @detail, @closure, @func and/or @data the handlers have to match.
3813 * @signal_id: Signal the handlers have to be connected to.
3814 * @detail: Signal detail the handlers have to be connected to.
3815 * @closure: (allow-none): The closure the handlers will invoke.
3816 * @func: The C closure callback of the handlers (useless for non-C closures).
3817 * @data: The closure data of the handlers' closures.
3819 * Disconnects all handlers on an instance that match a certain
3820 * selection criteria. The criteria mask is passed as an OR-ed
3821 * combination of #GSignalMatchType flags, and the criteria values are
3822 * passed as arguments. Passing at least one of the
3823 * %G_SIGNAL_MATCH_CLOSURE, %G_SIGNAL_MATCH_FUNC or
3824 * %G_SIGNAL_MATCH_DATA match flags is required for successful
3825 * matches. If no handlers were found, 0 is returned, the number of
3826 * disconnected handlers otherwise.
3828 * Returns: The number of handlers that matched.
3833 * g_signal_handlers_unblock_matched:
3834 * @instance: (type GObject.Object): The instance to unblock handlers from.
3835 * @mask: Mask indicating which of @signal_id, @detail, @closure, @func and/or @data the handlers have to match.
3836 * @signal_id: Signal the handlers have to be connected to.
3837 * @detail: Signal detail the handlers have to be connected to.
3838 * @closure: (allow-none): The closure the handlers will invoke.
3839 * @func: The C closure callback of the handlers (useless for non-C closures).
3840 * @data: The closure data of the handlers' closures.
3842 * Unblocks all handlers on an instance that match a certain selection
3843 * criteria. The criteria mask is passed as an OR-ed combination of
3844 * #GSignalMatchType flags, and the criteria values are passed as arguments.
3845 * Passing at least one of the %G_SIGNAL_MATCH_CLOSURE, %G_SIGNAL_MATCH_FUNC
3846 * or %G_SIGNAL_MATCH_DATA match flags is required for successful matches.
3847 * If no handlers were found, 0 is returned, the number of unblocked handlers
3848 * otherwise. The match criteria should not apply to any handlers that are
3849 * not currently blocked.
3851 * Returns: The number of handlers that matched.
3856 * g_signal_has_handler_pending:
3857 * @instance: (type GObject.Object): the object whose signal handlers are sought.
3858 * @signal_id: the signal id.
3859 * @detail: the detail.
3860 * @may_be_blocked: whether blocked handlers should count as match.
3862 * Returns whether there are any handlers connected to @instance for the
3863 * given signal id and detail.
3865 * One example of when you might use this is when the arguments to the
3866 * signal are difficult to compute. A class implementor may opt to not
3867 * emit the signal if no one is attached anyway, thus saving the cost
3868 * of building the arguments.
3870 * Returns: %TRUE if a handler is connected to the signal, %FALSE otherwise.
3875 * g_signal_list_ids:
3876 * @itype: Instance or interface type.
3877 * @n_ids: Location to store the number of signal ids for @itype.
3879 * Lists the signals by id that a certain instance or interface type
3880 * created. Further information about the signals can be acquired through
3883 * Returns: (array length=n_ids): Newly allocated array of signal IDs.
3889 * @name: the signal's name.
3890 * @itype: the type that the signal operates on.
3892 * Given the name of the signal and the type of object it connects to, gets
3893 * the signal's identifying integer. Emitting the signal by number is
3894 * somewhat faster than using the name each time.
3896 * Also tries the ancestors of the given type.
3898 * See g_signal_new() for details on allowed signal names.
3900 * Returns: the signal's identifying number, or 0 if no signal was found.
3906 * @signal_id: the signal's identifying number.
3908 * Given the signal's identifier, finds its name.
3910 * Two different signals may have the same name, if they have differing types.
3912 * Returns: the signal name, or %NULL if the signal number was invalid.
3918 * @signal_name: the name for the signal
3919 * @itype: the type this signal pertains to. It will also pertain to types which are derived from this type.
3920 * @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.
3921 * @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.
3922 * @accumulator: the accumulator for this signal; may be %NULL.
3923 * @accu_data: user data for the @accumulator.
3924 * @c_marshaller: (allow-none): the function to translate arrays of parameter values to signal emissions into C language callback invocations or %NULL.
3925 * @return_type: the type of return value, or #G_TYPE_NONE for a signal without a return value.
3926 * @n_params: the number of parameter types to follow.
3927 * @...: a list of types, one for each parameter.
3929 * Creates a new signal. (This is usually done in the class initializer.)
3931 * A signal name consists of segments consisting of ASCII letters and
3932 * digits, separated by either the '-' or '_' character. The first
3933 * character of a signal name must be a letter. Names which violate these
3934 * rules lead to undefined behaviour of the GSignal system.
3936 * When registering a signal and looking up a signal, either separator can
3937 * be used, but they cannot be mixed.
3939 * If 0 is used for @class_offset subclasses cannot override the class handler
3940 * in their <code>class_init</code> method by doing
3941 * <code>super_class->signal_handler = my_signal_handler</code>. Instead they
3942 * will have to use g_signal_override_class_handler().
3944 * If c_marshaller is %NULL, g_cclosure_marshal_generic() will be used as
3945 * the marshaller for this signal.
3947 * Returns: the signal id
3952 * g_signal_new_class_handler:
3953 * @signal_name: the name for the signal
3954 * @itype: the type this signal pertains to. It will also pertain to types which are derived from this type.
3955 * @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.
3956 * @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.
3957 * @accumulator: the accumulator for this signal; may be %NULL.
3958 * @accu_data: user data for the @accumulator.
3959 * @c_marshaller: (allow-none): the function to translate arrays of parameter values to signal emissions into C language callback invocations or %NULL.
3960 * @return_type: the type of return value, or #G_TYPE_NONE for a signal without a return value.
3961 * @n_params: the number of parameter types to follow.
3962 * @...: a list of types, one for each parameter.
3964 * Creates a new signal. (This is usually done in the class initializer.)
3966 * This is a variant of g_signal_new() that takes a C callback instead
3967 * off a class offset for the signal's class handler. This function
3968 * doesn't need a function pointer exposed in the class structure of
3969 * an object definition, instead the function pointer is passed
3970 * directly and can be overriden by derived classes with
3971 * g_signal_override_class_closure() or
3972 * g_signal_override_class_handler()and chained to with
3973 * g_signal_chain_from_overridden() or
3974 * g_signal_chain_from_overridden_handler().
3976 * See g_signal_new() for information about signal names.
3978 * If c_marshaller is %NULL @g_cclosure_marshal_generic will be used as
3979 * the marshaller for this signal.
3981 * Returns: the signal id
3987 * g_signal_new_valist:
3988 * @signal_name: the name for the signal
3989 * @itype: the type this signal pertains to. It will also pertain to types which are derived from this type.
3990 * @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.
3991 * @class_closure: The closure to invoke on signal emission; may be %NULL.
3992 * @accumulator: the accumulator for this signal; may be %NULL.
3993 * @accu_data: user data for the @accumulator.
3994 * @c_marshaller: (allow-none): the function to translate arrays of parameter values to signal emissions into C language callback invocations or %NULL.
3995 * @return_type: the type of return value, or #G_TYPE_NONE for a signal without a return value.
3996 * @n_params: the number of parameter types in @args.
3997 * @args: va_list of #GType, one for each parameter.
3999 * Creates a new signal. (This is usually done in the class initializer.)
4001 * See g_signal_new() for details on allowed signal names.
4003 * If c_marshaller is %NULL, g_cclosure_marshal_generic() will be used as
4004 * the marshaller for this signal.
4006 * Returns: the signal id
4012 * @signal_name: the name for the signal
4013 * @itype: the type this signal pertains to. It will also pertain to types which are derived from this type
4014 * @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
4015 * @class_closure: (allow-none): The closure to invoke on signal emission; may be %NULL
4016 * @accumulator: (allow-none): the accumulator for this signal; may be %NULL
4017 * @accu_data: user data for the @accumulator
4018 * @c_marshaller: (allow-none): the function to translate arrays of parameter values to signal emissions into C language callback invocations or %NULL
4019 * @return_type: the type of return value, or #G_TYPE_NONE for a signal without a return value
4020 * @n_params: the length of @param_types
4021 * @param_types: (array length=n_params): an array of types, one for each parameter
4023 * Creates a new signal. (This is usually done in the class initializer.)
4025 * See g_signal_new() for details on allowed signal names.
4027 * If c_marshaller is %NULL @g_cclosure_marshal_generic will be used as
4028 * the marshaller for this signal.
4030 * Returns: the signal id
4035 * g_signal_override_class_closure:
4036 * @signal_id: the signal id
4037 * @instance_type: the instance type on which to override the class closure for the signal.
4038 * @class_closure: the closure.
4040 * Overrides the class closure (i.e. the default handler) for the given signal
4041 * for emissions on instances of @instance_type. @instance_type must be derived
4042 * from the type to which the signal belongs.
4044 * See g_signal_chain_from_overridden() and
4045 * g_signal_chain_from_overridden_handler() for how to chain up to the
4046 * parent class closure from inside the overridden one.
4051 * g_signal_override_class_handler:
4052 * @signal_name: the name for the signal
4053 * @instance_type: the instance type on which to override the class handler for the signal.
4054 * @class_handler: the handler.
4056 * Overrides the class closure (i.e. the default handler) for the
4057 * given signal for emissions on instances of @instance_type with
4058 * callback @class_handler. @instance_type must be derived from the
4059 * type to which the signal belongs.
4061 * See g_signal_chain_from_overridden() and
4062 * g_signal_chain_from_overridden_handler() for how to chain up to the
4063 * parent class closure from inside the overridden one.
4070 * g_signal_parse_name:
4071 * @detailed_signal: a string of the form "signal-name::detail".
4072 * @itype: The interface/instance type that introduced "signal-name".
4073 * @signal_id_p: (out): Location to store the signal id.
4074 * @detail_p: (out): Location to store the detail quark.
4075 * @force_detail_quark: %TRUE forces creation of a #GQuark for the detail.
4077 * Internal function to parse a signal name into its @signal_id
4078 * and @detail quark.
4080 * Returns: Whether the signal name could successfully be parsed and @signal_id_p and @detail_p contain valid return values.
4086 * @signal_id: The signal id of the signal to query information for.
4087 * @query: (out caller-allocates): A user provided structure that is filled in with constant values upon success.
4089 * Queries the signal system for in-depth information about a
4090 * specific signal. This function will fill in a user-provided
4091 * structure to hold signal-specific information. If an invalid
4092 * signal id is passed in, the @signal_id member of the #GSignalQuery
4093 * is 0. All members filled into the #GSignalQuery structure should
4094 * be considered constant and have to be left untouched.
4099 * g_signal_remove_emission_hook:
4100 * @signal_id: the id of the signal
4101 * @hook_id: the id of the emission hook, as returned by g_signal_add_emission_hook()
4103 * Deletes an emission hook.
4108 * g_signal_stop_emission:
4109 * @instance: (type GObject.Object): the object whose signal handlers you wish to stop.
4110 * @signal_id: the signal identifier, as returned by g_signal_lookup().
4111 * @detail: the detail which the signal was emitted with.
4113 * Stops a signal's current emission.
4115 * This will prevent the default method from running, if the signal was
4116 * %G_SIGNAL_RUN_LAST and you connected normally (i.e. without the "after"
4119 * Prints a warning if used on a signal which isn't being emitted.
4124 * g_signal_stop_emission_by_name:
4125 * @instance: (type GObject.Object): the object whose signal handlers you wish to stop.
4126 * @detailed_signal: a string of the form "signal-name::detail".
4128 * Stops a signal's current emission.
4130 * This is just like g_signal_stop_emission() except it will look up the
4131 * signal id for you.
4136 * g_signal_type_cclosure_new:
4137 * @itype: the #GType identifier of an interface or classed type
4138 * @struct_offset: the offset of the member function of @itype's class structure which is to be invoked by the new closure
4140 * Creates a new closure which invokes the function found at the offset
4141 * @struct_offset in the class structure of the interface or classed type
4142 * identified by @itype.
4144 * Returns: a new #GCClosure
4149 * g_source_set_closure:
4150 * @source: the source
4151 * @closure: a #GClosure
4153 * Set the callback for a source as a #GClosure.
4155 * If the source is not one of the standard GLib types, the @closure_callback
4156 * and @closure_marshal fields of the #GSourceFuncs structure must have been
4157 * filled in with pointers to appropriate functions.
4162 * g_source_set_dummy_callback:
4163 * @source: the source
4165 * Sets a dummy callback for @source. The callback will do nothing, and
4166 * if the source expects a #gboolean return value, it will return %TRUE.
4167 * (If the source expects any other type of return value, it will return
4168 * a 0/%NULL value; whatever g_value_init() initializes a #GValue to for
4171 * If the source is not one of the standard GLib types, the
4172 * @closure_callback and @closure_marshal fields of the #GSourceFuncs
4173 * structure must have been filled in with pointers to appropriate
4179 * g_strdup_value_contents:
4180 * @value: #GValue which contents are to be described.
4182 * Return a newly allocated string, which describes the contents of a
4183 * #GValue. The main purpose of this function is to describe #GValue
4184 * contents for debugging output, the way in which the contents are
4185 * described may change between different GLib versions.
4187 * Returns: Newly allocated string.
4192 * g_type_add_class_cache_func: (skip)
4193 * @cache_data: data to be passed to @cache_func
4194 * @cache_func: a #GTypeClassCacheFunc
4196 * Adds a #GTypeClassCacheFunc to be called before the reference count of a
4197 * class goes from one to zero. This can be used to prevent premature class
4198 * destruction. All installed #GTypeClassCacheFunc functions will be chained
4199 * until one of them returns %TRUE. The functions have to check the class id
4200 * passed in to figure whether they actually want to cache the class of this
4201 * type, since all classes are routed through the same #GTypeClassCacheFunc
4207 * g_type_add_class_private:
4208 * @class_type: GType of an classed type.
4209 * @private_size: size of private structure.
4211 * Registers a private class structure for a classed type;
4212 * when the class is allocated, the private structures for
4213 * the class and all of its parent types are allocated
4214 * sequentially in the same memory block as the public
4215 * structures. This function should be called in the
4216 * type's get_type() function after the type is registered.
4217 * The private structure can be retrieved using the
4218 * G_TYPE_CLASS_GET_PRIVATE() macro.
4225 * g_type_add_interface_check: (skip)
4226 * @check_data: data to pass to @check_func
4227 * @check_func: function to be called after each interface is initialized.
4229 * Adds a function to be called after an interface vtable is
4230 * initialized for any class (i.e. after the @interface_init member of
4231 * #GInterfaceInfo has been called).
4233 * This function is useful when you want to check an invariant that
4234 * depends on the interfaces of a class. For instance, the
4235 * implementation of #GObject uses this facility to check that an
4236 * object implements all of the properties that are defined on its
4244 * g_type_add_interface_dynamic:
4245 * @instance_type: the #GType value of an instantiable type.
4246 * @interface_type: the #GType value of an interface type.
4247 * @plugin: the #GTypePlugin structure to retrieve the #GInterfaceInfo from.
4249 * Adds the dynamic @interface_type to @instantiable_type. The information
4250 * contained in the #GTypePlugin structure pointed to by @plugin
4251 * is used to manage the relationship.
4256 * g_type_add_interface_static:
4257 * @instance_type: #GType value of an instantiable type.
4258 * @interface_type: #GType value of an interface type.
4259 * @info: The #GInterfaceInfo structure for this (@instance_type, @interface_type) combination.
4261 * Adds the static @interface_type to @instantiable_type. The
4262 * information contained in the #GInterfaceInfo structure pointed to by
4263 * @info is used to manage the relationship.
4268 * g_type_check_instance:
4269 * @instance: A valid #GTypeInstance structure.
4271 * Private helper function to aid implementation of the G_TYPE_CHECK_INSTANCE()
4274 * Returns: %TRUE if @instance is valid, %FALSE otherwise.
4280 * @type: The parent type.
4281 * @n_children: (out) (allow-none): Optional #guint pointer to contain the number of child types.
4283 * Return a newly allocated and 0-terminated array of type IDs, listing the
4284 * child types of @type. The return value has to be g_free()ed after use.
4286 * Returns: (array length=n_children) (transfer full): Newly allocated and 0-terminated array of child types.
4291 * g_type_class_add_private:
4292 * @g_class: class structure for an instantiatable type
4293 * @private_size: size of private structure.
4295 * Registers a private structure for an instantiatable type.
4297 * When an object is allocated, the private structures for
4298 * the type and all of its parent types are allocated
4299 * sequentially in the same memory block as the public
4302 * Note that the accumulated size of the private structures of
4303 * a type and all its parent types cannot exceed 64 KiB.
4305 * This function should be called in the type's class_init() function.
4306 * The private structure can be retrieved using the
4307 * G_TYPE_INSTANCE_GET_PRIVATE() macro.
4309 * The following example shows attaching a private structure
4310 * <structname>MyObjectPrivate</structname> to an object
4311 * <structname>MyObject</structname> defined in the standard GObject
4313 * type's class_init() function.
4314 * Note the use of a structure member "priv" to avoid the overhead
4315 * of repeatedly calling MY_OBJECT_GET_PRIVATE().
4318 * typedef struct _MyObject MyObject;
4319 * typedef struct _MyObjectPrivate MyObjectPrivate;
4321 * struct _MyObject {
4324 * MyObjectPrivate *priv;
4327 * struct _MyObjectPrivate {
4332 * my_object_class_init (MyObjectClass *klass)
4334 * g_type_class_add_private (klass, sizeof (MyObjectPrivate));
4338 * my_object_init (MyObject *my_object)
4340 * my_object->priv = G_TYPE_INSTANCE_GET_PRIVATE (my_object,
4346 * my_object_get_some_field (MyObject *my_object)
4348 * MyObjectPrivate *priv;
4350 * g_return_val_if_fail (MY_IS_OBJECT (my_object), 0);
4352 * priv = my_object->priv;
4354 * return priv->some_field;
4363 * g_type_class_get_instance_private_offset: (skip)
4364 * @g_class: a #GTypeClass
4366 * Gets the offset of the private data for instances of @g_class.
4368 * This is how many bytes you should add to the instance pointer of a
4369 * class in order to get the private data for the type represented by
4372 * You can only call this function after you have registered a private
4373 * data area for @g_class using g_type_class_add_private().
4375 * Returns: the offset, in bytes
4381 * g_type_class_peek:
4382 * @type: Type ID of a classed type.
4384 * This function is essentially the same as g_type_class_ref(), except that
4385 * the classes reference count isn't incremented. As a consequence, this function
4386 * may return %NULL if the class of the type passed in does not currently
4387 * exist (hasn't been referenced before).
4389 * Returns: (type GObject.TypeClass) (transfer none): The #GTypeClass structure for the given type ID or %NULL if the class does not currently exist.
4394 * g_type_class_peek_parent:
4395 * @g_class: (type GObject.TypeClass): The #GTypeClass structure to retrieve the parent class for.
4397 * This is a convenience function often needed in class initializers.
4398 * It returns the class structure of the immediate parent type of the
4399 * class passed in. Since derived classes hold a reference count on
4400 * their parent classes as long as they are instantiated, the returned
4401 * class will always exist. This function is essentially equivalent
4405 * g_type_class_peek (g_type_parent (G_TYPE_FROM_CLASS (g_class)));
4408 * Returns: (type GObject.TypeClass) (transfer none): The parent class of @g_class.
4413 * g_type_class_peek_static:
4414 * @type: Type ID of a classed type.
4416 * A more efficient version of g_type_class_peek() which works only for
4420 * 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.
4426 * @type: Type ID of a classed type.
4428 * Increments the reference count of the class structure belonging to
4429 * @type. This function will demand-create the class if it doesn't
4432 * Returns: (type GObject.TypeClass) (transfer none): The #GTypeClass structure for the given type ID.
4437 * g_type_class_unref:
4438 * @g_class: (type GObject.TypeClass): The #GTypeClass structure to unreference.
4440 * Decrements the reference count of the class structure being passed in.
4441 * Once the last reference count of a class has been released, classes
4442 * may be finalized by the type system, so further dereferencing of a
4443 * class pointer after g_type_class_unref() are invalid.
4448 * g_type_class_unref_uncached: (skip)
4449 * @g_class: (type GObject.TypeClass): The #GTypeClass structure to unreference.
4451 * A variant of g_type_class_unref() for use in #GTypeClassCacheFunc
4452 * implementations. It unreferences a class without consulting the chain
4453 * of #GTypeClassCacheFunc<!-- -->s, avoiding the recursion which would occur
4459 * g_type_create_instance: (skip)
4460 * @type: An instantiatable type to create an instance for.
4462 * Creates and initializes an instance of @type if @type is valid and
4463 * can be instantiated. The type system only performs basic allocation
4464 * and structure setups for instances: actual instance creation should
4465 * happen through functions supplied by the type's fundamental type
4466 * implementation. So use of g_type_create_instance() is reserved for
4467 * implementators of fundamental types only. E.g. instances of the
4468 * #GObject hierarchy should be created via g_object_new() and
4469 * <emphasis>never</emphasis> directly through
4470 * g_type_create_instance() which doesn't handle things like singleton
4471 * objects or object construction. Note: Do <emphasis>not</emphasis>
4472 * use this function, unless you're implementing a fundamental
4473 * type. Also language bindings should <emphasis>not</emphasis> use
4474 * this function but g_object_new() instead.
4476 * Returns: An allocated and initialized instance, subject to further treatment by the fundamental type implementation.
4481 * g_type_default_interface_peek:
4482 * @g_type: an interface type
4484 * If the interface type @g_type is currently in use, returns its
4485 * default interface vtable.
4488 * Returns: (type GObject.TypeInterface) (transfer none): the default vtable for the interface, or %NULL if the type is not currently in use.
4493 * g_type_default_interface_ref:
4494 * @g_type: an interface type
4496 * Increments the reference count for the interface type @g_type,
4497 * and returns the default interface vtable for the type.
4499 * If the type is not currently in use, then the default vtable
4500 * for the type will be created and initalized by calling
4501 * the base interface init and default vtable init functions for
4502 * the type (the @<structfield>base_init</structfield>
4503 * and <structfield>class_init</structfield> members of #GTypeInfo).
4504 * Calling g_type_default_interface_ref() is useful when you
4505 * want to make sure that signals and properties for an interface
4506 * have been installed.
4509 * 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.
4514 * g_type_default_interface_unref:
4515 * @g_iface: (type GObject.TypeInterface): the default vtable structure for a interface, as returned by g_type_default_interface_ref()
4517 * Decrements the reference count for the type corresponding to the
4518 * interface default vtable @g_iface. If the type is dynamic, then
4519 * when no one is using the interface and all references have
4520 * been released, the finalize function for the interface's default
4521 * vtable (the <structfield>class_finalize</structfield> member of
4522 * #GTypeInfo) will be called.
4530 * @type: A #GType value.
4532 * Returns the length of the ancestry of the passed in type. This
4533 * includes the type itself, so that e.g. a fundamental type has depth 1.
4535 * Returns: The depth of @type.
4543 * Ensures that the indicated @type has been registered with the
4544 * type system, and its _class_init() method has been run.
4546 * In theory, simply calling the type's _get_type() method (or using
4547 * the corresponding macro) is supposed take care of this. However,
4548 * _get_type() methods are often marked %G_GNUC_CONST for performance
4549 * reasons, even though this is technically incorrect (since
4550 * %G_GNUC_CONST requires that the function not have side effects,
4551 * which _get_type() methods do on the first call). As a result, if
4552 * you write a bare call to a _get_type() macro, it may get optimized
4553 * out by the compiler. Using g_type_ensure() guarantees that the
4554 * type's _get_type() method is called.
4561 * g_type_free_instance:
4562 * @instance: an instance of a type.
4564 * Frees an instance of a type, returning it to the instance pool for
4565 * the type, if there is one.
4567 * Like g_type_create_instance(), this function is reserved for
4568 * implementors of fundamental types.
4574 * @name: Type name to lookup.
4576 * Lookup the type ID from a given type name, returning 0 if no type
4577 * has been registered under this name (this is the preferred method
4578 * to find out by name whether a specific type has been registered
4581 * Returns: Corresponding type ID or 0.
4586 * g_type_fundamental:
4587 * @type_id: valid type ID
4589 * Internal function, used to extract the fundamental type ID portion.
4590 * use G_TYPE_FUNDAMENTAL() instead.
4592 * Returns: fundamental type ID
4597 * g_type_fundamental_next:
4599 * Returns the next free fundamental type id which can be used to
4600 * register a new fundamental type with g_type_register_fundamental().
4601 * The returned type ID represents the highest currently registered
4602 * fundamental type identifier.
4604 * Returns: The nextmost fundamental type ID to be registered, or 0 if the type system ran out of fundamental type IDs.
4609 * g_type_get_plugin:
4610 * @type: The #GType to retrieve the plugin for.
4612 * Returns the #GTypePlugin structure for @type or
4613 * %NULL if @type does not have a #GTypePlugin structure.
4615 * Returns: (transfer none): The corresponding plugin if @type is a dynamic type, %NULL otherwise.
4622 * @quark: a #GQuark id to identify the data
4624 * Obtains data which has previously been attached to @type
4625 * with g_type_set_qdata().
4627 * Note that this does not take subtyping into account; data
4628 * attached to one type with g_type_set_qdata() cannot
4629 * be retrieved from a subtype using g_type_get_qdata().
4631 * Returns: (transfer none): the data, or %NULL if no data was found
4636 * g_type_get_type_registration_serial:
4638 * Returns an opaque serial number that represents the state of the set of
4639 * registered types. Any time a type is registered this serial changes,
4640 * which means you can cache information based on type lookups (such as
4641 * g_type_from_name()) and know if the cache is still valid at a later
4642 * time by comparing the current serial with the one at the type lookup.
4645 * Returns: An unsigned int, representing the state of type registrations.
4652 * This function used to initialise the type system. Since GLib 2.36,
4653 * the type system is initialised automatically and this function does
4656 * Deprecated: 2.36: the type system is now initialised automatically
4661 * g_type_init_with_debug_flags:
4662 * @debug_flags: Bitwise combination of #GTypeDebugFlags values for debugging purposes.
4664 * This function used to initialise the type system with debugging
4665 * flags. Since GLib 2.36, the type system is initialised automatically
4666 * and this function does nothing.
4668 * If you need to enable debugging features, use the GOBJECT_DEBUG
4669 * environment variable.
4671 * Deprecated: 2.36: the type system is now initialised automatically
4676 * g_type_interface_add_prerequisite:
4677 * @interface_type: #GType value of an interface type.
4678 * @prerequisite_type: #GType value of an interface or instantiatable type.
4680 * Adds @prerequisite_type to the list of prerequisites of @interface_type.
4681 * This means that any type implementing @interface_type must also implement
4682 * @prerequisite_type. Prerequisites can be thought of as an alternative to
4683 * interface derivation (which GType doesn't support). An interface can have
4684 * at most one instantiatable prerequisite type.
4689 * g_type_interface_get_plugin:
4690 * @instance_type: the #GType value of an instantiatable type.
4691 * @interface_type: the #GType value of an interface type.
4693 * Returns the #GTypePlugin structure for the dynamic interface
4694 * @interface_type which has been added to @instance_type, or %NULL if
4695 * @interface_type has not been added to @instance_type or does not
4696 * have a #GTypePlugin structure. See g_type_add_interface_dynamic().
4698 * Returns: (transfer none): the #GTypePlugin for the dynamic interface @interface_type of @instance_type.
4703 * g_type_interface_peek:
4704 * @instance_class: (type GObject.TypeClass): A #GTypeClass structure.
4705 * @iface_type: An interface ID which this class conforms to.
4707 * Returns the #GTypeInterface structure of an interface to which the
4708 * passed in class conforms.
4710 * Returns: (type GObject.TypeInterface) (transfer none): The GTypeInterface structure of iface_type if implemented by @instance_class, %NULL otherwise
4715 * g_type_interface_peek_parent:
4716 * @g_iface: (type GObject.TypeInterface): A #GTypeInterface structure.
4718 * Returns the corresponding #GTypeInterface structure of the parent type
4719 * of the instance type to which @g_iface belongs. This is useful when
4720 * deriving the implementation of an interface from the parent type and
4721 * then possibly overriding some methods.
4723 * 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.
4728 * g_type_interface_prerequisites:
4729 * @interface_type: an interface type
4730 * @n_prerequisites: (out) (allow-none): location to return the number of prerequisites, or %NULL
4732 * Returns the prerequisites of an interfaces type.
4735 * Returns: (array length=n_prerequisites) (transfer full): a newly-allocated zero-terminated array of #GType containing the prerequisites of @interface_type
4740 * g_type_interfaces:
4741 * @type: The type to list interface types for.
4742 * @n_interfaces: (out) (allow-none): Optional #guint pointer to contain the number of interface types.
4744 * Return a newly allocated and 0-terminated array of type IDs, listing the
4745 * interface types that @type conforms to. The return value has to be
4746 * g_free()ed after use.
4748 * Returns: (array length=n_interfaces) (transfer full): Newly allocated and 0-terminated array of interface types.
4754 * @type: Type to check anchestry for.
4755 * @is_a_type: Possible anchestor of @type or interface @type could conform to.
4757 * If @is_a_type is a derivable type, check whether @type is a
4758 * descendant of @is_a_type. If @is_a_type is an interface, check
4759 * whether @type conforms to it.
4761 * Returns: %TRUE if @type is_a @is_a_type holds true.
4766 * g_type_module_add_interface:
4767 * @module: a #GTypeModule
4768 * @instance_type: type to which to add the interface.
4769 * @interface_type: interface type to add
4770 * @interface_info: type information structure
4772 * Registers an additional interface for a type, whose interface lives
4773 * in the given type plugin. If the interface was already registered
4774 * for the type in this plugin, nothing will be done.
4776 * As long as any instances of the type exist, the type plugin will
4782 * g_type_module_register_enum:
4783 * @module: a #GTypeModule
4784 * @name: name for the type
4785 * @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.
4787 * Looks up or registers an enumeration that is implemented with a particular
4788 * type plugin. If a type with name @type_name was previously registered,
4789 * the #GType identifier for the type is returned, otherwise the type
4790 * is newly registered, and the resulting #GType identifier returned.
4792 * As long as any instances of the type exist, the type plugin will
4796 * Returns: the new or existing type ID
4801 * g_type_module_register_flags:
4802 * @module: a #GTypeModule
4803 * @name: name for the type
4804 * @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.
4806 * Looks up or registers a flags type that is implemented with a particular
4807 * type plugin. If a type with name @type_name was previously registered,
4808 * the #GType identifier for the type is returned, otherwise the type
4809 * is newly registered, and the resulting #GType identifier returned.
4811 * As long as any instances of the type exist, the type plugin will
4815 * Returns: the new or existing type ID
4820 * g_type_module_register_type:
4821 * @module: a #GTypeModule
4822 * @parent_type: the type for the parent class
4823 * @type_name: name for the type
4824 * @type_info: type information structure
4825 * @flags: flags field providing details about the type
4827 * Looks up or registers a type that is implemented with a particular
4828 * type plugin. If a type with name @type_name was previously registered,
4829 * the #GType identifier for the type is returned, otherwise the type
4830 * is newly registered, and the resulting #GType identifier returned.
4832 * When reregistering a type (typically because a module is unloaded
4833 * then reloaded, and reinitialized), @module and @parent_type must
4834 * be the same as they were previously.
4836 * As long as any instances of the type exist, the type plugin will
4839 * Returns: the new or existing type ID
4844 * g_type_module_set_name:
4845 * @module: a #GTypeModule.
4846 * @name: a human-readable name to use in error messages.
4848 * Sets the name for a #GTypeModule
4853 * g_type_module_unuse:
4854 * @module: a #GTypeModule
4856 * Decreases the use count of a #GTypeModule by one. If the
4857 * result is zero, the module will be unloaded. (However, the
4858 * #GTypeModule will not be freed, and types associated with the
4859 * #GTypeModule are not unregistered. Once a #GTypeModule is
4860 * initialized, it must exist forever.)
4865 * g_type_module_use:
4866 * @module: a #GTypeModule
4868 * Increases the use count of a #GTypeModule by one. If the
4869 * use count was zero before, the plugin will be loaded.
4870 * If loading the plugin fails, the use count is reset to
4873 * Returns: %FALSE if the plugin needed to be loaded and loading the plugin failed.
4879 * @type: Type to return name for.
4881 * Get the unique name that is assigned to a type ID. Note that this
4882 * function (like all other GType API) cannot cope with invalid type
4883 * IDs. %G_TYPE_INVALID may be passed to this function, as may be any
4884 * other validly registered type ID, but randomized type IDs should
4885 * not be passed in and will most likely lead to a crash.
4887 * Returns: Static type name or %NULL.
4893 * @leaf_type: Descendant of @root_type and the type to be returned.
4894 * @root_type: Immediate parent of the returned type.
4896 * Given a @leaf_type and a @root_type which is contained in its
4897 * anchestry, return the type that @root_type is the immediate parent
4898 * of. In other words, this function determines the type that is
4899 * derived directly from @root_type which is also a base class of
4900 * @leaf_type. Given a root type and a leaf type, this function can
4901 * be used to determine the types and order in which the leaf type is
4902 * descended from the root type.
4904 * Returns: Immediate child of @root_type and anchestor of @leaf_type.
4910 * @type: The derived type.
4912 * Return the direct parent type of the passed in type. If the passed
4913 * in type has no parent, i.e. is a fundamental type, 0 is returned.
4915 * Returns: The parent type.
4920 * g_type_plugin_complete_interface_info:
4921 * @plugin: the #GTypePlugin
4922 * @instance_type: the #GType of an instantiable type to which the interface is added
4923 * @interface_type: the #GType of the interface whose info is completed
4924 * @info: the #GInterfaceInfo to fill in
4926 * Calls the @complete_interface_info function from the
4927 * #GTypePluginClass of @plugin. There should be no need to use this
4928 * function outside of the GObject type system itself.
4933 * g_type_plugin_complete_type_info:
4934 * @plugin: a #GTypePlugin
4935 * @g_type: the #GType whose info is completed
4936 * @info: the #GTypeInfo struct to fill in
4937 * @value_table: the #GTypeValueTable to fill in
4939 * Calls the @complete_type_info function from the #GTypePluginClass of @plugin.
4940 * There should be no need to use this function outside of the GObject
4941 * type system itself.
4946 * g_type_plugin_unuse:
4947 * @plugin: a #GTypePlugin
4949 * Calls the @unuse_plugin function from the #GTypePluginClass of
4950 * @plugin. There should be no need to use this function outside of
4951 * the GObject type system itself.
4956 * g_type_plugin_use:
4957 * @plugin: a #GTypePlugin
4959 * Calls the @use_plugin function from the #GTypePluginClass of
4960 * @plugin. There should be no need to use this function outside of
4961 * the GObject type system itself.
4967 * @type: Type to return quark of type name for.
4969 * Get the corresponding quark of the type IDs name.
4971 * Returns: The type names quark or 0.
4977 * @type: the #GType value of a static, classed type.
4978 * @query: (out caller-allocates): A user provided structure that is filled in with constant values upon success.
4980 * Queries the type system for information about a specific type.
4981 * This function will fill in a user-provided structure to hold
4982 * type-specific information. If an invalid #GType is passed in, the
4983 * @type member of the #GTypeQuery is 0. All members filled into the
4984 * #GTypeQuery structure should be considered constant and have to be
4990 * g_type_register_dynamic:
4991 * @parent_type: Type from which this type will be derived.
4992 * @type_name: 0-terminated string used as the name of the new type.
4993 * @plugin: The #GTypePlugin structure to retrieve the #GTypeInfo from.
4994 * @flags: Bitwise combination of #GTypeFlags values.
4996 * Registers @type_name as the name of a new dynamic type derived from
4997 * @parent_type. The type system uses the information contained in the
4998 * #GTypePlugin structure pointed to by @plugin to manage the type and its
4999 * instances (if not abstract). The value of @flags determines the nature
5000 * (e.g. abstract or not) of the type.
5002 * Returns: The new type identifier or #G_TYPE_INVALID if registration failed.
5007 * g_type_register_fundamental:
5008 * @type_id: A predefined type identifier.
5009 * @type_name: 0-terminated string used as the name of the new type.
5010 * @info: The #GTypeInfo structure for this type.
5011 * @finfo: The #GTypeFundamentalInfo structure for this type.
5012 * @flags: Bitwise combination of #GTypeFlags values.
5014 * Registers @type_id as the predefined identifier and @type_name as the
5015 * name of a fundamental type. If @type_id is already registered, or a type
5016 * named @type_name is already registered, the behaviour is undefined. The type
5017 * system uses the information contained in the #GTypeInfo structure pointed to
5018 * by @info and the #GTypeFundamentalInfo structure pointed to by @finfo to
5019 * manage the type and its instances. The value of @flags determines additional
5020 * characteristics of the fundamental type.
5022 * Returns: The predefined type identifier.
5027 * g_type_register_static:
5028 * @parent_type: Type from which this type will be derived.
5029 * @type_name: 0-terminated string used as the name of the new type.
5030 * @info: The #GTypeInfo structure for this type.
5031 * @flags: Bitwise combination of #GTypeFlags values.
5033 * Registers @type_name as the name of a new static type derived from
5034 * @parent_type. The type system uses the information contained in the
5035 * #GTypeInfo structure pointed to by @info to manage the type and its
5036 * instances (if not abstract). The value of @flags determines the nature
5037 * (e.g. abstract or not) of the type.
5039 * Returns: The new type identifier.
5044 * g_type_register_static_simple: (skip)
5045 * @parent_type: Type from which this type will be derived.
5046 * @type_name: 0-terminated string used as the name of the new type.
5047 * @class_size: Size of the class structure (see #GTypeInfo)
5048 * @class_init: Location of the class initialization function (see #GTypeInfo)
5049 * @instance_size: Size of the instance structure (see #GTypeInfo)
5050 * @instance_init: Location of the instance initialization function (see #GTypeInfo)
5051 * @flags: Bitwise combination of #GTypeFlags values.
5053 * Registers @type_name as the name of a new static type derived from
5054 * @parent_type. The value of @flags determines the nature (e.g.
5055 * abstract or not) of the type. It works by filling a #GTypeInfo
5056 * struct and calling g_type_register_static().
5059 * Returns: The new type identifier.
5064 * g_type_remove_class_cache_func: (skip)
5065 * @cache_data: data that was given when adding @cache_func
5066 * @cache_func: a #GTypeClassCacheFunc
5068 * Removes a previously installed #GTypeClassCacheFunc. The cache
5069 * maintained by @cache_func has to be empty when calling
5070 * g_type_remove_class_cache_func() to avoid leaks.
5075 * g_type_remove_interface_check: (skip)
5076 * @check_data: callback data passed to g_type_add_interface_check()
5077 * @check_func: callback function passed to g_type_add_interface_check()
5079 * Removes an interface check function added with
5080 * g_type_add_interface_check().
5089 * @quark: a #GQuark id to identify the data
5092 * Attaches arbitrary data to a type.
5097 * g_type_value_table_peek: (skip)
5098 * @type: A #GType value.
5100 * Returns the location of the #GTypeValueTable associated with @type.
5101 * <emphasis>Note that this function should only be used from source code
5102 * that implements or has internal knowledge of the implementation of
5105 * Returns: Location of the #GTypeValueTable associated with @type or %NULL if there is no #GTypeValueTable associated with @type.
5110 * g_value_array_append:
5111 * @value_array: #GValueArray to add an element to
5112 * @value: (allow-none): #GValue to copy into #GValueArray, or %NULL
5114 * Insert a copy of @value as last element of @value_array. If @value is
5115 * %NULL, an uninitialized value is appended.
5117 * Returns: (transfer none): the #GValueArray passed in as @value_array
5118 * Deprecated: 2.32: Use #GArray and g_array_append_val() instead.
5123 * g_value_array_copy:
5124 * @value_array: #GValueArray to copy
5126 * Construct an exact copy of a #GValueArray by duplicating all its
5129 * Returns: (transfer full): Newly allocated copy of #GValueArray
5130 * Deprecated: 2.32: Use #GArray and g_array_ref() instead.
5135 * g_value_array_free:
5136 * @value_array: #GValueArray to free
5138 * Free a #GValueArray including its contents.
5140 * Deprecated: 2.32: Use #GArray and g_array_unref() instead.
5145 * g_value_array_get_nth:
5146 * @value_array: #GValueArray to get a value from
5147 * @index_: index of the value of interest
5149 * Return a pointer to the value at @index_ containd in @value_array.
5151 * Returns: (transfer none): pointer to a value at @index_ in @value_array
5152 * Deprecated: 2.32: Use g_array_index() instead.
5157 * g_value_array_insert:
5158 * @value_array: #GValueArray to add an element to
5159 * @index_: insertion position, must be <= value_array->n_values
5160 * @value: (allow-none): #GValue to copy into #GValueArray, or %NULL
5162 * Insert a copy of @value at specified position into @value_array. If @value
5163 * is %NULL, an uninitialized value is inserted.
5165 * Returns: (transfer none): the #GValueArray passed in as @value_array
5166 * Deprecated: 2.32: Use #GArray and g_array_insert_val() instead.
5171 * g_value_array_new:
5172 * @n_prealloced: number of values to preallocate space for
5174 * Allocate and initialize a new #GValueArray, optionally preserve space
5175 * for @n_prealloced elements. New arrays always contain 0 elements,
5176 * regardless of the value of @n_prealloced.
5178 * Returns: a newly allocated #GValueArray with 0 values
5179 * Deprecated: 2.32: Use #GArray and g_array_sized_new() instead.
5184 * g_value_array_prepend:
5185 * @value_array: #GValueArray to add an element to
5186 * @value: (allow-none): #GValue to copy into #GValueArray, or %NULL
5188 * Insert a copy of @value as first element of @value_array. If @value is
5189 * %NULL, an uninitialized value is prepended.
5191 * Returns: (transfer none): the #GValueArray passed in as @value_array
5192 * Deprecated: 2.32: Use #GArray and g_array_prepend_val() instead.
5197 * g_value_array_remove:
5198 * @value_array: #GValueArray to remove an element from
5199 * @index_: position of value to remove, which must be less than <code>value_array-><link linkend="GValueArray.n-values">n_values</link></code>
5201 * Remove the value at position @index_ from @value_array.
5203 * Returns: (transfer none): the #GValueArray passed in as @value_array
5204 * Deprecated: 2.32: Use #GArray and g_array_remove_index() instead.
5209 * g_value_array_sort:
5210 * @value_array: #GValueArray to sort
5211 * @compare_func: (scope call): function to compare elements
5213 * Sort @value_array using @compare_func to compare the elements according to
5214 * the semantics of #GCompareFunc.
5216 * The current implementation uses the same sorting algorithm as standard
5217 * C qsort() function.
5219 * Returns: (transfer none): the #GValueArray passed in as @value_array
5220 * Deprecated: 2.32: Use #GArray and g_array_sort().
5225 * g_value_array_sort_with_data:
5226 * @value_array: #GValueArray to sort
5227 * @compare_func: (scope call): function to compare elements
5228 * @user_data: (closure): extra data argument provided for @compare_func
5230 * Sort @value_array using @compare_func to compare the elements according
5231 * to the semantics of #GCompareDataFunc.
5233 * The current implementation uses the same sorting algorithm as standard
5234 * C qsort() function.
5236 * Rename to: g_value_array_sort
5237 * Returns: (transfer none): the #GValueArray passed in as @value_array
5238 * Deprecated: 2.32: Use #GArray and g_array_sort_with_data().
5244 * @src_value: An initialized #GValue structure.
5245 * @dest_value: An initialized #GValue structure of the same type as @src_value.
5247 * Copies the value of @src_value into @dest_value.
5252 * g_value_dup_boxed: (skip)
5253 * @value: a valid #GValue of %G_TYPE_BOXED derived type
5255 * Get the contents of a %G_TYPE_BOXED derived #GValue. Upon getting,
5256 * the boxed value is duplicated and needs to be later freed with
5257 * g_boxed_free(), e.g. like: g_boxed_free (G_VALUE_TYPE (@value),
5260 * Returns: boxed contents of @value
5265 * g_value_dup_object:
5266 * @value: a valid #GValue whose type is derived from %G_TYPE_OBJECT
5268 * Get the contents of a %G_TYPE_OBJECT derived #GValue, increasing
5269 * its reference count. If the contents of the #GValue are %NULL, then
5270 * %NULL will be returned.
5272 * Returns: (type GObject.Object) (transfer full): object content of @value, should be unreferenced when no longer needed.
5277 * g_value_dup_param: (skip)
5278 * @value: a valid #GValue whose type is derived from %G_TYPE_PARAM
5280 * Get the contents of a %G_TYPE_PARAM #GValue, increasing its
5283 * Returns: #GParamSpec content of @value, should be unreferenced when no longer needed.
5288 * g_value_dup_string:
5289 * @value: a valid #GValue of type %G_TYPE_STRING
5291 * Get a copy the contents of a %G_TYPE_STRING #GValue.
5293 * Returns: a newly allocated copy of the string content of @value
5298 * g_value_dup_variant:
5299 * @value: a valid #GValue of type %G_TYPE_VARIANT
5301 * Get the contents of a variant #GValue, increasing its refcount.
5303 * Returns: variant contents of @value, should be unrefed using g_variant_unref() when no longer needed
5309 * g_value_fits_pointer:
5310 * @value: An initialized #GValue structure.
5312 * Determines if @value will fit inside the size of a pointer value.
5313 * This is an internal function introduced mainly for C marshallers.
5315 * Returns: %TRUE if @value will fit inside a pointer value.
5320 * g_value_get_boolean:
5321 * @value: a valid #GValue of type %G_TYPE_BOOLEAN
5323 * Get the contents of a %G_TYPE_BOOLEAN #GValue.
5325 * Returns: boolean contents of @value
5330 * g_value_get_boxed:
5331 * @value: a valid #GValue of %G_TYPE_BOXED derived type
5333 * Get the contents of a %G_TYPE_BOXED derived #GValue.
5335 * Returns: (transfer none): boxed contents of @value
5341 * @value: a valid #GValue of type %G_TYPE_CHAR
5343 * Do not use this function; it is broken on platforms where the %char
5344 * type is unsigned, such as ARM and PowerPC. See g_value_get_schar().
5346 * Get the contents of a %G_TYPE_CHAR #GValue.
5348 * Returns: character contents of @value
5349 * Deprecated: 2.32: This function's return type is broken, see g_value_get_schar()
5354 * g_value_get_double:
5355 * @value: a valid #GValue of type %G_TYPE_DOUBLE
5357 * Get the contents of a %G_TYPE_DOUBLE #GValue.
5359 * Returns: double contents of @value
5365 * @value: a valid #GValue whose type is derived from %G_TYPE_ENUM
5367 * Get the contents of a %G_TYPE_ENUM #GValue.
5369 * Returns: enum contents of @value
5374 * g_value_get_flags:
5375 * @value: a valid #GValue whose type is derived from %G_TYPE_FLAGS
5377 * Get the contents of a %G_TYPE_FLAGS #GValue.
5379 * Returns: flags contents of @value
5384 * g_value_get_float:
5385 * @value: a valid #GValue of type %G_TYPE_FLOAT
5387 * Get the contents of a %G_TYPE_FLOAT #GValue.
5389 * Returns: float contents of @value
5394 * g_value_get_gtype:
5395 * @value: a valid #GValue of type %G_TYPE_GTYPE
5397 * Get the contents of a %G_TYPE_GTYPE #GValue.
5400 * Returns: the #GType stored in @value
5406 * @value: a valid #GValue of type %G_TYPE_INT
5408 * Get the contents of a %G_TYPE_INT #GValue.
5410 * Returns: integer contents of @value
5415 * g_value_get_int64:
5416 * @value: a valid #GValue of type %G_TYPE_INT64
5418 * Get the contents of a %G_TYPE_INT64 #GValue.
5420 * Returns: 64bit integer contents of @value
5426 * @value: a valid #GValue of type %G_TYPE_LONG
5428 * Get the contents of a %G_TYPE_LONG #GValue.
5430 * Returns: long integer contents of @value
5435 * g_value_get_object:
5436 * @value: a valid #GValue of %G_TYPE_OBJECT derived type
5438 * Get the contents of a %G_TYPE_OBJECT derived #GValue.
5440 * Returns: (type GObject.Object) (transfer none): object contents of @value
5445 * g_value_get_param:
5446 * @value: a valid #GValue whose type is derived from %G_TYPE_PARAM
5448 * Get the contents of a %G_TYPE_PARAM #GValue.
5450 * Returns: (transfer none): #GParamSpec content of @value
5455 * g_value_get_pointer:
5456 * @value: a valid #GValue of %G_TYPE_POINTER
5458 * Get the contents of a pointer #GValue.
5460 * Returns: (transfer none): pointer contents of @value
5465 * g_value_get_schar:
5466 * @value: a valid #GValue of type %G_TYPE_CHAR
5468 * Get the contents of a %G_TYPE_CHAR #GValue.
5470 * Returns: signed 8 bit integer contents of @value
5476 * g_value_get_string:
5477 * @value: a valid #GValue of type %G_TYPE_STRING
5479 * Get the contents of a %G_TYPE_STRING #GValue.
5481 * Returns: string content of @value
5486 * g_value_get_uchar:
5487 * @value: a valid #GValue of type %G_TYPE_UCHAR
5489 * Get the contents of a %G_TYPE_UCHAR #GValue.
5491 * Returns: unsigned character contents of @value
5497 * @value: a valid #GValue of type %G_TYPE_UINT
5499 * Get the contents of a %G_TYPE_UINT #GValue.
5501 * Returns: unsigned integer contents of @value
5506 * g_value_get_uint64:
5507 * @value: a valid #GValue of type %G_TYPE_UINT64
5509 * Get the contents of a %G_TYPE_UINT64 #GValue.
5511 * Returns: unsigned 64bit integer contents of @value
5516 * g_value_get_ulong:
5517 * @value: a valid #GValue of type %G_TYPE_ULONG
5519 * Get the contents of a %G_TYPE_ULONG #GValue.
5521 * Returns: unsigned long integer contents of @value
5526 * g_value_get_variant:
5527 * @value: a valid #GValue of type %G_TYPE_VARIANT
5529 * Get the contents of a variant #GValue.
5531 * Returns: variant contents of @value
5538 * @value: A zero-filled (uninitialized) #GValue structure.
5539 * @g_type: Type the #GValue should hold values of.
5541 * Initializes @value with the default value of @type.
5543 * Returns: (transfer none): the #GValue structure that has been passed in
5548 * g_value_peek_pointer:
5549 * @value: An initialized #GValue structure.
5551 * 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.
5556 * g_value_register_transform_func: (skip)
5557 * @src_type: Source type.
5558 * @dest_type: Target type.
5559 * @transform_func: a function which transforms values of type @src_type into value of type @dest_type
5561 * Registers a value transformation function for use in g_value_transform().
5562 * A previously registered transformation function for @src_type and @dest_type
5569 * @value: An initialized #GValue structure.
5571 * Clears the current value in @value and resets it to the default value
5572 * (as if the value had just been initialized).
5574 * Returns: the #GValue structure that has been passed in
5579 * g_value_set_boolean:
5580 * @value: a valid #GValue of type %G_TYPE_BOOLEAN
5581 * @v_boolean: boolean value to be set
5583 * Set the contents of a %G_TYPE_BOOLEAN #GValue to @v_boolean.
5588 * g_value_set_boxed:
5589 * @value: a valid #GValue of %G_TYPE_BOXED derived type
5590 * @v_boxed: (allow-none): boxed value to be set
5592 * Set the contents of a %G_TYPE_BOXED derived #GValue to @v_boxed.
5597 * g_value_set_boxed_take_ownership:
5598 * @value: a valid #GValue of %G_TYPE_BOXED derived type
5599 * @v_boxed: (allow-none): duplicated unowned boxed value to be set
5601 * This is an internal function introduced mainly for C marshallers.
5603 * Deprecated: 2.4: Use g_value_take_boxed() instead.
5609 * @value: a valid #GValue of type %G_TYPE_CHAR
5610 * @v_char: character value to be set
5612 * Set the contents of a %G_TYPE_CHAR #GValue to @v_char.
5614 * Deprecated: 2.32: This function's input type is broken, see g_value_set_schar()
5619 * g_value_set_double:
5620 * @value: a valid #GValue of type %G_TYPE_DOUBLE
5621 * @v_double: double value to be set
5623 * Set the contents of a %G_TYPE_DOUBLE #GValue to @v_double.
5629 * @value: a valid #GValue whose type is derived from %G_TYPE_ENUM
5630 * @v_enum: enum value to be set
5632 * Set the contents of a %G_TYPE_ENUM #GValue to @v_enum.
5637 * g_value_set_flags:
5638 * @value: a valid #GValue whose type is derived from %G_TYPE_FLAGS
5639 * @v_flags: flags value to be set
5641 * Set the contents of a %G_TYPE_FLAGS #GValue to @v_flags.
5646 * g_value_set_float:
5647 * @value: a valid #GValue of type %G_TYPE_FLOAT
5648 * @v_float: float value to be set
5650 * Set the contents of a %G_TYPE_FLOAT #GValue to @v_float.
5655 * g_value_set_gtype:
5656 * @value: a valid #GValue of type %G_TYPE_GTYPE
5657 * @v_gtype: #GType to be set
5659 * Set the contents of a %G_TYPE_GTYPE #GValue to @v_gtype.
5666 * g_value_set_instance:
5667 * @value: An initialized #GValue structure.
5668 * @instance: (allow-none): the instance
5670 * Sets @value from an instantiatable type via the
5671 * value_table's collect_value() function.
5677 * @value: a valid #GValue of type %G_TYPE_INT
5678 * @v_int: integer value to be set
5680 * Set the contents of a %G_TYPE_INT #GValue to @v_int.
5685 * g_value_set_int64:
5686 * @value: a valid #GValue of type %G_TYPE_INT64
5687 * @v_int64: 64bit integer value to be set
5689 * Set the contents of a %G_TYPE_INT64 #GValue to @v_int64.
5695 * @value: a valid #GValue of type %G_TYPE_LONG
5696 * @v_long: long integer value to be set
5698 * Set the contents of a %G_TYPE_LONG #GValue to @v_long.
5703 * g_value_set_object:
5704 * @value: a valid #GValue of %G_TYPE_OBJECT derived type
5705 * @v_object: (type GObject.Object) (allow-none): object value to be set
5707 * Set the contents of a %G_TYPE_OBJECT derived #GValue to @v_object.
5709 * g_value_set_object() increases the reference count of @v_object
5710 * (the #GValue holds a reference to @v_object). If you do not wish
5711 * to increase the reference count of the object (i.e. you wish to
5712 * pass your current reference to the #GValue because you no longer
5713 * need it), use g_value_take_object() instead.
5715 * It is important that your #GValue holds a reference to @v_object (either its
5716 * own, or one it has taken) to ensure that the object won't be destroyed while
5717 * the #GValue still exists).
5722 * g_value_set_object_take_ownership: (skip)
5723 * @value: a valid #GValue of %G_TYPE_OBJECT derived type
5724 * @v_object: (allow-none): object value to be set
5726 * This is an internal function introduced mainly for C marshallers.
5728 * Deprecated: 2.4: Use g_value_take_object() instead.
5733 * g_value_set_param:
5734 * @value: a valid #GValue of type %G_TYPE_PARAM
5735 * @param: (allow-none): the #GParamSpec to be set
5737 * Set the contents of a %G_TYPE_PARAM #GValue to @param.
5742 * g_value_set_param_take_ownership: (skip)
5743 * @value: a valid #GValue of type %G_TYPE_PARAM
5744 * @param: (allow-none): the #GParamSpec to be set
5746 * This is an internal function introduced mainly for C marshallers.
5748 * Deprecated: 2.4: Use g_value_take_param() instead.
5753 * g_value_set_pointer:
5754 * @value: a valid #GValue of %G_TYPE_POINTER
5755 * @v_pointer: pointer value to be set
5757 * Set the contents of a pointer #GValue to @v_pointer.
5762 * g_value_set_schar:
5763 * @value: a valid #GValue of type %G_TYPE_CHAR
5764 * @v_char: signed 8 bit integer to be set
5766 * Set the contents of a %G_TYPE_CHAR #GValue to @v_char.
5773 * g_value_set_static_boxed:
5774 * @value: a valid #GValue of %G_TYPE_BOXED derived type
5775 * @v_boxed: (allow-none): static boxed value to be set
5777 * Set the contents of a %G_TYPE_BOXED derived #GValue to @v_boxed.
5778 * The boxed value is assumed to be static, and is thus not duplicated
5779 * when setting the #GValue.
5784 * g_value_set_static_string:
5785 * @value: a valid #GValue of type %G_TYPE_STRING
5786 * @v_string: (allow-none): static string to be set
5788 * Set the contents of a %G_TYPE_STRING #GValue to @v_string.
5789 * The string is assumed to be static, and is thus not duplicated
5790 * when setting the #GValue.
5795 * g_value_set_string:
5796 * @value: a valid #GValue of type %G_TYPE_STRING
5797 * @v_string: (allow-none): caller-owned string to be duplicated for the #GValue
5799 * Set the contents of a %G_TYPE_STRING #GValue to @v_string.
5804 * g_value_set_string_take_ownership:
5805 * @value: a valid #GValue of type %G_TYPE_STRING
5806 * @v_string: (allow-none): duplicated unowned string to be set
5808 * This is an internal function introduced mainly for C marshallers.
5810 * Deprecated: 2.4: Use g_value_take_string() instead.
5815 * g_value_set_uchar:
5816 * @value: a valid #GValue of type %G_TYPE_UCHAR
5817 * @v_uchar: unsigned character value to be set
5819 * Set the contents of a %G_TYPE_UCHAR #GValue to @v_uchar.
5825 * @value: a valid #GValue of type %G_TYPE_UINT
5826 * @v_uint: unsigned integer value to be set
5828 * Set the contents of a %G_TYPE_UINT #GValue to @v_uint.
5833 * g_value_set_uint64:
5834 * @value: a valid #GValue of type %G_TYPE_UINT64
5835 * @v_uint64: unsigned 64bit integer value to be set
5837 * Set the contents of a %G_TYPE_UINT64 #GValue to @v_uint64.
5842 * g_value_set_ulong:
5843 * @value: a valid #GValue of type %G_TYPE_ULONG
5844 * @v_ulong: unsigned long integer value to be set
5846 * Set the contents of a %G_TYPE_ULONG #GValue to @v_ulong.
5851 * g_value_set_variant:
5852 * @value: a valid #GValue of type %G_TYPE_VARIANT
5853 * @variant: (allow-none): a #GVariant, or %NULL
5855 * Set the contents of a variant #GValue to @variant.
5856 * If the variant is floating, it is consumed.
5863 * g_value_take_boxed:
5864 * @value: a valid #GValue of %G_TYPE_BOXED derived type
5865 * @v_boxed: (allow-none): duplicated unowned boxed value to be set
5867 * Sets the contents of a %G_TYPE_BOXED derived #GValue to @v_boxed
5868 * and takes over the ownership of the callers reference to @v_boxed;
5869 * the caller doesn't have to unref it any more.
5876 * g_value_take_object: (skip)
5877 * @value: a valid #GValue of %G_TYPE_OBJECT derived type
5878 * @v_object: (allow-none): object value to be set
5880 * Sets the contents of a %G_TYPE_OBJECT derived #GValue to @v_object
5881 * and takes over the ownership of the callers reference to @v_object;
5882 * the caller doesn't have to unref it any more (i.e. the reference
5883 * count of the object is not increased).
5885 * If you want the #GValue to hold its own reference to @v_object, use
5886 * g_value_set_object() instead.
5893 * g_value_take_param: (skip)
5894 * @value: a valid #GValue of type %G_TYPE_PARAM
5895 * @param: (allow-none): the #GParamSpec to be set
5897 * Sets the contents of a %G_TYPE_PARAM #GValue to @param and takes
5898 * over the ownership of the callers reference to @param; the caller
5899 * doesn't have to unref it any more.
5906 * g_value_take_string:
5907 * @value: a valid #GValue of type %G_TYPE_STRING
5908 * @v_string: (allow-none): string to take ownership of
5910 * Sets the contents of a %G_TYPE_STRING #GValue to @v_string.
5917 * g_value_take_variant:
5918 * @value: a valid #GValue of type %G_TYPE_VARIANT
5919 * @variant: (allow-none): a #GVariant, or %NULL
5921 * Set the contents of a variant #GValue to @variant, and takes over
5922 * the ownership of the caller's reference to @variant;
5923 * the caller doesn't have to unref it any more (i.e. the reference
5924 * count of the variant is not increased).
5926 * If @variant was floating then its floating reference is converted to
5929 * If you want the #GValue to hold its own reference to @variant, use
5930 * g_value_set_variant() instead.
5932 * This is an internal function introduced mainly for C marshallers.
5939 * g_value_transform:
5940 * @src_value: Source value.
5941 * @dest_value: Target value.
5943 * Tries to cast the contents of @src_value into a type appropriate
5944 * to store in @dest_value, e.g. to transform a %G_TYPE_INT value
5945 * into a %G_TYPE_FLOAT value. Performing transformations between
5946 * value types might incur precision lossage. Especially
5947 * transformations into strings might reveal seemingly arbitrary
5948 * results and shouldn't be relied upon for production code (such
5949 * as rcfile value or object property serialization).
5951 * Returns: Whether a transformation rule was found and could be applied. Upon failing transformations, @dest_value is left untouched.
5956 * g_value_type_compatible:
5957 * @src_type: source type to be copied.
5958 * @dest_type: destination type for copying.
5960 * Returns whether a #GValue of type @src_type can be copied into
5961 * a #GValue of type @dest_type.
5963 * Returns: %TRUE if g_value_copy() is possible with @src_type and @dest_type.
5968 * g_value_type_transformable:
5969 * @src_type: Source type.
5970 * @dest_type: Target type.
5972 * Check whether g_value_transform() is able to transform values
5973 * of type @src_type into values of type @dest_type.
5975 * Returns: %TRUE if the transformation is possible, %FALSE otherwise.
5981 * @value: An initialized #GValue structure.
5983 * Clears the current value in @value and "unsets" the type,
5984 * this releases all resources associated with this GValue.
5985 * An unset value is the same as an uninitialized (zero-filled)
5986 * #GValue structure.
5991 * g_variant_get_gtype:
5999 * g_weak_ref_clear: (skip)
6000 * @weak_ref: (inout): location of a weak reference, which may be empty
6002 * Frees resources associated with a non-statically-allocated #GWeakRef.
6003 * After this call, the #GWeakRef is left in an undefined state.
6005 * You should only call this on a #GWeakRef that previously had
6006 * g_weak_ref_init() called on it.
6013 * g_weak_ref_get: (skip)
6014 * @weak_ref: (inout): location of a weak reference to a #GObject
6016 * If @weak_ref is not empty, atomically acquire a strong
6017 * reference to the object it points to, and return that reference.
6019 * This function is needed because of the potential race between taking
6020 * the pointer value and g_object_ref() on it, if the object was losing
6021 * its last reference at the same time in a different thread.
6023 * The caller should release the resulting reference in the usual way,
6024 * by using g_object_unref().
6026 * Returns: (transfer full) (type GObject.Object): the object pointed to by @weak_ref, or %NULL if it was empty
6032 * g_weak_ref_init: (skip)
6033 * @weak_ref: (inout): uninitialized or empty location for a weak reference
6034 * @object: (allow-none): a #GObject or %NULL
6036 * Initialise a non-statically-allocated #GWeakRef.
6038 * This function also calls g_weak_ref_set() with @object on the
6039 * freshly-initialised weak reference.
6041 * This function should always be matched with a call to
6042 * g_weak_ref_clear(). It is not necessary to use this function for a
6043 * #GWeakRef in static storage because it will already be
6044 * properly initialised. Just use g_weak_ref_set() directly.
6051 * g_weak_ref_set: (skip)
6052 * @weak_ref: location for a weak reference
6053 * @object: (allow-none): a #GObject or %NULL
6055 * Change the object to which @weak_ref points, or set it to
6058 * You must own a strong reference on @object while calling this
6066 /************************************************************/
6067 /* THIS FILE IS GENERATED DO NOT EDIT */
6068 /************************************************************/