XtOpenApplication(3) XT FUNCTIONS XtOpenApplication(3)

# [NAME](#NAME)

XtOpenApplication, XtVaOpenApplication - initialize, open, or close a display

# [SYNTAX](#SYNTAX)

#include &lt;X11/Intrinsic.h&gt;

Widget XtOpenApplication(XtAppContext \**app\_context\_return*, const char \**application\_class*, XrmOptionDescRec \**options*, Cardinal *num\_options*, int \**argc\_in\_out*, char \*\**argv\_in\_out*, String \**fallback\_resources*, WidgetClass *widget\_class*, ArgList *args*, Cardinal *num\_args*);

Widget XtVaOpenApplication(XtAppContext \**app\_context\_return*, const char \**application\_class*, XrmOptionDescRec \**options*, Cardinal *num\_options*, int \**argc\_in\_out*, char \*\**argv\_in\_out*, String \**fallback\_resources*, WidgetClass *widget\_class*, ...);

# [ARGUMENTS](#ARGUMENTS)

[*app\_context\_return*](#app_context_return)

Specifies the application context.

[*application\_class*](#application_class)

Specifies the class name of this application, which usually is the generic name for all instances of this application.

[*options*](#options)

Specifies how to parse the command line for any application-specific resources. The options argument is passed as a parameter to **XrmParseCommand**. For further information, see *Xlib - C Language X Interface*.

[*num\_options*](#num_options)

Specifies the number of entries in the options list.

[*argc\_in\_out*](#argc_in_out)

Specifies a pointer to the number of command line parameters.

[*argv\_in\_out*](#argv_in_out)

Specifies the command line parameters.

[*fallback\_resources*](#fallback_resources)

Specifies resource values to be used if the application class resource file cannot be opened or read, or NULL.

[*widget\_class*](#widget_class)

Specifies the widget class of the shell to be created.

[*args*](#args)

Specifies the argument list to override any other resource specification for the created shell widget.

[*num\_args*](#num_args)

Specifies the number of entries in the argument list.

*...*

Specifies the variable argument list to override any other resource specification for the created shell widget.

# [DESCRIPTION](#DESCRIPTION)

The **XtOpenApplication** function calls **XtToolkitInitialize** followed by **XtCreateApplicationContext**, then calls **XtOpenDisplay** with *display\_string* NULL and *application\_name* NULL, and finally calls **XtAppCreateShell** with *application\_name* NULL, the specified *widget\_class*, and the specified *args* and *num\_args* and returns the created shell. The modified *argc* and *argv* returned by **XtDisplayInitialize** are returned in *argc\_in\_out* and *argv\_in\_out*. If *app\_context\_return* is not NULL, the created application context is also returned. If the display specified by the command line cannot be opened, an error message is issued and **XtOpenApplication** terminates the application. If *fallback\_resources* is non-NULL, **XtAppSetFallbackResources** is called with the value prior to calling **XtOpenDisplay**.

XtAppInitialize and XtVaAppInitialize have been superseded by **XtOpenApplication** and **XtVaOpenApplication** respectively.

# [SEE ALSO](#SEE_ALSO)

[XtAppInitialize(3)](/man/os/libxt/XtAppInitialize.3), [XtVaAppInitialize(3)](/man/os/libxt/XtVaAppInitialize.3)  
*X Toolkit Intrinsics - C Language Interface*  
*Xlib - C Language X Interface*

libXt 1.3.1 X Version 11

---

Document: XtVaOpenApplication(3) from libxt 1.3.1-r8 (Chainguard OS)
Source: https://gitlab.freedesktop.org/xorg/lib/libxt.git
