scoop:scoop.window:0.1.0
src/native/abi.scoop
Selected production source · src/native/abi.scoop
1
package scoop.window3
@CLayout4
internal struct NativeSnapshot(5
val width: Double,6
val height: Double,7
val pixelWidth: Double,8
val pixelHeight: Double,9
val scale: Double,10
val x: Double,11
val y: Double,12
val outerWidth: Double,13
val outerHeight: Double,14
val visible: Int,15
val occluded: Int,16
val focused: Int,17
val minimized: Int,18
val maximized: Int,19
val fullscreen: Int,20
val dark: Int21
) {22
fun metrics(): WindowMetrics = WindowMetrics(23
LogicalSize(width, height),24
PhysicalSize(pixelWidth.toInt(), pixelHeight.toInt()),25
scale26
)27
}29
@Extern(name = "scoop_window_application_create")30
internal fun nativeApplicationCreateResult(31
callback: FunPtr<(Ptr<Unit>, Long, Int) -> Int>,32
context: Ptr<Unit>,33
policy: Int,34
applicationId: Ptr<UInt8>,35
length: Long36
): NativeCreateResult38
@Extern(name = "scoop_window_application_run")39
internal fun nativeApplicationRun(application: Ptr<Unit>): Int41
@Extern(name = "scoop_window_application_stop")42
internal fun nativeApplicationStop(application: Ptr<Unit>)44
@Extern(name = "scoop_window_application_destroy")45
internal fun nativeApplicationDestroy(application: Ptr<Unit>)47
@Extern(name = "scoop_window_create")48
internal fun nativeWindowCreateResult(49
application: Ptr<Unit>,50
identity: Long,51
title: Ptr<UInt8>,52
length: Long,53
width: Double,54
height: Double,55
flags: Int,56
owner: Ptr<Unit>?,57
role: Int58
): NativeCreateResult60
@Extern(name = "scoop_window_snapshot")61
internal fun nativeWindowSnapshot(window: Ptr<Unit>): NativeSnapshot63
@Extern(name = "scoop_window_destroy")64
internal fun nativeWindowDestroy(window: Ptr<Unit>)66
@Extern(name = "scoop_window_title")67
internal fun nativeWindowTitle(window: Ptr<Unit>, text: Ptr<UInt8>, length: Long): Long69
@Extern(name = "scoop_window_size")70
internal fun nativeWindowSize(window: Ptr<Unit>, width: Double, height: Double): Long72
@Extern(name = "scoop_window_visible")73
internal fun nativeWindowVisible(window: Ptr<Unit>, visible: Int): Long75
@Extern(name = "scoop_window_focus")76
internal fun nativeWindowFocus(window: Ptr<Unit>): Long