CANVAS_REGISTER_DESTROY_FUNC(3)

EXPERIMENTAL_FUNC
canvas_register_destroy_func - Register destroy callback.

SYNOPSIS
#include <karma_canvas.h>

KCallbackFunc canvas_register_destroy_func

(KWorldCanvas canvas, flag wc_only, void (*func) (), void *info)

DESCRIPTION
This routine will register a destroy function for a world canvas. The function will be called when the canvas is destroyed. Many destroy functions may be registered per canvas. The first function registered is the first function called upon destruction.

canvas
    The world canvas.

wc_only
    If TRUE, the function is only called for a destroy of the world canvas; if the pixel canvas is being destroyed, the function is not called. If FALSE, the function is called regardless of whether the pixel canvas is being destroyed.

func
    The function that is called when the canvas is destroyed. The prototype function is <-canvas_PROTO_destroy_func->.

info
    The arbitrary function information pointer.

RETURN VALUE
A KCallbackFunc object. On failure, the process aborts.

Multi-threading Level
Unsafe.

NOTE
All functions registered with <<wc_only>> TRUE are called before those registered with <<wc_only>> FALSE.

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/