gobject.object
Module for [ObjectWrap] class
Module Initializers 1
()Types 4
The base object type.
gobject.object.ObjectWrap 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.object.ObjectWrap 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.object.ObjectWrap 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 gobject.object.ObjectWraps are guaranteed to be aligned to at least the alignment of the largest basic GLib type (typically this is gst.types.ulong or gdouble). If you need larger alignment for an element in a gobject.object.ObjectWrap, you should allocate it on the heap (aligned), or arrange for your gobject.object.ObjectWrap to be appropriately padded. This guarantee applies to the gobject.object.ObjectWrap (or derived) struct, the gstpbutils.types.ObjectClass (or derived) struct, and any private data allocated by G_ADD_PRIVATE().
void _setGObject(void * cObj, Flag!"Take" take) nothrowSet the GObject of a D ObjectWrap wrapper. Params: cObj = Pointer to the GObject take = Yes.Take if the D object should take ownership of the passed reference, No.Take to add a new referencevoid * _cPtr(Flag!"Dup" dup = No.Dup) nothrowGet a pointer to the underlying C object. Params: dup = Yes.Dup to add a reference with g_object_ref(), No.Dup otherwise (default) Returns: The C object (reference added according to addRef parameter)void * _ref(void * gObj) static nothrowCalls g_object_ref() on a GObject. Params: gObj = The GObject to reference Returns: The GObjectstatic _unref(void * gObj) nothrowCalls g_object_unref() on a GObject. Params: gObj = The GObject to referenceObjectWrap self() nothrowConvenience method to return `this` cast to a type. For use in D with statements. Returns: The object instanceT _getDObject(T)(void * cptr, Flag!"Take" take) static nothrowTemplate to get the D object from a C GObject and cast it to the given D object type. Params: T = The D object type cptr = The C GObject (can be null, in which case null is returned) take = If Yes....gulong connectSignalClosure(string signalDetail, DClosure closure, Flag!"After" after = No.After) nothrowConnect a D closure to an object signal. Params: signalDetail = Signal name and optional detail separated by '::' closure = Closure to connect signal to after = Yes.After to invoke the signal after...void setProperty(T)(string propertyName, T val) nothrowTemplate for setting a GObject property. Params: propertyName = Name of the GObject property val = The value to assign (must match the property value type)T getProperty(T)(string propertyName) const nothrowTemplate for getting a GObject property. Params: propertyName = Name of the GObject property Returns: The property value (must match the property value type)gobject.binding.Binding bindProperty(string sourceProperty, gobject.object.ObjectWrap target, string targetProperty, gobject.types.BindingFlags flags) nothrowCreates a binding between source_property on source and target_property on target.gobject.binding.Binding bindPropertyFull(string sourceProperty, gobject.object.ObjectWrap target, string targetProperty, gobject.types.BindingFlags flags, gobject.closure.Closure transformTo, gobject.closure.Closure transformFrom) nothrowCreates 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.void forceFloating() nothrowThis function is intended for #GObject implementations to re-enforce a [floating][floating-ref] object reference. Doing this is seldom required: all #GInitiallyUnowneds are created with a floating ...void freezeNotify() nothrowIncreases 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. Dup...void * getData(string key) nothrowGets a named field from the objects table of associations (see [gobject.object.ObjectWrap.setData]).void getProperty(string propertyName, gobject.value.Value value) nothrowGets a property of an object.void * getQdata(glib.types.Quark quark) nothrowThis function gets back user data pointers stored via [gobject.object.ObjectWrap.setQdata].void getv(string[] names, gobject.value.Value[] values) nothrowGets n_properties properties for an object. Obtained properties will be set to values. All properties must be valid. Warnings will be emitted and undefined behaviour may result if invalid propertie...bool isFloating() nothrowChecks whether object has a [floating][floating-ref] reference. Returns: true if object has a floating referencevoid notify(string propertyName) nothrowEmits a "notify" signal for the property property_name on object.void notifyByPspec(gobject.param_spec.ParamSpec pspec) nothrowEmits a "notify" signal for the property specified by pspec on object.gobject.object.ObjectWrap refSink() nothrowIncrease the reference count of object, and possibly remove the [floating][floating-ref] reference, if object has a floating reference.void runDispose() nothrowReleases all references to other objects. This can be used to break reference cycles.void setData(string key, void * data = null) nothrowEach object carries around a table of associations from strings to pointers. This function lets you set an association.void setProperty(string propertyName, gobject.value.Value value) nothrowSets a property on an object.void * stealData(string key) nothrowRemove a specified datum from the object's data associations, without invoking the association's destroy handler.void * stealQdata(glib.types.Quark quark) nothrowThis function gets back user data pointers stored via [gobject.object.ObjectWrap.setQdata] and removes the data from object without invoking its destroy() function (if any was set). Usually, callin...void thawNotify() nothrowReverts the effect of a previous call to [gobject.object.ObjectWrap.freezeNotify]. The freeze count is decreased on object and when it reaches zero, queued "notify" signals are emitted.void watchClosure(gobject.closure.Closure closure) nothrowThis function essentially limits the life time of the closure to the life time of the object. That is, when the object is finalized, the closure is invalidated by calling [gobject.closure.Closure.i...gulong connectNotify(T)(string detail = null, T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] == gobject.param_spec.ParamSpec)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gobject.object.ObjectWrap)))
&& Parameters!T.length < 3) nothrowConnect to `Notify` signal.Fluent builder implementation template for gobject.object.ObjectWrap
Fluent builder for gobject.object.ObjectWrap
Interface proxy class - used to wrap unknown GObjects as a known interface
TypeInfo_Interface getIface() nothrow;Functions 2
string objectMixin() nothrowA convenient string mixin to be used for ObjectWrap derived classes to declare boilerplate constructors. Returns: A string value to use with mixin() within ObjectWrap derived classes.Variables 4
Quark gidObjectQuarkTypeInfo_Class[GType] gtypeClassesTypeInfo_Class[TypeInfo_Interface] ifaceProxyClassesbool classMapsInitialized