Class TouchpadEvent

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class TouchpadEvent extends Event

An event related to a gesture on a touchpad device.

Unlike touchscreens, where the windowing system sends basic sequences of begin, update, end events, and leaves gesture recognition to the clients, touchpad gestures are typically processed by the system, resulting in these events.

  • Constructor Details

    • TouchpadEvent

      public TouchpadEvent(MemorySegment address)
      Create a TouchpadEvent instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
  • Method Details

    • getType

      public static @Nullable Type getType()
      Get the GType of the TouchpadEvent class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • asParent

      protected TouchpadEvent asParent()
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class Event
      Returns:
      the instance as if it were its parent type
    • getDeltas

      public void getDeltas(Out<Double> dx, Out<Double> dy)
      Extracts delta information from a touchpad event.
      Parameters:
      dx - return location for x
      dy - return location for y
    • getGesturePhase

      public TouchpadGesturePhase getGesturePhase()
      Extracts the touchpad gesture phase from a touchpad event.
      Returns:
      the gesture phase of this TouchpadEvent
    • getNFingers

      public int getNFingers()
      Extracts the number of fingers from a touchpad event.
      Returns:
      the number of fingers for this TouchpadEvent
    • getPinchAngleDelta

      public double getPinchAngleDelta()
      Extracts the angle delta from a touchpad pinch event.
      Returns:
      the angle delta of this TouchpadEvent
    • getPinchScale

      public double getPinchScale()
      Extracts the scale from a touchpad pinch event.
      Returns:
      the scale of this TouchpadEvent