WwCallback Function (Motif Only)
Adds or removes a PV‑WAVE Widgets callback.
Usage
status = WwCallback(wid, callback, reason, client_data)
Input Parameters
wid — The ID of the widget for which to add or remove the callback.
callback — A string containing the name of the PV‑WAVE callback routine.
reason — A string containing the callback reason. (See the Discussion section for more information.)
client_data — A variable. The value of this variable is passed to the callback routine.
Returned Value
status — A value indicating success or failure of the addition or removal of the PV‑WAVE Widgets callback.
*1 — Indicates success.
*0 — Indicates failure.
Keywords
Add — If nonzero, the specified callback is added.
Params — If nonzero, the callback is called with all parameters. (Default: called with only the wid and data parameters; see the Callback Parameters section)
Remove — If nonzero, the specified callback is removed.
Callback Parameters
Any added callback procedure must have the following two parameters:
wid — The widget ID.
data — User-defined data.
Discussion
Callback reasons are listed throughout the OSF/Motif Programmer’s Reference.
 
note
Rogue Wave has ported a subset of the Motif widget functionality to Microsoft Windows. To use WwCallback, you must refer to the OSF/Motif Programmer’s Reference to obtain callback reasons. Because Motif widgets are only partly implemented for Windows, some callback reasons are not available for use in Windows applications.
To use a Motif callback reason in PV‑WAVE, remove the XmN or XtN prefix. For example, the Motif name, XmNactivateclllpockd, becomes the PV‑WAVE widgets name, activateCallback.
Use of the client_data parameter is optional in the application. It can specify some application-defined data to be passed to the callback procedure when the callback is invoked. If client_data is a local variable (defined only in the current procedure), a copy of that variable is created and passed by value. If client_data is a global variable (defined in a Common Block), it is passed by reference.
See Also