[518:7] extends: object
Generated low-level callback wrapper for GIR callback notify.
ObjectNotifyCallback (callback Fn, UserData = null)
Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking
Fn.
Fn is the Aussom callback implementation.UserData is retained and passed through to Fn on each invocation when provided.trampoline (nativeSelf, pspec, nativeUserData)
Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.
callback ()
Returns the wrapped NativeCallback.
handle ()
Returns the callback as a NativeHandle.
close ()
Closes the underlying NativeCallback.
isClosed ()
Returns true when the callback has been closed.
[30:7] extends: object
The base object type. GObject is the fundamental type providing the common
attributes and methods for all object types in GTK, Pango and other libraries
based on GObject. The GObject class provides methods for object
construction and destruction, property access methods, and signal support.
Signals are described in detail here. For a tutorial on
implementing a new GObject class, see How to define and implement a new
GObject. For a list
of naming conventions for GObjects and their methods, see the GType
conventions. For the high-level concepts behind
GObject, read Instantiatable classed types:
Objects. Since GLib
2.72, all GObjects are guaranteed to be aligned to at least the alignment
of the largest basic GLib type (typically this is guint64 or gdouble). If
you need larger alignment for an element in a GObject, you should allocate
it on the heap (aligned), or arrange for your GObject to be appropriately
padded. This guarantee applies to the GObject (or derived) struct, the
GObjectClass (or derived) struct, and any private data allocated by
G_ADD_PRIVATE().
Object (Handle = null)
Creates a new
Objectby wrapping a native handle or another wrapper.
Handle is the native handle or another wrapper whose handle to adopt.toNativeHandle (Source)
Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from
fn.call(...), another generated wrapper exposinghandle(), or null. Returns null when the argument carries no pointer.
Source is the raw handle, raw buffer, wrapper, or null.A raw pointer carrier or null when no pointer is present.getLib ()
Returns the opened native library for this generated wrapper.
The opened native library.handle ()
Returns the wrapped NativeHandle.
The wrapped NativeHandle.isNull ()
Returns true when the wrapped handle is null.
A bool.describe ()
Returns a small string for debugging generated wrappers.
A string.connectSignal (string Name, CallbackObj)
Connects one generated callback wrapper to a named signal.
Name is the signal name.CallbackObj is the generated callback wrapper to connect.The connected handler id.disconnectSignalHandler (int HandlerId)
Disconnects one retained signal handler id.
HandlerId is the signal handler id to disconnect.None.setOnNotify (callback Fn, UserData = null)
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al. Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with %G_PARAM_EXPLICIT_NOTIFY, then any call to g_object_set_property() results in ::notify being emitted, even if the new value is the same as the old. If they did pass %G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed. This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the g_signal_connect() call, like this: |[ g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view) ]| It is important to note that you must use [canonical parameter names][class@GObject.ParamSpec#parameter-names] as detail strings for the notify signal.
Fn is the Aussom callback.Fn is called with (Object Self, ParamSpec Pspec).UserData is retained and passed through to the generated callback wrapper when provided.The connected handler id.bind_property (string source_property, object target, string target_property, string flags)
Creates a binding between @source_property on @source and
on @target. Whenever the @source_property is changed theis updated using the same value. For instance: |[ g_object_bind_property (action, "active", widget, "sensitive", 0); ]| Will result in the "sensitive" property of the widget #GObject instance to be updated with the same value of the "active" property of the action #GObject instance. If @flags contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual: ifon @target changes then the @source_property on @source will be updated as well. The binding will automatically be removed when either the @source or the @target instances are finalized. To remove the binding without affecting the @source and the @target you can just call g_object_unref() on the returned #GBinding instance. Removing the binding by calling g_object_unref() on it must only be done if the binding,and @target are only used from a single thread and it is clear that both @source and @target outlive the binding. Especially it is not safe to rely on this if the binding, @source or @target can be finalized from different threads. Keep another reference to the binding and use g_binding_unbind() instead to be on the safe side. A #GObject can have multiple bindings.source_property is the property on @source to bind.target is the target #GObject.target_property is the property on @target to bind.flags is flags to pass to #GBinding.bind_property_with_closures (string source_property, object target, string target_property, string flags, object transform_to, object transform_from)
Creates a binding between @source_property on @source and
on @target, allowing you to set the transformation functions to be used by the binding. This function is the language bindings friendly version of g_object_bind_property_full(), using #GClosures instead of function pointers.source_property is the property on @source to bind.target is the target #GObject.target_property is the property on @target to bind.flags is flags to pass to #GBinding.transform_to is a #GClosure wrapping the transformation function from the @source to the @target, or %NULL to use the default.transform_from is a #GClosure wrapping the transformation function from the @target to the @source, or %NULL to use the default.force_floating ()
This function is intended for #GObject implementations to re-enforce a floating object reference. Doing this is seldom required: all #GInitiallyUnowneds are created with a floating reference which usually just needs to be sunken by calling g_object_ref_sink().
None.freeze_notify ()
Increases the freeze count on @object. If the freeze count is non-zero, the emission of "notify" signals on @object is stopped. The signals are queued until the freeze count is decreased to zero. Duplicate notifications are squashed so that at most one #GObject::notify signal is emitted for each property modified while the object is frozen. This is necessary for accessors that modify multiple properties to prevent premature notification while the object is still being modified.
None.get_data (string key)
Gets a named field from the objects table of associations (see g_object_set_data()).
key is name of the key for that association.get_property (string property_name, object value)
Gets a property of an object. The @value can be: - an empty #GValue initialized by %G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60) - a #GValue initialized with the expected type of the property - a #GValue initialized with a type to which the expected type of the property can be transformed In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling g_value_unset(). Note that g_object_get_property() is really intended for language bindings, g_object_get() is much more convenient for C programming.
property_name is the name of the property to get.value is return location for the property value.None.is_floating ()
Checks whether @object has a floating reference.
notify (string property_name)
Emits a "notify" signal for the property @property_name on @object. When possible, eg. when signaling a property change from within the class that registered the property, you should use g_object_notify_by_pspec() instead. Note that emission of the notify signal may be blocked with g_object_freeze_notify(). In this case, the signal emissions are queued and will be emitted (in reverse order) when g_object_thaw_notify() is called.
property_name is the name of a property installed on the class ofNone.notify_by_pspec (object pspec)
Emits a "notify" signal for the property specified by @pspec on @object. This function omits the property name lookup, hence it is faster than g_object_notify(). One way to avoid using g_object_notify() from within the class that registered the properties, and using g_object_notify_by_pspec() instead, is to store the GParamSpec used with g_object_class_install_property() inside a static array, e.g.: |[ typedef enum { PROP_FOO = 1, PROP_LAST } MyObjectProperty; static GParamSpec *properties[PROP_LAST]; static void my_object_class_init (MyObjectClass *klass) { properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL, 0, 100, 50, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); g_object_class_install_property (gobject_class, PROP_FOO, properties[PROP_FOO]); } ]| and then notify a change on the "foo" property with: |[ g_object_notify_by_pspec (self, properties[PROP_FOO]); ]|
pspec is the #GParamSpec of a property installed on the class ofNone.ref ()
Increases the reference count of @object. Since GLib 2.56, if
GLIB_VERSION_MAX_ALLOWEDis 2.56 or greater, the type of @object will be propagated to the return type (using the GCC typeof() extension), so any casting the caller needs to do on the return type must be explicit.
ref_sink ()
Increase the reference count of @object, and possibly remove the floating reference, if @object has a floating reference. In other words, if the object is floating, then this call "assumes ownership" of the floating reference, converting it to a normal reference by clearing the floating flag while leaving the reference count unchanged. If the object is not floating, then this call adds a new normal reference increasing the reference count by one. Since GLib 2.56, the type of @object will be propagated to the return type under the same conditions as for g_object_ref().
run_dispose ()
Releases all references to other objects. This can be used to break reference cycles. This function should only be called from object system implementations.
None.set_data (string key, data)
Each object carries around a table of associations from strings to pointers. This function lets you set an association. If the object already had an association with that name, the old association will be destroyed. Internally, the @key is converted to a #GQuark using g_quark_from_string(). This means a copy of @key is kept permanently (even after @object has been finalized) — so it is recommended to only use a small, bounded set of values for @key in your program, to avoid the #GQuark storage growing unbounded.
key is name of the key.data is data to associate with that key.None.set_property (string property_name, object value)
Sets a property on an object.
property_name is the name of the property to set.value is the value.None.steal_data (string key)
Remove a specified datum from the object's data associations, without invoking the association's destroy handler.
key is name of the key.take_ref ()
If @object is floating, sink it. Otherwise, do nothing. In other words, this function will convert a floating reference (if present) into a full reference. Typically you want to use g_object_ref_sink() in order to automatically do the correct thing with respect to floating or non-floating references, but there is one specific scenario where this function is helpful. The situation where this function is helpful is when creating an API that allows the user to provide a callback function that returns a GObject. We certainly want to allow the user the flexibility to return a non-floating reference from this callback (for the case where the object that is being returned already exists). At the same time, the API style of some popular GObject-based libraries (such as Gtk) make it likely that for newly-created GObject instances, the user can be saved some typing if they are allowed to return a floating reference. Using this function on the return value of the user's callback allows the user to do whichever is more convenient for them. The caller will always receives exactly one full reference to the value: either the one that was returned in the first place, or a floating reference that has been converted to a full reference. This function has an odd interaction when combined with g_object_ref_sink() running at the same time in another thread on the same #GObject instance. If g_object_ref_sink() runs first then the result will be that the floating reference is converted to a hard reference. If g_object_take_ref() runs first then the result will be that the floating reference is converted to a hard reference and an additional reference on top of that one is added. It is best to avoid this situation.
thaw_notify ()
Reverts the effect of a previous call to g_object_freeze_notify(). The freeze count is decreased on @object and when it reaches zero, queued "notify" signals are emitted. Duplicate notifications for each property are squashed so that at most one #GObject::notify signal is emitted for each property, in the reverse order in which they have been queued. It is an error to call this function when the freeze count is zero.
None.unref ()
Decreases the reference count of @object. When its reference count drops to 0, the object is finalized (i.e. its memory is freed). If the pointer to the #GObject may be reused in future (for example, if it is an instance variable of another object), it is recommended to clear the pointer to %NULL rather than retain a dangling pointer to a potentially invalid #GObject instance. Use g_clear_object() for this.
None.watch_closure (object closure)
This function essentially limits the life time of the @closure to the life time of the object. That is, when the object is finalized, the
is invalidated by calling g_closure_invalidate() on it, in order to prevent invocations of the closure with a finalized (nonexisting) object. Also, g_object_ref() and g_object_unref() are added as marshal guards to the @closure, to ensure that an extra reference count is held on @object during invocation of the @closure. Usually, this function will be called on closures that use this @object as closure data.closure is #GClosure to watch.None.[589:14] static extends: object
Generated metadata helpers for Object class surfaces.
signals ()
Returns signal metadata for
Object.
A list.