COSMIC a11y
此协议提供了在 COSMIC 桌面环境中为 shell 组件切换各种无障碍功能的方法。
用于切换无障碍功能的管理器。
set_magnifier(active: uint<cosmic_a11y_manager_v1.active_state>)
参数 | 类型 | 描述 |
|---|---|---|
| active | uint<cosmic_a11y_manager_v1.active_state> | If the screen magnifier should be enabled |
设置屏幕放大器的状态。
客户端不应假设任何请求的更改已实际生效,应等待下一个 magnifier 事件后再更新其 UI。
set_screen_filter(inverted: uint<cosmic_a11y_manager_v1.active_state>, filter: uint<cosmic_a11y_manager_v1.filter>)
参数 | 类型 | 描述 |
|---|---|---|
| inverted | uint<cosmic_a11y_manager_v1.active_state> | If the screen colors should be inverted |
| filter | uint<cosmic_a11y_manager_v1.filter> | Which if any filter should be used |
设置屏幕过滤的参数。
如果滤镜设置为 unknown,合成器不得更改当前滤镜的状态。 这是为了允许客户端更新反转状态,即使它们不知道当前活动的滤镜。
客户端不应假设任何请求的更改已实际生效,应等待下一个 screen_filter 事件后再更新其 UI。
如果绑定了版本 3 或更高版本,发送此请求将引发 "deprecated" 协议错误。 请改用 set_screen_filter2。
set_screen_filter2(inverted: uint<cosmic_a11y_manager_v1.active_state>, filter: uint<cosmic_a11y_manager_v1.filter>, filter_state: uint<cosmic_a11y_manager_v1.active_state>)
参数 | 类型 | 描述 |
|---|---|---|
| inverted | uint<cosmic_a11y_manager_v1.active_state> | If the screen colors should be inverted |
| filter | uint<cosmic_a11y_manager_v1.filter> | Which if filter should be used |
| filter_state | uint<cosmic_a11y_manager_v1.active_state> | If the screen filter should be active |
设置屏幕过滤的参数。
如果滤镜设置为 unknown,合成器不得更改当前设置的滤镜。 这是为了允许客户端更新反转状态或切换屏幕滤镜,即使它们不知道当前选择的滤镜。
客户端不应假设任何请求的更改已实际生效,应等待下一个 screen_filter 事件后再更新其 UI。
如果 "filter" 设置为 "disabled",将引发 "deprecated" 协议错误。
magnifier(active: uint<cosmic_a11y_manager_v1.active_state>)
参数 | 类型 | 描述 |
|---|---|---|
| active | uint<cosmic_a11y_manager_v1.active_state> | If the screen magnifier is enabled |
屏幕放大器的状态。
合成器在绑定协议时以及状态发生变化时将发出此事件。
screen_filter(inverted: uint<cosmic_a11y_manager_v1.active_state>, filter: uint<cosmic_a11y_manager_v1.filter>)
参数 | 类型 | 描述 |
|---|---|---|
| inverted | uint<cosmic_a11y_manager_v1.active_state> | If the screen colors are inverted |
| filter | uint<cosmic_a11y_manager_v1.filter> | Which if any screen filter is enabled |
屏幕过滤使用的参数。
合成器在绑定协议时以及状态发生变化时将发出此事件。
如果使用的屏幕滤镜不为协议所知或绑定版本未知,filter 将被设置为 unknown。
从版本 3 开始,此事件将不再发出,请使用 screen_filter2。
screen_filter2(inverted: uint<cosmic_a11y_manager_v1.active_state>, filter: uint<cosmic_a11y_manager_v1.filter>, filter_state: uint<cosmic_a11y_manager_v1.active_state>)
参数 | 类型 | 描述 |
|---|---|---|
| inverted | uint<cosmic_a11y_manager_v1.active_state> | If the screen colors are inverted |
| filter | uint<cosmic_a11y_manager_v1.filter> | Which if any screen filter is selected |
| filter_state | uint<cosmic_a11y_manager_v1.active_state> | If the screen filter is active |
屏幕过滤使用的参数。
合成器在绑定协议时以及状态发生变化时将发出此事件。
如果使用的屏幕滤镜不为协议所知或绑定版本未知,filter 将被设置为 unknown。
合成器绝不能将 "disabled" 作为 "filter" 参数发送。
filter { disabled, unknown, greyscale, daltonize_protanopia, daltonize_deuteranopia, daltonize_tritanopia }
参数 | 值 | 描述 |
|---|---|---|
| disabled弃用版本 3 | 0 | 未设置屏幕滤镜 |
| unknown | 1 | 自定义或未知的屏幕滤镜 |
| greyscale | 2 | 灰度颜色 |
| daltonize_protanopia | 3 | 红色盲矫正 |
| daltonize_deuteranopia | 4 | 绿色盲矫正 |
| daltonize_tritanopia | 5 | 蓝色盲矫正 |
合成器支持
Cage | COSMIC | GameScope | Hyprland | Jay | KWin | Labwc | Louvre | Mir | Muffin | Mutter | niri | phoc | river | Sway | Treeland | Wayfire | Weston | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| cosmic_a11y_manager_v1 | x | 2 | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x |
Copyright
Copyright © 2025 System76
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.