@opentui/core 0.5.16 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NativeScene.d.ts +185 -0
- package/NativeSession.d.ts +134 -0
- package/NativeSpanFeed.d.ts +1 -4
- package/README.md +5 -3
- package/Renderable.d.ts +162 -67
- package/animation/Timeline.d.ts +11 -1
- package/assets/typescriptreact/highlights.scm +758 -0
- package/assets/typescriptreact/tree-sitter-tsx.wasm +0 -0
- package/buffer.d.ts +76 -36
- package/chunk-bun-s01c2jyn.js +24914 -0
- package/chunk-bun-s01c2jyn.js.map +69 -0
- package/chunk-bun-tsc14mt5.js +12515 -0
- package/chunk-bun-tsc14mt5.js.map +35 -0
- package/chunk-node-df90qrqc.js +12495 -0
- package/chunk-node-df90qrqc.js.map +34 -0
- package/chunk-node-hjr2tm60.js +24913 -0
- package/chunk-node-hjr2tm60.js.map +69 -0
- package/edit-buffer.d.ts +18 -20
- package/editor-view.d.ts +13 -5
- package/image.d.ts +18 -7
- package/index.bun.js +2387 -2899
- package/index.bun.js.map +20 -22
- package/index.d.ts +6 -2
- package/index.node.js +2387 -2899
- package/index.node.js.map +20 -24
- package/lib/buffer-access.d.ts +6 -0
- package/lib/clipboard.d.ts +0 -9
- package/lib/extmarks.d.ts +4 -1
- package/lib/tree-sitter/parsers-config.d.ts +9 -9
- package/native-abi.generated.d.ts +5496 -0
- package/node-assets.js +6 -2
- package/node-assets.js.map +3 -3
- package/package.json +10 -10
- package/parser.worker.js +14 -2
- package/parser.worker.js.map +3 -3
- package/renderables/ASCIIFont.d.ts +5 -5
- package/renderables/Box.d.ts +8 -8
- package/renderables/Code.d.ts +6 -2
- package/renderables/Diff.d.ts +4 -2
- package/renderables/EditBufferRenderable.d.ts +8 -10
- package/renderables/EmbeddedTerminal.d.ts +4 -2
- package/renderables/FrameBuffer.d.ts +3 -1
- package/renderables/Image.d.ts +3 -1
- package/renderables/Input.d.ts +0 -5
- package/renderables/LineNumberRenderable.d.ts +3 -1
- package/renderables/Markdown.d.ts +5 -2
- package/renderables/ScrollBar.d.ts +7 -1
- package/renderables/ScrollBox.d.ts +4 -6
- package/renderables/Select.d.ts +2 -1
- package/renderables/Slider.d.ts +7 -5
- package/renderables/TabSelect.d.ts +2 -1
- package/renderables/Text.d.ts +5 -4
- package/renderables/TextBufferRenderable.d.ts +10 -9
- package/renderables/TextNode.d.ts +8 -0
- package/renderables/TextTable.d.ts +1 -1
- package/renderables/Textarea.d.ts +1 -1
- package/renderables/index.d.ts +1 -1
- package/renderer.d.ts +90 -67
- package/session-buffer.d.ts +4 -0
- package/syntax-style.d.ts +9 -7
- package/testing/harness.d.ts +33 -0
- package/testing/manual-clock.d.ts +2 -0
- package/testing/test-renderer.d.ts +3 -0
- package/testing/test-streams.d.ts +20 -2
- package/testing.bun.js +60 -49
- package/testing.bun.js.map +6 -6
- package/testing.js +60 -49
- package/testing.js.map +6 -6
- package/tests/native-log-worker-child.d.ts +1 -0
- package/tests/native-symbol-stubs.d.ts +5 -0
- package/tests/yoga-callback-boundary-child.d.ts +1 -0
- package/tests/yoga-default-config-worker-child.d.ts +1 -0
- package/text-buffer-view.d.ts +11 -4
- package/text-buffer.d.ts +24 -9
- package/types.d.ts +4 -4
- package/yoga.bun.js +6 -2
- package/yoga.bun.js.map +1 -1
- package/yoga.d.ts +91 -56
- package/yoga.internal.d.ts +78 -0
- package/yoga.js +6 -2
- package/yoga.js.map +1 -1
- package/zig-structs.d.ts +13 -98
- package/zig.d.ts +1304 -583
- package/chunk-bun-3qwevekk.js +0 -10531
- package/chunk-bun-3qwevekk.js.map +0 -32
- package/chunk-bun-6rvkxs1v.js +0 -18862
- package/chunk-bun-6rvkxs1v.js.map +0 -64
- package/chunk-node-f3yste6w.js +0 -10530
- package/chunk-node-f3yste6w.js.map +0 -32
- package/chunk-node-tfvyz31s.js +0 -18844
- package/chunk-node-tfvyz31s.js.map +0 -63
package/zig.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { type FFICallbackInstance, type Pointer } from "./platform/ffi.js";
|
|
2
|
-
import { type CursorStyle, type CursorStyleOptions, type SelectionOccupancy, type SelectionBehavior, type
|
|
1
|
+
import { type FFICallbackInstance, type Pointer, type PointerInput } from "./platform/ffi.js";
|
|
2
|
+
import { type CursorStyle, type CursorStyleOptions, type SelectionOccupancy, type SelectionBehavior, type DebugOverlayCorner, type WidthMethod, type TerminalCapabilities, type Highlight, type LineInfo, type MousePointerStyle, type ImageRenderProtocol } from "./types.js";
|
|
3
3
|
export type { LineInfo, AllocatorStats, AudioStreamCreateOptions, BuildOptions, NativeAudioCaptureStats, NativeAudioStreamStats, NativeRenderStats, };
|
|
4
4
|
import { RGBA } from "./lib/RGBA.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { type StyledText } from "./lib/styled-text.js";
|
|
6
|
+
import { type MeasureFunction } from "./yoga.js";
|
|
7
|
+
import { YogaHost } from "./yoga.internal.js";
|
|
7
8
|
import type { NativeSpanFeedOptions, NativeSpanFeedStats, ReserveInfo, AudioCreateOptions, AudioStartOptions, AudioVoiceOptions, AudioStreamCreateOptions, NativeAudioStreamCloseReason as NativeAudioStreamCloseReasonType, NativeAudioStreamFormat as NativeAudioStreamFormatType, NativeAudioStreamState as NativeAudioStreamStateType, NativeAudioStreamStats, NativeAudioCaptureStats, AudioStats, BuildOptions, AllocatorStats, NativeRenderStats, NativeImageInfo } from "./zig-structs.js";
|
|
8
9
|
export declare const NativeAudioStreamState: {
|
|
9
10
|
readonly Initializing: 0;
|
|
@@ -27,21 +28,648 @@ export declare const NativeAudioStreamFormat: {
|
|
|
27
28
|
readonly Pcm: 3;
|
|
28
29
|
};
|
|
29
30
|
export type NativeAudioStreamFormat = NativeAudioStreamFormatType;
|
|
30
|
-
export declare const MAX_LINK_URL_BYTES = 512;
|
|
31
31
|
export type NativeHandle<T extends string> = Pointer & {
|
|
32
32
|
readonly __nativeHandle: T;
|
|
33
33
|
};
|
|
34
|
-
|
|
35
|
-
export type
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
export
|
|
40
|
-
export
|
|
41
|
-
|
|
34
|
+
declare const nativeContextBrand: unique symbol;
|
|
35
|
+
export type NativeContextHandle = {
|
|
36
|
+
readonly [nativeContextBrand]: true;
|
|
37
|
+
};
|
|
38
|
+
/** Native hyperlink URL slot bound. Longer URLs fail allocation. */
|
|
39
|
+
export declare const MAX_LINK_URL_BYTES = 512;
|
|
40
|
+
export interface NativeContextOptions {
|
|
41
|
+
objectCapacity: number;
|
|
42
|
+
renderCellsMax: number;
|
|
43
|
+
}
|
|
44
|
+
export interface ContextObjectHandle {
|
|
45
|
+
readonly context: NativeContextHandle;
|
|
46
|
+
readonly contextId: bigint;
|
|
47
|
+
readonly slot: number;
|
|
48
|
+
readonly generation: number;
|
|
49
|
+
}
|
|
50
|
+
declare const contextResourceBrand: unique symbol;
|
|
51
|
+
export type SessionHandle = ContextObjectHandle & {
|
|
52
|
+
readonly [contextResourceBrand]: "session";
|
|
53
|
+
};
|
|
54
|
+
export type ContextBufferHandle = ContextObjectHandle & {
|
|
55
|
+
readonly [contextResourceBrand]: "buffer";
|
|
56
|
+
};
|
|
57
|
+
export type SceneNodeHandle = ContextObjectHandle & {
|
|
58
|
+
readonly [contextResourceBrand]: "scene_node";
|
|
59
|
+
};
|
|
60
|
+
export type ContextEditBufferHandle = ContextObjectHandle & {
|
|
61
|
+
readonly [contextResourceBrand]: "edit_buffer";
|
|
62
|
+
};
|
|
63
|
+
export type ContextEditorViewHandle = ContextObjectHandle & {
|
|
64
|
+
readonly [contextResourceBrand]: "editor_view";
|
|
65
|
+
};
|
|
66
|
+
export type ContextSyntaxStyleHandle = ContextObjectHandle & {
|
|
67
|
+
readonly [contextResourceBrand]: "syntax_style";
|
|
68
|
+
};
|
|
69
|
+
export type ContextTextBufferHandle = ContextObjectHandle & {
|
|
70
|
+
readonly [contextResourceBrand]: "text_buffer";
|
|
71
|
+
};
|
|
72
|
+
export type ContextTextBufferViewHandle = ContextObjectHandle & {
|
|
73
|
+
readonly [contextResourceBrand]: "text_buffer_view";
|
|
74
|
+
};
|
|
75
|
+
export type ContextImageHandle = ContextObjectHandle & {
|
|
76
|
+
readonly [contextResourceBrand]: "image";
|
|
77
|
+
};
|
|
78
|
+
export type ContextImagePixelsHandle = ContextObjectHandle & {
|
|
79
|
+
readonly [contextResourceBrand]: "image_pixels";
|
|
80
|
+
};
|
|
81
|
+
export type ContextUnicodeHandle = ContextObjectHandle & {
|
|
82
|
+
readonly [contextResourceBrand]: "unicode";
|
|
83
|
+
};
|
|
84
|
+
export type ContextEmbeddedTerminalHandle = ContextObjectHandle & {
|
|
85
|
+
readonly [contextResourceBrand]: "embedded_terminal";
|
|
86
|
+
};
|
|
87
|
+
export type SessionBuffer = "current" | "next";
|
|
88
|
+
export interface NativeContextEditBufferOptions {
|
|
89
|
+
widthMethod?: WidthMethod | "no-zwj";
|
|
90
|
+
}
|
|
91
|
+
export interface NativeEditBufferInfo {
|
|
92
|
+
contentEpoch: bigint;
|
|
93
|
+
byteLength: number;
|
|
94
|
+
lineCount: number;
|
|
95
|
+
cursor: LogicalCursor;
|
|
96
|
+
canUndo: boolean;
|
|
97
|
+
canRedo: boolean;
|
|
98
|
+
tabWidth: number;
|
|
99
|
+
}
|
|
100
|
+
export interface NativeTextBufferInfo {
|
|
101
|
+
contentEpoch: bigint;
|
|
102
|
+
byteLength: number;
|
|
103
|
+
textLength: number;
|
|
104
|
+
lineCount: number;
|
|
105
|
+
highlightCount: number;
|
|
106
|
+
tabWidth: number;
|
|
107
|
+
}
|
|
108
|
+
export interface NativeEncodedStyledText {
|
|
109
|
+
bytes: Uint8Array;
|
|
110
|
+
records: Uint32Array;
|
|
111
|
+
count: number;
|
|
112
|
+
urlBytes: Uint8Array;
|
|
113
|
+
}
|
|
114
|
+
export declare enum NativeTextViewCommand {
|
|
115
|
+
WrapWidth = 0,
|
|
116
|
+
WrapMode = 1,
|
|
117
|
+
FirstLineOffset = 2,
|
|
118
|
+
TabIndicator = 3,
|
|
119
|
+
Truncate = 4,
|
|
120
|
+
TextAlign = 5
|
|
121
|
+
}
|
|
122
|
+
export declare enum NativeEditCommand {
|
|
123
|
+
DeleteForward = 0,
|
|
124
|
+
Backspace = 1,
|
|
125
|
+
NewLine = 2,
|
|
126
|
+
DeleteLine = 3,
|
|
127
|
+
MoveLeft = 4,
|
|
128
|
+
MoveRight = 5,
|
|
129
|
+
MoveUp = 6,
|
|
130
|
+
MoveDown = 7,
|
|
131
|
+
GotoLine = 8,
|
|
132
|
+
CursorOffset = 9,
|
|
133
|
+
Clear = 10,
|
|
134
|
+
ClearHistory = 11,
|
|
135
|
+
DebugRope = 12
|
|
136
|
+
}
|
|
137
|
+
export declare enum NativeEditPositionQuery {
|
|
138
|
+
Cursor = 0,
|
|
139
|
+
NextWord = 1,
|
|
140
|
+
PrevWord = 2,
|
|
141
|
+
Eol = 3,
|
|
142
|
+
Offset = 4,
|
|
143
|
+
Coords = 5,
|
|
144
|
+
LineStart = 6
|
|
145
|
+
}
|
|
146
|
+
export declare enum NativeEditorStyleMask {
|
|
147
|
+
Foreground = 1,
|
|
148
|
+
Background = 2,
|
|
149
|
+
Attributes = 4,
|
|
150
|
+
All = 7
|
|
151
|
+
}
|
|
152
|
+
export interface NativeEditorStyle {
|
|
153
|
+
fg?: RGBA | null;
|
|
154
|
+
bg?: RGBA | null;
|
|
155
|
+
attributes?: number | null;
|
|
156
|
+
}
|
|
157
|
+
export declare enum NativeEditHighlightOperation {
|
|
158
|
+
AddLine = 0,
|
|
159
|
+
AddRange = 1,
|
|
160
|
+
RemoveRef = 2,
|
|
161
|
+
ClearLine = 3,
|
|
162
|
+
ClearAll = 4
|
|
163
|
+
}
|
|
164
|
+
export interface NativeEditorViewport {
|
|
165
|
+
x: number;
|
|
166
|
+
y: number;
|
|
167
|
+
width: number;
|
|
168
|
+
height: number;
|
|
169
|
+
}
|
|
170
|
+
export declare enum NativeEditorCommand {
|
|
171
|
+
MoveUp = 0,
|
|
172
|
+
MoveDown = 1,
|
|
173
|
+
GotoLineEnd = 2,
|
|
174
|
+
DeleteSelection = 3,
|
|
175
|
+
CursorOffset = 4,
|
|
176
|
+
WrapMode = 5,
|
|
177
|
+
TabIndicator = 6
|
|
178
|
+
}
|
|
179
|
+
export declare enum NativeEditorSelectionOperation {
|
|
180
|
+
Set = 0,
|
|
181
|
+
Update = 1,
|
|
182
|
+
Reset = 2,
|
|
183
|
+
Local = 3,
|
|
184
|
+
LocalUpdate = 4,
|
|
185
|
+
LocalReset = 5,
|
|
186
|
+
Cell = 6,
|
|
187
|
+
Occupancy = 7,
|
|
188
|
+
Inclusive = 8,
|
|
189
|
+
Colors = 9
|
|
190
|
+
}
|
|
191
|
+
export interface NativeEditorSelection {
|
|
192
|
+
operation: NativeEditorSelectionOperation;
|
|
193
|
+
behavior?: number;
|
|
194
|
+
start?: number;
|
|
195
|
+
end?: number;
|
|
196
|
+
anchorX?: number;
|
|
197
|
+
anchorY?: number;
|
|
198
|
+
focusX?: number;
|
|
199
|
+
focusY?: number;
|
|
200
|
+
updateCursor?: boolean;
|
|
201
|
+
followCursor?: boolean;
|
|
202
|
+
fg?: RGBA | null;
|
|
203
|
+
bg?: RGBA | null;
|
|
204
|
+
}
|
|
205
|
+
export interface NativeEditorViewInfo {
|
|
206
|
+
virtualLineCount: number;
|
|
207
|
+
totalVirtualLineCount: number;
|
|
208
|
+
selection: {
|
|
209
|
+
start: number;
|
|
210
|
+
end: number;
|
|
211
|
+
} | null;
|
|
212
|
+
selectionOccupancy: SelectionOccupancy;
|
|
213
|
+
}
|
|
214
|
+
export declare enum NativeEditorPositionQuery {
|
|
215
|
+
Cursor = 0,
|
|
216
|
+
NextWord = 1,
|
|
217
|
+
PrevWord = 2,
|
|
218
|
+
Eol = 3,
|
|
219
|
+
VisualSol = 4,
|
|
220
|
+
VisualEol = 5
|
|
221
|
+
}
|
|
222
|
+
export declare enum NativeEditEvent {
|
|
223
|
+
CursorChanged = 1,
|
|
224
|
+
ContentChanged = 2,
|
|
225
|
+
HistoryCursorChanged = 4
|
|
226
|
+
}
|
|
227
|
+
export type NativeEditEventName = "cursor-changed" | "content-changed" | "cursorChanged";
|
|
228
|
+
export interface NativeSceneEditorOptions {
|
|
229
|
+
showCursor: boolean;
|
|
230
|
+
style: "block" | "line" | "underline" | "default";
|
|
231
|
+
blinking: boolean;
|
|
232
|
+
color: RGBA;
|
|
233
|
+
cursor?: MousePointerStyle;
|
|
234
|
+
}
|
|
235
|
+
export interface NativeEditorReplacement {
|
|
236
|
+
deleted: boolean;
|
|
237
|
+
inserted: boolean;
|
|
238
|
+
}
|
|
239
|
+
export interface NativeSceneBoxDetails {
|
|
240
|
+
title?: string;
|
|
241
|
+
bottomTitle?: string;
|
|
242
|
+
titleAlignment: "left" | "center" | "right";
|
|
243
|
+
bottomTitleAlignment: "left" | "center" | "right";
|
|
244
|
+
titleColor?: RGBA;
|
|
245
|
+
customBorderChars?: Uint32Array;
|
|
246
|
+
}
|
|
247
|
+
export interface NativeScenePaint {
|
|
248
|
+
zIndex: number;
|
|
249
|
+
opacity: number;
|
|
250
|
+
translateX: number;
|
|
251
|
+
translateY: number;
|
|
252
|
+
border: number;
|
|
253
|
+
shouldFill: boolean;
|
|
254
|
+
backgroundColor: RGBA;
|
|
255
|
+
borderColor: RGBA;
|
|
256
|
+
borderStyle: "single" | "double" | "rounded" | "heavy";
|
|
257
|
+
focusable: boolean;
|
|
258
|
+
focusedBorderColor: RGBA;
|
|
259
|
+
}
|
|
260
|
+
export type NativeScenePaintUpdate = Partial<NativeScenePaint> & {
|
|
261
|
+
resetBorderCharacters?: true;
|
|
262
|
+
};
|
|
263
|
+
export declare const NATIVE_SCENE_MUTATIONS_MAX: 4096;
|
|
264
|
+
export declare enum NativeStyleGroup {
|
|
265
|
+
Enum,
|
|
266
|
+
Float,
|
|
267
|
+
Value,
|
|
268
|
+
Border,
|
|
269
|
+
Dimension
|
|
270
|
+
}
|
|
271
|
+
export declare enum NativeStyleFlags {
|
|
272
|
+
None,
|
|
273
|
+
DisableFlexShrink
|
|
274
|
+
}
|
|
275
|
+
/** ENUM/FLOAT/DIMENSION writes occupy this unused-edge slot. */
|
|
276
|
+
export declare const NATIVE_EDGE_NONE: 0;
|
|
277
|
+
export declare enum NativeBorder {
|
|
278
|
+
None,
|
|
279
|
+
Left,
|
|
280
|
+
Bottom,
|
|
281
|
+
Right,
|
|
282
|
+
Top,
|
|
283
|
+
All
|
|
284
|
+
}
|
|
285
|
+
export interface NativeSceneLayout {
|
|
286
|
+
left: number;
|
|
287
|
+
top: number;
|
|
288
|
+
right: number;
|
|
289
|
+
bottom: number;
|
|
290
|
+
width: number;
|
|
291
|
+
height: number;
|
|
292
|
+
screenX: number;
|
|
293
|
+
screenY: number;
|
|
294
|
+
}
|
|
295
|
+
export interface NativeSceneFrameOptions {
|
|
296
|
+
background: RGBA;
|
|
297
|
+
useMouse: boolean;
|
|
298
|
+
excludedHitNum: number;
|
|
299
|
+
maxLayoutRounds: number;
|
|
300
|
+
maxHostRequests: number;
|
|
301
|
+
preserveUnwritten?: boolean;
|
|
302
|
+
}
|
|
303
|
+
export declare enum NativeSceneHook {
|
|
304
|
+
Update,
|
|
305
|
+
Resize,
|
|
306
|
+
LayoutChanged,
|
|
307
|
+
RenderBefore,
|
|
308
|
+
RenderAfter,
|
|
309
|
+
RenderSelf,
|
|
310
|
+
IdleUpdate
|
|
311
|
+
}
|
|
312
|
+
export declare enum NativeSceneFrame {
|
|
313
|
+
Done,
|
|
314
|
+
Update,
|
|
315
|
+
Resize,
|
|
316
|
+
LayoutChanged,
|
|
317
|
+
Record,
|
|
318
|
+
Yield
|
|
319
|
+
}
|
|
320
|
+
export declare enum NativeScenePaintPhase {
|
|
321
|
+
Before,
|
|
322
|
+
Self,
|
|
323
|
+
After
|
|
324
|
+
}
|
|
325
|
+
/** One node whose paint hooks a RECORD request asks the host to record, in paint order. */
|
|
326
|
+
export interface NativeScenePaintSlot {
|
|
327
|
+
readonly node: SceneNodeHandle;
|
|
328
|
+
readonly num: number;
|
|
329
|
+
/** RenderBefore, RenderSelf, and RenderAfter hook bits to record. */
|
|
330
|
+
readonly hooks: number;
|
|
331
|
+
readonly opacity: number;
|
|
332
|
+
readonly paintLayout: NativeSceneLayout;
|
|
333
|
+
readonly publicLayout?: NativeSceneLayout;
|
|
334
|
+
}
|
|
335
|
+
/** An issued request. Pass it back unchanged; geometry is observation, not acknowledgement authority. */
|
|
336
|
+
export interface NativeSceneFrameRequest {
|
|
337
|
+
readonly session: SessionHandle;
|
|
338
|
+
readonly root: SceneNodeHandle;
|
|
339
|
+
readonly node: SceneNodeHandle;
|
|
340
|
+
readonly frameId: bigint;
|
|
341
|
+
readonly requestId: bigint;
|
|
342
|
+
readonly layoutEpoch: bigint;
|
|
343
|
+
readonly hookGeneration: bigint;
|
|
344
|
+
readonly kind: NativeSceneFrame;
|
|
345
|
+
readonly num: number;
|
|
346
|
+
readonly width: number;
|
|
347
|
+
readonly height: number;
|
|
348
|
+
paintLayout?: NativeSceneLayout;
|
|
349
|
+
publicLayout?: NativeSceneLayout;
|
|
350
|
+
/** Host observation revision; never part of native ticket authority. */
|
|
351
|
+
geometryRevision?: number;
|
|
352
|
+
}
|
|
353
|
+
export interface NativeSplitSnapshot {
|
|
354
|
+
snapshot: ContextBufferHandle;
|
|
355
|
+
rowColumns: number;
|
|
356
|
+
startOnNewLine: boolean;
|
|
357
|
+
trailingNewline: boolean;
|
|
358
|
+
}
|
|
359
|
+
export type NativeSessionSplitControl = {
|
|
360
|
+
kind: "reset";
|
|
361
|
+
seedRows: number;
|
|
362
|
+
pinnedRenderOffset: number;
|
|
363
|
+
} | {
|
|
364
|
+
kind: "sync";
|
|
365
|
+
pinnedRenderOffset: number;
|
|
366
|
+
} | {
|
|
367
|
+
kind: "output-offset";
|
|
368
|
+
surfaceOffset: number;
|
|
369
|
+
} | {
|
|
370
|
+
kind: "render-offset";
|
|
371
|
+
renderOffset: number;
|
|
372
|
+
} | {
|
|
373
|
+
kind: "transition";
|
|
374
|
+
mode: "viewport-scroll" | "clear-stale-rows";
|
|
375
|
+
sourceTopLine: number;
|
|
376
|
+
sourceHeight: number;
|
|
377
|
+
targetTopLine: number;
|
|
378
|
+
targetHeight: number;
|
|
379
|
+
scrollLines?: number;
|
|
380
|
+
} | {
|
|
381
|
+
kind: "clear-transition";
|
|
382
|
+
};
|
|
383
|
+
export interface NativeSceneTextOptions {
|
|
384
|
+
fg: RGBA;
|
|
385
|
+
bg: RGBA;
|
|
386
|
+
attributes: number;
|
|
387
|
+
wrapMode: "none" | "char" | "word";
|
|
388
|
+
textAlign: "left" | "center" | "right";
|
|
389
|
+
truncate: boolean;
|
|
390
|
+
scrollX: number;
|
|
391
|
+
scrollY: number;
|
|
392
|
+
firstLineOffset: number;
|
|
393
|
+
tabIndicator?: string | number;
|
|
394
|
+
tabIndicatorColor?: RGBA;
|
|
395
|
+
}
|
|
396
|
+
export interface NativeBufferGrid {
|
|
397
|
+
borderChars: Uint32Array;
|
|
398
|
+
borderFg: RGBA;
|
|
399
|
+
borderBg: RGBA;
|
|
400
|
+
columnOffsets: Int32Array;
|
|
401
|
+
rowOffsets: Int32Array;
|
|
402
|
+
drawInner: boolean;
|
|
403
|
+
drawOuter: boolean;
|
|
404
|
+
}
|
|
405
|
+
export interface NativeBufferStack {
|
|
406
|
+
operation: "getOpacity" | "pushScissor" | "popScissor" | "clearScissors" | "pushOpacity" | "popOpacity" | "clearOpacity";
|
|
407
|
+
x?: number;
|
|
408
|
+
y?: number;
|
|
409
|
+
width?: number;
|
|
410
|
+
height?: number;
|
|
411
|
+
opacity?: number;
|
|
412
|
+
}
|
|
413
|
+
export type NativeDrawingTarget = {
|
|
414
|
+
readonly context: NativeContextHandle;
|
|
415
|
+
readonly target: ContextBufferHandle;
|
|
416
|
+
readonly frame: null;
|
|
417
|
+
} | {
|
|
418
|
+
readonly context: NativeContextHandle;
|
|
419
|
+
readonly target: SessionHandle;
|
|
420
|
+
readonly frame: NativeSceneFrameRequest;
|
|
421
|
+
};
|
|
422
|
+
type BufferDrawPosition = {
|
|
423
|
+
x?: number;
|
|
424
|
+
y?: number;
|
|
425
|
+
};
|
|
426
|
+
type BufferDrawColors = {
|
|
427
|
+
foreground?: RGBA;
|
|
428
|
+
background?: RGBA;
|
|
429
|
+
};
|
|
430
|
+
export type NativeBufferDraw = {
|
|
431
|
+
operation: "clear";
|
|
432
|
+
background?: RGBA;
|
|
433
|
+
} | (BufferDrawPosition & {
|
|
434
|
+
operation: "fill";
|
|
435
|
+
width?: number;
|
|
436
|
+
height?: number;
|
|
437
|
+
background?: RGBA;
|
|
438
|
+
}) | (BufferDrawPosition & BufferDrawColors & {
|
|
439
|
+
operation: "text";
|
|
440
|
+
text?: string;
|
|
441
|
+
attributes?: number;
|
|
442
|
+
}) | (BufferDrawPosition & BufferDrawColors & {
|
|
443
|
+
operation: "cell" | "cellBlend" | "char";
|
|
444
|
+
char?: number;
|
|
445
|
+
attributes?: number;
|
|
446
|
+
}) | (BufferDrawPosition & BufferDrawColors & {
|
|
447
|
+
operation: "box";
|
|
448
|
+
width?: number;
|
|
449
|
+
height?: number;
|
|
450
|
+
titleColor?: RGBA;
|
|
451
|
+
packedOptions?: number;
|
|
452
|
+
borderChars?: Uint32Array;
|
|
453
|
+
text?: string;
|
|
454
|
+
bottomTitle?: string;
|
|
455
|
+
}) | (BufferDrawPosition & {
|
|
456
|
+
operation: "compose";
|
|
457
|
+
source: ContextBufferHandle;
|
|
458
|
+
sourceX?: number;
|
|
459
|
+
sourceY?: number;
|
|
460
|
+
sourceWidth?: number;
|
|
461
|
+
sourceHeight?: number;
|
|
462
|
+
}) | {
|
|
463
|
+
operation: "respectAlpha";
|
|
464
|
+
enabled: boolean;
|
|
465
|
+
};
|
|
466
|
+
export interface NativeContextImageDraw {
|
|
467
|
+
x?: number;
|
|
468
|
+
y?: number;
|
|
469
|
+
width: number;
|
|
470
|
+
height: number;
|
|
471
|
+
pixelWidth?: number;
|
|
472
|
+
pixelHeight?: number;
|
|
473
|
+
sourceX?: number;
|
|
474
|
+
sourceY?: number;
|
|
475
|
+
sourceWidth?: number;
|
|
476
|
+
sourceHeight?: number;
|
|
477
|
+
protocol?: ImageRenderProtocol;
|
|
478
|
+
}
|
|
479
|
+
export interface NativeSceneTextSelectionOptions {
|
|
480
|
+
operation: "reset" | "set" | "update";
|
|
481
|
+
anchorX: number;
|
|
482
|
+
anchorY: number;
|
|
483
|
+
focusX: number;
|
|
484
|
+
focusY: number;
|
|
485
|
+
behavior: SelectionBehavior;
|
|
486
|
+
bg?: RGBA;
|
|
487
|
+
fg?: RGBA;
|
|
488
|
+
}
|
|
489
|
+
export interface NativeSceneTextMetrics {
|
|
490
|
+
byteLength: number;
|
|
491
|
+
textLength: number;
|
|
492
|
+
lineCount: number;
|
|
493
|
+
virtualLineCount: number;
|
|
494
|
+
widthColsMax: number;
|
|
495
|
+
}
|
|
496
|
+
export interface NativeSceneSliderOptions {
|
|
497
|
+
orientation: "horizontal" | "vertical";
|
|
498
|
+
min: number;
|
|
499
|
+
max: number;
|
|
500
|
+
value: number;
|
|
501
|
+
viewPortSize: number;
|
|
502
|
+
foregroundColor: RGBA;
|
|
503
|
+
backgroundColor: RGBA;
|
|
504
|
+
}
|
|
505
|
+
export interface NativeSceneArrowOptions {
|
|
506
|
+
direction: "up" | "down" | "left" | "right";
|
|
507
|
+
attributes: number;
|
|
508
|
+
foregroundColor: RGBA;
|
|
509
|
+
backgroundColor: RGBA;
|
|
510
|
+
text?: string;
|
|
511
|
+
}
|
|
512
|
+
export interface NativeSessionBufferLease {
|
|
513
|
+
handle: ContextObjectHandle;
|
|
514
|
+
width: number;
|
|
515
|
+
height: number;
|
|
516
|
+
generation: bigint;
|
|
517
|
+
char: Pointer;
|
|
518
|
+
fg: Pointer;
|
|
519
|
+
bg: Pointer;
|
|
520
|
+
attributes: Pointer;
|
|
521
|
+
}
|
|
522
|
+
export type NativeContextBufferLease = NativeSessionBufferLease;
|
|
523
|
+
export interface NativeContextBufferOptions {
|
|
524
|
+
width: number;
|
|
525
|
+
height: number;
|
|
526
|
+
widthMethod?: WidthMethod | "no-zwj";
|
|
527
|
+
respectAlpha?: boolean;
|
|
528
|
+
}
|
|
529
|
+
export declare const NATIVE_BUFFER_TEXT_BYTES_MAX: 65536;
|
|
530
|
+
export interface NativeSessionOptions {
|
|
531
|
+
chunkSize: number;
|
|
532
|
+
spanCapacity: number;
|
|
533
|
+
maxBytes: bigint;
|
|
534
|
+
controlCapacity?: number;
|
|
535
|
+
}
|
|
536
|
+
export interface NativeOutputTicket {
|
|
537
|
+
session: SessionHandle;
|
|
538
|
+
requestId: bigint;
|
|
539
|
+
byteCount: number;
|
|
540
|
+
}
|
|
541
|
+
export declare enum NativeSessionState {
|
|
542
|
+
Open = 0,
|
|
543
|
+
Closing = 1,
|
|
544
|
+
Closed = 2,
|
|
545
|
+
Failed = 3,
|
|
546
|
+
Cancelled = 4
|
|
547
|
+
}
|
|
548
|
+
export interface NativeSessionRendererOptions {
|
|
549
|
+
width: number;
|
|
550
|
+
height: number;
|
|
551
|
+
/** Omitted selects native auto detection, which ignores host hints when remote. */
|
|
552
|
+
remote?: boolean;
|
|
553
|
+
/** Initialization-only copied host hints: at most 256 entries and 65536 encoded bytes. */
|
|
554
|
+
environment?: Readonly<Record<string, string>>;
|
|
555
|
+
}
|
|
556
|
+
export declare enum NativeSessionRenderStatus {
|
|
557
|
+
Presented = 0,
|
|
558
|
+
Pending = 1,
|
|
559
|
+
Skipped = 2,
|
|
560
|
+
Failed = 3
|
|
561
|
+
}
|
|
562
|
+
export interface NativeSessionRendererState {
|
|
563
|
+
width: number;
|
|
564
|
+
height: number;
|
|
565
|
+
frameCount: bigint;
|
|
566
|
+
framePending: boolean;
|
|
567
|
+
}
|
|
568
|
+
export interface NativeSessionKittyImageTransportStatus {
|
|
569
|
+
requested: number;
|
|
570
|
+
effective: number;
|
|
571
|
+
fileState: number;
|
|
572
|
+
fallback: number;
|
|
573
|
+
pendingFiles: number;
|
|
574
|
+
pendingBytes: number;
|
|
575
|
+
}
|
|
576
|
+
export declare const NATIVE_SESSION_CONTROL_PACKET_BYTES: 4096;
|
|
577
|
+
export interface NativeSessionTerminalOptions {
|
|
578
|
+
useAlternateScreen?: boolean;
|
|
579
|
+
mouse?: boolean;
|
|
580
|
+
mouseMovement?: boolean;
|
|
581
|
+
kittyKeyboardFlags?: number;
|
|
582
|
+
clearOnClose?: boolean;
|
|
583
|
+
}
|
|
584
|
+
export declare enum NativeSessionTerminalPhase {
|
|
585
|
+
Uninitialized = 0,
|
|
586
|
+
SettingUp = 1,
|
|
587
|
+
Active = 2,
|
|
588
|
+
Suspending = 3,
|
|
589
|
+
Suspended = 4,
|
|
590
|
+
Resuming = 5,
|
|
591
|
+
Closing = 6,
|
|
592
|
+
Restored = 7,
|
|
593
|
+
Failed = 8,
|
|
594
|
+
Cancelled = 9
|
|
595
|
+
}
|
|
596
|
+
export declare enum NativeSessionPumpStatus {
|
|
597
|
+
Idle = 0,
|
|
598
|
+
Again = 1,
|
|
599
|
+
OutputPending = 2,
|
|
600
|
+
WaitUntil = 3,
|
|
601
|
+
Closed = 4
|
|
602
|
+
}
|
|
603
|
+
export interface NativeSessionPumpResult {
|
|
604
|
+
status: NativeSessionPumpStatus;
|
|
605
|
+
deadlineNs: bigint | null;
|
|
606
|
+
}
|
|
607
|
+
export type NativeSessionControl = {
|
|
608
|
+
kind: "capability-response";
|
|
609
|
+
bytes: Uint8Array;
|
|
610
|
+
} | {
|
|
611
|
+
kind: "palette-query";
|
|
612
|
+
bytes: Uint8Array;
|
|
613
|
+
} | {
|
|
614
|
+
kind: "title";
|
|
615
|
+
title: string;
|
|
616
|
+
} | {
|
|
617
|
+
kind: "mouse";
|
|
618
|
+
mode: "disabled" | "drag" | "motion";
|
|
619
|
+
} | {
|
|
620
|
+
kind: "kitty-keyboard-flags";
|
|
621
|
+
flags: number;
|
|
622
|
+
} | {
|
|
623
|
+
kind: "restore-modes" | "query-pixel-resolution" | "query-theme-colors" | "reset-background";
|
|
624
|
+
};
|
|
625
|
+
export interface NativeSessionCursorOptions extends CursorStyleOptions {
|
|
626
|
+
position?: {
|
|
627
|
+
x: number;
|
|
628
|
+
y: number;
|
|
629
|
+
visible: boolean;
|
|
630
|
+
};
|
|
631
|
+
}
|
|
632
|
+
export interface NativeSessionCapabilities extends TerminalCapabilities {
|
|
633
|
+
kittyKeyboardFlags: number;
|
|
634
|
+
}
|
|
635
|
+
export declare enum NativeStatus {
|
|
636
|
+
Ok = 0,
|
|
637
|
+
InvalidArgument = -1,
|
|
638
|
+
UnsupportedVersion = -2,
|
|
639
|
+
OutOfMemory = -3,
|
|
640
|
+
WrongThread = -4,
|
|
641
|
+
InternalError = -5,
|
|
642
|
+
ContextBusy = -6,
|
|
643
|
+
WrongContext = -7,
|
|
644
|
+
WrongKind = -8,
|
|
645
|
+
StaleHandle = -9,
|
|
646
|
+
WrongSession = -10,
|
|
647
|
+
OutputBackpressure = -11,
|
|
648
|
+
SessionClosed = -12,
|
|
649
|
+
OutputBusy = -13,
|
|
650
|
+
StaleOutput = -14,
|
|
651
|
+
OutputFailed = -15,
|
|
652
|
+
ObjectLimit = -16,
|
|
653
|
+
RendererAttached = -17,
|
|
654
|
+
RendererNotAttached = -18,
|
|
655
|
+
InvalidPhase = -19,
|
|
656
|
+
ControlPacketLimit = -20,
|
|
657
|
+
LeaseLimit = -21,
|
|
658
|
+
LeaseBytesLimit = -22,
|
|
659
|
+
StaleLease = -23,
|
|
660
|
+
UnsupportedResource = -24,
|
|
661
|
+
StaleFrame = -25,
|
|
662
|
+
LayoutLimit = -26,
|
|
663
|
+
FrameBusy = -27,
|
|
664
|
+
FrameRequestLimit = -28
|
|
665
|
+
}
|
|
666
|
+
export declare class NativeError extends Error {
|
|
667
|
+
readonly operation: string;
|
|
668
|
+
readonly status: NativeStatus;
|
|
669
|
+
constructor(operation: string, status: NativeStatus);
|
|
670
|
+
}
|
|
42
671
|
export type AudioEngineHandle = NativeHandle<"audio_engine">;
|
|
43
|
-
export type
|
|
44
|
-
export type ImageHandle = NativeHandle<"image">;
|
|
672
|
+
export type ImageHandle = ContextImageHandle;
|
|
45
673
|
export type ClipboardServiceHandle = number & {
|
|
46
674
|
readonly __nativeHandle: "clipboard_service";
|
|
47
675
|
};
|
|
@@ -49,49 +677,48 @@ export type ClipboardOperationHandle = number & {
|
|
|
49
677
|
readonly __nativeHandle: "clipboard_operation";
|
|
50
678
|
};
|
|
51
679
|
export declare enum NativeClipboardOperationStatus {
|
|
52
|
-
Pending
|
|
53
|
-
Read
|
|
54
|
-
Empty
|
|
55
|
-
Written
|
|
56
|
-
Cleared
|
|
57
|
-
Unsupported
|
|
58
|
-
Cancelled
|
|
59
|
-
TimedOut
|
|
60
|
-
LimitExceeded
|
|
61
|
-
Failed
|
|
62
|
-
InvalidHandle
|
|
680
|
+
Pending,
|
|
681
|
+
Read,
|
|
682
|
+
Empty,
|
|
683
|
+
Written,
|
|
684
|
+
Cleared,
|
|
685
|
+
Unsupported,
|
|
686
|
+
Cancelled,
|
|
687
|
+
TimedOut,
|
|
688
|
+
LimitExceeded,
|
|
689
|
+
Failed,
|
|
690
|
+
InvalidHandle
|
|
63
691
|
}
|
|
64
692
|
export declare enum NativeClipboardStartStatus {
|
|
65
|
-
Ok
|
|
66
|
-
InvalidService
|
|
67
|
-
ShuttingDown
|
|
68
|
-
LimitExceeded
|
|
69
|
-
InvalidArgument
|
|
70
|
-
OutOfMemory
|
|
693
|
+
Ok,
|
|
694
|
+
InvalidService,
|
|
695
|
+
ShuttingDown,
|
|
696
|
+
LimitExceeded,
|
|
697
|
+
InvalidArgument,
|
|
698
|
+
OutOfMemory
|
|
71
699
|
}
|
|
72
700
|
export declare enum NativeClipboardCancelStatus {
|
|
73
|
-
Requested
|
|
74
|
-
AlreadyTerminal
|
|
75
|
-
InvalidHandle
|
|
701
|
+
Requested,
|
|
702
|
+
AlreadyTerminal,
|
|
703
|
+
InvalidHandle
|
|
76
704
|
}
|
|
77
705
|
export declare enum NativeClipboardCopyStatus {
|
|
78
|
-
Ok
|
|
79
|
-
BufferTooSmall
|
|
80
|
-
InvalidHandle
|
|
81
|
-
InvalidState
|
|
82
|
-
InvalidArgument
|
|
706
|
+
Ok,
|
|
707
|
+
BufferTooSmall,
|
|
708
|
+
InvalidHandle,
|
|
709
|
+
InvalidState,
|
|
710
|
+
InvalidArgument
|
|
83
711
|
}
|
|
84
712
|
export declare enum NativeClipboardDestroyStatus {
|
|
85
|
-
Destroyed
|
|
86
|
-
NotReady
|
|
87
|
-
InvalidHandle
|
|
713
|
+
Destroyed,
|
|
714
|
+
NotReady,
|
|
715
|
+
InvalidHandle
|
|
88
716
|
}
|
|
89
717
|
export declare enum NativeClipboardShutdownStatus {
|
|
90
|
-
Pending
|
|
91
|
-
Ready
|
|
92
|
-
InvalidHandle
|
|
718
|
+
Pending,
|
|
719
|
+
Ready,
|
|
720
|
+
InvalidHandle
|
|
93
721
|
}
|
|
94
|
-
export type EmbeddedTerminalHandle = NativeHandle<"embedded_terminal">;
|
|
95
722
|
export type EmbeddedTerminalCursor = {
|
|
96
723
|
x: number;
|
|
97
724
|
y: number;
|
|
@@ -123,6 +750,131 @@ export type EmbeddedTerminalMouse = {
|
|
|
123
750
|
y: number;
|
|
124
751
|
anyButtonPressed?: boolean;
|
|
125
752
|
};
|
|
753
|
+
declare const SCENE_NODE_KINDS: readonly ["root", "box", "text", "slider", "arrow", "editor", "custom", "text_view", "image"];
|
|
754
|
+
/** One ordered property stream, stored in native wire layout. Visual writes coalesce
|
|
755
|
+
* at the node's latest visual record; last write wins per field. New or changed
|
|
756
|
+
* translations only merge into the last record so prepared coordinates observe
|
|
757
|
+
* preceding ancestor translations. Layout writes stay ordered because Yoga
|
|
758
|
+
* shorthand/edge and dimension/flex-shrink operations can overlap. There are no
|
|
759
|
+
* reads or callbacks between records. A successful flush ends coalescing.
|
|
760
|
+
*
|
|
761
|
+
* Records occupy their packed size, so a background-only or style batch is already
|
|
762
|
+
* the borrowed bytes. Merging extra visual fields grows that record and shifts later
|
|
763
|
+
* ones. Scratch snapshots caller getters before publication, including under reentry. */
|
|
764
|
+
export declare class SceneStaging {
|
|
765
|
+
static readonly limit: 4096;
|
|
766
|
+
private words;
|
|
767
|
+
private readonly paintBySlot;
|
|
768
|
+
private readonly packScratch;
|
|
769
|
+
private readonly styleValue;
|
|
770
|
+
private readonly styleValueWords;
|
|
771
|
+
private context?;
|
|
772
|
+
private readonly contextId;
|
|
773
|
+
private readonly contextWords;
|
|
774
|
+
private borrowed;
|
|
775
|
+
private entryCount;
|
|
776
|
+
private encodedWords;
|
|
777
|
+
private lastBase;
|
|
778
|
+
private runBase;
|
|
779
|
+
private paintScratch;
|
|
780
|
+
constructor(initialCapacity?: number);
|
|
781
|
+
get pending(): boolean;
|
|
782
|
+
get count(): number;
|
|
783
|
+
get byteLength(): number;
|
|
784
|
+
get full(): boolean;
|
|
785
|
+
static checkStyleValue(group: number, value: number): number;
|
|
786
|
+
private assertWritable;
|
|
787
|
+
/** Returns the node's staged visual record, if any. */
|
|
788
|
+
private checkHandle;
|
|
789
|
+
private bind;
|
|
790
|
+
private ensureWords;
|
|
791
|
+
/** Callers write every field word; only the trailing alignment word needs clearing. */
|
|
792
|
+
private reserve;
|
|
793
|
+
stageStyle(context: NativeContextHandle, node: SceneNodeHandle, group: number, kind: number, edge: number, unit: number, value: number, flags: number): boolean;
|
|
794
|
+
private writeStyle;
|
|
795
|
+
/**
|
|
796
|
+
* Whether Yoga certainly treats two staged values of one property as different. Undefined, auto
|
|
797
|
+
* and NaN values, and signed zeros, can compare equal under Yoga's rules, so they never qualify.
|
|
798
|
+
*/
|
|
799
|
+
private stylesDiffer;
|
|
800
|
+
/**
|
|
801
|
+
* Coalesces consecutive writes to one node property. The stream keeps a run of two records only
|
|
802
|
+
* while Yoga certainly sees their values as different, and the newest value stays last. Yoga then
|
|
803
|
+
* marks the node dirty, as some write in the original run would have, and ends with the same
|
|
804
|
+
* value. Any write that cannot keep that guarantee is appended instead. Returns false to append.
|
|
805
|
+
*/
|
|
806
|
+
private rewriteStyleRun;
|
|
807
|
+
stageBackground(context: NativeContextHandle, node: SceneNodeHandle, color: RGBA, owner?: {
|
|
808
|
+
assertMutable(): void;
|
|
809
|
+
}): boolean;
|
|
810
|
+
stagePaint(context: NativeContextHandle, node: SceneNodeHandle, paint: NativeScenePaintUpdate, owner?: {
|
|
811
|
+
assertMutable(): void;
|
|
812
|
+
}): boolean;
|
|
813
|
+
private publishPaint;
|
|
814
|
+
private packedFieldEquals;
|
|
815
|
+
private writePackedFields;
|
|
816
|
+
private mergePackedPaint;
|
|
817
|
+
/** @internal Borrow until consume() acknowledges the native prefix. */
|
|
818
|
+
_views(context: NativeContextHandle): Uint32Array;
|
|
819
|
+
clear(): void;
|
|
820
|
+
/** Never replay the accepted prefix. Remaining records stay in wire layout. An invalid
|
|
821
|
+
* acknowledgement still ends the borrow, so staging stays writable. */
|
|
822
|
+
consume(applied: number): void;
|
|
823
|
+
discard(node: SceneNodeHandle): void;
|
|
824
|
+
private reindex;
|
|
825
|
+
}
|
|
826
|
+
/** Encodes paint hooks into the ot_scene_record stream that acknowledges one RECORD request.
|
|
827
|
+
* Recorded commands draw when native code paints the frame, not when a hook calls them. */
|
|
828
|
+
export declare class NativePaintRecorder {
|
|
829
|
+
private buffer;
|
|
830
|
+
private bytes;
|
|
831
|
+
private words;
|
|
832
|
+
private signed;
|
|
833
|
+
private floats;
|
|
834
|
+
private colors;
|
|
835
|
+
private length;
|
|
836
|
+
private context;
|
|
837
|
+
private window;
|
|
838
|
+
private readonly releases;
|
|
839
|
+
private pendingSlot;
|
|
840
|
+
private pendingPhase;
|
|
841
|
+
private readonly opacity;
|
|
842
|
+
private scissors;
|
|
843
|
+
private textBytes?;
|
|
844
|
+
private bottomBytes?;
|
|
845
|
+
private readonly handleRecord;
|
|
846
|
+
begin(context: NativeContextHandle): void;
|
|
847
|
+
/** Stop recording. Deferred releases wait for settle(). */
|
|
848
|
+
end(): void;
|
|
849
|
+
/** Run deferred releases after the frame step that consumed the recording. */
|
|
850
|
+
settle(): void;
|
|
851
|
+
/** The encoded stream, or null when nothing was recorded. Valid until the next begin(). */
|
|
852
|
+
get recording(): Uint8Array | null;
|
|
853
|
+
/** Start one slot phase. Its SLOT record is written only if the phase draws. */
|
|
854
|
+
slot(slot: number, phase: NativeScenePaintPhase, opacity: number): void;
|
|
855
|
+
get currentOpacity(): number;
|
|
856
|
+
draw(options: NativeBufferDraw): void;
|
|
857
|
+
stack(options: NativeBufferStack): number;
|
|
858
|
+
grid(options: NativeBufferGrid): void;
|
|
859
|
+
packed(data: Uint8Array | PointerInput, byteLength: number, x: number, y: number, width: number, height: number): void;
|
|
860
|
+
supersample(data: Uint8Array | PointerInput, byteLength: number, x: number, y: number, format: "rgba8unorm" | "bgra8unorm", stride: number): void;
|
|
861
|
+
grayscale(data: Float32Array, x: number, y: number, width: number, height: number, foreground: RGBA | null, background: RGBA | null, supersampled: boolean): void;
|
|
862
|
+
colorMatrix(matrix: Float32Array, mask: Float32Array | null, strength: number, channel: number): void;
|
|
863
|
+
/** Draw a text-buffer view, editor view, or scene text node. */
|
|
864
|
+
view(operation: "text" | "editor" | "scene", source: ContextObjectHandle, x: number, y: number): void;
|
|
865
|
+
image(source: ContextImageHandle, options: NativeContextImageDraw): void;
|
|
866
|
+
unicode(source: ContextUnicodeHandle, index: number, x: number, y: number, foreground: RGBA, background: RGBA, attributes: number): void;
|
|
867
|
+
/** Runs one encoder. A call that throws leaves no partial record or slot header, so the hook can recover. */
|
|
868
|
+
private transaction;
|
|
869
|
+
private activeContext;
|
|
870
|
+
private encodeHandle;
|
|
871
|
+
/** Append one zeroed record of at most size bytes and return its offset. */
|
|
872
|
+
private reserve;
|
|
873
|
+
private append;
|
|
874
|
+
/** Shrink a record reserved with an upper bound to its encoded end. */
|
|
875
|
+
private finish;
|
|
876
|
+
private grow;
|
|
877
|
+
}
|
|
126
878
|
export declare enum LogLevel {
|
|
127
879
|
Error = 0,
|
|
128
880
|
Warn = 1,
|
|
@@ -161,15 +913,6 @@ export interface CursorState {
|
|
|
161
913
|
}
|
|
162
914
|
export type NativeSpanFeedEventHandler = (eventId: number, arg0: Pointer, arg1: number | bigint) => void;
|
|
163
915
|
export type NativeBufferedOutput = "stdout" | "memory";
|
|
164
|
-
export interface NativeRendererCreateOptions {
|
|
165
|
-
remote?: boolean;
|
|
166
|
-
feedPtr?: Pointer | null;
|
|
167
|
-
bufferedOutput?: NativeBufferedOutput;
|
|
168
|
-
}
|
|
169
|
-
export interface NativeRenderOperationResult {
|
|
170
|
-
renderOffset: number;
|
|
171
|
-
status: number;
|
|
172
|
-
}
|
|
173
916
|
export interface NativeYogaLayout {
|
|
174
917
|
left: number;
|
|
175
918
|
top: number;
|
|
@@ -180,595 +923,573 @@ export interface NativeYogaLayout {
|
|
|
180
923
|
}
|
|
181
924
|
export type NativeYogaMeasureCallback = (node: Pointer | null, width: number, widthMode: number, height: number, heightMode: number) => void;
|
|
182
925
|
export type NativeYogaDirtiedCallback = (node: Pointer | null) => void;
|
|
183
|
-
export
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
926
|
+
export interface AudioEngineLib extends Pick<FFIRenderLib, Extract<keyof FFIRenderLib, `audio${string}` | "createAudioEngine" | "destroyAudioEngine">> {
|
|
927
|
+
}
|
|
928
|
+
export type RenderLib = Pick<FFIRenderLib, keyof FFIRenderLib>;
|
|
929
|
+
export declare class FFIRenderLib {
|
|
930
|
+
private bufferDrawRecord;
|
|
931
|
+
private sceneLayoutRecord;
|
|
932
|
+
private sceneFrameRecord;
|
|
933
|
+
private scenePaintSlots;
|
|
934
|
+
private sceneCreateRecord;
|
|
935
|
+
private sceneDestroyHandle;
|
|
936
|
+
private sceneMoveRecord;
|
|
937
|
+
private sceneHooksRecord;
|
|
938
|
+
private sceneFlushApplied;
|
|
939
|
+
private editorSelectionRecord;
|
|
940
|
+
private readonly editorViewInfoRecord;
|
|
941
|
+
private readonly selectionResetRecord;
|
|
942
|
+
private readonly localSelectionResetRecord;
|
|
943
|
+
private readonly selectionResetChanged;
|
|
944
|
+
private readonly hitTestOutput;
|
|
945
|
+
private readonly bufferStackInput;
|
|
946
|
+
private readonly bufferStackOutput;
|
|
947
|
+
private drawTextBytes;
|
|
948
|
+
private drawBottomBytes;
|
|
949
|
+
private opentui;
|
|
950
|
+
private iccCacheClient;
|
|
951
|
+
private readonly yogaLayout;
|
|
952
|
+
private readonly yogaU32;
|
|
953
|
+
private readonly yogaF32;
|
|
954
|
+
private readonly yogaU64;
|
|
955
|
+
private yogaHost?;
|
|
956
|
+
private readonly ffiStructStorage;
|
|
957
|
+
private disposed;
|
|
958
|
+
private nativeContexts;
|
|
959
|
+
private contextEditEvents;
|
|
960
|
+
private sceneMeasures;
|
|
961
|
+
private clipboardServices;
|
|
962
|
+
private clipboardOperations;
|
|
963
|
+
private audioEngines;
|
|
964
|
+
private readonly invalidStandaloneHandle;
|
|
965
|
+
readonly encoder: TextEncoder;
|
|
966
|
+
private readonly emptyBytes;
|
|
967
|
+
readonly decoder: TextDecoder;
|
|
968
|
+
private logCallbackWrapper;
|
|
969
|
+
private diagnosticDrain?;
|
|
970
|
+
private nativeSpanFeedCallbackWrapper;
|
|
971
|
+
private nativeSpanFeedHandlers;
|
|
972
|
+
createContext(options: NativeContextOptions): NativeContextHandle;
|
|
973
|
+
private nativeContextPointer;
|
|
974
|
+
destroyContext(context: NativeContextHandle): void;
|
|
975
|
+
private releaseContext;
|
|
976
|
+
/** Destroys one Context object through the native destroy symbol of its kind. */
|
|
977
|
+
private destroyContextObject;
|
|
978
|
+
contextGetLinkUrl(context: NativeContextHandle, linkId: number): string;
|
|
979
|
+
createContextTextBuffer(context: NativeContextHandle, options?: NativeContextEditBufferOptions): ContextTextBufferHandle;
|
|
980
|
+
createContextUnicode(context: NativeContextHandle, text: string, widthMethod: WidthMethod | "no-zwj"): ContextUnicodeHandle;
|
|
981
|
+
sceneMeasureLayout(context: NativeContextHandle, session: SessionHandle, root: SceneNodeHandle): void;
|
|
982
|
+
sceneFrameCopyBuffer(context: NativeContextHandle, session: SessionHandle, frame: NativeSceneFrameRequest, target: ContextBufferHandle): void;
|
|
983
|
+
sessionRenderSplit(context: NativeContextHandle, session: SessionHandle, frame: NativeSceneFrameRequest | null, snapshots: readonly NativeSplitSnapshot[], pinnedRenderOffset: number, force: boolean): {
|
|
984
|
+
status: NativeSessionRenderStatus;
|
|
242
985
|
};
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
986
|
+
sessionSplitControl(context: NativeContextHandle, session: SessionHandle, command: NativeSessionSplitControl): number;
|
|
987
|
+
sessionSetScreen(context: NativeContextHandle, session: SessionHandle, alternate: boolean, width: number, height: number, trailingOutput?: Uint8Array): void;
|
|
988
|
+
sessionSyncDetached(context: NativeContextHandle, session: SessionHandle, parent: SessionHandle): void;
|
|
989
|
+
getContextUnicode(context: NativeContextHandle, unicode: ContextUnicodeHandle): Array<{
|
|
990
|
+
width: number;
|
|
991
|
+
char: number;
|
|
992
|
+
}>;
|
|
993
|
+
destroyContextUnicode(context: NativeContextHandle, unicode: ContextUnicodeHandle): void;
|
|
994
|
+
contextBufferDrawUnicode({ context, target, frame }: NativeDrawingTarget, unicode: ContextUnicodeHandle, index: number, x: number, y: number, foreground: RGBA, background: RGBA, attributes: number): void;
|
|
995
|
+
createContextEmbeddedTerminal(context: NativeContextHandle, options: {
|
|
996
|
+
cols: number;
|
|
997
|
+
rows: number;
|
|
998
|
+
maxScrollback?: number;
|
|
999
|
+
}): ContextEmbeddedTerminalHandle;
|
|
1000
|
+
destroyContextEmbeddedTerminal(context: NativeContextHandle, terminal: ContextEmbeddedTerminalHandle): void;
|
|
1001
|
+
contextEmbeddedTerminalWrite(context: NativeContextHandle, terminal: ContextEmbeddedTerminalHandle, data: string | Uint8Array): void;
|
|
1002
|
+
contextEmbeddedTerminalResize(context: NativeContextHandle, terminal: ContextEmbeddedTerminalHandle, cols: number, rows: number): void;
|
|
1003
|
+
private contextTerminalCommand;
|
|
1004
|
+
contextEmbeddedTerminalInvalidate(context: NativeContextHandle, terminal: ContextEmbeddedTerminalHandle): void;
|
|
1005
|
+
contextEmbeddedTerminalScroll(context: NativeContextHandle, terminal: ContextEmbeddedTerminalHandle, delta: number): void;
|
|
1006
|
+
contextEmbeddedTerminalClearSelection(context: NativeContextHandle, terminal: ContextEmbeddedTerminalHandle): void;
|
|
1007
|
+
contextEmbeddedTerminalSetTransparentBackground(context: NativeContextHandle, terminal: ContextEmbeddedTerminalHandle, transparent: boolean): void;
|
|
1008
|
+
contextEmbeddedTerminalSetSelection(context: NativeContextHandle, terminal: ContextEmbeddedTerminalHandle, start: {
|
|
1009
|
+
x: number;
|
|
1010
|
+
y: number;
|
|
1011
|
+
}, end: {
|
|
1012
|
+
x: number;
|
|
1013
|
+
y: number;
|
|
1014
|
+
}): void;
|
|
1015
|
+
private contextTerminalBytes;
|
|
1016
|
+
contextEmbeddedTerminalGetSelectedText(context: NativeContextHandle, terminal: ContextEmbeddedTerminalHandle): Uint8Array;
|
|
1017
|
+
contextEmbeddedTerminalCompose({ context, target, frame }: NativeDrawingTarget, terminal: ContextEmbeddedTerminalHandle, x: number, y: number): void;
|
|
1018
|
+
contextEmbeddedTerminalCursor(context: NativeContextHandle, terminal: ContextEmbeddedTerminalHandle): EmbeddedTerminalCursor;
|
|
1019
|
+
contextEmbeddedTerminalEncodeKey(context: NativeContextHandle, terminal: ContextEmbeddedTerminalHandle, key: EmbeddedTerminalKey): Uint8Array;
|
|
1020
|
+
contextEmbeddedTerminalEncodeMouse(context: NativeContextHandle, terminal: ContextEmbeddedTerminalHandle, mouse: EmbeddedTerminalMouse): Uint8Array;
|
|
1021
|
+
contextEmbeddedTerminalEncodePaste(context: NativeContextHandle, terminal: ContextEmbeddedTerminalHandle, input: Uint8Array): Uint8Array;
|
|
1022
|
+
contextEmbeddedTerminalEncodeFocus(context: NativeContextHandle, terminal: ContextEmbeddedTerminalHandle, focused: boolean): Uint8Array;
|
|
1023
|
+
private embeddedTerminalResponses;
|
|
1024
|
+
contextEmbeddedTerminalDrainResponses(context: NativeContextHandle, terminal: ContextEmbeddedTerminalHandle): Uint8Array;
|
|
1025
|
+
destroyContextTextBuffer(context: NativeContextHandle, text: ContextTextBufferHandle): void;
|
|
1026
|
+
createContextTextBufferView(context: NativeContextHandle, text: ContextTextBufferHandle): ContextTextBufferViewHandle;
|
|
1027
|
+
destroyContextTextBufferView(context: NativeContextHandle, view: ContextTextBufferViewHandle): void;
|
|
1028
|
+
contextTextBufferSetText(context: NativeContextHandle, text: ContextTextBufferHandle, bytes: Uint8Array): void;
|
|
1029
|
+
contextTextBufferAppend(context: NativeContextHandle, text: ContextTextBufferHandle, bytes: Uint8Array): void;
|
|
1030
|
+
contextTextBufferClear(context: NativeContextHandle, text: ContextTextBufferHandle, reset?: boolean): void;
|
|
1031
|
+
contextTextBufferSetStyledText(context: NativeContextHandle, text: ContextTextBufferHandle, content: StyledText): void;
|
|
1032
|
+
encodeTextBufferStyledText(content: StyledText): NativeEncodedStyledText;
|
|
1033
|
+
contextTextBufferSetEncodedStyledText(context: NativeContextHandle, text: ContextTextBufferHandle, encoded: NativeEncodedStyledText): void;
|
|
1034
|
+
contextTextBufferReplaceStyledBatch(context: NativeContextHandle, replacements: {
|
|
1035
|
+
buffer: ContextTextBufferHandle;
|
|
1036
|
+
view: ContextTextBufferViewHandle;
|
|
1037
|
+
text: NativeEncodedStyledText;
|
|
1038
|
+
}[], beforeNative: () => void): Uint32Array | null;
|
|
1039
|
+
contextTextBufferSetSyntaxStyle(context: NativeContextHandle, text: ContextTextBufferHandle, style: ContextSyntaxStyleHandle | null): void;
|
|
1040
|
+
contextTextBufferGetInfo(context: NativeContextHandle, text: ContextTextBufferHandle): NativeTextBufferInfo;
|
|
1041
|
+
private readText;
|
|
1042
|
+
contextTextBufferGetText(context: NativeContextHandle, text: ContextTextBufferHandle): string;
|
|
1043
|
+
contextTextBufferGetRange(context: NativeContextHandle, text: ContextTextBufferHandle, start: number, end: number): string;
|
|
1044
|
+
contextTextBufferSetDefaults(context: NativeContextHandle, text: ContextTextBufferHandle, mask: NativeEditorStyleMask, style: NativeEditorStyle): void;
|
|
1045
|
+
contextTextBufferSetTabWidth(context: NativeContextHandle, text: ContextTextBufferHandle, width: number): void;
|
|
1046
|
+
contextTextBufferHighlight(context: NativeContextHandle, text: ContextTextBufferHandle, operation: NativeEditHighlightOperation, argument?: number, highlight?: Highlight): void;
|
|
1047
|
+
contextTextBufferGetHighlights(context: NativeContextHandle, text: ContextTextBufferHandle, line: number): Highlight[];
|
|
1048
|
+
contextTextBufferViewSetViewport(context: NativeContextHandle, view: ContextTextBufferViewHandle, viewport: NativeEditorViewport, sizeOnly?: boolean): void;
|
|
1049
|
+
contextTextBufferViewCommand(context: NativeContextHandle, view: ContextTextBufferViewHandle, command: NativeTextViewCommand, argument: number): void;
|
|
1050
|
+
contextTextBufferViewSetTabColor(context: NativeContextHandle, view: ContextTextBufferViewHandle, color: RGBA | null): void;
|
|
1051
|
+
contextTextBufferViewSelect(context: NativeContextHandle, view: ContextTextBufferViewHandle, selection: NativeEditorSelection): boolean;
|
|
1052
|
+
/**
|
|
1053
|
+
* Resets read only the operation, so each uses one prepared record. Text view selection never calls back.
|
|
1054
|
+
* A reset of a view with no selection changes nothing, so `clear` skips the native call after the checks.
|
|
1055
|
+
*/
|
|
1056
|
+
contextTextBufferViewResetSelection(context: NativeContextHandle, view: ContextTextBufferViewHandle, local: boolean, clear?: boolean): void;
|
|
1057
|
+
contextTextBufferViewGetInfo(context: NativeContextHandle, view: ContextTextBufferViewHandle): NativeEditorViewInfo;
|
|
1058
|
+
contextTextBufferViewGetSelectedText(context: NativeContextHandle, view: ContextTextBufferViewHandle): string;
|
|
1059
|
+
contextTextBufferViewGetLines(context: NativeContextHandle, view: ContextTextBufferViewHandle, logical?: boolean, firstLine?: number, lineCount?: number): LineInfo;
|
|
1060
|
+
contextTextBufferViewMeasure(context: NativeContextHandle, view: ContextTextBufferViewHandle, width: number, height: number): MeasureResult;
|
|
1061
|
+
sceneSetTextView(context: NativeContextHandle, node: SceneNodeHandle, view: ContextTextBufferViewHandle | null): void;
|
|
1062
|
+
sceneSetTextViewPaint(context: NativeContextHandle, node: SceneNodeHandle, enabled: boolean): void;
|
|
1063
|
+
contextDrawTextBufferView({ context, target, frame }: NativeDrawingTarget, view: ContextTextBufferViewHandle, x: number, y: number): void;
|
|
1064
|
+
contextDrawEditorView({ context, target, frame }: NativeDrawingTarget, view: ContextEditorViewHandle, x: number, y: number): void;
|
|
1065
|
+
contextDrawSceneText({ context, target, frame }: NativeDrawingTarget, node: SceneNodeHandle, x: number, y: number): void;
|
|
1066
|
+
createContextEditBuffer(context: NativeContextHandle, options?: NativeContextEditBufferOptions): ContextEditBufferHandle;
|
|
1067
|
+
destroyContextEditBuffer(context: NativeContextHandle, editBuffer: ContextEditBufferHandle): void;
|
|
1068
|
+
createContextEditorView(context: NativeContextHandle, editBuffer: ContextEditBufferHandle, width: number, height: number): ContextEditorViewHandle;
|
|
1069
|
+
destroyContextEditorView(context: NativeContextHandle, view: ContextEditorViewHandle): void;
|
|
1070
|
+
createContextSyntaxStyle(context: NativeContextHandle): ContextSyntaxStyleHandle;
|
|
1071
|
+
destroyContextSyntaxStyle(context: NativeContextHandle, style: ContextSyntaxStyleHandle): void;
|
|
1072
|
+
contextEditBufferSetSyntaxStyle(context: NativeContextHandle, editBuffer: ContextEditBufferHandle, style: ContextSyntaxStyleHandle | null): void;
|
|
1073
|
+
contextEditBufferSetText(context: NativeContextHandle, editBuffer: ContextEditBufferHandle, bytes: Uint8Array, preserveHistory?: boolean): void;
|
|
1074
|
+
contextEditBufferInsertText(context: NativeContextHandle, editBuffer: ContextEditBufferHandle, bytes: Uint8Array): void;
|
|
1075
|
+
contextEditBufferDeleteRange(context: NativeContextHandle, editBuffer: ContextEditBufferHandle, startRow: number, startCol: number, endRow: number, endCol: number): void;
|
|
1076
|
+
contextEditBufferSetCursor(context: NativeContextHandle, editBuffer: ContextEditBufferHandle, row: number, col: number): void;
|
|
1077
|
+
contextEditBufferGetText(context: NativeContextHandle, editBuffer: ContextEditBufferHandle): string;
|
|
1078
|
+
contextEditBufferGetInfo(context: NativeContextHandle, editBuffer: ContextEditBufferHandle): NativeEditBufferInfo;
|
|
1079
|
+
contextEditBufferSetTabWidth(context: NativeContextHandle, editBuffer: ContextEditBufferHandle, width: number): void;
|
|
1080
|
+
contextEditBufferCommand(context: NativeContextHandle, editBuffer: ContextEditBufferHandle, command: NativeEditCommand, argument?: number): void;
|
|
1081
|
+
contextEditBufferHistory(context: NativeContextHandle, editBuffer: ContextEditBufferHandle, redo: boolean): string | null;
|
|
1082
|
+
contextEditBufferGetPosition(context: NativeContextHandle, editBuffer: ContextEditBufferHandle, query: NativeEditPositionQuery, a?: number, b?: number): LogicalCursor | null;
|
|
1083
|
+
contextEditBufferGetRange(context: NativeContextHandle, editBuffer: ContextEditBufferHandle, byCoords: boolean, startRow: number, startCol: number, endRow: number, endCol: number): string;
|
|
1084
|
+
contextEditBufferSetDefaults(context: NativeContextHandle, editBuffer: ContextEditBufferHandle, mask: NativeEditorStyleMask, style: NativeEditorStyle): void;
|
|
1085
|
+
contextSyntaxStyleRegister(context: NativeContextHandle, style: ContextSyntaxStyleHandle, name: string, definition: NativeEditorStyle): number;
|
|
1086
|
+
contextSyntaxStyleResolveByName(context: NativeContextHandle, style: ContextSyntaxStyleHandle, name: string): number | null;
|
|
1087
|
+
contextSyntaxStyleGetStyleCount(context: NativeContextHandle, style: ContextSyntaxStyleHandle): number;
|
|
1088
|
+
contextEditBufferHighlight(context: NativeContextHandle, editBuffer: ContextEditBufferHandle, operation: NativeEditHighlightOperation, argument?: number, highlight?: Highlight): void;
|
|
1089
|
+
contextEditBufferGetHighlights(context: NativeContextHandle, editBuffer: ContextEditBufferHandle, line: number): Highlight[];
|
|
1090
|
+
contextEditorViewSetViewport(context: NativeContextHandle, view: ContextEditorViewHandle, viewport: NativeEditorViewport, sizeOnly?: boolean, moveCursor?: boolean): void;
|
|
1091
|
+
contextEditorViewGetViewport(context: NativeContextHandle, view: ContextEditorViewHandle): NativeEditorViewport;
|
|
1092
|
+
contextEditorViewSetScrollMargin(context: NativeContextHandle, view: ContextEditorViewHandle, margin: number): void;
|
|
1093
|
+
contextEditorViewCommand(context: NativeContextHandle, view: ContextEditorViewHandle, command: NativeEditorCommand, argument?: number): void;
|
|
1094
|
+
contextEditorViewReplaceSelection(context: NativeContextHandle, view: ContextEditorViewHandle, bytes: Uint8Array): NativeEditorReplacement;
|
|
1095
|
+
contextEditorViewSetTabColor(context: NativeContextHandle, view: ContextEditorViewHandle, color: RGBA | null): void;
|
|
1096
|
+
contextEditorViewSelect(context: NativeContextHandle, view: ContextEditorViewHandle, selection: NativeEditorSelection): boolean;
|
|
1097
|
+
contextEditorViewGetInfo(context: NativeContextHandle, view: ContextEditorViewHandle, followCursor?: boolean): NativeEditorViewInfo;
|
|
1098
|
+
contextEditorViewGetSelection(context: NativeContextHandle, view: ContextEditorViewHandle): Pick<NativeEditorViewInfo, "selection" | "selectionOccupancy">;
|
|
1099
|
+
contextEditorViewGetSelectedText(context: NativeContextHandle, view: ContextEditorViewHandle): string;
|
|
1100
|
+
contextEditorViewGetPosition(context: NativeContextHandle, view: ContextEditorViewHandle, query: NativeEditorPositionQuery): VisualCursor;
|
|
1101
|
+
contextEditorViewGetLines(context: NativeContextHandle, view: ContextEditorViewHandle, logical?: boolean): LineInfo;
|
|
1102
|
+
contextEditorViewMeasure(context: NativeContextHandle, view: ContextEditorViewHandle, width: number, height: number): MeasureResult;
|
|
1103
|
+
contextEditorViewSetPlaceholder(context: NativeContextHandle, view: ContextEditorViewHandle, content: StyledText): void;
|
|
1104
|
+
onContextEditEvent(context: NativeContextHandle, editBuffer: ContextEditBufferHandle, handler: (event: NativeEditEventName) => void): () => void;
|
|
1105
|
+
sceneSetEditorView(context: NativeContextHandle, node: SceneNodeHandle, view: ContextEditorViewHandle | null): void;
|
|
1106
|
+
sceneSetEditorOptions(context: NativeContextHandle, node: SceneNodeHandle, options: NativeSceneEditorOptions): void;
|
|
1107
|
+
destroyContextImage(context: NativeContextHandle, image: ContextImageHandle): void;
|
|
1108
|
+
sceneSetImage(context: NativeContextHandle, node: SceneNodeHandle, image: ContextImageHandle | null, fit: "fit" | "cover" | "fill", protocol: ImageRenderProtocol, buffer: ContextBufferHandle | null): void;
|
|
1109
|
+
contextDrawImage({ context, target, frame }: NativeDrawingTarget, image: ContextImageHandle, options: NativeContextImageDraw): boolean;
|
|
1110
|
+
sessionSetImageResolution(context: NativeContextHandle, session: SessionHandle, terminalWidth: number, terminalHeight: number, pixelWidth: number, pixelHeight: number): void;
|
|
1111
|
+
sessionSetKittyImageTransport(context: NativeContextHandle, session: SessionHandle, mode: number): void;
|
|
1112
|
+
sessionGetKittyImageTransport(context: NativeContextHandle, session: SessionHandle): NativeSessionKittyImageTransportStatus;
|
|
1113
|
+
sessionPollKittyImageTransport(context: NativeContextHandle, session: SessionHandle, nowNs: bigint): boolean;
|
|
1114
|
+
sessionCancelKittyImageTransport(context: NativeContextHandle, session: SessionHandle, failed: boolean): void;
|
|
1115
|
+
sessionProcessKittyImageReply(context: NativeContextHandle, session: SessionHandle, bytes: Uint8Array): number;
|
|
1116
|
+
sessionStartKittyFileProbe(context: NativeContextHandle, session: SessionHandle): void;
|
|
1117
|
+
createContextBuffer(context: NativeContextHandle, options: NativeContextBufferOptions): ContextBufferHandle;
|
|
1118
|
+
destroyContextBuffer(context: NativeContextHandle, buffer: ContextBufferHandle): void;
|
|
1119
|
+
contextResizeBuffer(context: NativeContextHandle, buffer: ContextBufferHandle, width: number, height: number): void;
|
|
1120
|
+
contextDrawBuffer(drawing: NativeDrawingTarget, options: NativeBufferDraw): void;
|
|
1121
|
+
contextBufferStack({ context, target, frame }: NativeDrawingTarget, options: NativeBufferStack): number;
|
|
1122
|
+
contextDrawGrid({ context, target, frame }: NativeDrawingTarget, options: NativeBufferGrid): void;
|
|
1123
|
+
contextDrawPackedBuffer({ context, target, frame }: NativeDrawingTarget, data: Uint8Array | PointerInput, byteLength: number, x: number, y: number, width: number, height: number): void;
|
|
1124
|
+
contextDrawSuperSampleBuffer({ context, target, frame }: NativeDrawingTarget, data: Uint8Array | PointerInput, byteLength: number, x: number, y: number, format: "rgba8unorm" | "bgra8unorm", stride: number): void;
|
|
1125
|
+
contextDrawGrayscaleBuffer({ context, target, frame }: NativeDrawingTarget, data: Float32Array, x: number, y: number, width: number, height: number, foreground: RGBA | null, background: RGBA | null, supersampled: boolean): void;
|
|
1126
|
+
contextColorMatrixBuffer({ context, target, frame }: NativeDrawingTarget, matrix: Float32Array, mask: Float32Array | null, strength: number, channel: number): void;
|
|
1127
|
+
contextAcquireBufferLease(context: NativeContextHandle, buffer: ContextBufferHandle): NativeContextBufferLease;
|
|
1128
|
+
createSession(context: NativeContextHandle, options: NativeSessionOptions): SessionHandle;
|
|
1129
|
+
sessionGetWriteLimit(context: NativeContextHandle, session: SessionHandle): bigint;
|
|
1130
|
+
sessionWrite(context: NativeContextHandle, session: SessionHandle, bytes: Uint8Array): void;
|
|
1131
|
+
sessionAttachRenderer(context: NativeContextHandle, session: SessionHandle, options: NativeSessionRendererOptions): void;
|
|
1132
|
+
sessionResizeRenderer(context: NativeContextHandle, session: SessionHandle, width: number, height: number): void;
|
|
1133
|
+
sessionSetDebugOverlay(context: NativeContextHandle, session: SessionHandle, enabled: boolean, corner: DebugOverlayCorner): void;
|
|
1134
|
+
sessionUpdateStats(context: NativeContextHandle, session: SessionHandle, overallMs: number, fps: number, callbackMs: number): void;
|
|
1135
|
+
sessionUpdateMemoryStats(context: NativeContextHandle, session: SessionHandle, heapUsed: number, heapTotal: number, arrayBuffers: number): void;
|
|
1136
|
+
sessionDumpHitGrid(context: NativeContextHandle, session: SessionHandle): void;
|
|
1137
|
+
sessionGetRendererState(context: NativeContextHandle, session: SessionHandle): NativeSessionRendererState;
|
|
1138
|
+
sessionAcquireBufferLease(context: NativeContextHandle, session: SessionHandle, which: SessionBuffer): NativeSessionBufferLease;
|
|
1139
|
+
sessionGetLinkId(context: NativeContextHandle, session: SessionHandle, x: number, y: number): number;
|
|
1140
|
+
private acquireBufferLease;
|
|
1141
|
+
contextValidateBufferLease(context: NativeContextHandle, lease: ContextObjectHandle): void;
|
|
1142
|
+
contextReleaseBufferLease(context: NativeContextHandle, lease: ContextObjectHandle): void;
|
|
1143
|
+
contextBufferLeaseGetRealCharSize(context: NativeContextHandle, lease: ContextObjectHandle, addLineBreaks: boolean): number;
|
|
1144
|
+
contextBufferLeaseWriteResolvedChars(context: NativeContextHandle, lease: ContextObjectHandle, bytes: Uint8Array, addLineBreaks: boolean, cellLengths?: Uint8Array): number;
|
|
1145
|
+
sessionSetupTerminal(context: NativeContextHandle, session: SessionHandle, options?: NativeSessionTerminalOptions): void;
|
|
1146
|
+
sessionSuspend(context: NativeContextHandle, session: SessionHandle): void;
|
|
1147
|
+
sessionResume(context: NativeContextHandle, session: SessionHandle): void;
|
|
1148
|
+
sessionGetTerminalState(context: NativeContextHandle, session: SessionHandle): NativeSessionTerminalPhase;
|
|
1149
|
+
sessionPump(context: NativeContextHandle, session: SessionHandle, nowNs: bigint, workBudget: number): NativeSessionPumpResult;
|
|
1150
|
+
sessionPumpExit(context: NativeContextHandle, session: SessionHandle): NativeSessionPumpStatus;
|
|
1151
|
+
/** Discards terminal input queued on process stdin. Best effort; see `ot_terminal_flush_input`. */
|
|
1152
|
+
terminalFlushInput(): void;
|
|
1153
|
+
sessionControl(context: NativeContextHandle, session: SessionHandle, command: NativeSessionControl): void;
|
|
1154
|
+
sessionClipboard(context: NativeContextHandle, session: SessionHandle, target: number, bytes: Uint8Array): boolean;
|
|
1155
|
+
sessionNotification(context: NativeContextHandle, session: SessionHandle, message: string, title?: string): boolean;
|
|
1156
|
+
sessionSetPaletteState(context: NativeContextHandle, session: SessionHandle, palette: readonly RGBA[], foreground: RGBA, background: RGBA, epoch: number): void;
|
|
1157
|
+
sessionSetCursor(context: NativeContextHandle, session: SessionHandle, options: NativeSessionCursorOptions): void;
|
|
1158
|
+
sessionGetCapabilities(context: NativeContextHandle, session: SessionHandle): NativeSessionCapabilities;
|
|
1159
|
+
sessionReadOutput(context: NativeContextHandle, session: SessionHandle, bytes: Uint8Array): NativeOutputTicket | null;
|
|
1160
|
+
sessionDrainStdout(context: NativeContextHandle, session: SessionHandle, maxBytes?: number): number;
|
|
1161
|
+
sessionCompleteOutput(context: NativeContextHandle, session: SessionHandle, ticket: NativeOutputTicket, success: boolean): void;
|
|
1162
|
+
sessionClose(context: NativeContextHandle, session: SessionHandle): void;
|
|
1163
|
+
sessionCancel(context: NativeContextHandle, session: SessionHandle): void;
|
|
1164
|
+
sessionGetState(context: NativeContextHandle, session: SessionHandle): NativeSessionState;
|
|
1165
|
+
destroySession(context: NativeContextHandle, session: SessionHandle): void;
|
|
1166
|
+
sceneCreateNode(context: NativeContextHandle, session: SessionHandle, kind: (typeof SCENE_NODE_KINDS)[number], num: number): SceneNodeHandle;
|
|
1167
|
+
sceneDestroyNode(context: NativeContextHandle, node: SceneNodeHandle): void;
|
|
1168
|
+
sceneSetMeasure(context: NativeContextHandle, node: SceneNodeHandle, measure: MeasureFunction | null): void;
|
|
1169
|
+
sceneHasMeasure(context: NativeContextHandle, node: SceneNodeHandle): boolean;
|
|
1170
|
+
sceneMarkDirty(context: NativeContextHandle, node: SceneNodeHandle): void;
|
|
1171
|
+
sceneMoveNode(context: NativeContextHandle, node: SceneNodeHandle, parent: SceneNodeHandle | null, index: number): void;
|
|
1172
|
+
sceneSetViewport(context: NativeContextHandle, node: SceneNodeHandle, viewport: SceneNodeHandle | null): void;
|
|
1173
|
+
sceneSetFocus(context: NativeContextHandle, node: SceneNodeHandle, focused: boolean): void;
|
|
1174
|
+
sceneGetStyle(context: NativeContextHandle, node: SceneNodeHandle, group: number, kind: number, edge: number): {
|
|
1175
|
+
unit: number;
|
|
1176
|
+
value: number;
|
|
248
1177
|
};
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
1178
|
+
sceneSetBoxDetails(context: NativeContextHandle, node: SceneNodeHandle, details: NativeSceneBoxDetails): void;
|
|
1179
|
+
sceneSetSurface(context: NativeContextHandle, node: SceneNodeHandle, buffer: ContextBufferHandle | null): void;
|
|
1180
|
+
/** Consume only native's accepted prefix. Allocation or admission failures leave
|
|
1181
|
+
* the suffix staged so a retry cannot lose writes or replay accepted entries. A record
|
|
1182
|
+
* that native rejects for its node can never apply, so it is dropped and reported once;
|
|
1183
|
+
* paint fields the node staged since the last flush share that record and are dropped too. */
|
|
1184
|
+
sceneFlush(context: NativeContextHandle, staging: SceneStaging): void;
|
|
1185
|
+
sceneSetText(context: NativeContextHandle, node: SceneNodeHandle, bytes: Uint8Array): void;
|
|
1186
|
+
sceneSetStyledText(context: NativeContextHandle, node: SceneNodeHandle, content: StyledText): void;
|
|
1187
|
+
private encodeStyledText;
|
|
1188
|
+
sceneSetSlider(context: NativeContextHandle, node: SceneNodeHandle, options: NativeSceneSliderOptions): void;
|
|
1189
|
+
sceneGetSliderThumb(context: NativeContextHandle, node: SceneNodeHandle): {
|
|
1190
|
+
size: number;
|
|
1191
|
+
start: number;
|
|
256
1192
|
};
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
bufferDrawGrid: (buffer: OptimizedBufferHandle, borderChars: Uint32Array, borderFg: RGBA, borderBg: RGBA, columnOffsets: Int32Array, columnCount: number, rowOffsets: Int32Array, rowCount: number, options: {
|
|
309
|
-
drawInner: boolean;
|
|
310
|
-
drawOuter: boolean;
|
|
311
|
-
}) => void;
|
|
312
|
-
bufferDrawBox: (buffer: OptimizedBufferHandle, x: number, y: number, width: number, height: number, borderChars: Uint32Array, packedOptions: number, borderColor: RGBA, backgroundColor: RGBA, titleColor: RGBA, title: string | null, bottomTitle: string | null) => void;
|
|
313
|
-
bufferResize: (buffer: OptimizedBufferHandle, width: number, height: number) => void;
|
|
314
|
-
resizeRenderer: (renderer: RendererHandle, width: number, height: number) => void;
|
|
315
|
-
setCursorPosition: (renderer: RendererHandle, x: number, y: number, visible: boolean) => void;
|
|
316
|
-
setCursorColor: (renderer: RendererHandle, color: RGBA) => void;
|
|
317
|
-
getCursorState: (renderer: RendererHandle) => CursorState;
|
|
318
|
-
setCursorStyleOptions: (renderer: RendererHandle, options: CursorStyleOptions) => void;
|
|
319
|
-
setDebugOverlay: (renderer: RendererHandle, enabled: boolean, corner: DebugOverlayCorner) => void;
|
|
320
|
-
clearTerminal: (renderer: RendererHandle) => void;
|
|
321
|
-
setTerminalTitle: (renderer: RendererHandle, title: string) => void;
|
|
322
|
-
copyToClipboardOSC52: (renderer: RendererHandle, target: number, textUtf8: Uint8Array) => boolean;
|
|
323
|
-
clearClipboardOSC52: (renderer: RendererHandle, target: number) => boolean;
|
|
324
|
-
clipboardServiceCreate: (maxConcurrentOperations: number, maxProviderTransfers: number, waylandSeat?: string) => ClipboardServiceHandle | null;
|
|
325
|
-
clipboardServiceBeginShutdown: (service: ClipboardServiceHandle) => NativeClipboardShutdownStatus;
|
|
326
|
-
clipboardServicePollShutdown: (service: ClipboardServiceHandle) => NativeClipboardShutdownStatus;
|
|
327
|
-
clipboardServiceDestroy: (service: ClipboardServiceHandle) => NativeClipboardDestroyStatus;
|
|
328
|
-
clipboardServiceDrain: (service: ClipboardServiceHandle) => number;
|
|
329
|
-
clipboardReadOperationStart: (service: ClipboardServiceHandle, request: Uint8Array, selection: number, maxBytes: number, maxImagePixels: number, maxConversionBytes: number, timeoutMs: number) => {
|
|
1193
|
+
sceneSetArrow(context: NativeContextHandle, node: SceneNodeHandle, options: NativeSceneArrowOptions): void;
|
|
1194
|
+
sceneSetTextOptions(context: NativeContextHandle, node: SceneNodeHandle, options: NativeSceneTextOptions): void;
|
|
1195
|
+
sceneSetTextSelection(context: NativeContextHandle, node: SceneNodeHandle, options: NativeSceneTextSelectionOptions): boolean;
|
|
1196
|
+
sceneGetTextSelection(context: NativeContextHandle, node: SceneNodeHandle): {
|
|
1197
|
+
start: number;
|
|
1198
|
+
end: number;
|
|
1199
|
+
} | null;
|
|
1200
|
+
sceneGetSelectedText(context: NativeContextHandle, node: SceneNodeHandle): string;
|
|
1201
|
+
sceneGetTextMetrics(context: NativeContextHandle, node: SceneNodeHandle): NativeSceneTextMetrics;
|
|
1202
|
+
private sceneTextMetrics;
|
|
1203
|
+
sceneGetText(context: NativeContextHandle, node: SceneNodeHandle): string;
|
|
1204
|
+
sceneGetTextLineInfo(context: NativeContextHandle, node: SceneNodeHandle, firstLine?: number, lineCount?: number): LineInfo;
|
|
1205
|
+
sceneGetLayout(context: NativeContextHandle, node: SceneNodeHandle, observation?: boolean | "paint"): NativeSceneLayout;
|
|
1206
|
+
sceneSetHooks(context: NativeContextHandle, node: SceneNodeHandle, flags: number, generation: bigint, initialWidth: number, initialHeight: number): void;
|
|
1207
|
+
/** Paint options can change between steps; attempt limits remain fixed.
|
|
1208
|
+
* A RECORD acknowledgement passes its recording; null records nothing. */
|
|
1209
|
+
sceneFrameStep(context: NativeContextHandle, session: SessionHandle, previous: NativeSceneFrameRequest | null, options: NativeSceneFrameOptions, maxWorkItems?: number, recording?: Uint8Array | null): NativeSceneFrameRequest;
|
|
1210
|
+
private sceneFrameStepWithMeasures;
|
|
1211
|
+
/** Run a native release now, or after the frame step that paints the Context's open paint recording.
|
|
1212
|
+
* A recording names resources that native code reads only when it paints, so every resource that a
|
|
1213
|
+
* paint hook can draw is released through here. */
|
|
1214
|
+
releaseAfterPaint(context: NativeContextHandle, release: () => void): void;
|
|
1215
|
+
/** Slots of the exact pending RECORD request, in paint order. */
|
|
1216
|
+
sceneFrameGetPaintSlots(context: NativeContextHandle, session: SessionHandle, frame: NativeSceneFrameRequest): NativeScenePaintSlot[];
|
|
1217
|
+
sceneFrameAcquireBufferLease(context: NativeContextHandle, session: SessionHandle, frame: NativeSceneFrameRequest, which: SessionBuffer): NativeContextBufferLease;
|
|
1218
|
+
/** Every returned status consumes the draft; an admission exception preserves it for retry. */
|
|
1219
|
+
sceneFrameCommit(context: NativeContextHandle, session: SessionHandle, frame: NativeSceneFrameRequest, force: boolean): NativeSessionRenderStatus;
|
|
1220
|
+
sceneFrameCancel(context: NativeContextHandle, session: SessionHandle, frameId: bigint): void;
|
|
1221
|
+
sceneHitTest(context: NativeContextHandle, session: SessionHandle, x: number, y: number): number;
|
|
1222
|
+
sceneGetStats(context: NativeContextHandle, session: SessionHandle): NativeRenderStats;
|
|
1223
|
+
sceneGetCursorState(context: NativeContextHandle, session: SessionHandle): CursorState;
|
|
1224
|
+
constructor(libPath?: string);
|
|
1225
|
+
/** Drains queued Context diagnostics and logs the records at `maxLevel` or more severe; it drops the rest. One call
|
|
1226
|
+
* drains at most one full queue. Records that console handlers add meanwhile wait for the next call. */
|
|
1227
|
+
logContextDiagnostics(context: NativeContextHandle, maxLevel?: LogLevel): void;
|
|
1228
|
+
private logMessage;
|
|
1229
|
+
private setupLogging;
|
|
1230
|
+
private setLogCallback;
|
|
1231
|
+
/** Hands the process log callback to the newest remaining main-thread library, or clears it after the last one. */
|
|
1232
|
+
private releaseProcessLog;
|
|
1233
|
+
dispose(): void;
|
|
1234
|
+
private ensureNativeSpanFeedCallback;
|
|
1235
|
+
clipboardServiceCreate(maxConcurrentOperations: number, maxProviderTransfers: number, waylandSeat?: string): ClipboardServiceHandle | null;
|
|
1236
|
+
private clipboardContext;
|
|
1237
|
+
private clipboardOperationArgs;
|
|
1238
|
+
clipboardServiceBeginShutdown(service: ClipboardServiceHandle): NativeClipboardShutdownStatus;
|
|
1239
|
+
clipboardServicePollShutdown(service: ClipboardServiceHandle): NativeClipboardShutdownStatus;
|
|
1240
|
+
clipboardServiceDestroy(service: ClipboardServiceHandle): NativeClipboardDestroyStatus;
|
|
1241
|
+
clipboardServiceDrain(service: ClipboardServiceHandle): number;
|
|
1242
|
+
private clipboardStart;
|
|
1243
|
+
clipboardReadOperationStart(service: ClipboardServiceHandle, request: Uint8Array, selection: number, maxBytes: number, maxImagePixels: number, maxConversionBytes: number, timeoutMs: number): {
|
|
330
1244
|
status: NativeClipboardStartStatus;
|
|
331
1245
|
operation: ClipboardOperationHandle | null;
|
|
332
1246
|
};
|
|
333
|
-
clipboardWriteOperationStart
|
|
1247
|
+
clipboardWriteOperationStart(service: ClipboardServiceHandle, textUtf8: Uint8Array, selection: number, timeoutMs: number): {
|
|
334
1248
|
status: NativeClipboardStartStatus;
|
|
335
1249
|
operation: ClipboardOperationHandle | null;
|
|
336
1250
|
};
|
|
337
|
-
clipboardClearOperationStart
|
|
1251
|
+
clipboardClearOperationStart(service: ClipboardServiceHandle, selection: number, timeoutMs: number): {
|
|
338
1252
|
status: NativeClipboardStartStatus;
|
|
339
1253
|
operation: ClipboardOperationHandle | null;
|
|
340
1254
|
};
|
|
341
|
-
clipboardOperationPoll
|
|
342
|
-
clipboardOperationCancel
|
|
343
|
-
|
|
1255
|
+
clipboardOperationPoll(operation: ClipboardOperationHandle): NativeClipboardOperationStatus;
|
|
1256
|
+
clipboardOperationCancel(operation: ClipboardOperationHandle): NativeClipboardCancelStatus;
|
|
1257
|
+
private clipboardResultLength;
|
|
1258
|
+
clipboardOperationResultMimeLength(operation: ClipboardOperationHandle): {
|
|
344
1259
|
status: NativeClipboardCopyStatus;
|
|
345
1260
|
length: number;
|
|
346
1261
|
};
|
|
347
|
-
clipboardOperationResultMimeCopy
|
|
348
|
-
clipboardOperationResultDataLength
|
|
1262
|
+
clipboardOperationResultMimeCopy(operation: ClipboardOperationHandle, output: Uint8Array): NativeClipboardCopyStatus;
|
|
1263
|
+
clipboardOperationResultDataLength(operation: ClipboardOperationHandle): {
|
|
349
1264
|
status: NativeClipboardCopyStatus;
|
|
350
1265
|
length: number;
|
|
351
1266
|
};
|
|
352
|
-
clipboardOperationResultDataCopy
|
|
353
|
-
clipboardOperationResultErrorCode
|
|
1267
|
+
clipboardOperationResultDataCopy(operation: ClipboardOperationHandle, output: Uint8Array): NativeClipboardCopyStatus;
|
|
1268
|
+
clipboardOperationResultErrorCode(operation: ClipboardOperationHandle): {
|
|
354
1269
|
status: NativeClipboardCopyStatus;
|
|
355
1270
|
errorCode: number;
|
|
356
1271
|
};
|
|
357
|
-
clipboardOperationResultDiagnosticLength
|
|
1272
|
+
clipboardOperationResultDiagnosticLength(operation: ClipboardOperationHandle): {
|
|
358
1273
|
status: NativeClipboardCopyStatus;
|
|
359
1274
|
length: number;
|
|
360
1275
|
};
|
|
361
|
-
clipboardOperationResultDiagnosticCopy
|
|
362
|
-
clipboardOperationDestroy
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
textBufferRegisterMemBuffer: (buffer: TextBufferHandle, bytes: Uint8Array, owned?: boolean) => number;
|
|
447
|
-
textBufferReplaceMemBuffer: (buffer: TextBufferHandle, memId: number, bytes: Uint8Array, owned?: boolean) => boolean;
|
|
448
|
-
textBufferClearMemRegistry: (buffer: TextBufferHandle) => void;
|
|
449
|
-
textBufferSetTextFromMem: (buffer: TextBufferHandle, memId: number) => void;
|
|
450
|
-
textBufferAppend: (buffer: TextBufferHandle, bytes: Uint8Array) => void;
|
|
451
|
-
textBufferAppendFromMemId: (buffer: TextBufferHandle, memId: number) => void;
|
|
452
|
-
textBufferLoadFile: (buffer: TextBufferHandle, path: string) => boolean;
|
|
453
|
-
textBufferSetStyledText: (buffer: TextBufferHandle, chunks: Array<{
|
|
454
|
-
text: string;
|
|
455
|
-
fg?: RGBA | null;
|
|
456
|
-
bg?: RGBA | null;
|
|
457
|
-
attributes?: number;
|
|
458
|
-
link?: {
|
|
459
|
-
url: string;
|
|
460
|
-
};
|
|
461
|
-
}>) => void;
|
|
462
|
-
textBufferSetDefaultFg: (buffer: TextBufferHandle, fg: RGBA | null) => void;
|
|
463
|
-
textBufferSetDefaultBg: (buffer: TextBufferHandle, bg: RGBA | null) => void;
|
|
464
|
-
textBufferSetDefaultAttributes: (buffer: TextBufferHandle, attributes: number | null) => void;
|
|
465
|
-
textBufferResetDefaults: (buffer: TextBufferHandle) => void;
|
|
466
|
-
textBufferGetTabWidth: (buffer: TextBufferHandle) => number;
|
|
467
|
-
textBufferSetTabWidth: (buffer: TextBufferHandle, width: number) => void;
|
|
468
|
-
textBufferGetLineCount: (buffer: TextBufferHandle) => number;
|
|
469
|
-
getPlainTextBytes: (buffer: TextBufferHandle, maxLength: number) => Uint8Array | null;
|
|
470
|
-
textBufferGetTextRange: (buffer: TextBufferHandle, startOffset: number, endOffset: number, maxLength: number) => Uint8Array | null;
|
|
471
|
-
textBufferGetTextRangeByCoords: (buffer: TextBufferHandle, startRow: number, startCol: number, endRow: number, endCol: number, maxLength: number) => Uint8Array | null;
|
|
472
|
-
createTextBufferView: (textBuffer: TextBufferHandle) => TextBufferViewHandle;
|
|
473
|
-
destroyTextBufferView: (view: TextBufferViewHandle) => void;
|
|
474
|
-
textBufferViewSetSelection: (view: TextBufferViewHandle, start: number, end: number, bgColor: RGBA | null, fgColor: RGBA | null) => void;
|
|
475
|
-
textBufferViewResetSelection: (view: TextBufferViewHandle) => void;
|
|
476
|
-
textBufferViewGetSelection: (view: TextBufferViewHandle) => {
|
|
477
|
-
start: number;
|
|
478
|
-
end: number;
|
|
479
|
-
} | null;
|
|
480
|
-
textBufferViewSetLocalSelection: (view: TextBufferViewHandle, anchorX: number, anchorY: number, focusX: number, focusY: number, bgColor: RGBA | null, fgColor: RGBA | null, behavior?: SelectionBehavior) => boolean;
|
|
481
|
-
textBufferViewUpdateSelection: (view: TextBufferViewHandle, end: number, bgColor: RGBA | null, fgColor: RGBA | null) => void;
|
|
482
|
-
textBufferViewUpdateLocalSelection: (view: TextBufferViewHandle, anchorX: number, anchorY: number, focusX: number, focusY: number, bgColor: RGBA | null, fgColor: RGBA | null, behavior?: SelectionBehavior) => boolean;
|
|
483
|
-
textBufferViewResetLocalSelection: (view: TextBufferViewHandle) => void;
|
|
484
|
-
textBufferViewSetSelectionOccupancy: (view: TextBufferViewHandle, occupancy: SelectionOccupancy) => void;
|
|
485
|
-
textBufferViewGetSelectionOccupancy: (view: TextBufferViewHandle) => SelectionOccupancy;
|
|
486
|
-
textBufferViewSetWrapWidth: (view: TextBufferViewHandle, width: number) => void;
|
|
487
|
-
textBufferViewSetWrapMode: (view: TextBufferViewHandle, mode: "none" | "char" | "word") => void;
|
|
488
|
-
textBufferViewSetTextAlign: (view: TextBufferViewHandle, alignment: "left" | "center" | "right") => void;
|
|
489
|
-
textBufferViewSetFirstLineOffset: (view: TextBufferViewHandle, offset: number) => void;
|
|
490
|
-
textBufferViewSetViewportSize: (view: TextBufferViewHandle, width: number, height: number) => void;
|
|
491
|
-
textBufferViewSetViewport: (view: TextBufferViewHandle, x: number, y: number, width: number, height: number) => void;
|
|
492
|
-
textBufferViewGetLineInfo: (view: TextBufferViewHandle) => LineInfo;
|
|
493
|
-
textBufferViewGetLogicalLineInfo: (view: TextBufferViewHandle) => LineInfo;
|
|
494
|
-
textBufferViewGetLineSources: (view: TextBufferViewHandle, startLine: number, lineCount: number) => number[];
|
|
495
|
-
textBufferViewGetSelectedTextBytes: (view: TextBufferViewHandle, maxLength: number) => Uint8Array | null;
|
|
496
|
-
textBufferViewGetPlainTextBytes: (view: TextBufferViewHandle, maxLength: number) => Uint8Array | null;
|
|
497
|
-
textBufferViewSetTabIndicator: (view: TextBufferViewHandle, indicator: number) => void;
|
|
498
|
-
textBufferViewSetTabIndicatorColor: (view: TextBufferViewHandle, color: RGBA) => void;
|
|
499
|
-
textBufferViewSetTruncate: (view: TextBufferViewHandle, truncate: boolean) => void;
|
|
500
|
-
textBufferViewMeasureForDimensions: (view: TextBufferViewHandle, width: number, height: number) => MeasureResult | null;
|
|
501
|
-
textBufferViewGetVirtualLineCount: (view: TextBufferViewHandle) => number;
|
|
502
|
-
readonly encoder: TextEncoder;
|
|
503
|
-
readonly decoder: TextDecoder;
|
|
504
|
-
bufferDrawTextBufferView: (buffer: OptimizedBufferHandle, view: TextBufferViewHandle, x: number, y: number) => void;
|
|
505
|
-
bufferDrawEditorView: (buffer: OptimizedBufferHandle, view: EditorViewHandle, x: number, y: number) => void;
|
|
506
|
-
createEditBuffer: (widthMethod: WidthMethod) => EditBufferHandle;
|
|
507
|
-
destroyEditBuffer: (buffer: EditBufferHandle) => void;
|
|
508
|
-
editBufferSetText: (buffer: EditBufferHandle, textBytes: Uint8Array) => void;
|
|
509
|
-
editBufferSetTextFromMem: (buffer: EditBufferHandle, memId: number) => void;
|
|
510
|
-
editBufferReplaceText: (buffer: EditBufferHandle, textBytes: Uint8Array) => void;
|
|
511
|
-
editBufferReplaceTextFromMem: (buffer: EditBufferHandle, memId: number) => void;
|
|
512
|
-
editBufferGetText: (buffer: EditBufferHandle, maxLength: number) => Uint8Array | null;
|
|
513
|
-
editBufferInsertChar: (buffer: EditBufferHandle, char: string) => void;
|
|
514
|
-
editBufferInsertText: (buffer: EditBufferHandle, text: string) => void;
|
|
515
|
-
editBufferDeleteChar: (buffer: EditBufferHandle) => void;
|
|
516
|
-
editBufferDeleteCharBackward: (buffer: EditBufferHandle) => void;
|
|
517
|
-
editBufferDeleteRange: (buffer: EditBufferHandle, startLine: number, startCol: number, endLine: number, endCol: number) => void;
|
|
518
|
-
editBufferNewLine: (buffer: EditBufferHandle) => void;
|
|
519
|
-
editBufferDeleteLine: (buffer: EditBufferHandle) => void;
|
|
520
|
-
editBufferMoveCursorLeft: (buffer: EditBufferHandle) => void;
|
|
521
|
-
editBufferMoveCursorRight: (buffer: EditBufferHandle) => void;
|
|
522
|
-
editBufferMoveCursorUp: (buffer: EditBufferHandle) => void;
|
|
523
|
-
editBufferMoveCursorDown: (buffer: EditBufferHandle) => void;
|
|
524
|
-
editBufferGotoLine: (buffer: EditBufferHandle, line: number) => void;
|
|
525
|
-
editBufferSetCursor: (buffer: EditBufferHandle, line: number, col: number) => void;
|
|
526
|
-
editBufferSetCursorToLineCol: (buffer: EditBufferHandle, line: number, col: number) => void;
|
|
527
|
-
editBufferSetCursorByOffset: (buffer: EditBufferHandle, offset: number) => void;
|
|
528
|
-
editBufferGetCursorPosition: (buffer: EditBufferHandle) => LogicalCursor;
|
|
529
|
-
editBufferGetId: (buffer: EditBufferHandle) => number;
|
|
530
|
-
editBufferGetTextBuffer: (buffer: EditBufferHandle) => TextBufferHandle;
|
|
531
|
-
editBufferSetTabWidth: (buffer: EditBufferHandle, width: number) => void;
|
|
532
|
-
editBufferDebugLogRope: (buffer: EditBufferHandle) => void;
|
|
533
|
-
editBufferUndo: (buffer: EditBufferHandle, maxLength: number) => Uint8Array | null;
|
|
534
|
-
editBufferRedo: (buffer: EditBufferHandle, maxLength: number) => Uint8Array | null;
|
|
535
|
-
editBufferCanUndo: (buffer: EditBufferHandle) => boolean;
|
|
536
|
-
editBufferCanRedo: (buffer: EditBufferHandle) => boolean;
|
|
537
|
-
editBufferClearHistory: (buffer: EditBufferHandle) => void;
|
|
538
|
-
editBufferClear: (buffer: EditBufferHandle) => void;
|
|
539
|
-
editBufferGetNextWordBoundary: (buffer: EditBufferHandle) => {
|
|
540
|
-
row: number;
|
|
541
|
-
col: number;
|
|
542
|
-
offset: number;
|
|
543
|
-
};
|
|
544
|
-
editBufferGetPrevWordBoundary: (buffer: EditBufferHandle) => {
|
|
545
|
-
row: number;
|
|
546
|
-
col: number;
|
|
547
|
-
offset: number;
|
|
548
|
-
};
|
|
549
|
-
editBufferGetEOL: (buffer: EditBufferHandle) => {
|
|
550
|
-
row: number;
|
|
551
|
-
col: number;
|
|
552
|
-
offset: number;
|
|
553
|
-
};
|
|
554
|
-
editBufferOffsetToPosition: (buffer: EditBufferHandle, offset: number) => {
|
|
555
|
-
row: number;
|
|
556
|
-
col: number;
|
|
557
|
-
offset: number;
|
|
558
|
-
} | null;
|
|
559
|
-
editBufferPositionToOffset: (buffer: EditBufferHandle, row: number, col: number) => number;
|
|
560
|
-
editBufferGetLineStartOffset: (buffer: EditBufferHandle, row: number) => number;
|
|
561
|
-
editBufferGetTextRange: (buffer: EditBufferHandle, startOffset: number, endOffset: number, maxLength: number) => Uint8Array | null;
|
|
562
|
-
editBufferGetTextRangeByCoords: (buffer: EditBufferHandle, startRow: number, startCol: number, endRow: number, endCol: number, maxLength: number) => Uint8Array | null;
|
|
563
|
-
createEditorView: (editBufferPtr: EditBufferHandle, viewportWidth: number, viewportHeight: number) => EditorViewHandle;
|
|
564
|
-
destroyEditorView: (view: EditorViewHandle) => void;
|
|
565
|
-
editorViewSetViewportSize: (view: EditorViewHandle, width: number, height: number) => void;
|
|
566
|
-
editorViewSetViewport: (view: EditorViewHandle, x: number, y: number, width: number, height: number, moveCursor: boolean) => void;
|
|
567
|
-
editorViewGetViewport: (view: EditorViewHandle) => {
|
|
568
|
-
offsetY: number;
|
|
569
|
-
offsetX: number;
|
|
570
|
-
height: number;
|
|
571
|
-
width: number;
|
|
1276
|
+
clipboardOperationResultDiagnosticCopy(operation: ClipboardOperationHandle, output: Uint8Array): NativeClipboardCopyStatus;
|
|
1277
|
+
clipboardOperationDestroy(operation: ClipboardOperationHandle): NativeClipboardDestroyStatus;
|
|
1278
|
+
getYogaHost(): YogaHost;
|
|
1279
|
+
private yogaMutation;
|
|
1280
|
+
private yogaChecked;
|
|
1281
|
+
yogaConfigCreate(): Pointer;
|
|
1282
|
+
yogaConfigFree(config: Pointer): void;
|
|
1283
|
+
yogaConfigSetCallbacks(config: Pointer, measure: Pointer, dirtied: Pointer): boolean;
|
|
1284
|
+
yogaConfigClearCallbacks(config: Pointer, measure: Pointer): boolean;
|
|
1285
|
+
yogaConfigSetUseWebDefaults(config: Pointer, enabled: boolean): void;
|
|
1286
|
+
yogaConfigGetUseWebDefaults(config: Pointer): boolean;
|
|
1287
|
+
yogaConfigSetPointScaleFactor(config: Pointer, pointScaleFactor: number): void;
|
|
1288
|
+
yogaConfigGetPointScaleFactor(config: Pointer): number;
|
|
1289
|
+
yogaConfigSetErrata(config: Pointer, errata: number): void;
|
|
1290
|
+
yogaConfigGetErrata(config: Pointer): number;
|
|
1291
|
+
yogaConfigSetExperimentalFeatureEnabled(config: Pointer, feature: number, enabled: boolean): void;
|
|
1292
|
+
yogaConfigIsExperimentalFeatureEnabled(config: Pointer, feature: number): boolean;
|
|
1293
|
+
yogaNodeCreateForOpenTUI(): Pointer;
|
|
1294
|
+
yogaNodeCreateWithConfig(config: Pointer): Pointer;
|
|
1295
|
+
yogaNodeGetConfig(node: Pointer): Pointer;
|
|
1296
|
+
yogaNodeFree(node: Pointer): void;
|
|
1297
|
+
yogaNodeFreeRecursive(node: Pointer): void;
|
|
1298
|
+
yogaNodeReset(node: Pointer): void;
|
|
1299
|
+
yogaNodeCopyStyle(dstNode: Pointer, srcNode: Pointer): void;
|
|
1300
|
+
yogaNodeInsertChild(node: Pointer, child: Pointer, index: number): void;
|
|
1301
|
+
yogaNodeRemoveChild(node: Pointer, child: Pointer): void;
|
|
1302
|
+
yogaNodeRemoveAllChildren(node: Pointer): void;
|
|
1303
|
+
yogaNodeGetChild(node: Pointer, index: number): Pointer | null;
|
|
1304
|
+
yogaNodeGetChildCount(node: Pointer): number;
|
|
1305
|
+
yogaNodeGetParent(node: Pointer): Pointer | null;
|
|
1306
|
+
yogaNodeCalculateLayout(node: Pointer, width: number, height: number, direction: number): void;
|
|
1307
|
+
yogaNodeIsDirty(node: Pointer): boolean;
|
|
1308
|
+
yogaNodeMarkDirty(node: Pointer): void;
|
|
1309
|
+
yogaNodeGetHasNewLayout(node: Pointer): boolean;
|
|
1310
|
+
yogaNodeSetHasNewLayout(node: Pointer, hasNewLayout: boolean): void;
|
|
1311
|
+
yogaNodeSetIsReferenceBaseline(node: Pointer, isReferenceBaseline: boolean): void;
|
|
1312
|
+
yogaNodeIsReferenceBaseline(node: Pointer): boolean;
|
|
1313
|
+
yogaNodeSetAlwaysFormsContainingBlock(node: Pointer, alwaysFormsContainingBlock: boolean): void;
|
|
1314
|
+
yogaNodeGetAlwaysFormsContainingBlock(node: Pointer): boolean;
|
|
1315
|
+
yogaNodeGetComputedLayout(node: Pointer): NativeYogaLayout;
|
|
1316
|
+
yogaNodeLayoutGetEdge(node: Pointer, kind: number, edge: number): number;
|
|
1317
|
+
yogaNodeStyleSetEnum(node: Pointer, kind: number, value: number): void;
|
|
1318
|
+
yogaNodeStyleGetEnum(node: Pointer, kind: number): number;
|
|
1319
|
+
yogaNodeStyleSetFloat(node: Pointer, kind: number, value: number): void;
|
|
1320
|
+
yogaNodeStyleGetFloat(node: Pointer, kind: number): number;
|
|
1321
|
+
yogaNodeStyleSetBorder(node: Pointer, edge: number, border: number): void;
|
|
1322
|
+
yogaNodeStyleGetBorder(node: Pointer, edge: number): number;
|
|
1323
|
+
yogaNodeStyleSetValue(node: Pointer, kind: number, edgeOrGutter: number, unit: number, value: number): void;
|
|
1324
|
+
yogaNodeStyleGetValue(node: Pointer, kind: number, edgeOrGutter: number): number | bigint;
|
|
1325
|
+
yogaNodeSetMeasureFunc(node: Pointer, enabled: boolean): void;
|
|
1326
|
+
yogaNodeUnsetMeasureFunc(node: Pointer): void;
|
|
1327
|
+
yogaNodeHasMeasureFunc(node: Pointer): boolean;
|
|
1328
|
+
yogaNodeSetDirtiedFunc(node: Pointer, enabled: boolean): void;
|
|
1329
|
+
yogaNodeUnsetDirtiedFunc(node: Pointer): void;
|
|
1330
|
+
yogaStoreMeasureResult(config: Pointer, width: number, height: number): void;
|
|
1331
|
+
createYogaMeasureCallback(callback: NativeYogaMeasureCallback): FFICallbackInstance;
|
|
1332
|
+
createYogaDirtiedCallback(callback: NativeYogaDirtiedCallback): FFICallbackInstance;
|
|
1333
|
+
/** Always 0: native resources no longer allocate from a process arena. */
|
|
1334
|
+
getArenaAllocatedBytes(): number;
|
|
1335
|
+
getBuildOptions(): BuildOptions;
|
|
1336
|
+
/** Stats of the process allocator, which backs native span feeds. Each Context has its own allocator, so Context
|
|
1337
|
+
* resources such as text, buffers, scenes, images, and audio engines are not counted. */
|
|
1338
|
+
getAllocatorStats(): AllocatorStats;
|
|
1339
|
+
private tryCreateStandaloneContext;
|
|
1340
|
+
createAudioEngine(options?: AudioCreateOptions | null): AudioEngineHandle | null;
|
|
1341
|
+
destroyAudioEngine(engine: AudioEngineHandle): void;
|
|
1342
|
+
private audioContext;
|
|
1343
|
+
audioRefreshPlaybackDevices(engine: AudioEngineHandle): number;
|
|
1344
|
+
audioGetPlaybackDeviceCount(engine: AudioEngineHandle): number;
|
|
1345
|
+
audioGetPlaybackDeviceName(engine: AudioEngineHandle, index: number): string;
|
|
1346
|
+
audioIsPlaybackDeviceDefault(engine: AudioEngineHandle, index: number): boolean;
|
|
1347
|
+
audioSelectPlaybackDevice(engine: AudioEngineHandle, index: number): number;
|
|
1348
|
+
audioClearPlaybackDeviceSelection(engine: AudioEngineHandle): void;
|
|
1349
|
+
audioRefreshCaptureDevices(engine: AudioEngineHandle): number;
|
|
1350
|
+
audioGetCaptureDeviceCount(engine: AudioEngineHandle): number;
|
|
1351
|
+
audioGetCaptureDeviceName(engine: AudioEngineHandle, index: number): string;
|
|
1352
|
+
audioIsCaptureDeviceDefault(engine: AudioEngineHandle, index: number): boolean;
|
|
1353
|
+
audioSelectCaptureDevice(engine: AudioEngineHandle, index: number): number;
|
|
1354
|
+
audioClearCaptureDeviceSelection(engine: AudioEngineHandle): void;
|
|
1355
|
+
audioStartCapture(engine: AudioEngineHandle, options: AudioStartOptions | undefined, channels: number, capacityFrames: number): number;
|
|
1356
|
+
audioStopCapture(engine: AudioEngineHandle): number;
|
|
1357
|
+
audioIsCaptureRunning(engine: AudioEngineHandle): boolean;
|
|
1358
|
+
audioReadCapture(engine: AudioEngineHandle, outBuffer: Float32Array, frameCount: number): {
|
|
1359
|
+
status: number;
|
|
1360
|
+
framesRead: number;
|
|
572
1361
|
};
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
syntaxStyleResolveByName: (style: SyntaxStyleHandle, name: string) => number | null;
|
|
641
|
-
syntaxStyleGetStyleCount: (style: SyntaxStyleHandle) => number;
|
|
642
|
-
imageInfo: (data: Uint8Array) => {
|
|
1362
|
+
audioGetCaptureStats(engine: AudioEngineHandle): {
|
|
1363
|
+
status: number;
|
|
1364
|
+
stats: NativeAudioCaptureStats | null;
|
|
1365
|
+
};
|
|
1366
|
+
audioStart(engine: AudioEngineHandle, options?: AudioStartOptions | null): number;
|
|
1367
|
+
audioStartMixer(engine: AudioEngineHandle): number;
|
|
1368
|
+
audioStop(engine: AudioEngineHandle): number;
|
|
1369
|
+
audioCreateStream(engine: AudioEngineHandle, options: AudioStreamCreateOptions): {
|
|
1370
|
+
status: number;
|
|
1371
|
+
streamId: number | null;
|
|
1372
|
+
};
|
|
1373
|
+
audioWriteStream(engine: AudioEngineHandle, streamId: number, data: Uint8Array): number;
|
|
1374
|
+
audioEndStream(engine: AudioEngineHandle, streamId: number): number;
|
|
1375
|
+
audioRestartStream(engine: AudioEngineHandle, streamId: number): number;
|
|
1376
|
+
audioSetStreamVolume(engine: AudioEngineHandle, streamId: number, volume: number): number;
|
|
1377
|
+
audioSetStreamPan(engine: AudioEngineHandle, streamId: number, pan: number): number;
|
|
1378
|
+
audioSetStreamGroup(engine: AudioEngineHandle, streamId: number, groupId: number): number;
|
|
1379
|
+
audioGetStreamStats(engine: AudioEngineHandle, streamId: number): NativeAudioStreamStats | null;
|
|
1380
|
+
audioCloseStream(engine: AudioEngineHandle, streamId: number, reason: NativeAudioStreamCloseReason): {
|
|
1381
|
+
status: number;
|
|
1382
|
+
stats: NativeAudioStreamStats | null;
|
|
1383
|
+
};
|
|
1384
|
+
audioLoad(engine: AudioEngineHandle, data: Uint8Array): {
|
|
1385
|
+
status: number;
|
|
1386
|
+
soundId: number | null;
|
|
1387
|
+
};
|
|
1388
|
+
audioUnload(engine: AudioEngineHandle, soundId: number): number;
|
|
1389
|
+
audioPlay(engine: AudioEngineHandle, soundId: number, options?: AudioVoiceOptions): {
|
|
1390
|
+
status: number;
|
|
1391
|
+
voiceId: number | null;
|
|
1392
|
+
};
|
|
1393
|
+
audioStopVoice(engine: AudioEngineHandle, voiceId: number): number;
|
|
1394
|
+
audioSetVoiceGroup(engine: AudioEngineHandle, voiceId: number, groupId: number): number;
|
|
1395
|
+
audioCreateGroup(engine: AudioEngineHandle, name: string): {
|
|
1396
|
+
status: number;
|
|
1397
|
+
groupId: number | null;
|
|
1398
|
+
};
|
|
1399
|
+
audioSetGroupVolume(engine: AudioEngineHandle, groupId: number, volume: number): number;
|
|
1400
|
+
audioSetMasterVolume(engine: AudioEngineHandle, volume: number): number;
|
|
1401
|
+
audioMixToBuffer(engine: AudioEngineHandle, outBuffer: Float32Array, frameCount: number, channels: number): number;
|
|
1402
|
+
audioEnableTap(engine: AudioEngineHandle, enabled: boolean, capacityFrames: number): number;
|
|
1403
|
+
audioReadTap(engine: AudioEngineHandle, outBuffer: Float32Array, frameCount: number, channels: number): {
|
|
1404
|
+
status: number;
|
|
1405
|
+
framesRead: number;
|
|
1406
|
+
};
|
|
1407
|
+
audioGetStats(engine: AudioEngineHandle): AudioStats | null;
|
|
1408
|
+
registerNativeSpanFeedStream(stream: Pointer, handler: NativeSpanFeedEventHandler): void;
|
|
1409
|
+
unregisterNativeSpanFeedStream(stream: Pointer): void;
|
|
1410
|
+
createNativeSpanFeed(options?: NativeSpanFeedOptions | null): Pointer;
|
|
1411
|
+
attachNativeSpanFeed(stream: Pointer): number;
|
|
1412
|
+
destroyNativeSpanFeed(stream: Pointer): number;
|
|
1413
|
+
streamWrite(stream: Pointer, data: Uint8Array | string): number;
|
|
1414
|
+
streamCommit(stream: Pointer): number;
|
|
1415
|
+
streamDrainSpans(stream: Pointer, outBuffer: Uint8Array, maxSpans: number): number;
|
|
1416
|
+
streamReleaseSpan(stream: Pointer, slotIndex: number, releaseId: bigint): number;
|
|
1417
|
+
streamClose(stream: Pointer): number;
|
|
1418
|
+
streamGetStats(stream: Pointer): NativeSpanFeedStats | null;
|
|
1419
|
+
streamReserve(stream: Pointer, minLen: number): {
|
|
1420
|
+
status: number;
|
|
1421
|
+
info: ReserveInfo | null;
|
|
1422
|
+
};
|
|
1423
|
+
streamCommitReserved(stream: Pointer, length: number): number;
|
|
1424
|
+
private imageStatus;
|
|
1425
|
+
private imageCall;
|
|
1426
|
+
private imageOutput;
|
|
1427
|
+
private imageInfoOutput;
|
|
1428
|
+
imageInfo(context: NativeContextHandle, data: Uint8Array): {
|
|
643
1429
|
status: number;
|
|
644
1430
|
info: NativeImageInfo;
|
|
645
1431
|
};
|
|
646
|
-
|
|
647
|
-
imageReleaseIccCache: () => void;
|
|
648
|
-
imageTestFailIccProfileCopyAllocationOnce: () => void;
|
|
649
|
-
imageDecode: (data: Uint8Array) => {
|
|
1432
|
+
imageDecode(context: NativeContextHandle, data: Uint8Array): {
|
|
650
1433
|
status: number;
|
|
651
1434
|
handle: ImageHandle | null;
|
|
652
1435
|
};
|
|
653
|
-
imageCreateFromRgba:
|
|
1436
|
+
imageCreateFromRgba(context: NativeContextHandle, pixels: Uint8Array, width: number, height: number, stride: number): {
|
|
654
1437
|
status: number;
|
|
655
1438
|
handle: ImageHandle | null;
|
|
656
1439
|
};
|
|
657
|
-
imageCreateFromPixels:
|
|
1440
|
+
imageCreateFromPixels(context: NativeContextHandle, pixels: Uint8Array, width: number, height: number, stride: number, format: number, alpha: number): {
|
|
658
1441
|
status: number;
|
|
659
1442
|
handle: ImageHandle | null;
|
|
660
1443
|
};
|
|
661
|
-
imageUpdatePixels
|
|
662
|
-
imageDestroy
|
|
663
|
-
imageRetain
|
|
1444
|
+
imageUpdatePixels(image: ImageHandle, pixels: Uint8Array, stride: number, format: number, alpha: number): number;
|
|
1445
|
+
imageDestroy(image: ImageHandle): void;
|
|
1446
|
+
imageRetain(image: ImageHandle): {
|
|
664
1447
|
status: number;
|
|
665
1448
|
handle: ImageHandle | null;
|
|
666
1449
|
};
|
|
667
|
-
|
|
1450
|
+
imageRetainIccCache(): void;
|
|
1451
|
+
imageReleaseIccCache(): void;
|
|
1452
|
+
imageGetInfo(image: ImageHandle): {
|
|
668
1453
|
status: number;
|
|
669
1454
|
info: NativeImageInfo;
|
|
670
1455
|
};
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
imageGetPixelsPtr: (image: ImageHandle) => Pointer | null;
|
|
674
|
-
imageClone: (image: ImageHandle) => {
|
|
1456
|
+
imageEnsureEncodedPng(image: ImageHandle): number;
|
|
1457
|
+
imageCopyPng(image: ImageHandle, destination: Uint8Array): {
|
|
675
1458
|
status: number;
|
|
676
|
-
|
|
1459
|
+
byteCount: number;
|
|
677
1460
|
};
|
|
678
|
-
|
|
679
|
-
|
|
1461
|
+
imageTakePixels(image: ImageHandle): {
|
|
1462
|
+
status: number;
|
|
1463
|
+
lease: ContextImagePixelsHandle | null;
|
|
1464
|
+
pointer: Pointer | null;
|
|
1465
|
+
byteCount: number;
|
|
1466
|
+
};
|
|
1467
|
+
imageReleasePixels(lease: ContextImagePixelsHandle): void;
|
|
1468
|
+
imageClone(image: ImageHandle, context?: NativeContextHandle): {
|
|
680
1469
|
status: number;
|
|
681
1470
|
handle: ImageHandle | null;
|
|
682
1471
|
};
|
|
683
|
-
|
|
1472
|
+
imageCopyPixels(image: ImageHandle, destination: Uint8Array, stride: number, bgra: boolean): number;
|
|
1473
|
+
imageResize(image: ImageHandle, width: number, height: number, filter: number): {
|
|
684
1474
|
status: number;
|
|
685
1475
|
handle: ImageHandle | null;
|
|
686
1476
|
};
|
|
687
|
-
|
|
1477
|
+
imageExtract(image: ImageHandle, left: number, top: number, width: number, height: number): {
|
|
688
1478
|
status: number;
|
|
689
1479
|
handle: ImageHandle | null;
|
|
690
1480
|
};
|
|
691
|
-
|
|
1481
|
+
imageExtend(image: ImageHandle, top: number, right: number, bottom: number, left: number, background: Uint8Array): {
|
|
692
1482
|
status: number;
|
|
693
1483
|
handle: ImageHandle | null;
|
|
694
1484
|
};
|
|
695
|
-
|
|
1485
|
+
imageTransform(image: ImageHandle, operation: number): {
|
|
696
1486
|
status: number;
|
|
697
1487
|
handle: ImageHandle | null;
|
|
698
1488
|
};
|
|
699
|
-
|
|
700
|
-
processCapabilityResponse: (renderer: RendererHandle, response: string) => void;
|
|
701
|
-
setKittyImageTransport: (renderer: RendererHandle, mode: number) => boolean;
|
|
702
|
-
getKittyImageTransport: (renderer: RendererHandle) => Uint32Array;
|
|
703
|
-
pollKittyImageTransport: (renderer: RendererHandle) => boolean;
|
|
704
|
-
cancelKittyImageTransport: (renderer: RendererHandle, failed: boolean) => void;
|
|
705
|
-
processKittyImageReply: (renderer: RendererHandle, response: string) => number;
|
|
706
|
-
encodeUnicode: (text: string, widthMethod: WidthMethod) => {
|
|
707
|
-
ptr: Pointer;
|
|
708
|
-
data: Array<{
|
|
709
|
-
width: number;
|
|
710
|
-
char: number;
|
|
711
|
-
}>;
|
|
712
|
-
} | null;
|
|
713
|
-
freeUnicode: (encoded: {
|
|
714
|
-
ptr: Pointer;
|
|
715
|
-
data: Array<{
|
|
716
|
-
width: number;
|
|
717
|
-
char: number;
|
|
718
|
-
}>;
|
|
719
|
-
}) => void;
|
|
720
|
-
bufferDrawChar: (buffer: OptimizedBufferHandle, char: number, x: number, y: number, fg: RGBA, bg: RGBA, attributes?: number) => void;
|
|
721
|
-
registerNativeSpanFeedStream: (stream: Pointer, handler: NativeSpanFeedEventHandler) => void;
|
|
722
|
-
unregisterNativeSpanFeedStream: (stream: Pointer) => void;
|
|
723
|
-
createNativeSpanFeed: (options?: NativeSpanFeedOptions | null) => Pointer;
|
|
724
|
-
attachNativeSpanFeed: (stream: Pointer) => number;
|
|
725
|
-
destroyNativeSpanFeed: (stream: Pointer) => void;
|
|
726
|
-
streamWrite: (stream: Pointer, data: Uint8Array | string) => number;
|
|
727
|
-
streamCommit: (stream: Pointer) => number;
|
|
728
|
-
streamDrainSpans: (stream: Pointer, outBuffer: Uint8Array, maxSpans: number) => number;
|
|
729
|
-
streamClose: (stream: Pointer) => number;
|
|
730
|
-
streamSetOptions: (stream: Pointer, options: NativeSpanFeedOptions) => number;
|
|
731
|
-
streamGetStats: (stream: Pointer) => NativeSpanFeedStats | null;
|
|
732
|
-
streamReserve: (stream: Pointer, minLen: number) => {
|
|
1489
|
+
imageComposite(base: ImageHandle, overlay: ImageHandle, left: number, top: number, blend: number, opacity: number): {
|
|
733
1490
|
status: number;
|
|
734
|
-
|
|
1491
|
+
handle: ImageHandle | null;
|
|
735
1492
|
};
|
|
736
|
-
streamCommitReserved: (stream: Pointer, length: number) => number;
|
|
737
|
-
createNativeRenderable: () => NativeRenderableHandle;
|
|
738
|
-
destroyNativeRenderable: (handle: NativeRenderableHandle) => void;
|
|
739
|
-
nativeRenderableAttachYogaNode: (handle: NativeRenderableHandle, node: Pointer) => boolean;
|
|
740
|
-
nativeRenderableSetMeasureTarget: (handle: NativeRenderableHandle, kind: NativeMeasureTargetKind, target: NativeMeasureTargetHandle | 0) => boolean;
|
|
741
|
-
createEmbeddedTerminal: (options: {
|
|
742
|
-
cols: number;
|
|
743
|
-
rows: number;
|
|
744
|
-
maxScrollback?: number;
|
|
745
|
-
}) => EmbeddedTerminalHandle;
|
|
746
|
-
destroyEmbeddedTerminal: (handle: EmbeddedTerminalHandle) => void;
|
|
747
|
-
embeddedTerminalWrite: (handle: EmbeddedTerminalHandle, data: string | Uint8Array) => void;
|
|
748
|
-
embeddedTerminalResize: (handle: EmbeddedTerminalHandle, cols: number, rows: number) => void;
|
|
749
|
-
embeddedTerminalInvalidate: (handle: EmbeddedTerminalHandle) => void;
|
|
750
|
-
embeddedTerminalSetTransparentBackground: (handle: EmbeddedTerminalHandle, transparent: boolean) => void;
|
|
751
|
-
embeddedTerminalScroll: (handle: EmbeddedTerminalHandle, delta: number) => void;
|
|
752
|
-
embeddedTerminalSetSelection: (handle: EmbeddedTerminalHandle, start: {
|
|
753
|
-
x: number;
|
|
754
|
-
y: number;
|
|
755
|
-
}, end: {
|
|
756
|
-
x: number;
|
|
757
|
-
y: number;
|
|
758
|
-
}) => void;
|
|
759
|
-
embeddedTerminalClearSelection: (handle: EmbeddedTerminalHandle) => void;
|
|
760
|
-
embeddedTerminalGetSelectedText: (handle: EmbeddedTerminalHandle) => Uint8Array;
|
|
761
|
-
embeddedTerminalCompose: (handle: EmbeddedTerminalHandle, target: OptimizedBufferHandle, x: number, y: number) => void;
|
|
762
|
-
embeddedTerminalCursor: (handle: EmbeddedTerminalHandle) => EmbeddedTerminalCursor;
|
|
763
|
-
embeddedTerminalEncodeKey: (handle: EmbeddedTerminalHandle, key: EmbeddedTerminalKey) => Uint8Array;
|
|
764
|
-
embeddedTerminalEncodeMouse: (handle: EmbeddedTerminalHandle, mouse: EmbeddedTerminalMouse) => Uint8Array;
|
|
765
|
-
embeddedTerminalEncodePaste: (handle: EmbeddedTerminalHandle, input: Uint8Array) => Uint8Array;
|
|
766
|
-
embeddedTerminalEncodeFocus: (handle: EmbeddedTerminalHandle, focused: boolean) => Uint8Array;
|
|
767
|
-
embeddedTerminalDrainResponses: (handle: EmbeddedTerminalHandle) => Uint8Array;
|
|
768
|
-
onNativeEvent: (name: string, handler: (data: ArrayBuffer) => void) => void;
|
|
769
|
-
onceNativeEvent: (name: string, handler: (data: ArrayBuffer) => void) => void;
|
|
770
|
-
offNativeEvent: (name: string, handler: (data: ArrayBuffer) => void) => void;
|
|
771
|
-
onAnyNativeEvent: (handler: (name: string, data: ArrayBuffer) => void) => void;
|
|
772
1493
|
}
|
|
773
1494
|
export declare function setRenderLibPath(libPath: string): void;
|
|
774
1495
|
export declare function resolveRenderLib(): RenderLib;
|