void cxXtAreaCallbackAdd( Widget da, const char *callback, void ( *func)(void *,void *), void *client)
subroutine cxXtAreaCallbackAdd(da,callback,func,client) integer da character*(*) callback, integer func integer client
- Drawing area widget returned by cxXtAreaInitialize(3E) or cxXtGLAreaInitialize(3E).
- String containing which callback to register.
- Function pointer for the callback.
- Client data which will be passed to the callback function.
This function allows registering user defined callback functions which will be executed on certain X drawing area events. This allows being notified when, for example, mouse button or keyboard presses are made when the cursor is within the drawing area.
The callback function will be called with three arguments - the widget id, the client data passed in, and an info handle. This info handle is actually a pointer to a C XEvent structure. It is possible in FORTRAN to extract detailed information about what caused the callback from this structure, but not in a general and portable way. It is provided here for advanced programmers.
The callback function should be declared as external in the subroutine that registers it. The callback designator can be passed in as a string literal, in single quotes. Available callbacks are 'exposeCallback', 'inputCallback', 'resizeCallback', and 'destroyCallback'. See the man page for XmDrawingArea(3X) and its superclasses for descriptions of when these callbacks occur and what additional information can be returned.XmDrawingArea(3X), XtAddCallback(3X).
Last modified: Mon Nov 6 16:33:53 GMT 2000
[ Documentation Home ] © The Numerical Algorithms Group Ltd, Oxford UK. 1999