Treeland virtual output manager
Warning! This protocol is EXPERIMENTAL and under active development. It may change at any time, including in backward-incompatible ways, without incrementing the interface major version and without prior notice. No compatibility guarantees of any kind are provided. Clients and compositors must track the upstream definition in treeland-protocols and must not rely on the current interface names, requests, events, or semantics remaining stable across releases.
treeland_virtual_output_manager_v1
This interface is a manager that allows the creation of copied output.
create_virtual_output(id: new_id<treeland_virtual_output_v1>, name: string, outputs: array)
Argument | Type | Description |
|---|---|---|
| id | new_id<treeland_virtual_output_v1> | the new virtual output object |
| name | string | The name of the user readable virtual output |
| outputs | array | Screen name array |
Create virtual output that can be used when setting screen copy mode for use on multiple screens. Virtual outputs are created to mirror multiple wl_output outputs.
The name argument must not be empty. If name is empty, the compositor emits an error event with code invalid_group_name.
The element of the array is the name of the screen.
The first element of the array outputs is the screen to be copied, and the subsequent elements are the screens to be mirrored.
The outputs array must contain at least two elements. If the number of elements is less than two, the compositor emits an error event with code invalid_screen_number.
If any output name in the outputs array does not exist, the compositor emits an error event with code invalid_output.
The client calling this interface will not generate an additional wl_output object on the client.
get_virtual_output_list()
Gets a list of virtual output names.
The compositor emits one virtual_output_list event for each request. Clients should avoid issuing a new get_virtual_output_list request before receiving the corresponding event.
get_virtual_output(name: string, id: new_id<treeland_virtual_output_v1>)
Argument | Type | Description |
|---|---|---|
| name | string | The name of the user readable virtual output |
| id | new_id<treeland_virtual_output_v1> | the virtual output object |
The client obtains the corresponding virtual_output_v1 object through the virtual output name.
destroy()
virtual_output_list(names: array)
Argument | Type | Description |
|---|---|---|
| names | array | List of virtual output names |
Sends a list of virtual output names to the client.
virtual_output_modified(name: string)
Argument | Type | Description |
|---|---|---|
| name | string | The name of the changed virtual output |
Sent whenever the set of virtual output groups changes: a group was created, updated, or removed (e.g. copy mode collapsed to extension after its source was disabled).
The client should re-issue get_virtual_output_list to refresh its view of the available groups.
treeland_virtual_output_v1
Represents a virtual screen output object that mirrors the content of physical outputs.
Argument | Type | Description |
|---|---|---|
| name | string | The name of the user readable virtual output |
| outputs | array | Screen name array |
This event is sent to the client when any screen in the array changes.
The element of the array is the name of the screen.
The first element of the array outputs is the screen to be copied, and the subsequent elements are the screens to be mirrored.
When the primary screen (the screen being copied) is removed, a successor is selected from the queue as the primary screen, and the queue information is updated.
error(code: uint<treeland_virtual_output_v1.error>, message: string)
Argument | Type | Description |
|---|---|---|
| code | uint<treeland_virtual_output_v1.error> | error code |
| message | string | error description |
When an error occurs, an error event is emitted, terminating the replication mode request issued by the client.
The code argument uses treeland_virtual_output_v1.error.
error { invalid_group_name, invalid_screen_number, invalid_output }
Argument | Value | Description |
|---|---|---|
| invalid_group_name | 0 | Group name is empty |
| invalid_screen_number | 1 | The number of screens applying for copy mode is less than 2 |
| invalid_output | 2 | Output does not exist |
Compositor Support
| treeland_virtual_output_manager_v1 | ↓ | ||
| Compositors | |||
| Cage | 0.3.0 | x | |
| COSMIC | 1.11.0 | x | |
| flakewm | 3.0.5 | x | |
| GameScope | 3.17.0 | x | |
| Hyprland | 0.57.2 | x | |
| Jay | 1.14.0 | x | |
| KWin | 6.7 | x | |
| Labwc | 0.20.2 | x | |
| Louvre | 2.14.1 | x | |
| Mango | 0.16.3 | x | |
| Mir | 2.26 | x | |
| Muffin | 6.7.4 | x | |
| Mutter | 51 | x | |
| niri | 26.04 | x | |
| phoc | 0.55 | x | |
| Pila | 0.5.1 | x | |
| Qtile | 0.37.1 | x | |
| river | 0.5.0 | x | |
| Sway | 1.11 | x | |
| Treeland | 0.8.0 | 1 | |
| Wayfire | 0.9.0 | x | |
| Weston | 15.0.1 | x | |
Copyright
SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. SPDX-License-Identifier: MIT