file: functions.aus

class: GObjectClosureMarshalCallback

[642:7] extends: object

The type used for marshaller functions.

Members

Methods

class: GObjectBaseFinalizeFuncCallback

[16:7] extends: object

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 initialization is performed. See GClassInitFunc() for a discussion of the class initialization process.

Members

Methods

class: GObjectInterfaceInitFuncCallback

[939:7] extends: object

A callback function used by the type system to initialize a new interface. This function should initialize all internal data and* allocate any resources required by the interface. The members of @iface_data are guaranteed to have been filled with zeros before this function is called.

Members

Methods

class: GObjectTypePluginCompleteInterfaceInfoCallback

[1592:7] extends: object

The type of the @complete_interface_info function of #GTypePluginClass.

Members

Methods

class: GObjectTypeValueCopyFuncCallback

[1882:7] extends: object

Copies the content of a #GValue into another. The @dest_value is a #GValue with zero-filled data section and @src_value is a properly initialized #GValue of same type, or derived type. The purpose of this function is to copy the contents of @src_value into @dest_value in a way, that even after @src_value has been freed, the contents of @dest_value remain valid. String type example: |[ dest_value->data[0].v_pointer = g_strdup (src_value->data[0].v_pointer); ]|

Members

Methods

class: GObjectClassInitFuncCallback

[572:7] extends: object

A callback function used by the type system to initialize the class of a specific type. This function should initialize all static class members. The initialization process of a class involves: - Copying common members from the parent class over to the derived class structure. - Zero initialization of the remaining members not copied over from the parent class. - Invocation of the GBaseInitFunc() initializers of all parent types and the class' type. - Invocation of the class' GClassInitFunc() initializer. Since derived classes are partially initialized through a memory copy of the parent class, the general rule is that GBaseInitFunc() and GBaseFinalizeFunc() should take care of necessary reinitialization and release of those class members that were introduced by the type that specified these GBaseInitFunc()/GBaseFinalizeFunc(). GClassInitFunc() should only care about initializing static class members, while dynamic class members (such as allocated strings or reference counted resources) are better handled by a GBaseInitFunc() for this type, so proper initialization of the dynamic class members is performed for class initialization of derived types as well. An example may help to correspond the intend of the different class initializers: |[ typedef struct { GObjectClass parent_class; gint static_integer; gchar *dynamic_string; } TypeAClass; static void type_a_base_class_init (TypeAClass *class) { class->dynamic_string = g_strdup ("some string"); } static void type_a_base_class_finalize (TypeAClass *class) { g_free (class->dynamic_string); } static void type_a_class_init (TypeAClass *class) { class->static_integer = 42; } typedef struct { TypeAClass parent_class; gfloat static_float; GString *dynamic_gstring; } TypeBClass; static void type_b_base_class_init (TypeBClass *class) { class->dynamic_gstring = g_string_new ("some other string"); } static void type_b_base_class_finalize (TypeBClass *class) { g_string_free (class->dynamic_gstring); } static void type_b_class_init (TypeBClass *class) { class->static_float = 3.14159265358979323846; } ]| Initialization of TypeBClass will first cause initialization of TypeAClass (derived classes reference their parent classes, see g_type_class_ref() on this). Initialization of TypeAClass roughly involves zero-initializing its fields, then calling its GBaseInitFunc() type_a_base_class_init() to allocate its dynamic members (dynamic_string), and finally calling its GClassInitFunc() type_a_class_init() to initialize its static members (static_integer). The first step in the initialization process of TypeBClass is then a plain memory copy of the contents of TypeAClass into TypeBClass and zero-initialization of the remaining fields in TypeBClass. The dynamic members of TypeAClass within TypeBClass now need reinitialization which is performed by calling type_a_base_class_init() with an argument of TypeBClass. After that, the GBaseInitFunc() of TypeBClass, type_b_base_class_init() is called to allocate the dynamic members of TypeBClass (dynamic_gstring), and finally the GClassInitFunc() of TypeBClass, type_b_class_init(), is called to complete the initialization process with the static members (static_float). Corresponding finalization counter parts to the GBaseInitFunc() functions have to be provided to release allocated resources at class finalization time.

Members

Methods

class: GObjectWeakNotifyCallback

[2263:7] extends: object

A #GWeakNotify function can be added to an object as a callback that gets triggered when the object is finalized. Since the object is already being disposed when the #GWeakNotify is called, there's not much you could do with the object, apart from e.g. using its address as hash-index or the like. In particular, this means it’s invalid to call g_object_ref(), g_weak_ref_init(), g_weak_ref_set(), g_object_add_toggle_ref(), g_object_weak_ref(), g_object_add_weak_pointer() or any function which calls them on the object from this callback.

Members

Methods

class: GObjectValueTransformCallback

[2185:7] extends: object

The type of value transformation functions which can be registered with [func@GObject.Value.register_transform_func]. @dest_value will be initialized to the correct destination type.

Members

Methods

class: GObjectCallbackCallback

[382:7] extends: object

The type used for callback functions in structure definitions and function signatures. This doesn't mean that all callback functions must take no parameters and return void. The required signature of a callback function is determined by the context in which is used (e.g. the signal to which it is connected). Use G_CALLBACK() to cast the callback function to a #GCallback.

Members

Methods

class: GObjectBoxedCopyFuncCallback

[239:7] extends: object

This function is provided by the user and should produce a copy of the passed in boxed structure.

Members

Methods

class: GObjectTypePluginCompleteTypeInfoCallback

[1663:7] extends: object

The type of the @complete_type_info function of #GTypePluginClass.

Members

Methods

class: GObjectSignalEmissionHookCallback

[1302:7] extends: object

A simple function pointer to get invoked when the signal is emitted. Emission hooks allow you to tie a hook to the signal type, so that it will trap all emissions of that signal, from any object. You may not attach these to signals created with the %G_SIGNAL_NO_HOOKS flag.

Members

Methods

class: GObjectObjectSetPropertyFuncCallback

[1151:7] extends: object

The type of the @set_property function of #GObjectClass.

Members

Methods

class: GObjectTypePluginUnuseCallback

[1735:7] extends: object

The type of the @unuse_plugin function of #GTypePluginClass.

Members

Methods

class: GObjectObjectGetPropertyFuncCallback

[1079:7] extends: object

The type of the @get_property function of #GObjectClass.

Members

Methods

class: GObjectSignalAccumulatorCallback

[1228:7] extends: object

The signal accumulator is a special callback function that can be used to collect return values of the various callbacks that are called during a signal emission. The signal accumulator is specified at signal creation time, if it is left %NULL, no accumulation of callback return values is performed. The return value of signal emissions is then the value returned by the last callback.

Members

Methods

class: GObjectObjectFinalizeFuncCallback

[1009:7] extends: object

The type of the @finalize function of #GObjectClass.

Members

Methods

class: GObjectTypePluginUseCallback

[1806:7] extends: object

The type of the @use_plugin function of #GTypePluginClass, which gets called to increase the use count of @plugin.

Members

Methods

class: GObjectBoxedFreeFuncCallback

[309:7] extends: object

This function is provided by the user and should free the boxed structure passed.

Members

Methods

class: GObjectTypeValuePeekPointerFuncCallback

[2113:7] extends: object

If the value contents fit into a pointer, such as objects or strings, return this pointer, so the caller can peek at the current contents. To extend on our above string example: |[ return value->data[0].v_pointer; ]|

Members

Methods

class: GObjectApi

[2333:14] static extends: object

Generated low-level function wrappers for namespace GObject.

Members

Methods

class: GObjectBaseInitFuncCallback

[92:7] extends: object

A callback function used by the type system to do base initialization of the class structures of derived types. This function is called as part of the initialization process of all derived classes and should reallocate or reset all dynamic class members copied over from the parent class. 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 initialization process.

Members

Methods

class: GObjectClosureNotifyCallback

[716:7] extends: object

The type used for the various notification callbacks which can be registered on closures.

Members

Methods

class: GObjectClassFinalizeFuncCallback

[456:7] extends: object

A callback function used by the type system to finalize a class. This function is rarely needed, as dynamically allocated class resources should be handled by GBaseInitFunc() and GBaseFinalizeFunc(). Also, specification of a GClassFinalizeFunc() in the #GTypeInfo structure of a static type is invalid, because classes of static types will never be finalized (they are artificially kept alive when their reference count drops to zero).

Members

Methods

class: GObjectTypeClassCacheFuncCallback

[1451:7] extends: object

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 being freed. You should not call g_type_class_unref() from a #GTypeClassCacheFunc function to prevent infinite recursion, use g_type_class_unref_uncached() instead. The functions have to check the class id passed in to figure whether they actually want to cache the class of this type, since all classes are routed through the same #GTypeClassCacheFunc chain.

Members

Methods

class: GObjectTypeValueFreeFuncCallback

[1965:7] extends: object

Frees any old contents that might be left in the value->data array of the given value. No resources may remain allocated through the #GValue contents after this function returns. E.g. for our above string type: |[ // only free strings without a specific flag for static storage if (!(value->data[1].v_uint & G_VALUE_NOCOPY_CONTENTS)) g_free (value->data[0].v_pointer); ]|

Members

Methods

class: GObjectTypeValueInitFuncCallback

[2040:7] extends: object

Initializes the value contents by setting the fields of the value->data array. The data array of the #GValue passed into this function was zero-filled with memset(), so no care has to be taken to free any old contents. For example, in the case of a string value that may never be %NULL, the implementation might look like: |[ value->data[0].v_pointer = g_strdup (""); ]|

Members

Methods

class: GObjectInterfaceFinalizeFuncCallback

[866:7] extends: object

A callback function used by the type system to finalize an interface. This function should destroy any internal data and release any resources allocated by the corresponding GInterfaceInitFunc() function.

Members

Methods

class: GObjectTypeInterfaceCheckFuncCallback

[1522:7] extends: object

A callback called after an interface vtable is initialized. See g_type_add_interface_check().

Members

Methods

class: GObjectToggleNotifyCallback

[1374:7] extends: object

A callback function used for notification when the state of a toggle reference changes. See also: g_object_add_toggle_ref()

Members

Methods

class: GObjectBindingTransformFuncCallback

[166:7] extends: object

A function to be called to transform @from_value to @to_value. If this is the @transform_to function of a binding, then @from_value is the @source_property on the @source object, and @to_value is the @target_property on the @target object. If this is the @transform_from function of a %G_BINDING_BIDIRECTIONAL binding, then those roles are reversed.

Members

Methods

class: GObjectInstanceInitFuncCallback

[793:7] extends: object

A callback function used by the type system to initialize a new instance of a type. This function initializes all instance members and allocates any resources required by it. Initialization of a derived instance involves calling all its parent types instance initializers, so the class member of the instance is altered during its initialization to always point to the class that belongs to the type the current initializer was introduced for. The extended members of @instance are guaranteed to have been filled with zeros before this function is called.

Members

Methods