Tk_HandleEvent(3)
π Tk_HandleEvent(3) β Tk Library Procedures π
πΈ NAME πΈ
Tk_HandleEvent β invoke event handlers for window system events.
β¨ SYNOPSIS β¨
#include <tk.h>
Tk_HandleEvent(eventPtr)
π ARGUMENTS π
XEvent *eventPtr(in) β pointer to the X event you're dispatching to the relevant handler(s). And bestie, it is important that all unused fields of the structure be set to zero. Like, zeroed-zeroed. No cap. π
π¦ DESCRIPTION π¦
Okay so Tk_HandleEvent is a lower-level procedure that deals with window events. It's called by Tcl_ServiceEvent (and indirectly by Tcl_DoOneEvent), plus in a few other cases within Tk. It makes callbacks to any window event handlers β the ones created by calls to Tk_CreateEventHandler β that match eventPtr, and then it returns. Periodt. π
In some cases it may be useful for an application to bypass the Tk event queue and call Tk_HandleEvent directly instead of calling Tcl_QueueEvent followed by Tcl_ServiceEvent. It's giving "I'll take the shortcut, thank you" energy. β¨
This procedure may be invoked recursively. For example, it is possible to invoke Tk_HandleEvent recursively from a handler called by Tk_HandleEvent. This sort of operation is useful in some modal situations, such as when a notifier has been popped up and an application wishes to wait for the user to click a button in the notifier before doing anything else. Basically: pop-up is on screen, and we're all waiting for the click before anything else happens. Iconic modal behavior, honestly. π
π KEYWORDS π
callback, event, handler, window
Big source/version kiss: Tk Β· page: Tk_HandleEvent(3) πβ¨
π¦ where this page comes from
- alpine 3.23: tk9-doc 9.0.3-r0 Β· TCL
- alpine 3.24: tk9-doc 9.0.3-r2 Β· TCL
- fedora 43: tk-devel 1:9.0.2-1.fc43 Β· TCL AND HPND-Pbmplus AND CC-BY-SA-3.0 AND MIT-open-group AND MIT
- fedora 43: tk-devel 1:9.0.2-1.fc43 Β· TCL AND HPND-Pbmplus AND CC-BY-SA-3.0 AND MIT-open-group AND MIT
- fedora 44: tk-devel 1:9.0.2-1.fc44 Β· TCL AND HPND-Pbmplus AND CC-BY-SA-3.0 AND MIT-open-group AND MIT
- fedora 44: tk-devel 1:9.0.2-1.fc44 Β· TCL AND HPND-Pbmplus AND CC-BY-SA-3.0 AND MIT-open-group AND MIT
- nixos 26.05: tk 9.0.3
- nixpkgs unstable: tk 9.1.0
- Copyright (c) 1990-1992 The Regents of the University of California
- Copyright (c) 1994-1996 Sun Microsystems, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms