output-mgmt: Add mirror_head request

This commit is contained in:
Victoria Brekenfeld 2024-04-26 14:51:33 +02:00
parent 2b8d43325b
commit ff7b20d880

View file

@ -39,7 +39,7 @@
interface version number is reset.
</description>
<interface name="zwlr_output_manager_v1" version="4">
<interface name="zwlr_output_manager_v1" version="5">
<description summary="output device configuration manager">
This interface is a manager that allows reading and writing the current
output device configuration.
@ -125,7 +125,7 @@
</event>
</interface>
<interface name="zwlr_output_head_v1" version="4">
<interface name="zwlr_output_head_v1" version="5">
<description summary="output device">
A head is an output device. The difference between a wl_output object and
a head is that heads are advertised even if they are turned off. A head
@ -354,6 +354,21 @@
</description>
<arg name="state" type="uint" enum="adaptive_sync_state"/>
</event>
<!-- Version 5 additions -->
<event name="mirroring" since="5">
<description summary="current mirroring state">
This event describes whether the head is currently mirroring the
contents of another head. If mirroring is enabled any previous
value of `position` will become meaningless.
If the output changes to non-mirroring again, the compositor is required
to transmit a new position value in the same atomic update
(see wlr_output_manager.done).
</description>
<arg name="mirrored_output" type="string" allow-null="true" summary="name of the mirrored output, null if not mirroring"/>
</event>
</interface>
<interface name="zwlr_output_mode_v1" version="3">
@ -411,14 +426,14 @@
</request>
</interface>
<interface name="zwlr_output_configuration_v1" version="4">
<interface name="zwlr_output_configuration_v1" version="5">
<description summary="output configuration">
This object is used by the client to describe a full output configuration.
First, the client needs to setup the output configuration. Each head can
be either enabled (and configured) or disabled. It is a protocol error to
send two enable_head or disable_head requests with the same head. It is a
protocol error to omit a head in a configuration.
be either enabled/mirroring (and configured) or disabled. It is a protocol
error to send two enable_head/mirror_head or disable_head requests with
the same head. It is a protocol error to omit a head in a configuration.
Then, the client can apply or test the configuration. The compositor will
then reply with a succeeded, failed or cancelled event. Finally the client
@ -432,6 +447,8 @@
summary="head has not been configured"/>
<entry name="already_used" value="3"
summary="request sent after configuration has been applied or tested"/>
<entry name="disabled_mirrored_head" value="4"
summary="head to be mirrored is disabled" />
</enum>
<request name="enable_head">
@ -448,6 +465,10 @@
<request name="disable_head">
<description summary="disable a head">
Disable a head.
If the head was already selected to be mirrored from using
zwlr_output_configuration_v1.mirror_head a disabled_mirrored_head
protocol error will be raised.
</description>
<arg name="head" type="object" interface="zwlr_output_head_v1"
summary="the head to be disabled"/>
@ -527,9 +548,28 @@
via this object.
</description>
</request>
<!-- Version 5 additions -->
<request name="mirror_head" since="5">
<description summary="enable and configure a mirroring head">
Enable a head mirroring another. This request creates a head configuration
object that can be used to change the head's properties.
If the "source"-head was already configured using
zwlr_output_configuration_v1.disable_head a disabled_mirrored_head
protocol error will be raised.
</description>
<arg name="id" type="new_id" interface="zwlr_output_configuration_head_v1"
summary="a new object to configure the head"/>
<arg name="head" type="object" interface="zwlr_output_head_v1"
summary="the head to be enabled"/>
<arg name="source" type="object" interface="zwlr_output_head_v1"
summary="the head to be mirrored"/>
</request>
</interface>
<interface name="zwlr_output_configuration_head_v1" version="4">
<interface name="zwlr_output_configuration_head_v1" version="5">
<description summary="head configuration">
This object is used by the client to update a single head's configuration.
@ -544,6 +584,7 @@
<entry name="invalid_scale" value="5" summary="scale negative or zero"/>
<entry name="invalid_adaptive_sync_state" value="6" since="4"
summary="invalid enum value used in the set_adaptive_sync request"/>
<entry name="invalid_for_mirroring" value="7" since="5"/>
</enum>
<request name="set_mode">
@ -569,6 +610,10 @@
<request name="set_position">
<description summary="set the position">
This request sets the head's position in the global compositor space.
This request is invalid for zwlr_output_configuration_head_v1 objects created
using zwlr_output_configuration_v1.mirror_head and will raise an
invalid_for_mirroring protocol error.
</description>
<arg name="x" type="int" summary="x position in the global compositor space"/>
<arg name="y" type="int" summary="y position in the global compositor space"/>
@ -584,6 +629,10 @@
<request name="set_scale">
<description summary="set the scale">
This request sets the head's scale.
This request is invalid for zwlr_output_configuration_head_v1 objects created
using zwlr_output_configuration_v1.mirror_head and will raise an
invalid_for_mirroring protocol error.
</description>
<arg name="scale" type="fixed"/>
</request>