1XkbOpenDisplay(3) XKB FUNCTIONS XkbOpenDisplay(3)
2
3
4
6 XkbOpenDisplay - Checks for a compatible version of the Xkb extension
7 in both the library and the server, and initializes the extension for
8 use.
9
11 Display *XkbOpenDisplay (char *display_name, int *event_rtrn, int
12 *error_rtrn, int *major_in_out, int *minor_in_out, int *rea‐
13 son_rtrn);
14
16 display_name
17 hardware display name, which determines the display and communi‐
18 cations domain to be used
19
20 event_rtrn
21 backfilled with the extension base event code
22
23 error_rtrn
24 backfilled with the extension base error code
25
26 major_in_out
27 compile time lib major version in, server major version out
28
29 minor_in_out
30 compile time lib min version in, server minor version out
31
32 reason_rtrn
33 backfilled with a status code
34
36 As a convenience, you can use the function XkbOpenDisplay to perform
37 these three tasks at once: open a connection to an X server, check for
38 a compatible version of the Xkb extension in both the library and the
39 server, and initialize the extension for use.
40
41 XkbOpenDisplay is a convenience function that opens an X display con‐
42 nection and initializes the X keyboard extension. In all cases, upon
43 return reason_rtrn contains a status value indicating success or the
44 type of failure. If major_in_out and minor_in_out are not NULL,
45 XkbOpenDisplay first calls XkbLibraryVersion to determine whether the
46 client library is compatible, passing it the values pointed to by
47 major_in_out and minor_in_out. If the library is incompatible,
48 XkbOpenDisplay backfills major_in_out and minor_in_out with the major
49 and minor extension versions of the library being used and returns
50 NULL. If the library is compatible, XkbOpenDisplay next calls
51 XOpenDisplay with the display_name. If this fails, the function
52 returns NULL. If successful, XkbOpenDisplay calls XkbQueryExtension and
53 backfills the major and minor Xkb server extension version numbers in
54 major_in_out and minor_in_out. If the server extension version is not
55 compatible with the library extension version or if the server exten‐
56 sion is not present, XkbOpenDisplay closes the display and returns
57 NULL. When successful, the function returns the display connection.
58
59 The possible values for reason_rtrn are:
60
61
62 · XkbOD_BadLibraryVersion indicates XkbLibraryVersion returned
63 False.
64
65 · XkbOD_ConnectionRefused indicates the display could not be opened.
66
67 · XkbOD_BadServerVersion indicates the library and the server have
68 incompatible extension versions.
69
70 · XkbOD_NonXkbServer indicates the extension is not present in the X
71 server.
72
73 · XkbOD_Success indicates that the function succeeded.
74
76 NULL The XkbOpenDisplay function returns NULL if the library
77 is incompatible.
78
79 The XkbOpenDisplay function returns NULL if the call to
80 XOpenDisplay with the display_name fails.
81
82 The XkbOpenDisplay function returns NULL and closes the
83 display if the server extension version is not compatible
84 with the library extension version or if the server exten‐
85 sion is not present.
86
88 BadAccess The Xkb extension has not been properly initialized
89
91 XkbLibraryVersion(3), XkbQueryExtension(3), XOpenDisplay(3)
92
93
94
95X Version 11 libX11 1.6.7 XkbOpenDisplay(3)