wlr virtual pointer
此协议允许客户端模拟物理指针设备。这些请求大多是 wl_pointer 中指定的请求的镜像。
参数 | 类型 | 描述 |
|---|---|---|
| time | uint | timestamp with millisecond granularity |
| dx | fixed | displacement on the x-axis |
| dy | fixed | displacement on the y-axis |
指针相对于上一次请求移动了相对量。
值在全局合成器空间中。
参数 | 类型 | 描述 |
|---|---|---|
| time | uint | timestamp with millisecond granularity |
| x | uint | position on the x-axis |
| y | uint | position on the y-axis |
| x_extent | uint | extent of the x-axis |
| y_extent | uint | extent of the y-axis |
指针在绝对坐标系中移动。
x 的值范围从 0 到 x_extent,y 的值范围从 0 到 y_extent。
button(time: uint, button: uint, state: uint<wl_pointer.button_state>)
参数 | 类型 | 描述 |
|---|---|---|
| time | uint | timestamp with millisecond granularity |
| button | uint | button that produced the event |
| state | uint<wl_pointer.button_state> | physical state of the button |
按钮被按下或释放。
axis(time: uint, axis: uint<wl_pointer.axis>, value: fixed)
参数 | 类型 | 描述 |
|---|---|---|
| time | uint | timestamp with millisecond granularity |
| axis | uint<wl_pointer.axis> | axis type |
| value | fixed | length of vector in touchpad coordinates |
滚动和其他轴请求。
axis_source(axis_source: uint<wl_pointer.axis_source>)
参数 | 类型 | 描述 |
|---|---|---|
| axis_source | uint<wl_pointer.axis_source> | source of the axis event |
滚动和其他轴的源信息。
axis_stop(time: uint, axis: uint<wl_pointer.axis>)
参数 | 类型 | 描述 |
|---|---|---|
| time | uint | timestamp with millisecond granularity |
| axis | uint<wl_pointer.axis> | the axis stopped with this event |
滚动和其他轴的停止通知。
axis_discrete(time: uint, axis: uint<wl_pointer.axis>, value: fixed, discrete: int)
参数 | 类型 | 描述 |
|---|---|---|
| time | uint | timestamp with millisecond granularity |
| axis | uint<wl_pointer.axis> | axis type |
| value | fixed | length of vector in touchpad coordinates |
| discrete | int | number of steps |
滚动和其他轴的离散步进信息。
此事件允许客户端使用离散值扩展通常使用 axis 事件发送的数据。
error { invalid_axis, invalid_axis_source }
参数 | 值 | 描述 |
|---|---|---|
| invalid_axis | 0 | 客户端发送了无效的轴枚举值 |
| invalid_axis_source | 1 | 客户端发送了无效的轴源枚举值 |
此对象允许客户端创建单独的虚拟指针对象。
create_virtual_pointer(seat: object<wl_seat>, id: new_id<zwlr_virtual_pointer_v1>)
参数 | 类型 | 描述 |
|---|---|---|
| seat | object<wl_seat>允许为空 | |
| id | new_id<zwlr_virtual_pointer_v1> |
创建一个新的虚拟指针。可选的 seat 是对合成器的建议。
合成器支持
Cage | COSMIC | GameScope | Hyprland | Jay | KWin | Labwc | Louvre | Mir | Muffin | Mutter | niri | phoc | river | Sway | Treeland | Wayfire | Weston | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| zwlr_virtual_pointer_manager_v1 | 2 | x | x | 2 | x | x | 2 | x | 2 | x | x | 2 | 2 | 2 | 2 | x | 2 | x |
Copyright
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.