Weston desktop shell
创建桌面小部件和辅助工具
传统用户界面可以依赖此接口来定义典型桌面的基础。目前可以设置背景、面板和锁定表面。
set_background(output: object<wl_output>, surface: object<wl_surface>)
参数 | 类型 | 描述 |
|---|---|---|
| output | object<wl_output> | |
| surface | object<wl_surface> |
set_panel(output: object<wl_output>, surface: object<wl_surface>)
参数 | 类型 | 描述 |
|---|---|---|
| output | object<wl_output> | |
| surface | object<wl_surface> |
set_lock_surface(surface: object<wl_surface>)
参数 | 类型 | 描述 |
|---|---|---|
| surface | object<wl_surface> |
unlock()
set_grab_surface(surface: object<wl_surface>)
参数 | 类型 | 描述 |
|---|---|---|
| surface | object<wl_surface> |
设置抓取表面
此请求设置的表面将在抓取期间在位置 0, 0 处接收虚假的 pointer.enter 事件,并应设置适当的光标图像,如紧接在 enter 事件之前发送的 grab_cursor 事件所述。
desktop_ready()
桌面已准备好显示
告知服务器,已绘制足够的桌面元素使桌面看起来已准备好使用。在启动期间,服务器可以使用黑屏等待此请求,然后再开始淡入桌面。如果桌面的客户端部分需要很长时间来初始化,我们避免显示临时的垃圾内容。
set_panel_position(position: uint)
参数 | 类型 | 描述 |
|---|---|---|
| position | uint |
设置面板位置
告知 shell 面板位于屏幕的哪一侧。这样新窗口就不会与面板重叠,最大化窗口也能正确最大化。
configure(edges: uint, surface: object<wl_surface>, width: int, height: int)
参数 | 类型 | 描述 |
|---|---|---|
| edges | uint | |
| surface | object<wl_surface> | |
| width | int | |
| height | int |
prepare_lock_surface()
告知客户端创建并设置锁定表面
告知客户端我们希望它创建并设置锁定表面,即请求用户解锁屏幕的 GUI。锁定表面通过 'set_lock_surface' 公布。无论客户端是否实际实现锁定,它都必须发送 'unlock' 请求以恢复正常桌面。
cursor { none, resize_top, resize_bottom, arrow, resize_left, resize_top_left, resize_bottom_left, move, resize_right, resize_top_right, resize_bottom_right, busy }
实现屏保的接口
一次只能有一个客户端绑定此接口。
set_surface(surface: object<wl_surface>, output: object<wl_output>)
参数 | 类型 | 描述 |
|---|---|---|
| surface | object<wl_surface> | |
| output | object<wl_output> |
将表面类型设置为屏保
屏保表面通常是隐藏的,只有在空闲超时后才可见。
合成器支持
Cage | COSMIC | GameScope | Hyprland | Jay | KWin | Labwc | Louvre | Mir | Muffin | Mutter | niri | phoc | river | Sway | Treeland | Wayfire | Weston | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| weston_desktop_shell | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | 1 |