176 lines
7.7 KiB
XML
176 lines
7.7 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<protocol name="ext_session_lock_v1">
|
|
<copyright>
|
|
Copyright 2021 The wlroots contributors
|
|
|
|
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.
|
|
</copyright>
|
|
|
|
<description summary="secure session locking with arbitrary graphics">
|
|
This protocol allows for a privileged Wayland client to lock the session
|
|
and display arbitrary graphics while the session is locked.
|
|
|
|
The compositor may choose to restrict this protocol to a special client
|
|
launched by the compositor itself or expose it to all privileged clients,
|
|
this is compositor policy.
|
|
|
|
The client is responsible for performing authentication and informing the
|
|
compositor when the session should be unlocked. If the client dies while
|
|
the session is locked the session remains locked, possibly permanently
|
|
depending on compositor policy.
|
|
</description>
|
|
|
|
<interface name="ext_session_lock_manager_v1" version="1">
|
|
<description summary="manager used to lock the session">
|
|
This interface is used to request that the session be locked.
|
|
</description>
|
|
|
|
<request name="destroy" type="destructor">
|
|
<description summary="destroy the session lock manager object">
|
|
This informs the compositor that the lock manager object will no
|
|
longer be used. Existing objects created through this interface remain
|
|
valid.
|
|
</description>
|
|
</request>
|
|
|
|
<request name="lock">
|
|
<description summary="attempt to lock the session">
|
|
This request creates a session lock and asks the compositor to lock the
|
|
session. The compositor will send either the ext_session_lock_v1.locked
|
|
or ext_session_lock_v1.finished event on the created object in response
|
|
to this request.
|
|
</description>
|
|
<arg name="id" type="new_id" interface="ext_session_lock_v1"/>
|
|
</request>
|
|
</interface>
|
|
|
|
<interface name="ext_session_lock_v1" version="1">
|
|
<description summary="manage lock state and create lock surfaces">
|
|
In response to the creation of this object the compositor must send
|
|
either the locked or finished event.
|
|
</description>
|
|
|
|
<enum name="error">
|
|
<entry name="invalid_destroy" value="0"
|
|
summary="attempted to destroy session lock while locked"/>
|
|
<entry name="invalid_unlock" value="1"
|
|
summary="unlock requested but locked event was never sent"/>
|
|
<entry name="role" value="2"
|
|
summary="given wl_surface already has a role"/>
|
|
<entry name="duplicate_output" value="3"
|
|
summary="given output already has a lock surface"/>
|
|
<entry name="already_constructed" value="4"
|
|
summary="given wl_surface has a buffer attached or committed"/>
|
|
</enum>
|
|
|
|
<request name="destroy" type="destructor">
|
|
<description summary="destroy the session lock">
|
|
This informs the compositor that the lock object will no longer be
|
|
used. It is a protocol error to make this request if the locked event
|
|
was sent, the unlock_and_destroy request must be used instead.
|
|
</description>
|
|
</request>
|
|
|
|
<event name="locked">
|
|
<description summary="session successfully locked">
|
|
This client is now responsible for displaying graphics while the
|
|
session is locked and deciding when to unlock the session.
|
|
</description>
|
|
</event>
|
|
|
|
<event name="finished">
|
|
<description summary="the session lock object should be destroyed">
|
|
The compositor has decided that the session lock should be destroyed
|
|
as it will no longer be used by the compositor. Exactly when this
|
|
event is sent is compositor policy, but it must never be sent more
|
|
than once for a given session lock object.
|
|
</description>
|
|
</event>
|
|
|
|
<request name="get_lock_surface">
|
|
<description summary="create a lock surface for a given output">
|
|
The client is expected to create lock surfaces for all outputs
|
|
currently present and any new outputs as they are advertised. These
|
|
won't be displayed by the compositor unless the lock is successful.
|
|
</description>
|
|
<arg name="id" type="new_id" interface="ext_session_lock_surface_v1"/>
|
|
<arg name="surface" type="object" interface="wl_surface"/>
|
|
<arg name="output" type="object" interface="wl_output"/>
|
|
</request>
|
|
|
|
<request name="unlock_and_destroy" type="destructor">
|
|
<description summary="unlock the session, destroying the object">
|
|
This request indicates that the session should be unlocked, for
|
|
example because the user has entered their password and it has been
|
|
verified by the client.
|
|
|
|
This request also informs the compositor that the lock object will no
|
|
longer be used and should be destroyed.
|
|
</description>
|
|
</request>
|
|
</interface>
|
|
|
|
<interface name="ext_session_lock_surface_v1" version="1">
|
|
<description summary="a surface displayed while the session is locked">
|
|
The client may use lock surfaces to display a screensaver, render a
|
|
dialog to enter a password and unlock the session, or however else it
|
|
sees fit.
|
|
</description>
|
|
|
|
<enum name="error">
|
|
<entry name="commit_before_first_ack" value="0"
|
|
summary="surface committed before first ack_configure request"/>
|
|
<entry name="null_buffer" value="1"
|
|
summary="surface committed with a null buffer"/>
|
|
<entry name="dimensions_mismatch" value="2"
|
|
summary="failed to match ack'd width/height"/>
|
|
<entry name="invalid_serial" value="3"
|
|
summary="serial provided in ack_configure is invalid"/>
|
|
</enum>
|
|
|
|
<request name="destroy" type="destructor">
|
|
<description summary="destroy the lock surface object"/>
|
|
</request>
|
|
|
|
<request name="ack_configure">
|
|
<description summary="ack a configure event">
|
|
When a configure event is received, if a client commits the surface
|
|
in response to the configure event, then the client must make an
|
|
ack_configure request sometime before the commit request, passing
|
|
along the serial of the configure event.
|
|
</description>
|
|
<arg name="serial" type="uint" summary="serial of configure event"/>
|
|
</request>
|
|
|
|
<event name="configure">
|
|
<description summary="the client should resize its surface">
|
|
This event is sent once on binding the interface and may be sent again
|
|
at the compositor's discretion, for example if output geometry changes.
|
|
|
|
The width and height are in surface-local coordinates and the client
|
|
must create a buffer with exactly these dimensions.
|
|
</description>
|
|
<arg name="serial" type="uint" summary="serial for use in ack_configure"/>
|
|
<arg name="width" type="uint"/>
|
|
<arg name="height" type="uint"/>
|
|
</event>
|
|
</interface>
|
|
</protocol>
|