GfObject

GfObject — The base class for all Guifications objects

Synopsis




#define     GF_OBJECT_FLAGS                 (obj)
#define     GF_OBJECT_SET_FLAGS             (obj, flags)
#define     GF_OBJECT_UNSET_FLAGS           (obj, flags)
enum        GfObjectFlags;
            GfObject;
void        gf_object_destroy               (GfObject *obj);
gboolean    (*GfObjectChildrenTest)         (GType type);
GType*      gf_object_children              (GType type,
                                             guint *n_children);
GType*      gf_object_concrete_children     (GType type,
                                             guint *n_children);
#define     gf_object_flags_from_string     (str)
#define     gf_object_flags_to_string       (flags, i18n)

Object Hierarchy


  GObject
   +----GfObject
         +----GfNamedObject
         +----GfDispatcher
         +----GfDrawable
         +----GfEvent
         +----GfEventInfo
         +----GfFeed
         +----GfFeedPool
         +----GfGC
         +----GfHash
         +----GfImage
         +----GfItem
         +----GfLog
         +----GfNotification
         +----GfTheme
         +----GfThemeInfo
         +----GfThemeOptions
         +----GfColormap

Signal Prototypes


"destroy"   void        user_function      (GfObject *gfobject,
                                            gpointer user_data);

Description

GfObject is the base class for every Guifications object, adn provides some default behavior.

Details

GF_OBJECT_FLAGS()

#define GF_OBJECT_FLAGS(obj)				(GF_OBJECT(obj)->flags)

obj :

GF_OBJECT_SET_FLAGS()

#define GF_OBJECT_SET_FLAGS(obj, flags)		(GF_OBJECT_FLAGS(obj) |= flags)

obj :
flags :

GF_OBJECT_UNSET_FLAGS()

#define GF_OBJECT_UNSET_FLAGS(obj, flags)	(GF_OBJECT_FLAGS(obj) &= ~(flags))

obj :
flags :

enum GfObjectFlags

typedef enum _GfObjectFlags {
	GF_OBJECT_DESTROYING	= 1 << 0,

	GF_OBJECT_RESERVED_1	= 1 << 1,
	GF_OBJECT_RESERVED_2	= 1 << 2,
	GF_OBJECT_RESERVED_3	= 1 << 3,
	GF_OBJECT_RESERVED_4	= 1 << 4
} GfObjectFlags;

Flags for GfObject's

GF_OBJECT_DESTROYING The object is being destroyed.
GF_OBJECT_RESERVED_1 Reserved.
GF_OBJECT_RESERVED_2 Reserved.
GF_OBJECT_RESERVED_3 Reserved.
GF_OBJECT_RESERVED_4 Reserved.

GfObject

typedef struct _GfObject GfObject;

GfObject is an opaque structure that should not be used directly.


gf_object_destroy ()

void        gf_object_destroy               (GfObject *obj);

Emits the "destroy" signal notifying all reference holders that they should release obj.

obj : The GfObject instance.

GfObjectChildrenTest ()

gboolean    (*GfObjectChildrenTest)         (GType type);

A function used internally by the introspection API to test child types.

type : The type to test.
Returns : TRUE if the test was successful.

gf_object_children ()

GType*      gf_object_children              (GType type,
                                             guint *n_children);

Returns a newly allocated array of GType's for each child of type.

Note: Unlike g_type_children, gf_object_children returns all subclasses, not just direct subclasses.

type : The GType of the base class who's children we want.
n_children : Return address for the number of children or NULL.
Returns : A newly allocated array of GType's for each subclass which must be freed with #g_free().

gf_object_concrete_children ()

GType*      gf_object_concrete_children     (GType type,
                                             guint *n_children);

This function is identical to #gf_object_children() except that it only returns concrete classes, that is non-abstract classes.

type : The GType of the base class who's children we want.
n_children : Return address for the number of children, or NULL.
Returns : A newly allocated array of GType's for each non-abstract subclass, which must be freed with #g_free().

gf_object_flags_from_string()

#define     gf_object_flags_from_string(str)

Gets a GfObjectFlags from a string.

Note: str MUST be the untranslated string!

str : The string.
Returns : The GfObjectFlags.

gf_object_flags_to_string()

#define     gf_object_flags_to_string(flags, i18n)

Gets a string from a GfObjectFlags.

flags : The GfObjectFlags.
i18n : TRUE for the translated version.
Returns : flags as a string.

Signals

The "destroy" signal

void        user_function                  (GfObject *gfobject,
                                            gpointer user_data);

Signals that all holders of a reference to the GfObject should release the reference that they hold.

obj : The GfObject which received the signal.
user_data : user data set when the signal handler was connected.