Treeland output manager
暴露哪个是主显示器
用于告知在已启用的输出中哪个是主显示器的协议。
get_color_control(id: new_id<treeland_output_color_control_v1>, output: object<wl_output>)
参数 | 类型 | 描述 |
|---|---|---|
| id | new_id<treeland_output_color_control_v1> | |
| output | object<wl_output> |
获取输出的颜色控制接口
primary_output(output_name: string)
参数 | 类型 | 描述 |
|---|---|---|
| output_name | string | the name of the output |
提供当前主输出的名称
指定哪个输出是通过名称标识的主输出。
输出的颜色控制接口
用于控制特定输出的色温和亮度设置的协议。
set_color_temperature(temperature: uint)
参数 | 类型 | 描述 |
|---|---|---|
| temperature | uint | color temperature in Kelvin |
设置输出的色温
色温设置仅在发出 commit 请求后应用。设置超出 [1000, 20000] 范围的值是协议错误。
set_brightness(brightness: fixed)
参数 | 类型 | 描述 |
|---|---|---|
| brightness | fixed | brightness level (in range [0.0, 100.0]) |
设置输出的亮度
亮度设置仅在发出 commit 请求后应用。设置超出 [0.0, 100.0] 范围的值是协议错误。
color_temperature(temperature: uint)
参数 | 类型 | 描述 |
|---|---|---|
| temperature | uint | current color temperature in Kelvin |
输出的当前色温
提供输出的当前色温设置。色温取值范围为 [1000, 20000]。色温定义为显示器当前白点在普朗克轨迹上对应的温度(开尔文)。在当前实现中,中性色温为 6600K。此事件在 treeland_output_color_control_v1 对象创建后发送一次,或在输出的色温更改成功提交后立即发送。
brightness(brightness: fixed)
参数 | 类型 | 描述 |
|---|---|---|
| brightness | fixed | current brightness level (in range [0.0, 100.0]) |
输出的当前亮度
提供输出的当前亮度设置。亮度取值范围为 [0.0, 100.0]。此事件在 treeland_output_color_control_v1 对象创建后发送一次,或在输出的亮度更改成功提交后立即发送。
error { invalid_color_temperature, invalid_brightness }
参数 | 值 | 描述 |
|---|---|---|
| invalid_color_temperature | 1 | 提供的色温值无效 |
| invalid_brightness | 2 | 提供的亮度值无效 |
合成器支持
Cage | COSMIC | GameScope | Hyprland | Jay | KWin | Labwc | Louvre | Mir | Muffin | Mutter | niri | phoc | river | Sway | Treeland | Wayfire | Weston | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| treeland_output_manager_v1 | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | 2 | x | x |
Copyright
SPDX-FileCopyrightText: 2024-2025 UnionTech Software Technology Co., Ltd. SPDX-License-Identifier: MIT