Copyright 2021 The Chromium Authors.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
remote_shell allows clients to turn a wl_surface into a "real window"
which can be stacked and activated by the user.
Warning! The protocol described in this file is experimental and backward
incompatible changes may be made. Backward compatible changes may be added
together with the corresponding interface version bump. Backward
incompatible changes are done by bumping the version number in the protocol
and interface names and resetting the interface version. Once the protocol
is to be declared stable, the 'z' prefix and the version number in the
protocol and interface names are removed and the interface version number is
reset.
The global interface that allows clients to turn a wl_surface into a
"real window" which is remotely managed but can be stacked, activated
and made fullscreen by the user.
Destroy this remote_shell object.
Destroying a bound remote_shell object while there are surfaces
still alive created by this remote_shell object instance is illegal
and will result in a protocol error.
Determine how a remote surface should be stacked relative to other
shell surfaces.
This creates an remote_surface for the given surface and gives it the
remote_surface role. A wl_surface can only be given a remote_surface
role once. If get_remote_surface is called with a wl_surface that
already has an active remote_surface associated with it, or if it had
any other role, an error is raised.
See the documentation of remote_surface for more details about what an
remote_surface is and how it is used.
Creates a notification_surface for the given surface, gives it the
notification_surface role and associated it with a notification id.
Sends the default device scale factor.
Creates an input_method_surface for the given surface, gives it
the input_method_surface role.
Creates an toast_surface for the given surface, gives it
the toast_surface role.
Determine how a client should layout surfaces.
Sends the layout_mode used by the server.
Instantiate an interface extension for the given wl_output to
provide remote shell functionality.
Desktop client window focus state.
Notifies client that the window focus state change.
An interface that may be implemented by a wl_surface, for
implementations that provide a desktop-style user interface
and allows for remotely managed windows.
It provides requests to treat surfaces like windows, allowing to set
properties like app id and geometry.
The client must call wl_surface.commit on the corresponding wl_surface
for the remote_surface state to take effect.
For a surface to be mapped by the compositor the client must have
committed both an remote_surface state and a buffer.
Determine the visibility behavior of the system UI.
Unmap and destroy the window. The window will be effectively
hidden from the user's point of view, and all state will be lost.
Set an application identifier for the surface.
Set a short title for the surface.
This string may be used to identify the surface in a task bar,
window list, or other user interface elements provided by the
compositor.
The string must be encoded in UTF-8.
Set distance from the top of the surface to the contents.
This distance typically represents the size of the window caption.
Request that surface is maximized. The window geometry will be updated
to whatever the compositor finds appropriate for a maximized window.
This is only a request that the window should be maximized. The
compositor may choose to ignore this request. The client should
listen to state_type_changed events to determine if the window was
maximized or not.
Request that surface is minimized.
This is only a request that the window should be minimized. The
compositor may choose to ignore this request. The client should
listen to state_type_changed events to determine if the window was
minimized or not.
Request that surface is restored. This restores the window geometry
to what it was before the window was minimized, maximized or made
fullscreen.
This is only a request that the window should be restored. The
compositor may choose to ignore this request. The client should
listen to state_type_changed events to determine if the window was restored
or not.
Request that surface is made fullscreen.
This is only a request that the window should be made fullscreen.
The compositor may choose to ignore this request. The client should
listen to set_fullscreen events to determine if the window was
made fullscreen or not.
Request that surface is pinned.
This is only a request that the window should be pinned.
The compositor may choose to ignore this request. The client should
listen to state_type_changed events to determine if the window was
pinned or not. If trusted flag is non-zero, the app can prevent users
from exiting the pinned mode.
Request that surface is unpinned.
This is only a request that the window should be unpinned.
The compositor may choose to ignore this request. The client should
listen to state_type_changed events to determine if the window was
unpinned or not.
Suggests a surface should become system modal.
Suggests a surface should become non system modal.
The close event is sent by the compositor when the user
wants the surface to be closed. This should be equivalent to
the user clicking the close button in client-side decorations,
if your application has any...
This is only a request that the user intends to close your
window. The client may choose to ignore this request, or show
a dialog to ask the user to save their data...
Defines common show states for shell surfaces.
The state_type_changed event is sent by the compositor when
the surface state changed.
This is an event to notify that the window state changed in compositor.
The state change may be triggered by a client's request, or some user
action directly handled by the compositor. The client may choose to
ignore this event.
Request that surface needs a rectangular shadow.
This is only a request that the surface should have a rectangular
shadow. The compositor may choose to ignore this request.
The arguments are given in the remote surface coordinate space and
specifies inner bounds of the shadow. Specifying zero width and height
will disable the shadow.
Requests how the surface will change the visibility of the system UI when it is made active.
Request that surface is made to be always on top.
This is only a request that the window should be always on top.
The compositor may choose to ignore this request.
Request that surface is made to be not always on top.
This is only a request that the window should be not always on top.
The compositor may choose to ignore this request.
The orientation of the window.
Set an orientation for the surface.
Notify the client of committed window geometry.
The compositor sends this event when it commits window geometry. The
client may use this information to convert coordinates of input events
using the latest committed geometry.
Specifies the cause of the window bounds change event.
The compositor requested to change its
bounds. "bounds_change_reason" specifies the cause of the
bounds change. The client may apply the different move/resize
strategy depending on the reason.
"display_id_hi", "display_id_lo" specifies in which workspace
the surface should live in.
The client responds with set_bounds_in_output request, with the
bounds it is resized to (this may be different from the bounds
requested).
The client may ignore move request depending on the state,
e.g, if it becomes resizable or other constrants.
Request an interactive, user-driven move of the surface. "x"
and "y" specifies the starting point of the pointer device
that initiated the move.
The compositor responds to this request with a drag_started
event with "none" direction. Please see drag_started event
for more details.
The compositor may ignore move requests depending on the state of the
surface, e.g. fullscreen or maximized.
The resize direction for drag operation
Notifies a client that the compositor started drag
operation. "direction" specifies which direction it is being
resized. "none" direction means just move but not resize.
This will be followed by series of the "bounds_changed" event
with "drag_resize" or "drag_move" reasons to update the window
bounds druing the drag operation.
Called when the drag operation is finished. "x" and "y"
specifies the position of the pointer device used to drag.
"canceled" is true if the drag operation is aborted during
drag (e.g. by capture change or user action.)
Request that surface can be in maximzied state.
Request that surface can not be in maximzied state.
Set a minimum size of the surface.
Values set in this way are double-buffered. They will get
applied on the next commit.
Set a maximum size of the surface.
Values set in this way are double-buffered. They will get
applied on the next commit.
Setting the same size as minimum size makes the surface
unresizable.
Request that surface is snapped to left.
Request that surface is snapped to right.
Request to start an interactive, user-driven resize of the surface.
"x" and "y" specifies the starting point of the pointer device
that initiated the reize.
The compositor responds to this request with a "drag_started"
event, followed by "bounds_changed" events, and ends the
resize operation with a "drag_finhsed" event. The compositor
determines the new bounds using the resize_direction and the
pointer event location.
The compositor may ignore resize requests depending on the state of the
surface, e.g. fullscreen or maximized, or no drag event is in pregress.
Frame type that can be used to decorate a surface.
Enables compositor side frame decoration. |type|
specifies the type of frame to use for the surface.
The mask that represents buttons on frame.
Updates the frame's button state. |visible_buttons| and |enabled_buttons|
are the union of button mask defined in |frame_button_type| enum.
The mask present in |enabled_buttons| but not in |visible_buttons| will
be ignored.
The extra informational string about the surface. This can be
used to show the debug information in the title bar, or log
messages.
This is different from "set_title" which is used to identify
the surface.
The string must be encoded in UTF-8.
Defines orientation request when a remote surface is in foreground.
Request a specific orientation behavior when this surface is in foreground.
Request that surface is set to Picture-in-Picture (PIP).
Set an aspect ratio of the surface.
Values set in this way are double-buffered. They will get
applied on the next commit.
The ratio of the values is used for the ratio of width to height of the
surface. The size of surface is restricted to the ratio. If any value is
zero, the restriction on aspect ratio is unset.
Zoom level change.
Request application zoom level change.
Set accessibility window ID to the surface. A negative number removes
the existing accessibility ID from the surface.
Set this surface the original window for the current PIP window.
Unset this surface the original window for the current PIP window.
Set system gesture exclusion region in which system gestures e.g. back
gesture should not be triggered.
[Deprecated] Enable the resize lock and put restrictions related to resizing on
the shell surface.
The resize lock state is double buffered, and will be applied at the
time wl_surface.commit of the corresponding wl_surface is called.
[Deprecated] Disable the resize lock and allow the shell surface to be resized
freely.
The resize lock state is double buffered, and will be applied at the
time wl_surface.commit of the corresponding wl_surface is called.
The compositor requested to change its
bounds. "bounds_change_reason" specifies the cause of the
bounds change. The client may apply the different move/resize
strategy depending on the reason.
The "output" specifies the wayland output in which the suface should live.
The client responds with set_bounds_in_output request, with the
bounds it is resized to (this may be different from the bounds
requested).
The client may ignore move request depending on the state,
e.g, if it becomes resizable or other constrants.
Set the "visible bounds" of a window from the user's perspective.
Client-side decorations often have invisible portions like drop shadows
which should be ignored for the purposes of aligning, placing and
constraining windows.
The bounds are double buffered, and will be applied at the
time wl_surface.commit of the corresponding wl_surface is called.
Once the bounds are set, it is not possible to unset them, and they will
remain the same until set_bounds_in_output is called again, even if a new sub-
surface or buffer is attached.
If never set, the value is the surface content bounds. This updates
dynamically on every commit.
The bounds are relative to the given display. If the display is invalid,
they are assumed to be relative to the primary display.
The width and height must be greater than zero.
Resize lock type that can be used to put restrictions related to resizing.
Set resize lock type and put restrictions related to resizing on the shell surface.
The resize lock type is double buffered, and will be applied at the
time wl_surface.commit of the corresponding wl_surface is called.
An interface that may be implemented by a wl_surface to host
notification contents.
Unmap and destroy the notification surface.
Set an application identifier for the notification surface.
An interface that may be implemented by a wl_surface to host IME contents.
Unmap and destroy the input mtehod surface.
Set the "visible bounds" of a window from the user's perspective.
The bounds are double buffered, and will be applied at the
time wl_surface.commit of the corresponding wl_surface is called.
Once the bounds are set, it is not possible to unset them, and they will
remain the same until set_bounds_in_output is called again, even if a new sub-
surface or buffer is attached.
If never set, the value is the surface content bounds. This updates
dynamically on every commit.
The bounds are relative to the given display. If the display is invalid,
they are assumed to be relative to the primary display.
The width and height must be greater than zero.
An interface that may be implemented by a wl_surface to host
toast contents.
Unmap and destroy the toast surface.
Set the bounds of a toast window from the user's perspective.
The bounds are double buffered, and will be applied at the
time wl_surface.commit of the corresponding wl_surface is called.
Once the bounds are set, it is not possible to unset them, and they will
remain the same until set_bounds is called again, even if a new sub-
surface or buffer is attached.
If never set, the compositor will determine the toast position.
The bounds are relative to the given display. If the display is invalid,
they are assumed to be relative to the primary display.
An additional interface to a wl_output object, which allows the
client to access additional functionality for output.
Destroy this remote_output object.
[Deprecated] Sends the display identifier used by the server for the display.
Sends the port to which the display is connected for the server.
Sends the identification data for the display, typically in the EDID format.
Sends inset information about a particular display in the display's native coordinates.
Sends stable inset information about a particular display in the display's native
coordinates.
Determine the behavior of the system UI.
Sends information about whether the systemui behavior is auto hide.
The "systemui_behavior" value is of enum type "systemui_behavior".