Ovis_Decoration_Destroy_Proc_Set()
Abstract
Attaches a destroy procedure to an Ovis decoration.
Syntax
Ovis_Decoration_Destroy_Proc_Set (dec_ptr, destroy_proc)
| Argument | Type | Description |
|---|---|---|
dec_ptr |
OvisT_Decoration * |
Decoration on which to attach the destroy procedure. |
destroy_proc |
OvisT_Decoration_State_Destroy_Proc |
Destroy procedure to attach. |
Return Type
OvisT_Decoration_State_Destroy_Proc
Previous destroy_proc, or PRGC_NIL if none.
Header
ovis_decoration.h
Details
This function attaches a user-defined destroy_proc to an Ovis decoration. The prototype for destroy_proc is given in OvisT_Decoration_State_Destroy_Proc.
Example
static void new_destroy_proc (OvisT_Decoration * dec_ptr, void * user_state_ptr)
{
…
}
OvisT_2D_Text * text;
OvisT_Decoration_State_Destroy_Proc old_proc;
/* … text created at some point with an initial position */
old_proc = Ovis_Decoration_Destroy_Proc_Set (text, new_destroy_proc);
Errors
- Decoration is NIL.
Reference
- Use the function
Ovis_Decoration_State_Set()to specify the decoration's state. - Use the function
Ovis_Decoration_Destroy()to destroy a decoration.