Go to index / Go to protocols

treeland_wallpaper_manager_unstable_v1 ↗

wallpaper 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_wallpaper_manager_unstable_v1
treeland_wallpaper_manager_v1

Version 1

Wallpaper manager interface

The treeland_wallpaper_manager_v1 interface is a global object used to create wallpaper objects for specific outputs.

treeland_wallpaper_manager_v1
request destroy()
Destructor

    destroy treeland_wallpaper_manager_v1

    Destroy this treeland_wallpaper_manager_v1 object.

    Destroying a bound treeland_wallpaper_manager_v1 object while there are wallpapers still alive created by this treeland_wallpaper_manager_v1 object instance is illegal and will result in a protocol error.

    treeland_wallpaper_manager_v1
    request get_treeland_wallpaper(
        id: new_id<treeland_wallpaper_v1>,
        output: object<wl_output>,
        surface: nullable object<wl_surface>,
    )
    • output — the output to associate the wallpaper with
    • surface — The wl_surface associated with this wallpaper, or null to unset it

    Create a wallpaper object for an output.

    Creates a treeland_wallpaper_v1 object bound to the specified wl_output.

    The compositor may enforce that only one wallpaper exists for a given (output, role) combination.

    When a surface is associated, the compositor will track the workspace the surface belongs to. Whenever the workspace changes, the compositor may notify the client of the current wallpaper file path used by that workspace.

    Note:

    1. The treeland_wallpaper_v1 object must be destroyed before the associated wl_output is destroyed.

    2. The treeland_wallpaper_v1 object must be destroyed before the associated wl_surface is destroyed.

    treeland_wallpaper_manager_unstable_v1
    treeland_wallpaper_v1

    Version 1

    Wallpaper object interface for setting and managing wallpaper content

    The treeland_wallpaper_v1 interface represents a wallpaper instance created by the compositor for a specific output, role.

    The wallpaper source provided by the client is stored and managed on the compositor side. Once a wallpaper source has been set, the compositor may cache, reuse, or persist the source independently of the client.

    treeland_wallpaper_v1
    enum error {
        already_used = 0,
        invalid_source = 1,
        permission_denied = 2,
    }
    • already_used — wallpaper file has already been used and is cached on the wallpaper side
    • invalid_source — The specified wallpaper source is invalid, unsupported, or failed to load.
    • permission_denied — Permission denied when opening the specified wallpaper source
    treeland_wallpaper_v1
    enum wallpaper_source_type {
        image = 0,
        video = 1,
    }
    • image — The wallpaper source is an image
    • video — The wallpaper source is a video
    treeland_wallpaper_v1
    enum wallpaper_role {
        desktop = 0x1,
        lockscreen = 0x2,
    }
    • desktop — Wallpaper for the desktop environment
    • lockscreen — Wallpaper for the lock screen
    treeland_wallpaper_v1
    request destroy()
    Destructor

      Destroy the wallpaper object

      Destroys the treeland_wallpaper_v1 object and releases all resources associated with it on the compositor side.

      After calling this request, the client must not use the wallpaper object anymore.

      treeland_wallpaper_v1
      request set_image_source(
          file_source: string,
          role: uint<wallpaper_role>,
      )
      • file_source — Path to the image file to be used as the wallpaper
      • role — wallpaper role

      Set an image wallpaper source

      Sets an image as the wallpaper source, apply to the current wl_output and the active workspace. except for lockscreen wallpapers, only one wallpaper can be set per wl_output. Supported formats:

      • JPG / JPEG (Joint Photographic Experts Group)

      The compositor will attempt to load and display the specified image file. If the file cannot be accessed, decoded, or is in an unsupported format, the compositor will emit a failed event with an appropriate error code.

      Access Control: This protocol accepts file_source such as /usr/share/wallpapers/xxx or /var/cache/wallpapers/xxxx provided by the client. the compositor will perform file verification.

      treeland_wallpaper_v1
      request set_video_source(
          file_source: string,
          role: uint<wallpaper_role>,
      )
      • file_source — Path to the video file to be used as the wallpaper
      • role — wallpaper role

      Set a video wallpaper source

      Sets a video file as the wallpaper source, apply to the current wl_output and the active workspace. except for lockscreen wallpapers, only one wallpaper can be set per wl_output. Supported formats:

      • MP4

      • AVI

      • MOV

      The compositor is responsible for decoding and presenting the video. Playback behavior such as looping, synchronization, and performance characteristics are compositor-defined.

      If the video source cannot be opened or decoded, a failed event will be emitted.

      Access Control: This protocol accepts file_source such as /usr/share/wallpapers/xxx or /var/cache/wallpapers/xxxx provided by the client. the compositor will perform file verification.

      treeland_wallpaper_v1
      event failed(
          file_source: string,
          error: uint<error>,
      )
      • file_source — Path to the file to be used as the wallpaper
      • error — The error code indicating the failure reason

      Indicates a wallpaper operation failure

      This event is emitted when a wallpaper-related request fails.

      The failure may occur during source loading, validation, or runtime setup. The error code provides additional information about the cause of the failure.

      Possible error values include:

      • already_used: The wallpaper source is already configured. This is not a fatal error and serves as a notification to the client.

      • invalid_source: The specified wallpaper source is invalid, unsupported, or could not be processed. This is a fatal error and the client should verify the source before retrying.

      • Permission denied, check file permissions.

      treeland_wallpaper_v1
      event changed(
          role: uint<wallpaper_role>,
          source_type: uint<wallpaper_source_type>,
          file_source: string,
      )
      • source_type — The type of the current wallpaper source
      • file_source — The file path of the current wallpaper source

      Indicates that the wallpaper source has changed

      This event is emitted by the compositor to notify the client that the wallpaper source associated with this treeland_wallpaper_v1 object has changed.

      The event may be emitted during initial object setup or when the wallpaper is changed due to external factors not initiated by this client, such as compositor policy decisions, workspace switches (except for lockscreen wallpapers) that affect the active wallpaper, or other system components.

      For desktop wallpapers, workspace switches may also trigger this event to report the wallpaper used by the new workspace.

      The event provides the current wallpaper source type and the corresponding source file path.