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