1<?xml version="1.0" encoding="UTF-8"?> 2<protocol name="wms"> 3 <copyright> 4 Copyright (c) 2021 Huawei Device Co., Ltd. 5 Licensed under the Apache License, Version 2.0 (the "License"); 6 you may not use this file except in compliance with the License. 7 You may obtain a copy of the License at 8 9 http://www.apache.org/licenses/LICENSE-2.0 10 11 Unless required by applicable law or agreed to in writing, software 12 distributed under the License is distributed on an "AS IS" BASIS, 13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 See the License for the specific language governing permissions and 15 limitations under the License. 16 </copyright> 17 18 <interface name="wms" version="1"> 19 <description summary="interface for window manager server."/> 20 21 <!-- Return Value Event {{{ --> 22 <enum name="error"> 23 <description summary="ok or error."/> 24 <entry name="ok" value="0"/> 25 <entry name="invalid_param" value="1"/> 26 <entry name="pid_check" value="2"/> 27 <entry name="no_memory" value="3"/> 28 <entry name="inner_error" value="4"/> 29 <entry name="other" value="5"/> 30 <entry name="api_failed" value="6"/> 31 <entry name="invalid_operation" value="7"/> 32 </enum> 33 34 <event name="reply_error"> 35 <description summary="reply error."/> 36 <arg name="error" type="uint" enum="error" /> 37 </event> 38 <!-- Return Value Event }}} --> 39 40 <!-- Screen Event {{{ --> 41 <enum name="screen_status"> 42 <description summary="screen status"> 43 </description> 44 <entry name="add" value="0"/> 45 <entry name="remove" value="1"/> 46 </enum> 47 48 <enum name="screen_type"> 49 <description summary="screen type"/> 50 <entry name="physical" value="0"/> 51 <entry name="virtual" value="1"/> 52 </enum> 53 54 <event name="screen_status"> 55 <description summary="screen info update"/> 56 <arg name="screen_id" type="uint"/> 57 <arg name="name" type="string"/> 58 <arg name="status" type="uint" enum="screen_status"/> 59 <arg name="width" type="int"/> 60 <arg name="height" type="int"/> 61 <arg name="screen_type" type="uint" enum="screen_type"/> 62 </event> 63 <!-- Screen Event }}} --> 64 65 <!-- Display Power {{{ --> 66 <request name="get_display_power"> 67 <description summary="get display power status"/> 68 <arg name="display_id" type="int" summary="screen id of the screen you want to get"/> 69 </request> 70 71 <event name="display_power"> 72 <description summary="get_display_power return value"/> 73 <arg name="error" type="uint" enum="error" summary="same as reply_error"/> 74 <arg name="status" type="int" summary="same as DispPowerStatus"/> 75 </event> 76 77 <request name="set_display_power"> 78 <description summary="set display power status, return by reply_error"/> 79 <arg name="display_id" type="int" summary="screen id of the screen you want to set"/> 80 <arg name="status" type="int" summary="same as DispPowerStatus"/> 81 </request> 82 <!-- Display Power }}} --> 83 84 <!-- Display Backlight {{{ --> 85 <request name="get_display_backlight"> 86 <description summary="get display backlight"/> 87 <arg name="display_id" type="int" summary="screen id of the screen you want to get"/> 88 </request> 89 90 <event name="display_backlight"> 91 <description summary="get_display_backlight return value"/> 92 <arg name="error" type="uint" enum="error" summary="same as reply_error"/> 93 <arg name="level" type="uint" summary="backlight level 0~255"/> 94 </event> 95 96 <request name="set_display_backlight"> 97 <description summary="set display backlight, return by reply_error"/> 98 <arg name="display_id" type="int" summary="screen id of the screen you want to set"/> 99 <arg name="level" type="uint" summary="backlight level 0~255"/> 100 </request> 101 <!-- Display Backlight }}} --> 102 103 <!-- Display Mode {{{ --> 104 <enum name="display_mode"> 105 <description summary="display mode"/> 106 <entry name="single" value="1" summary="single screen"/> 107 <entry name="clone" value="2" summary="clone screen"/> 108 <entry name="extend" value="4" summary="extend screen"/> 109 <entry name="expand" value="8" summary="expand screen"/> 110 </enum> 111 112 <event name="display_mode"> 113 <description summary="display mode update. flag is bitmask of display mode."/> 114 <arg name="flag" type="uint"/> 115 </event> 116 117 <request name="set_display_mode"> 118 <description summary="set display mode"/> 119 <arg name="display_mode" type="uint" enum="display_mode"/> 120 </request> 121 <!-- Display Mode }}} --> 122 123 <!-- Window Ctor Dtor {{{ --> 124 <request name="create_window"> 125 <arg name="surface" type="object" interface="wl_surface"/> 126 <arg name="screen_id" type="uint"/> 127 <arg name="window_type" type="uint"/> 128 </request> 129 130 <request name="destroy_window"> 131 <arg name="window_id" type="uint"/> 132 </request> 133 134 <enum name="window_status"> 135 <description summary="window status"/> 136 <entry name="created" value="0" summary="window creation succeeded"/> 137 <entry name="failed" value="1" summary="window creation failed"/> 138 <entry name="destroyed" value="2" summary="window destroyed"/> 139 </enum> 140 141 <event name="window_status"> 142 <description summary="window status update"/> 143 <arg name="status" type="uint" enum="window_status"/> 144 <arg name="window_id" type="uint"/> 145 <arg name="x" type="int"/> 146 <arg name="y" type="int"/> 147 <arg name="width" type="int"/> 148 <arg name="height" type="int"/> 149 </event> 150 151 <event name="window_size_change"> 152 <description summary="window size change"/> 153 <arg name="width" type="int"/> 154 <arg name="height" type="int"/> 155 </event> 156 <!-- Window Ctor Dtor }}} --> 157 158 <!-- Global Window Event {{{ --> 159 <request name="config_global_window_status"> 160 <description summary="config global window status"/> 161 <arg name="status" type="int" summary="disable: 0, enable: not 0"/> 162 </request> 163 164 <event name="global_window_status"> 165 <description summary="global window status"> 166 </description> 167 <arg name="pid" type="uint" summary="client pid"/> 168 <arg name="window_id" type="uint" summary="window id"/> 169 <arg name="status" type="uint" enum="window_status"/> 170 </event> 171 <!-- Global Window Event }}} --> 172 173 <!-- Control SystemBar {{{ --> 174 <request name="set_status_bar_visibility"> 175 <description summary="set status_bar visibility"/> 176 <arg name="visibility" type="uint" enum="visibility"/> 177 </request> 178 <request name="set_navigation_bar_visibility"> 179 <description summary="set navigation_bar visibility"/> 180 <arg name="visibility" type="uint" enum="visibility"/> 181 </request> 182 <!-- Control SystemBar }}} --> 183 184 <!-- Window Operator {{{ --> 185 <request name="set_window_top"> 186 <arg name="window_id" type="uint"/> 187 </request> 188 189 <request name="set_window_size"> 190 <description summary="set window size."/> 191 <arg name="window_id" type="uint"/> 192 <arg name="width" type="int"/> 193 <arg name="height" type="int"/> 194 </request> 195 196 <request name="set_window_scale"> 197 <description summary="set window scale."/> 198 <arg name="window_id" type="uint"/> 199 <arg name="width" type="int"/> 200 <arg name="height" type="int"/> 201 </request> 202 203 <request name="set_window_position"> 204 <description summary="set window position."/> 205 <arg name="window_id" type="uint"/> 206 <arg name="x" type="int"/> 207 <arg name="y" type="int"/> 208 </request> 209 210 <enum name="visibility"> 211 <description summary="visibility enumeration definition"/> 212 <entry name="false" value="0" summary="invisible"/> 213 <entry name="true" value="1" summary="visibile"/> 214 </enum> 215 216 <request name="set_window_visibility"> 217 <description summary="set the visibility of a window"/> 218 <arg name="window_id" type="uint"/> 219 <arg name="visibility" type="uint" enum="visibility"/> 220 </request> 221 222 <request name="set_window_type"> 223 <description summary="change type of a window"/> 224 <arg name="window_id" type="uint"/> 225 <arg name="window_type" type="uint"/> 226 </request> 227 228 <request name="set_window_mode"> 229 <description summary="change mode of a window"/> 230 <arg name="window_id" type="uint"/> 231 <arg name="window_mode" type="uint"/> 232 </request> 233 234 <request name="commit_changes"> 235 <description summary="commit all changes requested by client"/> 236 </request> 237 <!-- Window Operator }}} --> 238 239 <!-- Screenshot {{{ --> 240 <request name="screenshot"> 241 <description summary="screenshot request"/> 242 <arg name="screen_id" type="uint" summary="screen id"/> 243 </request> 244 245 <event name="screenshot_done"> 246 <description summary="screenshot done"> 247 </description> 248 <arg name="id" type="uint" summary="screen id"/> 249 <arg name="fd" type="fd" summary="fd for file containing image data"/> 250 <arg name="width" type="int" summary="image width in pixels"/> 251 <arg name="height" type="int" summary="image height in pixels"/> 252 <arg name="stride" type="int" summary="number of bytes per pixel row"/> 253 <arg name="format" type="uint" summary="image format of type wl_shm.format"/> 254 <arg name="timestamp_sec" type="uint" summary="seconds value of the timestamp"/> 255 <arg name="timestamp_nsec" type="uint" summary="nanoseconds value of the timestamp"/> 256 </event> 257 258 <event name="screenshot_error"> 259 <description summary="screenshot error"> 260 </description> 261 <arg name="error" type="uint" enum="error"/> 262 <arg name="id" type="uint" summary="screen id"/> 263 </event> 264 <!-- Screenshot }}} --> 265 266 <!-- Windowshot {{{ --> 267 <request name="windowshot"> 268 <description summary="windowshot request"/> 269 <arg name="window_id" type="uint" summary="window id"/> 270 </request> 271 272 <event name="windowshot_done"> 273 <description summary="windowshot done"> 274 </description> 275 <arg name="id" type="uint" summary="window id"/> 276 <arg name="fd" type="fd" summary="fd for file containing image data"/> 277 <arg name="width" type="int" summary="image width in pixels"/> 278 <arg name="height" type="int" summary="image height in pixels"/> 279 <arg name="stride" type="int" summary="number of bytes per pixel row"/> 280 <arg name="format" type="uint" summary="image format of type wl_shm.format"/> 281 <arg name="timestamp_sec" type="uint" summary="seconds value of the timestamp"/> 282 <arg name="timestamp_nsec" type="uint" summary="nanoseconds value of the timestamp"/> 283 </event> 284 285 <event name="windowshot_error"> 286 <description summary="windowshot error"> 287 </description> 288 <arg name="error" type="uint" enum="error"/> 289 <arg name="id" type="uint" summary="window id"/> 290 </event> 291 <!-- Windowshot }}} --> 292 293 <!-- Virtual Display {{{ --> 294 <request name="create_virtual_display"> 295 <description summary="create a virtual display"/> 296 <arg name="x" type="int"/> 297 <arg name="y" type="int"/> 298 <arg name="width" type="int"/> 299 <arg name="height" type="int"/> 300 </request> 301 302 <request name="destroy_virtual_display"> 303 <description summary="destroy virtual display"/> 304 <arg name="screen_id" type="uint"/> 305 </request> 306 <!-- Virtual Display }}}--> 307 308 <!-- Split Mode {{{ --> 309 <request name="set_split_mode"> 310 <description summary="set split mode"/> 311 <arg name="mode" type="uint" summary="split mode"/> 312 <arg name="x" type="int" summary="x"/> 313 <arg name="y" type="int" summary="y"/> 314 </request> 315 316 <event name="split_mode_change"> 317 <description summary="split_mode return value"/> 318 <arg name="status" type="uint" summary="status"/> 319 </event> 320 <!-- Split Mode }}} --> 321 </interface> 322 323 <interface name="screen_info" version="1"> 324 <description summary="interface for screen info(for multi module input)."/> 325 <enum name="type"> 326 <description summary="screen_info type"/> 327 <entry name="screen" value="1" summary="screen info"/> 328 <entry name="seat" value="2" summary="seat info"/> 329 </enum> 330 <request name="get"> 331 <description summary="get screen info"/> 332 <arg name="type" type="uint" enum="type"/> 333 </request> 334 <enum name="listener_set"> 335 <description summary="screen_info type"/> 336 <entry name="enable" value="0" summary="enable"/> 337 <entry name="disable" value="1" summary="disable"/> 338 </enum> 339 <request name="listener"> 340 <description summary="listener setting"/> 341 <arg name="type" type="uint" enum="listener_set"/> 342 </request> 343 <event name="reply"> 344 <description summary="reply status."/> 345 <arg name="status" type="uint"/> 346 </event> 347 </interface> 348</protocol> 349