mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-29 13:23:31 +02:00
glib: Add missing (nullable) and (optional) annotations
Add various (nullable) and (optional) annotations which were missing from a variety of functions. Also port a couple of existing (allow-none) annotations in the same files to use (nullable) and (optional) as appropriate instead. Secondly, add various (not nullable) annotations as needed by the new default in gobject-introspection of marking gpointers as (nullable). See https://bugzilla.gnome.org/show_bug.cgi?id=729660. This includes adding some stub documentation comments for the assertion macro error functions, which weren’t previously documented. The new comments are purely to allow for annotations, and hence are marked as (skip) to prevent the symbols appearing in the GIR file. https://bugzilla.gnome.org/show_bug.cgi?id=719966
This commit is contained in:
@@ -322,11 +322,12 @@ g_boxed_type_register_static (const gchar *name,
|
||||
/**
|
||||
* g_boxed_copy:
|
||||
* @boxed_type: The type of @src_boxed.
|
||||
* @src_boxed: The boxed structure to be copied.
|
||||
* @src_boxed: (not nullable): The boxed structure to be copied.
|
||||
*
|
||||
* Provide a copy of a boxed structure @src_boxed which is of type @boxed_type.
|
||||
*
|
||||
* Returns: (transfer full): The newly created copy of the boxed structure.
|
||||
* Returns: (transfer full) (not nullable): The newly created copy of the boxed
|
||||
* structure.
|
||||
*/
|
||||
gpointer
|
||||
g_boxed_copy (GType boxed_type,
|
||||
@@ -383,7 +384,7 @@ g_boxed_copy (GType boxed_type,
|
||||
/**
|
||||
* g_boxed_free:
|
||||
* @boxed_type: The type of @boxed.
|
||||
* @boxed: The boxed structure to be freed.
|
||||
* @boxed: (not nullable): The boxed structure to be freed.
|
||||
*
|
||||
* Free the boxed structure @boxed which is of type @boxed_type.
|
||||
*/
|
||||
|
@@ -46,18 +46,18 @@ G_BEGIN_DECLS
|
||||
/* --- typedefs --- */
|
||||
/**
|
||||
* GBoxedCopyFunc:
|
||||
* @boxed: The boxed structure to be copied.
|
||||
* @boxed: (not nullable): The boxed structure to be copied.
|
||||
*
|
||||
* This function is provided by the user and should produce a copy
|
||||
* of the passed in boxed structure.
|
||||
*
|
||||
* Returns: The newly created copy of the boxed structure.
|
||||
* Returns: (not nullable): The newly created copy of the boxed structure.
|
||||
*/
|
||||
typedef gpointer (*GBoxedCopyFunc) (gpointer boxed);
|
||||
|
||||
/**
|
||||
* GBoxedFreeFunc:
|
||||
* @boxed: The boxed structure to be freed.
|
||||
* @boxed: (not nullable): The boxed structure to be freed.
|
||||
*
|
||||
* This function is provided by the user and should free the boxed
|
||||
* structure passed.
|
||||
|
@@ -319,7 +319,8 @@ g_closure_set_meta_va_marshal (GClosure *closure,
|
||||
/**
|
||||
* g_closure_set_meta_marshal: (skip)
|
||||
* @closure: a #GClosure
|
||||
* @marshal_data: context-dependent data to pass to @meta_marshal
|
||||
* @marshal_data: (closure meta_marshal): context-dependent data to pass
|
||||
* to @meta_marshal
|
||||
* @meta_marshal: a #GClosureMarshal function
|
||||
*
|
||||
* Sets the meta marshaller of @closure. A meta marshaller wraps
|
||||
@@ -360,9 +361,11 @@ g_closure_set_meta_marshal (GClosure *closure,
|
||||
/**
|
||||
* g_closure_add_marshal_guards: (skip)
|
||||
* @closure: a #GClosure
|
||||
* @pre_marshal_data: data to pass to @pre_marshal_notify
|
||||
* @pre_marshal_data: (closure pre_marshal_notify): data to pass
|
||||
* to @pre_marshal_notify
|
||||
* @pre_marshal_notify: a function to call before the closure callback
|
||||
* @post_marshal_data: data to pass to @post_marshal_notify
|
||||
* @post_marshal_data: (closure post_marshal_notify): data to pass
|
||||
* to @post_marshal_notify
|
||||
* @post_marshal_notify: a function to call after the closure callback
|
||||
*
|
||||
* Adds a pair of notifiers which get invoked before and after the
|
||||
@@ -417,7 +420,7 @@ g_closure_add_marshal_guards (GClosure *closure,
|
||||
/**
|
||||
* g_closure_add_finalize_notifier: (skip)
|
||||
* @closure: a #GClosure
|
||||
* @notify_data: data to pass to @notify_func
|
||||
* @notify_data: (closure notify_func): data to pass to @notify_func
|
||||
* @notify_func: the callback function to register
|
||||
*
|
||||
* Registers a finalization notifier which will be called when the
|
||||
@@ -453,7 +456,7 @@ g_closure_add_finalize_notifier (GClosure *closure,
|
||||
/**
|
||||
* g_closure_add_invalidate_notifier: (skip)
|
||||
* @closure: a #GClosure
|
||||
* @notify_data: data to pass to @notify_func
|
||||
* @notify_data: (closure notify_func): data to pass to @notify_func
|
||||
* @notify_func: the callback function to register
|
||||
*
|
||||
* Registers an invalidation notifier which will be called when the
|
||||
@@ -921,7 +924,7 @@ _g_closure_set_va_marshal (GClosure *closure,
|
||||
/**
|
||||
* g_cclosure_new: (skip)
|
||||
* @callback_func: the function to invoke
|
||||
* @user_data: user data to pass to @callback_func
|
||||
* @user_data: (closure callback_func): user data to pass to @callback_func
|
||||
* @destroy_data: destroy notify to be called when @user_data is no longer used
|
||||
*
|
||||
* Creates a new closure which invokes @callback_func with @user_data as
|
||||
@@ -949,7 +952,7 @@ g_cclosure_new (GCallback callback_func,
|
||||
/**
|
||||
* g_cclosure_new_swap: (skip)
|
||||
* @callback_func: the function to invoke
|
||||
* @user_data: user data to pass to @callback_func
|
||||
* @user_data: (closure callback_func): user data to pass to @callback_func
|
||||
* @destroy_data: destroy notify to be called when @user_data is no longer used
|
||||
*
|
||||
* Creates a new closure which invokes @callback_func with @user_data as
|
||||
@@ -1496,7 +1499,8 @@ g_cclosure_marshal_generic (GClosure *closure,
|
||||
* @return_value: (allow-none): a #GValue to store the return
|
||||
* value. May be %NULL if the callback of @closure doesn't return a
|
||||
* value.
|
||||
* @instance: the instance on which the closure is invoked.
|
||||
* @instance: (type GObject.TypeInstance): the instance on which the closure is
|
||||
* invoked.
|
||||
* @args_list: va_list of arguments to be passed to the closure.
|
||||
* @marshal_data: (allow-none): additional data specified when
|
||||
* registering the marshaller, see g_closure_set_marshal() and
|
||||
|
@@ -125,7 +125,8 @@ typedef void (*GClosureMarshal) (GClosure *closure,
|
||||
* @return_value: (allow-none): a #GValue to store the return
|
||||
* value. May be %NULL if the callback of @closure doesn't return a
|
||||
* value.
|
||||
* @instance: the instance on which the closure is invoked.
|
||||
* @instance: (type GObject.TypeInstance): the instance on which the closure is
|
||||
* invoked.
|
||||
* @args: va_list of arguments to be passed to the closure.
|
||||
* @marshal_data: (allow-none): additional data specified when
|
||||
* registering the marshaller, see g_closure_set_marshal() and
|
||||
|
@@ -426,7 +426,7 @@
|
||||
* @return_value: (allow-none): a #GValue to store the return
|
||||
* value. May be %NULL if the callback of @closure doesn't return a
|
||||
* value.
|
||||
* @instance: the instance on which the closure is invoked.
|
||||
* @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
|
||||
* @args: va_list of arguments to be passed to the closure.
|
||||
* @marshal_data: (allow-none): additional data specified when
|
||||
* registering the marshaller, see g_closure_set_marshal() and
|
||||
@@ -444,7 +444,7 @@
|
||||
* @return_value: (allow-none): a #GValue to store the return
|
||||
* value. May be %NULL if the callback of @closure doesn't return a
|
||||
* value.
|
||||
* @instance: the instance on which the closure is invoked.
|
||||
* @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
|
||||
* @args: va_list of arguments to be passed to the closure.
|
||||
* @marshal_data: (allow-none): additional data specified when
|
||||
* registering the marshaller, see g_closure_set_marshal() and
|
||||
@@ -461,7 +461,7 @@
|
||||
* @return_value: (allow-none): a #GValue to store the return
|
||||
* value. May be %NULL if the callback of @closure doesn't return a
|
||||
* value.
|
||||
* @instance: the instance on which the closure is invoked.
|
||||
* @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
|
||||
* @args: va_list of arguments to be passed to the closure.
|
||||
* @marshal_data: (allow-none): additional data specified when
|
||||
* registering the marshaller, see g_closure_set_marshal() and
|
||||
@@ -478,7 +478,7 @@
|
||||
* @return_value: (allow-none): a #GValue to store the return
|
||||
* value. May be %NULL if the callback of @closure doesn't return a
|
||||
* value.
|
||||
* @instance: the instance on which the closure is invoked.
|
||||
* @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
|
||||
* @args: va_list of arguments to be passed to the closure.
|
||||
* @marshal_data: (allow-none): additional data specified when
|
||||
* registering the marshaller, see g_closure_set_marshal() and
|
||||
@@ -495,7 +495,7 @@
|
||||
* @return_value: (allow-none): a #GValue to store the return
|
||||
* value. May be %NULL if the callback of @closure doesn't return a
|
||||
* value.
|
||||
* @instance: the instance on which the closure is invoked.
|
||||
* @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
|
||||
* @args: va_list of arguments to be passed to the closure.
|
||||
* @marshal_data: (allow-none): additional data specified when
|
||||
* registering the marshaller, see g_closure_set_marshal() and
|
||||
@@ -512,7 +512,7 @@
|
||||
* @return_value: (allow-none): a #GValue to store the return
|
||||
* value. May be %NULL if the callback of @closure doesn't return a
|
||||
* value.
|
||||
* @instance: the instance on which the closure is invoked.
|
||||
* @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
|
||||
* @args: va_list of arguments to be passed to the closure.
|
||||
* @marshal_data: (allow-none): additional data specified when
|
||||
* registering the marshaller, see g_closure_set_marshal() and
|
||||
@@ -529,7 +529,7 @@
|
||||
* @return_value: (allow-none): a #GValue to store the return
|
||||
* value. May be %NULL if the callback of @closure doesn't return a
|
||||
* value.
|
||||
* @instance: the instance on which the closure is invoked.
|
||||
* @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
|
||||
* @args: va_list of arguments to be passed to the closure.
|
||||
* @marshal_data: (allow-none): additional data specified when
|
||||
* registering the marshaller, see g_closure_set_marshal() and
|
||||
@@ -546,7 +546,7 @@
|
||||
* @return_value: (allow-none): a #GValue to store the return
|
||||
* value. May be %NULL if the callback of @closure doesn't return a
|
||||
* value.
|
||||
* @instance: the instance on which the closure is invoked.
|
||||
* @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
|
||||
* @args: va_list of arguments to be passed to the closure.
|
||||
* @marshal_data: (allow-none): additional data specified when
|
||||
* registering the marshaller, see g_closure_set_marshal() and
|
||||
@@ -563,7 +563,7 @@
|
||||
* @return_value: (allow-none): a #GValue to store the return
|
||||
* value. May be %NULL if the callback of @closure doesn't return a
|
||||
* value.
|
||||
* @instance: the instance on which the closure is invoked.
|
||||
* @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
|
||||
* @args: va_list of arguments to be passed to the closure.
|
||||
* @marshal_data: (allow-none): additional data specified when
|
||||
* registering the marshaller, see g_closure_set_marshal() and
|
||||
@@ -580,7 +580,7 @@
|
||||
* @return_value: (allow-none): a #GValue to store the return
|
||||
* value. May be %NULL if the callback of @closure doesn't return a
|
||||
* value.
|
||||
* @instance: the instance on which the closure is invoked.
|
||||
* @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
|
||||
* @args: va_list of arguments to be passed to the closure.
|
||||
* @marshal_data: (allow-none): additional data specified when
|
||||
* registering the marshaller, see g_closure_set_marshal() and
|
||||
@@ -597,7 +597,7 @@
|
||||
* @return_value: (allow-none): a #GValue to store the return
|
||||
* value. May be %NULL if the callback of @closure doesn't return a
|
||||
* value.
|
||||
* @instance: the instance on which the closure is invoked.
|
||||
* @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
|
||||
* @args: va_list of arguments to be passed to the closure.
|
||||
* @marshal_data: (allow-none): additional data specified when
|
||||
* registering the marshaller, see g_closure_set_marshal() and
|
||||
@@ -614,7 +614,7 @@
|
||||
* @return_value: (allow-none): a #GValue to store the return
|
||||
* value. May be %NULL if the callback of @closure doesn't return a
|
||||
* value.
|
||||
* @instance: the instance on which the closure is invoked.
|
||||
* @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
|
||||
* @args: va_list of arguments to be passed to the closure.
|
||||
* @marshal_data: (allow-none): additional data specified when
|
||||
* registering the marshaller, see g_closure_set_marshal() and
|
||||
@@ -631,7 +631,7 @@
|
||||
* @return_value: (allow-none): a #GValue to store the return
|
||||
* value. May be %NULL if the callback of @closure doesn't return a
|
||||
* value.
|
||||
* @instance: the instance on which the closure is invoked.
|
||||
* @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
|
||||
* @args: va_list of arguments to be passed to the closure.
|
||||
* @marshal_data: (allow-none): additional data specified when
|
||||
* registering the marshaller, see g_closure_set_marshal() and
|
||||
@@ -648,7 +648,7 @@
|
||||
* @return_value: (allow-none): a #GValue to store the return
|
||||
* value. May be %NULL if the callback of @closure doesn't return a
|
||||
* value.
|
||||
* @instance: the instance on which the closure is invoked.
|
||||
* @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
|
||||
* @args: va_list of arguments to be passed to the closure.
|
||||
* @marshal_data: (allow-none): additional data specified when
|
||||
* registering the marshaller, see g_closure_set_marshal() and
|
||||
@@ -665,7 +665,7 @@
|
||||
* @return_value: (allow-none): a #GValue to store the return
|
||||
* value. May be %NULL if the callback of @closure doesn't return a
|
||||
* value.
|
||||
* @instance: the instance on which the closure is invoked.
|
||||
* @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
|
||||
* @args: va_list of arguments to be passed to the closure.
|
||||
* @marshal_data: (allow-none): additional data specified when
|
||||
* registering the marshaller, see g_closure_set_marshal() and
|
||||
@@ -682,7 +682,7 @@
|
||||
* @return_value: (allow-none): a #GValue to store the return
|
||||
* value. May be %NULL if the callback of @closure doesn't return a
|
||||
* value.
|
||||
* @instance: the instance on which the closure is invoked.
|
||||
* @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
|
||||
* @args: va_list of arguments to be passed to the closure.
|
||||
* @marshal_data: (allow-none): additional data specified when
|
||||
* registering the marshaller, see g_closure_set_marshal() and
|
||||
@@ -699,7 +699,7 @@
|
||||
* @return_value: (allow-none): a #GValue to store the return
|
||||
* value. May be %NULL if the callback of @closure doesn't return a
|
||||
* value.
|
||||
* @instance: the instance on which the closure is invoked.
|
||||
* @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
|
||||
* @args: va_list of arguments to be passed to the closure.
|
||||
* @marshal_data: (allow-none): additional data specified when
|
||||
* registering the marshaller, see g_closure_set_marshal() and
|
||||
@@ -716,7 +716,7 @@
|
||||
* @return_value: (allow-none): a #GValue to store the return
|
||||
* value. May be %NULL if the callback of @closure doesn't return a
|
||||
* value.
|
||||
* @instance: the instance on which the closure is invoked.
|
||||
* @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
|
||||
* @args: va_list of arguments to be passed to the closure.
|
||||
* @marshal_data: (allow-none): additional data specified when
|
||||
* registering the marshaller, see g_closure_set_marshal() and
|
||||
@@ -733,7 +733,7 @@
|
||||
* @return_value: (allow-none): a #GValue to store the return
|
||||
* value. May be %NULL if the callback of @closure doesn't return a
|
||||
* value.
|
||||
* @instance: the instance on which the closure is invoked.
|
||||
* @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
|
||||
* @args: va_list of arguments to be passed to the closure.
|
||||
* @marshal_data: (allow-none): additional data specified when
|
||||
* registering the marshaller, see g_closure_set_marshal() and
|
||||
@@ -750,7 +750,7 @@
|
||||
* @return_value: (allow-none): a #GValue to store the return
|
||||
* value. May be %NULL if the callback of @closure doesn't return a
|
||||
* value.
|
||||
* @instance: the instance on which the closure is invoked.
|
||||
* @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
|
||||
* @args: va_list of arguments to be passed to the closure.
|
||||
* @marshal_data: (allow-none): additional data specified when
|
||||
* registering the marshaller, see g_closure_set_marshal() and
|
||||
@@ -767,7 +767,7 @@
|
||||
* @return_value: (allow-none): a #GValue to store the return
|
||||
* value. May be %NULL if the callback of @closure doesn't return a
|
||||
* value.
|
||||
* @instance: the instance on which the closure is invoked.
|
||||
* @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
|
||||
* @args: va_list of arguments to be passed to the closure.
|
||||
* @marshal_data: (allow-none): additional data specified when
|
||||
* registering the marshaller, see g_closure_set_marshal() and
|
||||
@@ -784,7 +784,7 @@
|
||||
* @return_value: (allow-none): a #GValue to store the return
|
||||
* value. May be %NULL if the callback of @closure doesn't return a
|
||||
* value.
|
||||
* @instance: the instance on which the closure is invoked.
|
||||
* @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
|
||||
* @args: va_list of arguments to be passed to the closure.
|
||||
* @marshal_data: (allow-none): additional data specified when
|
||||
* registering the marshaller, see g_closure_set_marshal() and
|
||||
|
@@ -702,7 +702,8 @@ g_object_class_install_properties (GObjectClass *oclass,
|
||||
|
||||
/**
|
||||
* g_object_interface_install_property:
|
||||
* @g_iface: any interface vtable for the interface, or the default
|
||||
* @g_iface: (type GObject.TypeInterface): any interface vtable for the
|
||||
* interface, or the default
|
||||
* vtable for the interface.
|
||||
* @pspec: the #GParamSpec for the new property
|
||||
*
|
||||
@@ -781,8 +782,8 @@ g_object_class_find_property (GObjectClass *class,
|
||||
|
||||
/**
|
||||
* g_object_interface_find_property:
|
||||
* @g_iface: any interface vtable for the interface, or the default
|
||||
* vtable for the interface
|
||||
* @g_iface: (type GObject.TypeInterface): any interface vtable for the
|
||||
* interface, or the default vtable for the interface
|
||||
* @property_name: name of a property to lookup.
|
||||
*
|
||||
* Find the #GParamSpec with the given name for an
|
||||
@@ -919,8 +920,8 @@ g_object_class_list_properties (GObjectClass *class,
|
||||
|
||||
/**
|
||||
* g_object_interface_list_properties:
|
||||
* @g_iface: any interface vtable for the interface, or the default
|
||||
* vtable for the interface
|
||||
* @g_iface: (type GObject.TypeInterface): any interface vtable for the
|
||||
* interface, or the default vtable for the interface
|
||||
* @n_properties_p: (out): location to store number of properties returned.
|
||||
*
|
||||
* Lists the properties of an interface.Generally, the interface
|
||||
@@ -1602,7 +1603,8 @@ g_object_get_type (void)
|
||||
* Construction parameters (see #G_PARAM_CONSTRUCT, #G_PARAM_CONSTRUCT_ONLY)
|
||||
* which are not explicitly specified are set to their default values.
|
||||
*
|
||||
* Returns: (transfer full): a new instance of @object_type
|
||||
* Returns: (transfer full) (type GObject.Object) : a new instance of
|
||||
* @object_type
|
||||
*/
|
||||
gpointer
|
||||
g_object_new (GType object_type,
|
||||
@@ -2248,7 +2250,7 @@ g_object_get_valist (GObject *object,
|
||||
|
||||
/**
|
||||
* g_object_set: (skip)
|
||||
* @object: a #GObject
|
||||
* @object: (type GObject.Object): a #GObject
|
||||
* @first_property_name: name of the first property to set
|
||||
* @...: value for the first property, followed optionally by more
|
||||
* name/value pairs, followed by %NULL
|
||||
@@ -2276,7 +2278,7 @@ g_object_set (gpointer _object,
|
||||
|
||||
/**
|
||||
* g_object_get: (skip)
|
||||
* @object: a #GObject
|
||||
* @object: (type GObject.Object): a #GObject
|
||||
* @first_property_name: name of the first property to get
|
||||
* @...: return location for the first property, followed optionally by more
|
||||
* name/return location pairs, followed by %NULL
|
||||
@@ -2452,7 +2454,7 @@ g_object_get_property (GObject *object,
|
||||
|
||||
/**
|
||||
* g_object_connect: (skip)
|
||||
* @object: a #GObject
|
||||
* @object: (type GObject.Object): a #GObject
|
||||
* @signal_spec: the spec for the first signal
|
||||
* @...: #GCallback for the first signal, followed by data for the
|
||||
* first signal, followed optionally by more signal
|
||||
@@ -2482,7 +2484,7 @@ g_object_get_property (GObject *object,
|
||||
* NULL);
|
||||
* ]|
|
||||
*
|
||||
* Returns: (transfer none): @object
|
||||
* Returns: (transfer none) (type GObject.Object): @object
|
||||
*/
|
||||
gpointer
|
||||
g_object_connect (gpointer _object,
|
||||
@@ -2554,7 +2556,7 @@ g_object_connect (gpointer _object,
|
||||
|
||||
/**
|
||||
* g_object_disconnect: (skip)
|
||||
* @object: a #GObject
|
||||
* @object: (type GObject.Object): a #GObject
|
||||
* @signal_spec: the spec for the first signal
|
||||
* @...: #GCallback for the first signal, followed by data for the first signal,
|
||||
* followed optionally by more signal spec/callback/data triples,
|
||||
@@ -2729,7 +2731,8 @@ g_object_weak_unref (GObject *object,
|
||||
/**
|
||||
* g_object_add_weak_pointer: (skip)
|
||||
* @object: The object that should be weak referenced.
|
||||
* @weak_pointer_location: (inout): The memory address of a pointer.
|
||||
* @weak_pointer_location: (inout) (not optional) (nullable): The memory address
|
||||
* of a pointer.
|
||||
*
|
||||
* Adds a weak reference from weak_pointer to @object to indicate that
|
||||
* the pointer located at @weak_pointer_location is only valid during
|
||||
@@ -2756,7 +2759,8 @@ g_object_add_weak_pointer (GObject *object,
|
||||
/**
|
||||
* g_object_remove_weak_pointer: (skip)
|
||||
* @object: The object that is weak referenced.
|
||||
* @weak_pointer_location: (inout): The memory address of a pointer.
|
||||
* @weak_pointer_location: (inout) (not optional) (nullable): The memory address
|
||||
* of a pointer.
|
||||
*
|
||||
* Removes a weak reference from @object that was previously added
|
||||
* using g_object_add_weak_pointer(). The @weak_pointer_location has
|
||||
@@ -3830,10 +3834,11 @@ g_value_dup_object (const GValue *value)
|
||||
|
||||
/**
|
||||
* g_signal_connect_object: (skip)
|
||||
* @instance: the instance to connect to.
|
||||
* @instance: (type GObject.TypeInstance): the instance to connect to.
|
||||
* @detailed_signal: a string of the form "signal-name::detail".
|
||||
* @c_handler: the #GCallback to connect.
|
||||
* @gobject: the object to pass as data to @c_handler.
|
||||
* @gobject: (type GObject.Object) (nullable): the object to pass as data
|
||||
* to @c_handler.
|
||||
* @connect_flags: a combination of #GConnectFlags.
|
||||
*
|
||||
* This is similar to g_signal_connect_data(), but uses a closure which
|
||||
@@ -4140,7 +4145,7 @@ g_initially_unowned_class_init (GInitiallyUnownedClass *klass)
|
||||
* g_weak_ref_init: (skip)
|
||||
* @weak_ref: (inout): uninitialized or empty location for a weak
|
||||
* reference
|
||||
* @object: (allow-none): a #GObject or %NULL
|
||||
* @object: (type GObject.Object) (nullable): a #GObject or %NULL
|
||||
*
|
||||
* Initialise a non-statically-allocated #GWeakRef.
|
||||
*
|
||||
@@ -4226,7 +4231,7 @@ g_weak_ref_get (GWeakRef *weak_ref)
|
||||
/**
|
||||
* g_weak_ref_set: (skip)
|
||||
* @weak_ref: location for a weak reference
|
||||
* @object: (allow-none): a #GObject or %NULL
|
||||
* @object: (type GObject.Object) (nullable): a #GObject or %NULL
|
||||
*
|
||||
* Change the object to which @weak_ref points, or set it to
|
||||
* %NULL.
|
||||
|
@@ -417,7 +417,7 @@ is_canonical (const gchar *key)
|
||||
* @blurb, which should be a somewhat longer description, suitable for
|
||||
* e.g. a tooltip. The @nick and @blurb should ideally be localized.
|
||||
*
|
||||
* Returns: a newly allocated #GParamSpec instance
|
||||
* Returns: (type GObject.ParamSpec): a newly allocated #GParamSpec instance
|
||||
*/
|
||||
gpointer
|
||||
g_param_spec_internal (GType param_type,
|
||||
|
@@ -2112,7 +2112,8 @@ g_signal_chain_from_overridden (const GValue *instance_and_params,
|
||||
|
||||
/**
|
||||
* g_signal_chain_from_overridden_handler: (skip)
|
||||
* @instance: the instance the signal is being emitted on.
|
||||
* @instance: (type GObject.TypeInstance): the instance the signal is being
|
||||
* emitted on.
|
||||
* @...: parameters to be passed to the parent class closure, followed by a
|
||||
* location for the return value. If the return type of the signal
|
||||
* is #G_TYPE_NONE, the return value location can be omitted.
|
||||
@@ -3141,7 +3142,8 @@ accumulate (GSignalInvocationHint *ihint,
|
||||
|
||||
/**
|
||||
* g_signal_emit_valist: (skip)
|
||||
* @instance: the instance the signal is being emitted on.
|
||||
* @instance: (type GObject.TypeInstance): the instance the signal is being
|
||||
* emitted on.
|
||||
* @signal_id: the signal id
|
||||
* @detail: the detail
|
||||
* @var_args: a list of parameters to be passed to the signal, followed by a
|
||||
|
@@ -4502,7 +4502,8 @@ gobject_init_ctor (void)
|
||||
|
||||
/**
|
||||
* g_type_class_add_private:
|
||||
* @g_class: class structure for an instantiatable type
|
||||
* @g_class: (type GObject.TypeClass): class structure for an instantiatable
|
||||
* type
|
||||
* @private_size: size of private structure
|
||||
*
|
||||
* Registers a private structure for an instantiatable type.
|
||||
@@ -4734,7 +4735,7 @@ g_type_instance_get_private (GTypeInstance *instance,
|
||||
|
||||
/**
|
||||
* g_type_class_get_instance_private_offset: (skip)
|
||||
* @g_class: a #GTypeClass
|
||||
* @g_class: (type GObject.TypeClass): a #GTypeClass
|
||||
*
|
||||
* Gets the offset of the private data for instances of @g_class.
|
||||
*
|
||||
|
@@ -629,7 +629,7 @@ struct _GTypeQuery
|
||||
* This macro should only be used in type implementations.
|
||||
*
|
||||
* Since: 2.4
|
||||
* Returns: a pointer to the private data structure
|
||||
* Returns: (not nullable): a pointer to the private data structure
|
||||
*/
|
||||
#define G_TYPE_INSTANCE_GET_PRIVATE(instance, g_type, c_type) ((c_type*) g_type_instance_get_private ((GTypeInstance*) (instance), (g_type)))
|
||||
|
||||
@@ -646,7 +646,7 @@ struct _GTypeQuery
|
||||
* This macro should only be used in type implementations.
|
||||
*
|
||||
* Since: 2.24
|
||||
* Returns: a pointer to the private data structure
|
||||
* Returns: (not nullable): a pointer to the private data structure
|
||||
*/
|
||||
#define G_TYPE_CLASS_GET_PRIVATE(klass, g_type, c_type) ((c_type*) g_type_class_get_private ((GTypeClass*) (klass), (g_type)))
|
||||
|
||||
@@ -746,7 +746,7 @@ int g_type_get_instance_count (GType type);
|
||||
/* --- type registration --- */
|
||||
/**
|
||||
* GBaseInitFunc:
|
||||
* @g_class: The #GTypeClass structure to initialize
|
||||
* @g_class: (type GObject.TypeClass): The #GTypeClass structure to initialize
|
||||
*
|
||||
* A callback function used by the type system to do base initialization
|
||||
* of the class structures of derived types. It is called as part of the
|
||||
@@ -755,23 +755,23 @@ int g_type_get_instance_count (GType type);
|
||||
* For example, class members (such as strings) that are not sufficiently
|
||||
* handled by a plain memory copy of the parent class into the derived class
|
||||
* have to be altered. See GClassInitFunc() for a discussion of the class
|
||||
* intialization process.
|
||||
* initialization process.
|
||||
*/
|
||||
typedef void (*GBaseInitFunc) (gpointer g_class);
|
||||
/**
|
||||
* GBaseFinalizeFunc:
|
||||
* @g_class: The #GTypeClass structure to finalize
|
||||
* @g_class: (type GObject.TypeClass): The #GTypeClass structure to finalize
|
||||
*
|
||||
* A callback function used by the type system to finalize those portions
|
||||
* of a derived types class structure that were setup from the corresponding
|
||||
* GBaseInitFunc() function. Class finalization basically works the inverse
|
||||
* way in which class intialization is performed.
|
||||
* See GClassInitFunc() for a discussion of the class intialization process.
|
||||
* way in which class initialization is performed.
|
||||
* See GClassInitFunc() for a discussion of the class initialization process.
|
||||
*/
|
||||
typedef void (*GBaseFinalizeFunc) (gpointer g_class);
|
||||
/**
|
||||
* GClassInitFunc:
|
||||
* @g_class: The #GTypeClass structure to initialize.
|
||||
* @g_class: (type GObject.TypeClass): The #GTypeClass structure to initialize.
|
||||
* @class_data: The @class_data member supplied via the #GTypeInfo structure.
|
||||
*
|
||||
* A callback function used by the type system to initialize the class
|
||||
@@ -874,7 +874,7 @@ typedef void (*GClassInitFunc) (gpointer g_class,
|
||||
gpointer class_data);
|
||||
/**
|
||||
* GClassFinalizeFunc:
|
||||
* @g_class: The #GTypeClass structure to finalize
|
||||
* @g_class: (type GObject.TypeClass): The #GTypeClass structure to finalize
|
||||
* @class_data: The @class_data member supplied via the #GTypeInfo structure
|
||||
*
|
||||
* A callback function used by the type system to finalize a class.
|
||||
@@ -890,7 +890,8 @@ typedef void (*GClassFinalizeFunc) (gpointer g_class,
|
||||
/**
|
||||
* GInstanceInitFunc:
|
||||
* @instance: The instance to initialize
|
||||
* @g_class: The class of the type the instance is created for
|
||||
* @g_class: (type GObject.TypeClass): The class of the type the instance is
|
||||
* created for
|
||||
*
|
||||
* A callback function used by the type system to initialize a new
|
||||
* instance of a type. This function initializes all instance members and
|
||||
@@ -908,7 +909,7 @@ typedef void (*GInstanceInitFunc) (GTypeInstance *instance,
|
||||
gpointer g_class);
|
||||
/**
|
||||
* GInterfaceInitFunc:
|
||||
* @g_iface: The interface structure to initialize
|
||||
* @g_iface: (type GObject.TypeInterface): The interface structure to initialize
|
||||
* @iface_data: The @interface_data supplied via the #GInterfaceInfo structure
|
||||
*
|
||||
* A callback function used by the type system to initialize a new
|
||||
@@ -922,7 +923,7 @@ typedef void (*GInterfaceInitFunc) (gpointer g_iface,
|
||||
gpointer iface_data);
|
||||
/**
|
||||
* GInterfaceFinalizeFunc:
|
||||
* @g_iface: The interface structure to finalize
|
||||
* @g_iface: (type GObject.TypeInterface): The interface structure to finalize
|
||||
* @iface_data: The @interface_data supplied via the #GInterfaceInfo structure
|
||||
*
|
||||
* A callback function used by the type system to finalize an interface.
|
||||
@@ -934,7 +935,8 @@ typedef void (*GInterfaceFinalizeFunc) (gpointer g_iface,
|
||||
/**
|
||||
* GTypeClassCacheFunc:
|
||||
* @cache_data: data that was given to the g_type_add_class_cache_func() call
|
||||
* @g_class: The #GTypeClass structure which is unreferenced
|
||||
* @g_class: (type GObject.TypeClass): The #GTypeClass structure which is
|
||||
* unreferenced
|
||||
*
|
||||
* A callback function which is called when the reference count of a class
|
||||
* drops to zero. It may use g_type_class_ref() to prevent the class from
|
||||
@@ -954,7 +956,8 @@ typedef gboolean (*GTypeClassCacheFunc) (gpointer cache_data,
|
||||
/**
|
||||
* GTypeInterfaceCheckFunc:
|
||||
* @check_data: data passed to g_type_add_interface_check()
|
||||
* @g_iface: the interface that has been initialized
|
||||
* @g_iface: (type GObject.TypeInterface): the interface that has been
|
||||
* initialized
|
||||
*
|
||||
* A callback called after an interface vtable is initialized.
|
||||
* See g_type_add_interface_check().
|
||||
|
@@ -379,7 +379,7 @@ g_value_set_instance (GValue *value,
|
||||
/**
|
||||
* g_value_init_from_instance:
|
||||
* @value: An uninitialized #GValue structure.
|
||||
* @instance: the instance
|
||||
* @instance: (type GObject.TypeInstance): the instance
|
||||
*
|
||||
* Initializes and sets @value from an instantiatable type via the
|
||||
* value_table's collect_value() function.
|
||||
|
Reference in New Issue
Block a user