fun queryDragAndDropTarget()

in sample/src/main/kotlin/org/jetbrains/desktop/sample/linux/SkikoSampleLinux.kt [1136:1170]


    fun queryDragAndDropTarget(locationInWindow: LogicalPoint): DragAndDropQueryResponse {
        val response = if (locationInWindow.x < windowContainer.contentArea.size.width / 2) {
            DragAndDropQueryResponse(
                supportedActionsPerMime = listOf(
                    SupportedActionsForMime(
                        supportedMimeType = URI_LIST_MIME_TYPE,
                        supportedActions = setOf(DragAndDropAction.Copy),
                        preferredAction = DragAndDropAction.Copy,
                    ),
                    SupportedActionsForMime(
                        supportedMimeType = TEXT_MIME_TYPE,
                        supportedActions = setOf(DragAndDropAction.Copy, DragAndDropAction.Move),
                        preferredAction = DragAndDropAction.Copy,
                    ),
                ),
            )
        } else {
            DragAndDropQueryResponse(
                supportedActionsPerMime = listOf(
                    SupportedActionsForMime(
                        supportedMimeType = TEXT_MIME_TYPE,
                        supportedActions = setOf(DragAndDropAction.Copy, DragAndDropAction.Move),
                        preferredAction = DragAndDropAction.Copy,
                    ),
                    SupportedActionsForMime(
                        supportedMimeType = URI_LIST_MIME_TYPE,
                        supportedActions = setOf(DragAndDropAction.Copy),
                        preferredAction = DragAndDropAction.Copy,
                    ),
                ),
            )
        }

        return response
    }