setSelection

fun setSelection(sessionHandle: DBusPath, mimeTypes: List<String>): Result<Unit>(source)

Sets the session as the owner of the clipboard for the given MIME types. The session will receive observeSelectionTransfer events when another client requests clipboard content in one of the advertised formats.

To transfer files, use the application/vnd.portal.filetransfer MIME type together with the File Transfer portal.

May only be called after clipboard access was granted by starting the session.

Return

Result indicating success or failure.

Parameters

sessionHandle

Object path for the session.

mimeTypes

List of MIME types the session has clipboard content for.