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 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 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.

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.

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.

error(code: uint, message: string)
Argument
Type
Description
codeuint
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.

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

Mutter
Mutter
47.3
KWin
KWin
6.3
Sway
Sway
1.10
COSMIC
COSMIC
0.1
Hyprland
Hyprland
0.44
niri
25.01
Weston
Weston
14
Mir
Mir
2.19
GameScope
GameScope
3.15.14
Jay
1.9.0
Labwc
Labwc
0.8.2
Wayfire
0.9.0
Treeland
Treeland
0.5.17
Louvre
Louvre
2.14.1
treeland_virtual_output_manager_v1
x
x
x
x
x
x
x
x
x
x
x
x
1
x

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