---
name: "XtMainLoop"
section: "3x"
platform: "linux"
package: "libxt-dev"
version: "4.3.0.dfsg.1-14sarge7"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/XtNextEvent/3x"
---

# XtMainLoop(3x)

query and process events and input

Part of [XtNextEvent(3x)](/XtNextEvent/3x.md).

## NAME

XtNextEvent, XtPending, XtPeekEvent, XtProcessEvent, XtMainLoop - query and process events and input

## SYNTAX

void XtNextEvent(XEvent \**event\_return*);

Boolean XtPeekEvent(XEvent \**event\_return*);

Boolean XtPending(void);  void XtProcessEvent(XtInputMask *mask*);

void XtMainLoop(void);

## ARGUMENTS

- *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

*XtNextEvent* has been replaced by *XtAppNextEvent*.

*XtPeekEvent* has been replaced by *XtAppPeekEvent*.

*XtPending* has been replaced by *XtAppPending*.

*XtProcessEvent* has been replaced by *XtAppProcessEvent*.

*XtMainLoop* has been replaced by *XtAppMainLoop*.

## SEE ALSO

XtAppNextEvent(3xt), XtAppPending(3Xt), XtAppPeekEvent(3Xt),  XtAppProcessEvent(3Xt), XtAppMainLoop(3Xt)\
 *X Toolkit Intrinsics - C Language Interface*\
 *Xlib - C Language X Interface*
