Scoop API

scoop:scoop.window:0.1.0

src/native/status.scoop

Selected production source · src/native/status.scoop

1package scoop.window
3@Unsafe
4internal fun nativeApplicationCreate(
5 callback: FunPtr<(Ptr<Unit>, Long, Int) -> Int>,
6 context: Ptr<Unit>,
7 policy: Int,
8 applicationId: String?
9): Ptr<Unit> =
10 (applicationId ?: "").withUtf8Bytes {
11 bytes,
12 length -> @Unsafe
13 {
14 return@withUtf8Bytes created(
15 nativeApplicationCreateResult(callback, context, policy, bytes, length),
16 "create application"
17 )
18 }
19 }
21@Unsafe
22internal fun nativeWindowCreate(
23 application: Ptr<Unit>,
24 identity: Long,
25 title: Ptr<UInt8>,
26 length: Long,
27 width: Double,
28 height: Double,
29 flags: Int,
30 owner: Ptr<Unit>?,
31 role: Int
32): Ptr<Unit> =
33 created(
34 nativeWindowCreateResult(
35 application,
36 identity,
37 title,
38 length,
39 width,
40 height,
41 flags,
42 owner,
43 role
44 ),
45 "create window"
46 )