Manager creates virtual output

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
idnew_id<treeland_virtual_output_v1>
namestring
The name of the user readable virtual output
outputsarray
Screen name array
Create a virtual output

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

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
namestring
The name of the user readable virtual output
idnew_id<treeland_virtual_output_v1>
Get virtual output

The client obtains the corresponding virtual_output_v1 object through the virtual output name.

destroy()
destroy treeland_virtual_output_manager_v1 object
virtual_output_list(names: array)
Argument
Type
Description
namesarray
List of virtual output names
Send a list of virtual output names

Sends a list of virtual output names to the client.


screen output object

A treeland_virtual_output_v1 represents a set virtual screen output object.

destroy()
destroy the output

Destroy the output.

outputs(name: string, outputs: array)
Argument
Type
Description
namestring
The name of the user readable virtual output
outputsarray
Screen name array
screen output changes

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.

Argument
Type
Description
codeuint<treeland_virtual_output_v1.error>
error code
messagestring
error description
Screen copy mode error event

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.

Argument
Value
Description
invalid_group_name0
Group name is empty
invalid_screen_number1
The number of screens applying for copy mode is less than 2
invalid_output2
Output does not exist

Compositor Support

treeland_virtual_output_manager_v1
Compositors
CageCage0.3.0
x
COSMICCOSMIC1.0.0~beta.8
x
GameScopeGameScope3.15.14
x
HyprlandHyprland0.52.1
x
Jay1.14.0
x
KWinKWin6.6
x
LabwcLabwc0.20.2
x
LouvreLouvre2.14.1
x
MirMir2.26
x
MuffinMuffin6.7.4
x
MutterMutter50.4
x
niriniri26.04
x
phocphoc0.55
x
riverriver0.3.13
x
SwaySway1.11
x
TreelandTreeland0.8.0
1
WayfireWayfire0.9.0
x
WestonWeston14.0.2
x

SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. SPDX-License-Identifier: MIT