Synopsis
void EVXinit_display (disp);
void EVXadd_event_hndlr (disp, wind, mask, hndlr, udata, 0, NULL, NULL);
void EVXdel_event_hndlr (disp, wind, mask, hndlr, udata);
void EVXdel_events (disp, wind);
Display * disp;
Window wind;
unsigned int mask;
EVXhndlr hndlr;
void * udata;
Description
These routines define callback handlers for X events (UNIX platforms only).
EVXinit_display initializes an X display. The routine must be called once per X display if you are using the routine EVXadd_event_hndlr.
EVXadd_event_hndlr adds an X event callback handler. When a set of X events occurs on an X window, the system will call the function you supply. The parameters specify the X display; window; event mask; callback function; and data argument for the callback function. The sixth parameter must be 0. The seventh and eighth parameters must be NULL.
EVXdel_event_hndlr deletes an X event callback handler. The parameters to EVXdel_event_hndlr must match the corresponding parameters of the EVXadd_event_hndlr that created the handler.
EVXdel_events deletes all X event callback handlers for a particular X-display window. If you have not deleted the handlers individually using EVXdel_event_hndlr, you should call EVXdel_events either closely before or closely after destroying a window. If you destroy a window without deleting the event handler, pending events in the X queue for this window may be delivered after the window is deleted causing intermittent X BadWindow errors.
Arguments
disp
An X display.
wind
An X window.
mask
n X event mask.
hndlr
A callback function. The function must have the following prototype:
void hndlr (Display * disp , Window wind , XEvent event , void * udata );
disp is an X display. wind is an X window. event is an X event. udata is the data argument specified by the udata parameter in EVXadd_event_hndlr.
udata
The data argument passed to hndlr .