Scoop API

scoop:scoop.window.asyncio:0.1.0

platform/darwin/host.scoop

Selected production source · platform/darwin/host.scoop

1package scoop.window.asyncio
3import scoop.asyncio.host.*
4import scoop.window.native.*
6@Unsafe
7internal fun platformWatch(
8 host: ApplicationHost,
9 notification: EventLoopNotification,
10 ready: () -> Unit
11): ApplicationWatch =
12 when (notification) {
13 case ReadableDescriptor(val descriptor) -> host.watchReadable(descriptor, ready)
14 case WindowsEvent(_) -> throw IllegalArgumentException(
15 Some("AppKit requires a readable descriptor")
16 )
17 }