虚拟指针

此协议允许客户端模拟物理指针设备。这些请求大多是 wl_pointer 中指定的请求的镜像。

motion(time: uint, dx: fixed, dy: fixed)
参数
类型
描述
timeuint
timestamp with millisecond granularity
dxfixed
displacement on the x-axis
dyfixed
displacement on the y-axis
指针相对运动事件

指针相对于上一次请求移动了相对量。

值在全局合成器空间中。

motion_absolute(time: uint, x: uint, y: uint, x_extent: uint, y_extent: uint)
参数
类型
描述
timeuint
timestamp with millisecond granularity
xuint
position on the x-axis
yuint
position on the y-axis
x_extentuint
extent of the x-axis
y_extentuint
extent of the y-axis
指针绝对运动事件

指针在绝对坐标系中移动。

x 的值范围从 0 到 x_extent,y 的值范围从 0 到 y_extent。

button(time: uint, button: uint, state: uint<wl_pointer.button_state>)
参数
类型
描述
timeuint
timestamp with millisecond granularity
buttonuint
button that produced the event
stateuint<wl_pointer.button_state>
physical state of the button
按钮事件

按钮被按下或释放。

axis(time: uint, axis: uint<wl_pointer.axis>, value: fixed)
参数
类型
描述
timeuint
timestamp with millisecond granularity
axisuint<wl_pointer.axis>
axis type
valuefixed
length of vector in touchpad coordinates
轴事件

滚动和其他轴请求。

frame()
指针事件序列的结束

表示逻辑上属于同一组的事件集。

参数
类型
描述
axis_sourceuint<wl_pointer.axis_source>
source of the axis event
轴源事件

滚动和其他轴的源信息。

axis_stop(time: uint, axis: uint<wl_pointer.axis>)
参数
类型
描述
timeuint
timestamp with millisecond granularity
axisuint<wl_pointer.axis>
the axis stopped with this event
轴停止事件

滚动和其他轴的停止通知。

axis_discrete(time: uint, axis: uint<wl_pointer.axis>, value: fixed, discrete: int)
参数
类型
描述
timeuint
timestamp with millisecond granularity
axisuint<wl_pointer.axis>
axis type
valuefixed
length of vector in touchpad coordinates
discreteint
number of steps
轴点击事件

滚动和其他轴的离散步进信息。

此事件允许客户端使用离散值扩展通常使用 axis 事件发送的数据。

destroy
类型: destructor起始版本 1
destroy()
销毁虚拟指针对象
参数
描述
invalid_axis0
客户端发送了无效的轴枚举值
invalid_axis_source1
客户端发送了无效的轴源枚举值

虚拟指针管理器

此对象允许客户端创建单独的虚拟指针对象。

create_virtual_pointer(seat: object<wl_seat>, id: new_id<zwlr_virtual_pointer_v1>)
参数
类型
描述
seatobject<wl_seat>允许为空
idnew_id<zwlr_virtual_pointer_v1>
创建一个新的虚拟指针

创建一个新的虚拟指针。可选的 seat 是对合成器的建议。

destroy
类型: destructor起始版本 1
destroy()
销毁虚拟指针管理器
create_virtual_pointer_with_output(seat: object<wl_seat>, output: object<wl_output>, id: new_id<zwlr_virtual_pointer_v1>)
参数
类型
描述
seatobject<wl_seat>允许为空
outputobject<wl_output>允许为空
idnew_id<zwlr_virtual_pointer_v1>
创建一个新的虚拟指针

创建一个新的虚拟指针。seat 和 output 参数是可选的。如果设置了 seat 参数,合成器应将输入设备分配给请求的 seat。如果设置了 output 参数,合成器应将输入设备映射到请求的输出。


合成器支持

Cage
Cage
0.2.0
COSMIC
COSMIC
1.0.0~beta.8
GameScope
GameScope
3.15.14
Hyprland
Hyprland
0.52.1
Jay
1.12.0
KWin
KWin
6.6
Labwc
Labwc
0.9.2
Louvre
Louvre
2.14.1
Mir
Mir
2.26
Muffin
Muffin
6.6.0
Mutter
Mutter
49.2
niri
niri
25.11
phoc
phoc
0.52
river
river
0.3.13
Sway
Sway
1.11
Treeland
Treeland
0.8.0
Wayfire
Wayfire
0.9.0
Weston
Weston
14.0.2
zwlr_virtual_pointer_manager_v1
2
x
x
2
x
x
2
x
2
x
x
2
2
2
2
x
2
x

Copyright © 2019 Josef Gajdusek

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