Interface Sidebar.DropCallback
- All Superinterfaces:
FunctionPointer
- Enclosing class:
Sidebar
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Functional interface declaration of the DropCallback callback.
- Since:
- 1.9
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanrun(int index, @Nullable Value value, Set<DragAction> preferredAction) Emitted when content is dropped onto the item atindex.default MemorySegmenttoCallback(Arena arena) Creates a native function pointer to theupcall(MemorySegment, int, MemorySegment, int)method.default intupcall(MemorySegment sourceSidebar, int index, MemorySegment value, int preferredAction) Theupcallmethod is called from native code.
-
Method Details
-
run
Emitted when content is dropped onto the item at
index.The content must be of one of the types set up via
Sidebar.setupDropTarget(Set, Type[]).See
Gtk.DropTarget::drop. -
upcall
default int upcall(MemorySegment sourceSidebar, int index, MemorySegment value, int preferredAction) Theupcallmethod is called from native code. The parameters are marshaled andrun(int, Value, Set)is executed. -
toCallback
Creates a native function pointer to theupcall(MemorySegment, int, MemorySegment, int)method.- Specified by:
toCallbackin interfaceFunctionPointer- Parameters:
arena- the arena in which the function pointer is allocated- Returns:
- the native function pointer
-