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