AGL screenshooter

AGL 截图工具

AGL compositor 扩展,执行由 "wl_output" 对象表示的输出的截图。

客户端将调用 "take_shot" 请求并等待 compositor 将数据写入 Wayland 缓冲区,然后通过 "done" 事件向客户端发信号。如果客户端想要拍摄另一张截图或对不同输出进行截图,应等待收到 "done" 事件。

客户端必须在拍摄时提供正确大小的基于 wl_shm 的 wl_buffer。compositor 将截图写入 wl_buffer,然后发送 "done" 事件,表示数据写入完成。

一旦 compositor 将数据传回提供的 Wayland 缓冲区,客户端应能够将其转换为磁盘上的常见文件格式。

take_shot(output: object<wl_output>, buffer: object<wl_buffer>)
参数
类型
描述
outputobject<wl_output>
bufferobject<wl_buffer>
执行截图

对由 "wl_output" 对象表示的 Wayland 输出进行截图。客户端应首先使用全局注册表检索它,以及 "wl_shm" 对象,以便创建 Wayland 缓冲区类型的对象("wl_buffer")。

客户端可以从 "wl_output" 对象推导出步长和大小,然后在创建基于 shm 的 "wl_buffer" 以及提供像素格式时使用这些值。

destroy
类型: destructor
destroy()
销毁主对象

销毁 "weston_screenshooter" 接口。

参数
类型
描述
statusuint<agl_screenshooter.done_status>
当 "take_shot" 完成时发送

发回事件以通知客户端 "take_shot" 请求已完成。

done_status { success, no_memory, bad_buffer } 
参数
描述
success0
成功
no_memory1
内存不足
bad_buffer2
无效的缓冲区

合成器支持

未发现合成器支持

Copyright © 2020 Collabora. Ltd,

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.

Footer

© 2026 Wayland Explorer

本网站与 Wayland 官方项目无任何关联。网站所有内容均根据 Wayland 协议 XML 文件自动生成。

本网站使用的 Visual Studio Code - Codicons 遵循 CC BY 4.0 许可。