XIQueryVersion.txt revision c27c18e8
1XIQUERYVERSION(libmansuffix)
2============================
3
4NAME
5----
6
7   XIQueryVersion - announce and query the support XI2 version.
8
9SYNOPSIS
10--------
11
12   #include <X11/extensions/XInput2.h>
13
14   Status XIQueryVersion( Display *display,
15                          int *major_version_inout,
16                          int *minor_version_inout);
17   
18   display
19          Specifies the connection to the X server.
20
21   major_version_inout
22          Specifies the client's supported XI2 version, and
23          returns the server's supported version.
24
25   minor_version_inout
26          Specifies the client's supported XI2 version, and
27          returns the server's supported version.
28
29DESCRIPTION
30-----------
31
32   XIQueryVersion announces the client's supported XI2 version to
33   the server and returns server's supported X Input version. Clients 
34   are required to use XIQueryVersion instead of XGetExtensionVersion 
35   if they use XI2 calls. The server may treat a client differently 
36   depending on the supported version announced by the client.
37   The major_version_inout must be 2 or greater, otherwise a BadValue 
38   error occurs.
39
40   If the server does not support XI2, XIQueryVersion returns BadRequest 
41   to the client. Otherwise, XIQueryVersion returns Success. In both 
42   cases major_version_inout and minor_version_inout are set to the 
43   server's supported version.
44
45   XIQueryVersion can generate a BadValue error.
46
47
48EXAMPLES
49--------
50
51        int rc;
52        int major = 2;
53        int minor = 0;
54
55        rc = XIQueryVersion(dpy, &major, &minor);
56        if (rc == Success)
57            printf("XI2 supported. (%d.%d)\n", major, minor);
58        else if (rc == BadRequest)
59            printf("No XI2 support. (%d.%d only)\n", major, minor);
60        else
61            printf("Internal error\n");
62
63DIAGNOSTICS
64-----------
65
66   BadValue
67          A value is outside of the permitted range.
68
69