_GObjectClass Struct Reference

#include <stdapis/glib-2.0/gobject/gobject.h>

struct _GObjectClass

Detailed Description

GObjectClass: : the parent class : the function is called by g_object_new () to complete the object initialization after all the construction properties are set. The first thing a implementation must do is chain up to the of the parent class. Overriding should be rarely needed, e.g. to handle construct properties, or to implement singletons. : the generic setter for all properties of this type. Should be overridden for every type with properties. Implementations of don't need to emit property change notification explicitly, this is handled by the type system. : the generic getter for all properties of this type. Should be overridden for every type with properties. : the function is supposed to drop all references to other objects, but keep the instance otherwise intact, so that client method invocations still work. It may be run multiple times (due to reference loops). Before returning, should chain up to the method of the parent class. : instance finalization function, should finish the finalization of the instance begun in and chain up to the method of the parent class. : emits property change notification for a bunch of properties. Overriding should be rarely needed. : the class closure for the notify signal : the function is called by g_object_new() as the final step of the object creation process. At the point of the call, all construction properties have been set on the object. The purpose of this call is to allow for object initialisation steps that can only be performed after construction properties have been set. implementors should chain up to the call of their parent class to allow it to complete its initialisation.

The class structure for the <structname>GObject</structname> type.

<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>

Member Attribute Documentation

construct_properties

GSList *construct_properties

constructed

void(*constructed

constructor

GObject *(*constructor

dispatch_properties_changed

void(*dispatch_properties_changed

dispose

void(*dispose

finalize

void(*finalize

g_type_class

GTypeClass g_type_class

get_property

void(*get_property

notify

void(*notify

pdummy

gpointer pdummy

set_property

void(*set_property