scoop:scoop.window:0.1.0
src/accessibility/native_text.scoop
Selected production source · src/accessibility/native_text.scoop
1
package scoop.window.accessibility.native3
/** UTF-8 range query: 1 success, 0 unavailable, -1 invalid argument, -2 native failure. */4
@CLayout5
public struct NativeSemanticTextRange(val start: Long, val end: Long, val status: Int)7
/**8
* Paired native queries matching the published text and accepted scene.9
* Coordinates are window-logical. Functions and synchronous box visitors never enter Scoop.10
* Affinity is 0 upstream or 1 downstream; units 0..3 are grapheme, word, visual and logical line.11
*/12
@CLayout13
public struct NativeSemanticTextGeometry(14
val context: Ptr<Unit>,15
val retain: FunPtr<(Ptr<Unit>) -> Unit>,16
val release: FunPtr<(Ptr<Unit>) -> Unit>,17
val range: FunPtr<(Ptr<Unit>, Long, Int, Int) -> NativeSemanticTextRange>,18
val lineRange: FunPtr<(Ptr<Unit>, Long) -> NativeSemanticTextRange>,19
/** Nonnegative line index; -1 unavailable, -2 invalid argument, -3 native failure. */20
val lineIndex: FunPtr<(Ptr<Unit>, Long, Int) -> Long>,21
val rangeAtPoint: FunPtr<(Ptr<Unit>, Double, Double) -> NativeSemanticTextRange>,22
val boxes: FunPtr<23
(24
Ptr<Unit>,25
Long,26
Long,27
Ptr<Unit>,28
FunPtr<(Ptr<Unit>, Double, Double, Double, Double) -> Unit>29
) -> Int30
>,31
val visibleRange: FunPtr<(Ptr<Unit>) -> NativeSemanticTextRange>32
)