Treeland virtual output manager
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> | |
| 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 client obtains the corresponding virtual_output_v1 object through the virtual output name.
destroy()
treeland_virtual_output_v1
A treeland_virtual_output_v1 represents a set virtual screen output object.
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.0.0~beta.8 | x | |
| GameScope | 3.15.14 | x | |
| Hyprland | 0.52.1 | x | |
| Jay | 1.14.0 | x | |
| KWin | 6.6 | x | |
| Labwc | 0.20.2 | x | |
| Louvre | 2.14.1 | x | |
| Mir | 2.26 | x | |
| Muffin | 6.7.4 | x | |
| Mutter | 50.4 | x | |
| niri | 26.04 | x | |
| phoc | 0.55 | x | |
| river | 0.3.13 | x | |
| Sway | 1.11 | x | |
| Treeland | 0.8.0 | 1 | |
| Wayfire | 0.9.0 | x | |
| Weston | 14.0.2 | x | |
Copyright
SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. SPDX-License-Identifier: MIT