Image Capture Source
本协议作为捕获协议与潜在的图像捕获源(如 output 和 toplevel)之间的中介。
未来可以扩展本协议以支持更多图像捕获源,从而将这些图像捕获源添加到使用图像捕获源对象的其他协议中,而无需修改那些协议。
警告!此文件中描述的协议目前处于测试阶段。可以结合相应的接口版本增加来添加向后兼容的更改。只能通过创建扩展的新主要版本来进行向后不兼容的更改。
图像捕获源对象是可捕获资源的不透明描述符。此资源可以是任何可从中派生图像的实体。
注意,由于 ext_image_capture_source_v1 对象是由多个独立的工厂接口创建的,因此 ext_image_capture_source_v1 接口冻结在版本 1。
用于为 wl_output 对象创建图像捕获源对象的管理器。
create_source(source: new_id<ext_image_capture_source_v1>, output: object<wl_output>)
参数 | 类型 | 描述 |
|---|---|---|
| source | new_id<ext_image_capture_source_v1> | |
| output | object<wl_output> |
为一个 output 创建源对象。从此源捕获的图像将显示与该 output 相同的内容。可能会省略某些元素,例如被标记为对捕获透明的光标和叠加层(overlay)。
destroy()
销毁此管理器。客户端可以随时发送此 request,该管理器创建的对象在其被销毁后仍将保持有效。
用于为 ext_foreign_toplevel_handle_v1 对象创建图像捕获源对象的管理器。
create_source(source: new_id<ext_image_capture_source_v1>, toplevel_handle: object<ext_foreign_toplevel_handle_v1>)
参数 | 类型 | 描述 |
|---|---|---|
| source | new_id<ext_image_capture_source_v1> | |
| toplevel_handle | object<ext_foreign_toplevel_handle_v1> |
为一个外部 toplevel 句柄创建源对象。从此源捕获的图像将显示与该 toplevel 相同的内容。
destroy()
销毁此管理器。客户端可以随时发送此 request,该管理器创建的对象在其被销毁后仍将保持有效。
合成器支持
Cage | COSMIC | GameScope | Hyprland | Jay | KWin | Labwc | Louvre | Mir | Muffin | Mutter | niri | phoc | river | Sway | Treeland | Wayfire | Weston | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ext_output_image_capture_source_manager_v1 | x | 1 | x | x | 1 | x | 1 | 1 | 1 | x | x | x | 1 | x | 1 | 1 | x | x |
| ext_foreign_toplevel_image_capture_source_manager_v1 | x | 1 | x | x | 1 | x | x | 1 | x | x | x | x | x | x | x | 1 | x | x |
Copyright
Copyright © 2022 Andri Yngvason Copyright © 2024 Simon Ser
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.