Chromium aura output management
- external
一个全局对象,负责将原子性的输出配置变更传播给客户端。输出配置是添加/移除的输出与更新的输出指标的联合。
添加的输出作为 wl_registry.global 事件到达客户端,移除的输出作为 wl_registry.global_remove 事件,更新的输出指标作为 zaura_output_manager_v2 接口上定义的一系列事件。随后是管理器的 done 事件,表示事务的结束。
客户端应以从一种输出配置状态过渡到另一种状态的方式处理变更,而不应将中间输出状态暴露给应用程序的其余部分。
参与的服务器应在 wl_registry.global 事件序列中,在任何 wl_output 全局对象之前发出 zaura_output_manager_v2 全局对象。
参与的客户端应在绑定任何 wl_output 全局对象之前绑定 zaura_output_manager_v2。此排序要求确保客户端在接收任何可能引用已绑定 wl_output 的后续服务器事件之前,接收到所有必要的输出配置信息。
客户端可以预期组成配置变更的所有事件都是同步发送的,一个接一个地,在任何使用输出作为事件参数的其他服务器事件之前。
done()
在给定 wl_output 的所有添加、更改和移除输出事件已分派给客户端后,发送此事件。
display_id(output_name: uint, display_id_hi: uint, display_id_lo: uint)
参数 | 类型 | 描述 |
|---|---|---|
| output_name | uint | |
| display_id_hi | uint | |
| display_id_lo | uint |
此事件描述 ChromeOS 分配给每个显示器的 64 位显示 ID。该值是不透明的,不应进行解释。
该事件在输出的 wl_registry.global 事件之后立即发送,随后在后续的显示配置变更中发送。
logical_position(output_name: uint, x: int, y: int)
参数 | 类型 | 描述 |
|---|---|---|
| output_name | uint | |
| x | int | x position within the global compositor space |
| y | int | y position within the global compositor space |
position 事件描述 wl_output 在全局合成器空间中的位置。
该事件在输出的 wl_registry.global 事件之后立即发送,随后在后续的显示配置变更中发送。
logical_size(output_name: uint, width: int, height: int)
参数 | 类型 | 描述 |
|---|---|---|
| output_name | uint | |
| width | int | width in global compositor space |
| height | int | height in global compositor space |
logical_size 事件描述输出在全局合成器空间中的逻辑大小。
该事件在输出的 wl_registry.global 事件之后立即发送,随后在后续的显示配置变更中发送。
physical_size(output_name: uint, width: int, height: int)
参数 | 类型 | 描述 |
|---|---|---|
| output_name | uint | |
| width | int | width in global compositor space |
| height | int | height in global compositor space |
显示器的物理分辨率,以像素为单位。该值不应包含任何过扫描边距或显示旋转,但面板方向调整除外。
该事件在输出的 wl_registry.global 事件之后立即发送,随后在后续的显示配置变更中发送。
work_area_insets(output_name: uint, top: int, left: int, bottom: int, right: int)
参数 | 类型 | 描述 |
|---|---|---|
| output_name | uint | |
| top | int | |
| left | int | |
| bottom | int | |
| right | int |
此事件描述输出在逻辑屏幕坐标中的工作区域内边距,据此可以计算工作区。
该事件在绑定到输出对象时发送,随后在输出状态变更时发送。
device_scale_factor(output_name: uint, device_scale_factor: uint)
参数 | 类型 | 描述 |
|---|---|---|
| output_name | uint | |
| device_scale_factor | uint | display scale factor, in float format |
输出设备的缩放因子。我们将浮点缩放因子 reinterpret_cast 为 32 位 uint,稍后再将其转换回 float。这是因为 wayland 不支持浮点数的原生传输。由于不同的 CPU 架构可能对 IEEE 754 浮点数使用不同的字节序表示,此协议隐式假设调用者和接收者是同一台机器。
该事件在输出的 wl_registry.global 事件之后立即发送,随后在后续的显示配置变更中发送。
logical_transform(output_name: uint, transform: int<wl_output.transform>)
参数 | 类型 | 描述 |
|---|---|---|
| output_name | uint | |
| transform | int<wl_output.transform> | transform that maps framebuffer to output |
此事件描述输出的逻辑变换。面板变换对应于显示器的面板旋转,逻辑变换对应于显示器的逻辑旋转。
该事件在输出的 wl_registry.global 事件之后立即发送,随后在后续的显示配置变更中发送。
panel_transform(output_name: uint, transform: int<wl_output.transform>)
参数 | 类型 | 描述 |
|---|---|---|
| output_name | uint | |
| transform | int<wl_output.transform> | transform that maps framebuffer to output |
此事件描述输出的面板变换,即关联显示器的面板旋转。
该事件在输出的 wl_registry.global 事件之后立即发送,随后在后续的显示配置变更中发送。
name(output_name: uint, name: string)
参数 | 类型 | 描述 |
|---|---|---|
| output_name | uint | |
| name | string | output name |
name 是一个 UTF-8 字符串,其内容没有定义约定。
该事件在输出的 wl_registry.global 事件之后立即发送,随后在后续的显示配置变更中发送。
description(output_name: uint, description: string)
参数 | 类型 | 描述 |
|---|---|---|
| output_name | uint | |
| description | string | output description |
description 是一个 UTF-8 字符串,其内容没有定义约定。
该事件在输出的 wl_registry.global 事件之后立即发送,随后在后续的显示配置变更中发送。
overscan_insets(output_name: uint, top: int, left: int, bottom: int, right: int)
参数 | 类型 | 描述 |
|---|---|---|
| output_name | uint | |
| top | int | |
| left | int | |
| bottom | int | |
| right | int |
此事件描述输出的过扫描边距,以物理像素为单位。
该事件在输出的 wl_registry.global 事件之后立即发送,随后在后续的显示配置变更中发送。
合成器支持
Copyright
Copyright 2024 The Chromium Authors
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.