Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

tk_queuewindowevent(3tk) [opensolaris man page]

Tk_QueueWindowEvent(3TK)				       Tk Library Procedures					  Tk_QueueWindowEvent(3TK)

__________________________________________________________________________________________________________________________________________________

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) Display for which to control motion event collapsing. int collapse (in) Indicates whether motion events should be collapsed or not. XEvent *eventPtr (in) An event to add to the event queue. Tcl_QueuePosition position (in) Where to add the new event in the queue: TCL_QUEUE_TAIL, TCL_QUEUE_HEAD, or TCL_QUEUE_MARK. _________________________________________________________________ DESCRIPTION
Tk_QueueWindowEvent places a window event on Tcl's internal event queue for eventual servicing. It creates a Tcl_Event structure, copies the event into that structure, and calls Tcl_QueueEvent to add the event to the queue. When the event is eventually removed from the queue it is processed just like all window events. When multiple motion events are received for the same window in rapid succession, they are collapsed by default. This behavior can be con- trolled with Tk_CollapseMotionEvents. Tk_CollapseMotionEvents always returns the previous value for collapse behavior on the display. The position argument to Tk_QueueWindowEvent has the same significance as for Tcl_QueueEvent; see the documentation for Tcl_QueueEvent for details. KEYWORDS
callback, clock, handler, modal timeout, events ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +--------------------+-----------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +--------------------+-----------------+ |Availability | SUNWTk | +--------------------+-----------------+ |Interface Stability | Uncommitted | +--------------------+-----------------+ NOTES
Source for Tk is available on http://opensolaris.org. Tk 7.5 Tk_QueueWindowEvent(3TK)

Check Out this Related Man Page

Tk_RestrictEvents(3TK)					       Tk Library Procedures					    Tk_RestrictEvents(3TK)

__________________________________________________________________________________________________________________________________________________

NAME
Tk_RestrictEvents - filter and selectively delay X events SYNOPSIS
#include <tk.h> Tk_RestrictProc * Tk_RestrictEvents(proc, clientData, prevClientDataPtr) ARGUMENTS
Tk_RestrictProc *proc (in) Predicate procedure to call to filter incoming X events. NULL means do not restrict events at all. ClientData clientData (in) Arbitrary argument to pass to proc. ClientData *prevClientDataPtr (out) Pointer to place to save argument to previous restrict procedure. _________________________________________________________________ DESCRIPTION
This procedure is useful in certain situations where applications are only prepared to receive certain X events. After Tk_RestrictEvents is called, Tk_DoOneEvent (and hence Tk_MainLoop) will filter X input events through proc. Proc indicates whether a given event is to be processed immediately, deferred until some later time (e.g. when the event restriction is lifted), or discarded. Proc is a procedure with arguments and result that match the type Tk_RestrictProc: typedef Tk_RestrictAction Tk_RestrictProc( ClientData clientData, XEvent *eventPtr); The clientData argument is a copy of the clientData passed to Tk_RestrictEvents; it may be used to provide proc with information it needs to filter events. The eventPtr points to an event under consideration. Proc returns a restrict action (enumerated type Tk_RestrictAction) that indicates what Tk_DoOneEvent should do with the event. If the return value is TK_PROCESS_EVENT, then the event will be handled imme- diately. If the return value is TK_DEFER_EVENT, then the event will be left on the event queue for later processing. If the return value is TK_DISCARD_EVENT, then the event will be removed from the event queue and discarded without being processed. Tk_RestrictEvents uses its return value and prevClientDataPtr to return information about the current event restriction procedure (a NULL return value means there are currently no restrictions). These values may be used to restore the previous restriction state when there is no longer any need for the current restriction. There are very few places where Tk_RestrictEvents is needed. In most cases, the best way to restrict events is by changing the bindings with the bind Tcl command or by calling Tk_CreateEventHandler and Tk_DeleteEventHandler from C. The main place where Tk_RestrictEvents must be used is when performing synchronous actions (for example, if you need to wait for a particular event to occur on a particular win- dow but you don't want to invoke any handlers for any other events). The ``obvious'' solution in these situations is to call XNextEvent or XWindowEvent, but these procedures cannot be used because Tk keeps its own event queue that is separate from the X event queue. Instead, call Tk_RestrictEvents to set up a filter, then call Tk_DoOneEvent to retrieve the desired event(s). KEYWORDS
delay, event, filter, restriction ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +--------------------+-----------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +--------------------+-----------------+ |Availability | SUNWTk | +--------------------+-----------------+ |Interface Stability | Uncommitted | +--------------------+-----------------+ NOTES
Source for Tk is available on http://opensolaris.org. Tk Tk_RestrictEvents(3TK)
Man Page