~ubuntu-branches/ubuntu/natty/libxi/natty-201011191114

« back to all changes in this revision

Viewing changes to man/XIQueryVersion.txt

  • Committer: Bazaar Package Importer
  • Author(s): Julien Cristau
  • Date: 2009-11-21 18:39:28 UTC
  • mfrom: (1.1.10 upstream) (0.1.6 experimental)
  • Revision ID: james.westby@ubuntu.com-20091121183928-ek2jwqx3rmhv3zjz
Tags: 2:1.3-1
* Bump Standards-Version to 3.8.3.
* Add build-deps on xmlto and asciidoc to build the manpages.
* New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
XIQUERYVERSION(libmansuffix)
 
2
============================
 
3
 
 
4
NAME
 
5
----
 
6
 
 
7
   XIQueryVersion - announce and query the support XI2 version.
 
8
 
 
9
SYNOPSIS
 
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
 
 
29
DESCRIPTION
 
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
 
 
48
EXAMPLES
 
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
 
 
63
DIAGNOSTICS
 
64
-----------
 
65
 
 
66
   BadValue
 
67
          A value is outside of the permitted range.
 
68