1d4401354Smrg<?xml version="1.0" encoding="utf-8"?>
2d4401354Smrg<!--
3d4401354SmrgCopyright (C) 2006 Ian Osgood
4d4401354SmrgAll Rights Reserved.
5d4401354Smrg
6d4401354SmrgPermission is hereby granted, free of charge, to any person ob/Sintaining a copy
7d4401354Smrgof this software and associated documentation files (the "Software"), to deal
8d4401354Smrgin the Software without restriction, including without limitation the rights
9d4401354Smrgto use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10d4401354Smrgcopies of the Software, and to permit persons to whom the Software is
11d4401354Smrgfurnished to do so, subject to the following conditions:
12d4401354Smrg
13d4401354SmrgThe above copyright notice and this permission notice shall be included in all
14d4401354Smrgcopies or substantial portions of the Software.
15d4401354Smrg
16d4401354SmrgTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17d4401354SmrgIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18d4401354SmrgFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19d4401354SmrgAUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20d4401354SmrgACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21d4401354SmrgWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22d4401354Smrg
23d4401354SmrgExcept as contained in this notice, the names of the authors or their
24d4401354Smrginstitutions shall not be used in advertising or otherwise to promote the
25d4401354Smrgsale, use or other dealings in this Software without prior written
26d4401354Smrgauthorization from the authors.
27d4401354Smrg-->
28d4401354Smrg
29d4401354Smrg<xcb header="xtest" extension-xname="XTEST" extension-name="Test"
30f591e195Smrg    major-version="2" minor-version="2">
31d4401354Smrg
32d4401354Smrg    <import>xproto</import>
33d4401354Smrg    
34d4401354Smrg    <!-- Requests -->
35d4401354Smrg    <request name="GetVersion" opcode="0">
36d4401354Smrg        <field type="CARD8"  name="major_version" />
37d4401354Smrg        <pad bytes="1" />
38d4401354Smrg        <field type="CARD16" name="minor_version" />
39d4401354Smrg        <reply>
40d4401354Smrg            <field type="CARD8"  name="major_version" />
41d4401354Smrg            <field type="CARD16" name="minor_version" />
42d4401354Smrg        </reply>
43d4401354Smrg    </request>
44d4401354Smrg
45d4401354Smrg    <enum name="Cursor">
46d4401354Smrg        <item name="None">   <value>0</value></item>
47d4401354Smrg        <item name="Current"><value>1</value></item>
48d4401354Smrg    </enum>
49d4401354Smrg
50d4401354Smrg    <request name="CompareCursor" opcode="1">
51d4401354Smrg        <field type="WINDOW" name="window" />
52d4401354Smrg        <field type="CURSOR" name="cursor" />
53d4401354Smrg        <reply>
54d4401354Smrg            <field type="BOOL" name="same" />
55d4401354Smrg        </reply>
56d4401354Smrg    </request>
57d4401354Smrg    
58d4401354Smrg    <!-- There are several ways to use the FakeInput request:
59d4401354Smrg            1. Simulate a keypress:
60d4401354Smrg                type   = XCBKeyPress or XCBKeyRelease
61d4401354Smrg                detail = keycode
62d4401354Smrg            2. Simulate a button:
63d4401354Smrg                type   = XCBButtonPress or XCBButtonRelease
64d4401354Smrg                detail = enum XCBButton (1..5)
65d4401354Smrg            3. Simulate mouse motion:
66d4401354Smrg                type   = XCBMotionNotify
67d4401354Smrg                detail = 0 or 1
68d4401354Smrg                root = XCBNone or a root window id
69d4401354Smrg                rootX,
70d4401354Smrg                rootY  = position (relative if detail==1)
71d4401354Smrg
72d4401354Smrg        Version 2.2 adds support for the XInput extension:
73d4401354Smrg            4. Simulate a device keypress
74d4401354Smrg            5. Simulate a device button
75d4401354Smrg            6. Simulate a proximity event
76d4401354Smrg            7. Simulate a device motion event
77d4401354Smrg                [These are not yet supported, since we would also need to
78d4401354Smrg                 send the variable-length state of the axes.]
79d4401354Smrg
80d4401354Smrg        In each case, time is set to a delay in milliseconds.
81d4401354Smrg    -->
82d4401354Smrg
83d4401354Smrg    <request name="FakeInput" opcode="2">
84d4401354Smrg        <field type="BYTE"   name="type" />
85d4401354Smrg        <field type="BYTE"   name="detail" />
86d4401354Smrg        <pad bytes="2" />
87d4401354Smrg        <field type="CARD32" name="time" />
88d4401354Smrg        <field type="WINDOW" name="root" />
89d4401354Smrg        <pad bytes="8" />
90986c8b3dSmrg        <field type="INT16" name="rootX" />
91986c8b3dSmrg        <field type="INT16" name="rootY" />
92d4401354Smrg        <pad bytes="7" />
93d4401354Smrg        <!-- Version 2.2: XInput device -->
94d4401354Smrg        <field type="CARD8"  name="deviceid" />
95d4401354Smrg        <!-- Version 2.2: optional axes state here -->
96d4401354Smrg    </request>
97d4401354Smrg
98d4401354Smrg    <request name="GrabControl" opcode="3">
99d4401354Smrg        <field type="BOOL" name="impervious" />
100d4401354Smrg        <pad bytes="3" />
101d4401354Smrg    </request>
102d4401354Smrg    
103d4401354Smrg    <!-- No events or errors -->
104d4401354Smrg
105d4401354Smrg</xcb>
106