Tk_QueueWindowEvent(3tk)

πŸ“¦
version 9.0.4 Β· 2 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– 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, or TCL_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