blob: 74a152146cd66739a9ce98fb8bc72f2c5f9b02e7 [file] [log] [blame]
U. Artie Eoff65e7e7a2012-12-07 13:50:29 -08001<?xml version="1.0" encoding="UTF-8"?>
Derek Foremanf6a65922015-02-24 09:32:14 -06002<protocol name="weston_test">
U. Artie Eoff65e7e7a2012-12-07 13:50:29 -08003
4 <copyright>
5 Copyright © 2012 Intel Corporation
6
Bryce Harringtona49caf92015-06-11 13:24:24 -07007 Permission is hereby granted, free of charge, to any person obtaining a
8 copy of this software and associated documentation files (the "Software"),
9 to deal in the Software without restriction, including without limitation
10 the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 and/or sell copies of the Software, and to permit persons to whom the
12 Software is furnished to do so, subject to the following conditions:
U. Artie Eoff65e7e7a2012-12-07 13:50:29 -080013
Bryce Harringtona49caf92015-06-11 13:24:24 -070014 The above copyright notice and this permission notice (including the next
15 paragraph) shall be included in all copies or substantial portions of the
16 Software.
17
18 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
21 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
24 DEALINGS IN THE SOFTWARE.
U. Artie Eoff65e7e7a2012-12-07 13:50:29 -080025 </copyright>
26
Derek Foremanf6a65922015-02-24 09:32:14 -060027 <interface name="weston_test" version="1">
28 <description summary="weston internal testing">
29 Internal testing facilities for the weston compositor.
30
31 It can't be stressed enough that these should never ever be used
32 outside of running weston's tests. The weston-test.so module should
33 never be installed.
34
35 These requests may allow clients to do very bad things.
36 </description>
U. Artie Eoff65e7e7a2012-12-07 13:50:29 -080037 <request name="move_surface">
38 <arg name="surface" type="object" interface="wl_surface"/>
39 <arg name="x" type="int"/>
40 <arg name="y" type="int"/>
41 </request>
42 <request name="move_pointer">
43 <arg name="x" type="int"/>
44 <arg name="y" type="int"/>
45 </request>
46 <request name="send_button">
47 <arg name="button" type="int"/>
48 <arg name="state" type="uint"/>
49 </request>
50 <request name="activate_surface">
51 <arg name="surface" type="object" interface="wl_surface" allow-null="true"/>
52 </request>
53 <request name="send_key">
54 <arg name="key" type="uint"/>
55 <arg name="state" type="uint"/>
56 </request>
Marek Chalupac8daf772015-03-30 06:37:55 -040057 <request name="device_release">
58 <arg name="device" type="string"/>
59 </request>
60 <request name="device_add">
61 <arg name="device" type="string"/>
62 </request>
U. Artie Eoff65e7e7a2012-12-07 13:50:29 -080063 <event name="pointer_position">
64 <arg name="x" type="fixed"/>
65 <arg name="y" type="fixed"/>
66 </event>
Bryce Harrington83d61b62014-12-15 17:03:04 -080067 <request name="capture_screenshot">
68 <description summary="records current screen image">
69 Records an image of what is currently displayed on a given
70 display output, returning the image as an event.
71 </description>
72 <arg name="output" type="object" interface="wl_output"
73 summary="output to capture from"/>
74 <arg name="buffer" type="object" interface="wl_buffer"
75 summary="buffer for returning screenshots to the test client"/>
76 </request>
77 <event name="capture_screenshot_done">
78 <description summary="screenshot capture is done">
79 The capture_screenshot_done signal is sent when a screenshot has been copied into the
80 provided buffer.
81 </description>
82 </event>
U. Artie Eoff65e7e7a2012-12-07 13:50:29 -080083 </interface>
Pekka Paalanenf5b74f72015-03-25 12:50:31 +020084
85 <interface name="weston_test_runner" version="1">
86 <description summary="weston internal testing">
87 This is a global singleton interface for Weston internal tests.
88
89 This interface allows a test client to trigger compositor-side
90 test procedures. This is useful for cases, where the actual tests
91 are in compositor plugins, but they also require the presence of
92 a particular client.
93
94 This interface is implemented by the compositor plugins containing
95 the testing code.
96
97 A test client starts a test with the "run" request. It must not send
98 another "run" request until receiving the "finished" event. If the
99 compositor-side test succeeds, the "finished" event is sent. If the
100 compositor-side test fails, the compositor should send the protocol
101 error "test_failed", but it may also exit with an error (e.g. SEGV).
102
103 Unknown test name will raise "unknown_test" protocol error.
104 </description>
105
106 <enum name="error">
107 <entry name="test_failed" value="0" summary="compositor test failed"/>
108 <entry name="unknown_test" value="1" summary="unrecognized test name"/>
109 </enum>
110
111 <request name="destroy" type="destructor"/>
112
113 <request name="run">
114 <arg name="test_name" type="string"/>
115 </request>
116
117 <event name="finished"/>
118 </interface>
U. Artie Eoff65e7e7a2012-12-07 13:50:29 -0800119</protocol>