tests: Add agl-client-shell test
[src/agl-compositor.git] / protocol / weston-test.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <protocol name="weston_test">
3
4   <copyright>
5     Copyright © 2012 Intel Corporation
6
7     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:
13
14     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.
25   </copyright>
26
27   <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>
37     <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="tv_sec_hi" type="uint"/>
44       <arg name="tv_sec_lo" type="uint"/>
45       <arg name="tv_nsec" type="uint"/>
46       <arg name="x" type="int"/>
47       <arg name="y" type="int"/>
48     </request>
49     <request name="send_button">
50       <arg name="tv_sec_hi" type="uint"/>
51       <arg name="tv_sec_lo" type="uint"/>
52       <arg name="tv_nsec" type="uint"/>
53       <arg name="button" type="int"/>
54       <arg name="state" type="uint"/>
55     </request>
56     <request name="send_axis">
57       <arg name="tv_sec_hi" type="uint"/>
58       <arg name="tv_sec_lo" type="uint"/>
59       <arg name="tv_nsec" type="uint"/>
60       <arg name="axis" type="uint"/>
61       <arg name="value" type="fixed"/>
62     </request>
63     <request name="activate_surface">
64       <arg name="surface" type="object" interface="wl_surface" allow-null="true"/>
65     </request>
66     <request name="send_key">
67       <arg name="tv_sec_hi" type="uint"/>
68       <arg name="tv_sec_lo" type="uint"/>
69       <arg name="tv_nsec" type="uint"/>
70       <arg name="key" type="uint"/>
71       <arg name="state" type="uint"/>
72     </request>
73     <request name="device_release">
74       <arg name="device" type="string"/>
75     </request>
76     <request name="device_add">
77       <arg name="device" type="string"/>
78     </request>
79     <event name="pointer_position">
80       <arg name="x" type="fixed"/>
81       <arg name="y" type="fixed"/>
82     </event>
83     <request name="capture_screenshot">
84       <description summary="records current screen image">
85         Records an image of what is currently displayed on a given
86         display output, returning the image as an event.
87       </description>
88       <arg name="output" type="object" interface="wl_output"
89            summary="output to capture from"/>
90       <arg name="buffer" type="object" interface="wl_buffer"
91            summary="buffer for returning screenshots to the test client"/>
92     </request>
93     <event name="capture_screenshot_done">
94           <description summary="screenshot capture is done">
95                 The capture_screenshot_done signal is sent when a screenshot has been copied into the
96                 provided buffer.
97           </description>
98     </event>
99     <request name="send_touch">
100       <arg name="tv_sec_hi" type="uint"/>
101       <arg name="tv_sec_lo" type="uint"/>
102       <arg name="tv_nsec" type="uint"/>
103       <arg name="touch_id" type="int"/>
104       <arg name="x" type="fixed"/>
105       <arg name="y" type="fixed"/>
106       <arg name="touch_type" type="uint"/>
107     </request>
108   </interface>
109
110   <interface name="weston_test_runner" version="1">
111     <description summary="weston internal testing">
112       This is a global singleton interface for Weston internal tests.
113
114       This interface allows a test client to trigger compositor-side
115       test procedures. This is useful for cases, where the actual tests
116       are in compositor plugins, but they also require the presence of
117       a particular client.
118
119       This interface is implemented by the compositor plugins containing
120       the testing code.
121
122       A test client starts a test with the "run" request. It must not send
123       another "run" request until receiving the "finished" event. If the
124       compositor-side test succeeds, the "finished" event is sent. If the
125       compositor-side test fails, the compositor should send the protocol
126       error "test_failed", but it may also exit with an error (e.g. SEGV).
127
128       Unknown test name will raise "unknown_test" protocol error.
129     </description>
130
131     <enum name="error">
132       <entry name="test_failed" value="0" summary="compositor test failed"/>
133       <entry name="unknown_test" value="1" summary="unrecognized test name"/>
134     </enum>
135
136     <request name="destroy" type="destructor"/>
137
138     <request name="run">
139       <arg name="test_name" type="string"/>
140     </request>
141
142     <event name="finished"/>
143   </interface>
144 </protocol>