xtest.xml revision d4401354
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" 30d4401354Smrg major-version="2" minor-version="1"> 31d4401354Smrg <!-- Conforms to XTEST 2.1 --> 32d4401354Smrg 33d4401354Smrg <import>xproto</import> 34d4401354Smrg 35d4401354Smrg <!-- Requests --> 36d4401354Smrg <request name="GetVersion" opcode="0"> 37d4401354Smrg <field type="CARD8" name="major_version" /> 38d4401354Smrg <pad bytes="1" /> 39d4401354Smrg <field type="CARD16" name="minor_version" /> 40d4401354Smrg <reply> 41d4401354Smrg <field type="CARD8" name="major_version" /> 42d4401354Smrg <field type="CARD16" name="minor_version" /> 43d4401354Smrg </reply> 44d4401354Smrg </request> 45d4401354Smrg 46d4401354Smrg <enum name="Cursor"> 47d4401354Smrg <item name="None"> <value>0</value></item> 48d4401354Smrg <item name="Current"><value>1</value></item> 49d4401354Smrg </enum> 50d4401354Smrg 51d4401354Smrg <request name="CompareCursor" opcode="1"> 52d4401354Smrg <field type="WINDOW" name="window" /> 53d4401354Smrg <field type="CURSOR" name="cursor" /> 54d4401354Smrg <reply> 55d4401354Smrg <field type="BOOL" name="same" /> 56d4401354Smrg </reply> 57d4401354Smrg </request> 58d4401354Smrg 59d4401354Smrg <!-- There are several ways to use the FakeInput request: 60d4401354Smrg 1. Simulate a keypress: 61d4401354Smrg type = XCBKeyPress or XCBKeyRelease 62d4401354Smrg detail = keycode 63d4401354Smrg 2. Simulate a button: 64d4401354Smrg type = XCBButtonPress or XCBButtonRelease 65d4401354Smrg detail = enum XCBButton (1..5) 66d4401354Smrg 3. Simulate mouse motion: 67d4401354Smrg type = XCBMotionNotify 68d4401354Smrg detail = 0 or 1 69d4401354Smrg root = XCBNone or a root window id 70d4401354Smrg rootX, 71d4401354Smrg rootY = position (relative if detail==1) 72d4401354Smrg 73d4401354Smrg Version 2.2 adds support for the XInput extension: 74d4401354Smrg 4. Simulate a device keypress 75d4401354Smrg 5. Simulate a device button 76d4401354Smrg 6. Simulate a proximity event 77d4401354Smrg 7. Simulate a device motion event 78d4401354Smrg [These are not yet supported, since we would also need to 79d4401354Smrg send the variable-length state of the axes.] 80d4401354Smrg 81d4401354Smrg In each case, time is set to a delay in milliseconds. 82d4401354Smrg --> 83d4401354Smrg 84d4401354Smrg <request name="FakeInput" opcode="2"> 85d4401354Smrg <field type="BYTE" name="type" /> 86d4401354Smrg <field type="BYTE" name="detail" /> 87d4401354Smrg <pad bytes="2" /> 88d4401354Smrg <field type="CARD32" name="time" /> 89d4401354Smrg <field type="WINDOW" name="root" /> 90d4401354Smrg <pad bytes="8" /> 91d4401354Smrg <field type="CARD16" name="rootX" /> 92d4401354Smrg <field type="CARD16" name="rootY" /> 93d4401354Smrg <pad bytes="7" /> 94d4401354Smrg <!-- Version 2.2: XInput device --> 95d4401354Smrg <field type="CARD8" name="deviceid" /> 96d4401354Smrg <!-- Version 2.2: optional axes state here --> 97d4401354Smrg </request> 98d4401354Smrg 99d4401354Smrg <request name="GrabControl" opcode="3"> 100d4401354Smrg <field type="BOOL" name="impervious" /> 101d4401354Smrg <pad bytes="3" /> 102d4401354Smrg </request> 103d4401354Smrg 104d4401354Smrg <!-- No events or errors --> 105d4401354Smrg 106d4401354Smrg</xcb> 107