weston_test

版本 1
Weston 内部测试

Weston 合成器的内部测试工具。

需要强调的是,这些工具绝不应在运行 Weston 测试之外使用。weston-test.so 模块绝不应被安装。

这些请求可能允许客户端执行非常危险的操作。

move_surface(surface: object<wl_surface>, x: int, y: int)
参数
类型
描述
surfaceobject<wl_surface>
xint
yint
move_pointer(tv_sec_hi: uint, tv_sec_lo: uint, tv_nsec: uint, x: int, y: int)
参数
类型
描述
tv_sec_hiuint
tv_sec_louint
tv_nsecuint
xint
yint
send_button(tv_sec_hi: uint, tv_sec_lo: uint, tv_nsec: uint, button: int, state: uint)
参数
类型
描述
tv_sec_hiuint
tv_sec_louint
tv_nsecuint
buttonint
stateuint
send_axis(tv_sec_hi: uint, tv_sec_lo: uint, tv_nsec: uint, axis: uint, value: fixed)
参数
类型
描述
tv_sec_hiuint
tv_sec_louint
tv_nsecuint
axisuint
valuefixed
activate_surface(surface: object<wl_surface>)
参数
类型
描述
surfaceobject<wl_surface>允许为空
send_key(tv_sec_hi: uint, tv_sec_lo: uint, tv_nsec: uint, key: uint, state: uint)
参数
类型
描述
tv_sec_hiuint
tv_sec_louint
tv_nsecuint
keyuint
stateuint
device_release(device: string)
参数
类型
描述
devicestring
device_add(device: string)
参数
类型
描述
devicestring
send_touch(tv_sec_hi: uint, tv_sec_lo: uint, tv_nsec: uint, touch_id: int, x: fixed, y: fixed, touch_type: uint)
参数
类型
描述
tv_sec_hiuint
tv_sec_louint
tv_nsecuint
touch_idint
xfixed
yfixed
touch_typeuint
client_break(breakpoint: uint<weston_test.breakpoint>, resource_id: uint)
参数
类型
描述
breakpointuint<weston_test.breakpoint>
event type to wait for
resource_iduint
optional Wayland resource ID to filter for (type-specific)
请求合成器在某处暂停执行

请求合成器在某处暂停执行。当执行暂停时,合成器将向客户端发出共享信号量。

pointer_position(x: fixed, y: fixed)
参数
类型
描述
xfixed
yfixed
breakpoint { post_repaint, post_latch } 
参数
描述
post_repaint0
输出重绘之后(过滤类型:wl_output)
post_latch1
输出锁存之后(过滤类型:wl_output)

Weston 内部测试

这是 Weston 内部测试的全局单例接口。

此接口允许测试客户端触发合成器端的测试过程。这对于实际测试在合成器插件中但也需要特定客户端存在的情况非常有用。

此接口由包含测试代码的合成器插件实现。

测试客户端使用 "run" 请求启动测试。在收到 "finished" 事件之前,不得发送另一个 "run" 请求。如果合成器端测试成功,则发送 "finished" 事件。如果合成器端测试失败,合成器应发送 "test_failed" 协议错误,但也可能以错误退出(例如 SEGV)。

未知的测试名称将引发 "unknown_test" 协议错误。

destroy
类型: destructor
destroy()
销毁测试运行器对象
run(test_name: string)
参数
类型
描述
test_namestring
运行指定的测试
finished()
测试已完成
参数
描述
test_failed0
合成器测试失败
unknown_test1
无法识别的测试名称

合成器支持

未发现合成器支持

Copyright © 2012 Intel Corporation

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 许可。