Interface DragSource.DragCancelCallback

All Superinterfaces:
FunctionPointer
Enclosing class:
DragSource
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 DragSource.DragCancelCallback extends FunctionPointer

Functional interface declaration of the DragCancelCallback callback.

See Also:
  • Method Details

    • run

      boolean run(@Nullable Drag drag, DragCancelReason reason)

      Emitted on the drag source when a drag has failed.

      The signal handler may handle a failed drag operation based on the type of error. It should return true if the failure has been handled and the default "drag operation failed" animation should not be shown.

    • upcall

      default int upcall(MemorySegment sourceDragSource, MemorySegment drag, int reason)
      The upcall method is called from native code. The parameters are marshaled and run(Drag, DragCancelReason) is executed.
    • toCallback

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