Interface Gesture.BeginCallback

All Superinterfaces:
FunctionPointer
Enclosing class:
Gesture
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface Gesture.BeginCallback extends FunctionPointer

Functional interface declaration of the BeginCallback callback.

See Also:
  • Method Details

    • run

      void run(@Nullable EventSequence sequence)

      Emitted when the gesture is recognized.

      This means the number of touch sequences matches Gtk.Gesture:n-points.

      Note: These conditions may also happen when an extra touch (eg. a third touch on a 2-touches gesture) is lifted, in that situation sequence won't pertain to the current set of active touches, so don't rely on this being true.

    • upcall

      default void upcall(MemorySegment sourceGesture, MemorySegment sequence)
      The upcall method is called from native code. The parameters are marshaled and run(EventSequence) is executed.
    • toCallback

      default MemorySegment toCallback(Arena arena)
      Creates a native function pointer to the upcall(MemorySegment, MemorySegment) method.
      Specified by:
      toCallback in interface FunctionPointer
      Parameters:
      arena - the arena in which the function pointer is allocated
      Returns:
      the native function pointer