scoop:scoop.window:0.1.0
src/native/status.scoop
Selected production source · src/native/status.scoop
1
package scoop.window3
@Unsafe4
internal 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 -> @Unsafe13
{14
return@withUtf8Bytes created(15
nativeApplicationCreateResult(callback, context, policy, bytes, length),16
"create application"17
)18
}19
}21
@Unsafe22
internal 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: Int32
): Ptr<Unit> =33
created(34
nativeWindowCreateResult(35
application,36
identity,37
title,38
length,39
width,40
height,41
flags,42
owner,43
role44
),45
"create window"46
)