U. Artie Eoff | 65e7e7a | 2012-12-07 13:50:29 -0800 | [diff] [blame] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
Derek Foreman | f6a6592 | 2015-02-24 09:32:14 -0600 | [diff] [blame] | 2 | <protocol name="weston_test"> |
U. Artie Eoff | 65e7e7a | 2012-12-07 13:50:29 -0800 | [diff] [blame] | 3 | |
| 4 | <copyright> |
| 5 | Copyright © 2012 Intel Corporation |
| 6 | |
Bryce Harrington | a49caf9 | 2015-06-11 13:24:24 -0700 | [diff] [blame] | 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: |
U. Artie Eoff | 65e7e7a | 2012-12-07 13:50:29 -0800 | [diff] [blame] | 13 | |
Bryce Harrington | a49caf9 | 2015-06-11 13:24:24 -0700 | [diff] [blame] | 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. |
U. Artie Eoff | 65e7e7a | 2012-12-07 13:50:29 -0800 | [diff] [blame] | 25 | </copyright> |
| 26 | |
Derek Foreman | f6a6592 | 2015-02-24 09:32:14 -0600 | [diff] [blame] | 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> |
U. Artie Eoff | 65e7e7a | 2012-12-07 13:50:29 -0800 | [diff] [blame] | 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="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 Chalupa | c8daf77 | 2015-03-30 06:37:55 -0400 | [diff] [blame] | 57 | <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 Eoff | 65e7e7a | 2012-12-07 13:50:29 -0800 | [diff] [blame] | 63 | <event name="pointer_position"> |
| 64 | <arg name="x" type="fixed"/> |
| 65 | <arg name="y" type="fixed"/> |
| 66 | </event> |
Bryce Harrington | 83d61b6 | 2014-12-15 17:03:04 -0800 | [diff] [blame] | 67 | <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 Eoff | 65e7e7a | 2012-12-07 13:50:29 -0800 | [diff] [blame] | 83 | </interface> |
Pekka Paalanen | f5b74f7 | 2015-03-25 12:50:31 +0200 | [diff] [blame] | 84 | |
| 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 Eoff | 65e7e7a | 2012-12-07 13:50:29 -0800 | [diff] [blame] | 119 | </protocol> |