XtAppMainLoop(3)


NAME

   XtAppNextEvent, XtAppPending, XtAppPeekEvent, XtAppProcessEvent,
   XtDispatchEvent, XtAppMainLoop - query and process events and input

SYNTAX

   void XtAppNextEvent(XtAppContext app_context, XEvent *event_return);

   Boolean XtAppPeekEvent(XtAppContext app_context, XEvent *event_return);

   XtInputMask XtAppPending(XtAppContext app_context);

   void XtAppProcessEvent(XtAppContext app_context, XtInputMask mask);

   Boolean XtDispatchEvent(XEvent *event);

   void XtAppMainLoop(XtAppContext app_context);

ARGUMENTS

   app_context
             Specifies the application context that identifies the
             application.

   event     Specifies a pointer to the event structure that is to be
             dispatched to the appropriate event handler.

   event_return
             Returns the event information to the specified event
             structure.

   mask      Specifies what types of events to process.  The mask is the
             bitwise inclusive OR of any combination of XtIMXEvent,
             XtIMTimer, XtIMAlternateInput, and XtIMSignal.  As a
             convenience, the X Toolkit defines the symbolic name XtIMAll
             to be the bitwise inclusive OR of all event types.

DESCRIPTION

   If the X event queue is empty, XtAppNextEvent flushes the X output
   buffers of each Display in the application context and waits for an
   event while looking at the other input sources, timeout timeout values,
   and signal handlers and calling any callback procedures triggered by
   them.  This wait time can be used for background processing (see
   Section 7.8).

   If there is an event in the queue, XtAppPeekEvent fills in the event
   and returns a nonzero value. If no X input is on the queue,
   XtAppPeekEvent flushes the output buffer and blocks until input is
   available (possibly calling some timeout callbacks in the process).  If
   the input is an event, XtAppPeekEvent fills in the event and returns a
   nonzero value.  Otherwise, the input is for an alternate input source,
   and XtAppPeekEvent returns zero.

   The XtAppPending function returns a nonzero value if there are events
   pending from the X server, timer pending, or other input sources
   pending. The value returned is a bit mask that is the OR of XtIMXEvent,
   XtIMTimer, XtIMAlternateInput, and XtIMSignal (see XtAppProcessEvent).
   If there are no events pending, XtAppPending flushes the output buffer
   and returns zero.

   The XtAppProcessEvent function processes one timer, alternate input,
   signal source, or X event.  If there is nothing of the appropriate type
   to process, XtAppProcessEvent blocks until there is.  If there is more
   than one type of thing available to process, it is undefined which will
   get processed.  Usually, this procedure is not called by client
   applications (see XtAppMainLoop).  XtAppProcessEvent processes timer
   events by calling any appropriate timer callbacks, alternate input by
   calling any appropriate alternate input callbacks, signal source by
   calling any appropriate signal callbacks, and X events by calling
   XtDispatchEvent.

   When an X event is received, it is passed to XtDispatchEvent, which
   calls the appropriate event handlers and passes them the widget, the
   event, and client-specific data registered with each procedure.  If
   there are no handlers for that event registered, the event is ignored
   and the dispatcher simply returns.  The order in which the handlers are
   called is undefined.

   The XtDispatchEvent function sends those events to the event handler
   functions that have been previously registered with the dispatch
   routine.  XtDispatchEvent returns True if it dispatched the event to
   some handler and False if it found no handler to dispatch the event to.
   The most common use of XtDispatchEvent is to dispatch events acquired
   with the XtAppNextEvent procedure.  However, it also can be used to
   dispatch user-constructed events.  XtDispatchEvent also is responsible
   for implementing the grab semantics for XtAddGrab.

   The XtAppMainLoop function first reads the next incoming X event by
   calling XtAppNextEvent and then it dispatches the event to the
   appropriate registered procedure by calling XtDispatchEvent.  This
   constitutes the main loop of X Toolkit applications, and, as such, it
   does not return unless XtAppSetExitFlag is called.  Applications are
   expected to exit in response to some user action.  There is nothing
   special about XtAppMainLoop; it is simply an loop that calls
   XtAppNextEvent and then XtDispatchEvent, until XtAppGetExitFlag()
   returns true.

   Applications can provide their own version of this loop, which tests
   some global termination flag or tests that the number of top-level
   widgets is larger than zero before circling back to the call to
   XtAppNextEvent.

SEE ALSO

   X Toolkit Intrinsics - C Language Interface
   Xlib - C Language X Interface


More Linux Commands

manpages/gnutls_hmac_get_len.3.html
gnutls_hmac_get_len(3) - API function - Linux manual page...
This function will return the length of the output data of the given hmac algorithm. RETURNS The length or zero on error. SINCE 2.10.0 REPORTING BUGS Report bug

manpages/dremf.3.html
dremf(3) - floating-point remainder function (Man Page).....
The remainder() function computes the remainder of dividing x by y. The return value is x-n*y, where n is the value x / y, rounded to the nearest integer. If th

manpages/ooimpress.1.html
lowriter(1) - LibreOffice office suite - Linux manual page
lowriter is a multi-platform word processing and desktop publishing tool derived from OpenOffice.org 3.3 Beta in September 2010. libreoffice is a shell script

manpages/expire.8.html
expire(8) - Usenet article and history expiration program...
expire scans the history(5)-format text file pathdb/history and uses the information recorded in it to purge itself of old news articles. Articles stored using

manpages/mlabel.1.html
mlabel(1) - make an MSDOS volume label - Linux manual page
The mlabel command adds a volume label to a disk. Its syntax is: mlabel [-vcsn] [-N serial] drive:[new_label] Mlabel displays the current volume label, if prese

manpages/gitignore.5.html
gitignore(5) - Specifies intentionally untracked files to ig
A gitignore file specifies intentionally untracked files that Git should ignore. Files already tracked by Git are not affected; see the NOTES below for details.

manpages/nmblookup.1.html
nmblookup(1) - NetBIOS over TCP/IP client used to lookup Net
This tool is part of the samba(7) suite. nmblookup is used to query NetBIOS names and map them to IP addresses in a network using NetBIOS over TCP/IP queries. T

manpages/byteorder.3.html
byteorder(3) - convert values between host and network byte
byteorder.3 - The htonl() function converts the unsigned integer hostlong from host byte order to network byte order. The htons() function converts the unsigned

manpages/can_change_color.3ncurses.html
can_change_color(3ncurses) - curses color manipulation routi
Overview curses support color attributes on terminals with that capability. To use these routines start_color must be called, usually right after initscr. Color

manpages/XGetAtomNames.3.html
XGetAtomNames(3) - create or return atom names (Man Page)...
The XInternAtom function returns the atom identifier associated with the specified atom_name string. If only_if_exists is False, the atom is created if it does

manpages/XkbFreeClientMap.3.html
XkbFreeClientMap(3) - Free memory used by the client map mem
XkbFreeClientMap frees the components of client map specified by which in the XkbDescRec structure specified by the xkb parameter and sets the corresponding str

manpages/irb.1.html
irb.1 (Manual - Linux man page)............................
irb is the REPL(read-eval-print loop) environment for Ruby programs. OPTIONS -version Prints the version of. E external[]:internal -encoding external[]:i....





We can't live, work or learn in freedom unless the software we use is free.