@trycua/cua-driver 0.34.1 → 0.35.4
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/dist/daemon.d.ts +14 -0
- package/dist/daemon.js +59 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +14 -8
- package/dist/native/cua_driver_contract.d.ts +86 -20
- package/dist/native/cua_driver_contract.js +102 -20
- package/dist/native/cua_driver_sdk-ffi.d.ts +32 -0
- package/dist/native/cua_driver_sdk-ffi.js +160 -0
- package/dist/native/cua_driver_sdk.d.ts +1212 -43
- package/dist/native/cua_driver_sdk.js +1674 -55
- package/package.json +10 -8
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
/* eslint-disable */
|
|
5
5
|
// @ts-nocheck
|
|
6
6
|
import nativeModule from "./cua_driver_sdk-ffi.js";
|
|
7
|
-
import { AbstractFfiConverterByteArray, FfiConverterArray, FfiConverterArrayBuffer, FfiConverterBool, FfiConverterInt32, FfiConverterObject, FfiConverterObjectWithCallbacks, FfiConverterOptional, FfiConverterUInt16, FfiConverterUInt32, FfiConverterUInt64, UniffiAbstractObject, UniffiError, UniffiInternalError, UniffiResult, UniffiRustCaller, destructorGuardSymbol, pointerLiteralSymbol, uniffiCreateFfiConverterString, uniffiCreateRecord, uniffiRustCallAsync, uniffiTraitInterfaceCall, uniffiTraitInterfaceCallAsyncWithError, uniffiTraitInterfaceCallWithError, uniffiTypeNameSymbol, } from "@ubjs/core";
|
|
7
|
+
import { AbstractFfiConverterByteArray, FfiConverterArray, FfiConverterArrayBuffer, FfiConverterBool, FfiConverterFloat64, FfiConverterInt32, FfiConverterObject, FfiConverterObjectWithCallbacks, FfiConverterOptional, FfiConverterUInt16, FfiConverterUInt32, FfiConverterUInt64, UniffiAbstractObject, UniffiEnum, UniffiError, UniffiInternalError, UniffiResult, UniffiRustCaller, destructorGuardSymbol, pointerLiteralSymbol, uniffiCreateFfiConverterString, uniffiCreateRecord, uniffiRustCallAsync, uniffiTraitInterfaceCall, uniffiTraitInterfaceCallAsyncWithError, uniffiTraitInterfaceCallWithError, uniffiTypeNameSymbol, } from "@ubjs/core";
|
|
8
8
|
import uniffiCuaDriverContractModule from "./cua_driver_contract.js";
|
|
9
|
-
const { FfiConverterTypeActionResult, FfiConverterTypeClickInput, FfiConverterTypeClipboardReadInput, FfiConverterTypeClipboardWriteInput, FfiConverterTypeDragInput, FfiConverterTypeEndSessionInput, FfiConverterTypeEndSessionOutput, FfiConverterTypeEscalateSessionInput, FfiConverterTypeGetAgentCursorStateInput, FfiConverterTypeGetCursorPositionInput, FfiConverterTypeGetDesktopStateInput, FfiConverterTypeGetScreenSizeInput, FfiConverterTypeGetSessionInput, FfiConverterTypeGetSessionStateInput, FfiConverterTypeGetWindowStateInput, FfiConverterTypeHotkeyInput, FfiConverterTypeInvokeMenuInput, FfiConverterTypeListAppsInput, FfiConverterTypeListAppsOutput, FfiConverterTypeListSessionsInput, FfiConverterTypeListSessionsOutput, FfiConverterTypeListWindowsInput, FfiConverterTypeListWindowsOutput, FfiConverterTypeMoveCursorInput, FfiConverterTypeParseVisualRegionsInput, FfiConverterTypePressKeyInput, FfiConverterTypeScrollInput, FfiConverterTypeSessionOutput, FfiConverterTypeSessionStateOutput, FfiConverterTypeSetAgentCursorEnabledInput, FfiConverterTypeSetAgentCursorMotionInput, FfiConverterTypeSetAgentCursorThemeInput, FfiConverterTypeSetWindowFrameInput, FfiConverterTypeStartSessionInput, FfiConverterTypeStartSessionOutput, FfiConverterTypeTypeTextInput, FfiConverterTypeVerifyStateInput, FfiConverterTypeVerifyStateOutput, FfiConverterTypeWindowStateOutput } = uniffiCuaDriverContractModule.converters;
|
|
9
|
+
const { FfiConverterTypeActionResult, FfiConverterTypeClickInput, FfiConverterTypeClipboardReadInput, FfiConverterTypeClipboardWriteInput, FfiConverterTypeCursorMotionEffects, FfiConverterTypeCursorMotionEffectsOutput, FfiConverterTypeCursorMotionStyle, FfiConverterTypeCursorMotionTiming, FfiConverterTypeDragInput, FfiConverterTypeEndSessionInput, FfiConverterTypeEndSessionOutput, FfiConverterTypeEscalateSessionInput, FfiConverterTypeGetAgentCursorStateInput, FfiConverterTypeGetCursorPositionInput, FfiConverterTypeGetDesktopStateInput, FfiConverterTypeGetScreenSizeInput, FfiConverterTypeGetSessionInput, FfiConverterTypeGetSessionStateInput, FfiConverterTypeGetWindowStateInput, FfiConverterTypeHotkeyInput, FfiConverterTypeInvokeMenuInput, FfiConverterTypeListAppsInput, FfiConverterTypeListAppsOutput, FfiConverterTypeListSessionsInput, FfiConverterTypeListSessionsOutput, FfiConverterTypeListWindowsInput, FfiConverterTypeListWindowsOutput, FfiConverterTypeMoveCursorInput, FfiConverterTypeParseVisualRegionsInput, FfiConverterTypePressKeyInput, FfiConverterTypeScrollInput, FfiConverterTypeSessionOutput, FfiConverterTypeSessionStateOutput, FfiConverterTypeSetAgentCursorEnabledInput, FfiConverterTypeSetAgentCursorMotionInput, FfiConverterTypeSetAgentCursorThemeInput, FfiConverterTypeSetWindowFrameInput, FfiConverterTypeStartSessionInput, FfiConverterTypeStartSessionOutput, FfiConverterTypeTypeTextInput, FfiConverterTypeVerifyStateInput, FfiConverterTypeVerifyStateOutput, FfiConverterTypeWindowStateOutput } = uniffiCuaDriverContractModule.converters;
|
|
10
10
|
const uniffiCaller = new UniffiRustCaller(() => ({ code: 0 }));
|
|
11
11
|
const uniffiIsDebug =
|
|
12
12
|
// @ts-ignore -- The process global might not be defined
|
|
@@ -87,6 +87,58 @@ export function currentMacOsPermissionStatus() {
|
|
|
87
87
|
},
|
|
88
88
|
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString)));
|
|
89
89
|
}
|
|
90
|
+
/**
|
|
91
|
+
* Click effects (ripple, squish) `age` seconds after a click at `(x, y)`.
|
|
92
|
+
*/
|
|
93
|
+
export function cursorClickEffects(effects, age, x, y) {
|
|
94
|
+
return ((__rb) => {
|
|
95
|
+
try {
|
|
96
|
+
return FfiConverterTypeCursorEffectFrame.lift(__rb);
|
|
97
|
+
}
|
|
98
|
+
finally {
|
|
99
|
+
nativeModule().rustbuffer_free(__rb);
|
|
100
|
+
}
|
|
101
|
+
})(uniffiCaller.rustCall(
|
|
102
|
+
/*caller:*/ (callStatus) => {
|
|
103
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_func_cursor_click_effects(FfiConverterTypeCursorMotionEffectsOutput.lower(effects, nativeModule().rustbuffer_alloc), FfiConverterFloat64.lower(age, nativeModule().rustbuffer_alloc), FfiConverterFloat64.lower(x, nativeModule().rustbuffer_alloc), FfiConverterFloat64.lower(y, nativeModule().rustbuffer_alloc), callStatus);
|
|
104
|
+
},
|
|
105
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString)));
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* The spec behind a built-in style (`signature_arc`, `spring_settle` and
|
|
109
|
+
* `comet_swoop`); `None` for the simulated styles.
|
|
110
|
+
*/
|
|
111
|
+
export function cursorMotionSpecForStyle(style, params) {
|
|
112
|
+
return ((__rb) => {
|
|
113
|
+
try {
|
|
114
|
+
return FfiConverterOptionalTypeCursorMotionSpec.lift(__rb);
|
|
115
|
+
}
|
|
116
|
+
finally {
|
|
117
|
+
nativeModule().rustbuffer_free(__rb);
|
|
118
|
+
}
|
|
119
|
+
})(uniffiCaller.rustCall(
|
|
120
|
+
/*caller:*/ (callStatus) => {
|
|
121
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_func_cursor_motion_spec_for_style(FfiConverterTypeCursorMotionStyle.lower(style, nativeModule().rustbuffer_alloc), FfiConverterTypeCursorMotionParams.lower(params, nativeModule().rustbuffer_alloc), callStatus);
|
|
122
|
+
},
|
|
123
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString)));
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Cua Driver's default motion knobs.
|
|
127
|
+
*/
|
|
128
|
+
export function defaultCursorMotionParams() {
|
|
129
|
+
return ((__rb) => {
|
|
130
|
+
try {
|
|
131
|
+
return FfiConverterTypeCursorMotionParams.lift(__rb);
|
|
132
|
+
}
|
|
133
|
+
finally {
|
|
134
|
+
nativeModule().rustbuffer_free(__rb);
|
|
135
|
+
}
|
|
136
|
+
})(uniffiCaller.rustCall(
|
|
137
|
+
/*caller:*/ (callStatus) => {
|
|
138
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_func_default_cursor_motion_params(callStatus);
|
|
139
|
+
},
|
|
140
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString)));
|
|
141
|
+
}
|
|
90
142
|
export function openMacOsScreenRecordingSettings() {
|
|
91
143
|
uniffiCaller.rustCallWithError(
|
|
92
144
|
/*liftError:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError),
|
|
@@ -106,6 +158,26 @@ export function openMcpDriverChannel(transport, authenticatedPrincipal) {
|
|
|
106
158
|
},
|
|
107
159
|
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString)));
|
|
108
160
|
}
|
|
161
|
+
/**
|
|
162
|
+
* Plan one move for a built-in style.
|
|
163
|
+
*/
|
|
164
|
+
export function planCursorMove(params, request) {
|
|
165
|
+
return FfiConverterTypeCursorTrajectory.lift(uniffiCaller.rustCall(
|
|
166
|
+
/*caller:*/ (callStatus) => {
|
|
167
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_func_plan_cursor_move(FfiConverterTypeCursorMotionParams.lower(params, nativeModule().rustbuffer_alloc), FfiConverterTypeCursorMoveRequest.lower(request, nativeModule().rustbuffer_alloc), callStatus);
|
|
168
|
+
},
|
|
169
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString)));
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Plan one move for a custom spec.
|
|
173
|
+
*/
|
|
174
|
+
export function planCursorSpec(spec, request) {
|
|
175
|
+
return FfiConverterTypeCursorTrajectory.lift(uniffiCaller.rustCall(
|
|
176
|
+
/*caller:*/ (callStatus) => {
|
|
177
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_func_plan_cursor_spec(FfiConverterTypeCursorMotionSpec.lower(spec, nativeModule().rustbuffer_alloc), FfiConverterTypeCursorMoveRequest.lower(request, nativeModule().rustbuffer_alloc), callStatus);
|
|
178
|
+
},
|
|
179
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString)));
|
|
180
|
+
}
|
|
109
181
|
export function requestMacOsPermissions() {
|
|
110
182
|
return ((__rb) => {
|
|
111
183
|
try {
|
|
@@ -142,9 +214,1216 @@ const FfiConverterTypeSessionPermissionMode = (() => {
|
|
|
142
214
|
}
|
|
143
215
|
write(value, into) {
|
|
144
216
|
switch (value) {
|
|
145
|
-
case SessionPermissionMode.Standard: return ordinalConverter.write(1, into);
|
|
146
|
-
case SessionPermissionMode.Bounded: return ordinalConverter.write(2, into);
|
|
147
|
-
case SessionPermissionMode.Unrestricted: return ordinalConverter.write(3, into);
|
|
217
|
+
case SessionPermissionMode.Standard: return ordinalConverter.write(1, into);
|
|
218
|
+
case SessionPermissionMode.Bounded: return ordinalConverter.write(2, into);
|
|
219
|
+
case SessionPermissionMode.Unrestricted: return ordinalConverter.write(3, into);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
allocationSize(value) {
|
|
223
|
+
return ordinalConverter.allocationSize(0);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
return new FFIConverter();
|
|
227
|
+
})();
|
|
228
|
+
const stringConverter = (() => {
|
|
229
|
+
const encoder = new TextEncoder();
|
|
230
|
+
const decoder = new TextDecoder();
|
|
231
|
+
return {
|
|
232
|
+
stringToBytes: (s) => encoder.encode(s),
|
|
233
|
+
bytesToString: (ab) => decoder.decode(ab),
|
|
234
|
+
stringByteLength: (s) => encoder.encode(s).byteLength,
|
|
235
|
+
writeStringIntoBuffer: (s, buf, offset) => {
|
|
236
|
+
const view = new Uint8Array(buf.arrayBuffer, offset, buf.arrayBuffer.byteLength - offset);
|
|
237
|
+
return encoder.encodeInto(s, view).written;
|
|
238
|
+
},
|
|
239
|
+
readStringFromBuffer: (buf, offset, length) => decoder.decode(new Uint8Array(buf.arrayBuffer, offset, length)),
|
|
240
|
+
};
|
|
241
|
+
})();
|
|
242
|
+
const FfiConverterString = uniffiCreateFfiConverterString(stringConverter);
|
|
243
|
+
/**
|
|
244
|
+
* Generated factory for {@link RuntimeAuthorizationOptions} record objects.
|
|
245
|
+
*/
|
|
246
|
+
export const RuntimeAuthorizationOptions = (() => {
|
|
247
|
+
const defaults = () => ({
|
|
248
|
+
compatibilityCapabilityManifestPath: undefined,
|
|
249
|
+
});
|
|
250
|
+
const create = (() => {
|
|
251
|
+
return uniffiCreateRecord(defaults);
|
|
252
|
+
})();
|
|
253
|
+
return Object.freeze({
|
|
254
|
+
create,
|
|
255
|
+
new: create,
|
|
256
|
+
defaults: () => Object.freeze(defaults()),
|
|
257
|
+
});
|
|
258
|
+
})();
|
|
259
|
+
const FfiConverterTypeRuntimeAuthorizationOptions = (() => {
|
|
260
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
261
|
+
read(from) {
|
|
262
|
+
return {
|
|
263
|
+
allowedModes: FfiConverterSequenceTypeSessionPermissionMode.read(from),
|
|
264
|
+
compatibilityMode: FfiConverterTypeSessionPermissionMode.read(from),
|
|
265
|
+
compatibilityCapabilityManifestPath: FfiConverterOptionalString.read(from),
|
|
266
|
+
compatibilityBoundedManifestPath: FfiConverterOptionalString.read(from),
|
|
267
|
+
unrestrictedAcknowledged: FfiConverterBool.read(from),
|
|
268
|
+
maxSessionTtlSeconds: FfiConverterUInt64.read(from),
|
|
269
|
+
maxIdleTtlSeconds: FfiConverterUInt64.read(from)
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
write(value, into) {
|
|
273
|
+
FfiConverterSequenceTypeSessionPermissionMode.write(value.allowedModes, into);
|
|
274
|
+
FfiConverterTypeSessionPermissionMode.write(value.compatibilityMode, into);
|
|
275
|
+
FfiConverterOptionalString.write(value.compatibilityCapabilityManifestPath, into);
|
|
276
|
+
FfiConverterOptionalString.write(value.compatibilityBoundedManifestPath, into);
|
|
277
|
+
FfiConverterBool.write(value.unrestrictedAcknowledged, into);
|
|
278
|
+
FfiConverterUInt64.write(value.maxSessionTtlSeconds, into);
|
|
279
|
+
FfiConverterUInt64.write(value.maxIdleTtlSeconds, into);
|
|
280
|
+
}
|
|
281
|
+
allocationSize(value) {
|
|
282
|
+
return FfiConverterSequenceTypeSessionPermissionMode.allocationSize(value.allowedModes) +
|
|
283
|
+
FfiConverterTypeSessionPermissionMode.allocationSize(value.compatibilityMode) +
|
|
284
|
+
FfiConverterOptionalString.allocationSize(value.compatibilityCapabilityManifestPath) +
|
|
285
|
+
FfiConverterOptionalString.allocationSize(value.compatibilityBoundedManifestPath) +
|
|
286
|
+
FfiConverterBool.allocationSize(value.unrestrictedAcknowledged) +
|
|
287
|
+
FfiConverterUInt64.allocationSize(value.maxSessionTtlSeconds) +
|
|
288
|
+
FfiConverterUInt64.allocationSize(value.maxIdleTtlSeconds);
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
;
|
|
292
|
+
return new FFIConverter();
|
|
293
|
+
})();
|
|
294
|
+
/**
|
|
295
|
+
* Generated factory for {@link ConfiguredDriverOptions} record objects.
|
|
296
|
+
*/
|
|
297
|
+
export const ConfiguredDriverOptions = (() => {
|
|
298
|
+
const defaults = () => ({});
|
|
299
|
+
const create = (() => {
|
|
300
|
+
return uniffiCreateRecord(defaults);
|
|
301
|
+
})();
|
|
302
|
+
return Object.freeze({
|
|
303
|
+
create,
|
|
304
|
+
new: create,
|
|
305
|
+
defaults: () => Object.freeze(defaults()),
|
|
306
|
+
});
|
|
307
|
+
})();
|
|
308
|
+
const FfiConverterTypeConfiguredDriverOptions = (() => {
|
|
309
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
310
|
+
read(from) {
|
|
311
|
+
return {
|
|
312
|
+
claudeCodeCompatibility: FfiConverterBool.read(from),
|
|
313
|
+
authorization: FfiConverterTypeRuntimeAuthorizationOptions.read(from)
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
write(value, into) {
|
|
317
|
+
FfiConverterBool.write(value.claudeCodeCompatibility, into);
|
|
318
|
+
FfiConverterTypeRuntimeAuthorizationOptions.write(value.authorization, into);
|
|
319
|
+
}
|
|
320
|
+
allocationSize(value) {
|
|
321
|
+
return FfiConverterBool.allocationSize(value.claudeCodeCompatibility) +
|
|
322
|
+
FfiConverterTypeRuntimeAuthorizationOptions.allocationSize(value.authorization);
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
;
|
|
326
|
+
return new FFIConverter();
|
|
327
|
+
})();
|
|
328
|
+
/**
|
|
329
|
+
* Generated factory for {@link CursorGlow} record objects.
|
|
330
|
+
*/
|
|
331
|
+
export const CursorGlow = (() => {
|
|
332
|
+
const defaults = () => ({});
|
|
333
|
+
const create = (() => {
|
|
334
|
+
return uniffiCreateRecord(defaults);
|
|
335
|
+
})();
|
|
336
|
+
return Object.freeze({
|
|
337
|
+
create,
|
|
338
|
+
new: create,
|
|
339
|
+
defaults: () => Object.freeze(defaults()),
|
|
340
|
+
});
|
|
341
|
+
})();
|
|
342
|
+
const FfiConverterTypeCursorGlow = (() => {
|
|
343
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
344
|
+
read(from) {
|
|
345
|
+
return {
|
|
346
|
+
x: FfiConverterFloat64.read(from),
|
|
347
|
+
y: FfiConverterFloat64.read(from),
|
|
348
|
+
r: FfiConverterFloat64.read(from),
|
|
349
|
+
alpha: FfiConverterFloat64.read(from)
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
write(value, into) {
|
|
353
|
+
FfiConverterFloat64.write(value.x, into);
|
|
354
|
+
FfiConverterFloat64.write(value.y, into);
|
|
355
|
+
FfiConverterFloat64.write(value.r, into);
|
|
356
|
+
FfiConverterFloat64.write(value.alpha, into);
|
|
357
|
+
}
|
|
358
|
+
allocationSize(value) {
|
|
359
|
+
return FfiConverterFloat64.allocationSize(value.x) +
|
|
360
|
+
FfiConverterFloat64.allocationSize(value.y) +
|
|
361
|
+
FfiConverterFloat64.allocationSize(value.r) +
|
|
362
|
+
FfiConverterFloat64.allocationSize(value.alpha);
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
;
|
|
366
|
+
return new FFIConverter();
|
|
367
|
+
})();
|
|
368
|
+
/**
|
|
369
|
+
* Generated factory for {@link CursorTrailSegment} record objects.
|
|
370
|
+
*/
|
|
371
|
+
export const CursorTrailSegment = (() => {
|
|
372
|
+
const defaults = () => ({});
|
|
373
|
+
const create = (() => {
|
|
374
|
+
return uniffiCreateRecord(defaults);
|
|
375
|
+
})();
|
|
376
|
+
return Object.freeze({
|
|
377
|
+
create,
|
|
378
|
+
new: create,
|
|
379
|
+
defaults: () => Object.freeze(defaults()),
|
|
380
|
+
});
|
|
381
|
+
})();
|
|
382
|
+
const FfiConverterTypeCursorTrailSegment = (() => {
|
|
383
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
384
|
+
read(from) {
|
|
385
|
+
return {
|
|
386
|
+
ax: FfiConverterFloat64.read(from),
|
|
387
|
+
ay: FfiConverterFloat64.read(from),
|
|
388
|
+
bx: FfiConverterFloat64.read(from),
|
|
389
|
+
by: FfiConverterFloat64.read(from),
|
|
390
|
+
width: FfiConverterFloat64.read(from),
|
|
391
|
+
alpha: FfiConverterFloat64.read(from)
|
|
392
|
+
};
|
|
393
|
+
}
|
|
394
|
+
write(value, into) {
|
|
395
|
+
FfiConverterFloat64.write(value.ax, into);
|
|
396
|
+
FfiConverterFloat64.write(value.ay, into);
|
|
397
|
+
FfiConverterFloat64.write(value.bx, into);
|
|
398
|
+
FfiConverterFloat64.write(value.by, into);
|
|
399
|
+
FfiConverterFloat64.write(value.width, into);
|
|
400
|
+
FfiConverterFloat64.write(value.alpha, into);
|
|
401
|
+
}
|
|
402
|
+
allocationSize(value) {
|
|
403
|
+
return FfiConverterFloat64.allocationSize(value.ax) +
|
|
404
|
+
FfiConverterFloat64.allocationSize(value.ay) +
|
|
405
|
+
FfiConverterFloat64.allocationSize(value.bx) +
|
|
406
|
+
FfiConverterFloat64.allocationSize(value.by) +
|
|
407
|
+
FfiConverterFloat64.allocationSize(value.width) +
|
|
408
|
+
FfiConverterFloat64.allocationSize(value.alpha);
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
;
|
|
412
|
+
return new FFIConverter();
|
|
413
|
+
})();
|
|
414
|
+
/**
|
|
415
|
+
* Generated factory for {@link CursorMotionRect} record objects.
|
|
416
|
+
*/
|
|
417
|
+
export const CursorMotionRect = (() => {
|
|
418
|
+
const defaults = () => ({});
|
|
419
|
+
const create = (() => {
|
|
420
|
+
return uniffiCreateRecord(defaults);
|
|
421
|
+
})();
|
|
422
|
+
return Object.freeze({
|
|
423
|
+
create,
|
|
424
|
+
new: create,
|
|
425
|
+
defaults: () => Object.freeze(defaults()),
|
|
426
|
+
});
|
|
427
|
+
})();
|
|
428
|
+
const FfiConverterTypeCursorMotionRect = (() => {
|
|
429
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
430
|
+
read(from) {
|
|
431
|
+
return {
|
|
432
|
+
x: FfiConverterFloat64.read(from),
|
|
433
|
+
y: FfiConverterFloat64.read(from),
|
|
434
|
+
width: FfiConverterFloat64.read(from),
|
|
435
|
+
height: FfiConverterFloat64.read(from)
|
|
436
|
+
};
|
|
437
|
+
}
|
|
438
|
+
write(value, into) {
|
|
439
|
+
FfiConverterFloat64.write(value.x, into);
|
|
440
|
+
FfiConverterFloat64.write(value.y, into);
|
|
441
|
+
FfiConverterFloat64.write(value.width, into);
|
|
442
|
+
FfiConverterFloat64.write(value.height, into);
|
|
443
|
+
}
|
|
444
|
+
allocationSize(value) {
|
|
445
|
+
return FfiConverterFloat64.allocationSize(value.x) +
|
|
446
|
+
FfiConverterFloat64.allocationSize(value.y) +
|
|
447
|
+
FfiConverterFloat64.allocationSize(value.width) +
|
|
448
|
+
FfiConverterFloat64.allocationSize(value.height);
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
;
|
|
452
|
+
return new FFIConverter();
|
|
453
|
+
})();
|
|
454
|
+
/**
|
|
455
|
+
* Generated factory for {@link CursorMagnet} record objects.
|
|
456
|
+
*/
|
|
457
|
+
export const CursorMagnet = (() => {
|
|
458
|
+
const defaults = () => ({});
|
|
459
|
+
const create = (() => {
|
|
460
|
+
return uniffiCreateRecord(defaults);
|
|
461
|
+
})();
|
|
462
|
+
return Object.freeze({
|
|
463
|
+
create,
|
|
464
|
+
new: create,
|
|
465
|
+
defaults: () => Object.freeze(defaults()),
|
|
466
|
+
});
|
|
467
|
+
})();
|
|
468
|
+
const FfiConverterTypeCursorMagnet = (() => {
|
|
469
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
470
|
+
read(from) {
|
|
471
|
+
return {
|
|
472
|
+
rect: FfiConverterTypeCursorMotionRect.read(from),
|
|
473
|
+
glow: FfiConverterFloat64.read(from)
|
|
474
|
+
};
|
|
475
|
+
}
|
|
476
|
+
write(value, into) {
|
|
477
|
+
FfiConverterTypeCursorMotionRect.write(value.rect, into);
|
|
478
|
+
FfiConverterFloat64.write(value.glow, into);
|
|
479
|
+
}
|
|
480
|
+
allocationSize(value) {
|
|
481
|
+
return FfiConverterTypeCursorMotionRect.allocationSize(value.rect) +
|
|
482
|
+
FfiConverterFloat64.allocationSize(value.glow);
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
;
|
|
486
|
+
return new FFIConverter();
|
|
487
|
+
})();
|
|
488
|
+
/**
|
|
489
|
+
* Generated factory for {@link CursorRipple} record objects.
|
|
490
|
+
*/
|
|
491
|
+
export const CursorRipple = (() => {
|
|
492
|
+
const defaults = () => ({});
|
|
493
|
+
const create = (() => {
|
|
494
|
+
return uniffiCreateRecord(defaults);
|
|
495
|
+
})();
|
|
496
|
+
return Object.freeze({
|
|
497
|
+
create,
|
|
498
|
+
new: create,
|
|
499
|
+
defaults: () => Object.freeze(defaults()),
|
|
500
|
+
});
|
|
501
|
+
})();
|
|
502
|
+
const FfiConverterTypeCursorRipple = (() => {
|
|
503
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
504
|
+
read(from) {
|
|
505
|
+
return {
|
|
506
|
+
x: FfiConverterFloat64.read(from),
|
|
507
|
+
y: FfiConverterFloat64.read(from),
|
|
508
|
+
r: FfiConverterFloat64.read(from),
|
|
509
|
+
width: FfiConverterFloat64.read(from),
|
|
510
|
+
alpha: FfiConverterFloat64.read(from)
|
|
511
|
+
};
|
|
512
|
+
}
|
|
513
|
+
write(value, into) {
|
|
514
|
+
FfiConverterFloat64.write(value.x, into);
|
|
515
|
+
FfiConverterFloat64.write(value.y, into);
|
|
516
|
+
FfiConverterFloat64.write(value.r, into);
|
|
517
|
+
FfiConverterFloat64.write(value.width, into);
|
|
518
|
+
FfiConverterFloat64.write(value.alpha, into);
|
|
519
|
+
}
|
|
520
|
+
allocationSize(value) {
|
|
521
|
+
return FfiConverterFloat64.allocationSize(value.x) +
|
|
522
|
+
FfiConverterFloat64.allocationSize(value.y) +
|
|
523
|
+
FfiConverterFloat64.allocationSize(value.r) +
|
|
524
|
+
FfiConverterFloat64.allocationSize(value.width) +
|
|
525
|
+
FfiConverterFloat64.allocationSize(value.alpha);
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
;
|
|
529
|
+
return new FFIConverter();
|
|
530
|
+
})();
|
|
531
|
+
/**
|
|
532
|
+
* Generated factory for {@link CursorEffectFrame} record objects.
|
|
533
|
+
*/
|
|
534
|
+
export const CursorEffectFrame = (() => {
|
|
535
|
+
const defaults = () => ({});
|
|
536
|
+
const create = (() => {
|
|
537
|
+
return uniffiCreateRecord(defaults);
|
|
538
|
+
})();
|
|
539
|
+
return Object.freeze({
|
|
540
|
+
create,
|
|
541
|
+
new: create,
|
|
542
|
+
defaults: () => Object.freeze(defaults()),
|
|
543
|
+
});
|
|
544
|
+
})();
|
|
545
|
+
const FfiConverterTypeCursorEffectFrame = (() => {
|
|
546
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
547
|
+
read(from) {
|
|
548
|
+
return {
|
|
549
|
+
glow: FfiConverterOptionalTypeCursorGlow.read(from),
|
|
550
|
+
trail: FfiConverterSequenceTypeCursorTrailSegment.read(from),
|
|
551
|
+
magnet: FfiConverterOptionalTypeCursorMagnet.read(from),
|
|
552
|
+
ripple: FfiConverterOptionalTypeCursorRipple.read(from),
|
|
553
|
+
squish: FfiConverterFloat64.read(from)
|
|
554
|
+
};
|
|
555
|
+
}
|
|
556
|
+
write(value, into) {
|
|
557
|
+
FfiConverterOptionalTypeCursorGlow.write(value.glow, into);
|
|
558
|
+
FfiConverterSequenceTypeCursorTrailSegment.write(value.trail, into);
|
|
559
|
+
FfiConverterOptionalTypeCursorMagnet.write(value.magnet, into);
|
|
560
|
+
FfiConverterOptionalTypeCursorRipple.write(value.ripple, into);
|
|
561
|
+
FfiConverterFloat64.write(value.squish, into);
|
|
562
|
+
}
|
|
563
|
+
allocationSize(value) {
|
|
564
|
+
return FfiConverterOptionalTypeCursorGlow.allocationSize(value.glow) +
|
|
565
|
+
FfiConverterSequenceTypeCursorTrailSegment.allocationSize(value.trail) +
|
|
566
|
+
FfiConverterOptionalTypeCursorMagnet.allocationSize(value.magnet) +
|
|
567
|
+
FfiConverterOptionalTypeCursorRipple.allocationSize(value.ripple) +
|
|
568
|
+
FfiConverterFloat64.allocationSize(value.squish);
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
;
|
|
572
|
+
return new FFIConverter();
|
|
573
|
+
})();
|
|
574
|
+
/**
|
|
575
|
+
* Generated factory for {@link CursorMotionParams} record objects.
|
|
576
|
+
*/
|
|
577
|
+
export const CursorMotionParams = (() => {
|
|
578
|
+
const defaults = () => ({});
|
|
579
|
+
const create = (() => {
|
|
580
|
+
return uniffiCreateRecord(defaults);
|
|
581
|
+
})();
|
|
582
|
+
return Object.freeze({
|
|
583
|
+
create,
|
|
584
|
+
new: create,
|
|
585
|
+
defaults: () => Object.freeze(defaults()),
|
|
586
|
+
});
|
|
587
|
+
})();
|
|
588
|
+
const FfiConverterTypeCursorMotionParams = (() => {
|
|
589
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
590
|
+
read(from) {
|
|
591
|
+
return {
|
|
592
|
+
style: FfiConverterTypeCursorMotionStyle.read(from),
|
|
593
|
+
timing: FfiConverterTypeCursorMotionTiming.read(from),
|
|
594
|
+
effects: FfiConverterTypeCursorMotionEffects.read(from),
|
|
595
|
+
startHandle: FfiConverterFloat64.read(from),
|
|
596
|
+
endHandle: FfiConverterFloat64.read(from),
|
|
597
|
+
arcSize: FfiConverterFloat64.read(from),
|
|
598
|
+
arcFlow: FfiConverterFloat64.read(from),
|
|
599
|
+
spring: FfiConverterFloat64.read(from),
|
|
600
|
+
glideDurationMs: FfiConverterFloat64.read(from),
|
|
601
|
+
peakSpeed: FfiConverterFloat64.read(from),
|
|
602
|
+
minStartSpeed: FfiConverterFloat64.read(from),
|
|
603
|
+
minEndSpeed: FfiConverterFloat64.read(from),
|
|
604
|
+
turnRadius: FfiConverterFloat64.read(from)
|
|
605
|
+
};
|
|
606
|
+
}
|
|
607
|
+
write(value, into) {
|
|
608
|
+
FfiConverterTypeCursorMotionStyle.write(value.style, into);
|
|
609
|
+
FfiConverterTypeCursorMotionTiming.write(value.timing, into);
|
|
610
|
+
FfiConverterTypeCursorMotionEffects.write(value.effects, into);
|
|
611
|
+
FfiConverterFloat64.write(value.startHandle, into);
|
|
612
|
+
FfiConverterFloat64.write(value.endHandle, into);
|
|
613
|
+
FfiConverterFloat64.write(value.arcSize, into);
|
|
614
|
+
FfiConverterFloat64.write(value.arcFlow, into);
|
|
615
|
+
FfiConverterFloat64.write(value.spring, into);
|
|
616
|
+
FfiConverterFloat64.write(value.glideDurationMs, into);
|
|
617
|
+
FfiConverterFloat64.write(value.peakSpeed, into);
|
|
618
|
+
FfiConverterFloat64.write(value.minStartSpeed, into);
|
|
619
|
+
FfiConverterFloat64.write(value.minEndSpeed, into);
|
|
620
|
+
FfiConverterFloat64.write(value.turnRadius, into);
|
|
621
|
+
}
|
|
622
|
+
allocationSize(value) {
|
|
623
|
+
return FfiConverterTypeCursorMotionStyle.allocationSize(value.style) +
|
|
624
|
+
FfiConverterTypeCursorMotionTiming.allocationSize(value.timing) +
|
|
625
|
+
FfiConverterTypeCursorMotionEffects.allocationSize(value.effects) +
|
|
626
|
+
FfiConverterFloat64.allocationSize(value.startHandle) +
|
|
627
|
+
FfiConverterFloat64.allocationSize(value.endHandle) +
|
|
628
|
+
FfiConverterFloat64.allocationSize(value.arcSize) +
|
|
629
|
+
FfiConverterFloat64.allocationSize(value.arcFlow) +
|
|
630
|
+
FfiConverterFloat64.allocationSize(value.spring) +
|
|
631
|
+
FfiConverterFloat64.allocationSize(value.glideDurationMs) +
|
|
632
|
+
FfiConverterFloat64.allocationSize(value.peakSpeed) +
|
|
633
|
+
FfiConverterFloat64.allocationSize(value.minStartSpeed) +
|
|
634
|
+
FfiConverterFloat64.allocationSize(value.minEndSpeed) +
|
|
635
|
+
FfiConverterFloat64.allocationSize(value.turnRadius);
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
;
|
|
639
|
+
return new FFIConverter();
|
|
640
|
+
})();
|
|
641
|
+
/**
|
|
642
|
+
* Generated factory for {@link CursorMotionPoint} record objects.
|
|
643
|
+
*/
|
|
644
|
+
export const CursorMotionPoint = (() => {
|
|
645
|
+
const defaults = () => ({});
|
|
646
|
+
const create = (() => {
|
|
647
|
+
return uniffiCreateRecord(defaults);
|
|
648
|
+
})();
|
|
649
|
+
return Object.freeze({
|
|
650
|
+
create,
|
|
651
|
+
new: create,
|
|
652
|
+
defaults: () => Object.freeze(defaults()),
|
|
653
|
+
});
|
|
654
|
+
})();
|
|
655
|
+
const FfiConverterTypeCursorMotionPoint = (() => {
|
|
656
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
657
|
+
read(from) {
|
|
658
|
+
return {
|
|
659
|
+
x: FfiConverterFloat64.read(from),
|
|
660
|
+
y: FfiConverterFloat64.read(from)
|
|
661
|
+
};
|
|
662
|
+
}
|
|
663
|
+
write(value, into) {
|
|
664
|
+
FfiConverterFloat64.write(value.x, into);
|
|
665
|
+
FfiConverterFloat64.write(value.y, into);
|
|
666
|
+
}
|
|
667
|
+
allocationSize(value) {
|
|
668
|
+
return FfiConverterFloat64.allocationSize(value.x) +
|
|
669
|
+
FfiConverterFloat64.allocationSize(value.y);
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
;
|
|
673
|
+
return new FFIConverter();
|
|
674
|
+
})();
|
|
675
|
+
/**
|
|
676
|
+
* Generated factory for {@link CursorMotionSample} record objects.
|
|
677
|
+
*/
|
|
678
|
+
export const CursorMotionSample = (() => {
|
|
679
|
+
const defaults = () => ({});
|
|
680
|
+
const create = (() => {
|
|
681
|
+
return uniffiCreateRecord(defaults);
|
|
682
|
+
})();
|
|
683
|
+
return Object.freeze({
|
|
684
|
+
create,
|
|
685
|
+
new: create,
|
|
686
|
+
defaults: () => Object.freeze(defaults()),
|
|
687
|
+
});
|
|
688
|
+
})();
|
|
689
|
+
const FfiConverterTypeCursorMotionSample = (() => {
|
|
690
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
691
|
+
read(from) {
|
|
692
|
+
return {
|
|
693
|
+
t: FfiConverterFloat64.read(from),
|
|
694
|
+
x: FfiConverterFloat64.read(from),
|
|
695
|
+
y: FfiConverterFloat64.read(from),
|
|
696
|
+
heading: FfiConverterFloat64.read(from)
|
|
697
|
+
};
|
|
698
|
+
}
|
|
699
|
+
write(value, into) {
|
|
700
|
+
FfiConverterFloat64.write(value.t, into);
|
|
701
|
+
FfiConverterFloat64.write(value.x, into);
|
|
702
|
+
FfiConverterFloat64.write(value.y, into);
|
|
703
|
+
FfiConverterFloat64.write(value.heading, into);
|
|
704
|
+
}
|
|
705
|
+
allocationSize(value) {
|
|
706
|
+
return FfiConverterFloat64.allocationSize(value.t) +
|
|
707
|
+
FfiConverterFloat64.allocationSize(value.x) +
|
|
708
|
+
FfiConverterFloat64.allocationSize(value.y) +
|
|
709
|
+
FfiConverterFloat64.allocationSize(value.heading);
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
;
|
|
713
|
+
return new FFIConverter();
|
|
714
|
+
})();
|
|
715
|
+
// Enum: CursorPathShape
|
|
716
|
+
export var CursorPathShape_Tags;
|
|
717
|
+
(function (CursorPathShape_Tags) {
|
|
718
|
+
CursorPathShape_Tags["Straight"] = "Straight";
|
|
719
|
+
CursorPathShape_Tags["Arc"] = "Arc";
|
|
720
|
+
CursorPathShape_Tags["Bow"] = "Bow";
|
|
721
|
+
})(CursorPathShape_Tags || (CursorPathShape_Tags = {}));
|
|
722
|
+
/**
|
|
723
|
+
* Path shape of a custom motion.
|
|
724
|
+
*/
|
|
725
|
+
export const CursorPathShape = (() => {
|
|
726
|
+
class Straight_ extends UniffiEnum {
|
|
727
|
+
/**
|
|
728
|
+
* @private
|
|
729
|
+
* This field is private and should not be used, use `tag` instead.
|
|
730
|
+
*/
|
|
731
|
+
[uniffiTypeNameSymbol] = "CursorPathShape";
|
|
732
|
+
tag = CursorPathShape_Tags.Straight;
|
|
733
|
+
constructor() {
|
|
734
|
+
super("CursorPathShape", "Straight");
|
|
735
|
+
}
|
|
736
|
+
static new() {
|
|
737
|
+
return new Straight_();
|
|
738
|
+
}
|
|
739
|
+
static instanceOf(obj) {
|
|
740
|
+
return obj.tag === CursorPathShape_Tags.Straight;
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
/**
|
|
744
|
+
* The Cua cubic bezier; a positive `arc_size` bends to the natural side.
|
|
745
|
+
*/
|
|
746
|
+
class Arc_ extends UniffiEnum {
|
|
747
|
+
/**
|
|
748
|
+
* @private
|
|
749
|
+
* This field is private and should not be used, use `tag` instead.
|
|
750
|
+
*/
|
|
751
|
+
[uniffiTypeNameSymbol] = "CursorPathShape";
|
|
752
|
+
tag = CursorPathShape_Tags.Arc;
|
|
753
|
+
inner;
|
|
754
|
+
constructor(inner) {
|
|
755
|
+
super("CursorPathShape", "Arc");
|
|
756
|
+
this.inner = Object.freeze(inner);
|
|
757
|
+
}
|
|
758
|
+
static new(inner) {
|
|
759
|
+
return new Arc_(inner);
|
|
760
|
+
}
|
|
761
|
+
static instanceOf(obj) {
|
|
762
|
+
return obj.tag === CursorPathShape_Tags.Arc;
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
/**
|
|
766
|
+
* A gentle quadratic bow.
|
|
767
|
+
*/
|
|
768
|
+
class Bow_ extends UniffiEnum {
|
|
769
|
+
/**
|
|
770
|
+
* @private
|
|
771
|
+
* This field is private and should not be used, use `tag` instead.
|
|
772
|
+
*/
|
|
773
|
+
[uniffiTypeNameSymbol] = "CursorPathShape";
|
|
774
|
+
tag = CursorPathShape_Tags.Bow;
|
|
775
|
+
inner;
|
|
776
|
+
constructor(inner) {
|
|
777
|
+
super("CursorPathShape", "Bow");
|
|
778
|
+
this.inner = Object.freeze(inner);
|
|
779
|
+
}
|
|
780
|
+
static new(inner) {
|
|
781
|
+
return new Bow_(inner);
|
|
782
|
+
}
|
|
783
|
+
static instanceOf(obj) {
|
|
784
|
+
return obj.tag === CursorPathShape_Tags.Bow;
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
function instanceOf(obj) {
|
|
788
|
+
return obj[uniffiTypeNameSymbol] === "CursorPathShape";
|
|
789
|
+
}
|
|
790
|
+
return Object.freeze({
|
|
791
|
+
instanceOf,
|
|
792
|
+
Straight: Straight_,
|
|
793
|
+
Arc: Arc_,
|
|
794
|
+
Bow: Bow_
|
|
795
|
+
});
|
|
796
|
+
})();
|
|
797
|
+
// FfiConverter for enum CursorPathShape
|
|
798
|
+
const FfiConverterTypeCursorPathShape = (() => {
|
|
799
|
+
const ordinalConverter = FfiConverterInt32;
|
|
800
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
801
|
+
read(from) {
|
|
802
|
+
switch (ordinalConverter.read(from)) {
|
|
803
|
+
case 1: return new CursorPathShape.Straight();
|
|
804
|
+
case 2: return new CursorPathShape.Arc({ startHandle: FfiConverterFloat64.read(from), endHandle: FfiConverterFloat64.read(from), arcSize: FfiConverterFloat64.read(from), arcFlow: FfiConverterFloat64.read(from) });
|
|
805
|
+
case 3: return new CursorPathShape.Bow({ amount: FfiConverterFloat64.read(from) });
|
|
806
|
+
default: throw new UniffiInternalError.UnexpectedEnumCase();
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
write(value, into) {
|
|
810
|
+
switch (value.tag) {
|
|
811
|
+
case CursorPathShape_Tags.Straight: {
|
|
812
|
+
ordinalConverter.write(1, into);
|
|
813
|
+
return;
|
|
814
|
+
}
|
|
815
|
+
case CursorPathShape_Tags.Arc: {
|
|
816
|
+
ordinalConverter.write(2, into);
|
|
817
|
+
const inner = value.inner;
|
|
818
|
+
FfiConverterFloat64.write(inner.startHandle, into);
|
|
819
|
+
FfiConverterFloat64.write(inner.endHandle, into);
|
|
820
|
+
FfiConverterFloat64.write(inner.arcSize, into);
|
|
821
|
+
FfiConverterFloat64.write(inner.arcFlow, into);
|
|
822
|
+
return;
|
|
823
|
+
}
|
|
824
|
+
case CursorPathShape_Tags.Bow: {
|
|
825
|
+
ordinalConverter.write(3, into);
|
|
826
|
+
const inner = value.inner;
|
|
827
|
+
FfiConverterFloat64.write(inner.amount, into);
|
|
828
|
+
return;
|
|
829
|
+
}
|
|
830
|
+
default:
|
|
831
|
+
// Throwing from here means that CursorPathShape_Tags hasn't matched an ordinal.
|
|
832
|
+
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
allocationSize(value) {
|
|
836
|
+
switch (value.tag) {
|
|
837
|
+
case CursorPathShape_Tags.Straight: {
|
|
838
|
+
return ordinalConverter.allocationSize(1);
|
|
839
|
+
}
|
|
840
|
+
case CursorPathShape_Tags.Arc: {
|
|
841
|
+
const inner = value.inner;
|
|
842
|
+
let size = ordinalConverter.allocationSize(2);
|
|
843
|
+
size += FfiConverterFloat64.allocationSize(inner.startHandle);
|
|
844
|
+
size += FfiConverterFloat64.allocationSize(inner.endHandle);
|
|
845
|
+
size += FfiConverterFloat64.allocationSize(inner.arcSize);
|
|
846
|
+
size += FfiConverterFloat64.allocationSize(inner.arcFlow);
|
|
847
|
+
return size;
|
|
848
|
+
}
|
|
849
|
+
case CursorPathShape_Tags.Bow: {
|
|
850
|
+
const inner = value.inner;
|
|
851
|
+
let size = ordinalConverter.allocationSize(3);
|
|
852
|
+
size += FfiConverterFloat64.allocationSize(inner.amount);
|
|
853
|
+
return size;
|
|
854
|
+
}
|
|
855
|
+
default: throw new UniffiInternalError.UnexpectedEnumCase();
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
return new FFIConverter();
|
|
860
|
+
})();
|
|
861
|
+
// Enum: CursorEase
|
|
862
|
+
export var CursorEase_Tags;
|
|
863
|
+
(function (CursorEase_Tags) {
|
|
864
|
+
CursorEase_Tags["Linear"] = "Linear";
|
|
865
|
+
CursorEase_Tags["MinJerk"] = "MinJerk";
|
|
866
|
+
CursorEase_Tags["Smootherstep"] = "Smootherstep";
|
|
867
|
+
CursorEase_Tags["InOutCubic"] = "InOutCubic";
|
|
868
|
+
CursorEase_Tags["InOutSine"] = "InOutSine";
|
|
869
|
+
CursorEase_Tags["OutCubic"] = "OutCubic";
|
|
870
|
+
CursorEase_Tags["CubicBezier"] = "CubicBezier";
|
|
871
|
+
})(CursorEase_Tags || (CursorEase_Tags = {}));
|
|
872
|
+
/**
|
|
873
|
+
* Speed curve along the path.
|
|
874
|
+
*/
|
|
875
|
+
export const CursorEase = (() => {
|
|
876
|
+
class Linear_ extends UniffiEnum {
|
|
877
|
+
/**
|
|
878
|
+
* @private
|
|
879
|
+
* This field is private and should not be used, use `tag` instead.
|
|
880
|
+
*/
|
|
881
|
+
[uniffiTypeNameSymbol] = "CursorEase";
|
|
882
|
+
tag = CursorEase_Tags.Linear;
|
|
883
|
+
constructor() {
|
|
884
|
+
super("CursorEase", "Linear");
|
|
885
|
+
}
|
|
886
|
+
static new() {
|
|
887
|
+
return new Linear_();
|
|
888
|
+
}
|
|
889
|
+
static instanceOf(obj) {
|
|
890
|
+
return obj.tag === CursorEase_Tags.Linear;
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
class MinJerk_ extends UniffiEnum {
|
|
894
|
+
/**
|
|
895
|
+
* @private
|
|
896
|
+
* This field is private and should not be used, use `tag` instead.
|
|
897
|
+
*/
|
|
898
|
+
[uniffiTypeNameSymbol] = "CursorEase";
|
|
899
|
+
tag = CursorEase_Tags.MinJerk;
|
|
900
|
+
constructor() {
|
|
901
|
+
super("CursorEase", "MinJerk");
|
|
902
|
+
}
|
|
903
|
+
static new() {
|
|
904
|
+
return new MinJerk_();
|
|
905
|
+
}
|
|
906
|
+
static instanceOf(obj) {
|
|
907
|
+
return obj.tag === CursorEase_Tags.MinJerk;
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
class Smootherstep_ extends UniffiEnum {
|
|
911
|
+
/**
|
|
912
|
+
* @private
|
|
913
|
+
* This field is private and should not be used, use `tag` instead.
|
|
914
|
+
*/
|
|
915
|
+
[uniffiTypeNameSymbol] = "CursorEase";
|
|
916
|
+
tag = CursorEase_Tags.Smootherstep;
|
|
917
|
+
constructor() {
|
|
918
|
+
super("CursorEase", "Smootherstep");
|
|
919
|
+
}
|
|
920
|
+
static new() {
|
|
921
|
+
return new Smootherstep_();
|
|
922
|
+
}
|
|
923
|
+
static instanceOf(obj) {
|
|
924
|
+
return obj.tag === CursorEase_Tags.Smootherstep;
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
class InOutCubic_ extends UniffiEnum {
|
|
928
|
+
/**
|
|
929
|
+
* @private
|
|
930
|
+
* This field is private and should not be used, use `tag` instead.
|
|
931
|
+
*/
|
|
932
|
+
[uniffiTypeNameSymbol] = "CursorEase";
|
|
933
|
+
tag = CursorEase_Tags.InOutCubic;
|
|
934
|
+
constructor() {
|
|
935
|
+
super("CursorEase", "InOutCubic");
|
|
936
|
+
}
|
|
937
|
+
static new() {
|
|
938
|
+
return new InOutCubic_();
|
|
939
|
+
}
|
|
940
|
+
static instanceOf(obj) {
|
|
941
|
+
return obj.tag === CursorEase_Tags.InOutCubic;
|
|
942
|
+
}
|
|
943
|
+
}
|
|
944
|
+
class InOutSine_ extends UniffiEnum {
|
|
945
|
+
/**
|
|
946
|
+
* @private
|
|
947
|
+
* This field is private and should not be used, use `tag` instead.
|
|
948
|
+
*/
|
|
949
|
+
[uniffiTypeNameSymbol] = "CursorEase";
|
|
950
|
+
tag = CursorEase_Tags.InOutSine;
|
|
951
|
+
constructor() {
|
|
952
|
+
super("CursorEase", "InOutSine");
|
|
953
|
+
}
|
|
954
|
+
static new() {
|
|
955
|
+
return new InOutSine_();
|
|
956
|
+
}
|
|
957
|
+
static instanceOf(obj) {
|
|
958
|
+
return obj.tag === CursorEase_Tags.InOutSine;
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
class OutCubic_ extends UniffiEnum {
|
|
962
|
+
/**
|
|
963
|
+
* @private
|
|
964
|
+
* This field is private and should not be used, use `tag` instead.
|
|
965
|
+
*/
|
|
966
|
+
[uniffiTypeNameSymbol] = "CursorEase";
|
|
967
|
+
tag = CursorEase_Tags.OutCubic;
|
|
968
|
+
constructor() {
|
|
969
|
+
super("CursorEase", "OutCubic");
|
|
970
|
+
}
|
|
971
|
+
static new() {
|
|
972
|
+
return new OutCubic_();
|
|
973
|
+
}
|
|
974
|
+
static instanceOf(obj) {
|
|
975
|
+
return obj.tag === CursorEase_Tags.OutCubic;
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
class CubicBezier_ extends UniffiEnum {
|
|
979
|
+
/**
|
|
980
|
+
* @private
|
|
981
|
+
* This field is private and should not be used, use `tag` instead.
|
|
982
|
+
*/
|
|
983
|
+
[uniffiTypeNameSymbol] = "CursorEase";
|
|
984
|
+
tag = CursorEase_Tags.CubicBezier;
|
|
985
|
+
inner;
|
|
986
|
+
constructor(inner) {
|
|
987
|
+
super("CursorEase", "CubicBezier");
|
|
988
|
+
this.inner = Object.freeze(inner);
|
|
989
|
+
}
|
|
990
|
+
static new(inner) {
|
|
991
|
+
return new CubicBezier_(inner);
|
|
992
|
+
}
|
|
993
|
+
static instanceOf(obj) {
|
|
994
|
+
return obj.tag === CursorEase_Tags.CubicBezier;
|
|
995
|
+
}
|
|
996
|
+
}
|
|
997
|
+
function instanceOf(obj) {
|
|
998
|
+
return obj[uniffiTypeNameSymbol] === "CursorEase";
|
|
999
|
+
}
|
|
1000
|
+
return Object.freeze({
|
|
1001
|
+
instanceOf,
|
|
1002
|
+
Linear: Linear_,
|
|
1003
|
+
MinJerk: MinJerk_,
|
|
1004
|
+
Smootherstep: Smootherstep_,
|
|
1005
|
+
InOutCubic: InOutCubic_,
|
|
1006
|
+
InOutSine: InOutSine_,
|
|
1007
|
+
OutCubic: OutCubic_,
|
|
1008
|
+
CubicBezier: CubicBezier_
|
|
1009
|
+
});
|
|
1010
|
+
})();
|
|
1011
|
+
// FfiConverter for enum CursorEase
|
|
1012
|
+
const FfiConverterTypeCursorEase = (() => {
|
|
1013
|
+
const ordinalConverter = FfiConverterInt32;
|
|
1014
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
1015
|
+
read(from) {
|
|
1016
|
+
switch (ordinalConverter.read(from)) {
|
|
1017
|
+
case 1: return new CursorEase.Linear();
|
|
1018
|
+
case 2: return new CursorEase.MinJerk();
|
|
1019
|
+
case 3: return new CursorEase.Smootherstep();
|
|
1020
|
+
case 4: return new CursorEase.InOutCubic();
|
|
1021
|
+
case 5: return new CursorEase.InOutSine();
|
|
1022
|
+
case 6: return new CursorEase.OutCubic();
|
|
1023
|
+
case 7: return new CursorEase.CubicBezier({ x1: FfiConverterFloat64.read(from), y1: FfiConverterFloat64.read(from), x2: FfiConverterFloat64.read(from), y2: FfiConverterFloat64.read(from) });
|
|
1024
|
+
default: throw new UniffiInternalError.UnexpectedEnumCase();
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
1027
|
+
write(value, into) {
|
|
1028
|
+
switch (value.tag) {
|
|
1029
|
+
case CursorEase_Tags.Linear: {
|
|
1030
|
+
ordinalConverter.write(1, into);
|
|
1031
|
+
return;
|
|
1032
|
+
}
|
|
1033
|
+
case CursorEase_Tags.MinJerk: {
|
|
1034
|
+
ordinalConverter.write(2, into);
|
|
1035
|
+
return;
|
|
1036
|
+
}
|
|
1037
|
+
case CursorEase_Tags.Smootherstep: {
|
|
1038
|
+
ordinalConverter.write(3, into);
|
|
1039
|
+
return;
|
|
1040
|
+
}
|
|
1041
|
+
case CursorEase_Tags.InOutCubic: {
|
|
1042
|
+
ordinalConverter.write(4, into);
|
|
1043
|
+
return;
|
|
1044
|
+
}
|
|
1045
|
+
case CursorEase_Tags.InOutSine: {
|
|
1046
|
+
ordinalConverter.write(5, into);
|
|
1047
|
+
return;
|
|
1048
|
+
}
|
|
1049
|
+
case CursorEase_Tags.OutCubic: {
|
|
1050
|
+
ordinalConverter.write(6, into);
|
|
1051
|
+
return;
|
|
1052
|
+
}
|
|
1053
|
+
case CursorEase_Tags.CubicBezier: {
|
|
1054
|
+
ordinalConverter.write(7, into);
|
|
1055
|
+
const inner = value.inner;
|
|
1056
|
+
FfiConverterFloat64.write(inner.x1, into);
|
|
1057
|
+
FfiConverterFloat64.write(inner.y1, into);
|
|
1058
|
+
FfiConverterFloat64.write(inner.x2, into);
|
|
1059
|
+
FfiConverterFloat64.write(inner.y2, into);
|
|
1060
|
+
return;
|
|
1061
|
+
}
|
|
1062
|
+
default:
|
|
1063
|
+
// Throwing from here means that CursorEase_Tags hasn't matched an ordinal.
|
|
1064
|
+
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
1065
|
+
}
|
|
1066
|
+
}
|
|
1067
|
+
allocationSize(value) {
|
|
1068
|
+
switch (value.tag) {
|
|
1069
|
+
case CursorEase_Tags.Linear: {
|
|
1070
|
+
return ordinalConverter.allocationSize(1);
|
|
1071
|
+
}
|
|
1072
|
+
case CursorEase_Tags.MinJerk: {
|
|
1073
|
+
return ordinalConverter.allocationSize(2);
|
|
1074
|
+
}
|
|
1075
|
+
case CursorEase_Tags.Smootherstep: {
|
|
1076
|
+
return ordinalConverter.allocationSize(3);
|
|
1077
|
+
}
|
|
1078
|
+
case CursorEase_Tags.InOutCubic: {
|
|
1079
|
+
return ordinalConverter.allocationSize(4);
|
|
1080
|
+
}
|
|
1081
|
+
case CursorEase_Tags.InOutSine: {
|
|
1082
|
+
return ordinalConverter.allocationSize(5);
|
|
1083
|
+
}
|
|
1084
|
+
case CursorEase_Tags.OutCubic: {
|
|
1085
|
+
return ordinalConverter.allocationSize(6);
|
|
1086
|
+
}
|
|
1087
|
+
case CursorEase_Tags.CubicBezier: {
|
|
1088
|
+
const inner = value.inner;
|
|
1089
|
+
let size = ordinalConverter.allocationSize(7);
|
|
1090
|
+
size += FfiConverterFloat64.allocationSize(inner.x1);
|
|
1091
|
+
size += FfiConverterFloat64.allocationSize(inner.y1);
|
|
1092
|
+
size += FfiConverterFloat64.allocationSize(inner.x2);
|
|
1093
|
+
size += FfiConverterFloat64.allocationSize(inner.y2);
|
|
1094
|
+
return size;
|
|
1095
|
+
}
|
|
1096
|
+
default: throw new UniffiInternalError.UnexpectedEnumCase();
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
1100
|
+
return new FFIConverter();
|
|
1101
|
+
})();
|
|
1102
|
+
// Enum: CursorSettle
|
|
1103
|
+
export var CursorSettle_Tags;
|
|
1104
|
+
(function (CursorSettle_Tags) {
|
|
1105
|
+
CursorSettle_Tags["None"] = "None";
|
|
1106
|
+
CursorSettle_Tags["FollowThrough"] = "FollowThrough";
|
|
1107
|
+
CursorSettle_Tags["Spring"] = "Spring";
|
|
1108
|
+
})(CursorSettle_Tags || (CursorSettle_Tags = {}));
|
|
1109
|
+
/**
|
|
1110
|
+
* Overshoot or settle at the end of the glide.
|
|
1111
|
+
*/
|
|
1112
|
+
export const CursorSettle = (() => {
|
|
1113
|
+
class None_ extends UniffiEnum {
|
|
1114
|
+
/**
|
|
1115
|
+
* @private
|
|
1116
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1117
|
+
*/
|
|
1118
|
+
[uniffiTypeNameSymbol] = "CursorSettle";
|
|
1119
|
+
tag = CursorSettle_Tags.None;
|
|
1120
|
+
constructor() {
|
|
1121
|
+
super("CursorSettle", "None");
|
|
1122
|
+
}
|
|
1123
|
+
static new() {
|
|
1124
|
+
return new None_();
|
|
1125
|
+
}
|
|
1126
|
+
static instanceOf(obj) {
|
|
1127
|
+
return obj.tag === CursorSettle_Tags.None;
|
|
1128
|
+
}
|
|
1129
|
+
}
|
|
1130
|
+
class FollowThrough_ extends UniffiEnum {
|
|
1131
|
+
/**
|
|
1132
|
+
* @private
|
|
1133
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1134
|
+
*/
|
|
1135
|
+
[uniffiTypeNameSymbol] = "CursorSettle";
|
|
1136
|
+
tag = CursorSettle_Tags.FollowThrough;
|
|
1137
|
+
inner;
|
|
1138
|
+
constructor(inner) {
|
|
1139
|
+
super("CursorSettle", "FollowThrough");
|
|
1140
|
+
this.inner = Object.freeze(inner);
|
|
1141
|
+
}
|
|
1142
|
+
static new(inner) {
|
|
1143
|
+
return new FollowThrough_(inner);
|
|
1144
|
+
}
|
|
1145
|
+
static instanceOf(obj) {
|
|
1146
|
+
return obj.tag === CursorSettle_Tags.FollowThrough;
|
|
1147
|
+
}
|
|
1148
|
+
}
|
|
1149
|
+
class Spring_ extends UniffiEnum {
|
|
1150
|
+
/**
|
|
1151
|
+
* @private
|
|
1152
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1153
|
+
*/
|
|
1154
|
+
[uniffiTypeNameSymbol] = "CursorSettle";
|
|
1155
|
+
tag = CursorSettle_Tags.Spring;
|
|
1156
|
+
inner;
|
|
1157
|
+
constructor(inner) {
|
|
1158
|
+
super("CursorSettle", "Spring");
|
|
1159
|
+
this.inner = Object.freeze(inner);
|
|
1160
|
+
}
|
|
1161
|
+
static new(inner) {
|
|
1162
|
+
return new Spring_(inner);
|
|
1163
|
+
}
|
|
1164
|
+
static instanceOf(obj) {
|
|
1165
|
+
return obj.tag === CursorSettle_Tags.Spring;
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
function instanceOf(obj) {
|
|
1169
|
+
return obj[uniffiTypeNameSymbol] === "CursorSettle";
|
|
1170
|
+
}
|
|
1171
|
+
return Object.freeze({
|
|
1172
|
+
instanceOf,
|
|
1173
|
+
None: None_,
|
|
1174
|
+
FollowThrough: FollowThrough_,
|
|
1175
|
+
Spring: Spring_
|
|
1176
|
+
});
|
|
1177
|
+
})();
|
|
1178
|
+
// FfiConverter for enum CursorSettle
|
|
1179
|
+
const FfiConverterTypeCursorSettle = (() => {
|
|
1180
|
+
const ordinalConverter = FfiConverterInt32;
|
|
1181
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
1182
|
+
read(from) {
|
|
1183
|
+
switch (ordinalConverter.read(from)) {
|
|
1184
|
+
case 1: return new CursorSettle.None();
|
|
1185
|
+
case 2: return new CursorSettle.FollowThrough({ amount: FfiConverterFloat64.read(from), maxPt: FfiConverterFloat64.read(from), at: FfiConverterFloat64.read(from) });
|
|
1186
|
+
case 3: return new CursorSettle.Spring({ amount: FfiConverterFloat64.read(from), maxPt: FfiConverterFloat64.read(from), cycles: FfiConverterFloat64.read(from), decay: FfiConverterFloat64.read(from), start: FfiConverterFloat64.read(from), glideEnd: FfiConverterFloat64.read(from) });
|
|
1187
|
+
default: throw new UniffiInternalError.UnexpectedEnumCase();
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1190
|
+
write(value, into) {
|
|
1191
|
+
switch (value.tag) {
|
|
1192
|
+
case CursorSettle_Tags.None: {
|
|
1193
|
+
ordinalConverter.write(1, into);
|
|
1194
|
+
return;
|
|
1195
|
+
}
|
|
1196
|
+
case CursorSettle_Tags.FollowThrough: {
|
|
1197
|
+
ordinalConverter.write(2, into);
|
|
1198
|
+
const inner = value.inner;
|
|
1199
|
+
FfiConverterFloat64.write(inner.amount, into);
|
|
1200
|
+
FfiConverterFloat64.write(inner.maxPt, into);
|
|
1201
|
+
FfiConverterFloat64.write(inner.at, into);
|
|
1202
|
+
return;
|
|
1203
|
+
}
|
|
1204
|
+
case CursorSettle_Tags.Spring: {
|
|
1205
|
+
ordinalConverter.write(3, into);
|
|
1206
|
+
const inner = value.inner;
|
|
1207
|
+
FfiConverterFloat64.write(inner.amount, into);
|
|
1208
|
+
FfiConverterFloat64.write(inner.maxPt, into);
|
|
1209
|
+
FfiConverterFloat64.write(inner.cycles, into);
|
|
1210
|
+
FfiConverterFloat64.write(inner.decay, into);
|
|
1211
|
+
FfiConverterFloat64.write(inner.start, into);
|
|
1212
|
+
FfiConverterFloat64.write(inner.glideEnd, into);
|
|
1213
|
+
return;
|
|
1214
|
+
}
|
|
1215
|
+
default:
|
|
1216
|
+
// Throwing from here means that CursorSettle_Tags hasn't matched an ordinal.
|
|
1217
|
+
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
allocationSize(value) {
|
|
1221
|
+
switch (value.tag) {
|
|
1222
|
+
case CursorSettle_Tags.None: {
|
|
1223
|
+
return ordinalConverter.allocationSize(1);
|
|
1224
|
+
}
|
|
1225
|
+
case CursorSettle_Tags.FollowThrough: {
|
|
1226
|
+
const inner = value.inner;
|
|
1227
|
+
let size = ordinalConverter.allocationSize(2);
|
|
1228
|
+
size += FfiConverterFloat64.allocationSize(inner.amount);
|
|
1229
|
+
size += FfiConverterFloat64.allocationSize(inner.maxPt);
|
|
1230
|
+
size += FfiConverterFloat64.allocationSize(inner.at);
|
|
1231
|
+
return size;
|
|
1232
|
+
}
|
|
1233
|
+
case CursorSettle_Tags.Spring: {
|
|
1234
|
+
const inner = value.inner;
|
|
1235
|
+
let size = ordinalConverter.allocationSize(3);
|
|
1236
|
+
size += FfiConverterFloat64.allocationSize(inner.amount);
|
|
1237
|
+
size += FfiConverterFloat64.allocationSize(inner.maxPt);
|
|
1238
|
+
size += FfiConverterFloat64.allocationSize(inner.cycles);
|
|
1239
|
+
size += FfiConverterFloat64.allocationSize(inner.decay);
|
|
1240
|
+
size += FfiConverterFloat64.allocationSize(inner.start);
|
|
1241
|
+
size += FfiConverterFloat64.allocationSize(inner.glideEnd);
|
|
1242
|
+
return size;
|
|
1243
|
+
}
|
|
1244
|
+
default: throw new UniffiInternalError.UnexpectedEnumCase();
|
|
1245
|
+
}
|
|
1246
|
+
}
|
|
1247
|
+
}
|
|
1248
|
+
return new FFIConverter();
|
|
1249
|
+
})();
|
|
1250
|
+
// Enum: CursorMotionDuration
|
|
1251
|
+
export var CursorMotionDuration_Tags;
|
|
1252
|
+
(function (CursorMotionDuration_Tags) {
|
|
1253
|
+
CursorMotionDuration_Tags["Fixed"] = "Fixed";
|
|
1254
|
+
CursorMotionDuration_Tags["Fitts"] = "Fitts";
|
|
1255
|
+
CursorMotionDuration_Tags["Distance"] = "Distance";
|
|
1256
|
+
})(CursorMotionDuration_Tags || (CursorMotionDuration_Tags = {}));
|
|
1257
|
+
/**
|
|
1258
|
+
* Duration model of a custom motion.
|
|
1259
|
+
*/
|
|
1260
|
+
export const CursorMotionDuration = (() => {
|
|
1261
|
+
class Fixed_ extends UniffiEnum {
|
|
1262
|
+
/**
|
|
1263
|
+
* @private
|
|
1264
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1265
|
+
*/
|
|
1266
|
+
[uniffiTypeNameSymbol] = "CursorMotionDuration";
|
|
1267
|
+
tag = CursorMotionDuration_Tags.Fixed;
|
|
1268
|
+
inner;
|
|
1269
|
+
constructor(inner) {
|
|
1270
|
+
super("CursorMotionDuration", "Fixed");
|
|
1271
|
+
this.inner = Object.freeze(inner);
|
|
1272
|
+
}
|
|
1273
|
+
static new(inner) {
|
|
1274
|
+
return new Fixed_(inner);
|
|
1275
|
+
}
|
|
1276
|
+
static instanceOf(obj) {
|
|
1277
|
+
return obj.tag === CursorMotionDuration_Tags.Fixed;
|
|
1278
|
+
}
|
|
1279
|
+
}
|
|
1280
|
+
class Fitts_ extends UniffiEnum {
|
|
1281
|
+
/**
|
|
1282
|
+
* @private
|
|
1283
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1284
|
+
*/
|
|
1285
|
+
[uniffiTypeNameSymbol] = "CursorMotionDuration";
|
|
1286
|
+
tag = CursorMotionDuration_Tags.Fitts;
|
|
1287
|
+
inner;
|
|
1288
|
+
constructor(inner) {
|
|
1289
|
+
super("CursorMotionDuration", "Fitts");
|
|
1290
|
+
this.inner = Object.freeze(inner);
|
|
1291
|
+
}
|
|
1292
|
+
static new(inner) {
|
|
1293
|
+
return new Fitts_(inner);
|
|
1294
|
+
}
|
|
1295
|
+
static instanceOf(obj) {
|
|
1296
|
+
return obj.tag === CursorMotionDuration_Tags.Fitts;
|
|
1297
|
+
}
|
|
1298
|
+
}
|
|
1299
|
+
class Distance_ extends UniffiEnum {
|
|
1300
|
+
/**
|
|
1301
|
+
* @private
|
|
1302
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1303
|
+
*/
|
|
1304
|
+
[uniffiTypeNameSymbol] = "CursorMotionDuration";
|
|
1305
|
+
tag = CursorMotionDuration_Tags.Distance;
|
|
1306
|
+
inner;
|
|
1307
|
+
constructor(inner) {
|
|
1308
|
+
super("CursorMotionDuration", "Distance");
|
|
1309
|
+
this.inner = Object.freeze(inner);
|
|
1310
|
+
}
|
|
1311
|
+
static new(inner) {
|
|
1312
|
+
return new Distance_(inner);
|
|
1313
|
+
}
|
|
1314
|
+
static instanceOf(obj) {
|
|
1315
|
+
return obj.tag === CursorMotionDuration_Tags.Distance;
|
|
1316
|
+
}
|
|
1317
|
+
}
|
|
1318
|
+
function instanceOf(obj) {
|
|
1319
|
+
return obj[uniffiTypeNameSymbol] === "CursorMotionDuration";
|
|
1320
|
+
}
|
|
1321
|
+
return Object.freeze({
|
|
1322
|
+
instanceOf,
|
|
1323
|
+
Fixed: Fixed_,
|
|
1324
|
+
Fitts: Fitts_,
|
|
1325
|
+
Distance: Distance_
|
|
1326
|
+
});
|
|
1327
|
+
})();
|
|
1328
|
+
// FfiConverter for enum CursorMotionDuration
|
|
1329
|
+
const FfiConverterTypeCursorMotionDuration = (() => {
|
|
1330
|
+
const ordinalConverter = FfiConverterInt32;
|
|
1331
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
1332
|
+
read(from) {
|
|
1333
|
+
switch (ordinalConverter.read(from)) {
|
|
1334
|
+
case 1: return new CursorMotionDuration.Fixed({ ms: FfiConverterFloat64.read(from) });
|
|
1335
|
+
case 2: return new CursorMotionDuration.Fitts({ a: FfiConverterFloat64.read(from), b: FfiConverterFloat64.read(from), minMs: FfiConverterFloat64.read(from), maxMs: FfiConverterFloat64.read(from), scale: FfiConverterFloat64.read(from) });
|
|
1336
|
+
case 3: return new CursorMotionDuration.Distance({ baseMs: FfiConverterFloat64.read(from), msPerPt: FfiConverterFloat64.read(from), minMs: FfiConverterFloat64.read(from), maxMs: FfiConverterFloat64.read(from) });
|
|
1337
|
+
default: throw new UniffiInternalError.UnexpectedEnumCase();
|
|
1338
|
+
}
|
|
1339
|
+
}
|
|
1340
|
+
write(value, into) {
|
|
1341
|
+
switch (value.tag) {
|
|
1342
|
+
case CursorMotionDuration_Tags.Fixed: {
|
|
1343
|
+
ordinalConverter.write(1, into);
|
|
1344
|
+
const inner = value.inner;
|
|
1345
|
+
FfiConverterFloat64.write(inner.ms, into);
|
|
1346
|
+
return;
|
|
1347
|
+
}
|
|
1348
|
+
case CursorMotionDuration_Tags.Fitts: {
|
|
1349
|
+
ordinalConverter.write(2, into);
|
|
1350
|
+
const inner = value.inner;
|
|
1351
|
+
FfiConverterFloat64.write(inner.a, into);
|
|
1352
|
+
FfiConverterFloat64.write(inner.b, into);
|
|
1353
|
+
FfiConverterFloat64.write(inner.minMs, into);
|
|
1354
|
+
FfiConverterFloat64.write(inner.maxMs, into);
|
|
1355
|
+
FfiConverterFloat64.write(inner.scale, into);
|
|
1356
|
+
return;
|
|
1357
|
+
}
|
|
1358
|
+
case CursorMotionDuration_Tags.Distance: {
|
|
1359
|
+
ordinalConverter.write(3, into);
|
|
1360
|
+
const inner = value.inner;
|
|
1361
|
+
FfiConverterFloat64.write(inner.baseMs, into);
|
|
1362
|
+
FfiConverterFloat64.write(inner.msPerPt, into);
|
|
1363
|
+
FfiConverterFloat64.write(inner.minMs, into);
|
|
1364
|
+
FfiConverterFloat64.write(inner.maxMs, into);
|
|
1365
|
+
return;
|
|
1366
|
+
}
|
|
1367
|
+
default:
|
|
1368
|
+
// Throwing from here means that CursorMotionDuration_Tags hasn't matched an ordinal.
|
|
1369
|
+
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
1370
|
+
}
|
|
1371
|
+
}
|
|
1372
|
+
allocationSize(value) {
|
|
1373
|
+
switch (value.tag) {
|
|
1374
|
+
case CursorMotionDuration_Tags.Fixed: {
|
|
1375
|
+
const inner = value.inner;
|
|
1376
|
+
let size = ordinalConverter.allocationSize(1);
|
|
1377
|
+
size += FfiConverterFloat64.allocationSize(inner.ms);
|
|
1378
|
+
return size;
|
|
1379
|
+
}
|
|
1380
|
+
case CursorMotionDuration_Tags.Fitts: {
|
|
1381
|
+
const inner = value.inner;
|
|
1382
|
+
let size = ordinalConverter.allocationSize(2);
|
|
1383
|
+
size += FfiConverterFloat64.allocationSize(inner.a);
|
|
1384
|
+
size += FfiConverterFloat64.allocationSize(inner.b);
|
|
1385
|
+
size += FfiConverterFloat64.allocationSize(inner.minMs);
|
|
1386
|
+
size += FfiConverterFloat64.allocationSize(inner.maxMs);
|
|
1387
|
+
size += FfiConverterFloat64.allocationSize(inner.scale);
|
|
1388
|
+
return size;
|
|
1389
|
+
}
|
|
1390
|
+
case CursorMotionDuration_Tags.Distance: {
|
|
1391
|
+
const inner = value.inner;
|
|
1392
|
+
let size = ordinalConverter.allocationSize(3);
|
|
1393
|
+
size += FfiConverterFloat64.allocationSize(inner.baseMs);
|
|
1394
|
+
size += FfiConverterFloat64.allocationSize(inner.msPerPt);
|
|
1395
|
+
size += FfiConverterFloat64.allocationSize(inner.minMs);
|
|
1396
|
+
size += FfiConverterFloat64.allocationSize(inner.maxMs);
|
|
1397
|
+
return size;
|
|
1398
|
+
}
|
|
1399
|
+
default: throw new UniffiInternalError.UnexpectedEnumCase();
|
|
1400
|
+
}
|
|
1401
|
+
}
|
|
1402
|
+
}
|
|
1403
|
+
return new FFIConverter();
|
|
1404
|
+
})();
|
|
1405
|
+
/**
|
|
1406
|
+
* `Tangent`: the tip leads the motion. `Fixed`: the rest pose.
|
|
1407
|
+
*/
|
|
1408
|
+
export var CursorHeading;
|
|
1409
|
+
(function (CursorHeading) {
|
|
1410
|
+
CursorHeading[CursorHeading["Tangent"] = 0] = "Tangent";
|
|
1411
|
+
CursorHeading[CursorHeading["Fixed"] = 1] = "Fixed";
|
|
1412
|
+
})(CursorHeading || (CursorHeading = {}));
|
|
1413
|
+
const FfiConverterTypeCursorHeading = (() => {
|
|
1414
|
+
const ordinalConverter = FfiConverterInt32;
|
|
1415
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
1416
|
+
read(from) {
|
|
1417
|
+
switch (ordinalConverter.read(from)) {
|
|
1418
|
+
case 1: return CursorHeading.Tangent;
|
|
1419
|
+
case 2: return CursorHeading.Fixed;
|
|
1420
|
+
default: throw new UniffiInternalError.UnexpectedEnumCase();
|
|
1421
|
+
}
|
|
1422
|
+
}
|
|
1423
|
+
write(value, into) {
|
|
1424
|
+
switch (value) {
|
|
1425
|
+
case CursorHeading.Tangent: return ordinalConverter.write(1, into);
|
|
1426
|
+
case CursorHeading.Fixed: return ordinalConverter.write(2, into);
|
|
148
1427
|
}
|
|
149
1428
|
}
|
|
150
1429
|
allocationSize(value) {
|
|
@@ -153,28 +1432,60 @@ const FfiConverterTypeSessionPermissionMode = (() => {
|
|
|
153
1432
|
}
|
|
154
1433
|
return new FFIConverter();
|
|
155
1434
|
})();
|
|
156
|
-
const stringConverter = (() => {
|
|
157
|
-
const encoder = new TextEncoder();
|
|
158
|
-
const decoder = new TextDecoder();
|
|
159
|
-
return {
|
|
160
|
-
stringToBytes: (s) => encoder.encode(s),
|
|
161
|
-
bytesToString: (ab) => decoder.decode(ab),
|
|
162
|
-
stringByteLength: (s) => encoder.encode(s).byteLength,
|
|
163
|
-
writeStringIntoBuffer: (s, buf, offset) => {
|
|
164
|
-
const view = new Uint8Array(buf.arrayBuffer, offset, buf.arrayBuffer.byteLength - offset);
|
|
165
|
-
return encoder.encodeInto(s, view).written;
|
|
166
|
-
},
|
|
167
|
-
readStringFromBuffer: (buf, offset, length) => decoder.decode(new Uint8Array(buf.arrayBuffer, offset, length)),
|
|
168
|
-
};
|
|
169
|
-
})();
|
|
170
|
-
const FfiConverterString = uniffiCreateFfiConverterString(stringConverter);
|
|
171
1435
|
/**
|
|
172
|
-
* Generated factory for {@link
|
|
1436
|
+
* Generated factory for {@link CursorTrailSpec} record objects.
|
|
173
1437
|
*/
|
|
174
|
-
export const
|
|
175
|
-
const defaults = () => ({
|
|
176
|
-
|
|
1438
|
+
export const CursorTrailSpec = (() => {
|
|
1439
|
+
const defaults = () => ({});
|
|
1440
|
+
const create = (() => {
|
|
1441
|
+
return uniffiCreateRecord(defaults);
|
|
1442
|
+
})();
|
|
1443
|
+
return Object.freeze({
|
|
1444
|
+
create,
|
|
1445
|
+
new: create,
|
|
1446
|
+
defaults: () => Object.freeze(defaults()),
|
|
177
1447
|
});
|
|
1448
|
+
})();
|
|
1449
|
+
const FfiConverterTypeCursorTrailSpec = (() => {
|
|
1450
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
1451
|
+
read(from) {
|
|
1452
|
+
return {
|
|
1453
|
+
secs: FfiConverterFloat64.read(from),
|
|
1454
|
+
fadeLen: FfiConverterFloat64.read(from),
|
|
1455
|
+
steps: FfiConverterUInt32.read(from),
|
|
1456
|
+
tailWidth: FfiConverterFloat64.read(from),
|
|
1457
|
+
headWidth: FfiConverterFloat64.read(from),
|
|
1458
|
+
alpha: FfiConverterFloat64.read(from),
|
|
1459
|
+
anchorOffset: FfiConverterFloat64.read(from)
|
|
1460
|
+
};
|
|
1461
|
+
}
|
|
1462
|
+
write(value, into) {
|
|
1463
|
+
FfiConverterFloat64.write(value.secs, into);
|
|
1464
|
+
FfiConverterFloat64.write(value.fadeLen, into);
|
|
1465
|
+
FfiConverterUInt32.write(value.steps, into);
|
|
1466
|
+
FfiConverterFloat64.write(value.tailWidth, into);
|
|
1467
|
+
FfiConverterFloat64.write(value.headWidth, into);
|
|
1468
|
+
FfiConverterFloat64.write(value.alpha, into);
|
|
1469
|
+
FfiConverterFloat64.write(value.anchorOffset, into);
|
|
1470
|
+
}
|
|
1471
|
+
allocationSize(value) {
|
|
1472
|
+
return FfiConverterFloat64.allocationSize(value.secs) +
|
|
1473
|
+
FfiConverterFloat64.allocationSize(value.fadeLen) +
|
|
1474
|
+
FfiConverterUInt32.allocationSize(value.steps) +
|
|
1475
|
+
FfiConverterFloat64.allocationSize(value.tailWidth) +
|
|
1476
|
+
FfiConverterFloat64.allocationSize(value.headWidth) +
|
|
1477
|
+
FfiConverterFloat64.allocationSize(value.alpha) +
|
|
1478
|
+
FfiConverterFloat64.allocationSize(value.anchorOffset);
|
|
1479
|
+
}
|
|
1480
|
+
}
|
|
1481
|
+
;
|
|
1482
|
+
return new FFIConverter();
|
|
1483
|
+
})();
|
|
1484
|
+
/**
|
|
1485
|
+
* Generated factory for {@link CursorMotionSpec} record objects.
|
|
1486
|
+
*/
|
|
1487
|
+
export const CursorMotionSpec = (() => {
|
|
1488
|
+
const defaults = () => ({});
|
|
178
1489
|
const create = (() => {
|
|
179
1490
|
return uniffiCreateRecord(defaults);
|
|
180
1491
|
})();
|
|
@@ -184,45 +1495,45 @@ export const RuntimeAuthorizationOptions = (() => {
|
|
|
184
1495
|
defaults: () => Object.freeze(defaults()),
|
|
185
1496
|
});
|
|
186
1497
|
})();
|
|
187
|
-
const
|
|
1498
|
+
const FfiConverterTypeCursorMotionSpec = (() => {
|
|
188
1499
|
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
189
1500
|
read(from) {
|
|
190
1501
|
return {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
1502
|
+
path: FfiConverterTypeCursorPathShape.read(from),
|
|
1503
|
+
ease: FfiConverterTypeCursorEase.read(from),
|
|
1504
|
+
settle: FfiConverterTypeCursorSettle.read(from),
|
|
1505
|
+
duration: FfiConverterTypeCursorMotionDuration.read(from),
|
|
1506
|
+
heading: FfiConverterTypeCursorHeading.read(from),
|
|
1507
|
+
effects: FfiConverterTypeCursorMotionEffectsOutput.read(from),
|
|
1508
|
+
trail: FfiConverterTypeCursorTrailSpec.read(from)
|
|
198
1509
|
};
|
|
199
1510
|
}
|
|
200
1511
|
write(value, into) {
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
1512
|
+
FfiConverterTypeCursorPathShape.write(value.path, into);
|
|
1513
|
+
FfiConverterTypeCursorEase.write(value.ease, into);
|
|
1514
|
+
FfiConverterTypeCursorSettle.write(value.settle, into);
|
|
1515
|
+
FfiConverterTypeCursorMotionDuration.write(value.duration, into);
|
|
1516
|
+
FfiConverterTypeCursorHeading.write(value.heading, into);
|
|
1517
|
+
FfiConverterTypeCursorMotionEffectsOutput.write(value.effects, into);
|
|
1518
|
+
FfiConverterTypeCursorTrailSpec.write(value.trail, into);
|
|
208
1519
|
}
|
|
209
1520
|
allocationSize(value) {
|
|
210
|
-
return
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
1521
|
+
return FfiConverterTypeCursorPathShape.allocationSize(value.path) +
|
|
1522
|
+
FfiConverterTypeCursorEase.allocationSize(value.ease) +
|
|
1523
|
+
FfiConverterTypeCursorSettle.allocationSize(value.settle) +
|
|
1524
|
+
FfiConverterTypeCursorMotionDuration.allocationSize(value.duration) +
|
|
1525
|
+
FfiConverterTypeCursorHeading.allocationSize(value.heading) +
|
|
1526
|
+
FfiConverterTypeCursorMotionEffectsOutput.allocationSize(value.effects) +
|
|
1527
|
+
FfiConverterTypeCursorTrailSpec.allocationSize(value.trail);
|
|
217
1528
|
}
|
|
218
1529
|
}
|
|
219
1530
|
;
|
|
220
1531
|
return new FFIConverter();
|
|
221
1532
|
})();
|
|
222
1533
|
/**
|
|
223
|
-
* Generated factory for {@link
|
|
1534
|
+
* Generated factory for {@link CursorMoveRequest} record objects.
|
|
224
1535
|
*/
|
|
225
|
-
export const
|
|
1536
|
+
export const CursorMoveRequest = (() => {
|
|
226
1537
|
const defaults = () => ({});
|
|
227
1538
|
const create = (() => {
|
|
228
1539
|
return uniffiCreateRecord(defaults);
|
|
@@ -233,21 +1544,36 @@ export const ConfiguredDriverOptions = (() => {
|
|
|
233
1544
|
defaults: () => Object.freeze(defaults()),
|
|
234
1545
|
});
|
|
235
1546
|
})();
|
|
236
|
-
const
|
|
1547
|
+
const FfiConverterTypeCursorMoveRequest = (() => {
|
|
237
1548
|
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
238
1549
|
read(from) {
|
|
239
1550
|
return {
|
|
240
|
-
|
|
241
|
-
|
|
1551
|
+
fromPoint: FfiConverterTypeCursorMotionPoint.read(from),
|
|
1552
|
+
toPoint: FfiConverterTypeCursorMotionPoint.read(from),
|
|
1553
|
+
fromHeading: FfiConverterOptionalFloat64.read(from),
|
|
1554
|
+
endHeading: FfiConverterOptionalFloat64.read(from),
|
|
1555
|
+
target: FfiConverterOptionalTypeCursorMotionRect.read(from),
|
|
1556
|
+
seed: FfiConverterString.read(from),
|
|
1557
|
+
reducedMotion: FfiConverterBool.read(from)
|
|
242
1558
|
};
|
|
243
1559
|
}
|
|
244
1560
|
write(value, into) {
|
|
245
|
-
|
|
246
|
-
|
|
1561
|
+
FfiConverterTypeCursorMotionPoint.write(value.fromPoint, into);
|
|
1562
|
+
FfiConverterTypeCursorMotionPoint.write(value.toPoint, into);
|
|
1563
|
+
FfiConverterOptionalFloat64.write(value.fromHeading, into);
|
|
1564
|
+
FfiConverterOptionalFloat64.write(value.endHeading, into);
|
|
1565
|
+
FfiConverterOptionalTypeCursorMotionRect.write(value.target, into);
|
|
1566
|
+
FfiConverterString.write(value.seed, into);
|
|
1567
|
+
FfiConverterBool.write(value.reducedMotion, into);
|
|
247
1568
|
}
|
|
248
1569
|
allocationSize(value) {
|
|
249
|
-
return
|
|
250
|
-
|
|
1570
|
+
return FfiConverterTypeCursorMotionPoint.allocationSize(value.fromPoint) +
|
|
1571
|
+
FfiConverterTypeCursorMotionPoint.allocationSize(value.toPoint) +
|
|
1572
|
+
FfiConverterOptionalFloat64.allocationSize(value.fromHeading) +
|
|
1573
|
+
FfiConverterOptionalFloat64.allocationSize(value.endHeading) +
|
|
1574
|
+
FfiConverterOptionalTypeCursorMotionRect.allocationSize(value.target) +
|
|
1575
|
+
FfiConverterString.allocationSize(value.seed) +
|
|
1576
|
+
FfiConverterBool.allocationSize(value.reducedMotion);
|
|
251
1577
|
}
|
|
252
1578
|
}
|
|
253
1579
|
;
|
|
@@ -5160,6 +6486,220 @@ const uniffiTypeCuaDriverSessionObjectFactory = (() => {
|
|
|
5160
6486
|
};
|
|
5161
6487
|
})();
|
|
5162
6488
|
const FfiConverterTypeCuaDriverSession = new FfiConverterObject(uniffiTypeCuaDriverSessionObjectFactory);
|
|
6489
|
+
/**
|
|
6490
|
+
* A planned move, played back by time.
|
|
6491
|
+
*/
|
|
6492
|
+
export class CursorTrajectory extends UniffiAbstractObject {
|
|
6493
|
+
[uniffiTypeNameSymbol] = "CursorTrajectory";
|
|
6494
|
+
[destructorGuardSymbol];
|
|
6495
|
+
[pointerLiteralSymbol];
|
|
6496
|
+
// No primary constructor declared for this class.
|
|
6497
|
+
constructor(pointer) {
|
|
6498
|
+
super();
|
|
6499
|
+
this[pointerLiteralSymbol] = pointer;
|
|
6500
|
+
this[destructorGuardSymbol] = uniffiTypeCursorTrajectoryObjectFactory.bless(pointer);
|
|
6501
|
+
}
|
|
6502
|
+
/**
|
|
6503
|
+
* When the tip first reaches the target, seconds.
|
|
6504
|
+
*/
|
|
6505
|
+
arrivalT() {
|
|
6506
|
+
return FfiConverterFloat64.lift(uniffiCaller.rustCall(
|
|
6507
|
+
/*caller:*/ (callStatus) => {
|
|
6508
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cursortrajectory_arrival_t(uniffiTypeCursorTrajectoryObjectFactory.clonePointer(this), callStatus);
|
|
6509
|
+
},
|
|
6510
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString)));
|
|
6511
|
+
}
|
|
6512
|
+
/**
|
|
6513
|
+
* Seconds until the last sample (any settle included).
|
|
6514
|
+
*/
|
|
6515
|
+
duration() {
|
|
6516
|
+
return FfiConverterFloat64.lift(uniffiCaller.rustCall(
|
|
6517
|
+
/*caller:*/ (callStatus) => {
|
|
6518
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cursortrajectory_duration(uniffiTypeCursorTrajectoryObjectFactory.clonePointer(this), callStatus);
|
|
6519
|
+
},
|
|
6520
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString)));
|
|
6521
|
+
}
|
|
6522
|
+
/**
|
|
6523
|
+
* The move's effects (glow, trail, magnet) at `t`, around the arrow's
|
|
6524
|
+
* body. `blend` is whether the surface can draw translucency.
|
|
6525
|
+
*/
|
|
6526
|
+
effectFrame(t, blend) {
|
|
6527
|
+
return ((__rb) => {
|
|
6528
|
+
try {
|
|
6529
|
+
return FfiConverterTypeCursorEffectFrame.lift(__rb);
|
|
6530
|
+
}
|
|
6531
|
+
finally {
|
|
6532
|
+
nativeModule().rustbuffer_free(__rb);
|
|
6533
|
+
}
|
|
6534
|
+
})(uniffiCaller.rustCall(
|
|
6535
|
+
/*caller:*/ (callStatus) => {
|
|
6536
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cursortrajectory_effect_frame(uniffiTypeCursorTrajectoryObjectFactory.clonePointer(this), FfiConverterFloat64.lower(t, nativeModule().rustbuffer_alloc), FfiConverterBool.lower(blend, nativeModule().rustbuffer_alloc), callStatus);
|
|
6537
|
+
},
|
|
6538
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString)));
|
|
6539
|
+
}
|
|
6540
|
+
effects() {
|
|
6541
|
+
return ((__rb) => {
|
|
6542
|
+
try {
|
|
6543
|
+
return FfiConverterTypeCursorMotionEffectsOutput.lift(__rb);
|
|
6544
|
+
}
|
|
6545
|
+
finally {
|
|
6546
|
+
nativeModule().rustbuffer_free(__rb);
|
|
6547
|
+
}
|
|
6548
|
+
})(uniffiCaller.rustCall(
|
|
6549
|
+
/*caller:*/ (callStatus) => {
|
|
6550
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cursortrajectory_effects(uniffiTypeCursorTrajectoryObjectFactory.clonePointer(this), callStatus);
|
|
6551
|
+
},
|
|
6552
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString)));
|
|
6553
|
+
}
|
|
6554
|
+
/**
|
|
6555
|
+
* When the move and its trail or magnet glow have finished, seconds.
|
|
6556
|
+
*/
|
|
6557
|
+
linger() {
|
|
6558
|
+
return FfiConverterFloat64.lift(uniffiCaller.rustCall(
|
|
6559
|
+
/*caller:*/ (callStatus) => {
|
|
6560
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cursortrajectory_linger(uniffiTypeCursorTrajectoryObjectFactory.clonePointer(this), callStatus);
|
|
6561
|
+
},
|
|
6562
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString)));
|
|
6563
|
+
}
|
|
6564
|
+
/**
|
|
6565
|
+
* Interpolated sample at `t` seconds, clamped to the ends.
|
|
6566
|
+
*/
|
|
6567
|
+
sampleAt(t) {
|
|
6568
|
+
return ((__rb) => {
|
|
6569
|
+
try {
|
|
6570
|
+
return FfiConverterTypeCursorMotionSample.lift(__rb);
|
|
6571
|
+
}
|
|
6572
|
+
finally {
|
|
6573
|
+
nativeModule().rustbuffer_free(__rb);
|
|
6574
|
+
}
|
|
6575
|
+
})(uniffiCaller.rustCall(
|
|
6576
|
+
/*caller:*/ (callStatus) => {
|
|
6577
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cursortrajectory_sample_at(uniffiTypeCursorTrajectoryObjectFactory.clonePointer(this), FfiConverterFloat64.lower(t, nativeModule().rustbuffer_alloc), callStatus);
|
|
6578
|
+
},
|
|
6579
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString)));
|
|
6580
|
+
}
|
|
6581
|
+
/**
|
|
6582
|
+
* Every sample at 120 Hz. Read once; interpolate locally per frame.
|
|
6583
|
+
*/
|
|
6584
|
+
samples() {
|
|
6585
|
+
return ((__rb) => {
|
|
6586
|
+
try {
|
|
6587
|
+
return FfiConverterSequenceTypeCursorMotionSample.lift(__rb);
|
|
6588
|
+
}
|
|
6589
|
+
finally {
|
|
6590
|
+
nativeModule().rustbuffer_free(__rb);
|
|
6591
|
+
}
|
|
6592
|
+
})(uniffiCaller.rustCall(
|
|
6593
|
+
/*caller:*/ (callStatus) => {
|
|
6594
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cursortrajectory_samples(uniffiTypeCursorTrajectoryObjectFactory.clonePointer(this), callStatus);
|
|
6595
|
+
},
|
|
6596
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString)));
|
|
6597
|
+
}
|
|
6598
|
+
/**
|
|
6599
|
+
* Magnetic lock-on time, seconds.
|
|
6600
|
+
*/
|
|
6601
|
+
snapT() {
|
|
6602
|
+
return ((__rb) => {
|
|
6603
|
+
try {
|
|
6604
|
+
return FfiConverterOptionalFloat64.lift(__rb);
|
|
6605
|
+
}
|
|
6606
|
+
finally {
|
|
6607
|
+
nativeModule().rustbuffer_free(__rb);
|
|
6608
|
+
}
|
|
6609
|
+
})(uniffiCaller.rustCall(
|
|
6610
|
+
/*caller:*/ (callStatus) => {
|
|
6611
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cursortrajectory_snap_t(uniffiTypeCursorTrajectoryObjectFactory.clonePointer(this), callStatus);
|
|
6612
|
+
},
|
|
6613
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString)));
|
|
6614
|
+
}
|
|
6615
|
+
/**
|
|
6616
|
+
* The target used for timing (the request's, or a 24 pt box).
|
|
6617
|
+
*/
|
|
6618
|
+
target() {
|
|
6619
|
+
return ((__rb) => {
|
|
6620
|
+
try {
|
|
6621
|
+
return FfiConverterTypeCursorMotionRect.lift(__rb);
|
|
6622
|
+
}
|
|
6623
|
+
finally {
|
|
6624
|
+
nativeModule().rustbuffer_free(__rb);
|
|
6625
|
+
}
|
|
6626
|
+
})(uniffiCaller.rustCall(
|
|
6627
|
+
/*caller:*/ (callStatus) => {
|
|
6628
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cursortrajectory_target(uniffiTypeCursorTrajectoryObjectFactory.clonePointer(this), callStatus);
|
|
6629
|
+
},
|
|
6630
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString)));
|
|
6631
|
+
}
|
|
6632
|
+
targetKnown() {
|
|
6633
|
+
return FfiConverterBool.lift(uniffiCaller.rustCall(
|
|
6634
|
+
/*caller:*/ (callStatus) => {
|
|
6635
|
+
return nativeModule().uniffi_cua_driver_sdk_fn_method_cursortrajectory_target_known(uniffiTypeCursorTrajectoryObjectFactory.clonePointer(this), callStatus);
|
|
6636
|
+
},
|
|
6637
|
+
/*liftString:*/ FfiConverterString.lift.bind(FfiConverterString)));
|
|
6638
|
+
}
|
|
6639
|
+
uniffiDestroy() {
|
|
6640
|
+
const ptr = this[destructorGuardSymbol];
|
|
6641
|
+
if (ptr !== undefined) {
|
|
6642
|
+
const pointer = uniffiTypeCursorTrajectoryObjectFactory.pointer(this);
|
|
6643
|
+
uniffiTypeCursorTrajectoryObjectFactory.freePointer(pointer);
|
|
6644
|
+
uniffiTypeCursorTrajectoryObjectFactory.unbless(ptr);
|
|
6645
|
+
delete this[destructorGuardSymbol];
|
|
6646
|
+
}
|
|
6647
|
+
}
|
|
6648
|
+
static instanceOf(obj_) {
|
|
6649
|
+
return uniffiTypeCursorTrajectoryObjectFactory.isConcreteType(obj_);
|
|
6650
|
+
}
|
|
6651
|
+
}
|
|
6652
|
+
const uniffiTypeCursorTrajectoryObjectFactory = (() => {
|
|
6653
|
+
/// <reference lib="es2021" />
|
|
6654
|
+
const registry = typeof FinalizationRegistry !== 'undefined' ? new FinalizationRegistry((heldValue) => {
|
|
6655
|
+
uniffiTypeCursorTrajectoryObjectFactory.freePointer(heldValue);
|
|
6656
|
+
}) : null;
|
|
6657
|
+
return {
|
|
6658
|
+
create(pointer) {
|
|
6659
|
+
const instance = Object.create(CursorTrajectory.prototype);
|
|
6660
|
+
instance[pointerLiteralSymbol] = pointer;
|
|
6661
|
+
instance[destructorGuardSymbol] = this.bless(pointer);
|
|
6662
|
+
instance[uniffiTypeNameSymbol] = "CursorTrajectory";
|
|
6663
|
+
return instance;
|
|
6664
|
+
},
|
|
6665
|
+
bless(p) {
|
|
6666
|
+
const ptr = {
|
|
6667
|
+
p, // make sure this object doesn't get optimized away.
|
|
6668
|
+
markDestroyed: () => undefined,
|
|
6669
|
+
};
|
|
6670
|
+
if (registry) {
|
|
6671
|
+
registry.register(ptr, p, ptr);
|
|
6672
|
+
}
|
|
6673
|
+
return ptr;
|
|
6674
|
+
},
|
|
6675
|
+
unbless(ptr_) {
|
|
6676
|
+
if (registry) {
|
|
6677
|
+
registry.unregister(ptr_);
|
|
6678
|
+
}
|
|
6679
|
+
},
|
|
6680
|
+
pointer(obj_) {
|
|
6681
|
+
if (obj_[destructorGuardSymbol] === undefined) {
|
|
6682
|
+
throw new UniffiInternalError.UnexpectedNullPointer();
|
|
6683
|
+
}
|
|
6684
|
+
return obj_[pointerLiteralSymbol];
|
|
6685
|
+
},
|
|
6686
|
+
clonePointer(obj_) {
|
|
6687
|
+
const pointer = this.pointer(obj_);
|
|
6688
|
+
return uniffiCaller.rustCall(
|
|
6689
|
+
/*caller:*/ (callStatus) => nativeModule().uniffi_cua_driver_sdk_fn_clone_cursortrajectory(pointer, callStatus),
|
|
6690
|
+
/*liftString:*/ FfiConverterString.lift);
|
|
6691
|
+
},
|
|
6692
|
+
freePointer(pointer) {
|
|
6693
|
+
uniffiCaller.rustCall(
|
|
6694
|
+
/*caller:*/ (callStatus) => nativeModule().uniffi_cua_driver_sdk_fn_free_cursortrajectory(pointer, callStatus),
|
|
6695
|
+
/*liftString:*/ FfiConverterString.lift);
|
|
6696
|
+
},
|
|
6697
|
+
isConcreteType(obj_) {
|
|
6698
|
+
return obj_[destructorGuardSymbol] && obj_[uniffiTypeNameSymbol] === "CursorTrajectory";
|
|
6699
|
+
},
|
|
6700
|
+
};
|
|
6701
|
+
})();
|
|
6702
|
+
const FfiConverterTypeCursorTrajectory = new FfiConverterObject(uniffiTypeCursorTrajectoryObjectFactory);
|
|
5163
6703
|
/**
|
|
5164
6704
|
* Optional observer implemented by trusted embedding-host code.
|
|
5165
6705
|
*
|
|
@@ -5973,6 +7513,18 @@ const FfiConverterTypeMcpDriverChannel = new FfiConverterObject(uniffiTypeMcpDri
|
|
|
5973
7513
|
const FfiConverterSequenceTypeSessionPermissionMode = new FfiConverterArray(FfiConverterTypeSessionPermissionMode);
|
|
5974
7514
|
// FfiConverter for string | undefined
|
|
5975
7515
|
const FfiConverterOptionalString = new FfiConverterOptional(FfiConverterString);
|
|
7516
|
+
// FfiConverter for CursorGlow | undefined
|
|
7517
|
+
const FfiConverterOptionalTypeCursorGlow = new FfiConverterOptional(FfiConverterTypeCursorGlow);
|
|
7518
|
+
// FfiConverter for Array<CursorTrailSegment>
|
|
7519
|
+
const FfiConverterSequenceTypeCursorTrailSegment = new FfiConverterArray(FfiConverterTypeCursorTrailSegment);
|
|
7520
|
+
// FfiConverter for CursorMagnet | undefined
|
|
7521
|
+
const FfiConverterOptionalTypeCursorMagnet = new FfiConverterOptional(FfiConverterTypeCursorMagnet);
|
|
7522
|
+
// FfiConverter for CursorRipple | undefined
|
|
7523
|
+
const FfiConverterOptionalTypeCursorRipple = new FfiConverterOptional(FfiConverterTypeCursorRipple);
|
|
7524
|
+
// FfiConverter for number | undefined
|
|
7525
|
+
const FfiConverterOptionalFloat64 = new FfiConverterOptional(FfiConverterFloat64);
|
|
7526
|
+
// FfiConverter for CursorMotionRect | undefined
|
|
7527
|
+
const FfiConverterOptionalTypeCursorMotionRect = new FfiConverterOptional(FfiConverterTypeCursorMotionRect);
|
|
5976
7528
|
// FfiConverter for Array<string>
|
|
5977
7529
|
const FfiConverterSequenceString = new FfiConverterArray(FfiConverterString);
|
|
5978
7530
|
// FfiConverter for Array<DriverServiceHeader>
|
|
@@ -5991,8 +7543,12 @@ const FfiConverterSequenceTypeImageContent = new FfiConverterArray(FfiConverterT
|
|
|
5991
7543
|
const FfiConverterOptionalTypeActionResult = new FfiConverterOptional(FfiConverterTypeActionResult);
|
|
5992
7544
|
// FfiConverter for VerifyStateOutput | undefined
|
|
5993
7545
|
const FfiConverterOptionalTypeVerifyStateOutput = new FfiConverterOptional(FfiConverterTypeVerifyStateOutput);
|
|
7546
|
+
// FfiConverter for Array<CursorMotionSample>
|
|
7547
|
+
const FfiConverterSequenceTypeCursorMotionSample = new FfiConverterArray(FfiConverterTypeCursorMotionSample);
|
|
5994
7548
|
// FfiConverter for EmbeddedDriverConnection | undefined
|
|
5995
7549
|
const FfiConverterOptionalTypeEmbeddedDriverConnection = new FfiConverterOptional(FfiConverterTypeEmbeddedDriverConnection);
|
|
7550
|
+
// FfiConverter for CursorMotionSpec | undefined
|
|
7551
|
+
const FfiConverterOptionalTypeCursorMotionSpec = new FfiConverterOptional(FfiConverterTypeCursorMotionSpec);
|
|
5996
7552
|
// FfiConverter for DriverOptions | undefined
|
|
5997
7553
|
const FfiConverterOptionalTypeDriverOptions = new FfiConverterOptional(FfiConverterTypeDriverOptions);
|
|
5998
7554
|
/**
|
|
@@ -6025,12 +7581,27 @@ function uniffiEnsureInitialized() {
|
|
|
6025
7581
|
if (nativeModule().uniffi_cua_driver_sdk_checksum_func_current_mac_os_permission_status() !== 22890) {
|
|
6026
7582
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_func_current_mac_os_permission_status");
|
|
6027
7583
|
}
|
|
7584
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_func_cursor_click_effects() !== 47083) {
|
|
7585
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_func_cursor_click_effects");
|
|
7586
|
+
}
|
|
7587
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_func_cursor_motion_spec_for_style() !== 60220) {
|
|
7588
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_func_cursor_motion_spec_for_style");
|
|
7589
|
+
}
|
|
7590
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_func_default_cursor_motion_params() !== 63994) {
|
|
7591
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_func_default_cursor_motion_params");
|
|
7592
|
+
}
|
|
6028
7593
|
if (nativeModule().uniffi_cua_driver_sdk_checksum_func_open_mac_os_screen_recording_settings() !== 6663) {
|
|
6029
7594
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_func_open_mac_os_screen_recording_settings");
|
|
6030
7595
|
}
|
|
6031
7596
|
if (nativeModule().uniffi_cua_driver_sdk_checksum_func_open_mcp_driver_channel() !== 952) {
|
|
6032
7597
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_func_open_mcp_driver_channel");
|
|
6033
7598
|
}
|
|
7599
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_func_plan_cursor_move() !== 47047) {
|
|
7600
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_func_plan_cursor_move");
|
|
7601
|
+
}
|
|
7602
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_func_plan_cursor_spec() !== 61096) {
|
|
7603
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_func_plan_cursor_spec");
|
|
7604
|
+
}
|
|
6034
7605
|
if (nativeModule().uniffi_cua_driver_sdk_checksum_func_request_mac_os_permissions() !== 61823) {
|
|
6035
7606
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_func_request_mac_os_permissions");
|
|
6036
7607
|
}
|
|
@@ -6283,6 +7854,36 @@ function uniffiEnsureInitialized() {
|
|
|
6283
7854
|
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cuadriversession_verify_state() !== 36472) {
|
|
6284
7855
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cuadriversession_verify_state");
|
|
6285
7856
|
}
|
|
7857
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cursortrajectory_arrival_t() !== 18003) {
|
|
7858
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cursortrajectory_arrival_t");
|
|
7859
|
+
}
|
|
7860
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cursortrajectory_duration() !== 45567) {
|
|
7861
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cursortrajectory_duration");
|
|
7862
|
+
}
|
|
7863
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cursortrajectory_effect_frame() !== 63284) {
|
|
7864
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cursortrajectory_effect_frame");
|
|
7865
|
+
}
|
|
7866
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cursortrajectory_effects() !== 30979) {
|
|
7867
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cursortrajectory_effects");
|
|
7868
|
+
}
|
|
7869
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cursortrajectory_linger() !== 61008) {
|
|
7870
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cursortrajectory_linger");
|
|
7871
|
+
}
|
|
7872
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cursortrajectory_sample_at() !== 63579) {
|
|
7873
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cursortrajectory_sample_at");
|
|
7874
|
+
}
|
|
7875
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cursortrajectory_samples() !== 43656) {
|
|
7876
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cursortrajectory_samples");
|
|
7877
|
+
}
|
|
7878
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cursortrajectory_snap_t() !== 61947) {
|
|
7879
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cursortrajectory_snap_t");
|
|
7880
|
+
}
|
|
7881
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cursortrajectory_target() !== 1238) {
|
|
7882
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cursortrajectory_target");
|
|
7883
|
+
}
|
|
7884
|
+
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_cursortrajectory_target_known() !== 24778) {
|
|
7885
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_cursortrajectory_target_known");
|
|
7886
|
+
}
|
|
6286
7887
|
if (nativeModule().uniffi_cua_driver_sdk_checksum_method_driveractivityobserver_on_activity() !== 9786) {
|
|
6287
7888
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_driveractivityobserver_on_activity");
|
|
6288
7889
|
}
|
|
@@ -6358,6 +7959,24 @@ export default Object.freeze({
|
|
|
6358
7959
|
FfiConverterTypeConfiguredDriverOptions,
|
|
6359
7960
|
FfiConverterTypeCuaDriver,
|
|
6360
7961
|
FfiConverterTypeCuaDriverSession,
|
|
7962
|
+
FfiConverterTypeCursorEase,
|
|
7963
|
+
FfiConverterTypeCursorEffectFrame,
|
|
7964
|
+
FfiConverterTypeCursorGlow,
|
|
7965
|
+
FfiConverterTypeCursorHeading,
|
|
7966
|
+
FfiConverterTypeCursorMagnet,
|
|
7967
|
+
FfiConverterTypeCursorMotionDuration,
|
|
7968
|
+
FfiConverterTypeCursorMotionParams,
|
|
7969
|
+
FfiConverterTypeCursorMotionPoint,
|
|
7970
|
+
FfiConverterTypeCursorMotionRect,
|
|
7971
|
+
FfiConverterTypeCursorMotionSample,
|
|
7972
|
+
FfiConverterTypeCursorMotionSpec,
|
|
7973
|
+
FfiConverterTypeCursorMoveRequest,
|
|
7974
|
+
FfiConverterTypeCursorPathShape,
|
|
7975
|
+
FfiConverterTypeCursorRipple,
|
|
7976
|
+
FfiConverterTypeCursorSettle,
|
|
7977
|
+
FfiConverterTypeCursorTrailSegment,
|
|
7978
|
+
FfiConverterTypeCursorTrailSpec,
|
|
7979
|
+
FfiConverterTypeCursorTrajectory,
|
|
6361
7980
|
FfiConverterTypeDriverActivityEvent,
|
|
6362
7981
|
FfiConverterTypeDriverActivityKind,
|
|
6363
7982
|
FfiConverterTypeDriverActivityObserver,
|