Scoop API

scoop:scoop.asyncio:0.1.0

src/native_tty.scoop

Selected production source · src/native_tty.scoop

1package scoop.asyncio
3@CLayout
4internal struct NativeTtySize(
5 val columns: Long,
6 val rows: Long,
7 val widthPixels: Long,
8 val heightPixels: Long
9)
11@CLayout
12internal struct NativeTtySizeResult(val size: NativeTtySize, val status: NativeIoStatus)
14@Extern(name = "scoop_io_tty_open")
15internal fun nativeTtyOpen(loop: Ptr<Unit>, id: Long): Int
17@Extern(name = "scoop_io_tty_close")
18internal fun nativeTtyClose(tty: Ptr<Unit>, id: Long): Int
20@Extern(name = "scoop_io_tty_receive")
21internal fun nativeTtyReceive(
22 tty: Ptr<Unit>,
23 id: Long,
24 bytes: Ptr<Byte>?,
25 count: Long,
26 seconds: Long,
27 nanos: Int
28): Int
30@Extern(name = "scoop_io_tty_write")
31internal fun nativeTtyWrite(tty: Ptr<Unit>, id: Long, bytes: Ptr<Byte>?, count: Long): Int
33@Extern(name = "scoop_io_tty_cancel_read")
34internal fun nativeTtyCancelRead(tty: Ptr<Unit>, id: Long)
36@Extern(name = "scoop_io_tty_cancel_write")
37internal fun nativeTtyCancelWrite(tty: Ptr<Unit>, id: Long)
39@Extern(name = "scoop_io_tty_set_raw")
40internal fun nativeTtyRaw(tty: Ptr<Unit>, enabled: Boolean): NativeIoStatus
42@Extern(name = "scoop_io_tty_is_raw")
43internal fun nativeTtyIsRaw(tty: Ptr<Unit>): Boolean
45@Extern(name = "scoop_io_tty_size")
46internal fun nativeTtySize(tty: Ptr<Unit>): NativeTtySizeResult