-
public Type get_type ()
-
public weak ObjectClass get_class ()
-
public weak Object ref ()
Increases the reference count of object.
-
public void unref ()
Decreases the reference count of object. When its reference count drops to 0, the object
is finalized (i.e. its memory is freed).
-
public Object ref_sink ()
Increase the reference count of object, and possibly remove the
floating reference, if object has a floating reference.
-
public void weak_ref (WeakNotify notify)
Adds a weak reference callback to an object. Weak references are used for notification when an object
is finalized. They are called "weak references" because they allow you to safely hold a pointer to an object without calling
ref (g_object_ref() adds a strong reference, that is, forces the object to stay
alive).
-
public void weak_unref (WeakNotify notify)
Removes a weak reference callback to an object.
-
public void add_weak_pointer (void** data)
Adds a weak reference from weak_pointer to object to indicate that the pointer located at
weak_pointer_location is only valid during the lifetime of object. When the object is
finalized, weak_pointer will be set to null.
-
public void remove_weak_pointer (void** data)
Removes a weak reference from object that was previously added using
add_weak_pointer. The weak_pointer_location has to match
the one used with add_weak_pointer.
-
public void get (string first_property_name, ...)
Gets properties of an object.
-
public void set (string first_property_name, ...)
Sets properties on an object.
-
public void get_property (string property_name, ref Value value)
Gets a property of an object. value must have been initialized to the expected type of
the property (or a type to which the expected type can be transformed) using
Value.
-
public void set_property (string property_name, Value value)
Sets a property on an object.
-
public weak T get_data<T> (string key)
Gets a named field from the objects table of associations (see g_object_set_data).
-
public void set_data<T> (string key, owned T data)
-
public void set_data_full (string key, void* data, DestroyNotify? destroy)
Like g_object_set_data except it adds notification for when the association is destroyed,
either by setting it to a different value or when the object is destroyed.
-
public T steal_data<T> (string key)
Remove a specified datum from the object's data associations, without invoking the association's
destroy handler.
-
public weak T get_qdata<T> (Quark quark)
This function gets back user data pointers stored via g_object_set_qdata.
-
public void set_qdata<T> (Quark quark, owned T data)
-
public void set_qdata_full (Quark quark, void* data, DestroyNotify? destroy)
This function works like g_object_set_qdata, but in addition, a void (*destroy)
(gpointer) function may be specified which is called with data as argument when the object is finalized,
or the data is being overwritten by a call to g_object_set_qdata with the same quark.
-
public T steal_qdata<T> (Quark quark)
This function gets back user data pointers stored via g_object_set_qdata and removes the
data from object without invoking its destroy function (if any was set). Usually, calling this function is
only required to update user data pointers with a destroy notifier, for example:
-
public void 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.
-
public void thaw_notify ()
Reverts the effect of a previous call to
freeze_notify. The freeze count is decreased on object and when it reaches zero, all queued "notify" signals are
emitted.
-
public virtual void dispose ()
Releases all references to other objects. This can be used to break reference cycles.
-
public virtual void constructed ()
-
public void notify_property (string property_name)
Emits a "notify" signal for the property property_name on object.
-
public weak Object connect (string signal_spec, ...)
-
public void disconnect (ulong handler_id)
-
public void add_toggle_ref (ToggleNotify notify)
Increases the reference count of the object by one and sets a callback to be called when all other
references to the object are dropped, or when this is already the last reference to the object and another reference is established.
-
public void remove_toggle_ref (ToggleNotify notify)
Removes a reference added with add_toggle_ref
. The reference count of the object is decreased by one.
-
public weak Binding bind_property (string source_property, Object target, string target_property, BindingFlags flags, owned BindingTransformFunc? transform_to = null, owned BindingTransformFunc? transform_from = null)
Creates a binding between source_property on source and
target_property on target, allowing you to set the transformation functions to be used by the binding.