Scoop API

scoop:scoop.ui:0.1.0

src/interaction/native_drop.scoop

Selected production source · src/interaction/native_drop.scoop

1package scoop.ui
3import scoop.surface.InputArea
4import scoop.window.*
6/** Receives native drops through the root's accepted input scene and logical parent path. */
7public fun ComponentScope.dropTarget(
8 area: InputArea,
9 handlers: DropAreaHandlers,
10 enabled: Boolean = true
11): DropArea =
12 createDropArea(area, handlers, enabled) {
13 callbacks ->
14 val target = nativeWindow.registerDropTarget(callbacks)
15 target.periodicUpdates = true
16 target
17 }