1Tk_HandleEvent(3) Tk Library Procedures Tk_HandleEvent(3)
2
3
4
5______________________________________________________________________________
6
8 Tk_HandleEvent - invoke event handlers for window system events
9
11 #include <tk.h>
12
13 Tk_HandleEvent(eventPtr)
14
16 XEvent *eventPtr (in) Pointer to X event to dispatch to rele‐
17 vant handler(s).
18_________________________________________________________________
19
20
22 Tk_HandleEvent is a lower-level procedure that deals with window
23 events. It is called by Tcl_ServiceEvent (and indirectly by
24 Tk_DoOneEvent), and in a few other cases within Tk. It makes callbacks
25 to any window event handlers (created by calls to Tk_CreateEven‐
26 tHandler) that match eventPtr and then returns. In some cases it may
27 be useful for an application to bypass the Tk event queue and call
28 Tk_HandleEvent directly instead of calling Tcl_QueueEvent followed by
29 Tcl_ServiceEvent.
30
31 This procedure may be invoked recursively. For example, it is possible
32 to invoke Tk_HandleEvent recursively from a handler called by Tk_Han‐
33 dleEvent. This sort of operation is useful in some modal situations,
34 such as when a notifier has been popped up and an application wishes to
35 wait for the user to click a button in the notifier before doing any‐
36 thing else.
37
38
40 callback, event, handler, window
41
42
43
44Tk Tk_HandleEvent(3)