PnObject

Name

PnObject -- the base class for all Paranormal classes

Synopsis


#include <pn/pn.h>


struct      PnObject;
PnObject*   pn_object_ref                   (PnObject *object);
void        pn_object_unref                 (PnObject *object);
void        pn_object_sink                  (PnObject *object);
void        pn_object_destroy               (PnObject *object);

Object Hierarchy


  GObject
   +----PnObject

Signal Prototypes


"destroy"   void        user_function      (PnObject *pnobject,
                                            gpointer user_data);

Description

PnObject is the base class for all classes in Paranormal. It provides some basic referencing functionality, as well as the "destroy" signal.

Details

struct PnObject

struct PnObject;


pn_object_ref ()

PnObject*   pn_object_ref                   (PnObject *object);

Increments the reference count on an object

object : a PnObject
Returns : A pointer to the object


pn_object_unref ()

void        pn_object_unref                 (PnObject *object);

Decrements the reference count on an object. If the object's reference count becomes 0, the object is freed from memory.

object : a PnObject


pn_object_sink ()

void        pn_object_sink                  (PnObject *object);

Removes floating reference on an object. Any newly created object has a refcount of 1 and is FLOATING. This function should be used when creating a new object to symbolically 'take ownership of' the object.

object : a PnObject


pn_object_destroy ()

void        pn_object_destroy               (PnObject *object);

object : 

Signals

The "destroy" signal

void        user_function                  (PnObject *pnobject,
                                            gpointer user_data);

pnobject :the object which received the signal.
user_data :user data set when the signal handler was connected.