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

NAME

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

SYNTAX

10       #include <X11/Intrinsic.h>
11
12       void XtDisplayInitialize(XtAppContext app_context, Display *display,
13              const char *application_name, const char *application_class,
14              XrmOptionDescRec *options, Cardinal num_options, int *argc, char
15              **argv);
16
17       Display *XtOpenDisplay(XtAppContext app_context, const char *dis‐
18              play_string, const char *application_name, const char *applica‐
19              tion_class, XrmOptionDescRec *options, Cardinal num_options, int
20              *argc, char **argv);
21
22       void XtCloseDisplay(Display *display);
23
24       XrmDatabase XtDatabase(Display *display);
25
26       XrmDatabase XtScreenDatabase(Screen* screen);
27

ARGUMENTS

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

DESCRIPTION

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

SEE ALSO

108       XtAppCreateShell(3), XtCreateApplicationContext(3)
109       X Toolkit Intrinsics - C Language Interface
110       Xlib - C Language X Interface
111
112
113
114X Version 11                      libXt 1.2.0           XtDisplayInitialize(3)
Impressum