1XIQUERYVERSION(3)                                            XIQUERYVERSION(3)
2
3
4

NAME

6       XIQueryVersion - announce and query the support XI2 version.
7

SYNOPSIS

9       #include <X11/extensions/XInput2.h>
10
11       Status XIQueryVersion( Display *display,
12                              int *major_version_inout,
13                              int *minor_version_inout);
14
15       display
16              Specifies the connection to the X server.
17
18       major_version_inout
19              Specifies the client's supported XI2 version, and
20              returns the server's supported version.
21
22       minor_version_inout
23              Specifies the client's supported XI2 version, and
24              returns the server's supported version.
25

DESCRIPTION

27           XIQueryVersion announces the client's supported XI2 version to
28           the server and returns server's supported X Input version. Clients
29           are required to use XIQueryVersion instead of XGetExtensionVersion
30           if they use XI2 calls. The server may treat a client differently
31           depending on the supported version announced by the client.
32           The major_version_inout must be 2 or greater, otherwise a BadValue
33           error occurs.
34
35           If the server does not support XI2, XIQueryVersion returns BadRequest
36           to the client. Otherwise, XIQueryVersion returns Success. In both
37           cases major_version_inout and minor_version_inout are set to the
38           server's supported version.
39
40           If the client has previously called XIQueryVersion, then the result
41           depends on the previously requested version and the currently
42           requested version.
43
44           If either the previous or current requested versions is less than
45           2.2, or if the requested major version numbers do not match, then
46           consecutive calls to XIQueryVersion by the same client always
47           return the first returned major.minor version. If the client
48           requests a version lower than the first returned major.minor
49           version in a subsequent call, a BadValue error occurs.
50
51           If all of the requested versions are 2.2 or greater, then
52           consecutive calls to XIQueryVersion by the same client with the
53           same major version will return the requested version, but the server
54           will operate according to the highest requested version number or
55           the highest supported version, whichever is lower.
56
57           XIQueryVersion can generate a BadValue error.
58

EXAMPLES

60           int rc;
61           int major = 2;
62           int minor = 0;
63
64           rc = XIQueryVersion(dpy, &major, &minor);
65           if (rc == Success)
66               printf("XI2 supported. (%d.%d)\n", major, minor);
67           else if (rc == BadRequest)
68               printf("No XI2 support. (%d.%d only)\n", major, minor);
69           else
70               printf("Internal error\n");
71

DIAGNOSTICS

73           BadValue
74                  A value is outside of the permitted range.
75
76
77
78                                  06/19/2019                 XIQUERYVERSION(3)
Impressum