27 #ifndef SQUASH_OBJECT_H 
   28 #define SQUASH_OBJECT_H 
   30 #if !defined (SQUASH_H_INSIDE) && !defined (SQUASH_COMPILATION) 
   31 #error "Only <squash/squash.h> can be included directly." 
SquashDestroyNotify destroy_notify
Function to call when the reference count reaches 0. 
void(* SquashDestroyNotify)(void *data)
Callback to be invoked when information data is no longer needed. 
SQUASH_API void * squash_object_ref_sink(void *obj)
Sink a floating reference if one exists. 
volatile bool is_floating
Whether or not the object has a floating reference. 
SQUASH_API void * squash_object_unref(void *obj)
Decrement the reference count on an object. 
volatile unsigned int ref_count
The reference count. 
SQUASH_API unsigned int squash_object_get_ref_count(void *obj)
Get the current reference count of an object. 
SQUASH_BEGIN_DECLS SQUASH_API void * squash_object_ref(void *obj)
Increment the reference count on an object. 
Reference-counting base class for other types. 
SQUASH_API void squash_object_destroy(void *obj)
Destroy an object. 
SQUASH_API void squash_object_init(void *obj, bool is_floating, SquashDestroyNotify destroy_notify)
Initialize a new object.