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> |
Neil Roberts | 40c0c3f | 2013-10-29 20:13:45 +0000 | [diff] [blame] | 67 | <request name="get_n_egl_buffers"> |
| 68 | <!-- causes a n_egl_buffers event to be sent which reports how many |
| 69 | buffer objects are live for the client --> |
| 70 | </request> |
| 71 | <event name="n_egl_buffers"> |
| 72 | <arg name="n" type="uint"/> |
| 73 | </event> |
Bryce Harrington | 83d61b6 | 2014-12-15 17:03:04 -0800 | [diff] [blame] | 74 | <request name="capture_screenshot"> |
| 75 | <description summary="records current screen image"> |
| 76 | Records an image of what is currently displayed on a given |
| 77 | display output, returning the image as an event. |
| 78 | </description> |
| 79 | <arg name="output" type="object" interface="wl_output" |
| 80 | summary="output to capture from"/> |
| 81 | <arg name="buffer" type="object" interface="wl_buffer" |
| 82 | summary="buffer for returning screenshots to the test client"/> |
| 83 | </request> |
| 84 | <event name="capture_screenshot_done"> |
| 85 | <description summary="screenshot capture is done"> |
| 86 | The capture_screenshot_done signal is sent when a screenshot has been copied into the |
| 87 | provided buffer. |
| 88 | </description> |
| 89 | </event> |
U. Artie Eoff | 65e7e7a | 2012-12-07 13:50:29 -0800 | [diff] [blame] | 90 | </interface> |
Pekka Paalanen | f5b74f7 | 2015-03-25 12:50:31 +0200 | [diff] [blame] | 91 | |
| 92 | <interface name="weston_test_runner" version="1"> |
| 93 | <description summary="weston internal testing"> |
| 94 | This is a global singleton interface for Weston internal tests. |
| 95 | |
| 96 | This interface allows a test client to trigger compositor-side |
| 97 | test procedures. This is useful for cases, where the actual tests |
| 98 | are in compositor plugins, but they also require the presence of |
| 99 | a particular client. |
| 100 | |
| 101 | This interface is implemented by the compositor plugins containing |
| 102 | the testing code. |
| 103 | |
| 104 | A test client starts a test with the "run" request. It must not send |
| 105 | another "run" request until receiving the "finished" event. If the |
| 106 | compositor-side test succeeds, the "finished" event is sent. If the |
| 107 | compositor-side test fails, the compositor should send the protocol |
| 108 | error "test_failed", but it may also exit with an error (e.g. SEGV). |
| 109 | |
| 110 | Unknown test name will raise "unknown_test" protocol error. |
| 111 | </description> |
| 112 | |
| 113 | <enum name="error"> |
| 114 | <entry name="test_failed" value="0" summary="compositor test failed"/> |
| 115 | <entry name="unknown_test" value="1" summary="unrecognized test name"/> |
| 116 | </enum> |
| 117 | |
| 118 | <request name="destroy" type="destructor"/> |
| 119 | |
| 120 | <request name="run"> |
| 121 | <arg name="test_name" type="string"/> |
| 122 | </request> |
| 123 | |
| 124 | <event name="finished"/> |
| 125 | </interface> |
U. Artie Eoff | 65e7e7a | 2012-12-07 13:50:29 -0800 | [diff] [blame] | 126 | </protocol> |