ObjectClass

The class structure for the GObject type.

<example> <title>Implementing singletons using a constructor</title> <programlisting> static MySingleton *the_singleton = NULL;

static GObject* my_singleton_constructor (GType type, guint n_construct_params, GObjectConstructParam *construct_params) { GObject *object;

if (!the_singleton) { object = G_OBJECT_CLASS (parent_class)->constructor (type, n_construct_params, construct_params); the_singleton = MY_SINGLETON (object); } else object = g_object_ref (G_OBJECT (the_singleton));

return object; } </programlisting></example>

Constructors

this
this(GObjectClass* gObjectClass, bool ownedRef)

Sets our main struct and passes it to the parent class.

Members

Functions

findProperty
ParamSpec findProperty(string propertyName)

Looks up the #GParamSpec for a property of a class.

getObjectClassStruct
GObjectClass* getObjectClassStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

installProperties
void installProperties(ParamSpec[] pspecs)

Installs new properties from an array of #GParamSpecs.

installProperty
void installProperty(uint propertyId, ParamSpec pspec)

Installs a new property.

listProperties
ParamSpec[] listProperties()

Get an array of #GParamSpec* for all properties of a class.

overrideProperty
void overrideProperty(uint propertyId, string name)

Registers @property_id as referring to a property with the name @name in a parent class or in an interface implemented by @oclass. This allows this class to "override" a property implementation in a parent class or to provide the implementation of a property from an interface.

Variables

gObjectClass
GObjectClass* gObjectClass;

the main Gtk struct

ownedRef
bool ownedRef;
Undocumented in source.

Meta