Imported Upstream version 1.49.1
[platform/upstream/gobject-introspection.git] / gir / gobject-2.0.c
1 /************************************************************/
2 /* THIS FILE IS GENERATED DO NOT EDIT */
3 /************************************************************/
4
5 /**
6  * GBinding:flags:
7  *
8  * Flags to be used to control the #GBinding
9  *
10  * Since: 2.26
11  */
12
13
14 /**
15  * GBinding:source:
16  *
17  * The #GObject that should be used as the source of the binding
18  *
19  * Since: 2.26
20  */
21
22
23 /**
24  * GBinding:source-property:
25  *
26  * The name of the property of #GBinding:source that should be used
27  * as the source of the binding
28  *
29  * Since: 2.26
30  */
31
32
33 /**
34  * GBinding:target:
35  *
36  * The #GObject that should be used as the target of the binding
37  *
38  * Since: 2.26
39  */
40
41
42 /**
43  * GBinding:target-property:
44  *
45  * The name of the property of #GBinding:target that should be used
46  * as the target of the binding
47  *
48  * Since: 2.26
49  */
50
51
52 /**
53  * GObject::notify:
54  * @gobject: the object which received the signal.
55  * @pspec: the #GParamSpec of the property which changed.
56  *
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.
62  *
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:
66  * |[<!-- language="C" -->
67  * g_signal_connect (text_view->buffer, "notify::paste-target-list",
68  *                   G_CALLBACK (gtk_text_view_target_list_notify),
69  *                   text_view)
70  * ]|
71  * It is important to note that you must use
72  * [canonical][canonical-parameter-name] parameter names as
73  * detail strings for the notify signal.
74  */
75
76
77 /**
78  * GParamSpecPool:
79  *
80  * A #GParamSpecPool maintains a collection of #GParamSpecs 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
83  * types.
84  */
85
86
87 /**
88  * GWeakRef:
89  *
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).
95  *
96  * Like #GValue, #GWeakRef can be statically allocated, stack- or
97  * heap-allocated, or embedded in larger structures.
98  *
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
102  * objects.
103  *
104  * If the object's #GObjectClass.dispose method results in additional
105  * references to the object being held, any #GWeakRefs taken
106  * before it was disposed will continue to point to %NULL.  If
107  * #GWeakRefs 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.
110  */
111
112
113 /**
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(),
118  * g_param_spec_flags()
119  *
120  * The GLib type system provides fundamental types for enumeration and
121  * flags types. (Flags types are like enumerations, but allow their
122  * values to be combined by bitwise or). A registered enumeration or
123  * flags type associates a name and a nickname with each allowed
124  * value, and the methods g_enum_get_value_by_name(),
125  * g_enum_get_value_by_nick(), g_flags_get_value_by_name() and
126  * g_flags_get_value_by_nick() can look up values by their name or
127  * nickname.  When an enumeration or flags type is registered with the
128  * GLib type system, it can be used as value type for object
129  * properties, using g_param_spec_enum() or g_param_spec_flags().
130  *
131  * GObject ships with a utility called [glib-mkenums][glib-mkenums],
132  * that can construct suitable type registration functions from C enumeration
133  * definitions.
134  *
135  * Example of how to get a string representation of an enum value:
136  * |[<!-- language="C" -->
137  * GEnumClass *enum_class;
138  * GEnumValue *enum_value;
139  *
140  * enum_class = g_type_class_ref (MAMAN_TYPE_MY_ENUM);
141  * enum_value = g_enum_get_value (enum_class, MAMAN_MY_ENUM_FOO);
142  *
143  * g_print ("Name: %s\n", enum_value->value_name);
144  *
145  * g_type_class_unref (enum_class);
146  * ]|
147  */
148
149
150 /**
151  * SECTION:gbinding
152  * @Title: GBinding
153  * @Short_Description: Bind two object properties
154  *
155  * #GBinding is the representation of a binding between a property on a
156  * #GObject instance (or source) and another property on another #GObject
157  * instance (or target). Whenever the source property changes, the same
158  * value is applied to the target property; for instance, the following
159  * binding:
160  *
161  * |[<!-- language="C" -->
162  *   g_object_bind_property (object1, "property-a",
163  *                           object2, "property-b",
164  *                           G_BINDING_DEFAULT);
165  * ]|
166  *
167  * will cause the property named "property-b" of @object2 to be updated
168  * every time g_object_set() or the specific accessor changes the value of
169  * the property "property-a" of @object1.
170  *
171  * It is possible to create a bidirectional binding between two properties
172  * of two #GObject instances, so that if either property changes, the
173  * other is updated as well, for instance:
174  *
175  * |[<!-- language="C" -->
176  *   g_object_bind_property (object1, "property-a",
177  *                           object2, "property-b",
178  *                           G_BINDING_BIDIRECTIONAL);
179  * ]|
180  *
181  * will keep the two properties in sync.
182  *
183  * It is also possible to set a custom transformation function (in both
184  * directions, in case of a bidirectional binding) to apply a custom
185  * transformation from the source value to the target value before
186  * applying it; for instance, the following binding:
187  *
188  * |[<!-- language="C" -->
189  *   g_object_bind_property_full (adjustment1, "value",
190  *                                adjustment2, "value",
191  *                                G_BINDING_BIDIRECTIONAL,
192  *                                celsius_to_fahrenheit,
193  *                                fahrenheit_to_celsius,
194  *                                NULL, NULL);
195  * ]|
196  *
197  * will keep the "value" property of the two adjustments in sync; the
198  * @celsius_to_fahrenheit function will be called whenever the "value"
199  * property of @adjustment1 changes and will transform the current value
200  * of the property before applying it to the "value" property of @adjustment2.
201  *
202  * Vice versa, the @fahrenheit_to_celsius function will be called whenever
203  * the "value" property of @adjustment2 changes, and will transform the
204  * current value of the property before applying it to the "value" property
205  * of @adjustment1.
206  *
207  * Note that #GBinding does not resolve cycles by itself; a cycle like
208  *
209  * |[
210  *   object1:propertyA -> object2:propertyB
211  *   object2:propertyB -> object3:propertyC
212  *   object3:propertyC -> object1:propertyA
213  * ]|
214  *
215  * might lead to an infinite loop. The loop, in this particular case,
216  * can be avoided if the objects emit the #GObject::notify signal only
217  * if the value has effectively been changed. A binding is implemented
218  * using the #GObject::notify signal, so it is susceptible to all the
219  * various ways of blocking a signal emission, like g_signal_stop_emission()
220  * or g_signal_handler_block().
221  *
222  * A binding will be severed, and the resources it allocates freed, whenever
223  * either one of the #GObject instances it refers to are finalized, or when
224  * the #GBinding instance loses its last reference.
225  *
226  * Bindings for languages with garbage collection can use
227  * g_binding_unbind() to explicitly release a binding between the source
228  * and target properties, instead of relying on the last reference on the
229  * binding, source, and target instances to drop.
230  *
231  * #GBinding is available since GObject 2.26
232  */
233
234
235 /**
236  * SECTION:gboxed
237  * @short_description: A mechanism to wrap opaque C structures registered
238  *     by the type system
239  * @see_also: #GParamSpecBoxed, g_param_spec_boxed()
240  * @title: Boxed Types
241  *
242  * GBoxed is a generic wrapper mechanism for arbitrary C structures. The only
243  * thing the type system needs to know about the structures is how to copy and
244  * free them, beyond that they are treated as opaque chunks of memory.
245  *
246  * Boxed types are useful for simple value-holder structures like rectangles or
247  * points. They can also be used for wrapping structures defined in non-GObject
248  * based libraries.
249  */
250
251
252 /**
253  * SECTION:gclosure
254  * @short_description: Functions as first-class objects
255  * @title: Closures
256  *
257  * A #GClosure represents a callback supplied by the programmer. It
258  * will generally comprise a function of some kind and a marshaller
259  * used to call it. It is the responsibility of the marshaller to
260  * convert the arguments for the invocation from #GValues into
261  * a suitable form, perform the callback on the converted arguments,
262  * and transform the return value back into a #GValue.
263  *
264  * In the case of C programs, a closure usually just holds a pointer
265  * to a function and maybe a data argument, and the marshaller
266  * converts between #GValue and native C types. The GObject
267  * library provides the #GCClosure type for this purpose. Bindings for
268  * other languages need marshallers which convert between #GValue<!--
269  * -->s and suitable representations in the runtime of the language in
270  * order to use functions written in that languages as callbacks.
271  *
272  * Within GObject, closures play an important role in the
273  * implementation of signals. When a signal is registered, the
274  * @c_marshaller argument to g_signal_new() specifies the default C
275  * marshaller for any closure which is connected to this
276  * signal. GObject provides a number of C marshallers for this
277  * purpose, see the g_cclosure_marshal_*() functions. Additional C
278  * marshallers can be generated with the [glib-genmarshal][glib-genmarshal]
279  * utility.  Closures can be explicitly connected to signals with
280  * g_signal_connect_closure(), but it usually more convenient to let
281  * GObject create a closure automatically by using one of the
282  * g_signal_connect_*() functions which take a callback function/user
283  * data pair.
284  *
285  * Using closures has a number of important advantages over a simple
286  * callback function/data pointer combination:
287  *
288  * - Closures allow the callee to get the types of the callback parameters,
289  *   which means that language bindings don't have to write individual glue
290  *   for each callback type.
291  *
292  * - The reference counting of #GClosure makes it easy to handle reentrancy
293  *   right; if a callback is removed while it is being invoked, the closure
294  *   and its parameters won't be freed until the invocation finishes.
295  *
296  * - g_closure_invalidate() and invalidation notifiers allow callbacks to be
297  *   automatically removed when the objects they point to go away.
298  */
299
300
301 /**
302  * SECTION:generic_values
303  * @short_description: A polymorphic type that can hold values of any
304  *     other type
305  * @see_also: The fundamental types which all support #GValue
306  *     operations and thus can be used as a type initializer for
307  *     g_value_init() are defined by a separate interface.  See the
308  *     [standard values API][gobject-Standard-Parameter-and-Value-Types]
309  *     for details
310  * @title: Generic values
311  *
312  * The #GValue structure is basically a variable container that consists
313  * of a type identifier and a specific value of that type.
314  * The type identifier within a #GValue structure always determines the
315  * type of the associated value.
316  * To create a undefined #GValue structure, simply create a zero-filled
317  * #GValue structure. To initialize the #GValue, use the g_value_init()
318  * function. A #GValue cannot be used until it is initialized.
319  * The basic type operations (such as freeing and copying) are determined
320  * by the #GTypeValueTable associated with the type ID stored in the #GValue.
321  * Other #GValue operations (such as converting values between types) are
322  * provided by this interface.
323  *
324  * The code in the example program below demonstrates #GValue's
325  * features.
326  *
327  * |[<!-- language="C" -->
328  * #include <glib-object.h>
329  *
330  * static void
331  * int2string (const GValue *src_value,
332  *             GValue       *dest_value)
333  * {
334  *   if (g_value_get_int (src_value) == 42)
335  *     g_value_set_static_string (dest_value, "An important number");
336  *   else
337  *     g_value_set_static_string (dest_value, "What's that?");
338  * }
339  *
340  * int
341  * main (int   argc,
342  *       char *argv[])
343  * {
344  *   // GValues must be initialized
345  *   GValue a = G_VALUE_INIT;
346  *   GValue b = G_VALUE_INIT;
347  *   const gchar *message;
348  *
349  *   // The GValue starts empty
350  *   g_assert (!G_VALUE_HOLDS_STRING (&a));
351  *
352  *   // Put a string in it
353  *   g_value_init (&a, G_TYPE_STRING);
354  *   g_assert (G_VALUE_HOLDS_STRING (&a));
355  *   g_value_set_static_string (&a, "Hello, world!");
356  *   g_printf ("%s\n", g_value_get_string (&a));
357  *
358  *   // Reset it to its pristine state
359  *   g_value_unset (&a);
360  *
361  *   // It can then be reused for another type
362  *   g_value_init (&a, G_TYPE_INT);
363  *   g_value_set_int (&a, 42);
364  *
365  *   // Attempt to transform it into a GValue of type STRING
366  *   g_value_init (&b, G_TYPE_STRING);
367  *
368  *   // An INT is transformable to a STRING
369  *   g_assert (g_value_type_transformable (G_TYPE_INT, G_TYPE_STRING));
370  *
371  *   g_value_transform (&a, &b);
372  *   g_printf ("%s\n", g_value_get_string (&b));
373  *
374  *   // Attempt to transform it again using a custom transform function
375  *   g_value_register_transform_func (G_TYPE_INT, G_TYPE_STRING, int2string);
376  *   g_value_transform (&a, &b);
377  *   g_printf ("%s\n", g_value_get_string (&b));
378  *   return 0;
379  * }
380  * ]|
381  */
382
383
384 /**
385  * SECTION:gparamspec
386  * @short_description: Metadata for parameter specifications
387  * @see_also: g_object_class_install_property(), g_object_set(),
388  *     g_object_get(), g_object_set_property(), g_object_get_property(),
389  *     g_value_register_transform_func()
390  * @title: GParamSpec
391  *
392  * #GParamSpec is an object structure that encapsulates the metadata
393  * required to specify parameters, such as e.g. #GObject properties.
394  *
395  * ## Parameter names # {#canonical-parameter-names}
396  *
397  * Parameter names need to start with a letter (a-z or A-Z).
398  * Subsequent characters can be letters, numbers or a '-'.
399  * All other characters are replaced by a '-' during construction.
400  * The result of this replacement is called the canonical name of
401  * the parameter.
402  */
403
404
405 /**
406  * SECTION:gtype
407  * @short_description: The GLib Runtime type identification and
408  *     management system
409  * @title: Type Information
410  *
411  * The GType API is the foundation of the GObject system.  It provides the
412  * facilities for registering and managing all fundamental data types,
413  * user-defined object and interface types.
414  *
415  * For type creation and registration purposes, all types fall into one of
416  * two categories: static or dynamic.  Static types are never loaded or
417  * unloaded at run-time as dynamic types may be.  Static types are created
418  * with g_type_register_static() that gets type specific information passed
419  * in via a #GTypeInfo structure.
420  *
421  * Dynamic types are created with g_type_register_dynamic() which takes a
422  * #GTypePlugin structure instead. The remaining type information (the
423  * #GTypeInfo structure) is retrieved during runtime through #GTypePlugin
424  * and the g_type_plugin_*() API.
425  *
426  * These registration functions are usually called only once from a
427  * function whose only purpose is to return the type identifier for a
428  * specific class.  Once the type (or class or interface) is registered,
429  * it may be instantiated, inherited, or implemented depending on exactly
430  * what sort of type it is.
431  *
432  * There is also a third registration function for registering fundamental
433  * types called g_type_register_fundamental() which requires both a #GTypeInfo
434  * structure and a #GTypeFundamentalInfo structure but it is seldom used
435  * since most fundamental types are predefined rather than user-defined.
436  *
437  * Type instance and class structs are limited to a total of 64 KiB,
438  * including all parent types. Similarly, type instances' private data
439  * (as created by g_type_class_add_private()) are limited to a total of
440  * 64 KiB. If a type instance needs a large static buffer, allocate it
441  * separately (typically by using #GArray or #GPtrArray) and put a pointer
442  * to the buffer in the structure.
443  *
444  * As mentioned in the [GType conventions][gtype-conventions], type names must
445  * be at least three characters long. There is no upper length limit. The first
446  * character must be a letter (a–z or A–Z) or an underscore (‘_’). Subsequent
447  * characters can be letters, numbers or any of â€˜-_+’.
448  */
449
450
451 /**
452  * SECTION:gtypemodule
453  * @short_description: Type loading modules
454  * @see_also: #GTypePlugin, #GModule
455  * @title: GTypeModule
456  *
457  * #GTypeModule provides a simple implementation of the #GTypePlugin
458  * interface. The model of #GTypeModule is a dynamically loaded module
459  * which implements some number of types and interface implementations.
460  * When the module is loaded, it registers its types and interfaces
461  * using g_type_module_register_type() and g_type_module_add_interface().
462  * As long as any instances of these types and interface implementations
463  * are in use, the module is kept loaded. When the types and interfaces
464  * are gone, the module may be unloaded. If the types and interfaces
465  * become used again, the module will be reloaded. Note that the last
466  * unref cannot happen in module code, since that would lead to the
467  * caller's code being unloaded before g_object_unref() returns to it.
468  *
469  * Keeping track of whether the module should be loaded or not is done by
470  * using a use count - it starts at zero, and whenever it is greater than
471  * zero, the module is loaded. The use count is maintained internally by
472  * the type system, but also can be explicitly controlled by
473  * g_type_module_use() and g_type_module_unuse(). Typically, when loading
474  * a module for the first type, g_type_module_use() will be used to load
475  * it so that it can initialize its types. At some later point, when the
476  * module no longer needs to be loaded except for the type
477  * implementations it contains, g_type_module_unuse() is called.
478  *
479  * #GTypeModule does not actually provide any implementation of module
480  * loading and unloading. To create a particular module type you must
481  * derive from #GTypeModule and implement the load and unload functions
482  * in #GTypeModuleClass.
483  */
484
485
486 /**
487  * SECTION:gtypeplugin
488  * @short_description: An interface for dynamically loadable types
489  * @see_also: #GTypeModule and g_type_register_dynamic().
490  * @title: GTypePlugin
491  *
492  * The GObject type system supports dynamic loading of types.
493  * The #GTypePlugin interface is used to handle the lifecycle
494  * of dynamically loaded types. It goes as follows:
495  *
496  * 1. The type is initially introduced (usually upon loading the module
497  *    the first time, or by your main application that knows what modules
498  *    introduces what types), like this:
499  *    |[<!-- language="C" -->
500  *    new_type_id = g_type_register_dynamic (parent_type_id,
501  *                                           "TypeName",
502  *                                           new_type_plugin,
503  *                                           type_flags);
504  *    ]|
505  *    where @new_type_plugin is an implementation of the
506  *    #GTypePlugin interface.
507  *
508  * 2. The type's implementation is referenced, e.g. through
509  *    g_type_class_ref() or through g_type_create_instance() (this is
510  *    being called by g_object_new()) or through one of the above done on
511  *    a type derived from @new_type_id.
512  *
513  * 3. This causes the type system to load the type's implementation by
514  *    calling g_type_plugin_use() and g_type_plugin_complete_type_info()
515  *    on @new_type_plugin.
516  *
517  * 4. At some point the type's implementation isn't required anymore,
518  *    e.g. after g_type_class_unref() or g_type_free_instance() (called
519  *    when the reference count of an instance drops to zero).
520  *
521  * 5. This causes the type system to throw away the information retrieved
522  *    from g_type_plugin_complete_type_info() and then it calls
523  *    g_type_plugin_unuse() on @new_type_plugin.
524  *
525  * 6. Things may repeat from the second step.
526  *
527  * So basically, you need to implement a #GTypePlugin type that
528  * carries a use_count, once use_count goes from zero to one, you need
529  * to load the implementation to successfully handle the upcoming
530  * g_type_plugin_complete_type_info() call. Later, maybe after
531  * succeeding use/unuse calls, once use_count drops to zero, you can
532  * unload the implementation again. The type system makes sure to call
533  * g_type_plugin_use() and g_type_plugin_complete_type_info() again
534  * when the type is needed again.
535  *
536  * #GTypeModule is an implementation of #GTypePlugin that already
537  * implements most of this except for the actual module loading and
538  * unloading. It even handles multiple registered types per module.
539  */
540
541
542 /**
543  * SECTION:objects
544  * @title: GObject
545  * @short_description: The base object type
546  * @see_also: #GParamSpecObject, g_param_spec_object()
547  *
548  * GObject is the fundamental type providing the common attributes and
549  * methods for all object types in GTK+, Pango and other libraries
550  * based on GObject.  The GObject class provides methods for object
551  * construction and destruction, property access methods, and signal
552  * support.  Signals are described in detail [here][gobject-Signals].
553  *
554  * For a tutorial on implementing a new GObject class, see [How to define and
555  * implement a new GObject][howto-gobject]. For a list of naming conventions for
556  * GObjects and their methods, see the [GType conventions][gtype-conventions].
557  * For the high-level concepts behind GObject, read [Instantiable classed types:
558  * Objects][gtype-instantiable-classed].
559  *
560  * ## Floating references # {#floating-ref}
561  *
562  * GInitiallyUnowned is derived from GObject. The only difference between
563  * the two is that the initial reference of a GInitiallyUnowned is flagged
564  * as a "floating" reference. This means that it is not specifically
565  * claimed to be "owned" by any code portion. The main motivation for
566  * providing floating references is C convenience. In particular, it
567  * allows code to be written as:
568  * |[<!-- language="C" -->
569  * container = create_container ();
570  * container_add_child (container, create_child());
571  * ]|
572  * If container_add_child() calls g_object_ref_sink() on the passed-in child,
573  * no reference of the newly created child is leaked. Without floating
574  * references, container_add_child() can only g_object_ref() the new child,
575  * so to implement this code without reference leaks, it would have to be
576  * written as:
577  * |[<!-- language="C" -->
578  * Child *child;
579  * container = create_container ();
580  * child = create_child ();
581  * container_add_child (container, child);
582  * g_object_unref (child);
583  * ]|
584  * The floating reference can be converted into an ordinary reference by
585  * calling g_object_ref_sink(). For already sunken objects (objects that
586  * don't have a floating reference anymore), g_object_ref_sink() is equivalent
587  * to g_object_ref() and returns a new reference.
588  *
589  * Since floating references are useful almost exclusively for C convenience,
590  * language bindings that provide automated reference and memory ownership
591  * maintenance (such as smart pointers or garbage collection) should not
592  * expose floating references in their API.
593  *
594  * Some object implementations may need to save an objects floating state
595  * across certain code portions (an example is #GtkMenu), to achieve this,
596  * the following sequence can be used:
597  *
598  * |[<!-- language="C" -->
599  * // save floating state
600  * gboolean was_floating = g_object_is_floating (object);
601  * g_object_ref_sink (object);
602  * // protected code portion
603  *
604  * ...
605  *
606  * // restore floating state
607  * if (was_floating)
608  *   g_object_force_floating (object);
609  * else
610  *   g_object_unref (object); // release previously acquired reference
611  * ]|
612  */
613
614
615 /**
616  * SECTION:param_value_types
617  * @short_description: Standard Parameter and Value Types
618  * @see_also: #GParamSpec, #GValue, g_object_class_install_property().
619  * @title: Parameters and Values
620  *
621  * #GValue provides an abstract container structure which can be
622  * copied, transformed and compared while holding a value of any
623  * (derived) type, which is registered as a #GType with a
624  * #GTypeValueTable in its #GTypeInfo structure.  Parameter
625  * specifications for most value types can be created as #GParamSpec
626  * derived instances, to implement e.g. #GObject properties which
627  * operate on #GValue containers.
628  *
629  * Parameter names need to start with a letter (a-z or A-Z). Subsequent
630  * characters can be letters, numbers or a '-'.
631  * All other characters are replaced by a '-' during construction.
632  */
633
634
635 /**
636  * SECTION:signals
637  * @short_description: A means for customization of object behaviour
638  *     and a general purpose notification mechanism
639  * @title: Signals
640  *
641  * The basic concept of the signal system is that of the emission
642  * of a signal. Signals are introduced per-type and are identified
643  * through strings. Signals introduced for a parent type are available
644  * in derived types as well, so basically they are a per-type facility
645  * that is inherited.
646  *
647  * A signal emission mainly involves invocation of a certain set of
648  * callbacks in precisely defined manner. There are two main categories
649  * of such callbacks, per-object ones and user provided ones.
650  * (Although signals can deal with any kind of instantiatable type, I'm
651  * referring to those types as "object types" in the following, simply
652  * because that is the context most users will encounter signals in.)
653  * The per-object callbacks are most often referred to as "object method
654  * handler" or "default (signal) handler", while user provided callbacks are
655  * usually just called "signal handler".
656  *
657  * The object method handler is provided at signal creation time (this most
658  * frequently happens at the end of an object class' creation), while user
659  * provided handlers are frequently connected and disconnected to/from a
660  * certain signal on certain object instances.
661  *
662  * A signal emission consists of five stages, unless prematurely stopped:
663  *
664  * 1. Invocation of the object method handler for %G_SIGNAL_RUN_FIRST signals
665  *
666  * 2. Invocation of normal user-provided signal handlers (where the @after
667  *    flag is not set)
668  *
669  * 3. Invocation of the object method handler for %G_SIGNAL_RUN_LAST signals
670  *
671  * 4. Invocation of user provided signal handlers (where the @after flag is set)
672  *
673  * 5. Invocation of the object method handler for %G_SIGNAL_RUN_CLEANUP signals
674  *  
675  * The user-provided signal handlers are called in the order they were
676  * connected in.
677  *
678  * All handlers may prematurely stop a signal emission, and any number of
679  * handlers may be connected, disconnected, blocked or unblocked during
680  * a signal emission.
681  *
682  * There are certain criteria for skipping user handlers in stages 2 and 4
683  * of a signal emission.
684  *
685  * First, user handlers may be blocked. Blocked handlers are omitted during
686  * callback invocation, to return from the blocked state, a handler has to
687  * get unblocked exactly the same amount of times it has been blocked before.
688  *
689  * Second, upon emission of a %G_SIGNAL_DETAILED signal, an additional
690  * @detail argument passed in to g_signal_emit() has to match the detail
691  * argument of the signal handler currently subject to invocation.
692  * Specification of no detail argument for signal handlers (omission of the
693  * detail part of the signal specification upon connection) serves as a
694  * wildcard and matches any detail argument passed in to emission.
695  *
696  * ## Memory management of signal handlers # {#signal-memory-management}
697  *
698  * If you are connecting handlers to signals and using a #GObject instance as
699  * your signal handler user data, you should remember to pair calls to
700  * g_signal_connect() with calls to g_signal_handler_disconnect() or
701  * g_signal_handlers_disconnect_by_func(). While signal handlers are
702  * automatically disconnected when the object emitting the signal is finalised,
703  * they are not automatically disconnected when the signal handler user data is
704  * destroyed. If this user data is a #GObject instance, using it from a
705  * signal handler after it has been finalised is an error.
706  *
707  * There are two strategies for managing such user data. The first is to
708  * disconnect the signal handler (using g_signal_handler_disconnect() or
709  * g_signal_handlers_disconnect_by_func()) when the user data (object) is
710  * finalised; this has to be implemented manually. For non-threaded programs,
711  * g_signal_connect_object() can be used to implement this automatically.
712  * Currently, however, it is unsafe to use in threaded programs.
713  *
714  * The second is to hold a strong reference on the user data until after the
715  * signal is disconnected for other reasons. This can be implemented
716  * automatically using g_signal_connect_data().
717  *
718  * The first approach is recommended, as the second approach can result in
719  * effective memory leaks of the user data if the signal handler is never
720  * disconnected for some reason.
721  */
722
723
724 /**
725  * SECTION:value_arrays
726  * @short_description: A container structure to maintain an array of
727  *     generic values
728  * @see_also: #GValue, #GParamSpecValueArray, g_param_spec_value_array()
729  * @title: Value arrays
730  *
731  * The prime purpose of a #GValueArray is for it to be used as an
732  * object property that holds an array of values. A #GValueArray wraps
733  * an array of #GValue elements in order for it to be used as a boxed
734  * type through %G_TYPE_VALUE_ARRAY.
735  *
736  * #GValueArray is deprecated in favour of #GArray since GLib 2.32. It
737  * is possible to create a #GArray that behaves like a #GValueArray by
738  * using the size of #GValue as the element size, and by setting
739  * g_value_unset() as the clear function using g_array_set_clear_func(),
740  * for instance, the following code:
741  *
742  * |[<!-- language="C" -->
743  *   GValueArray *array = g_value_array_new (10);
744  * ]|
745  *
746  * can be replaced by:
747  *
748  * |[<!-- language="C" -->
749  *   GArray *array = g_array_sized_new (FALSE, TRUE, sizeof (GValue), 10);
750  *   g_array_set_clear_func (array, (GDestroyNotify) g_value_unset);
751  * ]|
752  */
753
754
755 /**
756  * g_binding_get_flags:
757  * @binding: a #GBinding
758  *
759  * Retrieves the flags passed when constructing the #GBinding.
760  *
761  * Returns: the #GBindingFlags used by the #GBinding
762  * Since: 2.26
763  */
764
765
766 /**
767  * g_binding_get_source:
768  * @binding: a #GBinding
769  *
770  * Retrieves the #GObject instance used as the source of the binding.
771  *
772  * Returns: (transfer none): the source #GObject
773  * Since: 2.26
774  */
775
776
777 /**
778  * g_binding_get_source_property:
779  * @binding: a #GBinding
780  *
781  * Retrieves the name of the property of #GBinding:source used as the source
782  * of the binding.
783  *
784  * Returns: the name of the source property
785  * Since: 2.26
786  */
787
788
789 /**
790  * g_binding_get_target:
791  * @binding: a #GBinding
792  *
793  * Retrieves the #GObject instance used as the target of the binding.
794  *
795  * Returns: (transfer none): the target #GObject
796  * Since: 2.26
797  */
798
799
800 /**
801  * g_binding_get_target_property:
802  * @binding: a #GBinding
803  *
804  * Retrieves the name of the property of #GBinding:target used as the target
805  * of the binding.
806  *
807  * Returns: the name of the target property
808  * Since: 2.26
809  */
810
811
812 /**
813  * g_binding_unbind:
814  * @binding: a #GBinding
815  *
816  * Explicitly releases the binding between the source and the target
817  * property expressed by @binding.
818  *
819  * This function will release the reference that is being held on
820  * the @binding instance; if you want to hold on to the #GBinding instance
821  * after calling g_binding_unbind(), you will need to hold a reference
822  * to it.
823  *
824  * Since: 2.38
825  */
826
827
828 /**
829  * g_boxed_copy:
830  * @boxed_type: The type of @src_boxed.
831  * @src_boxed: (not nullable): The boxed structure to be copied.
832  *
833  * Provide a copy of a boxed structure @src_boxed which is of type @boxed_type.
834  *
835  * Returns: (transfer full) (not nullable): The newly created copy of the boxed
836  *    structure.
837  */
838
839
840 /**
841  * g_boxed_free:
842  * @boxed_type: The type of @boxed.
843  * @boxed: (not nullable): The boxed structure to be freed.
844  *
845  * Free the boxed structure @boxed which is of type @boxed_type.
846  */
847
848
849 /**
850  * g_boxed_type_register_static:
851  * @name: Name of the new boxed type.
852  * @boxed_copy: Boxed structure copy function.
853  * @boxed_free: Boxed structure free function.
854  *
855  * This function creates a new %G_TYPE_BOXED derived type id for a new
856  * boxed type with name @name. Boxed type handling functions have to be
857  * provided to copy and free opaque boxed structures of this type.
858  *
859  * Returns: New %G_TYPE_BOXED derived type id for @name.
860  */
861
862
863 /**
864  * g_cclosure_marshal_BOOLEAN__BOXED_BOXED:
865  * @closure: A #GClosure.
866  * @return_value: A #GValue to store the return value. May be %NULL
867  *   if the callback of closure doesn't return a value.
868  * @n_param_values: The length of the @param_values array.
869  * @param_values: An array of #GValues holding the arguments
870  *   on which to invoke the callback of closure.
871  * @invocation_hint: The invocation hint given as the last argument to
872  *   g_closure_invoke().
873  * @marshal_data: Additional data specified when registering the
874  *   marshaller, see g_closure_set_marshal() and
875  *   g_closure_set_meta_marshal()
876  *
877  * A #GClosureMarshal function for use with signals with handlers that
878  * take two boxed pointers as arguments and return a boolean.  If you
879  * have such a signal, you will probably also need to use an
880  * accumulator, such as g_signal_accumulator_true_handled().
881  */
882
883
884 /**
885  * g_cclosure_marshal_BOOLEAN__BOXED_BOXEDv:
886  * @closure: the #GClosure to which the marshaller belongs
887  * @return_value: (allow-none): a #GValue to store the return
888  *  value. May be %NULL if the callback of @closure doesn't return a
889  *  value.
890  * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
891  * @args: va_list of arguments to be passed to the closure.
892  * @marshal_data: (allow-none): additional data specified when
893  *  registering the marshaller, see g_closure_set_marshal() and
894  *  g_closure_set_meta_marshal()
895  * @n_params: the length of the @param_types array
896  * @param_types: (array length=n_params): the #GType of each argument from
897  *  @args.
898  *
899  * The #GVaClosureMarshal equivalent to g_cclosure_marshal_BOOLEAN__BOXED_BOXED().
900  */
901
902
903 /**
904  * g_cclosure_marshal_BOOLEAN__FLAGS:
905  * @closure: A #GClosure.
906  * @return_value: A #GValue to store the return value. May be %NULL
907  *   if the callback of closure doesn't return a value.
908  * @n_param_values: The length of the @param_values array.
909  * @param_values: An array of #GValues holding the arguments
910  *   on which to invoke the callback of closure.
911  * @invocation_hint: The invocation hint given as the last argument to
912  *   g_closure_invoke().
913  * @marshal_data: Additional data specified when registering the
914  *   marshaller, see g_closure_set_marshal() and
915  *   g_closure_set_meta_marshal()
916  *
917  * A #GClosureMarshal function for use with signals with handlers that
918  * take a flags type as an argument and return a boolean.  If you have
919  * such a signal, you will probably also need to use an accumulator,
920  * such as g_signal_accumulator_true_handled().
921  */
922
923
924 /**
925  * g_cclosure_marshal_BOOLEAN__FLAGSv:
926  * @closure: the #GClosure to which the marshaller belongs
927  * @return_value: (allow-none): a #GValue to store the return
928  *  value. May be %NULL if the callback of @closure doesn't return a
929  *  value.
930  * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
931  * @args: va_list of arguments to be passed to the closure.
932  * @marshal_data: (allow-none): additional data specified when
933  *  registering the marshaller, see g_closure_set_marshal() and
934  *  g_closure_set_meta_marshal()
935  * @n_params: the length of the @param_types array
936  * @param_types: (array length=n_params): the #GType of each argument from
937  *  @args.
938  *
939  * The #GVaClosureMarshal equivalent to g_cclosure_marshal_BOOLEAN__FLAGS().
940  */
941
942
943 /**
944  * g_cclosure_marshal_BOOLEAN__OBJECT_BOXED_BOXED:
945  * @closure: the #GClosure to which the marshaller belongs
946  * @return_value: a #GValue, which can store the returned string
947  * @n_param_values: 3
948  * @param_values: a #GValue array holding instance, arg1 and arg2
949  * @invocation_hint: the invocation hint given as the last argument
950  *  to g_closure_invoke()
951  * @marshal_data: additional data specified when registering the marshaller
952  *
953  * A marshaller for a #GCClosure with a callback of type
954  * `gboolean (*callback) (gpointer instance, GBoxed *arg1, GBoxed *arg2, gpointer user_data)`.
955  *
956  * Since: 2.26
957  */
958
959
960 /**
961  * g_cclosure_marshal_BOOL__BOXED_BOXED:
962  * @closure: A #GClosure.
963  * @return_value: A #GValue to store the return value. May be %NULL
964  *   if the callback of closure doesn't return a value.
965  * @n_param_values: The length of the @param_values array.
966  * @param_values: An array of #GValues holding the arguments
967  *   on which to invoke the callback of closure.
968  * @invocation_hint: The invocation hint given as the last argument to
969  *   g_closure_invoke().
970  * @marshal_data: Additional data specified when registering the
971  *   marshaller, see g_closure_set_marshal() and
972  *   g_closure_set_meta_marshal()
973  *
974  * An old alias for g_cclosure_marshal_BOOLEAN__BOXED_BOXED().
975  */
976
977
978 /**
979  * g_cclosure_marshal_BOOL__FLAGS:
980  * @closure: A #GClosure.
981  * @return_value: A #GValue to store the return value. May be %NULL
982  *   if the callback of closure doesn't return a value.
983  * @n_param_values: The length of the @param_values array.
984  * @param_values: An array of #GValues holding the arguments
985  *   on which to invoke the callback of closure.
986  * @invocation_hint: The invocation hint given as the last argument to
987  *   g_closure_invoke().
988  * @marshal_data: Additional data specified when registering the
989  *   marshaller, see g_closure_set_marshal() and
990  *   g_closure_set_meta_marshal()
991  *
992  * An old alias for g_cclosure_marshal_BOOLEAN__FLAGS().
993  */
994
995
996 /**
997  * g_cclosure_marshal_STRING__OBJECT_POINTER:
998  * @closure: A #GClosure.
999  * @return_value: A #GValue to store the return value. May be %NULL
1000  *   if the callback of closure doesn't return a value.
1001  * @n_param_values: The length of the @param_values array.
1002  * @param_values: An array of #GValues holding the arguments
1003  *   on which to invoke the callback of closure.
1004  * @invocation_hint: The invocation hint given as the last argument to
1005  *   g_closure_invoke().
1006  * @marshal_data: Additional data specified when registering the
1007  *   marshaller, see g_closure_set_marshal() and
1008  *   g_closure_set_meta_marshal()
1009  *
1010  * A #GClosureMarshal function for use with signals with handlers that
1011  * take a #GObject and a pointer and produce a string.  It is highly
1012  * unlikely that your signal handler fits this description.
1013  */
1014
1015
1016 /**
1017  * g_cclosure_marshal_STRING__OBJECT_POINTERv:
1018  * @closure: the #GClosure to which the marshaller belongs
1019  * @return_value: (allow-none): a #GValue to store the return
1020  *  value. May be %NULL if the callback of @closure doesn't return a
1021  *  value.
1022  * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
1023  * @args: va_list of arguments to be passed to the closure.
1024  * @marshal_data: (allow-none): additional data specified when
1025  *  registering the marshaller, see g_closure_set_marshal() and
1026  *  g_closure_set_meta_marshal()
1027  * @n_params: the length of the @param_types array
1028  * @param_types: (array length=n_params): the #GType of each argument from
1029  *  @args.
1030  *
1031  * The #GVaClosureMarshal equivalent to g_cclosure_marshal_STRING__OBJECT_POINTER().
1032  */
1033
1034
1035 /**
1036  * g_cclosure_marshal_VOID__BOOLEAN:
1037  * @closure: A #GClosure.
1038  * @return_value: A #GValue to store the return value. May be %NULL
1039  *   if the callback of closure doesn't return a value.
1040  * @n_param_values: The length of the @param_values array.
1041  * @param_values: An array of #GValues holding the arguments
1042  *   on which to invoke the callback of closure.
1043  * @invocation_hint: The invocation hint given as the last argument to
1044  *   g_closure_invoke().
1045  * @marshal_data: Additional data specified when registering the
1046  *   marshaller, see g_closure_set_marshal() and
1047  *   g_closure_set_meta_marshal()
1048  *
1049  * A #GClosureMarshal function for use with signals with a single
1050  * boolean argument.
1051  */
1052
1053
1054 /**
1055  * g_cclosure_marshal_VOID__BOOLEANv:
1056  * @closure: the #GClosure to which the marshaller belongs
1057  * @return_value: (allow-none): a #GValue to store the return
1058  *  value. May be %NULL if the callback of @closure doesn't return a
1059  *  value.
1060  * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
1061  * @args: va_list of arguments to be passed to the closure.
1062  * @marshal_data: (allow-none): additional data specified when
1063  *  registering the marshaller, see g_closure_set_marshal() and
1064  *  g_closure_set_meta_marshal()
1065  * @n_params: the length of the @param_types array
1066  * @param_types: (array length=n_params): the #GType of each argument from
1067  *  @args.
1068  *
1069  * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__BOOLEAN().
1070  */
1071
1072
1073 /**
1074  * g_cclosure_marshal_VOID__BOXED:
1075  * @closure: A #GClosure.
1076  * @return_value: A #GValue to store the return value. May be %NULL
1077  *   if the callback of closure doesn't return a value.
1078  * @n_param_values: The length of the @param_values array.
1079  * @param_values: An array of #GValues holding the arguments
1080  *   on which to invoke the callback of closure.
1081  * @invocation_hint: The invocation hint given as the last argument to
1082  *   g_closure_invoke().
1083  * @marshal_data: Additional data specified when registering the
1084  *   marshaller, see g_closure_set_marshal() and
1085  *   g_closure_set_meta_marshal()
1086  *
1087  * A #GClosureMarshal function for use with signals with a single
1088  * argument which is any boxed pointer type.
1089  */
1090
1091
1092 /**
1093  * g_cclosure_marshal_VOID__BOXEDv:
1094  * @closure: the #GClosure to which the marshaller belongs
1095  * @return_value: (allow-none): a #GValue to store the return
1096  *  value. May be %NULL if the callback of @closure doesn't return a
1097  *  value.
1098  * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
1099  * @args: va_list of arguments to be passed to the closure.
1100  * @marshal_data: (allow-none): additional data specified when
1101  *  registering the marshaller, see g_closure_set_marshal() and
1102  *  g_closure_set_meta_marshal()
1103  * @n_params: the length of the @param_types array
1104  * @param_types: (array length=n_params): the #GType of each argument from
1105  *  @args.
1106  *
1107  * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__BOXED().
1108  */
1109
1110
1111 /**
1112  * g_cclosure_marshal_VOID__CHAR:
1113  * @closure: A #GClosure.
1114  * @return_value: A #GValue to store the return value. May be %NULL
1115  *   if the callback of closure doesn't return a value.
1116  * @n_param_values: The length of the @param_values array.
1117  * @param_values: An array of #GValues holding the arguments
1118  *   on which to invoke the callback of closure.
1119  * @invocation_hint: The invocation hint given as the last argument to
1120  *   g_closure_invoke().
1121  * @marshal_data: Additional data specified when registering the
1122  *   marshaller, see g_closure_set_marshal() and
1123  *   g_closure_set_meta_marshal()
1124  *
1125  * A #GClosureMarshal function for use with signals with a single
1126  * character argument.
1127  */
1128
1129
1130 /**
1131  * g_cclosure_marshal_VOID__CHARv:
1132  * @closure: the #GClosure to which the marshaller belongs
1133  * @return_value: (allow-none): a #GValue to store the return
1134  *  value. May be %NULL if the callback of @closure doesn't return a
1135  *  value.
1136  * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
1137  * @args: va_list of arguments to be passed to the closure.
1138  * @marshal_data: (allow-none): additional data specified when
1139  *  registering the marshaller, see g_closure_set_marshal() and
1140  *  g_closure_set_meta_marshal()
1141  * @n_params: the length of the @param_types array
1142  * @param_types: (array length=n_params): the #GType of each argument from
1143  *  @args.
1144  *
1145  * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__CHAR().
1146  */
1147
1148
1149 /**
1150  * g_cclosure_marshal_VOID__DOUBLE:
1151  * @closure: A #GClosure.
1152  * @return_value: A #GValue to store the return value. May be %NULL
1153  *   if the callback of closure doesn't return a value.
1154  * @n_param_values: The length of the @param_values array.
1155  * @param_values: An array of #GValues holding the arguments
1156  *   on which to invoke the callback of closure.
1157  * @invocation_hint: The invocation hint given as the last argument to
1158  *   g_closure_invoke().
1159  * @marshal_data: Additional data specified when registering the
1160  *   marshaller, see g_closure_set_marshal() and
1161  *   g_closure_set_meta_marshal()
1162  *
1163  * A #GClosureMarshal function for use with signals with one
1164  * double-precision floating point argument.
1165  */
1166
1167
1168 /**
1169  * g_cclosure_marshal_VOID__DOUBLEv:
1170  * @closure: the #GClosure to which the marshaller belongs
1171  * @return_value: (allow-none): a #GValue to store the return
1172  *  value. May be %NULL if the callback of @closure doesn't return a
1173  *  value.
1174  * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
1175  * @args: va_list of arguments to be passed to the closure.
1176  * @marshal_data: (allow-none): additional data specified when
1177  *  registering the marshaller, see g_closure_set_marshal() and
1178  *  g_closure_set_meta_marshal()
1179  * @n_params: the length of the @param_types array
1180  * @param_types: (array length=n_params): the #GType of each argument from
1181  *  @args.
1182  *
1183  * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__DOUBLE().
1184  */
1185
1186
1187 /**
1188  * g_cclosure_marshal_VOID__ENUM:
1189  * @closure: A #GClosure.
1190  * @return_value: A #GValue to store the return value. May be %NULL
1191  *   if the callback of closure doesn't return a value.
1192  * @n_param_values: The length of the @param_values array.
1193  * @param_values: An array of #GValues holding the arguments
1194  *   on which to invoke the callback of closure.
1195  * @invocation_hint: The invocation hint given as the last argument to
1196  *   g_closure_invoke().
1197  * @marshal_data: Additional data specified when registering the
1198  *   marshaller, see g_closure_set_marshal() and
1199  *   g_closure_set_meta_marshal()
1200  *
1201  * A #GClosureMarshal function for use with signals with a single
1202  * argument with an enumerated type.
1203  */
1204
1205
1206 /**
1207  * g_cclosure_marshal_VOID__ENUMv:
1208  * @closure: the #GClosure to which the marshaller belongs
1209  * @return_value: (allow-none): a #GValue to store the return
1210  *  value. May be %NULL if the callback of @closure doesn't return a
1211  *  value.
1212  * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
1213  * @args: va_list of arguments to be passed to the closure.
1214  * @marshal_data: (allow-none): additional data specified when
1215  *  registering the marshaller, see g_closure_set_marshal() and
1216  *  g_closure_set_meta_marshal()
1217  * @n_params: the length of the @param_types array
1218  * @param_types: (array length=n_params): the #GType of each argument from
1219  *  @args.
1220  *
1221  * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__ENUM().
1222  */
1223
1224
1225 /**
1226  * g_cclosure_marshal_VOID__FLAGS:
1227  * @closure: A #GClosure.
1228  * @return_value: A #GValue to store the return value. May be %NULL
1229  *   if the callback of closure doesn't return a value.
1230  * @n_param_values: The length of the @param_values array.
1231  * @param_values: An array of #GValues holding the arguments
1232  *   on which to invoke the callback of closure.
1233  * @invocation_hint: The invocation hint given as the last argument to
1234  *   g_closure_invoke().
1235  * @marshal_data: Additional data specified when registering the
1236  *   marshaller, see g_closure_set_marshal() and
1237  *   g_closure_set_meta_marshal()
1238  *
1239  * A #GClosureMarshal function for use with signals with a single
1240  * argument with a flags types.
1241  */
1242
1243
1244 /**
1245  * g_cclosure_marshal_VOID__FLAGSv:
1246  * @closure: the #GClosure to which the marshaller belongs
1247  * @return_value: (allow-none): a #GValue to store the return
1248  *  value. May be %NULL if the callback of @closure doesn't return a
1249  *  value.
1250  * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
1251  * @args: va_list of arguments to be passed to the closure.
1252  * @marshal_data: (allow-none): additional data specified when
1253  *  registering the marshaller, see g_closure_set_marshal() and
1254  *  g_closure_set_meta_marshal()
1255  * @n_params: the length of the @param_types array
1256  * @param_types: (array length=n_params): the #GType of each argument from
1257  *  @args.
1258  *
1259  * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__FLAGS().
1260  */
1261
1262
1263 /**
1264  * g_cclosure_marshal_VOID__FLOAT:
1265  * @closure: A #GClosure.
1266  * @return_value: A #GValue to store the return value. May be %NULL
1267  *   if the callback of closure doesn't return a value.
1268  * @n_param_values: The length of the @param_values array.
1269  * @param_values: An array of #GValues holding the arguments
1270  *   on which to invoke the callback of closure.
1271  * @invocation_hint: The invocation hint given as the last argument to
1272  *   g_closure_invoke().
1273  * @marshal_data: Additional data specified when registering the
1274  *   marshaller, see g_closure_set_marshal() and
1275  *   g_closure_set_meta_marshal()
1276  *
1277  * A #GClosureMarshal function for use with signals with one
1278  * single-precision floating point argument.
1279  */
1280
1281
1282 /**
1283  * g_cclosure_marshal_VOID__FLOATv:
1284  * @closure: the #GClosure to which the marshaller belongs
1285  * @return_value: (allow-none): a #GValue to store the return
1286  *  value. May be %NULL if the callback of @closure doesn't return a
1287  *  value.
1288  * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
1289  * @args: va_list of arguments to be passed to the closure.
1290  * @marshal_data: (allow-none): additional data specified when
1291  *  registering the marshaller, see g_closure_set_marshal() and
1292  *  g_closure_set_meta_marshal()
1293  * @n_params: the length of the @param_types array
1294  * @param_types: (array length=n_params): the #GType of each argument from
1295  *  @args.
1296  *
1297  * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__FLOAT().
1298  */
1299
1300
1301 /**
1302  * g_cclosure_marshal_VOID__INT:
1303  * @closure: A #GClosure.
1304  * @return_value: A #GValue to store the return value. May be %NULL
1305  *   if the callback of closure doesn't return a value.
1306  * @n_param_values: The length of the @param_values array.
1307  * @param_values: An array of #GValues holding the arguments
1308  *   on which to invoke the callback of closure.
1309  * @invocation_hint: The invocation hint given as the last argument to
1310  *   g_closure_invoke().
1311  * @marshal_data: Additional data specified when registering the
1312  *   marshaller, see g_closure_set_marshal() and
1313  *   g_closure_set_meta_marshal()
1314  *
1315  * A #GClosureMarshal function for use with signals with a single
1316  * integer argument.
1317  */
1318
1319
1320 /**
1321  * g_cclosure_marshal_VOID__INTv:
1322  * @closure: the #GClosure to which the marshaller belongs
1323  * @return_value: (allow-none): a #GValue to store the return
1324  *  value. May be %NULL if the callback of @closure doesn't return a
1325  *  value.
1326  * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
1327  * @args: va_list of arguments to be passed to the closure.
1328  * @marshal_data: (allow-none): additional data specified when
1329  *  registering the marshaller, see g_closure_set_marshal() and
1330  *  g_closure_set_meta_marshal()
1331  * @n_params: the length of the @param_types array
1332  * @param_types: (array length=n_params): the #GType of each argument from
1333  *  @args.
1334  *
1335  * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__INT().
1336  */
1337
1338
1339 /**
1340  * g_cclosure_marshal_VOID__LONG:
1341  * @closure: A #GClosure.
1342  * @return_value: A #GValue to store the return value. May be %NULL
1343  *   if the callback of closure doesn't return a value.
1344  * @n_param_values: The length of the @param_values array.
1345  * @param_values: An array of #GValues holding the arguments
1346  *   on which to invoke the callback of closure.
1347  * @invocation_hint: The invocation hint given as the last argument to
1348  *   g_closure_invoke().
1349  * @marshal_data: Additional data specified when registering the
1350  *   marshaller, see g_closure_set_marshal() and
1351  *   g_closure_set_meta_marshal()
1352  *
1353  * A #GClosureMarshal function for use with signals with with a single
1354  * long integer argument.
1355  */
1356
1357
1358 /**
1359  * g_cclosure_marshal_VOID__LONGv:
1360  * @closure: the #GClosure to which the marshaller belongs
1361  * @return_value: (allow-none): a #GValue to store the return
1362  *  value. May be %NULL if the callback of @closure doesn't return a
1363  *  value.
1364  * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
1365  * @args: va_list of arguments to be passed to the closure.
1366  * @marshal_data: (allow-none): additional data specified when
1367  *  registering the marshaller, see g_closure_set_marshal() and
1368  *  g_closure_set_meta_marshal()
1369  * @n_params: the length of the @param_types array
1370  * @param_types: (array length=n_params): the #GType of each argument from
1371  *  @args.
1372  *
1373  * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__LONG().
1374  */
1375
1376
1377 /**
1378  * g_cclosure_marshal_VOID__OBJECT:
1379  * @closure: A #GClosure.
1380  * @return_value: A #GValue to store the return value. May be %NULL
1381  *   if the callback of closure doesn't return a value.
1382  * @n_param_values: The length of the @param_values array.
1383  * @param_values: An array of #GValues holding the arguments
1384  *   on which to invoke the callback of closure.
1385  * @invocation_hint: The invocation hint given as the last argument to
1386  *   g_closure_invoke().
1387  * @marshal_data: Additional data specified when registering the
1388  *   marshaller, see g_closure_set_marshal() and
1389  *   g_closure_set_meta_marshal()
1390  *
1391  * A #GClosureMarshal function for use with signals with a single
1392  * #GObject argument.
1393  */
1394
1395
1396 /**
1397  * g_cclosure_marshal_VOID__OBJECTv:
1398  * @closure: the #GClosure to which the marshaller belongs
1399  * @return_value: (allow-none): a #GValue to store the return
1400  *  value. May be %NULL if the callback of @closure doesn't return a
1401  *  value.
1402  * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
1403  * @args: va_list of arguments to be passed to the closure.
1404  * @marshal_data: (allow-none): additional data specified when
1405  *  registering the marshaller, see g_closure_set_marshal() and
1406  *  g_closure_set_meta_marshal()
1407  * @n_params: the length of the @param_types array
1408  * @param_types: (array length=n_params): the #GType of each argument from
1409  *  @args.
1410  *
1411  * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__OBJECT().
1412  */
1413
1414
1415 /**
1416  * g_cclosure_marshal_VOID__PARAM:
1417  * @closure: A #GClosure.
1418  * @return_value: A #GValue to store the return value. May be %NULL
1419  *   if the callback of closure doesn't return a value.
1420  * @n_param_values: The length of the @param_values array.
1421  * @param_values: An array of #GValues holding the arguments
1422  *   on which to invoke the callback of closure.
1423  * @invocation_hint: The invocation hint given as the last argument to
1424  *   g_closure_invoke().
1425  * @marshal_data: Additional data specified when registering the
1426  *   marshaller, see g_closure_set_marshal() and
1427  *   g_closure_set_meta_marshal()
1428  *
1429  * A #GClosureMarshal function for use with signals with a single
1430  * argument of type #GParamSpec.
1431  */
1432
1433
1434 /**
1435  * g_cclosure_marshal_VOID__PARAMv:
1436  * @closure: the #GClosure to which the marshaller belongs
1437  * @return_value: (allow-none): a #GValue to store the return
1438  *  value. May be %NULL if the callback of @closure doesn't return a
1439  *  value.
1440  * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
1441  * @args: va_list of arguments to be passed to the closure.
1442  * @marshal_data: (allow-none): additional data specified when
1443  *  registering the marshaller, see g_closure_set_marshal() and
1444  *  g_closure_set_meta_marshal()
1445  * @n_params: the length of the @param_types array
1446  * @param_types: (array length=n_params): the #GType of each argument from
1447  *  @args.
1448  *
1449  * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__PARAM().
1450  */
1451
1452
1453 /**
1454  * g_cclosure_marshal_VOID__POINTER:
1455  * @closure: A #GClosure.
1456  * @return_value: A #GValue to store the return value. May be %NULL
1457  *   if the callback of closure doesn't return a value.
1458  * @n_param_values: The length of the @param_values array.
1459  * @param_values: An array of #GValues holding the arguments
1460  *   on which to invoke the callback of closure.
1461  * @invocation_hint: The invocation hint given as the last argument to
1462  *   g_closure_invoke().
1463  * @marshal_data: Additional data specified when registering the
1464  *   marshaller, see g_closure_set_marshal() and
1465  *   g_closure_set_meta_marshal()
1466  *
1467  * A #GClosureMarshal function for use with signals with a single raw
1468  * pointer argument type.
1469  *
1470  * If it is possible, it is better to use one of the more specific
1471  * functions such as g_cclosure_marshal_VOID__OBJECT() or
1472  * g_cclosure_marshal_VOID__OBJECT().
1473  */
1474
1475
1476 /**
1477  * g_cclosure_marshal_VOID__POINTERv:
1478  * @closure: the #GClosure to which the marshaller belongs
1479  * @return_value: (allow-none): a #GValue to store the return
1480  *  value. May be %NULL if the callback of @closure doesn't return a
1481  *  value.
1482  * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
1483  * @args: va_list of arguments to be passed to the closure.
1484  * @marshal_data: (allow-none): additional data specified when
1485  *  registering the marshaller, see g_closure_set_marshal() and
1486  *  g_closure_set_meta_marshal()
1487  * @n_params: the length of the @param_types array
1488  * @param_types: (array length=n_params): the #GType of each argument from
1489  *  @args.
1490  *
1491  * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__POINTER().
1492  */
1493
1494
1495 /**
1496  * g_cclosure_marshal_VOID__STRING:
1497  * @closure: A #GClosure.
1498  * @return_value: A #GValue to store the return value. May be %NULL
1499  *   if the callback of closure doesn't return a value.
1500  * @n_param_values: The length of the @param_values array.
1501  * @param_values: An array of #GValues holding the arguments
1502  *   on which to invoke the callback of closure.
1503  * @invocation_hint: The invocation hint given as the last argument to
1504  *   g_closure_invoke().
1505  * @marshal_data: Additional data specified when registering the
1506  *   marshaller, see g_closure_set_marshal() and
1507  *   g_closure_set_meta_marshal()
1508  *
1509  * A #GClosureMarshal function for use with signals with a single string
1510  * argument.
1511  */
1512
1513
1514 /**
1515  * g_cclosure_marshal_VOID__STRINGv:
1516  * @closure: the #GClosure to which the marshaller belongs
1517  * @return_value: (allow-none): a #GValue to store the return
1518  *  value. May be %NULL if the callback of @closure doesn't return a
1519  *  value.
1520  * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
1521  * @args: va_list of arguments to be passed to the closure.
1522  * @marshal_data: (allow-none): additional data specified when
1523  *  registering the marshaller, see g_closure_set_marshal() and
1524  *  g_closure_set_meta_marshal()
1525  * @n_params: the length of the @param_types array
1526  * @param_types: (array length=n_params): the #GType of each argument from
1527  *  @args.
1528  *
1529  * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__STRING().
1530  */
1531
1532
1533 /**
1534  * g_cclosure_marshal_VOID__UCHAR:
1535  * @closure: A #GClosure.
1536  * @return_value: A #GValue to store the return value. May be %NULL
1537  *   if the callback of closure doesn't return a value.
1538  * @n_param_values: The length of the @param_values array.
1539  * @param_values: An array of #GValues holding the arguments
1540  *   on which to invoke the callback of closure.
1541  * @invocation_hint: The invocation hint given as the last argument to
1542  *   g_closure_invoke().
1543  * @marshal_data: Additional data specified when registering the
1544  *   marshaller, see g_closure_set_marshal() and
1545  *   g_closure_set_meta_marshal()
1546  *
1547  * A #GClosureMarshal function for use with signals with a single
1548  * unsigned character argument.
1549  */
1550
1551
1552 /**
1553  * g_cclosure_marshal_VOID__UCHARv:
1554  * @closure: the #GClosure to which the marshaller belongs
1555  * @return_value: (allow-none): a #GValue to store the return
1556  *  value. May be %NULL if the callback of @closure doesn't return a
1557  *  value.
1558  * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
1559  * @args: va_list of arguments to be passed to the closure.
1560  * @marshal_data: (allow-none): additional data specified when
1561  *  registering the marshaller, see g_closure_set_marshal() and
1562  *  g_closure_set_meta_marshal()
1563  * @n_params: the length of the @param_types array
1564  * @param_types: (array length=n_params): the #GType of each argument from
1565  *  @args.
1566  *
1567  * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__UCHAR().
1568  */
1569
1570
1571 /**
1572  * g_cclosure_marshal_VOID__UINT:
1573  * @closure: A #GClosure.
1574  * @return_value: A #GValue to store the return value. May be %NULL
1575  *   if the callback of closure doesn't return a value.
1576  * @n_param_values: The length of the @param_values array.
1577  * @param_values: An array of #GValues holding the arguments
1578  *   on which to invoke the callback of closure.
1579  * @invocation_hint: The invocation hint given as the last argument to
1580  *   g_closure_invoke().
1581  * @marshal_data: Additional data specified when registering the
1582  *   marshaller, see g_closure_set_marshal() and
1583  *   g_closure_set_meta_marshal()
1584  *
1585  * A #GClosureMarshal function for use with signals with with a single
1586  * unsigned integer argument.
1587  */
1588
1589
1590 /**
1591  * g_cclosure_marshal_VOID__UINT_POINTER:
1592  * @closure: A #GClosure.
1593  * @return_value: A #GValue to store the return value. May be %NULL
1594  *   if the callback of closure doesn't return a value.
1595  * @n_param_values: The length of the @param_values array.
1596  * @param_values: An array of #GValues holding the arguments
1597  *   on which to invoke the callback of closure.
1598  * @invocation_hint: The invocation hint given as the last argument to
1599  *   g_closure_invoke().
1600  * @marshal_data: Additional data specified when registering the
1601  *   marshaller, see g_closure_set_marshal() and
1602  *   g_closure_set_meta_marshal()
1603  *
1604  * A #GClosureMarshal function for use with signals with a unsigned int
1605  * and a pointer as arguments.
1606  */
1607
1608
1609 /**
1610  * g_cclosure_marshal_VOID__UINT_POINTERv:
1611  * @closure: the #GClosure to which the marshaller belongs
1612  * @return_value: (allow-none): a #GValue to store the return
1613  *  value. May be %NULL if the callback of @closure doesn't return a
1614  *  value.
1615  * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
1616  * @args: va_list of arguments to be passed to the closure.
1617  * @marshal_data: (allow-none): additional data specified when
1618  *  registering the marshaller, see g_closure_set_marshal() and
1619  *  g_closure_set_meta_marshal()
1620  * @n_params: the length of the @param_types array
1621  * @param_types: (array length=n_params): the #GType of each argument from
1622  *  @args.
1623  *
1624  * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__UINT_POINTER().
1625  */
1626
1627
1628 /**
1629  * g_cclosure_marshal_VOID__UINTv:
1630  * @closure: the #GClosure to which the marshaller belongs
1631  * @return_value: (allow-none): a #GValue to store the return
1632  *  value. May be %NULL if the callback of @closure doesn't return a
1633  *  value.
1634  * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
1635  * @args: va_list of arguments to be passed to the closure.
1636  * @marshal_data: (allow-none): additional data specified when
1637  *  registering the marshaller, see g_closure_set_marshal() and
1638  *  g_closure_set_meta_marshal()
1639  * @n_params: the length of the @param_types array
1640  * @param_types: (array length=n_params): the #GType of each argument from
1641  *  @args.
1642  *
1643  * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__UINT().
1644  */
1645
1646
1647 /**
1648  * g_cclosure_marshal_VOID__ULONG:
1649  * @closure: A #GClosure.
1650  * @return_value: A #GValue to store the return value. May be %NULL
1651  *   if the callback of closure doesn't return a value.
1652  * @n_param_values: The length of the @param_values array.
1653  * @param_values: An array of #GValues holding the arguments
1654  *   on which to invoke the callback of closure.
1655  * @invocation_hint: The invocation hint given as the last argument to
1656  *   g_closure_invoke().
1657  * @marshal_data: Additional data specified when registering the
1658  *   marshaller, see g_closure_set_marshal() and
1659  *   g_closure_set_meta_marshal()
1660  *
1661  * A #GClosureMarshal function for use with signals with a single
1662  * unsigned long integer argument.
1663  */
1664
1665
1666 /**
1667  * g_cclosure_marshal_VOID__ULONGv:
1668  * @closure: the #GClosure to which the marshaller belongs
1669  * @return_value: (allow-none): a #GValue to store the return
1670  *  value. May be %NULL if the callback of @closure doesn't return a
1671  *  value.
1672  * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
1673  * @args: va_list of arguments to be passed to the closure.
1674  * @marshal_data: (allow-none): additional data specified when
1675  *  registering the marshaller, see g_closure_set_marshal() and
1676  *  g_closure_set_meta_marshal()
1677  * @n_params: the length of the @param_types array
1678  * @param_types: (array length=n_params): the #GType of each argument from
1679  *  @args.
1680  *
1681  * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__ULONG().
1682  */
1683
1684
1685 /**
1686  * g_cclosure_marshal_VOID__VARIANT:
1687  * @closure: A #GClosure.
1688  * @return_value: A #GValue to store the return value. May be %NULL
1689  *   if the callback of closure doesn't return a value.
1690  * @n_param_values: The length of the @param_values array.
1691  * @param_values: An array of #GValues holding the arguments
1692  *   on which to invoke the callback of closure.
1693  * @invocation_hint: The invocation hint given as the last argument to
1694  *   g_closure_invoke().
1695  * @marshal_data: Additional data specified when registering the
1696  *   marshaller, see g_closure_set_marshal() and
1697  *   g_closure_set_meta_marshal()
1698  *
1699  * A #GClosureMarshal function for use with signals with a single
1700  * #GVariant argument.
1701  */
1702
1703
1704 /**
1705  * g_cclosure_marshal_VOID__VARIANTv:
1706  * @closure: the #GClosure to which the marshaller belongs
1707  * @return_value: (allow-none): a #GValue to store the return
1708  *  value. May be %NULL if the callback of @closure doesn't return a
1709  *  value.
1710  * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
1711  * @args: va_list of arguments to be passed to the closure.
1712  * @marshal_data: (allow-none): additional data specified when
1713  *  registering the marshaller, see g_closure_set_marshal() and
1714  *  g_closure_set_meta_marshal()
1715  * @n_params: the length of the @param_types array
1716  * @param_types: (array length=n_params): the #GType of each argument from
1717  *  @args.
1718  *
1719  * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__VARIANT().
1720  */
1721
1722
1723 /**
1724  * g_cclosure_marshal_VOID__VOID:
1725  * @closure: A #GClosure.
1726  * @return_value: A #GValue to store the return value. May be %NULL
1727  *   if the callback of closure doesn't return a value.
1728  * @n_param_values: The length of the @param_values array.
1729  * @param_values: An array of #GValues holding the arguments
1730  *   on which to invoke the callback of closure.
1731  * @invocation_hint: The invocation hint given as the last argument to
1732  *   g_closure_invoke().
1733  * @marshal_data: Additional data specified when registering the
1734  *   marshaller, see g_closure_set_marshal() and
1735  *   g_closure_set_meta_marshal()
1736  *
1737  * A #GClosureMarshal function for use with signals with no arguments.
1738  */
1739
1740
1741 /**
1742  * g_cclosure_marshal_VOID__VOIDv:
1743  * @closure: the #GClosure to which the marshaller belongs
1744  * @return_value: (allow-none): a #GValue to store the return
1745  *  value. May be %NULL if the callback of @closure doesn't return a
1746  *  value.
1747  * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
1748  * @args: va_list of arguments to be passed to the closure.
1749  * @marshal_data: (allow-none): additional data specified when
1750  *  registering the marshaller, see g_closure_set_marshal() and
1751  *  g_closure_set_meta_marshal()
1752  * @n_params: the length of the @param_types array
1753  * @param_types: (array length=n_params): the #GType of each argument from
1754  *  @args.
1755  *
1756  * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__VOID().
1757  */
1758
1759
1760 /**
1761  * g_cclosure_marshal_generic:
1762  * @closure: A #GClosure.
1763  * @return_gvalue: A #GValue to store the return value. May be %NULL
1764  *   if the callback of closure doesn't return a value.
1765  * @n_param_values: The length of the @param_values array.
1766  * @param_values: An array of #GValues holding the arguments
1767  *   on which to invoke the callback of closure.
1768  * @invocation_hint: The invocation hint given as the last argument to
1769  *   g_closure_invoke().
1770  * @marshal_data: Additional data specified when registering the
1771  *   marshaller, see g_closure_set_marshal() and
1772  *   g_closure_set_meta_marshal()
1773  *
1774  * A generic marshaller function implemented via
1775  * [libffi](http://sourceware.org/libffi/).
1776  *
1777  * Normally this function is not passed explicitly to g_signal_new(),
1778  * but used automatically by GLib when specifying a %NULL marshaller.
1779  *
1780  * Since: 2.30
1781  */
1782
1783
1784 /**
1785  * g_cclosure_marshal_generic_va:
1786  * @closure: the #GClosure to which the marshaller belongs
1787  * @return_value: (allow-none): a #GValue to store the return
1788  *  value. May be %NULL if the callback of @closure doesn't return a
1789  *  value.
1790  * @instance: (type GObject.TypeInstance): the instance on which the closure is
1791  *  invoked.
1792  * @args_list: va_list of arguments to be passed to the closure.
1793  * @marshal_data: (allow-none): additional data specified when
1794  *  registering the marshaller, see g_closure_set_marshal() and
1795  *  g_closure_set_meta_marshal()
1796  * @n_params: the length of the @param_types array
1797  * @param_types: (array length=n_params): the #GType of each argument from
1798  *  @args_list.
1799  *
1800  * A generic #GVaClosureMarshal function implemented via
1801  * [libffi](http://sourceware.org/libffi/).
1802  *
1803  * Since: 2.30
1804  */
1805
1806
1807 /**
1808  * g_cclosure_new: (skip)
1809  * @callback_func: the function to invoke
1810  * @user_data: (closure callback_func): user data to pass to @callback_func
1811  * @destroy_data: destroy notify to be called when @user_data is no longer used
1812  *
1813  * Creates a new closure which invokes @callback_func with @user_data as
1814  * the last parameter.
1815  *
1816  * Returns: a new #GCClosure
1817  */
1818
1819
1820 /**
1821  * g_cclosure_new_object: (skip)
1822  * @callback_func: the function to invoke
1823  * @object: a #GObject pointer to pass to @callback_func
1824  *
1825  * A variant of g_cclosure_new() which uses @object as @user_data and
1826  * calls g_object_watch_closure() on @object and the created
1827  * closure. This function is useful when you have a callback closely
1828  * associated with a #GObject, and want the callback to no longer run
1829  * after the object is is freed.
1830  *
1831  * Returns: a new #GCClosure
1832  */
1833
1834
1835 /**
1836  * g_cclosure_new_object_swap: (skip)
1837  * @callback_func: the function to invoke
1838  * @object: a #GObject pointer to pass to @callback_func
1839  *
1840  * A variant of g_cclosure_new_swap() which uses @object as @user_data
1841  * and calls g_object_watch_closure() on @object and the created
1842  * closure. This function is useful when you have a callback closely
1843  * associated with a #GObject, and want the callback to no longer run
1844  * after the object is is freed.
1845  *
1846  * Returns: a new #GCClosure
1847  */
1848
1849
1850 /**
1851  * g_cclosure_new_swap: (skip)
1852  * @callback_func: the function to invoke
1853  * @user_data: (closure callback_func): user data to pass to @callback_func
1854  * @destroy_data: destroy notify to be called when @user_data is no longer used
1855  *
1856  * Creates a new closure which invokes @callback_func with @user_data as
1857  * the first parameter.
1858  *
1859  * Returns: (transfer full): a new #GCClosure
1860  */
1861
1862
1863 /**
1864  * g_clear_object: (skip)
1865  * @object_ptr: a pointer to a #GObject reference
1866  *
1867  * Clears a reference to a #GObject.
1868  *
1869  * @object_ptr must not be %NULL.
1870  *
1871  * If the reference is %NULL then this function does nothing.
1872  * Otherwise, the reference count of the object is decreased and the
1873  * pointer is set to %NULL.
1874  *
1875  * A macro is also included that allows this function to be used without
1876  * pointer casts.
1877  *
1878  * Since: 2.28
1879  */
1880
1881
1882 /**
1883  * g_closure_add_finalize_notifier: (skip)
1884  * @closure: a #GClosure
1885  * @notify_data: (closure notify_func): data to pass to @notify_func
1886  * @notify_func: the callback function to register
1887  *
1888  * Registers a finalization notifier which will be called when the
1889  * reference count of @closure goes down to 0. Multiple finalization
1890  * notifiers on a single closure are invoked in unspecified order. If
1891  * a single call to g_closure_unref() results in the closure being
1892  * both invalidated and finalized, then the invalidate notifiers will
1893  * be run before the finalize notifiers.
1894  */
1895
1896
1897 /**
1898  * g_closure_add_invalidate_notifier: (skip)
1899  * @closure: a #GClosure
1900  * @notify_data: (closure notify_func): data to pass to @notify_func
1901  * @notify_func: the callback function to register
1902  *
1903  * Registers an invalidation notifier which will be called when the
1904  * @closure is invalidated with g_closure_invalidate(). Invalidation
1905  * notifiers are invoked before finalization notifiers, in an
1906  * unspecified order.
1907  */
1908
1909
1910 /**
1911  * g_closure_add_marshal_guards: (skip)
1912  * @closure: a #GClosure
1913  * @pre_marshal_data: (closure pre_marshal_notify): data to pass
1914  *  to @pre_marshal_notify
1915  * @pre_marshal_notify: a function to call before the closure callback
1916  * @post_marshal_data: (closure post_marshal_notify): data to pass
1917  *  to @post_marshal_notify
1918  * @post_marshal_notify: a function to call after the closure callback
1919  *
1920  * Adds a pair of notifiers which get invoked before and after the
1921  * closure callback, respectively. This is typically used to protect
1922  * the extra arguments for the duration of the callback. See
1923  * g_object_watch_closure() for an example of marshal guards.
1924  */
1925
1926
1927 /**
1928  * g_closure_invalidate:
1929  * @closure: GClosure to invalidate
1930  *
1931  * Sets a flag on the closure to indicate that its calling
1932  * environment has become invalid, and thus causes any future
1933  * invocations of g_closure_invoke() on this @closure to be
1934  * ignored. Also, invalidation notifiers installed on the closure will
1935  * be called at this point. Note that unless you are holding a
1936  * reference to the closure yourself, the invalidation notifiers may
1937  * unref the closure and cause it to be destroyed, so if you need to
1938  * access the closure after calling g_closure_invalidate(), make sure
1939  * that you've previously called g_closure_ref().
1940  *
1941  * Note that g_closure_invalidate() will also be called when the
1942  * reference count of a closure drops to zero (unless it has already
1943  * been invalidated before).
1944  */
1945
1946
1947 /**
1948  * g_closure_invoke:
1949  * @closure: a #GClosure
1950  * @return_value: (optional) (out): a #GValue to store the return
1951  *                value. May be %NULL if the callback of @closure
1952  *                doesn't return a value.
1953  * @n_param_values: the length of the @param_values array
1954  * @param_values: (array length=n_param_values): an array of
1955  *                #GValues holding the arguments on which to
1956  *                invoke the callback of @closure
1957  * @invocation_hint: (allow-none): a context-dependent invocation hint
1958  *
1959  * Invokes the closure, i.e. executes the callback represented by the @closure.
1960  */
1961
1962
1963 /**
1964  * g_closure_new_object:
1965  * @sizeof_closure: the size of the structure to allocate, must be at least
1966  *  `sizeof (GClosure)`
1967  * @object: a #GObject pointer to store in the @data field of the newly
1968  *  allocated #GClosure
1969  *
1970  * A variant of g_closure_new_simple() which stores @object in the
1971  * @data field of the closure and calls g_object_watch_closure() on
1972  * @object and the created closure. This function is mainly useful
1973  * when implementing new types of closures.
1974  *
1975  * Returns: (transfer full): a newly allocated #GClosure
1976  */
1977
1978
1979 /**
1980  * g_closure_new_simple:
1981  * @sizeof_closure: the size of the structure to allocate, must be at least
1982  *                  `sizeof (GClosure)`
1983  * @data: data to store in the @data field of the newly allocated #GClosure
1984  *
1985  * Allocates a struct of the given size and initializes the initial
1986  * part as a #GClosure. This function is mainly useful when
1987  * implementing new types of closures.
1988  *
1989  * |[<!-- language="C" -->
1990  * typedef struct _MyClosure MyClosure;
1991  * struct _MyClosure
1992  * {
1993  *   GClosure closure;
1994  *   // extra data goes here
1995  * };
1996  *
1997  * static void
1998  * my_closure_finalize (gpointer  notify_data,
1999  *                      GClosure *closure)
2000  * {
2001  *   MyClosure *my_closure = (MyClosure *)closure;
2002  *
2003  *   // free extra data here
2004  * }
2005  *
2006  * MyClosure *my_closure_new (gpointer data)
2007  * {
2008  *   GClosure *closure;
2009  *   MyClosure *my_closure;
2010  *
2011  *   closure = g_closure_new_simple (sizeof (MyClosure), data);
2012  *   my_closure = (MyClosure *) closure;
2013  *
2014  *   // initialize extra data here
2015  *
2016  *   g_closure_add_finalize_notifier (closure, notify_data,
2017  *                                    my_closure_finalize);
2018  *   return my_closure;
2019  * }
2020  * ]|
2021  *
2022  * Returns: (transfer full): a newly allocated #GClosure
2023  */
2024
2025
2026 /**
2027  * g_closure_ref:
2028  * @closure: #GClosure to increment the reference count on
2029  *
2030  * Increments the reference count on a closure to force it staying
2031  * alive while the caller holds a pointer to it.
2032  *
2033  * Returns: (transfer none): The @closure passed in, for convenience
2034  */
2035
2036
2037 /**
2038  * g_closure_remove_finalize_notifier: (skip)
2039  * @closure: a #GClosure
2040  * @notify_data: data which was passed to g_closure_add_finalize_notifier()
2041  *  when registering @notify_func
2042  * @notify_func: the callback function to remove
2043  *
2044  * Removes a finalization notifier.
2045  *
2046  * Notice that notifiers are automatically removed after they are run.
2047  */
2048
2049
2050 /**
2051  * g_closure_remove_invalidate_notifier: (skip)
2052  * @closure: a #GClosure
2053  * @notify_data: data which was passed to g_closure_add_invalidate_notifier()
2054  *               when registering @notify_func
2055  * @notify_func: the callback function to remove
2056  *
2057  * Removes an invalidation notifier.
2058  *
2059  * Notice that notifiers are automatically removed after they are run.
2060  */
2061
2062
2063 /**
2064  * g_closure_set_marshal: (skip)
2065  * @closure: a #GClosure
2066  * @marshal: a #GClosureMarshal function
2067  *
2068  * Sets the marshaller of @closure. The `marshal_data`
2069  * of @marshal provides a way for a meta marshaller to provide additional
2070  * information to the marshaller. (See g_closure_set_meta_marshal().) For
2071  * GObject's C predefined marshallers (the g_cclosure_marshal_*()
2072  * functions), what it provides is a callback function to use instead of
2073  * @closure->callback.
2074  */
2075
2076
2077 /**
2078  * g_closure_set_meta_marshal: (skip)
2079  * @closure: a #GClosure
2080  * @marshal_data: (closure meta_marshal): context-dependent data to pass
2081  *  to @meta_marshal
2082  * @meta_marshal: a #GClosureMarshal function
2083  *
2084  * Sets the meta marshaller of @closure.  A meta marshaller wraps
2085  * @closure->marshal and modifies the way it is called in some
2086  * fashion. The most common use of this facility is for C callbacks.
2087  * The same marshallers (generated by [glib-genmarshal][glib-genmarshal]),
2088  * are used everywhere, but the way that we get the callback function
2089  * differs. In most cases we want to use @closure->callback, but in
2090  * other cases we want to use some different technique to retrieve the
2091  * callback function.
2092  *
2093  * For example, class closures for signals (see
2094  * g_signal_type_cclosure_new()) retrieve the callback function from a
2095  * fixed offset in the class structure.  The meta marshaller retrieves
2096  * the right callback and passes it to the marshaller as the
2097  * @marshal_data argument.
2098  */
2099
2100
2101 /**
2102  * g_closure_sink:
2103  * @closure: #GClosure to decrement the initial reference count on, if it's
2104  *           still being held
2105  *
2106  * Takes over the initial ownership of a closure.  Each closure is
2107  * initially created in a "floating" state, which means that the initial
2108  * reference count is not owned by any caller. g_closure_sink() checks
2109  * to see if the object is still floating, and if so, unsets the
2110  * floating state and decreases the reference count. If the closure
2111  * is not floating, g_closure_sink() does nothing. The reason for the
2112  * existence of the floating state is to prevent cumbersome code
2113  * sequences like:
2114  * |[<!-- language="C" -->
2115  * closure = g_cclosure_new (cb_func, cb_data);
2116  * g_source_set_closure (source, closure);
2117  * g_closure_unref (closure); // GObject doesn't really need this
2118  * ]|
2119  * Because g_source_set_closure() (and similar functions) take ownership of the
2120  * initial reference count, if it is unowned, we instead can write:
2121  * |[<!-- language="C" -->
2122  * g_source_set_closure (source, g_cclosure_new (cb_func, cb_data));
2123  * ]|
2124  *
2125  * Generally, this function is used together with g_closure_ref(). Ane example
2126  * of storing a closure for later notification looks like:
2127  * |[<!-- language="C" -->
2128  * static GClosure *notify_closure = NULL;
2129  * void
2130  * foo_notify_set_closure (GClosure *closure)
2131  * {
2132  *   if (notify_closure)
2133  *     g_closure_unref (notify_closure);
2134  *   notify_closure = closure;
2135  *   if (notify_closure)
2136  *     {
2137  *       g_closure_ref (notify_closure);
2138  *       g_closure_sink (notify_closure);
2139  *     }
2140  * }
2141  * ]|
2142  *
2143  * Because g_closure_sink() may decrement the reference count of a closure
2144  * (if it hasn't been called on @closure yet) just like g_closure_unref(),
2145  * g_closure_ref() should be called prior to this function.
2146  */
2147
2148
2149 /**
2150  * g_closure_unref:
2151  * @closure: #GClosure to decrement the reference count on
2152  *
2153  * Decrements the reference count of a closure after it was previously
2154  * incremented by the same caller. If no other callers are using the
2155  * closure, then the closure will be destroyed and freed.
2156  */
2157
2158
2159 /**
2160  * g_enum_complete_type_info:
2161  * @g_enum_type: the type identifier of the type being completed
2162  * @info: (out callee-allocates): the #GTypeInfo struct to be filled in
2163  * @const_values: An array of #GEnumValue structs for the possible
2164  *  enumeration values. The array is terminated by a struct with all
2165  *  members being 0.
2166  *
2167  * This function is meant to be called from the `complete_type_info`
2168  * function of a #GTypePlugin implementation, as in the following
2169  * example:
2170  *
2171  * |[<!-- language="C" -->
2172  * static void
2173  * my_enum_complete_type_info (GTypePlugin     *plugin,
2174  *                             GType            g_type,
2175  *                             GTypeInfo       *info,
2176  *                             GTypeValueTable *value_table)
2177  * {
2178  *   static const GEnumValue values[] = {
2179  *     { MY_ENUM_FOO, "MY_ENUM_FOO", "foo" },
2180  *     { MY_ENUM_BAR, "MY_ENUM_BAR", "bar" },
2181  *     { 0, NULL, NULL }
2182  *   };
2183  *
2184  *   g_enum_complete_type_info (type, info, values);
2185  * }
2186  * ]|
2187  */
2188
2189
2190 /**
2191  * g_enum_get_value:
2192  * @enum_class: a #GEnumClass
2193  * @value: the value to look up
2194  *
2195  * Returns the #GEnumValue for a value.
2196  *
2197  * Returns: (transfer none): the #GEnumValue for @value, or %NULL
2198  *          if @value is not a member of the enumeration
2199  */
2200
2201
2202 /**
2203  * g_enum_get_value_by_name:
2204  * @enum_class: a #GEnumClass
2205  * @name: the name to look up
2206  *
2207  * Looks up a #GEnumValue by name.
2208  *
2209  * Returns: (transfer none): the #GEnumValue with name @name,
2210  *          or %NULL if the enumeration doesn't have a member
2211  *          with that name
2212  */
2213
2214
2215 /**
2216  * g_enum_get_value_by_nick:
2217  * @enum_class: a #GEnumClass
2218  * @nick: the nickname to look up
2219  *
2220  * Looks up a #GEnumValue by nickname.
2221  *
2222  * Returns: (transfer none): the #GEnumValue with nickname @nick,
2223  *          or %NULL if the enumeration doesn't have a member
2224  *          with that nickname
2225  */
2226
2227
2228 /**
2229  * g_enum_register_static:
2230  * @name: A nul-terminated string used as the name of the new type.
2231  * @const_static_values: An array of #GEnumValue structs for the possible
2232  *  enumeration values. The array is terminated by a struct with all
2233  *  members being 0. GObject keeps a reference to the data, so it cannot
2234  *  be stack-allocated.
2235  *
2236  * Registers a new static enumeration type with the name @name.
2237  *
2238  * It is normally more convenient to let [glib-mkenums][glib-mkenums],
2239  * generate a my_enum_get_type() function from a usual C enumeration
2240  * definition  than to write one yourself using g_enum_register_static().
2241  *
2242  * Returns: The new type identifier.
2243  */
2244
2245
2246 /**
2247  * g_flags_complete_type_info:
2248  * @g_flags_type: the type identifier of the type being completed
2249  * @info: (out callee-allocates): the #GTypeInfo struct to be filled in
2250  * @const_values: An array of #GFlagsValue structs for the possible
2251  *  enumeration values. The array is terminated by a struct with all
2252  *  members being 0.
2253  *
2254  * This function is meant to be called from the complete_type_info()
2255  * function of a #GTypePlugin implementation, see the example for
2256  * g_enum_complete_type_info() above.
2257  */
2258
2259
2260 /**
2261  * g_flags_get_first_value:
2262  * @flags_class: a #GFlagsClass
2263  * @value: the value
2264  *
2265  * Returns the first #GFlagsValue which is set in @value.
2266  *
2267  * Returns: (transfer none): the first #GFlagsValue which is set in
2268  *          @value, or %NULL if none is set
2269  */
2270
2271
2272 /**
2273  * g_flags_get_value_by_name:
2274  * @flags_class: a #GFlagsClass
2275  * @name: the name to look up
2276  *
2277  * Looks up a #GFlagsValue by name.
2278  *
2279  * Returns: (transfer none): the #GFlagsValue with name @name,
2280  *          or %NULL if there is no flag with that name
2281  */
2282
2283
2284 /**
2285  * g_flags_get_value_by_nick:
2286  * @flags_class: a #GFlagsClass
2287  * @nick: the nickname to look up
2288  *
2289  * Looks up a #GFlagsValue by nickname.
2290  *
2291  * Returns: (transfer none): the #GFlagsValue with nickname @nick,
2292  *          or %NULL if there is no flag with that nickname
2293  */
2294
2295
2296 /**
2297  * g_flags_register_static:
2298  * @name: A nul-terminated string used as the name of the new type.
2299  * @const_static_values: An array of #GFlagsValue structs for the possible
2300  *  flags values. The array is terminated by a struct with all members being 0.
2301  *  GObject keeps a reference to the data, so it cannot be stack-allocated.
2302  *
2303  * Registers a new static flags type with the name @name.
2304  *
2305  * It is normally more convenient to let [glib-mkenums][glib-mkenums]
2306  * generate a my_flags_get_type() function from a usual C enumeration
2307  * definition than to write one yourself using g_flags_register_static().
2308  *
2309  * Returns: The new type identifier.
2310  */
2311
2312
2313 /**
2314  * g_object_add_toggle_ref: (skip)
2315  * @object: a #GObject
2316  * @notify: a function to call when this reference is the
2317  *  last reference to the object, or is no longer
2318  *  the last reference.
2319  * @data: data to pass to @notify
2320  *
2321  * Increases the reference count of the object by one and sets a
2322  * callback to be called when all other references to the object are
2323  * dropped, or when this is already the last reference to the object
2324  * and another reference is established.
2325  *
2326  * This functionality is intended for binding @object to a proxy
2327  * object managed by another memory manager. This is done with two
2328  * paired references: the strong reference added by
2329  * g_object_add_toggle_ref() and a reverse reference to the proxy
2330  * object which is either a strong reference or weak reference.
2331  *
2332  * The setup is that when there are no other references to @object,
2333  * only a weak reference is held in the reverse direction from @object
2334  * to the proxy object, but when there are other references held to
2335  * @object, a strong reference is held. The @notify callback is called
2336  * when the reference from @object to the proxy object should be
2337  * "toggled" from strong to weak (@is_last_ref true) or weak to strong
2338  * (@is_last_ref false).
2339  *
2340  * Since a (normal) reference must be held to the object before
2341  * calling g_object_add_toggle_ref(), the initial state of the reverse
2342  * link is always strong.
2343  *
2344  * Multiple toggle references may be added to the same gobject,
2345  * however if there are multiple toggle references to an object, none
2346  * of them will ever be notified until all but one are removed.  For
2347  * this reason, you should only ever use a toggle reference if there
2348  * is important state in the proxy object.
2349  *
2350  * Since: 2.8
2351  */
2352
2353
2354 /**
2355  * g_object_add_weak_pointer: (skip)
2356  * @object: The object that should be weak referenced.
2357  * @weak_pointer_location: (inout) (not optional) (nullable): The memory address
2358  *    of a pointer.
2359  *
2360  * Adds a weak reference from weak_pointer to @object to indicate that
2361  * the pointer located at @weak_pointer_location is only valid during
2362  * the lifetime of @object. When the @object is finalized,
2363  * @weak_pointer will be set to %NULL.
2364  *
2365  * Note that as with g_object_weak_ref(), the weak references created by
2366  * this method are not thread-safe: they cannot safely be used in one
2367  * thread if the object's last g_object_unref() might happen in another
2368  * thread. Use #GWeakRef if thread-safety is required.
2369  */
2370
2371
2372 /**
2373  * g_object_bind_property:
2374  * @source: (type GObject.Object): the source #GObject
2375  * @source_property: the property on @source to bind
2376  * @target: (type GObject.Object): the target #GObject
2377  * @target_property: the property on @target to bind
2378  * @flags: flags to pass to #GBinding
2379  *
2380  * Creates a binding between @source_property on @source and @target_property
2381  * on @target. Whenever the @source_property is changed the @target_property is
2382  * updated using the same value. For instance:
2383  *
2384  * |[
2385  *   g_object_bind_property (action, "active", widget, "sensitive", 0);
2386  * ]|
2387  *
2388  * Will result in the "sensitive" property of the widget #GObject instance to be
2389  * updated with the same value of the "active" property of the action #GObject
2390  * instance.
2391  *
2392  * If @flags contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
2393  * if @target_property on @target changes then the @source_property on @source
2394  * will be updated as well.
2395  *
2396  * The binding will automatically be removed when either the @source or the
2397  * @target instances are finalized. To remove the binding without affecting the
2398  * @source and the @target you can just call g_object_unref() on the returned
2399  * #GBinding instance.
2400  *
2401  * A #GObject can have multiple bindings.
2402  *
2403  * Returns: (transfer none): the #GBinding instance representing the
2404  *     binding between the two #GObject instances. The binding is released
2405  *     whenever the #GBinding reference count reaches zero.
2406  * Since: 2.26
2407  */
2408
2409
2410 /**
2411  * g_object_bind_property_full:
2412  * @source: (type GObject.Object): the source #GObject
2413  * @source_property: the property on @source to bind
2414  * @target: (type GObject.Object): the target #GObject
2415  * @target_property: the property on @target to bind
2416  * @flags: flags to pass to #GBinding
2417  * @transform_to: (scope notified) (allow-none): the transformation function
2418  *     from the @source to the @target, or %NULL to use the default
2419  * @transform_from: (scope notified) (allow-none): the transformation function
2420  *     from the @target to the @source, or %NULL to use the default
2421  * @user_data: custom data to be passed to the transformation functions,
2422  *     or %NULL
2423  * @notify: function to be called when disposing the binding, to free the
2424  *     resources used by the transformation functions
2425  *
2426  * Complete version of g_object_bind_property().
2427  *
2428  * Creates a binding between @source_property on @source and @target_property
2429  * on @target, allowing you to set the transformation functions to be used by
2430  * the binding.
2431  *
2432  * If @flags contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
2433  * if @target_property on @target changes then the @source_property on @source
2434  * will be updated as well. The @transform_from function is only used in case
2435  * of bidirectional bindings, otherwise it will be ignored
2436  *
2437  * The binding will automatically be removed when either the @source or the
2438  * @target instances are finalized. To remove the binding without affecting the
2439  * @source and the @target you can just call g_object_unref() on the returned
2440  * #GBinding instance.
2441  *
2442  * A #GObject can have multiple bindings.
2443  *
2444  * The same @user_data parameter will be used for both @transform_to
2445  * and @transform_from transformation functions; the @notify function will
2446  * be called once, when the binding is removed. If you need different data
2447  * for each transformation function, please use
2448  * g_object_bind_property_with_closures() instead.
2449  *
2450  * Returns: (transfer none): the #GBinding instance representing the
2451  *     binding between the two #GObject instances. The binding is released
2452  *     whenever the #GBinding reference count reaches zero.
2453  * Since: 2.26
2454  */
2455
2456
2457 /**
2458  * g_object_bind_property_with_closures: (rename-to g_object_bind_property_full)
2459  * @source: (type GObject.Object): the source #GObject
2460  * @source_property: the property on @source to bind
2461  * @target: (type GObject.Object): the target #GObject
2462  * @target_property: the property on @target to bind
2463  * @flags: flags to pass to #GBinding
2464  * @transform_to: a #GClosure wrapping the transformation function
2465  *     from the @source to the @target, or %NULL to use the default
2466  * @transform_from: a #GClosure wrapping the transformation function
2467  *     from the @target to the @source, or %NULL to use the default
2468  *
2469  * Creates a binding between @source_property on @source and @target_property
2470  * on @target, allowing you to set the transformation functions to be used by
2471  * the binding.
2472  *
2473  * This function is the language bindings friendly version of
2474  * g_object_bind_property_full(), using #GClosures instead of
2475  * function pointers.
2476  *
2477  * Returns: (transfer none): the #GBinding instance representing the
2478  *     binding between the two #GObject instances. The binding is released
2479  *     whenever the #GBinding reference count reaches zero.
2480  * Since: 2.26
2481  */
2482
2483
2484 /**
2485  * g_object_class_find_property:
2486  * @oclass: a #GObjectClass
2487  * @property_name: the name of the property to look up
2488  *
2489  * Looks up the #GParamSpec for a property of a class.
2490  *
2491  * Returns: (transfer none): the #GParamSpec for the property, or
2492  *          %NULL if the class doesn't have a property of that name
2493  */
2494
2495
2496 /**
2497  * g_object_class_install_properties:
2498  * @oclass: a #GObjectClass
2499  * @n_pspecs: the length of the #GParamSpecs array
2500  * @pspecs: (array length=n_pspecs): the #GParamSpecs array
2501  *   defining the new properties
2502  *
2503  * Installs new properties from an array of #GParamSpecs.
2504  *
2505  * All properties should be installed during the class initializer.  It
2506  * is possible to install properties after that, but doing so is not
2507  * recommend, and specifically, is not guaranteed to be thread-safe vs.
2508  * use of properties on the same type on other threads.
2509  *
2510  * The property id of each property is the index of each #GParamSpec in
2511  * the @pspecs array.
2512  *
2513  * The property id of 0 is treated specially by #GObject and it should not
2514  * be used to store a #GParamSpec.
2515  *
2516  * This function should be used if you plan to use a static array of
2517  * #GParamSpecs and g_object_notify_by_pspec(). For instance, this
2518  * class initialization:
2519  *
2520  * |[<!-- language="C" -->
2521  * enum {
2522  *   PROP_0, PROP_FOO, PROP_BAR, N_PROPERTIES
2523  * };
2524  *
2525  * static GParamSpec *obj_properties[N_PROPERTIES] = { NULL, };
2526  *
2527  * static void
2528  * my_object_class_init (MyObjectClass *klass)
2529  * {
2530  *   GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
2531  *
2532  *   obj_properties[PROP_FOO] =
2533  *     g_param_spec_int ("foo", "Foo", "Foo",
2534  *                       -1, G_MAXINT,
2535  *                       0,
2536  *                       G_PARAM_READWRITE);
2537  *
2538  *   obj_properties[PROP_BAR] =
2539  *     g_param_spec_string ("bar", "Bar", "Bar",
2540  *                          NULL,
2541  *                          G_PARAM_READWRITE);
2542  *
2543  *   gobject_class->set_property = my_object_set_property;
2544  *   gobject_class->get_property = my_object_get_property;
2545  *   g_object_class_install_properties (gobject_class,
2546  *                                      N_PROPERTIES,
2547  *                                      obj_properties);
2548  * }
2549  * ]|
2550  *
2551  * allows calling g_object_notify_by_pspec() to notify of property changes:
2552  *
2553  * |[<!-- language="C" -->
2554  * void
2555  * my_object_set_foo (MyObject *self, gint foo)
2556  * {
2557  *   if (self->foo != foo)
2558  *     {
2559  *       self->foo = foo;
2560  *       g_object_notify_by_pspec (G_OBJECT (self), obj_properties[PROP_FOO]);
2561  *     }
2562  *  }
2563  * ]|
2564  *
2565  * Since: 2.26
2566  */
2567
2568
2569 /**
2570  * g_object_class_install_property:
2571  * @oclass: a #GObjectClass
2572  * @property_id: the id for the new property
2573  * @pspec: the #GParamSpec for the new property
2574  *
2575  * Installs a new property.
2576  *
2577  * All properties should be installed during the class initializer.  It
2578  * is possible to install properties after that, but doing so is not
2579  * recommend, and specifically, is not guaranteed to be thread-safe vs.
2580  * use of properties on the same type on other threads.
2581  *
2582  * Note that it is possible to redefine a property in a derived class,
2583  * by installing a property with the same name. This can be useful at times,
2584  * e.g. to change the range of allowed values or the default value.
2585  */
2586
2587
2588 /**
2589  * g_object_class_list_properties:
2590  * @oclass: a #GObjectClass
2591  * @n_properties: (out): return location for the length of the returned array
2592  *
2593  * Get an array of #GParamSpec* for all properties of a class.
2594  *
2595  * Returns: (array length=n_properties) (transfer container): an array of
2596  *          #GParamSpec* which should be freed after use
2597  */
2598
2599
2600 /**
2601  * g_object_class_override_property:
2602  * @oclass: a #GObjectClass
2603  * @property_id: the new property ID
2604  * @name: the name of a property registered in a parent class or
2605  *  in an interface of this class.
2606  *
2607  * Registers @property_id as referring to a property with the name
2608  * @name in a parent class or in an interface implemented by @oclass.
2609  * This allows this class to "override" a property implementation in
2610  * a parent class or to provide the implementation of a property from
2611  * an interface.
2612  *
2613  * Internally, overriding is implemented by creating a property of type
2614  * #GParamSpecOverride; generally operations that query the properties of
2615  * the object class, such as g_object_class_find_property() or
2616  * g_object_class_list_properties() will return the overridden
2617  * property. However, in one case, the @construct_properties argument of
2618  * the @constructor virtual function, the #GParamSpecOverride is passed
2619  * instead, so that the @param_id field of the #GParamSpec will be
2620  * correct.  For virtually all uses, this makes no difference. If you
2621  * need to get the overridden property, you can call
2622  * g_param_spec_get_redirect_target().
2623  *
2624  * Since: 2.4
2625  */
2626
2627
2628 /**
2629  * g_object_connect: (skip)
2630  * @object: (type GObject.Object): a #GObject
2631  * @signal_spec: the spec for the first signal
2632  * @...: #GCallback for the first signal, followed by data for the
2633  *       first signal, followed optionally by more signal
2634  *       spec/callback/data triples, followed by %NULL
2635  *
2636  * A convenience function to connect multiple signals at once.
2637  *
2638  * The signal specs expected by this function have the form
2639  * "modifier::signal_name", where modifier can be one of the following:
2640  * * - signal: equivalent to g_signal_connect_data (..., NULL, 0)
2641  * - object-signal, object_signal: equivalent to g_signal_connect_object (..., 0)
2642  * - swapped-signal, swapped_signal: equivalent to g_signal_connect_data (..., NULL, G_CONNECT_SWAPPED)
2643  * - swapped_object_signal, swapped-object-signal: equivalent to g_signal_connect_object (..., G_CONNECT_SWAPPED)
2644  * - signal_after, signal-after: equivalent to g_signal_connect_data (..., NULL, G_CONNECT_AFTER)
2645  * - object_signal_after, object-signal-after: equivalent to g_signal_connect_object (..., G_CONNECT_AFTER)
2646  * - swapped_signal_after, swapped-signal-after: equivalent to g_signal_connect_data (..., NULL, G_CONNECT_SWAPPED | G_CONNECT_AFTER)
2647  * - swapped_object_signal_after, swapped-object-signal-after: equivalent to g_signal_connect_object (..., G_CONNECT_SWAPPED | G_CONNECT_AFTER)
2648  *
2649  * |[<!-- language="C" -->
2650  *   menu->toplevel = g_object_connect (g_object_new (GTK_TYPE_WINDOW,
2651  *                                                 "type", GTK_WINDOW_POPUP,
2652  *                                                 "child", menu,
2653  *                                                 NULL),
2654  *                                   "signal::event", gtk_menu_window_event, menu,
2655  *                                   "signal::size_request", gtk_menu_window_size_request, menu,
2656  *                                   "signal::destroy", gtk_widget_destroyed, &menu->toplevel,
2657  *                                   NULL);
2658  * ]|
2659  *
2660  * Returns: (transfer none) (type GObject.Object): @object
2661  */
2662
2663
2664 /**
2665  * g_object_disconnect: (skip)
2666  * @object: (type GObject.Object): a #GObject
2667  * @signal_spec: the spec for the first signal
2668  * @...: #GCallback for the first signal, followed by data for the first signal,
2669  *  followed optionally by more signal spec/callback/data triples,
2670  *  followed by %NULL
2671  *
2672  * A convenience function to disconnect multiple signals at once.
2673  *
2674  * The signal specs expected by this function have the form
2675  * "any_signal", which means to disconnect any signal with matching
2676  * callback and data, or "any_signal::signal_name", which only
2677  * disconnects the signal named "signal_name".
2678  */
2679
2680
2681 /**
2682  * g_object_dup_data:
2683  * @object: the #GObject to store user data on
2684  * @key: a string, naming the user data pointer
2685  * @dup_func: (allow-none): function to dup the value
2686  * @user_data: (allow-none): passed as user_data to @dup_func
2687  *
2688  * This is a variant of g_object_get_data() which returns
2689  * a 'duplicate' of the value. @dup_func defines the
2690  * meaning of 'duplicate' in this context, it could e.g.
2691  * take a reference on a ref-counted object.
2692  *
2693  * If the @key is not set on the object then @dup_func
2694  * will be called with a %NULL argument.
2695  *
2696  * Note that @dup_func is called while user data of @object
2697  * is locked.
2698  *
2699  * This function can be useful to avoid races when multiple
2700  * threads are using object data on the same key on the same
2701  * object.
2702  *
2703  * Returns: the result of calling @dup_func on the value
2704  *     associated with @key on @object, or %NULL if not set.
2705  *     If @dup_func is %NULL, the value is returned
2706  *     unmodified.
2707  * Since: 2.34
2708  */
2709
2710
2711 /**
2712  * g_object_dup_qdata:
2713  * @object: the #GObject to store user data on
2714  * @quark: a #GQuark, naming the user data pointer
2715  * @dup_func: (allow-none): function to dup the value
2716  * @user_data: (allow-none): passed as user_data to @dup_func
2717  *
2718  * This is a variant of g_object_get_qdata() which returns
2719  * a 'duplicate' of the value. @dup_func defines the
2720  * meaning of 'duplicate' in this context, it could e.g.
2721  * take a reference on a ref-counted object.
2722  *
2723  * If the @quark is not set on the object then @dup_func
2724  * will be called with a %NULL argument.
2725  *
2726  * Note that @dup_func is called while user data of @object
2727  * is locked.
2728  *
2729  * This function can be useful to avoid races when multiple
2730  * threads are using object data on the same key on the same
2731  * object.
2732  *
2733  * Returns: the result of calling @dup_func on the value
2734  *     associated with @quark on @object, or %NULL if not set.
2735  *     If @dup_func is %NULL, the value is returned
2736  *     unmodified.
2737  * Since: 2.34
2738  */
2739
2740
2741 /**
2742  * g_object_force_floating:
2743  * @object: a #GObject
2744  *
2745  * This function is intended for #GObject implementations to re-enforce
2746  * a [floating][floating-ref] object reference. Doing this is seldom
2747  * required: all #GInitiallyUnowneds are created with a floating reference
2748  * which usually just needs to be sunken by calling g_object_ref_sink().
2749  *
2750  * Since: 2.10
2751  */
2752
2753
2754 /**
2755  * g_object_freeze_notify:
2756  * @object: a #GObject
2757  *
2758  * Increases the freeze count on @object. If the freeze count is
2759  * non-zero, the emission of "notify" signals on @object is
2760  * stopped. The signals are queued until the freeze count is decreased
2761  * to zero. Duplicate notifications are squashed so that at most one
2762  * #GObject::notify signal is emitted for each property modified while the
2763  * object is frozen.
2764  *
2765  * This is necessary for accessors that modify multiple properties to prevent
2766  * premature notification while the object is still being modified.
2767  */
2768
2769
2770 /**
2771  * g_object_get: (skip)
2772  * @object: (type GObject.Object): a #GObject
2773  * @first_property_name: name of the first property to get
2774  * @...: return location for the first property, followed optionally by more
2775  *  name/return location pairs, followed by %NULL
2776  *
2777  * Gets properties of an object.
2778  *
2779  * In general, a copy is made of the property contents and the caller
2780  * is responsible for freeing the memory in the appropriate manner for
2781  * the type, for instance by calling g_free() or g_object_unref().
2782  *
2783  * Here is an example of using g_object_get() to get the contents
2784  * of three properties: an integer, a string and an object:
2785  * |[<!-- language="C" -->
2786  *  gint intval;
2787  *  gchar *strval;
2788  *  GObject *objval;
2789  *
2790  *  g_object_get (my_object,
2791  *                "int-property", &intval,
2792  *                "str-property", &strval,
2793  *                "obj-property", &objval,
2794  *                NULL);
2795  *
2796  *  // Do something with intval, strval, objval
2797  *
2798  *  g_free (strval);
2799  *  g_object_unref (objval);
2800  *  ]|
2801  */
2802
2803
2804 /**
2805  * g_object_get_data:
2806  * @object: #GObject containing the associations
2807  * @key: name of the key for that association
2808  *
2809  * Gets a named field from the objects table of associations (see g_object_set_data()).
2810  *
2811  * Returns: (transfer none): the data if found, or %NULL if no such data exists.
2812  */
2813
2814
2815 /**
2816  * g_object_get_property:
2817  * @object: a #GObject
2818  * @property_name: the name of the property to get
2819  * @value: return location for the property value
2820  *
2821  * Gets a property of an object. @value must have been initialized to the
2822  * expected type of the property (or a type to which the expected type can be
2823  * transformed) using g_value_init().
2824  *
2825  * In general, a copy is made of the property contents and the caller is
2826  * responsible for freeing the memory by calling g_value_unset().
2827  *
2828  * Note that g_object_get_property() is really intended for language
2829  * bindings, g_object_get() is much more convenient for C programming.
2830  */
2831
2832
2833 /**
2834  * g_object_get_qdata:
2835  * @object: The GObject to get a stored user data pointer from
2836  * @quark: A #GQuark, naming the user data pointer
2837  *
2838  * This function gets back user data pointers stored via
2839  * g_object_set_qdata().
2840  *
2841  * Returns: (transfer none): The user data pointer set, or %NULL
2842  */
2843
2844
2845 /**
2846  * g_object_get_valist: (skip)
2847  * @object: a #GObject
2848  * @first_property_name: name of the first property to get
2849  * @var_args: return location for the first property, followed optionally by more
2850  *  name/return location pairs, followed by %NULL
2851  *
2852  * Gets properties of an object.
2853  *
2854  * In general, a copy is made of the property contents and the caller
2855  * is responsible for freeing the memory in the appropriate manner for
2856  * the type, for instance by calling g_free() or g_object_unref().
2857  *
2858  * See g_object_get().
2859  */
2860
2861
2862 /**
2863  * g_object_interface_find_property:
2864  * @g_iface: (type GObject.TypeInterface): any interface vtable for the
2865  *  interface, or the default vtable for the interface
2866  * @property_name: name of a property to lookup.
2867  *
2868  * Find the #GParamSpec with the given name for an
2869  * interface. Generally, the interface vtable passed in as @g_iface
2870  * will be the default vtable from g_type_default_interface_ref(), or,
2871  * if you know the interface has already been loaded,
2872  * g_type_default_interface_peek().
2873  *
2874  * Since: 2.4
2875  * Returns: (transfer none): the #GParamSpec for the property of the
2876  *          interface with the name @property_name, or %NULL if no
2877  *          such property exists.
2878  */
2879
2880
2881 /**
2882  * g_object_interface_install_property:
2883  * @g_iface: (type GObject.TypeInterface): any interface vtable for the
2884  *    interface, or the default
2885  *  vtable for the interface.
2886  * @pspec: the #GParamSpec for the new property
2887  *
2888  * Add a property to an interface; this is only useful for interfaces
2889  * that are added to GObject-derived types. Adding a property to an
2890  * interface forces all objects classes with that interface to have a
2891  * compatible property. The compatible property could be a newly
2892  * created #GParamSpec, but normally
2893  * g_object_class_override_property() will be used so that the object
2894  * class only needs to provide an implementation and inherits the
2895  * property description, default value, bounds, and so forth from the
2896  * interface property.
2897  *
2898  * This function is meant to be called from the interface's default
2899  * vtable initialization function (the @class_init member of
2900  * #GTypeInfo.) It must not be called after after @class_init has
2901  * been called for any object types implementing this interface.
2902  *
2903  * Since: 2.4
2904  */
2905
2906
2907 /**
2908  * g_object_interface_list_properties:
2909  * @g_iface: (type GObject.TypeInterface): any interface vtable for the
2910  *  interface, or the default vtable for the interface
2911  * @n_properties_p: (out): location to store number of properties returned.
2912  *
2913  * Lists the properties of an interface.Generally, the interface
2914  * vtable passed in as @g_iface will be the default vtable from
2915  * g_type_default_interface_ref(), or, if you know the interface has
2916  * already been loaded, g_type_default_interface_peek().
2917  *
2918  * Since: 2.4
2919  * Returns: (array length=n_properties_p) (transfer container): a
2920  *          pointer to an array of pointers to #GParamSpec
2921  *          structures. The paramspecs are owned by GLib, but the
2922  *          array should be freed with g_free() when you are done with
2923  *          it.
2924  */
2925
2926
2927 /**
2928  * g_object_is_floating:
2929  * @object: (type GObject.Object): a #GObject
2930  *
2931  * Checks whether @object has a [floating][floating-ref] reference.
2932  *
2933  * Since: 2.10
2934  * Returns: %TRUE if @object has a floating reference
2935  */
2936
2937
2938 /**
2939  * g_object_new: (skip)
2940  * @object_type: the type id of the #GObject subtype to instantiate
2941  * @first_property_name: the name of the first property
2942  * @...: the value of the first property, followed optionally by more
2943  *  name/value pairs, followed by %NULL
2944  *
2945  * Creates a new instance of a #GObject subtype and sets its properties.
2946  *
2947  * Construction parameters (see #G_PARAM_CONSTRUCT, #G_PARAM_CONSTRUCT_ONLY)
2948  * which are not explicitly specified are set to their default values.
2949  *
2950  * Returns: (transfer full) (type GObject.Object): a new instance of
2951  *   @object_type
2952  */
2953
2954
2955 /**
2956  * g_object_new_valist: (skip)
2957  * @object_type: the type id of the #GObject subtype to instantiate
2958  * @first_property_name: the name of the first property
2959  * @var_args: the value of the first property, followed optionally by more
2960  *  name/value pairs, followed by %NULL
2961  *
2962  * Creates a new instance of a #GObject subtype and sets its properties.
2963  *
2964  * Construction parameters (see #G_PARAM_CONSTRUCT, #G_PARAM_CONSTRUCT_ONLY)
2965  * which are not explicitly specified are set to their default values.
2966  *
2967  * Returns: a new instance of @object_type
2968  */
2969
2970
2971 /**
2972  * g_object_newv: (rename-to g_object_new)
2973  * @object_type: the type id of the #GObject subtype to instantiate
2974  * @n_parameters: the length of the @parameters array
2975  * @parameters: (array length=n_parameters): an array of #GParameter
2976  *
2977  * Creates a new instance of a #GObject subtype and sets its properties.
2978  *
2979  * Construction parameters (see #G_PARAM_CONSTRUCT, #G_PARAM_CONSTRUCT_ONLY)
2980  * which are not explicitly specified are set to their default values.
2981  *
2982  * Returns: (type GObject.Object) (transfer full): a new instance of
2983  * @object_type
2984  */
2985
2986
2987 /**
2988  * g_object_notify:
2989  * @object: a #GObject
2990  * @property_name: the name of a property installed on the class of @object.
2991  *
2992  * Emits a "notify" signal for the property @property_name on @object.
2993  *
2994  * When possible, eg. when signaling a property change from within the class
2995  * that registered the property, you should use g_object_notify_by_pspec()
2996  * instead.
2997  *
2998  * Note that emission of the notify signal may be blocked with
2999  * g_object_freeze_notify(). In this case, the signal emissions are queued
3000  * and will be emitted (in reverse order) when g_object_thaw_notify() is
3001  * called.
3002  */
3003
3004
3005 /**
3006  * g_object_notify_by_pspec:
3007  * @object: a #GObject
3008  * @pspec: the #GParamSpec of a property installed on the class of @object.
3009  *
3010  * Emits a "notify" signal for the property specified by @pspec on @object.
3011  *
3012  * This function omits the property name lookup, hence it is faster than
3013  * g_object_notify().
3014  *
3015  * One way to avoid using g_object_notify() from within the
3016  * class that registered the properties, and using g_object_notify_by_pspec()
3017  * instead, is to store the GParamSpec used with
3018  * g_object_class_install_property() inside a static array, e.g.:
3019  *
3020  * |[<!-- language="C" -->
3021  *   enum
3022  *   {
3023  *     PROP_0,
3024  *     PROP_FOO,
3025  *     PROP_LAST
3026  *   };
3027  *
3028  *   static GParamSpec *properties[PROP_LAST];
3029  *
3030  *   static void
3031  *   my_object_class_init (MyObjectClass *klass)
3032  *   {
3033  *     properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
3034  *                                              0, 100,
3035  *                                              50,
3036  *                                              G_PARAM_READWRITE);
3037  *     g_object_class_install_property (gobject_class,
3038  *                                      PROP_FOO,
3039  *                                      properties[PROP_FOO]);
3040  *   }
3041  * ]|
3042  *
3043  * and then notify a change on the "foo" property with:
3044  *
3045  * |[<!-- language="C" -->
3046  *   g_object_notify_by_pspec (self, properties[PROP_FOO]);
3047  * ]|
3048  *
3049  * Since: 2.26
3050  */
3051
3052
3053 /**
3054  * g_object_ref:
3055  * @object: (type GObject.Object): a #GObject
3056  *
3057  * Increases the reference count of @object.
3058  *
3059  * Returns: (type GObject.Object) (transfer none): the same @object
3060  */
3061
3062
3063 /**
3064  * g_object_ref_sink:
3065  * @object: (type GObject.Object): a #GObject
3066  *
3067  * Increase the reference count of @object, and possibly remove the
3068  * [floating][floating-ref] reference, if @object has a floating reference.
3069  *
3070  * In other words, if the object is floating, then this call "assumes
3071  * ownership" of the floating reference, converting it to a normal
3072  * reference by clearing the floating flag while leaving the reference
3073  * count unchanged.  If the object is not floating, then this call
3074  * adds a new normal reference increasing the reference count by one.
3075  *
3076  * Since: 2.10
3077  * Returns: (type GObject.Object) (transfer none): @object
3078  */
3079
3080
3081 /**
3082  * g_object_remove_toggle_ref: (skip)
3083  * @object: a #GObject
3084  * @notify: a function to call when this reference is the
3085  *  last reference to the object, or is no longer
3086  *  the last reference.
3087  * @data: data to pass to @notify
3088  *
3089  * Removes a reference added with g_object_add_toggle_ref(). The
3090  * reference count of the object is decreased by one.
3091  *
3092  * Since: 2.8
3093  */
3094
3095
3096 /**
3097  * g_object_remove_weak_pointer: (skip)
3098  * @object: The object that is weak referenced.
3099  * @weak_pointer_location: (inout) (not optional) (nullable): The memory address
3100  *    of a pointer.
3101  *
3102  * Removes a weak reference from @object that was previously added
3103  * using g_object_add_weak_pointer(). The @weak_pointer_location has
3104  * to match the one used with g_object_add_weak_pointer().
3105  */
3106
3107
3108 /**
3109  * g_object_replace_data:
3110  * @object: the #GObject to store user data on
3111  * @key: a string, naming the user data pointer
3112  * @oldval: (allow-none): the old value to compare against
3113  * @newval: (allow-none): the new value
3114  * @destroy: (allow-none): a destroy notify for the new value
3115  * @old_destroy: (allow-none): destroy notify for the existing value
3116  *
3117  * Compares the user data for the key @key on @object with
3118  * @oldval, and if they are the same, replaces @oldval with
3119  * @newval.
3120  *
3121  * This is like a typical atomic compare-and-exchange
3122  * operation, for user data on an object.
3123  *
3124  * If the previous value was replaced then ownership of the
3125  * old value (@oldval) is passed to the caller, including
3126  * the registered destroy notify for it (passed out in @old_destroy).
3127  * Its up to the caller to free this as he wishes, which may
3128  * or may not include using @old_destroy as sometimes replacement
3129  * should not destroy the object in the normal way.
3130  *
3131  * Returns: %TRUE if the existing value for @key was replaced
3132  *  by @newval, %FALSE otherwise.
3133  * Since: 2.34
3134  */
3135
3136
3137 /**
3138  * g_object_replace_qdata:
3139  * @object: the #GObject to store user data on
3140  * @quark: a #GQuark, naming the user data pointer
3141  * @oldval: (allow-none): the old value to compare against
3142  * @newval: (allow-none): the new value
3143  * @destroy: (allow-none): a destroy notify for the new value
3144  * @old_destroy: (allow-none): destroy notify for the existing value
3145  *
3146  * Compares the user data for the key @quark on @object with
3147  * @oldval, and if they are the same, replaces @oldval with
3148  * @newval.
3149  *
3150  * This is like a typical atomic compare-and-exchange
3151  * operation, for user data on an object.
3152  *
3153  * If the previous value was replaced then ownership of the
3154  * old value (@oldval) is passed to the caller, including
3155  * the registered destroy notify for it (passed out in @old_destroy).
3156  * Its up to the caller to free this as he wishes, which may
3157  * or may not include using @old_destroy as sometimes replacement
3158  * should not destroy the object in the normal way.
3159  *
3160  * Returns: %TRUE if the existing value for @quark was replaced
3161  *  by @newval, %FALSE otherwise.
3162  * Since: 2.34
3163  */
3164
3165
3166 /**
3167  * g_object_run_dispose:
3168  * @object: a #GObject
3169  *
3170  * Releases all references to other objects. This can be used to break
3171  * reference cycles.
3172  *
3173  * This function should only be called from object system implementations.
3174  */
3175
3176
3177 /**
3178  * g_object_set: (skip)
3179  * @object: (type GObject.Object): a #GObject
3180  * @first_property_name: name of the first property to set
3181  * @...: value for the first property, followed optionally by more
3182  *  name/value pairs, followed by %NULL
3183  *
3184  * Sets properties on an object.
3185  *
3186  * Note that the "notify" signals are queued and only emitted (in
3187  * reverse order) after all properties have been set. See
3188  * g_object_freeze_notify().
3189  */
3190
3191
3192 /**
3193  * g_object_set_data:
3194  * @object: #GObject containing the associations.
3195  * @key: name of the key
3196  * @data: data to associate with that key
3197  *
3198  * Each object carries around a table of associations from
3199  * strings to pointers.  This function lets you set an association.
3200  *
3201  * If the object already had an association with that name,
3202  * the old association will be destroyed.
3203  */
3204
3205
3206 /**
3207  * g_object_set_data_full: (skip)
3208  * @object: #GObject containing the associations
3209  * @key: name of the key
3210  * @data: data to associate with that key
3211  * @destroy: function to call when the association is destroyed
3212  *
3213  * Like g_object_set_data() except it adds notification
3214  * for when the association is destroyed, either by setting it
3215  * to a different value or when the object is destroyed.
3216  *
3217  * Note that the @destroy callback is not called if @data is %NULL.
3218  */
3219
3220
3221 /**
3222  * g_object_set_property:
3223  * @object: a #GObject
3224  * @property_name: the name of the property to set
3225  * @value: the value
3226  *
3227  * Sets a property on an object.
3228  */
3229
3230
3231 /**
3232  * g_object_set_qdata: (skip)
3233  * @object: The GObject to set store a user data pointer
3234  * @quark: A #GQuark, naming the user data pointer
3235  * @data: An opaque user data pointer
3236  *
3237  * This sets an opaque, named pointer on an object.
3238  * The name is specified through a #GQuark (retrived e.g. via
3239  * g_quark_from_static_string()), and the pointer
3240  * can be gotten back from the @object with g_object_get_qdata()
3241  * until the @object is finalized.
3242  * Setting a previously set user data pointer, overrides (frees)
3243  * the old pointer set, using #NULL as pointer essentially
3244  * removes the data stored.
3245  */
3246
3247
3248 /**
3249  * g_object_set_qdata_full: (skip)
3250  * @object: The GObject to set store a user data pointer
3251  * @quark: A #GQuark, naming the user data pointer
3252  * @data: An opaque user data pointer
3253  * @destroy: Function to invoke with @data as argument, when @data
3254  *           needs to be freed
3255  *
3256  * This function works like g_object_set_qdata(), but in addition,
3257  * a void (*destroy) (gpointer) function may be specified which is
3258  * called with @data as argument when the @object is finalized, or
3259  * the data is being overwritten by a call to g_object_set_qdata()
3260  * with the same @quark.
3261  */
3262
3263
3264 /**
3265  * g_object_set_valist: (skip)
3266  * @object: a #GObject
3267  * @first_property_name: name of the first property to set
3268  * @var_args: value for the first property, followed optionally by more
3269  *  name/value pairs, followed by %NULL
3270  *
3271  * Sets properties on an object.
3272  */
3273
3274
3275 /**
3276  * g_object_steal_data:
3277  * @object: #GObject containing the associations
3278  * @key: name of the key
3279  *
3280  * Remove a specified datum from the object's data associations,
3281  * without invoking the association's destroy handler.
3282  *
3283  * Returns: (transfer full): the data if found, or %NULL if no such data exists.
3284  */
3285
3286
3287 /**
3288  * g_object_steal_qdata:
3289  * @object: The GObject to get a stored user data pointer from
3290  * @quark: A #GQuark, naming the user data pointer
3291  *
3292  * This function gets back user data pointers stored via
3293  * g_object_set_qdata() and removes the @data from object
3294  * without invoking its destroy() function (if any was
3295  * set).
3296  * Usually, calling this function is only required to update
3297  * user data pointers with a destroy notifier, for example:
3298  * |[<!-- language="C" -->
3299  * void
3300  * object_add_to_user_list (GObject     *object,
3301  *                          const gchar *new_string)
3302  * {
3303  *   // the quark, naming the object data
3304  *   GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
3305  *   // retrive the old string list
3306  *   GList *list = g_object_steal_qdata (object, quark_string_list);
3307  *
3308  *   // prepend new string
3309  *   list = g_list_prepend (list, g_strdup (new_string));
3310  *   // this changed 'list', so we need to set it again
3311  *   g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
3312  * }
3313  * static void
3314  * free_string_list (gpointer data)
3315  * {
3316  *   GList *node, *list = data;
3317  *
3318  *   for (node = list; node; node = node->next)
3319  *     g_free (node->data);
3320  *   g_list_free (list);
3321  * }
3322  * ]|
3323  * Using g_object_get_qdata() in the above example, instead of
3324  * g_object_steal_qdata() would have left the destroy function set,
3325  * and thus the partial string list would have been freed upon
3326  * g_object_set_qdata_full().
3327  *
3328  * Returns: (transfer full): The user data pointer set, or %NULL
3329  */
3330
3331
3332 /**
3333  * g_object_thaw_notify:
3334  * @object: a #GObject
3335  *
3336  * Reverts the effect of a previous call to
3337  * g_object_freeze_notify(). The freeze count is decreased on @object
3338  * and when it reaches zero, queued "notify" signals are emitted.
3339  *
3340  * Duplicate notifications for each property are squashed so that at most one
3341  * #GObject::notify signal is emitted for each property, in the reverse order
3342  * in which they have been queued.
3343  *
3344  * It is an error to call this function when the freeze count is zero.
3345  */
3346
3347
3348 /**
3349  * g_object_unref:
3350  * @object: (type GObject.Object): a #GObject
3351  *
3352  * Decreases the reference count of @object. When its reference count
3353  * drops to 0, the object is finalized (i.e. its memory is freed).
3354  *
3355  * If the pointer to the #GObject may be reused in future (for example, if it is
3356  * an instance variable of another object), it is recommended to clear the
3357  * pointer to %NULL rather than retain a dangling pointer to a potentially
3358  * invalid #GObject instance. Use g_clear_object() for this.
3359  */
3360
3361
3362 /**
3363  * g_object_watch_closure:
3364  * @object: GObject restricting lifetime of @closure
3365  * @closure: GClosure to watch
3366  *
3367  * This function essentially limits the life time of the @closure to
3368  * the life time of the object. That is, when the object is finalized,
3369  * the @closure is invalidated by calling g_closure_invalidate() on
3370  * it, in order to prevent invocations of the closure with a finalized
3371  * (nonexisting) object. Also, g_object_ref() and g_object_unref() are
3372  * added as marshal guards to the @closure, to ensure that an extra
3373  * reference count is held on @object during invocation of the
3374  * @closure.  Usually, this function will be called on closures that
3375  * use this @object as closure data.
3376  */
3377
3378
3379 /**
3380  * g_object_weak_ref: (skip)
3381  * @object: #GObject to reference weakly
3382  * @notify: callback to invoke before the object is freed
3383  * @data: extra data to pass to notify
3384  *
3385  * Adds a weak reference callback to an object. Weak references are
3386  * used for notification when an object is finalized. They are called
3387  * "weak references" because they allow you to safely hold a pointer
3388  * to an object without calling g_object_ref() (g_object_ref() adds a
3389  * strong reference, that is, forces the object to stay alive).
3390  *
3391  * Note that the weak references created by this method are not
3392  * thread-safe: they cannot safely be used in one thread if the
3393  * object's last g_object_unref() might happen in another thread.
3394  * Use #GWeakRef if thread-safety is required.
3395  */
3396
3397
3398 /**
3399  * g_object_weak_unref: (skip)
3400  * @object: #GObject to remove a weak reference from
3401  * @notify: callback to search for
3402  * @data: data to search for
3403  *
3404  * Removes a weak reference callback to an object.
3405  */
3406
3407
3408 /**
3409  * g_param_spec_boolean:
3410  * @name: canonical name of the property specified
3411  * @nick: nick name for the property specified
3412  * @blurb: description of the property specified
3413  * @default_value: default value for the property specified
3414  * @flags: flags for the property specified
3415  *
3416  * Creates a new #GParamSpecBoolean instance specifying a %G_TYPE_BOOLEAN
3417  * property. In many cases, it may be more appropriate to use an enum with
3418  * g_param_spec_enum(), both to improve code clarity by using explicitly named
3419  * values, and to allow for more values to be added in future without breaking
3420  * API.
3421  *
3422  * See g_param_spec_internal() for details on property names.
3423  *
3424  * Returns: (transfer full): a newly created parameter specification
3425  */
3426
3427
3428 /**
3429  * g_param_spec_boxed:
3430  * @name: canonical name of the property specified
3431  * @nick: nick name for the property specified
3432  * @blurb: description of the property specified
3433  * @boxed_type: %G_TYPE_BOXED derived type of this property
3434  * @flags: flags for the property specified
3435  *
3436  * Creates a new #GParamSpecBoxed instance specifying a %G_TYPE_BOXED
3437  * derived property.
3438  *
3439  * See g_param_spec_internal() for details on property names.
3440  *
3441  * Returns: (transfer full): a newly created parameter specification
3442  */
3443
3444
3445 /**
3446  * g_param_spec_char:
3447  * @name: canonical name of the property specified
3448  * @nick: nick name for the property specified
3449  * @blurb: description of the property specified
3450  * @minimum: minimum value for the property specified
3451  * @maximum: maximum value for the property specified
3452  * @default_value: default value for the property specified
3453  * @flags: flags for the property specified
3454  *
3455  * Creates a new #GParamSpecChar instance specifying a %G_TYPE_CHAR property.
3456  *
3457  * Returns: (transfer full): a newly created parameter specification
3458  */
3459
3460
3461 /**
3462  * g_param_spec_double:
3463  * @name: canonical name of the property specified
3464  * @nick: nick name for the property specified
3465  * @blurb: description of the property specified
3466  * @minimum: minimum value for the property specified
3467  * @maximum: maximum value for the property specified
3468  * @default_value: default value for the property specified
3469  * @flags: flags for the property specified
3470  *
3471  * Creates a new #GParamSpecDouble instance specifying a %G_TYPE_DOUBLE
3472  * property.
3473  *
3474  * See g_param_spec_internal() for details on property names.
3475  *
3476  * Returns: (transfer full): a newly created parameter specification
3477  */
3478
3479
3480 /**
3481  * g_param_spec_enum:
3482  * @name: canonical name of the property specified
3483  * @nick: nick name for the property specified
3484  * @blurb: description of the property specified
3485  * @enum_type: a #GType derived from %G_TYPE_ENUM
3486  * @default_value: default value for the property specified
3487  * @flags: flags for the property specified
3488  *
3489  * Creates a new #GParamSpecEnum instance specifying a %G_TYPE_ENUM
3490  * property.
3491  *
3492  * See g_param_spec_internal() for details on property names.
3493  *
3494  * Returns: (transfer full): a newly created parameter specification
3495  */
3496
3497
3498 /**
3499  * g_param_spec_flags:
3500  * @name: canonical name of the property specified
3501  * @nick: nick name for the property specified
3502  * @blurb: description of the property specified
3503  * @flags_type: a #GType derived from %G_TYPE_FLAGS
3504  * @default_value: default value for the property specified
3505  * @flags: flags for the property specified
3506  *
3507  * Creates a new #GParamSpecFlags instance specifying a %G_TYPE_FLAGS
3508  * property.
3509  *
3510  * See g_param_spec_internal() for details on property names.
3511  *
3512  * Returns: (transfer full): a newly created parameter specification
3513  */
3514
3515
3516 /**
3517  * g_param_spec_float:
3518  * @name: canonical name of the property specified
3519  * @nick: nick name for the property specified
3520  * @blurb: description of the property specified
3521  * @minimum: minimum value for the property specified
3522  * @maximum: maximum value for the property specified
3523  * @default_value: default value for the property specified
3524  * @flags: flags for the property specified
3525  *
3526  * Creates a new #GParamSpecFloat instance specifying a %G_TYPE_FLOAT property.
3527  *
3528  * See g_param_spec_internal() for details on property names.
3529  *
3530  * Returns: (transfer full): a newly created parameter specification
3531  */
3532
3533
3534 /**
3535  * g_param_spec_get_blurb:
3536  * @pspec: a valid #GParamSpec
3537  *
3538  * Get the short description of a #GParamSpec.
3539  *
3540  * Returns: the short description of @pspec.
3541  */
3542
3543
3544 /**
3545  * g_param_spec_get_default_value:
3546  * @pspec: a #GParamSpec
3547  *
3548  * Gets the default value of @pspec as a pointer to a #GValue.
3549  *
3550  * The #GValue will remain value for the life of @pspec.
3551  *
3552  * Returns: a pointer to a #GValue which must not be modified
3553  * Since: 2.38
3554  */
3555
3556
3557 /**
3558  * g_param_spec_get_name:
3559  * @pspec: a valid #GParamSpec
3560  *
3561  * Get the name of a #GParamSpec.
3562  *
3563  * The name is always an "interned" string (as per g_intern_string()).
3564  * This allows for pointer-value comparisons.
3565  *
3566  * Returns: the name of @pspec.
3567  */
3568
3569
3570 /**
3571  * g_param_spec_get_name_quark:
3572  * @pspec: a #GParamSpec
3573  *
3574  * Gets the GQuark for the name.
3575  *
3576  * Returns: the GQuark for @pspec->name.
3577  * Since: 2.46
3578  */
3579
3580
3581 /**
3582  * g_param_spec_get_nick:
3583  * @pspec: a valid #GParamSpec
3584  *
3585  * Get the nickname of a #GParamSpec.
3586  *
3587  * Returns: the nickname of @pspec.
3588  */
3589
3590
3591 /**
3592  * g_param_spec_get_qdata:
3593  * @pspec: a valid #GParamSpec
3594  * @quark: a #GQuark, naming the user data pointer
3595  *
3596  * Gets back user data pointers stored via g_param_spec_set_qdata().
3597  *
3598  * Returns: (transfer none): the user data pointer set, or %NULL
3599  */
3600
3601
3602 /**
3603  * g_param_spec_get_redirect_target:
3604  * @pspec: a #GParamSpec
3605  *
3606  * If the paramspec redirects operations to another paramspec,
3607  * returns that paramspec. Redirect is used typically for
3608  * providing a new implementation of a property in a derived
3609  * type while preserving all the properties from the parent
3610  * type. Redirection is established by creating a property
3611  * of type #GParamSpecOverride. See g_object_class_override_property()
3612  * for an example of the use of this capability.
3613  *
3614  * Since: 2.4
3615  * Returns: (transfer none): paramspec to which requests on this
3616  *          paramspec should be redirected, or %NULL if none.
3617  */
3618
3619
3620 /**
3621  * g_param_spec_gtype:
3622  * @name: canonical name of the property specified
3623  * @nick: nick name for the property specified
3624  * @blurb: description of the property specified
3625  * @is_a_type: a #GType whose subtypes are allowed as values
3626  *  of the property (use %G_TYPE_NONE for any type)
3627  * @flags: flags for the property specified
3628  *
3629  * Creates a new #GParamSpecGType instance specifying a
3630  * %G_TYPE_GTYPE property.
3631  *
3632  * See g_param_spec_internal() for details on property names.
3633  *
3634  * Since: 2.10
3635  * Returns: (transfer full): a newly created parameter specification
3636  */
3637
3638
3639 /**
3640  * g_param_spec_int:
3641  * @name: canonical name of the property specified
3642  * @nick: nick name for the property specified
3643  * @blurb: description of the property specified
3644  * @minimum: minimum value for the property specified
3645  * @maximum: maximum value for the property specified
3646  * @default_value: default value for the property specified
3647  * @flags: flags for the property specified
3648  *
3649  * Creates a new #GParamSpecInt instance specifying a %G_TYPE_INT property.
3650  *
3651  * See g_param_spec_internal() for details on property names.
3652  *
3653  * Returns: (transfer full): a newly created parameter specification
3654  */
3655
3656
3657 /**
3658  * g_param_spec_int64:
3659  * @name: canonical name of the property specified
3660  * @nick: nick name for the property specified
3661  * @blurb: description of the property specified
3662  * @minimum: minimum value for the property specified
3663  * @maximum: maximum value for the property specified
3664  * @default_value: default value for the property specified
3665  * @flags: flags for the property specified
3666  *
3667  * Creates a new #GParamSpecInt64 instance specifying a %G_TYPE_INT64 property.
3668  *
3669  * See g_param_spec_internal() for details on property names.
3670  *
3671  * Returns: (transfer full): a newly created parameter specification
3672  */
3673
3674
3675 /**
3676  * g_param_spec_internal: (skip)
3677  * @param_type: the #GType for the property; must be derived from #G_TYPE_PARAM
3678  * @name: the canonical name of the property
3679  * @nick: the nickname of the property
3680  * @blurb: a short description of the property
3681  * @flags: a combination of #GParamFlags
3682  *
3683  * Creates a new #GParamSpec instance.
3684  *
3685  * A property name consists of segments consisting of ASCII letters and
3686  * digits, separated by either the '-' or '_' character. The first
3687  * character of a property name must be a letter. Names which violate these
3688  * rules lead to undefined behaviour.
3689  *
3690  * When creating and looking up a #GParamSpec, either separator can be
3691  * used, but they cannot be mixed. Using '-' is considerably more
3692  * efficient and in fact required when using property names as detail
3693  * strings for signals.
3694  *
3695  * Beyond the name, #GParamSpecs have two more descriptive
3696  * strings associated with them, the @nick, which should be suitable
3697  * for use as a label for the property in a property editor, and the
3698  * @blurb, which should be a somewhat longer description, suitable for
3699  * e.g. a tooltip. The @nick and @blurb should ideally be localized.
3700  *
3701  * Returns: (type GObject.ParamSpec): a newly allocated #GParamSpec instance
3702  */
3703
3704
3705 /**
3706  * g_param_spec_long:
3707  * @name: canonical name of the property specified
3708  * @nick: nick name for the property specified
3709  * @blurb: description of the property specified
3710  * @minimum: minimum value for the property specified
3711  * @maximum: maximum value for the property specified
3712  * @default_value: default value for the property specified
3713  * @flags: flags for the property specified
3714  *
3715  * Creates a new #GParamSpecLong instance specifying a %G_TYPE_LONG property.
3716  *
3717  * See g_param_spec_internal() for details on property names.
3718  *
3719  * Returns: (transfer full): a newly created parameter specification
3720  */
3721
3722
3723 /**
3724  * g_param_spec_object:
3725  * @name: canonical name of the property specified
3726  * @nick: nick name for the property specified
3727  * @blurb: description of the property specified
3728  * @object_type: %G_TYPE_OBJECT derived type of this property
3729  * @flags: flags for the property specified
3730  *
3731  * Creates a new #GParamSpecBoxed instance specifying a %G_TYPE_OBJECT
3732  * derived property.
3733  *
3734  * See g_param_spec_internal() for details on property names.
3735  *
3736  * Returns: (transfer full): a newly created parameter specification
3737  */
3738
3739
3740 /**
3741  * g_param_spec_override: (skip)
3742  * @name: the name of the property.
3743  * @overridden: The property that is being overridden
3744  *
3745  * Creates a new property of type #GParamSpecOverride. This is used
3746  * to direct operations to another paramspec, and will not be directly
3747  * useful unless you are implementing a new base type similar to GObject.
3748  *
3749  * Since: 2.4
3750  * Returns: the newly created #GParamSpec
3751  */
3752
3753
3754 /**
3755  * g_param_spec_param:
3756  * @name: canonical name of the property specified
3757  * @nick: nick name for the property specified
3758  * @blurb: description of the property specified
3759  * @param_type: a #GType derived from %G_TYPE_PARAM
3760  * @flags: flags for the property specified
3761  *
3762  * Creates a new #GParamSpecParam instance specifying a %G_TYPE_PARAM
3763  * property.
3764  *
3765  * See g_param_spec_internal() for details on property names.
3766  *
3767  * Returns: (transfer full): a newly created parameter specification
3768  */
3769
3770
3771 /**
3772  * g_param_spec_pointer:
3773  * @name: canonical name of the property specified
3774  * @nick: nick name for the property specified
3775  * @blurb: description of the property specified
3776  * @flags: flags for the property specified
3777  *
3778  * Creates a new #GParamSpecPointer instance specifying a pointer property.
3779  * Where possible, it is better to use g_param_spec_object() or
3780  * g_param_spec_boxed() to expose memory management information.
3781  *
3782  * See g_param_spec_internal() for details on property names.
3783  *
3784  * Returns: (transfer full): a newly created parameter specification
3785  */
3786
3787
3788 /**
3789  * g_param_spec_pool_insert:
3790  * @pool: a #GParamSpecPool.
3791  * @pspec: the #GParamSpec to insert
3792  * @owner_type: a #GType identifying the owner of @pspec
3793  *
3794  * Inserts a #GParamSpec in the pool.
3795  */
3796
3797
3798 /**
3799  * g_param_spec_pool_list:
3800  * @pool: a #GParamSpecPool
3801  * @owner_type: the owner to look for
3802  * @n_pspecs_p: (out): return location for the length of the returned array
3803  *
3804  * Gets an array of all #GParamSpecs owned by @owner_type in
3805  * the pool.
3806  *
3807  * Returns: (array length=n_pspecs_p) (transfer container): a newly
3808  *          allocated array containing pointers to all #GParamSpecs
3809  *          owned by @owner_type in the pool
3810  */
3811
3812
3813 /**
3814  * g_param_spec_pool_list_owned:
3815  * @pool: a #GParamSpecPool
3816  * @owner_type: the owner to look for
3817  *
3818  * Gets an #GList of all #GParamSpecs owned by @owner_type in
3819  * the pool.
3820  *
3821  * Returns: (transfer container) (element-type GObject.ParamSpec): a
3822  *          #GList of all #GParamSpecs owned by @owner_type in
3823  *          the pool#GParamSpecs.
3824  */
3825
3826
3827 /**
3828  * g_param_spec_pool_lookup:
3829  * @pool: a #GParamSpecPool
3830  * @param_name: the name to look for
3831  * @owner_type: the owner to look for
3832  * @walk_ancestors: If %TRUE, also try to find a #GParamSpec with @param_name
3833  *  owned by an ancestor of @owner_type.
3834  *
3835  * Looks up a #GParamSpec in the pool.
3836  *
3837  * Returns: (transfer none): The found #GParamSpec, or %NULL if no
3838  * matching #GParamSpec was found.
3839  */
3840
3841
3842 /**
3843  * g_param_spec_pool_new:
3844  * @type_prefixing: Whether the pool will support type-prefixed property names.
3845  *
3846  * Creates a new #GParamSpecPool.
3847  *
3848  * If @type_prefixing is %TRUE, lookups in the newly created pool will
3849  * allow to specify the owner as a colon-separated prefix of the
3850  * property name, like "GtkContainer:border-width". This feature is
3851  * deprecated, so you should always set @type_prefixing to %FALSE.
3852  *
3853  * Returns: (transfer none): a newly allocated #GParamSpecPool.
3854  */
3855
3856
3857 /**
3858  * g_param_spec_pool_remove:
3859  * @pool: a #GParamSpecPool
3860  * @pspec: the #GParamSpec to remove
3861  *
3862  * Removes a #GParamSpec from the pool.
3863  */
3864
3865
3866 /**
3867  * g_param_spec_ref: (skip)
3868  * @pspec: a valid #GParamSpec
3869  *
3870  * Increments the reference count of @pspec.
3871  *
3872  * Returns: the #GParamSpec that was passed into this function
3873  */
3874
3875
3876 /**
3877  * g_param_spec_ref_sink: (skip)
3878  * @pspec: a valid #GParamSpec
3879  *
3880  * Convenience function to ref and sink a #GParamSpec.
3881  *
3882  * Since: 2.10
3883  * Returns: the #GParamSpec that was passed into this function
3884  */
3885
3886
3887 /**
3888  * g_param_spec_set_qdata:
3889  * @pspec: the #GParamSpec to set store a user data pointer
3890  * @quark: a #GQuark, naming the user data pointer
3891  * @data: an opaque user data pointer
3892  *
3893  * Sets an opaque, named pointer on a #GParamSpec. The name is
3894  * specified through a #GQuark (retrieved e.g. via
3895  * g_quark_from_static_string()), and the pointer can be gotten back
3896  * from the @pspec with g_param_spec_get_qdata().  Setting a
3897  * previously set user data pointer, overrides (frees) the old pointer
3898  * set, using %NULL as pointer essentially removes the data stored.
3899  */
3900
3901
3902 /**
3903  * g_param_spec_set_qdata_full: (skip)
3904  * @pspec: the #GParamSpec to set store a user data pointer
3905  * @quark: a #GQuark, naming the user data pointer
3906  * @data: an opaque user data pointer
3907  * @destroy: function to invoke with @data as argument, when @data needs to
3908  *  be freed
3909  *
3910  * This function works like g_param_spec_set_qdata(), but in addition,
3911  * a `void (*destroy) (gpointer)` function may be
3912  * specified which is called with @data as argument when the @pspec is
3913  * finalized, or the data is being overwritten by a call to
3914  * g_param_spec_set_qdata() with the same @quark.
3915  */
3916
3917
3918 /**
3919  * g_param_spec_sink:
3920  * @pspec: a valid #GParamSpec
3921  *
3922  * The initial reference count of a newly created #GParamSpec is 1,
3923  * even though no one has explicitly called g_param_spec_ref() on it
3924  * yet. So the initial reference count is flagged as "floating", until
3925  * someone calls `g_param_spec_ref (pspec); g_param_spec_sink
3926  * (pspec);` in sequence on it, taking over the initial
3927  * reference count (thus ending up with a @pspec that has a reference
3928  * count of 1 still, but is not flagged "floating" anymore).
3929  */
3930
3931
3932 /**
3933  * g_param_spec_steal_qdata:
3934  * @pspec: the #GParamSpec to get a stored user data pointer from
3935  * @quark: a #GQuark, naming the user data pointer
3936  *
3937  * Gets back user data pointers stored via g_param_spec_set_qdata()
3938  * and removes the @data from @pspec without invoking its destroy()
3939  * function (if any was set).  Usually, calling this function is only
3940  * required to update user data pointers with a destroy notifier.
3941  *
3942  * Returns: (transfer none): the user data pointer set, or %NULL
3943  */
3944
3945
3946 /**
3947  * g_param_spec_string:
3948  * @name: canonical name of the property specified
3949  * @nick: nick name for the property specified
3950  * @blurb: description of the property specified
3951  * @default_value: (nullable): default value for the property specified
3952  * @flags: flags for the property specified
3953  *
3954  * Creates a new #GParamSpecString instance.
3955  *
3956  * See g_param_spec_internal() for details on property names.
3957  *
3958  * Returns: (transfer full): a newly created parameter specification
3959  */
3960
3961
3962 /**
3963  * g_param_spec_uchar:
3964  * @name: canonical name of the property specified
3965  * @nick: nick name for the property specified
3966  * @blurb: description of the property specified
3967  * @minimum: minimum value for the property specified
3968  * @maximum: maximum value for the property specified
3969  * @default_value: default value for the property specified
3970  * @flags: flags for the property specified
3971  *
3972  * Creates a new #GParamSpecUChar instance specifying a %G_TYPE_UCHAR property.
3973  *
3974  * Returns: (transfer full): a newly created parameter specification
3975  */
3976
3977
3978 /**
3979  * g_param_spec_uint:
3980  * @name: canonical name of the property specified
3981  * @nick: nick name for the property specified
3982  * @blurb: description of the property specified
3983  * @minimum: minimum value for the property specified
3984  * @maximum: maximum value for the property specified
3985  * @default_value: default value for the property specified
3986  * @flags: flags for the property specified
3987  *
3988  * Creates a new #GParamSpecUInt instance specifying a %G_TYPE_UINT property.
3989  *
3990  * See g_param_spec_internal() for details on property names.
3991  *
3992  * Returns: (transfer full): a newly created parameter specification
3993  */
3994
3995
3996 /**
3997  * g_param_spec_uint64:
3998  * @name: canonical name of the property specified
3999  * @nick: nick name for the property specified
4000  * @blurb: description of the property specified
4001  * @minimum: minimum value for the property specified
4002  * @maximum: maximum value for the property specified
4003  * @default_value: default value for the property specified
4004  * @flags: flags for the property specified
4005  *
4006  * Creates a new #GParamSpecUInt64 instance specifying a %G_TYPE_UINT64
4007  * property.
4008  *
4009  * See g_param_spec_internal() for details on property names.
4010  *
4011  * Returns: (transfer full): a newly created parameter specification
4012  */
4013
4014
4015 /**
4016  * g_param_spec_ulong:
4017  * @name: canonical name of the property specified
4018  * @nick: nick name for the property specified
4019  * @blurb: description of the property specified
4020  * @minimum: minimum value for the property specified
4021  * @maximum: maximum value for the property specified
4022  * @default_value: default value for the property specified
4023  * @flags: flags for the property specified
4024  *
4025  * Creates a new #GParamSpecULong instance specifying a %G_TYPE_ULONG
4026  * property.
4027  *
4028  * See g_param_spec_internal() for details on property names.
4029  *
4030  * Returns: (transfer full): a newly created parameter specification
4031  */
4032
4033
4034 /**
4035  * g_param_spec_unichar:
4036  * @name: canonical name of the property specified
4037  * @nick: nick name for the property specified
4038  * @blurb: description of the property specified
4039  * @default_value: default value for the property specified
4040  * @flags: flags for the property specified
4041  *
4042  * Creates a new #GParamSpecUnichar instance specifying a %G_TYPE_UINT
4043  * property. #GValue structures for this property can be accessed with
4044  * g_value_set_uint() and g_value_get_uint().
4045  *
4046  * See g_param_spec_internal() for details on property names.
4047  *
4048  * Returns: (transfer full): a newly created parameter specification
4049  */
4050
4051
4052 /**
4053  * g_param_spec_unref: (skip)
4054  * @pspec: a valid #GParamSpec
4055  *
4056  * Decrements the reference count of a @pspec.
4057  */
4058
4059
4060 /**
4061  * g_param_spec_value_array: (skip)
4062  * @name: canonical name of the property specified
4063  * @nick: nick name for the property specified
4064  * @blurb: description of the property specified
4065  * @element_spec: a #GParamSpec describing the elements contained in
4066  *  arrays of this property, may be %NULL
4067  * @flags: flags for the property specified
4068  *
4069  * Creates a new #GParamSpecValueArray instance specifying a
4070  * %G_TYPE_VALUE_ARRAY property. %G_TYPE_VALUE_ARRAY is a
4071  * %G_TYPE_BOXED type, as such, #GValue structures for this property
4072  * can be accessed with g_value_set_boxed() and g_value_get_boxed().
4073  *
4074  * See g_param_spec_internal() for details on property names.
4075  *
4076  * Returns: a newly created parameter specification
4077  */
4078
4079
4080 /**
4081  * g_param_spec_variant:
4082  * @name: canonical name of the property specified
4083  * @nick: nick name for the property specified
4084  * @blurb: description of the property specified
4085  * @type: a #GVariantType
4086  * @default_value: (allow-none) (transfer full): a #GVariant of type @type to
4087  *                 use as the default value, or %NULL
4088  * @flags: flags for the property specified
4089  *
4090  * Creates a new #GParamSpecVariant instance specifying a #GVariant
4091  * property.
4092  *
4093  * If @default_value is floating, it is consumed.
4094  *
4095  * See g_param_spec_internal() for details on property names.
4096  *
4097  * Returns: (transfer full): the newly created #GParamSpec
4098  * Since: 2.26
4099  */
4100
4101
4102 /**
4103  * g_param_type_register_static:
4104  * @name: 0-terminated string used as the name of the new #GParamSpec type.
4105  * @pspec_info: The #GParamSpecTypeInfo for this #GParamSpec type.
4106  *
4107  * Registers @name as the name of a new static type derived from
4108  * #G_TYPE_PARAM. The type system uses the information contained in
4109  * the #GParamSpecTypeInfo structure pointed to by @info to manage the
4110  * #GParamSpec type and its instances.
4111  *
4112  * Returns: The new type identifier.
4113  */
4114
4115
4116 /**
4117  * g_param_value_convert:
4118  * @pspec: a valid #GParamSpec
4119  * @src_value: souce #GValue
4120  * @dest_value: destination #GValue of correct type for @pspec
4121  * @strict_validation: %TRUE requires @dest_value to conform to @pspec
4122  * without modifications
4123  *
4124  * Transforms @src_value into @dest_value if possible, and then
4125  * validates @dest_value, in order for it to conform to @pspec.  If
4126  * @strict_validation is %TRUE this function will only succeed if the
4127  * transformed @dest_value complied to @pspec without modifications.
4128  *
4129  * See also g_value_type_transformable(), g_value_transform() and
4130  * g_param_value_validate().
4131  *
4132  * Returns: %TRUE if transformation and validation were successful,
4133  *  %FALSE otherwise and @dest_value is left untouched.
4134  */
4135
4136
4137 /**
4138  * g_param_value_defaults:
4139  * @pspec: a valid #GParamSpec
4140  * @value: a #GValue of correct type for @pspec
4141  *
4142  * Checks whether @value contains the default value as specified in @pspec.
4143  *
4144  * Returns: whether @value contains the canonical default for this @pspec
4145  */
4146
4147
4148 /**
4149  * g_param_value_set_default:
4150  * @pspec: a valid #GParamSpec
4151  * @value: a #GValue of correct type for @pspec
4152  *
4153  * Sets @value to its default value as specified in @pspec.
4154  */
4155
4156
4157 /**
4158  * g_param_value_validate:
4159  * @pspec: a valid #GParamSpec
4160  * @value: a #GValue of correct type for @pspec
4161  *
4162  * Ensures that the contents of @value comply with the specifications
4163  * set out by @pspec. For example, a #GParamSpecInt might require
4164  * that integers stored in @value may not be smaller than -42 and not be
4165  * greater than +42. If @value contains an integer outside of this range,
4166  * it is modified accordingly, so the resulting value will fit into the
4167  * range -42 .. +42.
4168  *
4169  * Returns: whether modifying @value was necessary to ensure validity
4170  */
4171
4172
4173 /**
4174  * g_param_values_cmp:
4175  * @pspec: a valid #GParamSpec
4176  * @value1: a #GValue of correct type for @pspec
4177  * @value2: a #GValue of correct type for @pspec
4178  *
4179  * Compares @value1 with @value2 according to @pspec, and return -1, 0 or +1,
4180  * if @value1 is found to be less than, equal to or greater than @value2,
4181  * respectively.
4182  *
4183  * Returns: -1, 0 or +1, for a less than, equal to or greater than result
4184  */
4185
4186
4187 /**
4188  * g_pointer_type_register_static:
4189  * @name: the name of the new pointer type.
4190  *
4191  * Creates a new %G_TYPE_POINTER derived type id for a new
4192  * pointer type with name @name.
4193  *
4194  * Returns: a new %G_TYPE_POINTER derived type id for @name.
4195  */
4196
4197
4198 /**
4199  * g_signal_accumulator_first_wins:
4200  * @ihint: standard #GSignalAccumulator parameter
4201  * @return_accu: standard #GSignalAccumulator parameter
4202  * @handler_return: standard #GSignalAccumulator parameter
4203  * @dummy: standard #GSignalAccumulator parameter
4204  *
4205  * A predefined #GSignalAccumulator for signals intended to be used as a
4206  * hook for application code to provide a particular value.  Usually
4207  * only one such value is desired and multiple handlers for the same
4208  * signal don't make much sense (except for the case of the default
4209  * handler defined in the class structure, in which case you will
4210  * usually want the signal connection to override the class handler).
4211  *
4212  * This accumulator will use the return value from the first signal
4213  * handler that is run as the return value for the signal and not run
4214  * any further handlers (ie: the first handler "wins").
4215  *
4216  * Returns: standard #GSignalAccumulator result
4217  * Since: 2.28
4218  */
4219
4220
4221 /**
4222  * g_signal_accumulator_true_handled:
4223  * @ihint: standard #GSignalAccumulator parameter
4224  * @return_accu: standard #GSignalAccumulator parameter
4225  * @handler_return: standard #GSignalAccumulator parameter
4226  * @dummy: standard #GSignalAccumulator parameter
4227  *
4228  * A predefined #GSignalAccumulator for signals that return a
4229  * boolean values. The behavior that this accumulator gives is
4230  * that a return of %TRUE stops the signal emission: no further
4231  * callbacks will be invoked, while a return of %FALSE allows
4232  * the emission to continue. The idea here is that a %TRUE return
4233  * indicates that the callback handled the signal, and no further
4234  * handling is needed.
4235  *
4236  * Since: 2.4
4237  * Returns: standard #GSignalAccumulator result
4238  */
4239
4240
4241 /**
4242  * g_signal_add_emission_hook:
4243  * @signal_id: the signal identifier, as returned by g_signal_lookup().
4244  * @detail: the detail on which to call the hook.
4245  * @hook_func: a #GSignalEmissionHook function.
4246  * @hook_data: user data for @hook_func.
4247  * @data_destroy: a #GDestroyNotify for @hook_data.
4248  *
4249  * Adds an emission hook for a signal, which will get called for any emission
4250  * of that signal, independent of the instance. This is possible only
4251  * for signals which don't have #G_SIGNAL_NO_HOOKS flag set.
4252  *
4253  * Returns: the hook id, for later use with g_signal_remove_emission_hook().
4254  */
4255
4256
4257 /**
4258  * g_signal_chain_from_overridden:
4259  * @instance_and_params: (array): the argument list of the signal emission.
4260  *  The first element in the array is a #GValue for the instance the signal
4261  *  is being emitted on. The rest are any arguments to be passed to the signal.
4262  * @return_value: Location for the return value.
4263  *
4264  * Calls the original class closure of a signal. This function should only
4265  * be called from an overridden class closure; see
4266  * g_signal_override_class_closure() and
4267  * g_signal_override_class_handler().
4268  */
4269
4270
4271 /**
4272  * g_signal_chain_from_overridden_handler: (skip)
4273  * @instance: (type GObject.TypeInstance): the instance the signal is being
4274  *    emitted on.
4275  * @...: parameters to be passed to the parent class closure, followed by a
4276  *  location for the return value. If the return type of the signal
4277  *  is #G_TYPE_NONE, the return value location can be omitted.
4278  *
4279  * Calls the original class closure of a signal. This function should
4280  * only be called from an overridden class closure; see
4281  * g_signal_override_class_closure() and
4282  * g_signal_override_class_handler().
4283  *
4284  * Since: 2.18
4285  */
4286
4287
4288 /**
4289  * g_signal_connect_closure:
4290  * @instance: (type GObject.Object): the instance to connect to.
4291  * @detailed_signal: a string of the form "signal-name::detail".
4292  * @closure: the closure to connect.
4293  * @after: whether the handler should be called before or after the
4294  *  default handler of the signal.
4295  *
4296  * Connects a closure to a signal for a particular object.
4297  *
4298  * Returns: the handler id (always greater than 0 for successful connections)
4299  */
4300
4301
4302 /**
4303  * g_signal_connect_closure_by_id:
4304  * @instance: (type GObject.Object): the instance to connect to.
4305  * @signal_id: the id of the signal.
4306  * @detail: the detail.
4307  * @closure: the closure to connect.
4308  * @after: whether the handler should be called before or after the
4309  *  default handler of the signal.
4310  *
4311  * Connects a closure to a signal for a particular object.
4312  *
4313  * Returns: the handler id (always greater than 0 for successful connections)
4314  */
4315
4316
4317 /**
4318  * g_signal_connect_data:
4319  * @instance: (type GObject.Object): the instance to connect to.
4320  * @detailed_signal: a string of the form "signal-name::detail".
4321  * @c_handler: the #GCallback to connect.
4322  * @data: data to pass to @c_handler calls.
4323  * @destroy_data: a #GClosureNotify for @data.
4324  * @connect_flags: a combination of #GConnectFlags.
4325  *
4326  * Connects a #GCallback function to a signal for a particular object. Similar
4327  * to g_signal_connect(), but allows to provide a #GClosureNotify for the data
4328  * which will be called when the signal handler is disconnected and no longer
4329  * used. Specify @connect_flags if you need `..._after()` or
4330  * `..._swapped()` variants of this function.
4331  *
4332  * Returns: the handler id (always greater than 0 for successful connections)
4333  */
4334
4335
4336 /**
4337  * g_signal_connect_object: (skip)
4338  * @instance: (type GObject.TypeInstance): the instance to connect to.
4339  * @detailed_signal: a string of the form "signal-name::detail".
4340  * @c_handler: the #GCallback to connect.
4341  * @gobject: (type GObject.Object) (nullable): the object to pass as data
4342  *    to @c_handler.
4343  * @connect_flags: a combination of #GConnectFlags.
4344  *
4345  * This is similar to g_signal_connect_data(), but uses a closure which
4346  * ensures that the @gobject stays alive during the call to @c_handler
4347  * by temporarily adding a reference count to @gobject.
4348  *
4349  * When the @gobject is destroyed the signal handler will be automatically
4350  * disconnected.  Note that this is not currently threadsafe (ie:
4351  * emitting a signal while @gobject is being destroyed in another thread
4352  * is not safe).
4353  *
4354  * Returns: the handler id.
4355  */
4356
4357
4358 /**
4359  * g_signal_emit:
4360  * @instance: (type GObject.Object): the instance the signal is being emitted on.
4361  * @signal_id: the signal id
4362  * @detail: the detail
4363  * @...: parameters to be passed to the signal, followed by a
4364  *  location for the return value. If the return type of the signal
4365  *  is #G_TYPE_NONE, the return value location can be omitted.
4366  *
4367  * Emits a signal.
4368  *
4369  * Note that g_signal_emit() resets the return value to the default
4370  * if no handlers are connected, in contrast to g_signal_emitv().
4371  */
4372
4373
4374 /**
4375  * g_signal_emit_by_name:
4376  * @instance: (type GObject.Object): the instance the signal is being emitted on.
4377  * @detailed_signal: a string of the form "signal-name::detail".
4378  * @...: parameters to be passed to the signal, followed by a
4379  *  location for the return value. If the return type of the signal
4380  *  is #G_TYPE_NONE, the return value location can be omitted.
4381  *
4382  * Emits a signal.
4383  *
4384  * Note that g_signal_emit_by_name() resets the return value to the default
4385  * if no handlers are connected, in contrast to g_signal_emitv().
4386  */
4387
4388
4389 /**
4390  * g_signal_emit_valist: (skip)
4391  * @instance: (type GObject.TypeInstance): the instance the signal is being
4392  *    emitted on.
4393  * @signal_id: the signal id
4394  * @detail: the detail
4395  * @var_args: a list of parameters to be passed to the signal, followed by a
4396  *  location for the return value. If the return type of the signal
4397  *  is #G_TYPE_NONE, the return value location can be omitted.
4398  *
4399  * Emits a signal.
4400  *
4401  * Note that g_signal_emit_valist() resets the return value to the default
4402  * if no handlers are connected, in contrast to g_signal_emitv().
4403  */
4404
4405
4406 /**
4407  * g_signal_emitv:
4408  * @instance_and_params: (array): argument list for the signal emission.
4409  *  The first element in the array is a #GValue for the instance the signal
4410  *  is being emitted on. The rest are any arguments to be passed to the signal.
4411  * @signal_id: the signal id
4412  * @detail: the detail
4413  * @return_value: (inout) (optional): Location to
4414  * store the return value of the signal emission. This must be provided if the
4415  * specified signal returns a value, but may be ignored otherwise.
4416  *
4417  * Emits a signal.
4418  *
4419  * Note that g_signal_emitv() doesn't change @return_value if no handlers are
4420  * connected, in contrast to g_signal_emit() and g_signal_emit_valist().
4421  */
4422
4423
4424 /**
4425  * g_signal_get_invocation_hint:
4426  * @instance: (type GObject.Object): the instance to query
4427  *
4428  * Returns the invocation hint of the innermost signal emission of instance.
4429  *
4430  * Returns: (transfer none): the invocation hint of the innermost signal  emission.
4431  */
4432
4433
4434 /**
4435  * g_signal_handler_block:
4436  * @instance: (type GObject.Object): The instance to block the signal handler of.
4437  * @handler_id: Handler id of the handler to be blocked.
4438  *
4439  * Blocks a handler of an instance so it will not be called during any
4440  * signal emissions unless it is unblocked again. Thus "blocking" a
4441  * signal handler means to temporarily deactive it, a signal handler
4442  * has to be unblocked exactly the same amount of times it has been
4443  * blocked before to become active again.
4444  *
4445  * The @handler_id has to be a valid signal handler id, connected to a
4446  * signal of @instance.
4447  */
4448
4449
4450 /**
4451  * g_signal_handler_disconnect:
4452  * @instance: (type GObject.Object): The instance to remove the signal handler from.
4453  * @handler_id: Handler id of the handler to be disconnected.
4454  *
4455  * Disconnects a handler from an instance so it will not be called during
4456  * any future or currently ongoing emissions of the signal it has been
4457  * connected to. The @handler_id becomes invalid and may be reused.
4458  *
4459  * The @handler_id has to be a valid signal handler id, connected to a
4460  * signal of @instance.
4461  */
4462
4463
4464 /**
4465  * g_signal_handler_find:
4466  * @instance: (type GObject.Object): The instance owning the signal handler to be found.
4467  * @mask: Mask indicating which of @signal_id, @detail, @closure, @func
4468  *  and/or @data the handler has to match.
4469  * @signal_id: Signal the handler has to be connected to.
4470  * @detail: Signal detail the handler has to be connected to.
4471  * @closure: (allow-none): The closure the handler will invoke.
4472  * @func: The C closure callback of the handler (useless for non-C closures).
4473  * @data: The closure data of the handler's closure.
4474  *
4475  * Finds the first signal handler that matches certain selection criteria.
4476  * The criteria mask is passed as an OR-ed combination of #GSignalMatchType
4477  * flags, and the criteria values are passed as arguments.
4478  * The match @mask has to be non-0 for successful matches.
4479  * If no handler was found, 0 is returned.
4480  *
4481  * Returns: A valid non-0 signal handler id for a successful match.
4482  */
4483
4484
4485 /**
4486  * g_signal_handler_is_connected:
4487  * @instance: (type GObject.Object): The instance where a signal handler is sought.
4488  * @handler_id: the handler id.
4489  *
4490  * Returns whether @handler_id is the id of a handler connected to @instance.
4491  *
4492  * Returns: whether @handler_id identifies a handler connected to @instance.
4493  */
4494
4495
4496 /**
4497  * g_signal_handler_unblock:
4498  * @instance: (type GObject.Object): The instance to unblock the signal handler of.
4499  * @handler_id: Handler id of the handler to be unblocked.
4500  *
4501  * Undoes the effect of a previous g_signal_handler_block() call.  A
4502  * blocked handler is skipped during signal emissions and will not be
4503  * invoked, unblocking it (for exactly the amount of times it has been
4504  * blocked before) reverts its "blocked" state, so the handler will be
4505  * recognized by the signal system and is called upon future or
4506  * currently ongoing signal emissions (since the order in which
4507  * handlers are called during signal emissions is deterministic,
4508  * whether the unblocked handler in question is called as part of a
4509  * currently ongoing emission depends on how far that emission has
4510  * proceeded yet).
4511  *
4512  * The @handler_id has to be a valid id of a signal handler that is
4513  * connected to a signal of @instance and is currently blocked.
4514  */
4515
4516
4517 /**
4518  * g_signal_handlers_block_matched:
4519  * @instance: (type GObject.Object): The instance to block handlers from.
4520  * @mask: Mask indicating which of @signal_id, @detail, @closure, @func
4521  *  and/or @data the handlers have to match.
4522  * @signal_id: Signal the handlers have to be connected to.
4523  * @detail: Signal detail the handlers have to be connected to.
4524  * @closure: (allow-none): The closure the handlers will invoke.
4525  * @func: The C closure callback of the handlers (useless for non-C closures).
4526  * @data: The closure data of the handlers' closures.
4527  *
4528  * Blocks all handlers on an instance that match a certain selection criteria.
4529  * The criteria mask is passed as an OR-ed combination of #GSignalMatchType
4530  * flags, and the criteria values are passed as arguments.
4531  * Passing at least one of the %G_SIGNAL_MATCH_CLOSURE, %G_SIGNAL_MATCH_FUNC
4532  * or %G_SIGNAL_MATCH_DATA match flags is required for successful matches.
4533  * If no handlers were found, 0 is returned, the number of blocked handlers
4534  * otherwise.
4535  *
4536  * Returns: The number of handlers that matched.
4537  */
4538
4539
4540 /**
4541  * g_signal_handlers_destroy:
4542  * @instance: (type GObject.Object): The instance whose signal handlers are destroyed
4543  *
4544  * Destroy all signal handlers of a type instance. This function is
4545  * an implementation detail of the #GObject dispose implementation,
4546  * and should not be used outside of the type system.
4547  */
4548
4549
4550 /**
4551  * g_signal_handlers_disconnect_matched:
4552  * @instance: (type GObject.Object): The instance to remove handlers from.
4553  * @mask: Mask indicating which of @signal_id, @detail, @closure, @func
4554  *  and/or @data the handlers have to match.
4555  * @signal_id: Signal the handlers have to be connected to.
4556  * @detail: Signal detail the handlers have to be connected to.
4557  * @closure: (allow-none): The closure the handlers will invoke.
4558  * @func: The C closure callback of the handlers (useless for non-C closures).
4559  * @data: The closure data of the handlers' closures.
4560  *
4561  * Disconnects all handlers on an instance that match a certain
4562  * selection criteria. The criteria mask is passed as an OR-ed
4563  * combination of #GSignalMatchType flags, and the criteria values are
4564  * passed as arguments.  Passing at least one of the
4565  * %G_SIGNAL_MATCH_CLOSURE, %G_SIGNAL_MATCH_FUNC or
4566  * %G_SIGNAL_MATCH_DATA match flags is required for successful
4567  * matches.  If no handlers were found, 0 is returned, the number of
4568  * disconnected handlers otherwise.
4569  *
4570  * Returns: The number of handlers that matched.
4571  */
4572
4573
4574 /**
4575  * g_signal_handlers_unblock_matched:
4576  * @instance: (type GObject.Object): The instance to unblock handlers from.
4577  * @mask: Mask indicating which of @signal_id, @detail, @closure, @func
4578  *  and/or @data the handlers have to match.
4579  * @signal_id: Signal the handlers have to be connected to.
4580  * @detail: Signal detail the handlers have to be connected to.
4581  * @closure: (allow-none): The closure the handlers will invoke.
4582  * @func: The C closure callback of the handlers (useless for non-C closures).
4583  * @data: The closure data of the handlers' closures.
4584  *
4585  * Unblocks all handlers on an instance that match a certain selection
4586  * criteria. The criteria mask is passed as an OR-ed combination of
4587  * #GSignalMatchType flags, and the criteria values are passed as arguments.
4588  * Passing at least one of the %G_SIGNAL_MATCH_CLOSURE, %G_SIGNAL_MATCH_FUNC
4589  * or %G_SIGNAL_MATCH_DATA match flags is required for successful matches.
4590  * If no handlers were found, 0 is returned, the number of unblocked handlers
4591  * otherwise. The match criteria should not apply to any handlers that are
4592  * not currently blocked.
4593  *
4594  * Returns: The number of handlers that matched.
4595  */
4596
4597
4598 /**
4599  * g_signal_has_handler_pending:
4600  * @instance: (type GObject.Object): the object whose signal handlers are sought.
4601  * @signal_id: the signal id.
4602  * @detail: the detail.
4603  * @may_be_blocked: whether blocked handlers should count as match.
4604  *
4605  * Returns whether there are any handlers connected to @instance for the
4606  * given signal id and detail.
4607  *
4608  * If @detail is 0 then it will only match handlers that were connected
4609  * without detail.  If @detail is non-zero then it will match handlers
4610  * connected both without detail and with the given detail.  This is
4611  * consistent with how a signal emitted with @detail would be delivered
4612  * to those handlers.
4613  *
4614  * Since 2.46 this also checks for a non-default class closure being
4615  * installed, as this is basically always what you want.
4616  *
4617  * One example of when you might use this is when the arguments to the
4618  * signal are difficult to compute. A class implementor may opt to not
4619  * emit the signal if no one is attached anyway, thus saving the cost
4620  * of building the arguments.
4621  *
4622  * Returns: %TRUE if a handler is connected to the signal, %FALSE
4623  *          otherwise.
4624  */
4625
4626
4627 /**
4628  * g_signal_list_ids:
4629  * @itype: Instance or interface type.
4630  * @n_ids: Location to store the number of signal ids for @itype.
4631  *
4632  * Lists the signals by id that a certain instance or interface type
4633  * created. Further information about the signals can be acquired through
4634  * g_signal_query().
4635  *
4636  * Returns: (array length=n_ids) (transfer full): Newly allocated array of signal IDs.
4637  */
4638
4639
4640 /**
4641  * g_signal_lookup:
4642  * @name: the signal's name.
4643  * @itype: the type that the signal operates on.
4644  *
4645  * Given the name of the signal and the type of object it connects to, gets
4646  * the signal's identifying integer. Emitting the signal by number is
4647  * somewhat faster than using the name each time.
4648  *
4649  * Also tries the ancestors of the given type.
4650  *
4651  * See g_signal_new() for details on allowed signal names.
4652  *
4653  * Returns: the signal's identifying number, or 0 if no signal was found.
4654  */
4655
4656
4657 /**
4658  * g_signal_name:
4659  * @signal_id: the signal's identifying number.
4660  *
4661  * Given the signal's identifier, finds its name.
4662  *
4663  * Two different signals may have the same name, if they have differing types.
4664  *
4665  * Returns: the signal name, or %NULL if the signal number was invalid.
4666  */
4667
4668
4669 /**
4670  * g_signal_new:
4671  * @signal_name: the name for the signal
4672  * @itype: the type this signal pertains to. It will also pertain to
4673  *  types which are derived from this type.
4674  * @signal_flags: a combination of #GSignalFlags specifying detail of when
4675  *  the default handler is to be invoked. You should at least specify
4676  *  %G_SIGNAL_RUN_FIRST or %G_SIGNAL_RUN_LAST.
4677  * @class_offset: The offset of the function pointer in the class structure
4678  *  for this type. Used to invoke a class method generically. Pass 0 to
4679  *  not associate a class method slot with this signal.
4680  * @accumulator: the accumulator for this signal; may be %NULL.
4681  * @accu_data: user data for the @accumulator.
4682  * @c_marshaller: (allow-none): the function to translate arrays of parameter
4683  *  values to signal emissions into C language callback invocations or %NULL.
4684  * @return_type: the type of return value, or #G_TYPE_NONE for a signal
4685  *  without a return value.
4686  * @n_params: the number of parameter types to follow.
4687  * @...: a list of types, one for each parameter.
4688  *
4689  * Creates a new signal. (This is usually done in the class initializer.)
4690  *
4691  * A signal name consists of segments consisting of ASCII letters and
4692  * digits, separated by either the '-' or '_' character. The first
4693  * character of a signal name must be a letter. Names which violate these
4694  * rules lead to undefined behaviour of the GSignal system.
4695  *
4696  * When registering a signal and looking up a signal, either separator can
4697  * be used, but they cannot be mixed.
4698  *
4699  * If 0 is used for @class_offset subclasses cannot override the class handler
4700  * in their class_init method by doing super_class->signal_handler = my_signal_handler.
4701  * Instead they will have to use g_signal_override_class_handler().
4702  *
4703  * If c_marshaller is %NULL, g_cclosure_marshal_generic() will be used as
4704  * the marshaller for this signal.
4705  *
4706  * Returns: the signal id
4707  */
4708
4709
4710 /**
4711  * g_signal_new_class_handler:
4712  * @signal_name: the name for the signal
4713  * @itype: the type this signal pertains to. It will also pertain to
4714  *  types which are derived from this type.
4715  * @signal_flags: a combination of #GSignalFlags specifying detail of when
4716  *  the default handler is to be invoked. You should at least specify
4717  *  %G_SIGNAL_RUN_FIRST or %G_SIGNAL_RUN_LAST.
4718  * @class_handler: a #GCallback which acts as class implementation of
4719  *  this signal. Used to invoke a class method generically. Pass %NULL to
4720  *  not associate a class method with this signal.
4721  * @accumulator: the accumulator for this signal; may be %NULL.
4722  * @accu_data: user data for the @accumulator.
4723  * @c_marshaller: (allow-none): the function to translate arrays of parameter
4724  *  values to signal emissions into C language callback invocations or %NULL.
4725  * @return_type: the type of return value, or #G_TYPE_NONE for a signal
4726  *  without a return value.
4727  * @n_params: the number of parameter types to follow.
4728  * @...: a list of types, one for each parameter.
4729  *
4730  * Creates a new signal. (This is usually done in the class initializer.)
4731  *
4732  * This is a variant of g_signal_new() that takes a C callback instead
4733  * off a class offset for the signal's class handler. This function
4734  * doesn't need a function pointer exposed in the class structure of
4735  * an object definition, instead the function pointer is passed
4736  * directly and can be overriden by derived classes with
4737  * g_signal_override_class_closure() or
4738  * g_signal_override_class_handler()and chained to with
4739  * g_signal_chain_from_overridden() or
4740  * g_signal_chain_from_overridden_handler().
4741  *
4742  * See g_signal_new() for information about signal names.
4743  *
4744  * If c_marshaller is %NULL, g_cclosure_marshal_generic() will be used as
4745  * the marshaller for this signal.
4746  *
4747  * Returns: the signal id
4748  * Since: 2.18
4749  */
4750
4751
4752 /**
4753  * g_signal_new_valist:
4754  * @signal_name: the name for the signal
4755  * @itype: the type this signal pertains to. It will also pertain to
4756  *  types which are derived from this type.
4757  * @signal_flags: a combination of #GSignalFlags specifying detail of when
4758  *  the default handler is to be invoked. You should at least specify
4759  *  %G_SIGNAL_RUN_FIRST or %G_SIGNAL_RUN_LAST.
4760  * @class_closure: The closure to invoke on signal emission; may be %NULL.
4761  * @accumulator: the accumulator for this signal; may be %NULL.
4762  * @accu_data: user data for the @accumulator.
4763  * @c_marshaller: (allow-none): the function to translate arrays of parameter
4764  *  values to signal emissions into C language callback invocations or %NULL.
4765  * @return_type: the type of return value, or #G_TYPE_NONE for a signal
4766  *  without a return value.
4767  * @n_params: the number of parameter types in @args.
4768  * @args: va_list of #GType, one for each parameter.
4769  *
4770  * Creates a new signal. (This is usually done in the class initializer.)
4771  *
4772  * See g_signal_new() for details on allowed signal names.
4773  *
4774  * If c_marshaller is %NULL, g_cclosure_marshal_generic() will be used as
4775  * the marshaller for this signal.
4776  *
4777  * Returns: the signal id
4778  */
4779
4780
4781 /**
4782  * g_signal_newv:
4783  * @signal_name: the name for the signal
4784  * @itype: the type this signal pertains to. It will also pertain to
4785  *     types which are derived from this type
4786  * @signal_flags: a combination of #GSignalFlags specifying detail of when
4787  *     the default handler is to be invoked. You should at least specify
4788  *     %G_SIGNAL_RUN_FIRST or %G_SIGNAL_RUN_LAST
4789  * @class_closure: (allow-none): The closure to invoke on signal emission;
4790  *     may be %NULL
4791  * @accumulator: (allow-none): the accumulator for this signal; may be %NULL
4792  * @accu_data: user data for the @accumulator
4793  * @c_marshaller: (allow-none): the function to translate arrays of
4794  *     parameter values to signal emissions into C language callback
4795  *     invocations or %NULL
4796  * @return_type: the type of return value, or #G_TYPE_NONE for a signal
4797  *     without a return value
4798  * @n_params: the length of @param_types
4799  * @param_types: (array length=n_params): an array of types, one for
4800  *     each parameter
4801  *
4802  * Creates a new signal. (This is usually done in the class initializer.)
4803  *
4804  * See g_signal_new() for details on allowed signal names.
4805  *
4806  * If c_marshaller is %NULL, g_cclosure_marshal_generic() will be used as
4807  * the marshaller for this signal.
4808  *
4809  * Returns: the signal id
4810  */
4811
4812
4813 /**
4814  * g_signal_override_class_closure:
4815  * @signal_id: the signal id
4816  * @instance_type: the instance type on which to override the class closure
4817  *  for the signal.
4818  * @class_closure: the closure.
4819  *
4820  * Overrides the class closure (i.e. the default handler) for the given signal
4821  * for emissions on instances of @instance_type. @instance_type must be derived
4822  * from the type to which the signal belongs.
4823  *
4824  * See g_signal_chain_from_overridden() and
4825  * g_signal_chain_from_overridden_handler() for how to chain up to the
4826  * parent class closure from inside the overridden one.
4827  */
4828
4829
4830 /**
4831  * g_signal_override_class_handler:
4832  * @signal_name: the name for the signal
4833  * @instance_type: the instance type on which to override the class handler
4834  *  for the signal.
4835  * @class_handler: the handler.
4836  *
4837  * Overrides the class closure (i.e. the default handler) for the
4838  * given signal for emissions on instances of @instance_type with
4839  * callback @class_handler. @instance_type must be derived from the
4840  * type to which the signal belongs.
4841  *
4842  * See g_signal_chain_from_overridden() and
4843  * g_signal_chain_from_overridden_handler() for how to chain up to the
4844  * parent class closure from inside the overridden one.
4845  *
4846  * Since: 2.18
4847  */
4848
4849
4850 /**
4851  * g_signal_parse_name:
4852  * @detailed_signal: a string of the form "signal-name::detail".
4853  * @itype: The interface/instance type that introduced "signal-name".
4854  * @signal_id_p: (out): Location to store the signal id.
4855  * @detail_p: (out): Location to store the detail quark.
4856  * @force_detail_quark: %TRUE forces creation of a #GQuark for the detail.
4857  *
4858  * Internal function to parse a signal name into its @signal_id
4859  * and @detail quark.
4860  *
4861  * Returns: Whether the signal name could successfully be parsed and @signal_id_p and @detail_p contain valid return values.
4862  */
4863
4864
4865 /**
4866  * g_signal_query:
4867  * @signal_id: The signal id of the signal to query information for.
4868  * @query: (out caller-allocates): A user provided structure that is
4869  *  filled in with constant values upon success.
4870  *
4871  * Queries the signal system for in-depth information about a
4872  * specific signal. This function will fill in a user-provided
4873  * structure to hold signal-specific information. If an invalid
4874  * signal id is passed in, the @signal_id member of the #GSignalQuery
4875  * is 0. All members filled into the #GSignalQuery structure should
4876  * be considered constant and have to be left untouched.
4877  */
4878
4879
4880 /**
4881  * g_signal_remove_emission_hook:
4882  * @signal_id: the id of the signal
4883  * @hook_id: the id of the emission hook, as returned by
4884  *  g_signal_add_emission_hook()
4885  *
4886  * Deletes an emission hook.
4887  */
4888
4889
4890 /**
4891  * g_signal_set_va_marshaller:
4892  * @signal_id: the signal id
4893  * @instance_type: the instance type on which to set the marshaller.
4894  * @va_marshaller: the marshaller to set.
4895  *
4896  * Change the #GSignalCVaMarshaller used for a given signal.  This is a
4897  * specialised form of the marshaller that can often be used for the
4898  * common case of a single connected signal handler and avoids the
4899  * overhead of #GValue.  Its use is optional.
4900  *
4901  * Since: 2.32
4902  */
4903
4904
4905 /**
4906  * g_signal_stop_emission:
4907  * @instance: (type GObject.Object): the object whose signal handlers you wish to stop.
4908  * @signal_id: the signal identifier, as returned by g_signal_lookup().
4909  * @detail: the detail which the signal was emitted with.
4910  *
4911  * Stops a signal's current emission.
4912  *
4913  * This will prevent the default method from running, if the signal was
4914  * %G_SIGNAL_RUN_LAST and you connected normally (i.e. without the "after"
4915  * flag).
4916  *
4917  * Prints a warning if used on a signal which isn't being emitted.
4918  */
4919
4920
4921 /**
4922  * g_signal_stop_emission_by_name:
4923  * @instance: (type GObject.Object): the object whose signal handlers you wish to stop.
4924  * @detailed_signal: a string of the form "signal-name::detail".
4925  *
4926  * Stops a signal's current emission.
4927  *
4928  * This is just like g_signal_stop_emission() except it will look up the
4929  * signal id for you.
4930  */
4931
4932
4933 /**
4934  * g_signal_type_cclosure_new:
4935  * @itype: the #GType identifier of an interface or classed type
4936  * @struct_offset: the offset of the member function of @itype's class
4937  *  structure which is to be invoked by the new closure
4938  *
4939  * Creates a new closure which invokes the function found at the offset
4940  * @struct_offset in the class structure of the interface or classed type
4941  * identified by @itype.
4942  *
4943  * Returns: a new #GCClosure
4944  */
4945
4946
4947 /**
4948  * g_source_set_closure:
4949  * @source: the source
4950  * @closure: a #GClosure
4951  *
4952  * Set the callback for a source as a #GClosure.
4953  *
4954  * If the source is not one of the standard GLib types, the @closure_callback
4955  * and @closure_marshal fields of the #GSourceFuncs structure must have been
4956  * filled in with pointers to appropriate functions.
4957  */
4958
4959
4960 /**
4961  * g_source_set_dummy_callback:
4962  * @source: the source
4963  *
4964  * Sets a dummy callback for @source. The callback will do nothing, and
4965  * if the source expects a #gboolean return value, it will return %TRUE.
4966  * (If the source expects any other type of return value, it will return
4967  * a 0/%NULL value; whatever g_value_init() initializes a #GValue to for
4968  * that type.)
4969  *
4970  * If the source is not one of the standard GLib types, the
4971  * @closure_callback and @closure_marshal fields of the #GSourceFuncs
4972  * structure must have been filled in with pointers to appropriate
4973  * functions.
4974  */
4975
4976
4977 /**
4978  * g_strdup_value_contents:
4979  * @value: #GValue which contents are to be described.
4980  *
4981  * Return a newly allocated string, which describes the contents of a
4982  * #GValue.  The main purpose of this function is to describe #GValue
4983  * contents for debugging output, the way in which the contents are
4984  * described may change between different GLib versions.
4985  *
4986  * Returns: Newly allocated string.
4987  */
4988
4989
4990 /**
4991  * g_type_add_class_cache_func: (skip)
4992  * @cache_data: data to be passed to @cache_func
4993  * @cache_func: a #GTypeClassCacheFunc
4994  *
4995  * Adds a #GTypeClassCacheFunc to be called before the reference count of a
4996  * class goes from one to zero. This can be used to prevent premature class
4997  * destruction. All installed #GTypeClassCacheFunc functions will be chained
4998  * until one of them returns %TRUE. The functions have to check the class id
4999  * passed in to figure whether they actually want to cache the class of this
5000  * type, since all classes are routed through the same #GTypeClassCacheFunc
5001  * chain.
5002  */
5003
5004
5005 /**
5006  * g_type_add_class_private:
5007  * @class_type: GType of an classed type
5008  * @private_size: size of private structure
5009  *
5010  * Registers a private class structure for a classed type;
5011  * when the class is allocated, the private structures for
5012  * the class and all of its parent types are allocated
5013  * sequentially in the same memory block as the public
5014  * structures, and are zero-filled.
5015  *
5016  * This function should be called in the
5017  * type's get_type() function after the type is registered.
5018  * The private structure can be retrieved using the
5019  * G_TYPE_CLASS_GET_PRIVATE() macro.
5020  *
5021  * Since: 2.24
5022  */
5023
5024
5025 /**
5026  * g_type_add_interface_check: (skip)
5027  * @check_data: data to pass to @check_func
5028  * @check_func: function to be called after each interface
5029  *     is initialized
5030  *
5031  * Adds a function to be called after an interface vtable is
5032  * initialized for any class (i.e. after the @interface_init
5033  * member of #GInterfaceInfo has been called).
5034  *
5035  * This function is useful when you want to check an invariant
5036  * that depends on the interfaces of a class. For instance, the
5037  * implementation of #GObject uses this facility to check that an
5038  * object implements all of the properties that are defined on its
5039  * interfaces.
5040  *
5041  * Since: 2.4
5042  */
5043
5044
5045 /**
5046  * g_type_add_interface_dynamic:
5047  * @instance_type: #GType value of an instantiable type
5048  * @interface_type: #GType value of an interface type
5049  * @plugin: #GTypePlugin structure to retrieve the #GInterfaceInfo from
5050  *
5051  * Adds the dynamic @interface_type to @instantiable_type. The information
5052  * contained in the #GTypePlugin structure pointed to by @plugin
5053  * is used to manage the relationship.
5054  */
5055
5056
5057 /**
5058  * g_type_add_interface_static:
5059  * @instance_type: #GType value of an instantiable type
5060  * @interface_type: #GType value of an interface type
5061  * @info: #GInterfaceInfo structure for this
5062  *        (@instance_type, @interface_type) combination
5063  *
5064  * Adds the static @interface_type to @instantiable_type.
5065  * The information contained in the #GInterfaceInfo structure
5066  * pointed to by @info is used to manage the relationship.
5067  */
5068
5069
5070 /**
5071  * g_type_check_instance:
5072  * @instance: a valid #GTypeInstance structure
5073  *
5074  * Private helper function to aid implementation of the
5075  * G_TYPE_CHECK_INSTANCE() macro.
5076  *
5077  * Returns: %TRUE if @instance is valid, %FALSE otherwise
5078  */
5079
5080
5081 /**
5082  * g_type_children:
5083  * @type: the parent type
5084  * @n_children: (out) (allow-none): location to store the length of
5085  *     the returned array, or %NULL
5086  *
5087  * Return a newly allocated and 0-terminated array of type IDs, listing
5088  * the child types of @type.
5089  *
5090  * Returns: (array length=n_children) (transfer full): Newly allocated
5091  *     and 0-terminated array of child types, free with g_free()
5092  */
5093
5094
5095 /**
5096  * g_type_class_add_private:
5097  * @g_class: (type GObject.TypeClass): class structure for an instantiatable
5098  *    type
5099  * @private_size: size of private structure
5100  *
5101  * Registers a private structure for an instantiatable type.
5102  *
5103  * When an object is allocated, the private structures for
5104  * the type and all of its parent types are allocated
5105  * sequentially in the same memory block as the public
5106  * structures, and are zero-filled.
5107  *
5108  * Note that the accumulated size of the private structures of
5109  * a type and all its parent types cannot exceed 64 KiB.
5110  *
5111  * This function should be called in the type's class_init() function.
5112  * The private structure can be retrieved using the
5113  * G_TYPE_INSTANCE_GET_PRIVATE() macro.
5114  *
5115  * The following example shows attaching a private structure
5116  * MyObjectPrivate to an object MyObject defined in the standard
5117  * GObject fashion in the type's class_init() function.
5118  *
5119  * Note the use of a structure member "priv" to avoid the overhead
5120  * of repeatedly calling MY_OBJECT_GET_PRIVATE().
5121  *
5122  * |[<!-- language="C" -->
5123  * typedef struct _MyObject        MyObject;
5124  * typedef struct _MyObjectPrivate MyObjectPrivate;
5125  *
5126  * struct _MyObject {
5127  *  GObject parent;
5128  *
5129  *  MyObjectPrivate *priv;
5130  * };
5131  *
5132  * struct _MyObjectPrivate {
5133  *   int some_field;
5134  * };
5135  *
5136  * static void
5137  * my_object_class_init (MyObjectClass *klass)
5138  * {
5139  *   g_type_class_add_private (klass, sizeof (MyObjectPrivate));
5140  * }
5141  *
5142  * static void
5143  * my_object_init (MyObject *my_object)
5144  * {
5145  *   my_object->priv = G_TYPE_INSTANCE_GET_PRIVATE (my_object,
5146  *                                                  MY_TYPE_OBJECT,
5147  *                                                  MyObjectPrivate);
5148  *   // my_object->priv->some_field will be automatically initialised to 0
5149  * }
5150  *
5151  * static int
5152  * my_object_get_some_field (MyObject *my_object)
5153  * {
5154  *   MyObjectPrivate *priv;
5155  *
5156  *   g_return_val_if_fail (MY_IS_OBJECT (my_object), 0);
5157  *
5158  *   priv = my_object->priv;
5159  *
5160  *   return priv->some_field;
5161  * }
5162  * ]|
5163  *
5164  * Since: 2.4
5165  */
5166
5167
5168 /**
5169  * g_type_class_get_instance_private_offset: (skip)
5170  * @g_class: (type GObject.TypeClass): a #GTypeClass
5171  *
5172  * Gets the offset of the private data for instances of @g_class.
5173  *
5174  * This is how many bytes you should add to the instance pointer of a
5175  * class in order to get the private data for the type represented by
5176  * @g_class.
5177  *
5178  * You can only call this function after you have registered a private
5179  * data area for @g_class using g_type_class_add_private().
5180  *
5181  * Returns: the offset, in bytes
5182  * Since: 2.38
5183  */
5184
5185
5186 /**
5187  * g_type_class_peek:
5188  * @type: type ID of a classed type
5189  *
5190  * This function is essentially the same as g_type_class_ref(),
5191  * except that the classes reference count isn't incremented.
5192  * As a consequence, this function may return %NULL if the class
5193  * of the type passed in does not currently exist (hasn't been
5194  * referenced before).
5195  *
5196  * Returns: (type GObject.TypeClass) (transfer none): the #GTypeClass
5197  *     structure for the given type ID or %NULL if the class does not
5198  *     currently exist
5199  */
5200
5201
5202 /**
5203  * g_type_class_peek_parent:
5204  * @g_class: (type GObject.TypeClass): the #GTypeClass structure to
5205  *     retrieve the parent class for
5206  *
5207  * This is a convenience function often needed in class initializers.
5208  * It returns the class structure of the immediate parent type of the
5209  * class passed in.  Since derived classes hold a reference count on
5210  * their parent classes as long as they are instantiated, the returned
5211  * class will always exist.
5212  *
5213  * This function is essentially equivalent to:
5214  * g_type_class_peek (g_type_parent (G_TYPE_FROM_CLASS (g_class)))
5215  *
5216  * Returns: (type GObject.TypeClass) (transfer none): the parent class
5217  *     of @g_class
5218  */
5219
5220
5221 /**
5222  * g_type_class_peek_static:
5223  * @type: type ID of a classed type
5224  *
5225  * A more efficient version of g_type_class_peek() which works only for
5226  * static types.
5227  *
5228  * Returns: (type GObject.TypeClass) (transfer none): the #GTypeClass
5229  *     structure for the given type ID or %NULL if the class does not
5230  *     currently exist or is dynamically loaded
5231  * Since: 2.4
5232  */
5233
5234
5235 /**
5236  * g_type_class_ref:
5237  * @type: type ID of a classed type
5238  *
5239  * Increments the reference count of the class structure belonging to
5240  * @type. This function will demand-create the class if it doesn't
5241  * exist already.
5242  *
5243  * Returns: (type GObject.TypeClass) (transfer none): the #GTypeClass
5244  *     structure for the given type ID
5245  */
5246
5247
5248 /**
5249  * g_type_class_unref:
5250  * @g_class: (type GObject.TypeClass): a #GTypeClass structure to unref
5251  *
5252  * Decrements the reference count of the class structure being passed in.
5253  * Once the last reference count of a class has been released, classes
5254  * may be finalized by the type system, so further dereferencing of a
5255  * class pointer after g_type_class_unref() are invalid.
5256  */
5257
5258
5259 /**
5260  * g_type_class_unref_uncached: (skip)
5261  * @g_class: (type GObject.TypeClass): a #GTypeClass structure to unref
5262  *
5263  * A variant of g_type_class_unref() for use in #GTypeClassCacheFunc
5264  * implementations. It unreferences a class without consulting the chain
5265  * of #GTypeClassCacheFuncs, avoiding the recursion which would occur
5266  * otherwise.
5267  */
5268
5269
5270 /**
5271  * g_type_create_instance: (skip)
5272  * @type: an instantiatable type to create an instance for
5273  *
5274  * Creates and initializes an instance of @type if @type is valid and
5275  * can be instantiated. The type system only performs basic allocation
5276  * and structure setups for instances: actual instance creation should
5277  * happen through functions supplied by the type's fundamental type
5278  * implementation.  So use of g_type_create_instance() is reserved for
5279  * implementators of fundamental types only. E.g. instances of the
5280  * #GObject hierarchy should be created via g_object_new() and never
5281  * directly through g_type_create_instance() which doesn't handle things
5282  * like singleton objects or object construction.
5283  *
5284  * The extended members of the returned instance are guaranteed to be filled
5285  * with zeros.
5286  *
5287  * Note: Do not use this function, unless you're implementing a
5288  * fundamental type. Also language bindings should not use this
5289  * function, but g_object_new() instead.
5290  *
5291  * Returns: an allocated and initialized instance, subject to further
5292  *     treatment by the fundamental type implementation
5293  */
5294
5295
5296 /**
5297  * g_type_default_interface_peek:
5298  * @g_type: an interface type
5299  *
5300  * If the interface type @g_type is currently in use, returns its
5301  * default interface vtable.
5302  *
5303  * Since: 2.4
5304  * Returns: (type GObject.TypeInterface) (transfer none): the default
5305  *     vtable for the interface, or %NULL if the type is not currently
5306  *     in use
5307  */
5308
5309
5310 /**
5311  * g_type_default_interface_ref:
5312  * @g_type: an interface type
5313  *
5314  * Increments the reference count for the interface type @g_type,
5315  * and returns the default interface vtable for the type.
5316  *
5317  * If the type is not currently in use, then the default vtable
5318  * for the type will be created and initalized by calling
5319  * the base interface init and default vtable init functions for
5320  * the type (the @base_init and @class_init members of #GTypeInfo).
5321  * Calling g_type_default_interface_ref() is useful when you
5322  * want to make sure that signals and properties for an interface
5323  * have been installed.
5324  *
5325  * Since: 2.4
5326  * Returns: (type GObject.TypeInterface) (transfer none): the default
5327  *     vtable for the interface; call g_type_default_interface_unref()
5328  *     when you are done using the interface.
5329  */
5330
5331
5332 /**
5333  * g_type_default_interface_unref:
5334  * @g_iface: (type GObject.TypeInterface): the default vtable
5335  *     structure for a interface, as returned by g_type_default_interface_ref()
5336  *
5337  * Decrements the reference count for the type corresponding to the
5338  * interface default vtable @g_iface. If the type is dynamic, then
5339  * when no one is using the interface and all references have
5340  * been released, the finalize function for the interface's default
5341  * vtable (the @class_finalize member of #GTypeInfo) will be called.
5342  *
5343  * Since: 2.4
5344  */
5345
5346
5347 /**
5348  * g_type_depth:
5349  * @type: a #GType
5350  *
5351  * Returns the length of the ancestry of the passed in type. This
5352  * includes the type itself, so that e.g. a fundamental type has depth 1.
5353  *
5354  * Returns: the depth of @type
5355  */
5356
5357
5358 /**
5359  * g_type_ensure:
5360  * @type: a #GType
5361  *
5362  * Ensures that the indicated @type has been registered with the
5363  * type system, and its _class_init() method has been run.
5364  *
5365  * In theory, simply calling the type's _get_type() method (or using
5366  * the corresponding macro) is supposed take care of this. However,
5367  * _get_type() methods are often marked %G_GNUC_CONST for performance
5368  * reasons, even though this is technically incorrect (since
5369  * %G_GNUC_CONST requires that the function not have side effects,
5370  * which _get_type() methods do on the first call). As a result, if
5371  * you write a bare call to a _get_type() macro, it may get optimized
5372  * out by the compiler. Using g_type_ensure() guarantees that the
5373  * type's _get_type() method is called.
5374  *
5375  * Since: 2.34
5376  */
5377
5378
5379 /**
5380  * g_type_free_instance:
5381  * @instance: an instance of a type
5382  *
5383  * Frees an instance of a type, returning it to the instance pool for
5384  * the type, if there is one.
5385  *
5386  * Like g_type_create_instance(), this function is reserved for
5387  * implementors of fundamental types.
5388  */
5389
5390
5391 /**
5392  * g_type_from_name:
5393  * @name: type name to lookup
5394  *
5395  * Lookup the type ID from a given type name, returning 0 if no type
5396  * has been registered under this name (this is the preferred method
5397  * to find out by name whether a specific type has been registered
5398  * yet).
5399  *
5400  * Returns: corresponding type ID or 0
5401  */
5402
5403
5404 /**
5405  * g_type_fundamental:
5406  * @type_id: valid type ID
5407  *
5408  * Internal function, used to extract the fundamental type ID portion.
5409  * Use G_TYPE_FUNDAMENTAL() instead.
5410  *
5411  * Returns: fundamental type ID
5412  */
5413
5414
5415 /**
5416  * g_type_fundamental_next:
5417  *
5418  * Returns the next free fundamental type id which can be used to
5419  * register a new fundamental type with g_type_register_fundamental().
5420  * The returned type ID represents the highest currently registered
5421  * fundamental type identifier.
5422  *
5423  * Returns: the next available fundamental type ID to be registered,
5424  *     or 0 if the type system ran out of fundamental type IDs
5425  */
5426
5427
5428 /**
5429  * g_type_get_instance_count:
5430  * @type: a #GType
5431  *
5432  * Returns the number of instances allocated of the particular type;
5433  * this is only available if GLib is built with debugging support and
5434  * the instance_count debug flag is set (by setting the GOBJECT_DEBUG
5435  * variable to include instance-count).
5436  *
5437  * Returns: the number of instances allocated of the given type;
5438  *   if instance counts are not available, returns 0.
5439  * Since: 2.44
5440  */
5441
5442
5443 /**
5444  * g_type_get_plugin:
5445  * @type: #GType to retrieve the plugin for
5446  *
5447  * Returns the #GTypePlugin structure for @type.
5448  *
5449  * Returns: (transfer none): the corresponding plugin
5450  *     if @type is a dynamic type, %NULL otherwise
5451  */
5452
5453
5454 /**
5455  * g_type_get_qdata:
5456  * @type: a #GType
5457  * @quark: a #GQuark id to identify the data
5458  *
5459  * Obtains data which has previously been attached to @type
5460  * with g_type_set_qdata().
5461  *
5462  * Note that this does not take subtyping into account; data
5463  * attached to one type with g_type_set_qdata() cannot
5464  * be retrieved from a subtype using g_type_get_qdata().
5465  *
5466  * Returns: (transfer none): the data, or %NULL if no data was found
5467  */
5468
5469
5470 /**
5471  * g_type_get_type_registration_serial:
5472  *
5473  * Returns an opaque serial number that represents the state of the set
5474  * of registered types. Any time a type is registered this serial changes,
5475  * which means you can cache information based on type lookups (such as
5476  * g_type_from_name()) and know if the cache is still valid at a later
5477  * time by comparing the current serial with the one at the type lookup.
5478  *
5479  * Since: 2.36
5480  * Returns: An unsigned int, representing the state of type registrations
5481  */
5482
5483
5484 /**
5485  * g_type_init:
5486  *
5487  * This function used to initialise the type system.  Since GLib 2.36,
5488  * the type system is initialised automatically and this function does
5489  * nothing.
5490  *
5491  * Deprecated: 2.36: the type system is now initialised automatically
5492  */
5493
5494
5495 /**
5496  * g_type_init_with_debug_flags:
5497  * @debug_flags: bitwise combination of #GTypeDebugFlags values for
5498  *     debugging purposes
5499  *
5500  * This function used to initialise the type system with debugging
5501  * flags.  Since GLib 2.36, the type system is initialised automatically
5502  * and this function does nothing.
5503  *
5504  * If you need to enable debugging features, use the GOBJECT_DEBUG
5505  * environment variable.
5506  *
5507  * Deprecated: 2.36: the type system is now initialised automatically
5508  */
5509
5510
5511 /**
5512  * g_type_interface_add_prerequisite:
5513  * @interface_type: #GType value of an interface type
5514  * @prerequisite_type: #GType value of an interface or instantiatable type
5515  *
5516  * Adds @prerequisite_type to the list of prerequisites of @interface_type.
5517  * This means that any type implementing @interface_type must also implement
5518  * @prerequisite_type. Prerequisites can be thought of as an alternative to
5519  * interface derivation (which GType doesn't support). An interface can have
5520  * at most one instantiatable prerequisite type.
5521  */
5522
5523
5524 /**
5525  * g_type_interface_get_plugin:
5526  * @instance_type: #GType of an instantiatable type
5527  * @interface_type: #GType of an interface type
5528  *
5529  * Returns the #GTypePlugin structure for the dynamic interface
5530  * @interface_type which has been added to @instance_type, or %NULL
5531  * if @interface_type has not been added to @instance_type or does
5532  * not have a #GTypePlugin structure. See g_type_add_interface_dynamic().
5533  *
5534  * Returns: (transfer none): the #GTypePlugin for the dynamic
5535  *     interface @interface_type of @instance_type
5536  */
5537
5538
5539 /**
5540  * g_type_interface_peek:
5541  * @instance_class: (type GObject.TypeClass): a #GTypeClass structure
5542  * @iface_type: an interface ID which this class conforms to
5543  *
5544  * Returns the #GTypeInterface structure of an interface to which the
5545  * passed in class conforms.
5546  *
5547  * Returns: (type GObject.TypeInterface) (transfer none): the #GTypeInterface
5548  *     structure of @iface_type if implemented by @instance_class, %NULL
5549  *     otherwise
5550  */
5551
5552
5553 /**
5554  * g_type_interface_peek_parent:
5555  * @g_iface: (type GObject.TypeInterface): a #GTypeInterface structure
5556  *
5557  * Returns the corresponding #GTypeInterface structure of the parent type
5558  * of the instance type to which @g_iface belongs. This is useful when
5559  * deriving the implementation of an interface from the parent type and
5560  * then possibly overriding some methods.
5561  *
5562  * Returns: (transfer none) (type GObject.TypeInterface): the
5563  *     corresponding #GTypeInterface structure of the parent type of the
5564  *     instance type to which @g_iface belongs, or %NULL if the parent
5565  *     type doesn't conform to the interface
5566  */
5567
5568
5569 /**
5570  * g_type_interface_prerequisites:
5571  * @interface_type: an interface type
5572  * @n_prerequisites: (out) (allow-none): location to return the number
5573  *     of prerequisites, or %NULL
5574  *
5575  * Returns the prerequisites of an interfaces type.
5576  *
5577  * Since: 2.2
5578  * Returns: (array length=n_prerequisites) (transfer full): a
5579  *     newly-allocated zero-terminated array of #GType containing
5580  *     the prerequisites of @interface_type
5581  */
5582
5583
5584 /**
5585  * g_type_interfaces:
5586  * @type: the type to list interface types for
5587  * @n_interfaces: (out) (allow-none): location to store the length of
5588  *     the returned array, or %NULL
5589  *
5590  * Return a newly allocated and 0-terminated array of type IDs, listing
5591  * the interface types that @type conforms to.
5592  *
5593  * Returns: (array length=n_interfaces) (transfer full): Newly allocated
5594  *     and 0-terminated array of interface types, free with g_free()
5595  */
5596
5597
5598 /**
5599  * g_type_is_a:
5600  * @type: type to check anchestry for
5601  * @is_a_type: possible anchestor of @type or interface that @type
5602  *     could conform to
5603  *
5604  * If @is_a_type is a derivable type, check whether @type is a
5605  * descendant of @is_a_type. If @is_a_type is an interface, check
5606  * whether @type conforms to it.
5607  *
5608  * Returns: %TRUE if @type is a @is_a_type
5609  */
5610
5611
5612 /**
5613  * g_type_module_add_interface:
5614  * @module: a #GTypeModule
5615  * @instance_type: type to which to add the interface.
5616  * @interface_type: interface type to add
5617  * @interface_info: type information structure
5618  *
5619  * Registers an additional interface for a type, whose interface lives
5620  * in the given type plugin. If the interface was already registered
5621  * for the type in this plugin, nothing will be done.
5622  *
5623  * As long as any instances of the type exist, the type plugin will
5624  * not be unloaded.
5625  */
5626
5627
5628 /**
5629  * g_type_module_register_enum:
5630  * @module: a #GTypeModule
5631  * @name: name for the type
5632  * @const_static_values: an array of #GEnumValue structs for the
5633  *                       possible enumeration values. The array is
5634  *                       terminated by a struct with all members being
5635  *                       0.
5636  *
5637  * Looks up or registers an enumeration that is implemented with a particular
5638  * type plugin. If a type with name @type_name was previously registered,
5639  * the #GType identifier for the type is returned, otherwise the type
5640  * is newly registered, and the resulting #GType identifier returned.
5641  *
5642  * As long as any instances of the type exist, the type plugin will
5643  * not be unloaded.
5644  *
5645  * Since: 2.6
5646  * Returns: the new or existing type ID
5647  */
5648
5649
5650 /**
5651  * g_type_module_register_flags:
5652  * @module: a #GTypeModule
5653  * @name: name for the type
5654  * @const_static_values: an array of #GFlagsValue structs for the
5655  *                       possible flags values. The array is
5656  *                       terminated by a struct with all members being
5657  *                       0.
5658  *
5659  * Looks up or registers a flags type that is implemented with a particular
5660  * type plugin. If a type with name @type_name was previously registered,
5661  * the #GType identifier for the type is returned, otherwise the type
5662  * is newly registered, and the resulting #GType identifier returned.
5663  *
5664  * As long as any instances of the type exist, the type plugin will
5665  * not be unloaded.
5666  *
5667  * Since: 2.6
5668  * Returns: the new or existing type ID
5669  */
5670
5671
5672 /**
5673  * g_type_module_register_type:
5674  * @module: a #GTypeModule
5675  * @parent_type: the type for the parent class
5676  * @type_name: name for the type
5677  * @type_info: type information structure
5678  * @flags: flags field providing details about the type
5679  *
5680  * Looks up or registers a type that is implemented with a particular
5681  * type plugin. If a type with name @type_name was previously registered,
5682  * the #GType identifier for the type is returned, otherwise the type
5683  * is newly registered, and the resulting #GType identifier returned.
5684  *
5685  * When reregistering a type (typically because a module is unloaded
5686  * then reloaded, and reinitialized), @module and @parent_type must
5687  * be the same as they were previously.
5688  *
5689  * As long as any instances of the type exist, the type plugin will
5690  * not be unloaded.
5691  *
5692  * Returns: the new or existing type ID
5693  */
5694
5695
5696 /**
5697  * g_type_module_set_name:
5698  * @module: a #GTypeModule.
5699  * @name: a human-readable name to use in error messages.
5700  *
5701  * Sets the name for a #GTypeModule
5702  */
5703
5704
5705 /**
5706  * g_type_module_unuse:
5707  * @module: a #GTypeModule
5708  *
5709  * Decreases the use count of a #GTypeModule by one. If the
5710  * result is zero, the module will be unloaded. (However, the
5711  * #GTypeModule will not be freed, and types associated with the
5712  * #GTypeModule are not unregistered. Once a #GTypeModule is
5713  * initialized, it must exist forever.)
5714  */
5715
5716
5717 /**
5718  * g_type_module_use:
5719  * @module: a #GTypeModule
5720  *
5721  * Increases the use count of a #GTypeModule by one. If the
5722  * use count was zero before, the plugin will be loaded.
5723  * If loading the plugin fails, the use count is reset to
5724  * its prior value.
5725  *
5726  * Returns: %FALSE if the plugin needed to be loaded and
5727  *  loading the plugin failed.
5728  */
5729
5730
5731 /**
5732  * g_type_name:
5733  * @type: type to return name for
5734  *
5735  * Get the unique name that is assigned to a type ID.  Note that this
5736  * function (like all other GType API) cannot cope with invalid type
5737  * IDs. %G_TYPE_INVALID may be passed to this function, as may be any
5738  * other validly registered type ID, but randomized type IDs should
5739  * not be passed in and will most likely lead to a crash.
5740  *
5741  * Returns: static type name or %NULL
5742  */
5743
5744
5745 /**
5746  * g_type_next_base:
5747  * @leaf_type: descendant of @root_type and the type to be returned
5748  * @root_type: immediate parent of the returned type
5749  *
5750  * Given a @leaf_type and a @root_type which is contained in its
5751  * anchestry, return the type that @root_type is the immediate parent
5752  * of. In other words, this function determines the type that is
5753  * derived directly from @root_type which is also a base class of
5754  * @leaf_type.  Given a root type and a leaf type, this function can
5755  * be used to determine the types and order in which the leaf type is
5756  * descended from the root type.
5757  *
5758  * Returns: immediate child of @root_type and anchestor of @leaf_type
5759  */
5760
5761
5762 /**
5763  * g_type_parent:
5764  * @type: the derived type
5765  *
5766  * Return the direct parent type of the passed in type. If the passed
5767  * in type has no parent, i.e. is a fundamental type, 0 is returned.
5768  *
5769  * Returns: the parent type
5770  */
5771
5772
5773 /**
5774  * g_type_plugin_complete_interface_info:
5775  * @plugin: the #GTypePlugin
5776  * @instance_type: the #GType of an instantiable type to which the interface
5777  *  is added
5778  * @interface_type: the #GType of the interface whose info is completed
5779  * @info: the #GInterfaceInfo to fill in
5780  *
5781  * Calls the @complete_interface_info function from the
5782  * #GTypePluginClass of @plugin. There should be no need to use this
5783  * function outside of the GObject type system itself.
5784  */
5785
5786
5787 /**
5788  * g_type_plugin_complete_type_info:
5789  * @plugin: a #GTypePlugin
5790  * @g_type: the #GType whose info is completed
5791  * @info: the #GTypeInfo struct to fill in
5792  * @value_table: the #GTypeValueTable to fill in
5793  *
5794  * Calls the @complete_type_info function from the #GTypePluginClass of @plugin.
5795  * There should be no need to use this function outside of the GObject
5796  * type system itself.
5797  */
5798
5799
5800 /**
5801  * g_type_plugin_unuse:
5802  * @plugin: a #GTypePlugin
5803  *
5804  * Calls the @unuse_plugin function from the #GTypePluginClass of
5805  * @plugin.  There should be no need to use this function outside of
5806  * the GObject type system itself.
5807  */
5808
5809
5810 /**
5811  * g_type_plugin_use:
5812  * @plugin: a #GTypePlugin
5813  *
5814  * Calls the @use_plugin function from the #GTypePluginClass of
5815  * @plugin.  There should be no need to use this function outside of
5816  * the GObject type system itself.
5817  */
5818
5819
5820 /**
5821  * g_type_qname:
5822  * @type: type to return quark of type name for
5823  *
5824  * Get the corresponding quark of the type IDs name.
5825  *
5826  * Returns: the type names quark or 0
5827  */
5828
5829
5830 /**
5831  * g_type_query:
5832  * @type: #GType of a static, classed type
5833  * @query: (out caller-allocates): a user provided structure that is
5834  *     filled in with constant values upon success
5835  *
5836  * Queries the type system for information about a specific type.
5837  * This function will fill in a user-provided structure to hold
5838  * type-specific information. If an invalid #GType is passed in, the
5839  * @type member of the #GTypeQuery is 0. All members filled into the
5840  * #GTypeQuery structure should be considered constant and have to be
5841  * left untouched.
5842  */
5843
5844
5845 /**
5846  * g_type_register_dynamic:
5847  * @parent_type: type from which this type will be derived
5848  * @type_name: 0-terminated string used as the name of the new type
5849  * @plugin: #GTypePlugin structure to retrieve the #GTypeInfo from
5850  * @flags: bitwise combination of #GTypeFlags values
5851  *
5852  * Registers @type_name as the name of a new dynamic type derived from
5853  * @parent_type.  The type system uses the information contained in the
5854  * #GTypePlugin structure pointed to by @plugin to manage the type and its
5855  * instances (if not abstract).  The value of @flags determines the nature
5856  * (e.g. abstract or not) of the type.
5857  *
5858  * Returns: the new type identifier or #G_TYPE_INVALID if registration failed
5859  */
5860
5861
5862 /**
5863  * g_type_register_fundamental:
5864  * @type_id: a predefined type identifier
5865  * @type_name: 0-terminated string used as the name of the new type
5866  * @info: #GTypeInfo structure for this type
5867  * @finfo: #GTypeFundamentalInfo structure for this type
5868  * @flags: bitwise combination of #GTypeFlags values
5869  *
5870  * Registers @type_id as the predefined identifier and @type_name as the
5871  * name of a fundamental type. If @type_id is already registered, or a
5872  * type named @type_name is already registered, the behaviour is undefined.
5873  * The type system uses the information contained in the #GTypeInfo structure
5874  * pointed to by @info and the #GTypeFundamentalInfo structure pointed to by
5875  * @finfo to manage the type and its instances. The value of @flags determines
5876  * additional characteristics of the fundamental type.
5877  *
5878  * Returns: the predefined type identifier
5879  */
5880
5881
5882 /**
5883  * g_type_register_static:
5884  * @parent_type: type from which this type will be derived
5885  * @type_name: 0-terminated string used as the name of the new type
5886  * @info: #GTypeInfo structure for this type
5887  * @flags: bitwise combination of #GTypeFlags values
5888  *
5889  * Registers @type_name as the name of a new static type derived from
5890  * @parent_type. The type system uses the information contained in the
5891  * #GTypeInfo structure pointed to by @info to manage the type and its
5892  * instances (if not abstract). The value of @flags determines the nature
5893  * (e.g. abstract or not) of the type.
5894  *
5895  * Returns: the new type identifier
5896  */
5897
5898
5899 /**
5900  * g_type_register_static_simple: (skip)
5901  * @parent_type: type from which this type will be derived
5902  * @type_name: 0-terminated string used as the name of the new type
5903  * @class_size: size of the class structure (see #GTypeInfo)
5904  * @class_init: location of the class initialization function (see #GTypeInfo)
5905  * @instance_size: size of the instance structure (see #GTypeInfo)
5906  * @instance_init: location of the instance initialization function (see #GTypeInfo)
5907  * @flags: bitwise combination of #GTypeFlags values
5908  *
5909  * Registers @type_name as the name of a new static type derived from
5910  * @parent_type.  The value of @flags determines the nature (e.g.
5911  * abstract or not) of the type. It works by filling a #GTypeInfo
5912  * struct and calling g_type_register_static().
5913  *
5914  * Since: 2.12
5915  * Returns: the new type identifier
5916  */
5917
5918
5919 /**
5920  * g_type_remove_class_cache_func: (skip)
5921  * @cache_data: data that was given when adding @cache_func
5922  * @cache_func: a #GTypeClassCacheFunc
5923  *
5924  * Removes a previously installed #GTypeClassCacheFunc. The cache
5925  * maintained by @cache_func has to be empty when calling
5926  * g_type_remove_class_cache_func() to avoid leaks.
5927  */
5928
5929
5930 /**
5931  * g_type_remove_interface_check: (skip)
5932  * @check_data: callback data passed to g_type_add_interface_check()
5933  * @check_func: callback function passed to g_type_add_interface_check()
5934  *
5935  * Removes an interface check function added with
5936  * g_type_add_interface_check().
5937  *
5938  * Since: 2.4
5939  */
5940
5941
5942 /**
5943  * g_type_set_qdata:
5944  * @type: a #GType
5945  * @quark: a #GQuark id to identify the data
5946  * @data: the data
5947  *
5948  * Attaches arbitrary data to a type.
5949  */
5950
5951
5952 /**
5953  * g_type_value_table_peek: (skip)
5954  * @type: a #GType
5955  *
5956  * Returns the location of the #GTypeValueTable associated with @type.
5957  *
5958  * Note that this function should only be used from source code
5959  * that implements or has internal knowledge of the implementation of
5960  * @type.
5961  *
5962  * Returns: location of the #GTypeValueTable associated with @type or
5963  *     %NULL if there is no #GTypeValueTable associated with @type
5964  */
5965
5966
5967 /**
5968  * g_value_array_append:
5969  * @value_array: #GValueArray to add an element to
5970  * @value: (allow-none): #GValue to copy into #GValueArray, or %NULL
5971  *
5972  * Insert a copy of @value as last element of @value_array. If @value is
5973  * %NULL, an uninitialized value is appended.
5974  *
5975  * Returns: (transfer none): the #GValueArray passed in as @value_array
5976  * Deprecated: 2.32: Use #GArray and g_array_append_val() instead.
5977  */
5978
5979
5980 /**
5981  * g_value_array_copy:
5982  * @value_array: #GValueArray to copy
5983  *
5984  * Construct an exact copy of a #GValueArray by duplicating all its
5985  * contents.
5986  *
5987  * Returns: (transfer full): Newly allocated copy of #GValueArray
5988  * Deprecated: 2.32: Use #GArray and g_array_ref() instead.
5989  */
5990
5991
5992 /**
5993  * g_value_array_free:
5994  * @value_array: #GValueArray to free
5995  *
5996  * Free a #GValueArray including its contents.
5997  *
5998  * Deprecated: 2.32: Use #GArray and g_array_unref() instead.
5999  */
6000
6001
6002 /**
6003  * g_value_array_get_nth:
6004  * @value_array: #GValueArray to get a value from
6005  * @index_: index of the value of interest
6006  *
6007  * Return a pointer to the value at @index_ containd in @value_array.
6008  *
6009  * Returns: (transfer none): pointer to a value at @index_ in @value_array
6010  * Deprecated: 2.32: Use g_array_index() instead.
6011  */
6012
6013
6014 /**
6015  * g_value_array_insert:
6016  * @value_array: #GValueArray to add an element to
6017  * @index_: insertion position, must be <= value_array->;n_values
6018  * @value: (allow-none): #GValue to copy into #GValueArray, or %NULL
6019  *
6020  * Insert a copy of @value at specified position into @value_array. If @value
6021  * is %NULL, an uninitialized value is inserted.
6022  *
6023  * Returns: (transfer none): the #GValueArray passed in as @value_array
6024  * Deprecated: 2.32: Use #GArray and g_array_insert_val() instead.
6025  */
6026
6027
6028 /**
6029  * g_value_array_new:
6030  * @n_prealloced: number of values to preallocate space for
6031  *
6032  * Allocate and initialize a new #GValueArray, optionally preserve space
6033  * for @n_prealloced elements. New arrays always contain 0 elements,
6034  * regardless of the value of @n_prealloced.
6035  *
6036  * Returns: a newly allocated #GValueArray with 0 values
6037  * Deprecated: 2.32: Use #GArray and g_array_sized_new() instead.
6038  */
6039
6040
6041 /**
6042  * g_value_array_prepend:
6043  * @value_array: #GValueArray to add an element to
6044  * @value: (allow-none): #GValue to copy into #GValueArray, or %NULL
6045  *
6046  * Insert a copy of @value as first element of @value_array. If @value is
6047  * %NULL, an uninitialized value is prepended.
6048  *
6049  * Returns: (transfer none): the #GValueArray passed in as @value_array
6050  * Deprecated: 2.32: Use #GArray and g_array_prepend_val() instead.
6051  */
6052
6053
6054 /**
6055  * g_value_array_remove:
6056  * @value_array: #GValueArray to remove an element from
6057  * @index_: position of value to remove, which must be less than
6058  *     @value_array->n_values
6059  *
6060  * Remove the value at position @index_ from @value_array.
6061  *
6062  * Returns: (transfer none): the #GValueArray passed in as @value_array
6063  * Deprecated: 2.32: Use #GArray and g_array_remove_index() instead.
6064  */
6065
6066
6067 /**
6068  * g_value_array_sort:
6069  * @value_array: #GValueArray to sort
6070  * @compare_func: (scope call): function to compare elements
6071  *
6072  * Sort @value_array using @compare_func to compare the elements according to
6073  * the semantics of #GCompareFunc.
6074  *
6075  * The current implementation uses the same sorting algorithm as standard
6076  * C qsort() function.
6077  *
6078  * Returns: (transfer none): the #GValueArray passed in as @value_array
6079  * Deprecated: 2.32: Use #GArray and g_array_sort().
6080  */
6081
6082
6083 /**
6084  * g_value_array_sort_with_data: (rename-to g_value_array_sort)
6085  * @value_array: #GValueArray to sort
6086  * @compare_func: (scope call): function to compare elements
6087  * @user_data: (closure): extra data argument provided for @compare_func
6088  *
6089  * Sort @value_array using @compare_func to compare the elements according
6090  * to the semantics of #GCompareDataFunc.
6091  *
6092  * The current implementation uses the same sorting algorithm as standard
6093  * C qsort() function.
6094  *
6095  * Returns: (transfer none): the #GValueArray passed in as @value_array
6096  * Deprecated: 2.32: Use #GArray and g_array_sort_with_data().
6097  */
6098
6099
6100 /**
6101  * g_value_copy:
6102  * @src_value: An initialized #GValue structure.
6103  * @dest_value: An initialized #GValue structure of the same type as @src_value.
6104  *
6105  * Copies the value of @src_value into @dest_value.
6106  */
6107
6108
6109 /**
6110  * g_value_dup_boxed: (skip)
6111  * @value: a valid #GValue of %G_TYPE_BOXED derived type
6112  *
6113  * Get the contents of a %G_TYPE_BOXED derived #GValue.  Upon getting,
6114  * the boxed value is duplicated and needs to be later freed with
6115  * g_boxed_free(), e.g. like: g_boxed_free (G_VALUE_TYPE (@value),
6116  * return_value);
6117  *
6118  * Returns: boxed contents of @value
6119  */
6120
6121
6122 /**
6123  * g_value_dup_object:
6124  * @value: a valid #GValue whose type is derived from %G_TYPE_OBJECT
6125  *
6126  * Get the contents of a %G_TYPE_OBJECT derived #GValue, increasing
6127  * its reference count. If the contents of the #GValue are %NULL, then
6128  * %NULL will be returned.
6129  *
6130  * Returns: (type GObject.Object) (transfer full): object content of @value,
6131  *          should be unreferenced when no longer needed.
6132  */
6133
6134
6135 /**
6136  * g_value_dup_param: (skip)
6137  * @value: a valid #GValue whose type is derived from %G_TYPE_PARAM
6138  *
6139  * Get the contents of a %G_TYPE_PARAM #GValue, increasing its
6140  * reference count.
6141  *
6142  * Returns: #GParamSpec content of @value, should be unreferenced when
6143  *          no longer needed.
6144  */
6145
6146
6147 /**
6148  * g_value_dup_string:
6149  * @value: a valid #GValue of type %G_TYPE_STRING
6150  *
6151  * Get a copy the contents of a %G_TYPE_STRING #GValue.
6152  *
6153  * Returns: a newly allocated copy of the string content of @value
6154  */
6155
6156
6157 /**
6158  * g_value_dup_variant:
6159  * @value: a valid #GValue of type %G_TYPE_VARIANT
6160  *
6161  * Get the contents of a variant #GValue, increasing its refcount.
6162  *
6163  * Returns: variant contents of @value, should be unrefed using
6164  *   g_variant_unref() when no longer needed
6165  * Since: 2.26
6166  */
6167
6168
6169 /**
6170  * g_value_fits_pointer:
6171  * @value: An initialized #GValue structure.
6172  *
6173  * Determines if @value will fit inside the size of a pointer value.
6174  * This is an internal function introduced mainly for C marshallers.
6175  *
6176  * Returns: %TRUE if @value will fit inside a pointer value.
6177  */
6178
6179
6180 /**
6181  * g_value_get_boolean:
6182  * @value: a valid #GValue of type %G_TYPE_BOOLEAN
6183  *
6184  * Get the contents of a %G_TYPE_BOOLEAN #GValue.
6185  *
6186  * Returns: boolean contents of @value
6187  */
6188
6189
6190 /**
6191  * g_value_get_boxed:
6192  * @value: a valid #GValue of %G_TYPE_BOXED derived type
6193  *
6194  * Get the contents of a %G_TYPE_BOXED derived #GValue.
6195  *
6196  * Returns: (transfer none): boxed contents of @value
6197  */
6198
6199
6200 /**
6201  * g_value_get_char:
6202  * @value: a valid #GValue of type %G_TYPE_CHAR
6203  *
6204  * Do not use this function; it is broken on platforms where the %char
6205  * type is unsigned, such as ARM and PowerPC.  See g_value_get_schar().
6206  *
6207  * Get the contents of a %G_TYPE_CHAR #GValue.
6208  *
6209  * Returns: character contents of @value
6210  * Deprecated: 2.32: This function's return type is broken, see g_value_get_schar()
6211  */
6212
6213
6214 /**
6215  * g_value_get_double:
6216  * @value: a valid #GValue of type %G_TYPE_DOUBLE
6217  *
6218  * Get the contents of a %G_TYPE_DOUBLE #GValue.
6219  *
6220  * Returns: double contents of @value
6221  */
6222
6223
6224 /**
6225  * g_value_get_enum:
6226  * @value: a valid #GValue whose type is derived from %G_TYPE_ENUM
6227  *
6228  * Get the contents of a %G_TYPE_ENUM #GValue.
6229  *
6230  * Returns: enum contents of @value
6231  */
6232
6233
6234 /**
6235  * g_value_get_flags:
6236  * @value: a valid #GValue whose type is derived from %G_TYPE_FLAGS
6237  *
6238  * Get the contents of a %G_TYPE_FLAGS #GValue.
6239  *
6240  * Returns: flags contents of @value
6241  */
6242
6243
6244 /**
6245  * g_value_get_float:
6246  * @value: a valid #GValue of type %G_TYPE_FLOAT
6247  *
6248  * Get the contents of a %G_TYPE_FLOAT #GValue.
6249  *
6250  * Returns: float contents of @value
6251  */
6252
6253
6254 /**
6255  * g_value_get_gtype:
6256  * @value: a valid #GValue of type %G_TYPE_GTYPE
6257  *
6258  * Get the contents of a %G_TYPE_GTYPE #GValue.
6259  *
6260  * Since: 2.12
6261  * Returns: the #GType stored in @value
6262  */
6263
6264
6265 /**
6266  * g_value_get_int:
6267  * @value: a valid #GValue of type %G_TYPE_INT
6268  *
6269  * Get the contents of a %G_TYPE_INT #GValue.
6270  *
6271  * Returns: integer contents of @value
6272  */
6273
6274
6275 /**
6276  * g_value_get_int64:
6277  * @value: a valid #GValue of type %G_TYPE_INT64
6278  *
6279  * Get the contents of a %G_TYPE_INT64 #GValue.
6280  *
6281  * Returns: 64bit integer contents of @value
6282  */
6283
6284
6285 /**
6286  * g_value_get_long:
6287  * @value: a valid #GValue of type %G_TYPE_LONG
6288  *
6289  * Get the contents of a %G_TYPE_LONG #GValue.
6290  *
6291  * Returns: long integer contents of @value
6292  */
6293
6294
6295 /**
6296  * g_value_get_object:
6297  * @value: a valid #GValue of %G_TYPE_OBJECT derived type
6298  *
6299  * Get the contents of a %G_TYPE_OBJECT derived #GValue.
6300  *
6301  * Returns: (type GObject.Object) (transfer none): object contents of @value
6302  */
6303
6304
6305 /**
6306  * g_value_get_param:
6307  * @value: a valid #GValue whose type is derived from %G_TYPE_PARAM
6308  *
6309  * Get the contents of a %G_TYPE_PARAM #GValue.
6310  *
6311  * Returns: (transfer none): #GParamSpec content of @value
6312  */
6313
6314
6315 /**
6316  * g_value_get_pointer:
6317  * @value: a valid #GValue of %G_TYPE_POINTER
6318  *
6319  * Get the contents of a pointer #GValue.
6320  *
6321  * Returns: (transfer none): pointer contents of @value
6322  */
6323
6324
6325 /**
6326  * g_value_get_schar:
6327  * @value: a valid #GValue of type %G_TYPE_CHAR
6328  *
6329  * Get the contents of a %G_TYPE_CHAR #GValue.
6330  *
6331  * Returns: signed 8 bit integer contents of @value
6332  * Since: 2.32
6333  */
6334
6335
6336 /**
6337  * g_value_get_string:
6338  * @value: a valid #GValue of type %G_TYPE_STRING
6339  *
6340  * Get the contents of a %G_TYPE_STRING #GValue.
6341  *
6342  * Returns: string content of @value
6343  */
6344
6345
6346 /**
6347  * g_value_get_uchar:
6348  * @value: a valid #GValue of type %G_TYPE_UCHAR
6349  *
6350  * Get the contents of a %G_TYPE_UCHAR #GValue.
6351  *
6352  * Returns: unsigned character contents of @value
6353  */
6354
6355
6356 /**
6357  * g_value_get_uint:
6358  * @value: a valid #GValue of type %G_TYPE_UINT
6359  *
6360  * Get the contents of a %G_TYPE_UINT #GValue.
6361  *
6362  * Returns: unsigned integer contents of @value
6363  */
6364
6365
6366 /**
6367  * g_value_get_uint64:
6368  * @value: a valid #GValue of type %G_TYPE_UINT64
6369  *
6370  * Get the contents of a %G_TYPE_UINT64 #GValue.
6371  *
6372  * Returns: unsigned 64bit integer contents of @value
6373  */
6374
6375
6376 /**
6377  * g_value_get_ulong:
6378  * @value: a valid #GValue of type %G_TYPE_ULONG
6379  *
6380  * Get the contents of a %G_TYPE_ULONG #GValue.
6381  *
6382  * Returns: unsigned long integer contents of @value
6383  */
6384
6385
6386 /**
6387  * g_value_get_variant:
6388  * @value: a valid #GValue of type %G_TYPE_VARIANT
6389  *
6390  * Get the contents of a variant #GValue.
6391  *
6392  * Returns: variant contents of @value
6393  * Since: 2.26
6394  */
6395
6396
6397 /**
6398  * g_value_init:
6399  * @value: A zero-filled (uninitialized) #GValue structure.
6400  * @g_type: Type the #GValue should hold values of.
6401  *
6402  * Initializes @value with the default value of @type.
6403  *
6404  * Returns: (transfer none): the #GValue structure that has been passed in
6405  */
6406
6407
6408 /**
6409  * g_value_init_from_instance:
6410  * @value: An uninitialized #GValue structure.
6411  * @instance: (type GObject.TypeInstance): the instance
6412  *
6413  * Initializes and sets @value from an instantiatable type via the
6414  * value_table's collect_value() function.
6415  *
6416  * Note: The @value will be initialised with the exact type of
6417  * @instance.  If you wish to set the @value's type to a different GType
6418  * (such as a parent class GType), you need to manually call
6419  * g_value_init() and g_value_set_instance().
6420  *
6421  * Since: 2.42
6422  */
6423
6424
6425 /**
6426  * g_value_peek_pointer:
6427  * @value: An initialized #GValue structure
6428  *
6429  * Returns the value contents as pointer. This function asserts that
6430  * g_value_fits_pointer() returned %TRUE for the passed in value.
6431  * This is an internal function introduced mainly for C marshallers.
6432  *
6433  * Returns: (transfer none): the value contents as pointer
6434  */
6435
6436
6437 /**
6438  * g_value_register_transform_func: (skip)
6439  * @src_type: Source type.
6440  * @dest_type: Target type.
6441  * @transform_func: a function which transforms values of type @src_type
6442  *  into value of type @dest_type
6443  *
6444  * Registers a value transformation function for use in g_value_transform().
6445  * A previously registered transformation function for @src_type and @dest_type
6446  * will be replaced.
6447  */
6448
6449
6450 /**
6451  * g_value_reset:
6452  * @value: An initialized #GValue structure.
6453  *
6454  * Clears the current value in @value and resets it to the default value
6455  * (as if the value had just been initialized).
6456  *
6457  * Returns: the #GValue structure that has been passed in
6458  */
6459
6460
6461 /**
6462  * g_value_set_boolean:
6463  * @value: a valid #GValue of type %G_TYPE_BOOLEAN
6464  * @v_boolean: boolean value to be set
6465  *
6466  * Set the contents of a %G_TYPE_BOOLEAN #GValue to @v_boolean.
6467  */
6468
6469
6470 /**
6471  * g_value_set_boxed:
6472  * @value: a valid #GValue of %G_TYPE_BOXED derived type
6473  * @v_boxed: (allow-none): boxed value to be set
6474  *
6475  * Set the contents of a %G_TYPE_BOXED derived #GValue to @v_boxed.
6476  */
6477
6478
6479 /**
6480  * g_value_set_boxed_take_ownership:
6481  * @value: a valid #GValue of %G_TYPE_BOXED derived type
6482  * @v_boxed: (allow-none): duplicated unowned boxed value to be set
6483  *
6484  * This is an internal function introduced mainly for C marshallers.
6485  *
6486  * Deprecated: 2.4: Use g_value_take_boxed() instead.
6487  */
6488
6489
6490 /**
6491  * g_value_set_char:
6492  * @value: a valid #GValue of type %G_TYPE_CHAR
6493  * @v_char: character value to be set
6494  *
6495  * Set the contents of a %G_TYPE_CHAR #GValue to @v_char.
6496  *
6497  * Deprecated: 2.32: This function's input type is broken, see g_value_set_schar()
6498  */
6499
6500
6501 /**
6502  * g_value_set_double:
6503  * @value: a valid #GValue of type %G_TYPE_DOUBLE
6504  * @v_double: double value to be set
6505  *
6506  * Set the contents of a %G_TYPE_DOUBLE #GValue to @v_double.
6507  */
6508
6509
6510 /**
6511  * g_value_set_enum:
6512  * @value: a valid #GValue whose type is derived from %G_TYPE_ENUM
6513  * @v_enum: enum value to be set
6514  *
6515  * Set the contents of a %G_TYPE_ENUM #GValue to @v_enum.
6516  */
6517
6518
6519 /**
6520  * g_value_set_flags:
6521  * @value: a valid #GValue whose type is derived from %G_TYPE_FLAGS
6522  * @v_flags: flags value to be set
6523  *
6524  * Set the contents of a %G_TYPE_FLAGS #GValue to @v_flags.
6525  */
6526
6527
6528 /**
6529  * g_value_set_float:
6530  * @value: a valid #GValue of type %G_TYPE_FLOAT
6531  * @v_float: float value to be set
6532  *
6533  * Set the contents of a %G_TYPE_FLOAT #GValue to @v_float.
6534  */
6535
6536
6537 /**
6538  * g_value_set_gtype:
6539  * @value: a valid #GValue of type %G_TYPE_GTYPE
6540  * @v_gtype: #GType to be set
6541  *
6542  * Set the contents of a %G_TYPE_GTYPE #GValue to @v_gtype.
6543  *
6544  * Since: 2.12
6545  */
6546
6547
6548 /**
6549  * g_value_set_instance:
6550  * @value: An initialized #GValue structure.
6551  * @instance: (allow-none): the instance
6552  *
6553  * Sets @value from an instantiatable type via the
6554  * value_table's collect_value() function.
6555  */
6556
6557
6558 /**
6559  * g_value_set_int:
6560  * @value: a valid #GValue of type %G_TYPE_INT
6561  * @v_int: integer value to be set
6562  *
6563  * Set the contents of a %G_TYPE_INT #GValue to @v_int.
6564  */
6565
6566
6567 /**
6568  * g_value_set_int64:
6569  * @value: a valid #GValue of type %G_TYPE_INT64
6570  * @v_int64: 64bit integer value to be set
6571  *
6572  * Set the contents of a %G_TYPE_INT64 #GValue to @v_int64.
6573  */
6574
6575
6576 /**
6577  * g_value_set_long:
6578  * @value: a valid #GValue of type %G_TYPE_LONG
6579  * @v_long: long integer value to be set
6580  *
6581  * Set the contents of a %G_TYPE_LONG #GValue to @v_long.
6582  */
6583
6584
6585 /**
6586  * g_value_set_object:
6587  * @value: a valid #GValue of %G_TYPE_OBJECT derived type
6588  * @v_object: (type GObject.Object) (allow-none): object value to be set
6589  *
6590  * Set the contents of a %G_TYPE_OBJECT derived #GValue to @v_object.
6591  *
6592  * g_value_set_object() increases the reference count of @v_object
6593  * (the #GValue holds a reference to @v_object).  If you do not wish
6594  * to increase the reference count of the object (i.e. you wish to
6595  * pass your current reference to the #GValue because you no longer
6596  * need it), use g_value_take_object() instead.
6597  *
6598  * It is important that your #GValue holds a reference to @v_object (either its
6599  * own, or one it has taken) to ensure that the object won't be destroyed while
6600  * the #GValue still exists).
6601  */
6602
6603
6604 /**
6605  * g_value_set_object_take_ownership: (skip)
6606  * @value: a valid #GValue of %G_TYPE_OBJECT derived type
6607  * @v_object: (allow-none): object value to be set
6608  *
6609  * This is an internal function introduced mainly for C marshallers.
6610  *
6611  * Deprecated: 2.4: Use g_value_take_object() instead.
6612  */
6613
6614
6615 /**
6616  * g_value_set_param:
6617  * @value: a valid #GValue of type %G_TYPE_PARAM
6618  * @param: (allow-none): the #GParamSpec to be set
6619  *
6620  * Set the contents of a %G_TYPE_PARAM #GValue to @param.
6621  */
6622
6623
6624 /**
6625  * g_value_set_param_take_ownership: (skip)
6626  * @value: a valid #GValue of type %G_TYPE_PARAM
6627  * @param: (allow-none): the #GParamSpec to be set
6628  *
6629  * This is an internal function introduced mainly for C marshallers.
6630  *
6631  * Deprecated: 2.4: Use g_value_take_param() instead.
6632  */
6633
6634
6635 /**
6636  * g_value_set_pointer:
6637  * @value: a valid #GValue of %G_TYPE_POINTER
6638  * @v_pointer: pointer value to be set
6639  *
6640  * Set the contents of a pointer #GValue to @v_pointer.
6641  */
6642
6643
6644 /**
6645  * g_value_set_schar:
6646  * @value: a valid #GValue of type %G_TYPE_CHAR
6647  * @v_char: signed 8 bit integer to be set
6648  *
6649  * Set the contents of a %G_TYPE_CHAR #GValue to @v_char.
6650  *
6651  * Since: 2.32
6652  */
6653
6654
6655 /**
6656  * g_value_set_static_boxed:
6657  * @value: a valid #GValue of %G_TYPE_BOXED derived type
6658  * @v_boxed: (allow-none): static boxed value to be set
6659  *
6660  * Set the contents of a %G_TYPE_BOXED derived #GValue to @v_boxed.
6661  * The boxed value is assumed to be static, and is thus not duplicated
6662  * when setting the #GValue.
6663  */
6664
6665
6666 /**
6667  * g_value_set_static_string:
6668  * @value: a valid #GValue of type %G_TYPE_STRING
6669  * @v_string: (allow-none): static string to be set
6670  *
6671  * Set the contents of a %G_TYPE_STRING #GValue to @v_string.
6672  * The string is assumed to be static, and is thus not duplicated
6673  * when setting the #GValue.
6674  */
6675
6676
6677 /**
6678  * g_value_set_string:
6679  * @value: a valid #GValue of type %G_TYPE_STRING
6680  * @v_string: (allow-none): caller-owned string to be duplicated for the #GValue
6681  *
6682  * Set the contents of a %G_TYPE_STRING #GValue to @v_string.
6683  */
6684
6685
6686 /**
6687  * g_value_set_string_take_ownership:
6688  * @value: a valid #GValue of type %G_TYPE_STRING
6689  * @v_string: (allow-none): duplicated unowned string to be set
6690  *
6691  * This is an internal function introduced mainly for C marshallers.
6692  *
6693  * Deprecated: 2.4: Use g_value_take_string() instead.
6694  */
6695
6696
6697 /**
6698  * g_value_set_uchar:
6699  * @value: a valid #GValue of type %G_TYPE_UCHAR
6700  * @v_uchar: unsigned character value to be set
6701  *
6702  * Set the contents of a %G_TYPE_UCHAR #GValue to @v_uchar.
6703  */
6704
6705
6706 /**
6707  * g_value_set_uint:
6708  * @value: a valid #GValue of type %G_TYPE_UINT
6709  * @v_uint: unsigned integer value to be set
6710  *
6711  * Set the contents of a %G_TYPE_UINT #GValue to @v_uint.
6712  */
6713
6714
6715 /**
6716  * g_value_set_uint64:
6717  * @value: a valid #GValue of type %G_TYPE_UINT64
6718  * @v_uint64: unsigned 64bit integer value to be set
6719  *
6720  * Set the contents of a %G_TYPE_UINT64 #GValue to @v_uint64.
6721  */
6722
6723
6724 /**
6725  * g_value_set_ulong:
6726  * @value: a valid #GValue of type %G_TYPE_ULONG
6727  * @v_ulong: unsigned long integer value to be set
6728  *
6729  * Set the contents of a %G_TYPE_ULONG #GValue to @v_ulong.
6730  */
6731
6732
6733 /**
6734  * g_value_set_variant:
6735  * @value: a valid #GValue of type %G_TYPE_VARIANT
6736  * @variant: (allow-none): a #GVariant, or %NULL
6737  *
6738  * Set the contents of a variant #GValue to @variant.
6739  * If the variant is floating, it is consumed.
6740  *
6741  * Since: 2.26
6742  */
6743
6744
6745 /**
6746  * g_value_take_boxed:
6747  * @value: a valid #GValue of %G_TYPE_BOXED derived type
6748  * @v_boxed: (allow-none): duplicated unowned boxed value to be set
6749  *
6750  * Sets the contents of a %G_TYPE_BOXED derived #GValue to @v_boxed
6751  * and takes over the ownership of the callers reference to @v_boxed;
6752  * the caller doesn't have to unref it any more.
6753  *
6754  * Since: 2.4
6755  */
6756
6757
6758 /**
6759  * g_value_take_object: (skip)
6760  * @value: a valid #GValue of %G_TYPE_OBJECT derived type
6761  * @v_object: (allow-none): object value to be set
6762  *
6763  * Sets the contents of a %G_TYPE_OBJECT derived #GValue to @v_object
6764  * and takes over the ownership of the callers reference to @v_object;
6765  * the caller doesn't have to unref it any more (i.e. the reference
6766  * count of the object is not increased).
6767  *
6768  * If you want the #GValue to hold its own reference to @v_object, use
6769  * g_value_set_object() instead.
6770  *
6771  * Since: 2.4
6772  */
6773
6774
6775 /**
6776  * g_value_take_param: (skip)
6777  * @value: a valid #GValue of type %G_TYPE_PARAM
6778  * @param: (allow-none): the #GParamSpec to be set
6779  *
6780  * Sets the contents of a %G_TYPE_PARAM #GValue to @param and takes
6781  * over the ownership of the callers reference to @param; the caller
6782  * doesn't have to unref it any more.
6783  *
6784  * Since: 2.4
6785  */
6786
6787
6788 /**
6789  * g_value_take_string:
6790  * @value: a valid #GValue of type %G_TYPE_STRING
6791  * @v_string: (allow-none): string to take ownership of
6792  *
6793  * Sets the contents of a %G_TYPE_STRING #GValue to @v_string.
6794  *
6795  * Since: 2.4
6796  */
6797
6798
6799 /**
6800  * g_value_take_variant:
6801  * @value: a valid #GValue of type %G_TYPE_VARIANT
6802  * @variant: (nullable) (transfer full): a #GVariant, or %NULL
6803  *
6804  * Set the contents of a variant #GValue to @variant, and takes over
6805  * the ownership of the caller's reference to @variant;
6806  * the caller doesn't have to unref it any more (i.e. the reference
6807  * count of the variant is not increased).
6808  *
6809  * If @variant was floating then its floating reference is converted to
6810  * a hard reference.
6811  *
6812  * If you want the #GValue to hold its own reference to @variant, use
6813  * g_value_set_variant() instead.
6814  *
6815  * This is an internal function introduced mainly for C marshallers.
6816  *
6817  * Since: 2.26
6818  */
6819
6820
6821 /**
6822  * g_value_transform:
6823  * @src_value: Source value.
6824  * @dest_value: Target value.
6825  *
6826  * Tries to cast the contents of @src_value into a type appropriate
6827  * to store in @dest_value, e.g. to transform a %G_TYPE_INT value
6828  * into a %G_TYPE_FLOAT value. Performing transformations between
6829  * value types might incur precision lossage. Especially
6830  * transformations into strings might reveal seemingly arbitrary
6831  * results and shouldn't be relied upon for production code (such
6832  * as rcfile value or object property serialization).
6833  *
6834  * Returns: Whether a transformation rule was found and could be applied.
6835  *  Upon failing transformations, @dest_value is left untouched.
6836  */
6837
6838
6839 /**
6840  * g_value_type_compatible:
6841  * @src_type: source type to be copied.
6842  * @dest_type: destination type for copying.
6843  *
6844  * Returns whether a #GValue of type @src_type can be copied into
6845  * a #GValue of type @dest_type.
6846  *
6847  * Returns: %TRUE if g_value_copy() is possible with @src_type and @dest_type.
6848  */
6849
6850
6851 /**
6852  * g_value_type_transformable:
6853  * @src_type: Source type.
6854  * @dest_type: Target type.
6855  *
6856  * Check whether g_value_transform() is able to transform values
6857  * of type @src_type into values of type @dest_type. Note that for
6858  * the types to be transformable, they must be compatible or a
6859  * transformation function must be registered.
6860  *
6861  * Returns: %TRUE if the transformation is possible, %FALSE otherwise.
6862  */
6863
6864
6865 /**
6866  * g_value_unset:
6867  * @value: An initialized #GValue structure.
6868  *
6869  * Clears the current value in @value (if any) and "unsets" the type,
6870  * this releases all resources associated with this GValue. An unset
6871  * value is the same as an uninitialized (zero-filled) #GValue
6872  * structure.
6873  */
6874
6875
6876 /**
6877  * g_weak_ref_clear: (skip)
6878  * @weak_ref: (inout): location of a weak reference, which
6879  *  may be empty
6880  *
6881  * Frees resources associated with a non-statically-allocated #GWeakRef.
6882  * After this call, the #GWeakRef is left in an undefined state.
6883  *
6884  * You should only call this on a #GWeakRef that previously had
6885  * g_weak_ref_init() called on it.
6886  *
6887  * Since: 2.32
6888  */
6889
6890
6891 /**
6892  * g_weak_ref_get: (skip)
6893  * @weak_ref: (inout): location of a weak reference to a #GObject
6894  *
6895  * If @weak_ref is not empty, atomically acquire a strong
6896  * reference to the object it points to, and return that reference.
6897  *
6898  * This function is needed because of the potential race between taking
6899  * the pointer value and g_object_ref() on it, if the object was losing
6900  * its last reference at the same time in a different thread.
6901  *
6902  * The caller should release the resulting reference in the usual way,
6903  * by using g_object_unref().
6904  *
6905  * Returns: (transfer full) (type GObject.Object): the object pointed to
6906  *     by @weak_ref, or %NULL if it was empty
6907  * Since: 2.32
6908  */
6909
6910
6911 /**
6912  * g_weak_ref_init: (skip)
6913  * @weak_ref: (inout): uninitialized or empty location for a weak
6914  *    reference
6915  * @object: (type GObject.Object) (nullable): a #GObject or %NULL
6916  *
6917  * Initialise a non-statically-allocated #GWeakRef.
6918  *
6919  * This function also calls g_weak_ref_set() with @object on the
6920  * freshly-initialised weak reference.
6921  *
6922  * This function should always be matched with a call to
6923  * g_weak_ref_clear().  It is not necessary to use this function for a
6924  * #GWeakRef in static storage because it will already be
6925  * properly initialised.  Just use g_weak_ref_set() directly.
6926  *
6927  * Since: 2.32
6928  */
6929
6930
6931 /**
6932  * g_weak_ref_set: (skip)
6933  * @weak_ref: location for a weak reference
6934  * @object: (type GObject.Object) (nullable): a #GObject or %NULL
6935  *
6936  * Change the object to which @weak_ref points, or set it to
6937  * %NULL.
6938  *
6939  * You must own a strong reference on @object while calling this
6940  * function.
6941  *
6942  * Since: 2.32
6943  */
6944
6945
6946
6947 /************************************************************/
6948 /* THIS FILE IS GENERATED DO NOT EDIT */
6949 /************************************************************/