blob: 2fd6b7a461855db3193d52f9d5dbf75878364e7d [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
7 Permission to use, copy, modify, distribute, and sell this
8 software and its documentation for any purpose is hereby granted
9 without fee, provided that the above copyright notice appear in
10 all copies and that both that copyright notice and this permission
11 notice appear in supporting documentation, and that the name of
12 the copyright holders not be used in advertising or publicity
13 pertaining to distribution of the software without specific,
14 written prior permission. The copyright holders make no
15 representations about the suitability of this software for any
16 purpose. It is provided "as is" without express or implied
17 warranty.
18
19 THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
20 SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
21 FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
22 SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
23 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
24 AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
25 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
26 THIS SOFTWARE.
27 </copyright>
28
Derek Foremanf6a65922015-02-24 09:32:14 -060029 <interface name="weston_test" version="1">
30 <description summary="weston internal testing">
31 Internal testing facilities for the weston compositor.
32
33 It can't be stressed enough that these should never ever be used
34 outside of running weston's tests. The weston-test.so module should
35 never be installed.
36
37 These requests may allow clients to do very bad things.
38 </description>
U. Artie Eoff65e7e7a2012-12-07 13:50:29 -080039 <request name="move_surface">
40 <arg name="surface" type="object" interface="wl_surface"/>
41 <arg name="x" type="int"/>
42 <arg name="y" type="int"/>
43 </request>
44 <request name="move_pointer">
45 <arg name="x" type="int"/>
46 <arg name="y" type="int"/>
47 </request>
48 <request name="send_button">
49 <arg name="button" type="int"/>
50 <arg name="state" type="uint"/>
51 </request>
52 <request name="activate_surface">
53 <arg name="surface" type="object" interface="wl_surface" allow-null="true"/>
54 </request>
55 <request name="send_key">
56 <arg name="key" type="uint"/>
57 <arg name="state" type="uint"/>
58 </request>
Marek Chalupac8daf772015-03-30 06:37:55 -040059 <request name="device_release">
60 <arg name="device" type="string"/>
61 </request>
62 <request name="device_add">
63 <arg name="device" type="string"/>
64 </request>
U. Artie Eoff65e7e7a2012-12-07 13:50:29 -080065 <event name="pointer_position">
66 <arg name="x" type="fixed"/>
67 <arg name="y" type="fixed"/>
68 </event>
Neil Roberts40c0c3f2013-10-29 20:13:45 +000069 <request name="get_n_egl_buffers">
70 <!-- causes a n_egl_buffers event to be sent which reports how many
71 buffer objects are live for the client -->
72 </request>
73 <event name="n_egl_buffers">
74 <arg name="n" type="uint"/>
75 </event>
Bryce Harrington83d61b62014-12-15 17:03:04 -080076 <request name="capture_screenshot">
77 <description summary="records current screen image">
78 Records an image of what is currently displayed on a given
79 display output, returning the image as an event.
80 </description>
81 <arg name="output" type="object" interface="wl_output"
82 summary="output to capture from"/>
83 <arg name="buffer" type="object" interface="wl_buffer"
84 summary="buffer for returning screenshots to the test client"/>
85 </request>
86 <event name="capture_screenshot_done">
87 <description summary="screenshot capture is done">
88 The capture_screenshot_done signal is sent when a screenshot has been copied into the
89 provided buffer.
90 </description>
91 </event>
U. Artie Eoff65e7e7a2012-12-07 13:50:29 -080092 </interface>
Pekka Paalanenf5b74f72015-03-25 12:50:31 +020093
94 <interface name="weston_test_runner" version="1">
95 <description summary="weston internal testing">
96 This is a global singleton interface for Weston internal tests.
97
98 This interface allows a test client to trigger compositor-side
99 test procedures. This is useful for cases, where the actual tests
100 are in compositor plugins, but they also require the presence of
101 a particular client.
102
103 This interface is implemented by the compositor plugins containing
104 the testing code.
105
106 A test client starts a test with the "run" request. It must not send
107 another "run" request until receiving the "finished" event. If the
108 compositor-side test succeeds, the "finished" event is sent. If the
109 compositor-side test fails, the compositor should send the protocol
110 error "test_failed", but it may also exit with an error (e.g. SEGV).
111
112 Unknown test name will raise "unknown_test" protocol error.
113 </description>
114
115 <enum name="error">
116 <entry name="test_failed" value="0" summary="compositor test failed"/>
117 <entry name="unknown_test" value="1" summary="unrecognized test name"/>
118 </enum>
119
120 <request name="destroy" type="destructor"/>
121
122 <request name="run">
123 <arg name="test_name" type="string"/>
124 </request>
125
126 <event name="finished"/>
127 </interface>
U. Artie Eoff65e7e7a2012-12-07 13:50:29 -0800128</protocol>