Tk_QueueWindowEvent(3tk)
π Tk_QueueWindowEvent β bestie, it's the Tk Library Procedures page π
okay so this is a Tk Library Procedures moment, and today's main characters are Tk_CollapseMotionEvents and Tk_QueueWindowEvent. buckle up π
β¨ NAME β¨
Tk_CollapseMotionEvents, Tk_QueueWindowEvent β add a window event to the Tcl event queue π¦
πΈ SYNOPSIS πΈ
#include <tk.h>
int
Tk_CollapseMotionEvents(display, collapse)
Tk_QueueWindowEvent(eventPtr, position)
π ARGUMENTS π
Display *display(in) β the Display you're controlling motion event collapsing for. π₯οΈint collapse(in) β tells us whether motion events should be collapsed or not. yes/no energy.XEvent *eventPtr(in) β an event to add to the event queue. and listen, this one is important: all unused fields of the structure have to be set to zero. no cap. πTcl_QueuePosition position(in) β where the new event goes in the queue:TCL_QUEUE_TAIL,TCL_QUEUE_HEAD, orTCL_QUEUE_MARK. pick your lane bestie. π―
π DESCRIPTION π
Tk_QueueWindowEvent places a window event on Tcl's internal event queue for eventual servicing. the way it does that is: it creates a Tcl_Event structure, copies the event into that structure, and calls Tcl_QueueEvent to add the event to the queue. and then when the event is eventually removed from the queue, it gets processed just like all window events. literally just like all of them. π«
so here's the tea on motion events: when multiple motion events are received for the same window in rapid succession, they are collapsed by default. lowkey iconic of them. this behavior can be controlled with Tk_CollapseMotionEvents. and Tk_CollapseMotionEvents always returns the previous value for collapse behavior on the display. it's giving "here's what you had before, and here's your new vibe" π«Ά
the position argument to Tk_QueueWindowEvent has the same significance as for Tcl_QueueEvent; see the documentation for Tcl_QueueEvent for details. iykyk π
π₯ KEYWORDS π₯
callback, clock, handler, modal timeout, events
okay that's the whole page, mwah π β this was the Tk manual, version 7.5, filed under Tk_QueueWindowEvent(3tk). no date on the footer bestie, that's just how it is. slay, go queue some events, and remember to zero those unused fields πβ¨π
π¦ where this page comes from
- debian trixie: tk9.0-doc 9.0.1-3
- ubuntu questing: tk9.0-doc 9.0.2-1
- ubuntu resolute: tk9.0-doc 9.0.3-1
- ubuntu stonking: tk9.0-doc 9.0.4-1
- Copyright (c) 1995-1996 Sun Microsystems, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms