C_REGISTER_CALLBACK(3)

FUNCTION
c_register_callback - Register a callback function with a list.

SYNOPSIS
#include <karma_c.h>

KCallbackFunc c_register_callback

(KCallbackList *list, flag (*callback) (), void *object, void *client1_data, flag client1_indirect, void *client2_data, flag client2_indirect, flag quenchable)

DESCRIPTION
This routine will register a function which should be called when the callbacks for an object should be called. When the object is destroyed a call should be made to <-c_destroy_list->. The first callback registered is the first one called. Multiple callback functions may be registered per object.

list
    A pointer to the callback list. This is changed. The initial value must be NULL.

callback
    The function to be called when the object callbacks are called. The prototype function is <-c_PROTO_callback->.

object
    The object pointer passed to the callback. This may be NULL.

client1_data
    The first client information pointer passed to the callback. This may be NULL.

client1_indirect
    If TRUE the callback is passed a pointer to the storage containing <<client1_data>>, else <<client1_data>> is passed directly to the callback.

client2_data
    The second client information pointer passed to the callback This may be NULL.

client2_indirect
    If TRUE the callback is passed a pointer to the storage containing <<client2_data>>, else <<client2_data>> is passed directly to the callback.

quenchable
    If TRUE then the routine is permitted to quench calls to the following callbacks in the list.

RETURN VALUE
A KCallbackFunc on success. On failure, the process aborts.

Multi-threading Level
Unsafe.

AUTHOR
Richard Gooch (rgooch@atnf.csiro.au)

AVAILABLITY
The Karma Distribution is available for anonymous ftp from: ftp://ftp.atnf.csiro.au/pub/software/karma/ ftp://wuarchive.wustl.edu/graphics/graphics/packages/karma/ ftp://ftp.pwr.wroc.pl/pub/karma/ The Karma Home Page is: http://www.atnf.csiro.au/karma/