@trycua/cua-driver 0.11.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/README.md +131 -0
- package/dist/electron.d.ts +7 -0
- package/dist/electron.js +7 -0
- package/dist/embedded.d.ts +6 -0
- package/dist/embedded.js +6 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +8 -0
- package/dist/native/cua_driver_contract-ffi.d.ts +62 -0
- package/dist/native/cua_driver_contract-ffi.js +294 -0
- package/dist/native/cua_driver_contract.d.ts +515 -0
- package/dist/native/cua_driver_contract.js +987 -0
- package/dist/native/cua_driver_sdk-ffi.d.ts +128 -0
- package/dist/native/cua_driver_sdk-ffi.js +624 -0
- package/dist/native/cua_driver_sdk.d.ts +1541 -0
- package/dist/native/cua_driver_sdk.js +1857 -0
- package/dist/native/index.d.ts +10 -0
- package/dist/native/index.js +16 -0
- package/package.json +52 -0
|
@@ -0,0 +1,987 @@
|
|
|
1
|
+
// This file was autogenerated by some hot garbage in the `uniffi-bindgen-react-native` crate.
|
|
2
|
+
// Trust me, you don't want to mess with it!
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
// @ts-nocheck
|
|
6
|
+
import nativeModule from "./cua_driver_contract-ffi.js";
|
|
7
|
+
import { AbstractFfiConverterByteArray, FfiConverterArray, FfiConverterBool, FfiConverterFloat64, FfiConverterInt32, FfiConverterOptional, FfiConverterUInt32, FfiConverterUInt64, UniffiInternalError, UniffiRustCaller, uniffiCreateFfiConverterString, uniffiCreateRecord, } from "@ubjs/core";
|
|
8
|
+
const uniffiCaller = new UniffiRustCaller(() => ({ code: 0 }));
|
|
9
|
+
const uniffiIsDebug =
|
|
10
|
+
// @ts-ignore -- The process global might not be defined
|
|
11
|
+
typeof process !== "object" ||
|
|
12
|
+
// @ts-ignore -- The process global might not be defined
|
|
13
|
+
process?.env?.NODE_ENV !== "production" ||
|
|
14
|
+
false;
|
|
15
|
+
// Public interface members begin here.
|
|
16
|
+
export var DesktopScope;
|
|
17
|
+
(function (DesktopScope) {
|
|
18
|
+
DesktopScope[DesktopScope["Desktop"] = 0] = "Desktop";
|
|
19
|
+
})(DesktopScope || (DesktopScope = {}));
|
|
20
|
+
const FfiConverterTypeDesktopScope = (() => {
|
|
21
|
+
const ordinalConverter = FfiConverterInt32;
|
|
22
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
23
|
+
read(from) {
|
|
24
|
+
switch (ordinalConverter.read(from)) {
|
|
25
|
+
case 1: return DesktopScope.Desktop;
|
|
26
|
+
default: throw new UniffiInternalError.UnexpectedEnumCase();
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
write(value, into) {
|
|
30
|
+
switch (value) {
|
|
31
|
+
case DesktopScope.Desktop: return ordinalConverter.write(1, into);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
allocationSize(value) {
|
|
35
|
+
return ordinalConverter.allocationSize(0);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return new FFIConverter();
|
|
39
|
+
})();
|
|
40
|
+
const stringConverter = (() => {
|
|
41
|
+
const encoder = new TextEncoder();
|
|
42
|
+
const decoder = new TextDecoder();
|
|
43
|
+
return {
|
|
44
|
+
stringToBytes: (s) => encoder.encode(s),
|
|
45
|
+
bytesToString: (ab) => decoder.decode(ab),
|
|
46
|
+
stringByteLength: (s) => encoder.encode(s).byteLength,
|
|
47
|
+
writeStringIntoBuffer: (s, buf, offset) => {
|
|
48
|
+
const view = new Uint8Array(buf.arrayBuffer, offset, buf.arrayBuffer.byteLength - offset);
|
|
49
|
+
return encoder.encodeInto(s, view).written;
|
|
50
|
+
},
|
|
51
|
+
readStringFromBuffer: (buf, offset, length) => decoder.decode(new Uint8Array(buf.arrayBuffer, offset, length)),
|
|
52
|
+
};
|
|
53
|
+
})();
|
|
54
|
+
const FfiConverterString = uniffiCreateFfiConverterString(stringConverter);
|
|
55
|
+
export var ClickButton;
|
|
56
|
+
(function (ClickButton) {
|
|
57
|
+
ClickButton[ClickButton["Left"] = 0] = "Left";
|
|
58
|
+
ClickButton[ClickButton["Right"] = 1] = "Right";
|
|
59
|
+
ClickButton[ClickButton["Middle"] = 2] = "Middle";
|
|
60
|
+
})(ClickButton || (ClickButton = {}));
|
|
61
|
+
const FfiConverterTypeClickButton = (() => {
|
|
62
|
+
const ordinalConverter = FfiConverterInt32;
|
|
63
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
64
|
+
read(from) {
|
|
65
|
+
switch (ordinalConverter.read(from)) {
|
|
66
|
+
case 1: return ClickButton.Left;
|
|
67
|
+
case 2: return ClickButton.Right;
|
|
68
|
+
case 3: return ClickButton.Middle;
|
|
69
|
+
default: throw new UniffiInternalError.UnexpectedEnumCase();
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
write(value, into) {
|
|
73
|
+
switch (value) {
|
|
74
|
+
case ClickButton.Left: return ordinalConverter.write(1, into);
|
|
75
|
+
case ClickButton.Right: return ordinalConverter.write(2, into);
|
|
76
|
+
case ClickButton.Middle: return ordinalConverter.write(3, into);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
allocationSize(value) {
|
|
80
|
+
return ordinalConverter.allocationSize(0);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return new FFIConverter();
|
|
84
|
+
})();
|
|
85
|
+
/**
|
|
86
|
+
* Generated factory for {@link ClickInput} record objects.
|
|
87
|
+
*/
|
|
88
|
+
export const ClickInput = (() => {
|
|
89
|
+
const defaults = () => ({});
|
|
90
|
+
const create = (() => {
|
|
91
|
+
return uniffiCreateRecord(defaults);
|
|
92
|
+
})();
|
|
93
|
+
return Object.freeze({
|
|
94
|
+
create,
|
|
95
|
+
new: create,
|
|
96
|
+
defaults: () => Object.freeze(defaults()),
|
|
97
|
+
});
|
|
98
|
+
})();
|
|
99
|
+
const FfiConverterTypeClickInput = (() => {
|
|
100
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
101
|
+
read(from) {
|
|
102
|
+
return {
|
|
103
|
+
x: FfiConverterFloat64.read(from),
|
|
104
|
+
y: FfiConverterFloat64.read(from),
|
|
105
|
+
scope: FfiConverterTypeDesktopScope.read(from),
|
|
106
|
+
session: FfiConverterOptionalString.read(from),
|
|
107
|
+
button: FfiConverterOptionalTypeClickButton.read(from),
|
|
108
|
+
count: FfiConverterOptionalUInt32.read(from)
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
write(value, into) {
|
|
112
|
+
FfiConverterFloat64.write(value.x, into);
|
|
113
|
+
FfiConverterFloat64.write(value.y, into);
|
|
114
|
+
FfiConverterTypeDesktopScope.write(value.scope, into);
|
|
115
|
+
FfiConverterOptionalString.write(value.session, into);
|
|
116
|
+
FfiConverterOptionalTypeClickButton.write(value.button, into);
|
|
117
|
+
FfiConverterOptionalUInt32.write(value.count, into);
|
|
118
|
+
}
|
|
119
|
+
allocationSize(value) {
|
|
120
|
+
return FfiConverterFloat64.allocationSize(value.x) +
|
|
121
|
+
FfiConverterFloat64.allocationSize(value.y) +
|
|
122
|
+
FfiConverterTypeDesktopScope.allocationSize(value.scope) +
|
|
123
|
+
FfiConverterOptionalString.allocationSize(value.session) +
|
|
124
|
+
FfiConverterOptionalTypeClickButton.allocationSize(value.button) +
|
|
125
|
+
FfiConverterOptionalUInt32.allocationSize(value.count);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
;
|
|
129
|
+
return new FFIConverter();
|
|
130
|
+
})();
|
|
131
|
+
/**
|
|
132
|
+
* Generated factory for {@link DragInput} record objects.
|
|
133
|
+
*/
|
|
134
|
+
export const DragInput = (() => {
|
|
135
|
+
const defaults = () => ({});
|
|
136
|
+
const create = (() => {
|
|
137
|
+
return uniffiCreateRecord(defaults);
|
|
138
|
+
})();
|
|
139
|
+
return Object.freeze({
|
|
140
|
+
create,
|
|
141
|
+
new: create,
|
|
142
|
+
defaults: () => Object.freeze(defaults()),
|
|
143
|
+
});
|
|
144
|
+
})();
|
|
145
|
+
const FfiConverterTypeDragInput = (() => {
|
|
146
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
147
|
+
read(from) {
|
|
148
|
+
return {
|
|
149
|
+
fromX: FfiConverterFloat64.read(from),
|
|
150
|
+
fromY: FfiConverterFloat64.read(from),
|
|
151
|
+
toX: FfiConverterFloat64.read(from),
|
|
152
|
+
toY: FfiConverterFloat64.read(from),
|
|
153
|
+
scope: FfiConverterTypeDesktopScope.read(from),
|
|
154
|
+
session: FfiConverterOptionalString.read(from),
|
|
155
|
+
durationMs: FfiConverterOptionalUInt64.read(from),
|
|
156
|
+
steps: FfiConverterOptionalUInt64.read(from),
|
|
157
|
+
button: FfiConverterOptionalTypeClickButton.read(from),
|
|
158
|
+
modifier: FfiConverterOptionalSequenceString.read(from)
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
write(value, into) {
|
|
162
|
+
FfiConverterFloat64.write(value.fromX, into);
|
|
163
|
+
FfiConverterFloat64.write(value.fromY, into);
|
|
164
|
+
FfiConverterFloat64.write(value.toX, into);
|
|
165
|
+
FfiConverterFloat64.write(value.toY, into);
|
|
166
|
+
FfiConverterTypeDesktopScope.write(value.scope, into);
|
|
167
|
+
FfiConverterOptionalString.write(value.session, into);
|
|
168
|
+
FfiConverterOptionalUInt64.write(value.durationMs, into);
|
|
169
|
+
FfiConverterOptionalUInt64.write(value.steps, into);
|
|
170
|
+
FfiConverterOptionalTypeClickButton.write(value.button, into);
|
|
171
|
+
FfiConverterOptionalSequenceString.write(value.modifier, into);
|
|
172
|
+
}
|
|
173
|
+
allocationSize(value) {
|
|
174
|
+
return FfiConverterFloat64.allocationSize(value.fromX) +
|
|
175
|
+
FfiConverterFloat64.allocationSize(value.fromY) +
|
|
176
|
+
FfiConverterFloat64.allocationSize(value.toX) +
|
|
177
|
+
FfiConverterFloat64.allocationSize(value.toY) +
|
|
178
|
+
FfiConverterTypeDesktopScope.allocationSize(value.scope) +
|
|
179
|
+
FfiConverterOptionalString.allocationSize(value.session) +
|
|
180
|
+
FfiConverterOptionalUInt64.allocationSize(value.durationMs) +
|
|
181
|
+
FfiConverterOptionalUInt64.allocationSize(value.steps) +
|
|
182
|
+
FfiConverterOptionalTypeClickButton.allocationSize(value.button) +
|
|
183
|
+
FfiConverterOptionalSequenceString.allocationSize(value.modifier);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
;
|
|
187
|
+
return new FFIConverter();
|
|
188
|
+
})();
|
|
189
|
+
/**
|
|
190
|
+
* Generated factory for {@link EndSessionInput} record objects.
|
|
191
|
+
*/
|
|
192
|
+
export const EndSessionInput = (() => {
|
|
193
|
+
const defaults = () => ({});
|
|
194
|
+
const create = (() => {
|
|
195
|
+
return uniffiCreateRecord(defaults);
|
|
196
|
+
})();
|
|
197
|
+
return Object.freeze({
|
|
198
|
+
create,
|
|
199
|
+
new: create,
|
|
200
|
+
defaults: () => Object.freeze(defaults()),
|
|
201
|
+
});
|
|
202
|
+
})();
|
|
203
|
+
const FfiConverterTypeEndSessionInput = (() => {
|
|
204
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
205
|
+
read(from) {
|
|
206
|
+
return {
|
|
207
|
+
session: FfiConverterString.read(from)
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
write(value, into) {
|
|
211
|
+
FfiConverterString.write(value.session, into);
|
|
212
|
+
}
|
|
213
|
+
allocationSize(value) {
|
|
214
|
+
return FfiConverterString.allocationSize(value.session);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
;
|
|
218
|
+
return new FFIConverter();
|
|
219
|
+
})();
|
|
220
|
+
/**
|
|
221
|
+
* Generated factory for {@link EndSessionOutput} record objects.
|
|
222
|
+
*/
|
|
223
|
+
export const EndSessionOutput = (() => {
|
|
224
|
+
const defaults = () => ({});
|
|
225
|
+
const create = (() => {
|
|
226
|
+
return uniffiCreateRecord(defaults);
|
|
227
|
+
})();
|
|
228
|
+
return Object.freeze({
|
|
229
|
+
create,
|
|
230
|
+
new: create,
|
|
231
|
+
defaults: () => Object.freeze(defaults()),
|
|
232
|
+
});
|
|
233
|
+
})();
|
|
234
|
+
const FfiConverterTypeEndSessionOutput = (() => {
|
|
235
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
236
|
+
read(from) {
|
|
237
|
+
return {
|
|
238
|
+
session: FfiConverterString.read(from),
|
|
239
|
+
active: FfiConverterBool.read(from)
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
write(value, into) {
|
|
243
|
+
FfiConverterString.write(value.session, into);
|
|
244
|
+
FfiConverterBool.write(value.active, into);
|
|
245
|
+
}
|
|
246
|
+
allocationSize(value) {
|
|
247
|
+
return FfiConverterString.allocationSize(value.session) +
|
|
248
|
+
FfiConverterBool.allocationSize(value.active);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
;
|
|
252
|
+
return new FFIConverter();
|
|
253
|
+
})();
|
|
254
|
+
export var EscalationReason;
|
|
255
|
+
(function (EscalationReason) {
|
|
256
|
+
EscalationReason[EscalationReason["AxTreePixelMismatch"] = 0] = "AxTreePixelMismatch";
|
|
257
|
+
EscalationReason[EscalationReason["BackgroundDeliveryFailed"] = 1] = "BackgroundDeliveryFailed";
|
|
258
|
+
EscalationReason[EscalationReason["ForegroundIneffective"] = 2] = "ForegroundIneffective";
|
|
259
|
+
EscalationReason[EscalationReason["NoWindowTarget"] = 3] = "NoWindowTarget";
|
|
260
|
+
EscalationReason[EscalationReason["Other"] = 4] = "Other";
|
|
261
|
+
})(EscalationReason || (EscalationReason = {}));
|
|
262
|
+
const FfiConverterTypeEscalationReason = (() => {
|
|
263
|
+
const ordinalConverter = FfiConverterInt32;
|
|
264
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
265
|
+
read(from) {
|
|
266
|
+
switch (ordinalConverter.read(from)) {
|
|
267
|
+
case 1: return EscalationReason.AxTreePixelMismatch;
|
|
268
|
+
case 2: return EscalationReason.BackgroundDeliveryFailed;
|
|
269
|
+
case 3: return EscalationReason.ForegroundIneffective;
|
|
270
|
+
case 4: return EscalationReason.NoWindowTarget;
|
|
271
|
+
case 5: return EscalationReason.Other;
|
|
272
|
+
default: throw new UniffiInternalError.UnexpectedEnumCase();
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
write(value, into) {
|
|
276
|
+
switch (value) {
|
|
277
|
+
case EscalationReason.AxTreePixelMismatch: return ordinalConverter.write(1, into);
|
|
278
|
+
case EscalationReason.BackgroundDeliveryFailed: return ordinalConverter.write(2, into);
|
|
279
|
+
case EscalationReason.ForegroundIneffective: return ordinalConverter.write(3, into);
|
|
280
|
+
case EscalationReason.NoWindowTarget: return ordinalConverter.write(4, into);
|
|
281
|
+
case EscalationReason.Other: return ordinalConverter.write(5, into);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
allocationSize(value) {
|
|
285
|
+
return ordinalConverter.allocationSize(0);
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
return new FFIConverter();
|
|
289
|
+
})();
|
|
290
|
+
/**
|
|
291
|
+
* Generated factory for {@link EscalateSessionInput} record objects.
|
|
292
|
+
*/
|
|
293
|
+
export const EscalateSessionInput = (() => {
|
|
294
|
+
const defaults = () => ({});
|
|
295
|
+
const create = (() => {
|
|
296
|
+
return uniffiCreateRecord(defaults);
|
|
297
|
+
})();
|
|
298
|
+
return Object.freeze({
|
|
299
|
+
create,
|
|
300
|
+
new: create,
|
|
301
|
+
defaults: () => Object.freeze(defaults()),
|
|
302
|
+
});
|
|
303
|
+
})();
|
|
304
|
+
const FfiConverterTypeEscalateSessionInput = (() => {
|
|
305
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
306
|
+
read(from) {
|
|
307
|
+
return {
|
|
308
|
+
session: FfiConverterString.read(from),
|
|
309
|
+
reason: FfiConverterTypeEscalationReason.read(from),
|
|
310
|
+
detail: FfiConverterOptionalString.read(from)
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
write(value, into) {
|
|
314
|
+
FfiConverterString.write(value.session, into);
|
|
315
|
+
FfiConverterTypeEscalationReason.write(value.reason, into);
|
|
316
|
+
FfiConverterOptionalString.write(value.detail, into);
|
|
317
|
+
}
|
|
318
|
+
allocationSize(value) {
|
|
319
|
+
return FfiConverterString.allocationSize(value.session) +
|
|
320
|
+
FfiConverterTypeEscalationReason.allocationSize(value.reason) +
|
|
321
|
+
FfiConverterOptionalString.allocationSize(value.detail);
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
;
|
|
325
|
+
return new FFIConverter();
|
|
326
|
+
})();
|
|
327
|
+
/**
|
|
328
|
+
* Generated factory for {@link GetCursorPositionInput} record objects.
|
|
329
|
+
*/
|
|
330
|
+
export const GetCursorPositionInput = (() => {
|
|
331
|
+
const defaults = () => ({});
|
|
332
|
+
const create = (() => {
|
|
333
|
+
return uniffiCreateRecord(defaults);
|
|
334
|
+
})();
|
|
335
|
+
return Object.freeze({
|
|
336
|
+
create,
|
|
337
|
+
new: create,
|
|
338
|
+
defaults: () => Object.freeze(defaults()),
|
|
339
|
+
});
|
|
340
|
+
})();
|
|
341
|
+
const FfiConverterTypeGetCursorPositionInput = (() => {
|
|
342
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
343
|
+
read(from) {
|
|
344
|
+
return {
|
|
345
|
+
session: FfiConverterOptionalString.read(from)
|
|
346
|
+
};
|
|
347
|
+
}
|
|
348
|
+
write(value, into) {
|
|
349
|
+
FfiConverterOptionalString.write(value.session, into);
|
|
350
|
+
}
|
|
351
|
+
allocationSize(value) {
|
|
352
|
+
return FfiConverterOptionalString.allocationSize(value.session);
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
;
|
|
356
|
+
return new FFIConverter();
|
|
357
|
+
})();
|
|
358
|
+
/**
|
|
359
|
+
* Generated factory for {@link GetDesktopStateInput} record objects.
|
|
360
|
+
*/
|
|
361
|
+
export const GetDesktopStateInput = (() => {
|
|
362
|
+
const defaults = () => ({});
|
|
363
|
+
const create = (() => {
|
|
364
|
+
return uniffiCreateRecord(defaults);
|
|
365
|
+
})();
|
|
366
|
+
return Object.freeze({
|
|
367
|
+
create,
|
|
368
|
+
new: create,
|
|
369
|
+
defaults: () => Object.freeze(defaults()),
|
|
370
|
+
});
|
|
371
|
+
})();
|
|
372
|
+
const FfiConverterTypeGetDesktopStateInput = (() => {
|
|
373
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
374
|
+
read(from) {
|
|
375
|
+
return {
|
|
376
|
+
session: FfiConverterOptionalString.read(from),
|
|
377
|
+
screenshotOutFile: FfiConverterOptionalString.read(from)
|
|
378
|
+
};
|
|
379
|
+
}
|
|
380
|
+
write(value, into) {
|
|
381
|
+
FfiConverterOptionalString.write(value.session, into);
|
|
382
|
+
FfiConverterOptionalString.write(value.screenshotOutFile, into);
|
|
383
|
+
}
|
|
384
|
+
allocationSize(value) {
|
|
385
|
+
return FfiConverterOptionalString.allocationSize(value.session) +
|
|
386
|
+
FfiConverterOptionalString.allocationSize(value.screenshotOutFile);
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
;
|
|
390
|
+
return new FFIConverter();
|
|
391
|
+
})();
|
|
392
|
+
/**
|
|
393
|
+
* Generated factory for {@link GetScreenSizeInput} record objects.
|
|
394
|
+
*/
|
|
395
|
+
export const GetScreenSizeInput = (() => {
|
|
396
|
+
const defaults = () => ({});
|
|
397
|
+
const create = (() => {
|
|
398
|
+
return uniffiCreateRecord(defaults);
|
|
399
|
+
})();
|
|
400
|
+
return Object.freeze({
|
|
401
|
+
create,
|
|
402
|
+
new: create,
|
|
403
|
+
defaults: () => Object.freeze(defaults()),
|
|
404
|
+
});
|
|
405
|
+
})();
|
|
406
|
+
const FfiConverterTypeGetScreenSizeInput = (() => {
|
|
407
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
408
|
+
read(from) {
|
|
409
|
+
return {
|
|
410
|
+
session: FfiConverterOptionalString.read(from)
|
|
411
|
+
};
|
|
412
|
+
}
|
|
413
|
+
write(value, into) {
|
|
414
|
+
FfiConverterOptionalString.write(value.session, into);
|
|
415
|
+
}
|
|
416
|
+
allocationSize(value) {
|
|
417
|
+
return FfiConverterOptionalString.allocationSize(value.session);
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
;
|
|
421
|
+
return new FFIConverter();
|
|
422
|
+
})();
|
|
423
|
+
/**
|
|
424
|
+
* Generated factory for {@link GetSessionStateInput} record objects.
|
|
425
|
+
*/
|
|
426
|
+
export const GetSessionStateInput = (() => {
|
|
427
|
+
const defaults = () => ({});
|
|
428
|
+
const create = (() => {
|
|
429
|
+
return uniffiCreateRecord(defaults);
|
|
430
|
+
})();
|
|
431
|
+
return Object.freeze({
|
|
432
|
+
create,
|
|
433
|
+
new: create,
|
|
434
|
+
defaults: () => Object.freeze(defaults()),
|
|
435
|
+
});
|
|
436
|
+
})();
|
|
437
|
+
const FfiConverterTypeGetSessionStateInput = (() => {
|
|
438
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
439
|
+
read(from) {
|
|
440
|
+
return {
|
|
441
|
+
session: FfiConverterString.read(from)
|
|
442
|
+
};
|
|
443
|
+
}
|
|
444
|
+
write(value, into) {
|
|
445
|
+
FfiConverterString.write(value.session, into);
|
|
446
|
+
}
|
|
447
|
+
allocationSize(value) {
|
|
448
|
+
return FfiConverterString.allocationSize(value.session);
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
;
|
|
452
|
+
return new FFIConverter();
|
|
453
|
+
})();
|
|
454
|
+
/**
|
|
455
|
+
* Generated factory for {@link HotkeyInput} record objects.
|
|
456
|
+
*/
|
|
457
|
+
export const HotkeyInput = (() => {
|
|
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 FfiConverterTypeHotkeyInput = (() => {
|
|
469
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
470
|
+
read(from) {
|
|
471
|
+
return {
|
|
472
|
+
keys: FfiConverterSequenceString.read(from),
|
|
473
|
+
scope: FfiConverterTypeDesktopScope.read(from),
|
|
474
|
+
session: FfiConverterOptionalString.read(from)
|
|
475
|
+
};
|
|
476
|
+
}
|
|
477
|
+
write(value, into) {
|
|
478
|
+
FfiConverterSequenceString.write(value.keys, into);
|
|
479
|
+
FfiConverterTypeDesktopScope.write(value.scope, into);
|
|
480
|
+
FfiConverterOptionalString.write(value.session, into);
|
|
481
|
+
}
|
|
482
|
+
allocationSize(value) {
|
|
483
|
+
return FfiConverterSequenceString.allocationSize(value.keys) +
|
|
484
|
+
FfiConverterTypeDesktopScope.allocationSize(value.scope) +
|
|
485
|
+
FfiConverterOptionalString.allocationSize(value.session);
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
;
|
|
489
|
+
return new FFIConverter();
|
|
490
|
+
})();
|
|
491
|
+
/**
|
|
492
|
+
* Generated factory for {@link MoveCursorInput} record objects.
|
|
493
|
+
*/
|
|
494
|
+
export const MoveCursorInput = (() => {
|
|
495
|
+
const defaults = () => ({});
|
|
496
|
+
const create = (() => {
|
|
497
|
+
return uniffiCreateRecord(defaults);
|
|
498
|
+
})();
|
|
499
|
+
return Object.freeze({
|
|
500
|
+
create,
|
|
501
|
+
new: create,
|
|
502
|
+
defaults: () => Object.freeze(defaults()),
|
|
503
|
+
});
|
|
504
|
+
})();
|
|
505
|
+
const FfiConverterTypeMoveCursorInput = (() => {
|
|
506
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
507
|
+
read(from) {
|
|
508
|
+
return {
|
|
509
|
+
x: FfiConverterFloat64.read(from),
|
|
510
|
+
y: FfiConverterFloat64.read(from),
|
|
511
|
+
scope: FfiConverterTypeDesktopScope.read(from),
|
|
512
|
+
session: FfiConverterOptionalString.read(from)
|
|
513
|
+
};
|
|
514
|
+
}
|
|
515
|
+
write(value, into) {
|
|
516
|
+
FfiConverterFloat64.write(value.x, into);
|
|
517
|
+
FfiConverterFloat64.write(value.y, into);
|
|
518
|
+
FfiConverterTypeDesktopScope.write(value.scope, into);
|
|
519
|
+
FfiConverterOptionalString.write(value.session, into);
|
|
520
|
+
}
|
|
521
|
+
allocationSize(value) {
|
|
522
|
+
return FfiConverterFloat64.allocationSize(value.x) +
|
|
523
|
+
FfiConverterFloat64.allocationSize(value.y) +
|
|
524
|
+
FfiConverterTypeDesktopScope.allocationSize(value.scope) +
|
|
525
|
+
FfiConverterOptionalString.allocationSize(value.session);
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
;
|
|
529
|
+
return new FFIConverter();
|
|
530
|
+
})();
|
|
531
|
+
/**
|
|
532
|
+
* Generated factory for {@link PressKeyInput} record objects.
|
|
533
|
+
*/
|
|
534
|
+
export const PressKeyInput = (() => {
|
|
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 FfiConverterTypePressKeyInput = (() => {
|
|
546
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
547
|
+
read(from) {
|
|
548
|
+
return {
|
|
549
|
+
key: FfiConverterString.read(from),
|
|
550
|
+
scope: FfiConverterTypeDesktopScope.read(from),
|
|
551
|
+
session: FfiConverterOptionalString.read(from),
|
|
552
|
+
modifiers: FfiConverterOptionalSequenceString.read(from)
|
|
553
|
+
};
|
|
554
|
+
}
|
|
555
|
+
write(value, into) {
|
|
556
|
+
FfiConverterString.write(value.key, into);
|
|
557
|
+
FfiConverterTypeDesktopScope.write(value.scope, into);
|
|
558
|
+
FfiConverterOptionalString.write(value.session, into);
|
|
559
|
+
FfiConverterOptionalSequenceString.write(value.modifiers, into);
|
|
560
|
+
}
|
|
561
|
+
allocationSize(value) {
|
|
562
|
+
return FfiConverterString.allocationSize(value.key) +
|
|
563
|
+
FfiConverterTypeDesktopScope.allocationSize(value.scope) +
|
|
564
|
+
FfiConverterOptionalString.allocationSize(value.session) +
|
|
565
|
+
FfiConverterOptionalSequenceString.allocationSize(value.modifiers);
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
;
|
|
569
|
+
return new FFIConverter();
|
|
570
|
+
})();
|
|
571
|
+
export var ScrollDirection;
|
|
572
|
+
(function (ScrollDirection) {
|
|
573
|
+
ScrollDirection[ScrollDirection["Up"] = 0] = "Up";
|
|
574
|
+
ScrollDirection[ScrollDirection["Down"] = 1] = "Down";
|
|
575
|
+
ScrollDirection[ScrollDirection["Left"] = 2] = "Left";
|
|
576
|
+
ScrollDirection[ScrollDirection["Right"] = 3] = "Right";
|
|
577
|
+
})(ScrollDirection || (ScrollDirection = {}));
|
|
578
|
+
const FfiConverterTypeScrollDirection = (() => {
|
|
579
|
+
const ordinalConverter = FfiConverterInt32;
|
|
580
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
581
|
+
read(from) {
|
|
582
|
+
switch (ordinalConverter.read(from)) {
|
|
583
|
+
case 1: return ScrollDirection.Up;
|
|
584
|
+
case 2: return ScrollDirection.Down;
|
|
585
|
+
case 3: return ScrollDirection.Left;
|
|
586
|
+
case 4: return ScrollDirection.Right;
|
|
587
|
+
default: throw new UniffiInternalError.UnexpectedEnumCase();
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
write(value, into) {
|
|
591
|
+
switch (value) {
|
|
592
|
+
case ScrollDirection.Up: return ordinalConverter.write(1, into);
|
|
593
|
+
case ScrollDirection.Down: return ordinalConverter.write(2, into);
|
|
594
|
+
case ScrollDirection.Left: return ordinalConverter.write(3, into);
|
|
595
|
+
case ScrollDirection.Right: return ordinalConverter.write(4, into);
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
allocationSize(value) {
|
|
599
|
+
return ordinalConverter.allocationSize(0);
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
return new FFIConverter();
|
|
603
|
+
})();
|
|
604
|
+
export var ScrollBy;
|
|
605
|
+
(function (ScrollBy) {
|
|
606
|
+
ScrollBy[ScrollBy["Line"] = 0] = "Line";
|
|
607
|
+
ScrollBy[ScrollBy["Page"] = 1] = "Page";
|
|
608
|
+
})(ScrollBy || (ScrollBy = {}));
|
|
609
|
+
const FfiConverterTypeScrollBy = (() => {
|
|
610
|
+
const ordinalConverter = FfiConverterInt32;
|
|
611
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
612
|
+
read(from) {
|
|
613
|
+
switch (ordinalConverter.read(from)) {
|
|
614
|
+
case 1: return ScrollBy.Line;
|
|
615
|
+
case 2: return ScrollBy.Page;
|
|
616
|
+
default: throw new UniffiInternalError.UnexpectedEnumCase();
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
write(value, into) {
|
|
620
|
+
switch (value) {
|
|
621
|
+
case ScrollBy.Line: return ordinalConverter.write(1, into);
|
|
622
|
+
case ScrollBy.Page: return ordinalConverter.write(2, into);
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
allocationSize(value) {
|
|
626
|
+
return ordinalConverter.allocationSize(0);
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
return new FFIConverter();
|
|
630
|
+
})();
|
|
631
|
+
/**
|
|
632
|
+
* Generated factory for {@link ScrollInput} record objects.
|
|
633
|
+
*/
|
|
634
|
+
export const ScrollInput = (() => {
|
|
635
|
+
const defaults = () => ({});
|
|
636
|
+
const create = (() => {
|
|
637
|
+
return uniffiCreateRecord(defaults);
|
|
638
|
+
})();
|
|
639
|
+
return Object.freeze({
|
|
640
|
+
create,
|
|
641
|
+
new: create,
|
|
642
|
+
defaults: () => Object.freeze(defaults()),
|
|
643
|
+
});
|
|
644
|
+
})();
|
|
645
|
+
const FfiConverterTypeScrollInput = (() => {
|
|
646
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
647
|
+
read(from) {
|
|
648
|
+
return {
|
|
649
|
+
x: FfiConverterFloat64.read(from),
|
|
650
|
+
y: FfiConverterFloat64.read(from),
|
|
651
|
+
direction: FfiConverterTypeScrollDirection.read(from),
|
|
652
|
+
scope: FfiConverterTypeDesktopScope.read(from),
|
|
653
|
+
session: FfiConverterOptionalString.read(from),
|
|
654
|
+
by: FfiConverterOptionalTypeScrollBy.read(from),
|
|
655
|
+
amount: FfiConverterOptionalUInt64.read(from)
|
|
656
|
+
};
|
|
657
|
+
}
|
|
658
|
+
write(value, into) {
|
|
659
|
+
FfiConverterFloat64.write(value.x, into);
|
|
660
|
+
FfiConverterFloat64.write(value.y, into);
|
|
661
|
+
FfiConverterTypeScrollDirection.write(value.direction, into);
|
|
662
|
+
FfiConverterTypeDesktopScope.write(value.scope, into);
|
|
663
|
+
FfiConverterOptionalString.write(value.session, into);
|
|
664
|
+
FfiConverterOptionalTypeScrollBy.write(value.by, into);
|
|
665
|
+
FfiConverterOptionalUInt64.write(value.amount, into);
|
|
666
|
+
}
|
|
667
|
+
allocationSize(value) {
|
|
668
|
+
return FfiConverterFloat64.allocationSize(value.x) +
|
|
669
|
+
FfiConverterFloat64.allocationSize(value.y) +
|
|
670
|
+
FfiConverterTypeScrollDirection.allocationSize(value.direction) +
|
|
671
|
+
FfiConverterTypeDesktopScope.allocationSize(value.scope) +
|
|
672
|
+
FfiConverterOptionalString.allocationSize(value.session) +
|
|
673
|
+
FfiConverterOptionalTypeScrollBy.allocationSize(value.by) +
|
|
674
|
+
FfiConverterOptionalUInt64.allocationSize(value.amount);
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
;
|
|
678
|
+
return new FFIConverter();
|
|
679
|
+
})();
|
|
680
|
+
export var CaptureScope;
|
|
681
|
+
(function (CaptureScope) {
|
|
682
|
+
CaptureScope[CaptureScope["Auto"] = 0] = "Auto";
|
|
683
|
+
CaptureScope[CaptureScope["Window"] = 1] = "Window";
|
|
684
|
+
CaptureScope[CaptureScope["Desktop"] = 2] = "Desktop";
|
|
685
|
+
})(CaptureScope || (CaptureScope = {}));
|
|
686
|
+
const FfiConverterTypeCaptureScope = (() => {
|
|
687
|
+
const ordinalConverter = FfiConverterInt32;
|
|
688
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
689
|
+
read(from) {
|
|
690
|
+
switch (ordinalConverter.read(from)) {
|
|
691
|
+
case 1: return CaptureScope.Auto;
|
|
692
|
+
case 2: return CaptureScope.Window;
|
|
693
|
+
case 3: return CaptureScope.Desktop;
|
|
694
|
+
default: throw new UniffiInternalError.UnexpectedEnumCase();
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
write(value, into) {
|
|
698
|
+
switch (value) {
|
|
699
|
+
case CaptureScope.Auto: return ordinalConverter.write(1, into);
|
|
700
|
+
case CaptureScope.Window: return ordinalConverter.write(2, into);
|
|
701
|
+
case CaptureScope.Desktop: return ordinalConverter.write(3, into);
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
allocationSize(value) {
|
|
705
|
+
return ordinalConverter.allocationSize(0);
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
return new FFIConverter();
|
|
709
|
+
})();
|
|
710
|
+
export var EffectiveScope;
|
|
711
|
+
(function (EffectiveScope) {
|
|
712
|
+
EffectiveScope[EffectiveScope["Window"] = 0] = "Window";
|
|
713
|
+
EffectiveScope[EffectiveScope["Desktop"] = 1] = "Desktop";
|
|
714
|
+
})(EffectiveScope || (EffectiveScope = {}));
|
|
715
|
+
const FfiConverterTypeEffectiveScope = (() => {
|
|
716
|
+
const ordinalConverter = FfiConverterInt32;
|
|
717
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
718
|
+
read(from) {
|
|
719
|
+
switch (ordinalConverter.read(from)) {
|
|
720
|
+
case 1: return EffectiveScope.Window;
|
|
721
|
+
case 2: return EffectiveScope.Desktop;
|
|
722
|
+
default: throw new UniffiInternalError.UnexpectedEnumCase();
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
write(value, into) {
|
|
726
|
+
switch (value) {
|
|
727
|
+
case EffectiveScope.Window: return ordinalConverter.write(1, into);
|
|
728
|
+
case EffectiveScope.Desktop: return ordinalConverter.write(2, into);
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
allocationSize(value) {
|
|
732
|
+
return ordinalConverter.allocationSize(0);
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
return new FFIConverter();
|
|
736
|
+
})();
|
|
737
|
+
/**
|
|
738
|
+
* Generated factory for {@link SessionStateOutput} record objects.
|
|
739
|
+
*/
|
|
740
|
+
export const SessionStateOutput = (() => {
|
|
741
|
+
const defaults = () => ({});
|
|
742
|
+
const create = (() => {
|
|
743
|
+
return uniffiCreateRecord(defaults);
|
|
744
|
+
})();
|
|
745
|
+
return Object.freeze({
|
|
746
|
+
create,
|
|
747
|
+
new: create,
|
|
748
|
+
defaults: () => Object.freeze(defaults()),
|
|
749
|
+
});
|
|
750
|
+
})();
|
|
751
|
+
const FfiConverterTypeSessionStateOutput = (() => {
|
|
752
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
753
|
+
read(from) {
|
|
754
|
+
return {
|
|
755
|
+
session: FfiConverterString.read(from),
|
|
756
|
+
captureScope: FfiConverterTypeCaptureScope.read(from),
|
|
757
|
+
effectiveScope: FfiConverterTypeEffectiveScope.read(from),
|
|
758
|
+
desktopUnlocked: FfiConverterBool.read(from),
|
|
759
|
+
escalationReason: FfiConverterOptionalTypeEscalationReason.read(from),
|
|
760
|
+
escalationDetail: FfiConverterOptionalString.read(from)
|
|
761
|
+
};
|
|
762
|
+
}
|
|
763
|
+
write(value, into) {
|
|
764
|
+
FfiConverterString.write(value.session, into);
|
|
765
|
+
FfiConverterTypeCaptureScope.write(value.captureScope, into);
|
|
766
|
+
FfiConverterTypeEffectiveScope.write(value.effectiveScope, into);
|
|
767
|
+
FfiConverterBool.write(value.desktopUnlocked, into);
|
|
768
|
+
FfiConverterOptionalTypeEscalationReason.write(value.escalationReason, into);
|
|
769
|
+
FfiConverterOptionalString.write(value.escalationDetail, into);
|
|
770
|
+
}
|
|
771
|
+
allocationSize(value) {
|
|
772
|
+
return FfiConverterString.allocationSize(value.session) +
|
|
773
|
+
FfiConverterTypeCaptureScope.allocationSize(value.captureScope) +
|
|
774
|
+
FfiConverterTypeEffectiveScope.allocationSize(value.effectiveScope) +
|
|
775
|
+
FfiConverterBool.allocationSize(value.desktopUnlocked) +
|
|
776
|
+
FfiConverterOptionalTypeEscalationReason.allocationSize(value.escalationReason) +
|
|
777
|
+
FfiConverterOptionalString.allocationSize(value.escalationDetail);
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
;
|
|
781
|
+
return new FFIConverter();
|
|
782
|
+
})();
|
|
783
|
+
/**
|
|
784
|
+
* Generated factory for {@link StartSessionInput} record objects.
|
|
785
|
+
*/
|
|
786
|
+
export const StartSessionInput = (() => {
|
|
787
|
+
const defaults = () => ({});
|
|
788
|
+
const create = (() => {
|
|
789
|
+
return uniffiCreateRecord(defaults);
|
|
790
|
+
})();
|
|
791
|
+
return Object.freeze({
|
|
792
|
+
create,
|
|
793
|
+
new: create,
|
|
794
|
+
defaults: () => Object.freeze(defaults()),
|
|
795
|
+
});
|
|
796
|
+
})();
|
|
797
|
+
const FfiConverterTypeStartSessionInput = (() => {
|
|
798
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
799
|
+
read(from) {
|
|
800
|
+
return {
|
|
801
|
+
session: FfiConverterString.read(from),
|
|
802
|
+
captureScope: FfiConverterOptionalTypeCaptureScope.read(from)
|
|
803
|
+
};
|
|
804
|
+
}
|
|
805
|
+
write(value, into) {
|
|
806
|
+
FfiConverterString.write(value.session, into);
|
|
807
|
+
FfiConverterOptionalTypeCaptureScope.write(value.captureScope, into);
|
|
808
|
+
}
|
|
809
|
+
allocationSize(value) {
|
|
810
|
+
return FfiConverterString.allocationSize(value.session) +
|
|
811
|
+
FfiConverterOptionalTypeCaptureScope.allocationSize(value.captureScope);
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
;
|
|
815
|
+
return new FFIConverter();
|
|
816
|
+
})();
|
|
817
|
+
/**
|
|
818
|
+
* Generated factory for {@link StartSessionOutput} record objects.
|
|
819
|
+
*/
|
|
820
|
+
export const StartSessionOutput = (() => {
|
|
821
|
+
const defaults = () => ({});
|
|
822
|
+
const create = (() => {
|
|
823
|
+
return uniffiCreateRecord(defaults);
|
|
824
|
+
})();
|
|
825
|
+
return Object.freeze({
|
|
826
|
+
create,
|
|
827
|
+
new: create,
|
|
828
|
+
defaults: () => Object.freeze(defaults()),
|
|
829
|
+
});
|
|
830
|
+
})();
|
|
831
|
+
const FfiConverterTypeStartSessionOutput = (() => {
|
|
832
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
833
|
+
read(from) {
|
|
834
|
+
return {
|
|
835
|
+
state: FfiConverterTypeSessionStateOutput.read(from),
|
|
836
|
+
active: FfiConverterBool.read(from),
|
|
837
|
+
revived: FfiConverterBool.read(from)
|
|
838
|
+
};
|
|
839
|
+
}
|
|
840
|
+
write(value, into) {
|
|
841
|
+
FfiConverterTypeSessionStateOutput.write(value.state, into);
|
|
842
|
+
FfiConverterBool.write(value.active, into);
|
|
843
|
+
FfiConverterBool.write(value.revived, into);
|
|
844
|
+
}
|
|
845
|
+
allocationSize(value) {
|
|
846
|
+
return FfiConverterTypeSessionStateOutput.allocationSize(value.state) +
|
|
847
|
+
FfiConverterBool.allocationSize(value.active) +
|
|
848
|
+
FfiConverterBool.allocationSize(value.revived);
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
;
|
|
852
|
+
return new FFIConverter();
|
|
853
|
+
})();
|
|
854
|
+
/**
|
|
855
|
+
* Generated factory for {@link TypeTextInput} record objects.
|
|
856
|
+
*/
|
|
857
|
+
export const TypeTextInput = (() => {
|
|
858
|
+
const defaults = () => ({});
|
|
859
|
+
const create = (() => {
|
|
860
|
+
return uniffiCreateRecord(defaults);
|
|
861
|
+
})();
|
|
862
|
+
return Object.freeze({
|
|
863
|
+
create,
|
|
864
|
+
new: create,
|
|
865
|
+
defaults: () => Object.freeze(defaults()),
|
|
866
|
+
});
|
|
867
|
+
})();
|
|
868
|
+
const FfiConverterTypeTypeTextInput = (() => {
|
|
869
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
870
|
+
read(from) {
|
|
871
|
+
return {
|
|
872
|
+
text: FfiConverterString.read(from),
|
|
873
|
+
scope: FfiConverterTypeDesktopScope.read(from),
|
|
874
|
+
session: FfiConverterOptionalString.read(from)
|
|
875
|
+
};
|
|
876
|
+
}
|
|
877
|
+
write(value, into) {
|
|
878
|
+
FfiConverterString.write(value.text, into);
|
|
879
|
+
FfiConverterTypeDesktopScope.write(value.scope, into);
|
|
880
|
+
FfiConverterOptionalString.write(value.session, into);
|
|
881
|
+
}
|
|
882
|
+
allocationSize(value) {
|
|
883
|
+
return FfiConverterString.allocationSize(value.text) +
|
|
884
|
+
FfiConverterTypeDesktopScope.allocationSize(value.scope) +
|
|
885
|
+
FfiConverterOptionalString.allocationSize(value.session);
|
|
886
|
+
}
|
|
887
|
+
}
|
|
888
|
+
;
|
|
889
|
+
return new FFIConverter();
|
|
890
|
+
})();
|
|
891
|
+
export var Platform;
|
|
892
|
+
(function (Platform) {
|
|
893
|
+
Platform[Platform["Macos"] = 0] = "Macos";
|
|
894
|
+
Platform[Platform["Windows"] = 1] = "Windows";
|
|
895
|
+
Platform[Platform["Linux"] = 2] = "Linux";
|
|
896
|
+
})(Platform || (Platform = {}));
|
|
897
|
+
const FfiConverterTypePlatform = (() => {
|
|
898
|
+
const ordinalConverter = FfiConverterInt32;
|
|
899
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
900
|
+
read(from) {
|
|
901
|
+
switch (ordinalConverter.read(from)) {
|
|
902
|
+
case 1: return Platform.Macos;
|
|
903
|
+
case 2: return Platform.Windows;
|
|
904
|
+
case 3: return Platform.Linux;
|
|
905
|
+
default: throw new UniffiInternalError.UnexpectedEnumCase();
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
write(value, into) {
|
|
909
|
+
switch (value) {
|
|
910
|
+
case Platform.Macos: return ordinalConverter.write(1, into);
|
|
911
|
+
case Platform.Windows: return ordinalConverter.write(2, into);
|
|
912
|
+
case Platform.Linux: return ordinalConverter.write(3, into);
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
allocationSize(value) {
|
|
916
|
+
return ordinalConverter.allocationSize(0);
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
return new FFIConverter();
|
|
920
|
+
})();
|
|
921
|
+
// FfiConverter for string | undefined
|
|
922
|
+
const FfiConverterOptionalString = new FfiConverterOptional(FfiConverterString);
|
|
923
|
+
// FfiConverter for ClickButton | undefined
|
|
924
|
+
const FfiConverterOptionalTypeClickButton = new FfiConverterOptional(FfiConverterTypeClickButton);
|
|
925
|
+
// FfiConverter for number | undefined
|
|
926
|
+
const FfiConverterOptionalUInt32 = new FfiConverterOptional(FfiConverterUInt32);
|
|
927
|
+
// FfiConverter for bigint | undefined
|
|
928
|
+
const FfiConverterOptionalUInt64 = new FfiConverterOptional(FfiConverterUInt64);
|
|
929
|
+
// FfiConverter for Array<string>
|
|
930
|
+
const FfiConverterSequenceString = new FfiConverterArray(FfiConverterString);
|
|
931
|
+
// FfiConverter for Array<string> | undefined
|
|
932
|
+
const FfiConverterOptionalSequenceString = new FfiConverterOptional(FfiConverterSequenceString);
|
|
933
|
+
// FfiConverter for ScrollBy | undefined
|
|
934
|
+
const FfiConverterOptionalTypeScrollBy = new FfiConverterOptional(FfiConverterTypeScrollBy);
|
|
935
|
+
// FfiConverter for EscalationReason | undefined
|
|
936
|
+
const FfiConverterOptionalTypeEscalationReason = new FfiConverterOptional(FfiConverterTypeEscalationReason);
|
|
937
|
+
// FfiConverter for CaptureScope | undefined
|
|
938
|
+
const FfiConverterOptionalTypeCaptureScope = new FfiConverterOptional(FfiConverterTypeCaptureScope);
|
|
939
|
+
/**
|
|
940
|
+
* This should be called before anything else.
|
|
941
|
+
*
|
|
942
|
+
* It is likely that this is being done for you by the library's `index.ts`.
|
|
943
|
+
*
|
|
944
|
+
* It checks versions of uniffi between when the Rust scaffolding was generated
|
|
945
|
+
* and when the bindings were generated.
|
|
946
|
+
*
|
|
947
|
+
* It also initializes the machinery to enable Rust to talk back to Javascript.
|
|
948
|
+
*/
|
|
949
|
+
function uniffiEnsureInitialized() {
|
|
950
|
+
// Get the bindings contract version from our ComponentInterface
|
|
951
|
+
const bindingsContractVersion = 30;
|
|
952
|
+
// Get the scaffolding contract version by calling the into the dylib
|
|
953
|
+
const scaffoldingContractVersion = nativeModule().ffi_cua_driver_contract_uniffi_contract_version();
|
|
954
|
+
if (bindingsContractVersion !== scaffoldingContractVersion) {
|
|
955
|
+
throw new UniffiInternalError.ContractVersionMismatch(scaffoldingContractVersion, bindingsContractVersion);
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
export default Object.freeze({
|
|
959
|
+
initialize: uniffiEnsureInitialized,
|
|
960
|
+
converters: {
|
|
961
|
+
FfiConverterTypeCaptureScope,
|
|
962
|
+
FfiConverterTypeClickButton,
|
|
963
|
+
FfiConverterTypeClickInput,
|
|
964
|
+
FfiConverterTypeDesktopScope,
|
|
965
|
+
FfiConverterTypeDragInput,
|
|
966
|
+
FfiConverterTypeEffectiveScope,
|
|
967
|
+
FfiConverterTypeEndSessionInput,
|
|
968
|
+
FfiConverterTypeEndSessionOutput,
|
|
969
|
+
FfiConverterTypeEscalateSessionInput,
|
|
970
|
+
FfiConverterTypeEscalationReason,
|
|
971
|
+
FfiConverterTypeGetCursorPositionInput,
|
|
972
|
+
FfiConverterTypeGetDesktopStateInput,
|
|
973
|
+
FfiConverterTypeGetScreenSizeInput,
|
|
974
|
+
FfiConverterTypeGetSessionStateInput,
|
|
975
|
+
FfiConverterTypeHotkeyInput,
|
|
976
|
+
FfiConverterTypeMoveCursorInput,
|
|
977
|
+
FfiConverterTypePlatform,
|
|
978
|
+
FfiConverterTypePressKeyInput,
|
|
979
|
+
FfiConverterTypeScrollBy,
|
|
980
|
+
FfiConverterTypeScrollDirection,
|
|
981
|
+
FfiConverterTypeScrollInput,
|
|
982
|
+
FfiConverterTypeSessionStateOutput,
|
|
983
|
+
FfiConverterTypeStartSessionInput,
|
|
984
|
+
FfiConverterTypeStartSessionOutput,
|
|
985
|
+
FfiConverterTypeTypeTextInput,
|
|
986
|
+
}
|
|
987
|
+
});
|