Interface WlPointerEventsV2
- All Superinterfaces:
WlPointerEvents
- All Known Subinterfaces:
WlPointerEventsV3
,WlPointerEventsV4
,WlPointerEventsV5
,WlPointerEventsV6
,WlPointerEventsV7
,WlPointerEventsV8
,WlPointerEventsV9
- All Known Implementing Classes:
Window
The wl_pointer interface represents one or more input devices, such as mice, which control the pointer location and pointer_focus of a seat.
The wl_pointer interface generates motion, enter and leave events for the surfaces that the pointer is located over, and button and axis events for button presses, button releases and scrolling.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
axis
(WlPointerProxy emitter, int time, int axis, Fixed value) axis eventvoid
button
(WlPointerProxy emitter, int serial, int time, int button, int state) pointer button eventvoid
enter
(WlPointerProxy emitter, int serial, WlSurfaceProxy surface, Fixed surfaceX, Fixed surfaceY) enter eventvoid
leave
(WlPointerProxy emitter, int serial, WlSurfaceProxy surface) leave eventvoid
motion
(WlPointerProxy emitter, int time, Fixed surfaceX, Fixed surfaceY) pointer motion event
-
Field Details
-
VERSION
static final int VERSION- See Also:
-
-
Method Details
-
enter
void enter(WlPointerProxy emitter, int serial, @Nonnull WlSurfaceProxy surface, @Nonnull Fixed surfaceX, @Nonnull Fixed surfaceY) enter eventNotification that this seat's pointer is focused on a certain surface.
When a seat's focus enters a surface, the pointer image is undefined and a client should respond to this event by setting an appropriate pointer image with the set_cursor request.
- Specified by:
enter
in interfaceWlPointerEvents
- Parameters:
emitter
- The protocol object that emitted the event.serial
- serial number of the enter eventsurface
- surface entered by the pointersurfaceX
- surface-local x coordinatesurfaceY
- surface-local y coordinate
-
leave
leave eventNotification that this seat's pointer is no longer focused on a certain surface.
The leave notification is sent before the enter notification for the new focus.
- Specified by:
leave
in interfaceWlPointerEvents
- Parameters:
emitter
- The protocol object that emitted the event.serial
- serial number of the leave eventsurface
- surface left by the pointer
-
motion
pointer motion eventNotification of pointer location change. The arguments surface_x and surface_y are the location relative to the focused surface.
- Specified by:
motion
in interfaceWlPointerEvents
- Parameters:
emitter
- The protocol object that emitted the event.time
- timestamp with millisecond granularitysurfaceX
- surface-local x coordinatesurfaceY
- surface-local y coordinate
-
button
pointer button eventMouse button click and release notifications.
The location of the click is given by the last motion or enter event. The time argument is a timestamp with millisecond granularity, with an undefined base.
The button is a button code as defined in the Linux kernel's linux/input-event-codes.h header file, e.g. BTN_LEFT.
Any 16-bit button code value is reserved for future additions to the kernel's event code list. All other button codes above 0xFFFF are currently undefined but may be used in future versions of this protocol.
- Specified by:
button
in interfaceWlPointerEvents
- Parameters:
emitter
- The protocol object that emitted the event.serial
- serial number of the button eventtime
- timestamp with millisecond granularitybutton
- button that produced the eventstate
- physical state of the button
-
axis
axis eventScroll and other axis notifications.
For scroll events (vertical and horizontal scroll axes), the value parameter is the length of a vector along the specified axis in a coordinate space identical to those of motion events, representing a relative movement along the specified axis.
For devices that support movements non-parallel to axes multiple axis events will be emitted.
When applicable, for example for touch pads, the server can choose to emit scroll events where the motion vector is equivalent to a motion event vector.
When applicable, a client can transform its content relative to the scroll distance.
- Specified by:
axis
in interfaceWlPointerEvents
- Parameters:
emitter
- The protocol object that emitted the event.time
- timestamp with millisecond granularityaxis
- axis typevalue
- length of vector in surface-local coordinate space
-