1XtDisplayInitialize(3x)          XT FUNCTIONS          XtDisplayInitialize(3x)
2
3
4

NAME

6       XtDisplayInitialize, XtOpenDisplay, XtDatabase, XtScreenDatabase,
7       XtCloseDisplay - initialize, open, or close a display
8

SYNTAX

10       void XtDisplayInitialize(XtAppContext app_context, Display *display,
11              String application_name, String application_class, XrmOptionDe‐
12              scRec *options, Cardinal num_options, int *argc, String *argv);
13
14       Display *XtOpenDisplay(XtAppContext app_context, String display_string,
15              String application_name, String application_class, XrmOptionDe‐
16              scRec *options, Cardinal num_options, int *argc, String *argv);
17
18       void XtCloseDisplay(Display *display);
19
20       XrmDatabase XtDatabase(Display *display);
21
22       XrmDatabase XtScreenDatabase(Screen* screen);
23

ARGUMENTS

25       argc      Specifies a pointer to the number of command line parameters.
26
27       argv      Specifies the command line parameters.
28
29       app_context
30                 Specifies the application context.
31
32       application_class
33                 Specifies the class name of this application, which usually
34                 is the generic name for all instances of this application.
35
36       application_name
37                 Specifies the name of the application instance.
38
39       display   Specifies the display.  Note that a display can be in at most
40                 one application context.
41
42       num_options
43                 Specifies the number of entries in the options list.
44
45       options   Specifies how to parse the command line for any application-
46                 specific resources.  The options argument is passed as a
47                 parameter to XrmParseCommand.  For further information, see
48                 Xlib - C Language X Interface.
49
50       screen    Specifies the screen whose resource database is to be
51                 returned.
52

DESCRIPTION

54       The XtDisplayInitialize function builds the resource database, calls
55       the Xlib XrmParseCommand function to parse the command line, and per‐
56       forms other per display initialization.  After XrmParseCommand has been
57       called, argc and argv contain only those parameters that were not in
58       the standard option table or in the table specified by the options
59       argument.  If the modified argc is not zero, most applications simply
60       print out the modified argv along with a message listing the allowable
61       options.  On UNIX-based systems, the application name is usually the
62       final component of argv[0].  If the synchronize resource is True for
63       the specified application, XtDisplayInitialize calls the Xlib XSynchro‐
64       nize function to put Xlib into synchronous mode for this display con‐
65       nection.  If the reverseVideo resource is True, the Intrinsics exchange
66       XtDefaultForeground and XtDefaultBackground for widgets created on this
67       display.  (See Section 9.6.1).
68
69       The XtOpenDisplay function calls XOpenDisplay the specified display
70       name.  If display_string is NULL, XtOpenDisplay uses the current value
71       of the -display option specified in argv and if no display is specified
72       in argv, uses the user's default display (on UNIX-based systems, this
73       is the value of the DISPLAY environment variable).
74
75       If this succeeds, it then calls XtDisplayInitialize and pass it the
76       opened display and the value of the -name option specified in argv as
77       the application name.  If no name option is specified, it uses the
78       application name passed to XtOpenDisplay.  If the application name is
79       NULL, it uses the last component of argv[0].  XtOpenDisplay returns the
80       newly opened display or NULL if it failed.
81
82       XtOpenDisplay is provided as a convenience to the application program‐
83       mer.
84
85       The XtCloseDisplay function closes the specified display as soon as it
86       is safe to do so.  If called from within an event dispatch (for exam‐
87       ple, a callback procedure), XtCloseDisplay does not close the display
88       until the dispatch is complete.  Note that applications need only call
89       XtCloseDisplay if they are to continue executing after closing the dis‐
90       play; otherwise, they should call XtDestroyApplicationContext or just
91       exit.
92
93       The XtDatabase function returns the fully merged resource database that
94       was built by XtDisplayInitialize associated with the display that was
95       passed in.  If this display has not been initialized by XtDisplay‐
96       Initialize, the results are not defined.
97
98       The XtScreenDatabase function returns the fully merged resource data‐
99       base associated with the specified screen. If the screen does not
100       belong to a Display initialized by XtDisplayInitialize, the results are
101       undefined.
102

SEE ALSO

104       XtAppCreateShell(3Xt), XtCreateApplicationContext(3Xt)
105       X Toolkit Intrinsics - C Language Interface
106       Xlib - C Language X Interface
107
108
109
110X Version 11                      libXt 1.0.4          XtDisplayInitialize(3x)
Impressum