@bun-win32/uiautomationcore 1.0.0 → 1.0.1
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/package.json +4 -4
- package/structs/UIAutomationCore.ts +711 -646
|
@@ -1,646 +1,711 @@
|
|
|
1
|
-
import { type FFIFunction, FFIType } from 'bun:ffi';
|
|
2
|
-
|
|
3
|
-
import { Win32 } from '@bun-win32/core';
|
|
4
|
-
|
|
5
|
-
import type {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
1
|
+
import { type FFIFunction, FFIType } from 'bun:ffi';
|
|
2
|
+
|
|
3
|
+
import { Win32 } from '@bun-win32/core';
|
|
4
|
+
|
|
5
|
+
import type {
|
|
6
|
+
AsyncContentLoadedState,
|
|
7
|
+
AutomationIdentifierType,
|
|
8
|
+
BOOL,
|
|
9
|
+
BSTR,
|
|
10
|
+
DWORD,
|
|
11
|
+
DockPosition,
|
|
12
|
+
EVENTID,
|
|
13
|
+
GUID,
|
|
14
|
+
HRESULT,
|
|
15
|
+
HUIAEVENT,
|
|
16
|
+
HUIANODE,
|
|
17
|
+
HUIAPATTERNOBJECT,
|
|
18
|
+
HUIATEXTRANGE,
|
|
19
|
+
HWND,
|
|
20
|
+
IAccessible,
|
|
21
|
+
IRawElementProviderSimple,
|
|
22
|
+
ITextRangeProvider,
|
|
23
|
+
LONG,
|
|
24
|
+
LPARAM,
|
|
25
|
+
LPCWSTR,
|
|
26
|
+
LRESULT,
|
|
27
|
+
NULL,
|
|
28
|
+
NavigateDirection,
|
|
29
|
+
NormalizeState,
|
|
30
|
+
NotificationKind,
|
|
31
|
+
NotificationProcessing,
|
|
32
|
+
PATTERNID,
|
|
33
|
+
PBOOL,
|
|
34
|
+
PBSTR,
|
|
35
|
+
PHUIAEVENT,
|
|
36
|
+
PHUIANODE,
|
|
37
|
+
PHUIAPATTERNOBJECT,
|
|
38
|
+
PHUIATEXTRANGE,
|
|
39
|
+
PINT,
|
|
40
|
+
PPIAccessible,
|
|
41
|
+
PPIRawElementProviderSimple,
|
|
42
|
+
PPIUnknown,
|
|
43
|
+
PPROPERTYID,
|
|
44
|
+
PPVOID,
|
|
45
|
+
PROPERTYID,
|
|
46
|
+
PSAFEARRAY,
|
|
47
|
+
PSupportedTextSelection,
|
|
48
|
+
PVARIANT,
|
|
49
|
+
REFCLSID,
|
|
50
|
+
REFIID,
|
|
51
|
+
SAFEARRAY,
|
|
52
|
+
ScrollAmount,
|
|
53
|
+
StructureChangeType,
|
|
54
|
+
SynchronizedInputType,
|
|
55
|
+
TEXTATTRIBUTEID,
|
|
56
|
+
TextEditChangeType,
|
|
57
|
+
TextPatternRangeEndpoint,
|
|
58
|
+
TextUnit,
|
|
59
|
+
TreeScope,
|
|
60
|
+
UiaCacheRequest,
|
|
61
|
+
UiaChangeInfo,
|
|
62
|
+
UiaCondition,
|
|
63
|
+
UiaEventCallback,
|
|
64
|
+
UiaFindParams,
|
|
65
|
+
UiaPoint,
|
|
66
|
+
UiaProviderCallback,
|
|
67
|
+
VARIANT,
|
|
68
|
+
WPARAM,
|
|
69
|
+
WindowVisualState,
|
|
70
|
+
int,
|
|
71
|
+
} from '../types/UIAutomationCore';
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Thin, lazy-loaded FFI bindings for `UIAutomationCore.dll`.
|
|
75
|
+
*
|
|
76
|
+
* Each static method corresponds one-to-one with a Win32 export declared in `Symbols`.
|
|
77
|
+
* The first call to a method binds the underlying native symbol via `bun:ffi` and
|
|
78
|
+
* memoizes it on the class for subsequent calls. For bulk, up-front binding, use `Preload`.
|
|
79
|
+
*
|
|
80
|
+
* Symbols are defined with explicit `FFIType` signatures and kept alphabetized.
|
|
81
|
+
* You normally do not access `Symbols` directly; call the static methods or preload
|
|
82
|
+
* a subset for hot paths.
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* ```ts
|
|
86
|
+
* import UIAutomationCore from './structs/UIAutomationCore';
|
|
87
|
+
*
|
|
88
|
+
* const clientsListening = UIAutomationCore.UiaClientsAreListening();
|
|
89
|
+
* ```
|
|
90
|
+
*/
|
|
91
|
+
class UIAutomationCore extends Win32 {
|
|
92
|
+
protected static override name = 'uiautomationcore.dll';
|
|
93
|
+
|
|
94
|
+
/** @inheritdoc */
|
|
95
|
+
protected static override readonly Symbols = {
|
|
96
|
+
DllCanUnloadNow: { args: [], returns: FFIType.i32 },
|
|
97
|
+
DllGetClassObject: { args: [FFIType.ptr, FFIType.ptr, FFIType.ptr], returns: FFIType.i32 },
|
|
98
|
+
DllRegisterServer: { args: [], returns: FFIType.i32 },
|
|
99
|
+
DllUnregisterServer: { args: [], returns: FFIType.i32 },
|
|
100
|
+
DockPattern_SetDockPosition: { args: [FFIType.u64, FFIType.i32], returns: FFIType.i32 },
|
|
101
|
+
ExpandCollapsePattern_Collapse: { args: [FFIType.u64], returns: FFIType.i32 },
|
|
102
|
+
ExpandCollapsePattern_Expand: { args: [FFIType.u64], returns: FFIType.i32 },
|
|
103
|
+
GridPattern_GetItem: { args: [FFIType.u64, FFIType.i32, FFIType.i32, FFIType.ptr], returns: FFIType.i32 },
|
|
104
|
+
InvokePattern_Invoke: { args: [FFIType.u64], returns: FFIType.i32 },
|
|
105
|
+
ItemContainerPattern_FindItemByProperty: { args: [FFIType.u64, FFIType.u64, FFIType.i32, FFIType.ptr, FFIType.ptr], returns: FFIType.i32 },
|
|
106
|
+
LegacyIAccessiblePattern_DoDefaultAction: { args: [FFIType.u64], returns: FFIType.i32 },
|
|
107
|
+
LegacyIAccessiblePattern_GetIAccessible: { args: [FFIType.u64, FFIType.ptr], returns: FFIType.i32 },
|
|
108
|
+
LegacyIAccessiblePattern_Select: { args: [FFIType.u64, FFIType.i32], returns: FFIType.i32 },
|
|
109
|
+
LegacyIAccessiblePattern_SetValue: { args: [FFIType.u64, FFIType.ptr], returns: FFIType.i32 },
|
|
110
|
+
MultipleViewPattern_GetViewName: { args: [FFIType.u64, FFIType.i32, FFIType.ptr], returns: FFIType.i32 },
|
|
111
|
+
MultipleViewPattern_SetCurrentView: { args: [FFIType.u64, FFIType.i32], returns: FFIType.i32 },
|
|
112
|
+
RangeValuePattern_SetValue: { args: [FFIType.u64, FFIType.f64], returns: FFIType.i32 },
|
|
113
|
+
ScrollItemPattern_ScrollIntoView: { args: [FFIType.u64], returns: FFIType.i32 },
|
|
114
|
+
ScrollPattern_Scroll: { args: [FFIType.u64, FFIType.i32, FFIType.i32], returns: FFIType.i32 },
|
|
115
|
+
ScrollPattern_SetScrollPercent: { args: [FFIType.u64, FFIType.f64, FFIType.f64], returns: FFIType.i32 },
|
|
116
|
+
SelectionItemPattern_AddToSelection: { args: [FFIType.u64], returns: FFIType.i32 },
|
|
117
|
+
SelectionItemPattern_RemoveFromSelection: { args: [FFIType.u64], returns: FFIType.i32 },
|
|
118
|
+
SelectionItemPattern_Select: { args: [FFIType.u64], returns: FFIType.i32 },
|
|
119
|
+
SynchronizedInputPattern_Cancel: { args: [FFIType.u64], returns: FFIType.i32 },
|
|
120
|
+
SynchronizedInputPattern_StartListening: { args: [FFIType.u64, FFIType.i32], returns: FFIType.i32 },
|
|
121
|
+
TextPattern_get_DocumentRange: { args: [FFIType.u64, FFIType.ptr], returns: FFIType.i32 },
|
|
122
|
+
TextPattern_get_SupportedTextSelection: { args: [FFIType.u64, FFIType.ptr], returns: FFIType.i32 },
|
|
123
|
+
TextPattern_GetSelection: { args: [FFIType.u64, FFIType.ptr], returns: FFIType.i32 },
|
|
124
|
+
TextPattern_GetVisibleRanges: { args: [FFIType.u64, FFIType.ptr], returns: FFIType.i32 },
|
|
125
|
+
TextPattern_RangeFromChild: { args: [FFIType.u64, FFIType.u64, FFIType.ptr], returns: FFIType.i32 },
|
|
126
|
+
TextPattern_RangeFromPoint: { args: [FFIType.u64, FFIType.ptr, FFIType.ptr], returns: FFIType.i32 },
|
|
127
|
+
TextRange_AddToSelection: { args: [FFIType.u64], returns: FFIType.i32 },
|
|
128
|
+
TextRange_Clone: { args: [FFIType.u64, FFIType.ptr], returns: FFIType.i32 },
|
|
129
|
+
TextRange_Compare: { args: [FFIType.u64, FFIType.u64, FFIType.ptr], returns: FFIType.i32 },
|
|
130
|
+
TextRange_CompareEndpoints: { args: [FFIType.u64, FFIType.i32, FFIType.u64, FFIType.i32, FFIType.ptr], returns: FFIType.i32 },
|
|
131
|
+
TextRange_ExpandToEnclosingUnit: { args: [FFIType.u64, FFIType.i32], returns: FFIType.i32 },
|
|
132
|
+
TextRange_FindAttribute: { args: [FFIType.u64, FFIType.i32, FFIType.ptr, FFIType.i32, FFIType.ptr], returns: FFIType.i32 },
|
|
133
|
+
TextRange_FindText: { args: [FFIType.u64, FFIType.ptr, FFIType.i32, FFIType.i32, FFIType.ptr], returns: FFIType.i32 },
|
|
134
|
+
TextRange_GetAttributeValue: { args: [FFIType.u64, FFIType.i32, FFIType.ptr], returns: FFIType.i32 },
|
|
135
|
+
TextRange_GetBoundingRectangles: { args: [FFIType.u64, FFIType.ptr], returns: FFIType.i32 },
|
|
136
|
+
TextRange_GetChildren: { args: [FFIType.u64, FFIType.ptr], returns: FFIType.i32 },
|
|
137
|
+
TextRange_GetEnclosingElement: { args: [FFIType.u64, FFIType.ptr], returns: FFIType.i32 },
|
|
138
|
+
TextRange_GetText: { args: [FFIType.u64, FFIType.i32, FFIType.ptr], returns: FFIType.i32 },
|
|
139
|
+
TextRange_Move: { args: [FFIType.u64, FFIType.i32, FFIType.i32, FFIType.ptr], returns: FFIType.i32 },
|
|
140
|
+
TextRange_MoveEndpointByRange: { args: [FFIType.u64, FFIType.i32, FFIType.u64, FFIType.i32], returns: FFIType.i32 },
|
|
141
|
+
TextRange_MoveEndpointByUnit: { args: [FFIType.u64, FFIType.i32, FFIType.i32, FFIType.i32, FFIType.ptr], returns: FFIType.i32 },
|
|
142
|
+
TextRange_RemoveFromSelection: { args: [FFIType.u64], returns: FFIType.i32 },
|
|
143
|
+
TextRange_ScrollIntoView: { args: [FFIType.u64, FFIType.i32], returns: FFIType.i32 },
|
|
144
|
+
TextRange_Select: { args: [FFIType.u64], returns: FFIType.i32 },
|
|
145
|
+
TogglePattern_Toggle: { args: [FFIType.u64], returns: FFIType.i32 },
|
|
146
|
+
TransformPattern_Move: { args: [FFIType.u64, FFIType.f64, FFIType.f64], returns: FFIType.i32 },
|
|
147
|
+
TransformPattern_Resize: { args: [FFIType.u64, FFIType.f64, FFIType.f64], returns: FFIType.i32 },
|
|
148
|
+
TransformPattern_Rotate: { args: [FFIType.u64, FFIType.f64], returns: FFIType.i32 },
|
|
149
|
+
UiaAddEvent: { args: [FFIType.u64, FFIType.i32, FFIType.ptr, FFIType.i32, FFIType.ptr, FFIType.i32, FFIType.ptr, FFIType.ptr], returns: FFIType.i32 },
|
|
150
|
+
UiaClientsAreListening: { args: [], returns: FFIType.i32 },
|
|
151
|
+
UiaDisconnectAllProviders: { args: [], returns: FFIType.i32 },
|
|
152
|
+
UiaDisconnectProvider: { args: [FFIType.ptr], returns: FFIType.i32 },
|
|
153
|
+
UiaEventAddWindow: { args: [FFIType.u64, FFIType.u64], returns: FFIType.i32 },
|
|
154
|
+
UiaEventRemoveWindow: { args: [FFIType.u64, FFIType.u64], returns: FFIType.i32 },
|
|
155
|
+
UiaFind: { args: [FFIType.u64, FFIType.ptr, FFIType.ptr, FFIType.ptr, FFIType.ptr, FFIType.ptr], returns: FFIType.i32 },
|
|
156
|
+
UiaGetErrorDescription: { args: [FFIType.ptr], returns: FFIType.i32 },
|
|
157
|
+
UiaGetPatternProvider: { args: [FFIType.u64, FFIType.i32, FFIType.ptr], returns: FFIType.i32 },
|
|
158
|
+
UiaGetPropertyValue: { args: [FFIType.u64, FFIType.i32, FFIType.ptr], returns: FFIType.i32 },
|
|
159
|
+
UiaGetReservedMixedAttributeValue: { args: [FFIType.ptr], returns: FFIType.i32 },
|
|
160
|
+
UiaGetReservedNotSupportedValue: { args: [FFIType.ptr], returns: FFIType.i32 },
|
|
161
|
+
UiaGetRootNode: { args: [FFIType.ptr], returns: FFIType.i32 },
|
|
162
|
+
UiaGetRuntimeId: { args: [FFIType.u64, FFIType.ptr], returns: FFIType.i32 },
|
|
163
|
+
UiaGetUpdatedCache: { args: [FFIType.u64, FFIType.ptr, FFIType.i32, FFIType.ptr, FFIType.ptr, FFIType.ptr], returns: FFIType.i32 },
|
|
164
|
+
UiaHasServerSideProvider: { args: [FFIType.u64], returns: FFIType.i32 },
|
|
165
|
+
UiaHostProviderFromHwnd: { args: [FFIType.u64, FFIType.ptr], returns: FFIType.i32 },
|
|
166
|
+
UiaHPatternObjectFromVariant: { args: [FFIType.ptr, FFIType.ptr], returns: FFIType.i32 },
|
|
167
|
+
UiaHTextRangeFromVariant: { args: [FFIType.ptr, FFIType.ptr], returns: FFIType.i32 },
|
|
168
|
+
UiaHUiaNodeFromVariant: { args: [FFIType.ptr, FFIType.ptr], returns: FFIType.i32 },
|
|
169
|
+
UiaIAccessibleFromProvider: { args: [FFIType.ptr, FFIType.u32, FFIType.ptr, FFIType.ptr], returns: FFIType.i32 },
|
|
170
|
+
UiaLookupId: { args: [FFIType.i32, FFIType.ptr], returns: FFIType.i32 },
|
|
171
|
+
UiaNavigate: { args: [FFIType.u64, FFIType.i32, FFIType.ptr, FFIType.ptr, FFIType.ptr, FFIType.ptr], returns: FFIType.i32 },
|
|
172
|
+
UiaNodeFromFocus: { args: [FFIType.ptr, FFIType.ptr, FFIType.ptr], returns: FFIType.i32 },
|
|
173
|
+
UiaNodeFromHandle: { args: [FFIType.u64, FFIType.ptr], returns: FFIType.i32 },
|
|
174
|
+
UiaNodeFromPoint: { args: [FFIType.f64, FFIType.f64, FFIType.ptr, FFIType.ptr, FFIType.ptr], returns: FFIType.i32 },
|
|
175
|
+
UiaNodeFromProvider: { args: [FFIType.ptr, FFIType.ptr], returns: FFIType.i32 },
|
|
176
|
+
UiaNodeRelease: { args: [FFIType.u64], returns: FFIType.i32 },
|
|
177
|
+
UiaPatternRelease: { args: [FFIType.u64], returns: FFIType.i32 },
|
|
178
|
+
UiaProviderForNonClient: { args: [FFIType.u64, FFIType.i32, FFIType.i32, FFIType.ptr], returns: FFIType.i32 },
|
|
179
|
+
UiaProviderFromIAccessible: { args: [FFIType.ptr, FFIType.i32, FFIType.u32, FFIType.ptr], returns: FFIType.i32 },
|
|
180
|
+
UiaRaiseActiveTextPositionChangedEvent: { args: [FFIType.ptr, FFIType.ptr], returns: FFIType.i32 },
|
|
181
|
+
UiaRaiseAsyncContentLoadedEvent: { args: [FFIType.ptr, FFIType.i32, FFIType.f64], returns: FFIType.i32 },
|
|
182
|
+
UiaRaiseAutomationEvent: { args: [FFIType.ptr, FFIType.i32], returns: FFIType.i32 },
|
|
183
|
+
UiaRaiseAutomationPropertyChangedEvent: { args: [FFIType.ptr, FFIType.i32, FFIType.ptr, FFIType.ptr], returns: FFIType.i32 },
|
|
184
|
+
UiaRaiseChangesEvent: { args: [FFIType.ptr, FFIType.i32, FFIType.ptr], returns: FFIType.i32 },
|
|
185
|
+
UiaRaiseNotificationEvent: { args: [FFIType.ptr, FFIType.i32, FFIType.i32, FFIType.ptr, FFIType.ptr], returns: FFIType.i32 },
|
|
186
|
+
UiaRaiseStructureChangedEvent: { args: [FFIType.ptr, FFIType.i32, FFIType.ptr, FFIType.i32], returns: FFIType.i32 },
|
|
187
|
+
UiaRaiseTextEditTextChangedEvent: { args: [FFIType.ptr, FFIType.i32, FFIType.ptr], returns: FFIType.i32 },
|
|
188
|
+
UiaRegisterProviderCallback: { args: [FFIType.ptr], returns: FFIType.void },
|
|
189
|
+
UiaRemoveEvent: { args: [FFIType.u64], returns: FFIType.i32 },
|
|
190
|
+
UiaReturnRawElementProvider: { args: [FFIType.u64, FFIType.u64, FFIType.i64, FFIType.ptr], returns: FFIType.i64 },
|
|
191
|
+
UiaSetFocus: { args: [FFIType.u64], returns: FFIType.i32 },
|
|
192
|
+
UiaTextRangeRelease: { args: [FFIType.u64], returns: FFIType.i32 },
|
|
193
|
+
ValuePattern_SetValue: { args: [FFIType.u64, FFIType.ptr], returns: FFIType.i32 },
|
|
194
|
+
VirtualizedItemPattern_Realize: { args: [FFIType.u64], returns: FFIType.i32 },
|
|
195
|
+
WindowPattern_Close: { args: [FFIType.u64], returns: FFIType.i32 },
|
|
196
|
+
WindowPattern_SetWindowVisualState: { args: [FFIType.u64, FFIType.i32], returns: FFIType.i32 },
|
|
197
|
+
WindowPattern_WaitForInputIdle: { args: [FFIType.u64, FFIType.i32, FFIType.ptr], returns: FFIType.i32 },
|
|
198
|
+
} as const satisfies Record<string, FFIFunction>;
|
|
199
|
+
|
|
200
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/combaseapi/nf-combaseapi-dllcanunloadnow
|
|
201
|
+
public static DllCanUnloadNow(): HRESULT {
|
|
202
|
+
return UIAutomationCore.Load('DllCanUnloadNow')();
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/combaseapi/nf-combaseapi-dllgetclassobject
|
|
206
|
+
public static DllGetClassObject(rclsid: REFCLSID, riid: REFIID, ppv: PPVOID): HRESULT {
|
|
207
|
+
return UIAutomationCore.Load('DllGetClassObject')(rclsid, riid, ppv);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/olectl/nf-olectl-dllregisterserver
|
|
211
|
+
public static DllRegisterServer(): HRESULT {
|
|
212
|
+
return UIAutomationCore.Load('DllRegisterServer')();
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/olectl/nf-olectl-dllunregisterserver
|
|
216
|
+
public static DllUnregisterServer(): HRESULT {
|
|
217
|
+
return UIAutomationCore.Load('DllUnregisterServer')();
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-dockpattern_setdockposition
|
|
221
|
+
public static DockPattern_SetDockPosition(hobj: HUIAPATTERNOBJECT, dockPosition: DockPosition): HRESULT {
|
|
222
|
+
return UIAutomationCore.Load('DockPattern_SetDockPosition')(hobj, dockPosition);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-expandcollapsepattern_collapse
|
|
226
|
+
public static ExpandCollapsePattern_Collapse(hobj: HUIAPATTERNOBJECT): HRESULT {
|
|
227
|
+
return UIAutomationCore.Load('ExpandCollapsePattern_Collapse')(hobj);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-expandcollapsepattern_expand
|
|
231
|
+
public static ExpandCollapsePattern_Expand(hobj: HUIAPATTERNOBJECT): HRESULT {
|
|
232
|
+
return UIAutomationCore.Load('ExpandCollapsePattern_Expand')(hobj);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-gridpattern_getitem
|
|
236
|
+
public static GridPattern_GetItem(hobj: HUIAPATTERNOBJECT, row: int, column: int, pResult: PHUIANODE): HRESULT {
|
|
237
|
+
return UIAutomationCore.Load('GridPattern_GetItem')(hobj, row, column, pResult);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-invokepattern_invoke
|
|
241
|
+
public static InvokePattern_Invoke(hobj: HUIAPATTERNOBJECT): HRESULT {
|
|
242
|
+
return UIAutomationCore.Load('InvokePattern_Invoke')(hobj);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-itemcontainerpattern_finditembyproperty
|
|
246
|
+
public static ItemContainerPattern_FindItemByProperty(hobj: HUIAPATTERNOBJECT, hnodeStartAfter: HUIANODE, propertyId: PROPERTYID, value: VARIANT, pFound: PHUIANODE): HRESULT {
|
|
247
|
+
return UIAutomationCore.Load('ItemContainerPattern_FindItemByProperty')(hobj, hnodeStartAfter, propertyId, value, pFound);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-legacyiaccessiblepattern_dodefaultaction
|
|
251
|
+
public static LegacyIAccessiblePattern_DoDefaultAction(hobj: HUIAPATTERNOBJECT): HRESULT {
|
|
252
|
+
return UIAutomationCore.Load('LegacyIAccessiblePattern_DoDefaultAction')(hobj);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-legacyiaccessiblepattern_getiaccessible
|
|
256
|
+
public static LegacyIAccessiblePattern_GetIAccessible(hobj: HUIAPATTERNOBJECT, pAccessible: PPIAccessible): HRESULT {
|
|
257
|
+
return UIAutomationCore.Load('LegacyIAccessiblePattern_GetIAccessible')(hobj, pAccessible);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-legacyiaccessiblepattern_select
|
|
261
|
+
public static LegacyIAccessiblePattern_Select(hobj: HUIAPATTERNOBJECT, flagsSelect: LONG): HRESULT {
|
|
262
|
+
return UIAutomationCore.Load('LegacyIAccessiblePattern_Select')(hobj, flagsSelect);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-legacyiaccessiblepattern_setvalue
|
|
266
|
+
public static LegacyIAccessiblePattern_SetValue(hobj: HUIAPATTERNOBJECT, szValue: LPCWSTR): HRESULT {
|
|
267
|
+
return UIAutomationCore.Load('LegacyIAccessiblePattern_SetValue')(hobj, szValue);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-multipleviewpattern_getviewname
|
|
271
|
+
public static MultipleViewPattern_GetViewName(hobj: HUIAPATTERNOBJECT, viewId: int, ppStr: PBSTR): HRESULT {
|
|
272
|
+
return UIAutomationCore.Load('MultipleViewPattern_GetViewName')(hobj, viewId, ppStr);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-multipleviewpattern_setcurrentview
|
|
276
|
+
public static MultipleViewPattern_SetCurrentView(hobj: HUIAPATTERNOBJECT, viewId: int): HRESULT {
|
|
277
|
+
return UIAutomationCore.Load('MultipleViewPattern_SetCurrentView')(hobj, viewId);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-rangevaluepattern_setvalue
|
|
281
|
+
public static RangeValuePattern_SetValue(hobj: HUIAPATTERNOBJECT, val: number): HRESULT {
|
|
282
|
+
return UIAutomationCore.Load('RangeValuePattern_SetValue')(hobj, val);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-scrollitempattern_scrollintoview
|
|
286
|
+
public static ScrollItemPattern_ScrollIntoView(hobj: HUIAPATTERNOBJECT): HRESULT {
|
|
287
|
+
return UIAutomationCore.Load('ScrollItemPattern_ScrollIntoView')(hobj);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-scrollpattern_scroll
|
|
291
|
+
public static ScrollPattern_Scroll(hobj: HUIAPATTERNOBJECT, horizontalAmount: ScrollAmount, verticalAmount: ScrollAmount): HRESULT {
|
|
292
|
+
return UIAutomationCore.Load('ScrollPattern_Scroll')(hobj, horizontalAmount, verticalAmount);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-scrollpattern_setscrollpercent
|
|
296
|
+
public static ScrollPattern_SetScrollPercent(hobj: HUIAPATTERNOBJECT, horizontalPercent: number, verticalPercent: number): HRESULT {
|
|
297
|
+
return UIAutomationCore.Load('ScrollPattern_SetScrollPercent')(hobj, horizontalPercent, verticalPercent);
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-selectionitempattern_addtoselection
|
|
301
|
+
public static SelectionItemPattern_AddToSelection(hobj: HUIAPATTERNOBJECT): HRESULT {
|
|
302
|
+
return UIAutomationCore.Load('SelectionItemPattern_AddToSelection')(hobj);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-selectionitempattern_removefromselection
|
|
306
|
+
public static SelectionItemPattern_RemoveFromSelection(hobj: HUIAPATTERNOBJECT): HRESULT {
|
|
307
|
+
return UIAutomationCore.Load('SelectionItemPattern_RemoveFromSelection')(hobj);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-selectionitempattern_select
|
|
311
|
+
public static SelectionItemPattern_Select(hobj: HUIAPATTERNOBJECT): HRESULT {
|
|
312
|
+
return UIAutomationCore.Load('SelectionItemPattern_Select')(hobj);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-synchronizedinputpattern_cancel
|
|
316
|
+
public static SynchronizedInputPattern_Cancel(hobj: HUIAPATTERNOBJECT): HRESULT {
|
|
317
|
+
return UIAutomationCore.Load('SynchronizedInputPattern_Cancel')(hobj);
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-synchronizedinputpattern_startlistening
|
|
321
|
+
public static SynchronizedInputPattern_StartListening(hobj: HUIAPATTERNOBJECT, inputType: SynchronizedInputType): HRESULT {
|
|
322
|
+
return UIAutomationCore.Load('SynchronizedInputPattern_StartListening')(hobj, inputType);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-textpattern_get_documentrange
|
|
326
|
+
public static TextPattern_get_DocumentRange(hobj: HUIAPATTERNOBJECT, pRetVal: PHUIATEXTRANGE): HRESULT {
|
|
327
|
+
return UIAutomationCore.Load('TextPattern_get_DocumentRange')(hobj, pRetVal);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-textpattern_get_supportedtextselection
|
|
331
|
+
public static TextPattern_get_SupportedTextSelection(hobj: HUIAPATTERNOBJECT, pRetVal: PSupportedTextSelection): HRESULT {
|
|
332
|
+
return UIAutomationCore.Load('TextPattern_get_SupportedTextSelection')(hobj, pRetVal);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-textpattern_getselection
|
|
336
|
+
public static TextPattern_GetSelection(hobj: HUIAPATTERNOBJECT, pRetVal: PSAFEARRAY): HRESULT {
|
|
337
|
+
return UIAutomationCore.Load('TextPattern_GetSelection')(hobj, pRetVal);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-textpattern_getvisibleranges
|
|
341
|
+
public static TextPattern_GetVisibleRanges(hobj: HUIAPATTERNOBJECT, pRetVal: PSAFEARRAY): HRESULT {
|
|
342
|
+
return UIAutomationCore.Load('TextPattern_GetVisibleRanges')(hobj, pRetVal);
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-textpattern_rangefromchild
|
|
346
|
+
public static TextPattern_RangeFromChild(hobj: HUIAPATTERNOBJECT, hnodeChild: HUIANODE, pRetVal: PHUIATEXTRANGE): HRESULT {
|
|
347
|
+
return UIAutomationCore.Load('TextPattern_RangeFromChild')(hobj, hnodeChild, pRetVal);
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-textpattern_rangefrompoint
|
|
351
|
+
public static TextPattern_RangeFromPoint(hobj: HUIAPATTERNOBJECT, point: UiaPoint, pRetVal: PHUIATEXTRANGE): HRESULT {
|
|
352
|
+
return UIAutomationCore.Load('TextPattern_RangeFromPoint')(hobj, point, pRetVal);
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-textrange_addtoselection
|
|
356
|
+
public static TextRange_AddToSelection(hobj: HUIATEXTRANGE): HRESULT {
|
|
357
|
+
return UIAutomationCore.Load('TextRange_AddToSelection')(hobj);
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-textrange_clone
|
|
361
|
+
public static TextRange_Clone(hobj: HUIATEXTRANGE, pRetVal: PHUIATEXTRANGE): HRESULT {
|
|
362
|
+
return UIAutomationCore.Load('TextRange_Clone')(hobj, pRetVal);
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-textrange_compare
|
|
366
|
+
public static TextRange_Compare(hobj: HUIATEXTRANGE, range: HUIATEXTRANGE, pRetVal: PBOOL): HRESULT {
|
|
367
|
+
return UIAutomationCore.Load('TextRange_Compare')(hobj, range, pRetVal);
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-textrange_compareendpoints
|
|
371
|
+
public static TextRange_CompareEndpoints(hobj: HUIATEXTRANGE, endpoint: TextPatternRangeEndpoint, targetRange: HUIATEXTRANGE, targetEndpoint: TextPatternRangeEndpoint, pRetVal: PINT): HRESULT {
|
|
372
|
+
return UIAutomationCore.Load('TextRange_CompareEndpoints')(hobj, endpoint, targetRange, targetEndpoint, pRetVal);
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-textrange_expandtoenclosingunit
|
|
376
|
+
public static TextRange_ExpandToEnclosingUnit(hobj: HUIATEXTRANGE, unit: TextUnit): HRESULT {
|
|
377
|
+
return UIAutomationCore.Load('TextRange_ExpandToEnclosingUnit')(hobj, unit);
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-textrange_findattribute
|
|
381
|
+
public static TextRange_FindAttribute(hobj: HUIATEXTRANGE, attributeId: TEXTATTRIBUTEID, val: VARIANT, backward: BOOL, pRetVal: PHUIATEXTRANGE): HRESULT {
|
|
382
|
+
return UIAutomationCore.Load('TextRange_FindAttribute')(hobj, attributeId, val, backward, pRetVal);
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-textrange_findtext
|
|
386
|
+
public static TextRange_FindText(hobj: HUIATEXTRANGE, text: BSTR, backward: BOOL, ignoreCase: BOOL, pRetVal: PHUIATEXTRANGE): HRESULT {
|
|
387
|
+
return UIAutomationCore.Load('TextRange_FindText')(hobj, text, backward, ignoreCase, pRetVal);
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-textrange_getattributevalue
|
|
391
|
+
public static TextRange_GetAttributeValue(hobj: HUIATEXTRANGE, attributeId: TEXTATTRIBUTEID, pRetVal: PVARIANT): HRESULT {
|
|
392
|
+
return UIAutomationCore.Load('TextRange_GetAttributeValue')(hobj, attributeId, pRetVal);
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-textrange_getboundingrectangles
|
|
396
|
+
public static TextRange_GetBoundingRectangles(hobj: HUIATEXTRANGE, pRetVal: PSAFEARRAY): HRESULT {
|
|
397
|
+
return UIAutomationCore.Load('TextRange_GetBoundingRectangles')(hobj, pRetVal);
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-textrange_getchildren
|
|
401
|
+
public static TextRange_GetChildren(hobj: HUIATEXTRANGE, pRetVal: PSAFEARRAY): HRESULT {
|
|
402
|
+
return UIAutomationCore.Load('TextRange_GetChildren')(hobj, pRetVal);
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-textrange_getenclosingelement
|
|
406
|
+
public static TextRange_GetEnclosingElement(hobj: HUIATEXTRANGE, pRetVal: PHUIANODE): HRESULT {
|
|
407
|
+
return UIAutomationCore.Load('TextRange_GetEnclosingElement')(hobj, pRetVal);
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-textrange_gettext
|
|
411
|
+
public static TextRange_GetText(hobj: HUIATEXTRANGE, maxLength: int, pRetVal: PBSTR): HRESULT {
|
|
412
|
+
return UIAutomationCore.Load('TextRange_GetText')(hobj, maxLength, pRetVal);
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-textrange_move
|
|
416
|
+
public static TextRange_Move(hobj: HUIATEXTRANGE, unit: TextUnit, count: int, pRetVal: PINT): HRESULT {
|
|
417
|
+
return UIAutomationCore.Load('TextRange_Move')(hobj, unit, count, pRetVal);
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-textrange_moveendpointbyrange
|
|
421
|
+
public static TextRange_MoveEndpointByRange(hobj: HUIATEXTRANGE, endpoint: TextPatternRangeEndpoint, targetRange: HUIATEXTRANGE, targetEndpoint: TextPatternRangeEndpoint): HRESULT {
|
|
422
|
+
return UIAutomationCore.Load('TextRange_MoveEndpointByRange')(hobj, endpoint, targetRange, targetEndpoint);
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-textrange_moveendpointbyunit
|
|
426
|
+
public static TextRange_MoveEndpointByUnit(hobj: HUIATEXTRANGE, endpoint: TextPatternRangeEndpoint, unit: TextUnit, count: int, pRetVal: PINT): HRESULT {
|
|
427
|
+
return UIAutomationCore.Load('TextRange_MoveEndpointByUnit')(hobj, endpoint, unit, count, pRetVal);
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-textrange_removefromselection
|
|
431
|
+
public static TextRange_RemoveFromSelection(hobj: HUIATEXTRANGE): HRESULT {
|
|
432
|
+
return UIAutomationCore.Load('TextRange_RemoveFromSelection')(hobj);
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-textrange_scrollintoview
|
|
436
|
+
public static TextRange_ScrollIntoView(hobj: HUIATEXTRANGE, alignToTop: BOOL): HRESULT {
|
|
437
|
+
return UIAutomationCore.Load('TextRange_ScrollIntoView')(hobj, alignToTop);
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-textrange_select
|
|
441
|
+
public static TextRange_Select(hobj: HUIATEXTRANGE): HRESULT {
|
|
442
|
+
return UIAutomationCore.Load('TextRange_Select')(hobj);
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-togglepattern_toggle
|
|
446
|
+
public static TogglePattern_Toggle(hobj: HUIAPATTERNOBJECT): HRESULT {
|
|
447
|
+
return UIAutomationCore.Load('TogglePattern_Toggle')(hobj);
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-transformpattern_move
|
|
451
|
+
public static TransformPattern_Move(hobj: HUIAPATTERNOBJECT, x: number, y: number): HRESULT {
|
|
452
|
+
return UIAutomationCore.Load('TransformPattern_Move')(hobj, x, y);
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-transformpattern_resize
|
|
456
|
+
public static TransformPattern_Resize(hobj: HUIAPATTERNOBJECT, width: number, height: number): HRESULT {
|
|
457
|
+
return UIAutomationCore.Load('TransformPattern_Resize')(hobj, width, height);
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-transformpattern_rotate
|
|
461
|
+
public static TransformPattern_Rotate(hobj: HUIAPATTERNOBJECT, degrees: number): HRESULT {
|
|
462
|
+
return UIAutomationCore.Load('TransformPattern_Rotate')(hobj, degrees);
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiaaddevent
|
|
466
|
+
public static UiaAddEvent(hnode: HUIANODE, eventId: EVENTID, pCallback: UiaEventCallback, scope: TreeScope, pProperties: PPROPERTYID | NULL, cProperties: int, pRequest: UiaCacheRequest, phEvent: PHUIAEVENT): HRESULT {
|
|
467
|
+
return UIAutomationCore.Load('UiaAddEvent')(hnode, eventId, pCallback, scope, pProperties, cProperties, pRequest, phEvent);
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiaclientsarelistening
|
|
471
|
+
public static UiaClientsAreListening(): BOOL {
|
|
472
|
+
return UIAutomationCore.Load('UiaClientsAreListening')();
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiadisconnectallproviders
|
|
476
|
+
public static UiaDisconnectAllProviders(): HRESULT {
|
|
477
|
+
return UIAutomationCore.Load('UiaDisconnectAllProviders')();
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiadisconnectprovider
|
|
481
|
+
public static UiaDisconnectProvider(pProvider: IRawElementProviderSimple): HRESULT {
|
|
482
|
+
return UIAutomationCore.Load('UiaDisconnectProvider')(pProvider);
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiaeventaddwindow
|
|
486
|
+
public static UiaEventAddWindow(hEvent: HUIAEVENT, hwnd: HWND): HRESULT {
|
|
487
|
+
return UIAutomationCore.Load('UiaEventAddWindow')(hEvent, hwnd);
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiaeventremovewindow
|
|
491
|
+
public static UiaEventRemoveWindow(hEvent: HUIAEVENT, hwnd: HWND): HRESULT {
|
|
492
|
+
return UIAutomationCore.Load('UiaEventRemoveWindow')(hEvent, hwnd);
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiafind
|
|
496
|
+
public static UiaFind(hnode: HUIANODE, pParams: UiaFindParams, pRequest: UiaCacheRequest, ppRequestedData: PSAFEARRAY, ppOffsets: PSAFEARRAY, ppTreeStructures: PSAFEARRAY): HRESULT {
|
|
497
|
+
return UIAutomationCore.Load('UiaFind')(hnode, pParams, pRequest, ppRequestedData, ppOffsets, ppTreeStructures);
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiageterrordescription
|
|
501
|
+
public static UiaGetErrorDescription(pDescription: PBSTR): BOOL {
|
|
502
|
+
return UIAutomationCore.Load('UiaGetErrorDescription')(pDescription);
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiagetpatternprovider
|
|
506
|
+
public static UiaGetPatternProvider(hnode: HUIANODE, patternId: PATTERNID, phobj: PHUIAPATTERNOBJECT): HRESULT {
|
|
507
|
+
return UIAutomationCore.Load('UiaGetPatternProvider')(hnode, patternId, phobj);
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiagetpropertyvalue
|
|
511
|
+
public static UiaGetPropertyValue(hnode: HUIANODE, propertyId: PROPERTYID, pValue: PVARIANT): HRESULT {
|
|
512
|
+
return UIAutomationCore.Load('UiaGetPropertyValue')(hnode, propertyId, pValue);
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiagetreservedmixedattributevalue
|
|
516
|
+
public static UiaGetReservedMixedAttributeValue(punkMixedAttributeValue: PPIUnknown): HRESULT {
|
|
517
|
+
return UIAutomationCore.Load('UiaGetReservedMixedAttributeValue')(punkMixedAttributeValue);
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiagetreservednotsupportedvalue
|
|
521
|
+
public static UiaGetReservedNotSupportedValue(punkNotSupportedValue: PPIUnknown): HRESULT {
|
|
522
|
+
return UIAutomationCore.Load('UiaGetReservedNotSupportedValue')(punkNotSupportedValue);
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiagetrootnode
|
|
526
|
+
public static UiaGetRootNode(phnode: PHUIANODE): HRESULT {
|
|
527
|
+
return UIAutomationCore.Load('UiaGetRootNode')(phnode);
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiagetruntimeid
|
|
531
|
+
public static UiaGetRuntimeId(hnode: HUIANODE, pruntimeId: PSAFEARRAY): HRESULT {
|
|
532
|
+
return UIAutomationCore.Load('UiaGetRuntimeId')(hnode, pruntimeId);
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiagetupdatedcache
|
|
536
|
+
public static UiaGetUpdatedCache(hnode: HUIANODE, pRequest: UiaCacheRequest, normalizeState: NormalizeState, pNormalizeCondition: UiaCondition, ppRequestedData: PSAFEARRAY, ppTreeStructure: PBSTR): HRESULT {
|
|
537
|
+
return UIAutomationCore.Load('UiaGetUpdatedCache')(hnode, pRequest, normalizeState, pNormalizeCondition, ppRequestedData, ppTreeStructure);
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiahasserversideprovider
|
|
541
|
+
public static UiaHasServerSideProvider(hwnd: HWND): BOOL {
|
|
542
|
+
return UIAutomationCore.Load('UiaHasServerSideProvider')(hwnd);
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiahostproviderfromhwnd
|
|
546
|
+
public static UiaHostProviderFromHwnd(hwnd: HWND, ppProvider: PPIRawElementProviderSimple): HRESULT {
|
|
547
|
+
return UIAutomationCore.Load('UiaHostProviderFromHwnd')(hwnd, ppProvider);
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiahpatternobjectfromvariant
|
|
551
|
+
public static UiaHPatternObjectFromVariant(pvar: PVARIANT, phobj: PHUIAPATTERNOBJECT): HRESULT {
|
|
552
|
+
return UIAutomationCore.Load('UiaHPatternObjectFromVariant')(pvar, phobj);
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiahtextrangefromvariant
|
|
556
|
+
public static UiaHTextRangeFromVariant(pvar: PVARIANT, phtextrange: PHUIATEXTRANGE): HRESULT {
|
|
557
|
+
return UIAutomationCore.Load('UiaHTextRangeFromVariant')(pvar, phtextrange);
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiahuianodefromvariant
|
|
561
|
+
public static UiaHUiaNodeFromVariant(pvar: PVARIANT, phnode: PHUIANODE): HRESULT {
|
|
562
|
+
return UIAutomationCore.Load('UiaHUiaNodeFromVariant')(pvar, phnode);
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiaiaccessiblefromprovider
|
|
566
|
+
public static UiaIAccessibleFromProvider(pProvider: IRawElementProviderSimple, dwFlags: DWORD, ppAccessible: PPIAccessible, pvarChild: PVARIANT): HRESULT {
|
|
567
|
+
return UIAutomationCore.Load('UiaIAccessibleFromProvider')(pProvider, dwFlags, ppAccessible, pvarChild);
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uialookupid
|
|
571
|
+
public static UiaLookupId(type: AutomationIdentifierType, pGuid: GUID): int {
|
|
572
|
+
return UIAutomationCore.Load('UiaLookupId')(type, pGuid);
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uianavigate
|
|
576
|
+
public static UiaNavigate(hnode: HUIANODE, direction: NavigateDirection, pCondition: UiaCondition, pRequest: UiaCacheRequest, ppRequestedData: PSAFEARRAY, ppTreeStructure: PBSTR): HRESULT {
|
|
577
|
+
return UIAutomationCore.Load('UiaNavigate')(hnode, direction, pCondition, pRequest, ppRequestedData, ppTreeStructure);
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uianodefromfocus
|
|
581
|
+
public static UiaNodeFromFocus(pRequest: UiaCacheRequest, ppRequestedData: PSAFEARRAY, ppTreeStructure: PBSTR): HRESULT {
|
|
582
|
+
return UIAutomationCore.Load('UiaNodeFromFocus')(pRequest, ppRequestedData, ppTreeStructure);
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uianodefromhandle
|
|
586
|
+
public static UiaNodeFromHandle(hwnd: HWND, phnode: PHUIANODE): HRESULT {
|
|
587
|
+
return UIAutomationCore.Load('UiaNodeFromHandle')(hwnd, phnode);
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uianodefrompoint
|
|
591
|
+
public static UiaNodeFromPoint(x: number, y: number, pRequest: UiaCacheRequest, ppRequestedData: PSAFEARRAY, ppTreeStructure: PBSTR): HRESULT {
|
|
592
|
+
return UIAutomationCore.Load('UiaNodeFromPoint')(x, y, pRequest, ppRequestedData, ppTreeStructure);
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uianodefromprovider
|
|
596
|
+
public static UiaNodeFromProvider(pProvider: IRawElementProviderSimple, phnode: PHUIANODE): HRESULT {
|
|
597
|
+
return UIAutomationCore.Load('UiaNodeFromProvider')(pProvider, phnode);
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uianoderelease
|
|
601
|
+
public static UiaNodeRelease(hnode: HUIANODE): BOOL {
|
|
602
|
+
return UIAutomationCore.Load('UiaNodeRelease')(hnode);
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiapatternrelease
|
|
606
|
+
public static UiaPatternRelease(hobj: HUIAPATTERNOBJECT): BOOL {
|
|
607
|
+
return UIAutomationCore.Load('UiaPatternRelease')(hobj);
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiaproviderfornonclient
|
|
611
|
+
public static UiaProviderForNonClient(hwnd: HWND, idObject: LONG, idChild: LONG, ppProvider: PPIRawElementProviderSimple): HRESULT {
|
|
612
|
+
return UIAutomationCore.Load('UiaProviderForNonClient')(hwnd, idObject, idChild, ppProvider);
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiaproviderfromiaccessible
|
|
616
|
+
public static UiaProviderFromIAccessible(pAccessible: IAccessible, idChild: LONG, dwFlags: DWORD, ppProvider: PPIRawElementProviderSimple): HRESULT {
|
|
617
|
+
return UIAutomationCore.Load('UiaProviderFromIAccessible')(pAccessible, idChild, dwFlags, ppProvider);
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiaraiseactivetextpositionchangedevent
|
|
621
|
+
public static UiaRaiseActiveTextPositionChangedEvent(provider: IRawElementProviderSimple, textRange: ITextRangeProvider | NULL): HRESULT {
|
|
622
|
+
return UIAutomationCore.Load('UiaRaiseActiveTextPositionChangedEvent')(provider, textRange);
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiaraiseasynccontentloadedevent
|
|
626
|
+
public static UiaRaiseAsyncContentLoadedEvent(pProvider: IRawElementProviderSimple, asyncContentLoadedState: AsyncContentLoadedState, percentComplete: number): HRESULT {
|
|
627
|
+
return UIAutomationCore.Load('UiaRaiseAsyncContentLoadedEvent')(pProvider, asyncContentLoadedState, percentComplete);
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiaraiseautomationevent
|
|
631
|
+
public static UiaRaiseAutomationEvent(pProvider: IRawElementProviderSimple, id: EVENTID): HRESULT {
|
|
632
|
+
return UIAutomationCore.Load('UiaRaiseAutomationEvent')(pProvider, id);
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiaraiseautomationpropertychangedevent
|
|
636
|
+
public static UiaRaiseAutomationPropertyChangedEvent(pProvider: IRawElementProviderSimple, id: PROPERTYID, oldValue: VARIANT, newValue: VARIANT): HRESULT {
|
|
637
|
+
return UIAutomationCore.Load('UiaRaiseAutomationPropertyChangedEvent')(pProvider, id, oldValue, newValue);
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiaraisechangesevent
|
|
641
|
+
public static UiaRaiseChangesEvent(pProvider: IRawElementProviderSimple, eventIdCount: int, pUiaChanges: UiaChangeInfo): HRESULT {
|
|
642
|
+
return UIAutomationCore.Load('UiaRaiseChangesEvent')(pProvider, eventIdCount, pUiaChanges);
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiaraisenotificationevent
|
|
646
|
+
public static UiaRaiseNotificationEvent(provider: IRawElementProviderSimple, notificationKind: NotificationKind, notificationProcessing: NotificationProcessing, displayString: BSTR | NULL, activityId: BSTR): HRESULT {
|
|
647
|
+
return UIAutomationCore.Load('UiaRaiseNotificationEvent')(provider, notificationKind, notificationProcessing, displayString, activityId);
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiaraisestructurechangedevent
|
|
651
|
+
public static UiaRaiseStructureChangedEvent(pProvider: IRawElementProviderSimple, structureChangeType: StructureChangeType, pRuntimeId: PINT, cRuntimeIdLen: int): HRESULT {
|
|
652
|
+
return UIAutomationCore.Load('UiaRaiseStructureChangedEvent')(pProvider, structureChangeType, pRuntimeId, cRuntimeIdLen);
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiaraisetextedittextchangedevent
|
|
656
|
+
public static UiaRaiseTextEditTextChangedEvent(pProvider: IRawElementProviderSimple, textEditChangeType: TextEditChangeType, pChangedData: SAFEARRAY): HRESULT {
|
|
657
|
+
return UIAutomationCore.Load('UiaRaiseTextEditTextChangedEvent')(pProvider, textEditChangeType, pChangedData);
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiaregisterprovidercallback
|
|
661
|
+
public static UiaRegisterProviderCallback(pCallback: UiaProviderCallback): void {
|
|
662
|
+
return UIAutomationCore.Load('UiaRegisterProviderCallback')(pCallback);
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiaremoveevent
|
|
666
|
+
public static UiaRemoveEvent(hEvent: HUIAEVENT): HRESULT {
|
|
667
|
+
return UIAutomationCore.Load('UiaRemoveEvent')(hEvent);
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiareturnrawelementprovider
|
|
671
|
+
public static UiaReturnRawElementProvider(hwnd: HWND, wParam: WPARAM, lParam: LPARAM, el: IRawElementProviderSimple | NULL): LRESULT {
|
|
672
|
+
return UIAutomationCore.Load('UiaReturnRawElementProvider')(hwnd, wParam, lParam, el);
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiasetfocus
|
|
676
|
+
public static UiaSetFocus(hnode: HUIANODE): HRESULT {
|
|
677
|
+
return UIAutomationCore.Load('UiaSetFocus')(hnode);
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiatextrangerelease
|
|
681
|
+
public static UiaTextRangeRelease(hobj: HUIATEXTRANGE): BOOL {
|
|
682
|
+
return UIAutomationCore.Load('UiaTextRangeRelease')(hobj);
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-valuepattern_setvalue
|
|
686
|
+
public static ValuePattern_SetValue(hobj: HUIAPATTERNOBJECT, pVal: LPCWSTR): HRESULT {
|
|
687
|
+
return UIAutomationCore.Load('ValuePattern_SetValue')(hobj, pVal);
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-virtualizeditempattern_realize
|
|
691
|
+
public static VirtualizedItemPattern_Realize(hobj: HUIAPATTERNOBJECT): HRESULT {
|
|
692
|
+
return UIAutomationCore.Load('VirtualizedItemPattern_Realize')(hobj);
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-windowpattern_close
|
|
696
|
+
public static WindowPattern_Close(hobj: HUIAPATTERNOBJECT): HRESULT {
|
|
697
|
+
return UIAutomationCore.Load('WindowPattern_Close')(hobj);
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-windowpattern_setwindowvisualstate
|
|
701
|
+
public static WindowPattern_SetWindowVisualState(hobj: HUIAPATTERNOBJECT, state: WindowVisualState): HRESULT {
|
|
702
|
+
return UIAutomationCore.Load('WindowPattern_SetWindowVisualState')(hobj, state);
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
// https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-windowpattern_waitforinputidle
|
|
706
|
+
public static WindowPattern_WaitForInputIdle(hobj: HUIAPATTERNOBJECT, milliseconds: int, pResult: PBOOL): HRESULT {
|
|
707
|
+
return UIAutomationCore.Load('WindowPattern_WaitForInputIdle')(hobj, milliseconds, pResult);
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
export default UIAutomationCore;
|