#include <cx/XtArea.h>void cxXtAreaCallbackAdd( Widget da, char *callback, void ( *func)(void *,void *), void *client)
subroutine cxXtAreaCallbackAdd(da,callback,func,client) integer da character*(*) callback, integer func integer client
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.