wlr virtual pointer
zwlr_virtual_pointer_v1
This protocol allows clients to emulate a physical pointer device. The requests are mostly mirror opposites of those specified in wl_pointer.
Argument | Type | Description |
---|---|---|
time | uint | timestamp with millisecond granularity |
dx | fixed | displacement on the x-axis |
dy | fixed | displacement on the y-axis |
The pointer has moved by a relative amount to the previous request.
Values are in the global compositor space.
Argument | Type | Description |
---|---|---|
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 |
The pointer has moved in an absolute coordinate frame.
Value of x can range from 0 to x_extent, value of y can range from 0 to y_extent.
button(time: uint, button: uint, state: uint<wl_pointer.button_state>)
Argument | Type | Description |
---|---|---|
time | uint | timestamp with millisecond granularity |
button | uint | button that produced the event |
state | uint<wl_pointer.button_state> | physical state of the button |
A button was pressed or released.
axis(time: uint, axis: uint<wl_pointer.axis>, value: fixed)
Argument | Type | Description |
---|---|---|
time | uint | timestamp with millisecond granularity |
axis | uint<wl_pointer.axis> | axis type |
value | fixed | length of vector in touchpad coordinates |
Scroll and other axis requests.
frame()
Indicates the set of events that logically belong together.
axis_source(axis_source: uint<wl_pointer.axis_source>)
Argument | Type | Description |
---|---|---|
axis_source | uint<wl_pointer.axis_source> | source of the axis event |
Source information for scroll and other axis.
axis_stop(time: uint, axis: uint<wl_pointer.axis>)
Argument | Type | Description |
---|---|---|
time | uint | timestamp with millisecond granularity |
axis | uint<wl_pointer.axis> | the axis stopped with this event |
Stop notification for scroll and other axes.
axis_discrete(time: uint, axis: uint<wl_pointer.axis>, value: fixed, discrete: int)
Argument | Type | Description |
---|---|---|
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 |
Discrete step information for scroll and other axes.
This event allows the client to extend data normally sent using the axis event with discrete value.
error { invalid_axis, invalid_axis_source }
Argument | Value | Description |
---|---|---|
invalid_axis | 0 | client sent invalid axis enumeration value |
invalid_axis_source | 1 | client sent invalid axis source enumeration value |
zwlr_virtual_pointer_manager_v1
This object allows clients to create individual virtual pointer objects.
create_virtual_pointer(seat: object<wl_seat>, id: new_id<zwlr_virtual_pointer_v1>)
Argument | Type | Description |
---|---|---|
seat | object<wl_seat>allow null | |
id | new_id<zwlr_virtual_pointer_v1> |
Creates a new virtual pointer. The optional seat is a suggestion to the compositor.
destroy()
create_virtual_pointer_with_output(seat: object<wl_seat>, output: object<wl_output>, id: new_id<zwlr_virtual_pointer_v1>)
Argument | Type | Description |
---|---|---|
seat | object<wl_seat>allow null | |
output | object<wl_output>allow null | |
id | new_id<zwlr_virtual_pointer_v1> |
Creates a new virtual pointer. The seat and the output arguments are optional. If the seat argument is set, the compositor should assign the input device to the requested seat. If the output argument is set, the compositor should map the input device to the requested output.
Compositor Support
Mutter 46 | KWin 6.2 | Sway 1.9 | COSMIC 1.0.0 | Hyprland 0.42.0 | niri 0.1.8 | Weston 13 | Mir 2.19 | GameScope 3.15.14 | Jay 1.7.0 | |
---|---|---|---|---|---|---|---|---|---|---|
zwlr_virtual_pointer_manager_v1 | x | x | 2 | x | 2 | x | x | 2 | x | 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.