Name
XtAppInitialize — initialize the X Toolkit internals, create an application context, open a display, and create the initial application shell instance.
Synopsis
Widget XtAppInitialize(app_context_return, application_class, options, num_options, argc_in_out, argv_in_out, fallback_resources, args, num_args)
XtAppContext ∗app_context_return;
String application_class;
XrmOptionDescList options;
Cardinal num_options;
Cardinal ∗argc_in_out;
String ∗argv_in_out;
String ∗fallback_resources;
ArgList args;
Cardinal num_args;
Arguments
app_context_return
Returns the application context, if
non-NULL.
application_class
Specifies the class name of the application.
optionsSpecifies the command line options table.
num_optionsSpecifies the number of entries in options.
argc_in_outSpecifies a pointer to the number of command line arguments.
argv_in_outSpecifies a pointer to the command line arguments.
fallback_resources
Specifies resource values to be used if the application class resource file cannot be opened or read, or NULL.
argsSpecifies resource values to override any other resource specifications for the created shell widget.
num_argsSpecifies the count of args.
Description
XtAppInitialize calls XtToolkitInitialize and XtCreateApplicationContext, then calls XtOpenDisplay with a display_string of NULL and an application_name of NULL, and finally calls XtAppCreateShell with an application_name of NULL, a widget_class of applicationShellWidgetClass, 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 XtAppInitialize terminates the application. If fallback_resources is non-NULL, XtAppSetFallbackResources is called with the value prior to calling XtOpenDisplay.
The XtNvisual and XtNcolormap resources must be set while creating the shell, since they are permanent characteristics of the associated window. All descendants of a shell inherit the visual and colormap of the shell.
See Also
XtAppCreateShell(1), XtAppSetFallbackResources(1), XtCreateApplicationContext(1), XtDisplayInitialize(1), XtOpenDisplay(1).