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). It is important that
18 all unused fields of the structure be
19 set to zero.
20_________________________________________________________________
21
22
24 Tk_HandleEvent is a lower-level procedure that deals with window
25 events. It is called by Tcl_ServiceEvent (and indirectly by
26 Tcl_DoOneEvent), and in a few other cases within Tk. It makes call‐
27 backs to any window event handlers (created by calls to Tk_CreateEven‐
28 tHandler) that match eventPtr and then returns. In some cases it may
29 be useful for an application to bypass the Tk event queue and call
30 Tk_HandleEvent directly instead of calling Tcl_QueueEvent followed by
31 Tcl_ServiceEvent.
32
33 This procedure may be invoked recursively. For example, it is possible
34 to invoke Tk_HandleEvent recursively from a handler called by Tk_Han‐
35 dleEvent. This sort of operation is useful in some modal situations,
36 such as when a notifier has been popped up and an application wishes to
37 wait for the user to click a button in the notifier before doing any‐
38 thing else.
39
40
42 callback, event, handler, window
43
44
45
46Tk Tk_HandleEvent(3)