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 *er‐
12 ror_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, Xk‐
45 bOpenDisplay first calls XkbLibraryVersion to determine whether the
46 client library is compatible, passing it the values pointed to by ma‐
47 jor_in_out and minor_in_out. If the library is incompatible, Xk‐
48 bOpenDisplay backfills major_in_out and minor_in_out with the major and
49 minor extension versions of the library being used and returns NULL.
50 If the library is compatible, XkbOpenDisplay next calls XOpenDisplay
51 with the display_name. If this fails, the function returns NULL. If
52 successful, XkbOpenDisplay calls XkbQueryExtension and backfills the
53 major and minor Xkb server extension version numbers in major_in_out
54 and minor_in_out. If the server extension version is not compatible
55 with the library extension version or if the server extension is not
56 present, XkbOpenDisplay closes the display and returns NULL. When suc‐
57 cessful, 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.7.0 XkbOpenDisplay(3)