Scoop API

scoop:scoop.window:0.1.0

src/accessibility/text_geometry.scoop

Selected production source · src/accessibility/text_geometry.scoop

1package scoop.window.accessibility
3import scoop.window.accessibility.native.NativeSemanticTextGeometry
5/** One reference, separate from both candidate scenes and published native projections. */
6internal class SemanticTextSnapshot(val native: NativeSemanticTextGeometry): Closeable {
7 private var closed = false
8 init {
9 @Unsafe
10 {
11 native.retain(native.context)
12 }
13 }
14 public override fun close() {
15 if (closed)
16 return
17 closed = true
18 @Unsafe
19 {
20 native.release(native.context)
21 }
22 }