Class ZwpTabletPadV2Resource
- All Implemented Interfaces:
WaylandObject
A pad device is a set of buttons, rings and strips usually physically present on the tablet device itself. Some exceptions exist where the pad device is physically detached, e.g. the Wacom ExpressKey Remote.
Pad devices have no axes that control the cursor and are generally auxiliary devices to the tool devices used on the tablet surface.
A pad device has a number of static characteristics, e.g. the number of rings. These capabilities are sent in an event sequence after the wp_tablet_seat.pad_added event before any actual events from this pad. This initial event sequence is terminated by a wp_tablet_pad.done event.
All pad features (buttons, rings and strips) are logically divided into groups and all pads have at least one group. The available groups are notified through the wp_tablet_pad.group event; the compositor will emit one event per group before emitting wp_tablet_pad.done.
Groups may have multiple modes. Modes allow clients to map multiple actions to a single pad feature. Only one mode can be active per group, although different groups may have different active modes.
-
Field Summary
FieldsFields inherited from class org.freedesktop.wayland.server.Resource
wlResourcePtr
-
Constructor Summary
ConstructorsConstructorDescriptionZwpTabletPadV2Resource
(MemorySegment pointer) ZwpTabletPadV2Resource
(Client client, int version, int id, ZwpTabletPadV2Requests implementation) -
Method Summary
Modifier and TypeMethodDescriptionvoid
button
(int time, int button, int state) physical button statevoid
buttons
(int buttons) buttons announcedvoid
done()
pad description event sequence completevoid
enter
(int serial, ZwpTabletV2Resource tablet, WlSurfaceResource surface) enter eventvoid
group
(int padGroup) group announcedvoid
leave
(int serial, WlSurfaceResource surface) leave eventvoid
path to the devicevoid
removed()
pad removed eventMethods inherited from class org.freedesktop.wayland.server.Resource
addDestroyListener, destroy, equals, getClient, getId, getImplementation, getPointer, getVersion, hashCode, postError, postEvent, postEvent, register, unregister
-
Field Details
-
INTERFACE_NAME
- See Also:
-
-
Constructor Details
-
ZwpTabletPadV2Resource
public ZwpTabletPadV2Resource(Client client, int version, int id, ZwpTabletPadV2Requests implementation) -
ZwpTabletPadV2Resource
-
-
Method Details
-
group
public void group(int padGroup) group announcedSent on wp_tablet_pad initialization to announce available groups. One event is sent for each pad group available.
This event is sent in the initial burst of events before the wp_tablet_pad.done event. At least one group will be announced.
- Parameters:
padGroup
-
-
path
path to the deviceA system-specific device path that indicates which device is behind this wp_tablet_pad. This information may be used to gather additional information about the device, e.g. through libwacom.
The format of the path is unspecified, it may be a device node, a sysfs path, or some other identifier. It is up to the client to identify the string provided.
This event is sent in the initial burst of events before the wp_tablet_pad.done event.
- Parameters:
path
- path to local device
-
buttons
public void buttons(int buttons) buttons announcedSent on wp_tablet_pad initialization to announce the available buttons.
This event is sent in the initial burst of events before the wp_tablet_pad.done event. This event is only sent when at least one button is available.
- Parameters:
buttons
- the number of buttons
-
done
public void done()pad description event sequence completeThis event signals the end of the initial burst of descriptive events. A client may consider the static description of the pad to be complete and finalize initialization of the pad.
-
button
public void button(int time, int button, int state) physical button stateSent whenever the physical state of a button changes.
- Parameters:
time
- the time of the event with millisecond granularitybutton
- the index of the button that changed statestate
-
-
enter
public void enter(int serial, @Nonnull ZwpTabletV2Resource tablet, @Nonnull WlSurfaceResource surface) enter eventNotification that this pad is focused on the specified surface.
- Parameters:
serial
- serial number of the enter eventtablet
- the tablet the pad is attached tosurface
- surface the pad is focused on
-
leave
leave eventNotification that this pad is no longer focused on the specified surface.
- Parameters:
serial
- serial number of the leave eventsurface
- surface the pad is no longer focused on
-
removed
public void removed()pad removed eventSent when the pad has been removed from the system. When a tablet is removed its pad(s) will be removed too.
When this event is received, the client must destroy all rings, strips and groups that were offered by this pad, and issue wp_tablet_pad.destroy the pad itself.
-