Ovis_Layer_Destroy_Proc_Set()
Abstract
Attaches a destroy procedure to an Ovis layer.
Syntax
Ovis_Layer_Destroy_Proc_Set (layer_ptr, destroy_proc)
| Argument | Type | Description |
|---|---|---|
layer_ptr |
OvisT_Layer * |
Ovis layer to which to attach the destroy procedure. |
destroy_proc |
OvisT_Layer_State_Destroy_Proc |
Destroy procedure to attach. |
Return Type
OvisT_Layer_State_Destroy_Proc
Previous destroy_proc, or PRGC_NIL if none.
Header
ovis_layer.h
Details
This function attaches a user-defined destroy_proc to an Ovis layer. The prototype for destroy_proc is given in OvisT_Layer_State_Destroy_Proc.
Example
static void new_destroy_proc (OvisT_Layer * layer, void * user_state_ptr)
{
…
}
OvisT_Layer * layer;
OvisT_Layer_State_Destroy_Proc old_proc;
/* … layer created at some point */
old_proc = Ovis_Layer_Destroy_Proc_Set (layer, new_destroy_proc);
Errors
- Layer is NIL.
Reference
- Use the function
Ovis_Layer_State_Set()to specify the layer user state. - Use the function
Ovis_Layer_Destroy()to destroy a layer.