Go to index / Go to protocols

treeland_virtual_output_manager_v1 ↗

virtual output creation and management

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
treeland_virtual_output_manager_v1

Version 3
Compositor Support
Version 1
treeland 0.8.0

Manager creates virtual output

This interface is a manager that allows the creation of copied output.

treeland_virtual_output_manager_v1
request create_virtual_output(
    id: new_id<treeland_virtual_output_v1>,
    name: string,
    outputs: array,
)
  • id — the new virtual output object
  • name — The name of the user readable virtual output
  • outputs — 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.

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

    treeland_virtual_output_manager_v1
    event virtual_output_list(
        names: array,
    )
    • names — List of virtual output names

    Send a list of virtual output names

    Sends a list of virtual output names to the client.

    treeland_virtual_output_manager_v1
    request get_virtual_output(
        name: string,
        id: new_id<treeland_virtual_output_v1>,
    )
    • name — The name of the user readable virtual output
    • id — the virtual output object

    Get virtual output

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

    treeland_virtual_output_manager_v1
    request destroy()
    DestructorAvailable since version 2

      destroy treeland_virtual_output_manager_v1 object

      treeland_virtual_output_manager_v1
      event virtual_output_modified(
          name: string,
      )
      Available since version 3
      • name — The name of the changed virtual output

      A virtual output group changed

      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_manager_v1
      treeland_virtual_output_v1

      Version 1

      screen output object

      Represents a virtual screen output object that mirrors the content of physical outputs.

      treeland_virtual_output_v1
      event outputs(
          name: string,
          outputs: array,
      )
      • name — The name of the user readable virtual output
      • outputs — 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.

      treeland_virtual_output_v1
      event error(
          code: uint<error>,
          message: string,
      )
      • code — error code
      • message — 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.

      treeland_virtual_output_v1
      enum error {
          invalid_group_name = 0,
          invalid_screen_number = 1,
          invalid_output = 2,
      }
      • invalid_group_name — Group name is empty
      • invalid_screen_number — The number of screens applying for copy mode is less than 2
      • invalid_output — Output does not exist
      treeland_virtual_output_v1
      request destroy()
      Destructor

        destroy the output

        Destroy the output.