swing-ui 0.1.25 → 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.
Files changed (116) hide show
  1. package/LICENSE +5 -4
  2. package/README.md +144 -7
  3. package/SwingUI.js +2611 -0
  4. package/classes/Arc.js +185 -0
  5. package/classes/Button.js +55 -0
  6. package/classes/CheckBox.js +33 -0
  7. package/classes/CheckBoxMenuItem.js +24 -0
  8. package/classes/ComboBox.js +329 -0
  9. package/classes/ComponentContainer.js +828 -0
  10. package/classes/ContextMenu.js +141 -0
  11. package/classes/DocumentEditor.js +168 -0
  12. package/classes/Ellipse.js +76 -0
  13. package/classes/InternalWindow.js +397 -0
  14. package/classes/InternalWindowContainer.js +93 -0
  15. package/classes/Label.js +52 -0
  16. package/classes/Line.js +105 -0
  17. package/classes/List.js +452 -0
  18. package/classes/MediaPlayer.js +504 -0
  19. package/classes/Menu.js +74 -0
  20. package/classes/MenuBar.js +56 -0
  21. package/classes/MenuItem.js +92 -0
  22. package/classes/Panel.js +50 -0
  23. package/classes/PasswordField.js +47 -0
  24. package/classes/Polygon.js +236 -0
  25. package/classes/Polyline.js +240 -0
  26. package/classes/ProgressBar.js +62 -0
  27. package/classes/RadioButton.js +110 -0
  28. package/classes/RadioButtonMenuItem.js +106 -0
  29. package/classes/Rectangle.js +199 -0
  30. package/classes/ScrollPane.js +53 -0
  31. package/classes/ScrollableComponent.js +141 -0
  32. package/classes/Separator.js +24 -0
  33. package/classes/Shape.js +584 -0
  34. package/classes/ShapeContainer.js +231 -0
  35. package/classes/Slider.js +172 -0
  36. package/classes/Spinner.js +172 -0
  37. package/classes/SplitView.js +82 -0
  38. package/classes/Stroke.js +115 -0
  39. package/classes/Table.js +982 -0
  40. package/classes/Tabs.js +228 -0
  41. package/classes/TextArea.js +125 -0
  42. package/classes/TextComponent.js +207 -0
  43. package/classes/TextField.js +128 -0
  44. package/classes/TextShape.js +123 -0
  45. package/classes/ToggleButton.js +147 -0
  46. package/classes/ToolBar.js +120 -0
  47. package/classes/TrayIcon.js +54 -0
  48. package/classes/Tree.js +569 -0
  49. package/classes/UIComponent.js +2113 -0
  50. package/classes/Window.js +609 -0
  51. package/enums.js +298 -0
  52. package/fonts.conf +32 -0
  53. package/functions.js +254 -0
  54. package/icon.png +0 -0
  55. package/index.js +109 -4
  56. package/jar/gui-11.jar +0 -0
  57. package/jar/lib/flatlaf.jar +0 -0
  58. package/jar/lib/jna.jar +0 -0
  59. package/package.json +58 -33
  60. package/typedefs.js +973 -0
  61. package/types/SwingUI.d.ts +727 -0
  62. package/types/classes/Arc.d.ts +111 -0
  63. package/types/classes/Button.d.ts +38 -0
  64. package/types/classes/CheckBox.d.ts +22 -0
  65. package/types/classes/CheckBoxMenuItem.d.ts +18 -0
  66. package/types/classes/ComboBox.d.ts +172 -0
  67. package/types/classes/ComponentContainer.d.ts +131 -0
  68. package/types/classes/ContextMenu.d.ts +74 -0
  69. package/types/classes/DocumentEditor.d.ts +95 -0
  70. package/types/classes/Ellipse.d.ts +34 -0
  71. package/types/classes/InternalWindow.d.ts +163 -0
  72. package/types/classes/InternalWindowContainer.d.ts +36 -0
  73. package/types/classes/Label.d.ts +33 -0
  74. package/types/classes/Line.d.ts +48 -0
  75. package/types/classes/List.d.ts +223 -0
  76. package/types/classes/MediaPlayer.d.ts +381 -0
  77. package/types/classes/Menu.d.ts +43 -0
  78. package/types/classes/MenuBar.d.ts +26 -0
  79. package/types/classes/MenuItem.d.ts +57 -0
  80. package/types/classes/Panel.d.ts +28 -0
  81. package/types/classes/PasswordField.d.ts +22 -0
  82. package/types/classes/Polygon.d.ts +93 -0
  83. package/types/classes/Polyline.d.ts +96 -0
  84. package/types/classes/ProgressBar.d.ts +36 -0
  85. package/types/classes/RadioButton.d.ts +70 -0
  86. package/types/classes/RadioButtonMenuItem.d.ts +71 -0
  87. package/types/classes/Rectangle.d.ts +82 -0
  88. package/types/classes/ScrollPane.d.ts +23 -0
  89. package/types/classes/ScrollableComponent.d.ts +81 -0
  90. package/types/classes/Separator.d.ts +14 -0
  91. package/types/classes/Shape.d.ts +223 -0
  92. package/types/classes/ShapeContainer.d.ts +92 -0
  93. package/types/classes/Slider.d.ts +107 -0
  94. package/types/classes/Spinner.d.ts +129 -0
  95. package/types/classes/SplitView.d.ts +47 -0
  96. package/types/classes/Stroke.d.ts +99 -0
  97. package/types/classes/Table.d.ts +652 -0
  98. package/types/classes/Tabs.d.ts +118 -0
  99. package/types/classes/TextArea.d.ts +45 -0
  100. package/types/classes/TextComponent.d.ts +136 -0
  101. package/types/classes/TextField.d.ts +94 -0
  102. package/types/classes/TextShape.d.ts +73 -0
  103. package/types/classes/ToggleButton.d.ts +84 -0
  104. package/types/classes/ToolBar.d.ts +82 -0
  105. package/types/classes/TrayIcon.d.ts +43 -0
  106. package/types/classes/Tree.d.ts +354 -0
  107. package/types/classes/UIComponent.d.ts +945 -0
  108. package/types/classes/Window.d.ts +334 -0
  109. package/types/enums.d.ts +437 -0
  110. package/types/functions.d.ts +109 -0
  111. package/types/index.d.ts +188 -0
  112. package/types/typedefs.d.ts +1626 -0
  113. package/ui-process-manager.js +317 -0
  114. package/video-devices-linux.sh +72 -0
  115. package/video-devices-mac.sh +33 -0
  116. package/CHANGES.md +0 -3
@@ -0,0 +1,1626 @@
1
+ /**
2
+ * An error event object received by the {@link UIComponent#onError |onError()} handler callback when error occurs.
3
+ */
4
+ type ErrorEvent = {
5
+ /**
6
+ * - The component that triggered the event.
7
+ */
8
+ target: object;
9
+ /**
10
+ * - An error message.
11
+ */
12
+ messsage: string;
13
+ };
14
+ /**
15
+ * A dispose event object received by the {@link UIComponent#onDispose |onDispose()} handler callback when a component gets disposed.
16
+ */
17
+ type DisposeEvent = {
18
+ /**
19
+ * - The component that triggered the event.
20
+ */
21
+ target: object;
22
+ };
23
+ /**
24
+ * Drop event received by the {@link UIComponent#onDropEvents |onDropEvents()} handler callback.
25
+ */
26
+ type DropEvent = {
27
+ /**
28
+ * - The component that triggered the event.
29
+ */
30
+ target: object;
31
+ /**
32
+ * - The component being dragged onto this component.
33
+ * Present only for component-to-component dragging, and when `DataType.Components` is allowed for dropping.
34
+ */
35
+ source?: object | undefined;
36
+ /**
37
+ * - Descendent of the target component over which the event occurred. Only present for event types `dragover` and `drop`, if target is a container and the event occurred over one of target'a descendent.
38
+ */
39
+ overComponent?: object | undefined;
40
+ /**
41
+ * - One of `dragenter`, `dragover`, `dragleave`, `drop`.
42
+ */
43
+ type: string;
44
+ /**
45
+ * - One of the values of enum DragDropAction. Present when applicable.
46
+ */
47
+ action?: string | undefined;
48
+ /**
49
+ * - Contains the data being dragged/dropped. NOTE: On macOS data is actually present only when type is `drop`, otherwise data types are present, but data is set to `null`.
50
+ */
51
+ data?: object | undefined;
52
+ /**
53
+ * - X position of the pointer relative to this component. Present when type is `dragstart` or `drop`.
54
+ */
55
+ x?: number | undefined;
56
+ /**
57
+ * - Y position of the pointer relative to this component. Present when type is `dragstart` or `drop`.
58
+ */
59
+ y?: number | undefined;
60
+ /**
61
+ * - X position of the pointer relative to the screen. Present when type is `dragstart` or `drop`.
62
+ */
63
+ screenX?: number | undefined;
64
+ /**
65
+ * - Y position of the pointer relative to the screen. Present when type is `dragstart` or `drop`.
66
+ */
67
+ screenY?: number | undefined;
68
+ /**
69
+ * - Selected indexes of a `List` component whose items are being dragged. Present only when dragging List items.
70
+ */
71
+ selected?: number[] | undefined;
72
+ };
73
+ /**
74
+ * Drag event received by the {@link UIComponent#onDragEvents |onDragEvents()} handler callback.
75
+ */
76
+ type DragEvent = {
77
+ /**
78
+ * - The component that triggered the event.
79
+ */
80
+ target: object;
81
+ /**
82
+ * - One of `dragstart`, `dragend`, `cancel`.
83
+ */
84
+ type: string;
85
+ /**
86
+ * - One of the values of enum DragDropAction. Present when applicable.
87
+ */
88
+ action?: string | undefined;
89
+ /**
90
+ * - X position of the pointer relative to this component. Present when type is `dragstart` or `dragend`.
91
+ */
92
+ x?: number | undefined;
93
+ /**
94
+ * - Y position of the pointer relative to this component. Present when type is `dragstart` or `dragend`.
95
+ */
96
+ y?: number | undefined;
97
+ /**
98
+ * - X position of the pointer relative to the screen. Present when type is `dragstart` or `dragend`.
99
+ */
100
+ screenX?: number | undefined;
101
+ /**
102
+ * - Y position of the pointer relative to the screen. Present when type is `dragstart` or `dragend`.
103
+ */
104
+ screenY?: number | undefined;
105
+ /**
106
+ * - Indicates a pointing device button involved in dragging. Value of `MouseButton` enum.
107
+ */
108
+ button?: number | undefined;
109
+ /**
110
+ * - Keyboard modifiers (bitmask or flags). Present when type is `dragstart`.
111
+ */
112
+ modifiers?: number | undefined;
113
+ /**
114
+ * - Human-readable keyboard modifiers. Present when type is `dragstart`.
115
+ */
116
+ modifiersText?: string | undefined;
117
+ /**
118
+ * - Indicates if ALT key was pressed. Present when type is `dragstart`.
119
+ */
120
+ alt?: boolean | undefined;
121
+ /**
122
+ * - Indicates if SHIFT key was pressed. Present when type is `dragstart`.
123
+ */
124
+ shift?: boolean | undefined;
125
+ /**
126
+ * - Indicates if CTRL key was pressed. Present when type is `dragstart`.
127
+ */
128
+ ctrl?: boolean | undefined;
129
+ /**
130
+ * - Selected indexes of a `List` component whose items are being dragged. Present only when dragging List items.
131
+ */
132
+ selected?: number[] | undefined;
133
+ };
134
+ /**
135
+ * Change event received by the {@link UIComponent#onChange |onChange()} handler callback.
136
+ */
137
+ type ChangeEvent = {
138
+ /**
139
+ * - The component that triggered the event.
140
+ */
141
+ target: object;
142
+ /**
143
+ * - One of `change`, `changing`.
144
+ * `change` - when value has changed and is no longer being modified by the user.
145
+ * `changing` - when the value is still being modified, e.g. while moving a Slider knob.
146
+ */
147
+ type: string;
148
+ /**
149
+ * - Indicates if the change was made by user interacting with the component. `false` means the change was done programmatically.
150
+ */
151
+ interactive?: boolean | undefined;
152
+ /**
153
+ * - One of `inserted`, `removed`. Present for some text editing components, indicates the action performed.
154
+ */
155
+ action?: string | undefined;
156
+ /**
157
+ * - The position at which text was inserted. Present when `action` is present.
158
+ */
159
+ position?: number | undefined;
160
+ /**
161
+ * - The number of characters inserted or removed. Present when `action` is present.
162
+ */
163
+ length?: number | undefined;
164
+ };
165
+ /**
166
+ * Ancestor event received by the {@link UIComponent#onAncestorEvents |onAncestorEvents()} handler callback.
167
+ */
168
+ type AncestorEvent = {
169
+ /**
170
+ * - The component that triggered the event.
171
+ */
172
+ target: object;
173
+ /**
174
+ * - One of `add`, `remove`, `move`.
175
+ */
176
+ type: string;
177
+ /**
178
+ * - The ancestor component related to this event.
179
+ */
180
+ ancestor: object;
181
+ };
182
+ /**
183
+ * Scroll event received by the {@link UIComponent#onScroll |onScroll()} handler callback.
184
+ */
185
+ type ScrollEvent = {
186
+ /**
187
+ * - The component that triggered the event.
188
+ */
189
+ target: object;
190
+ /**
191
+ * - One of `horizontal`, `vertical`.
192
+ */
193
+ type: string;
194
+ /**
195
+ * - The new horizontal scroll position.
196
+ */
197
+ x: number;
198
+ /**
199
+ * - The new vertical scroll position.
200
+ */
201
+ y: number;
202
+ /**
203
+ * - The maximum horizontal scroll position.
204
+ */
205
+ maxX: number;
206
+ /**
207
+ * - The maximum vertical scroll position.
208
+ */
209
+ maxY: number;
210
+ };
211
+ /**
212
+ * Caret event received by the {@link UIComponent#onCaretEvents |onCaretEvents()} handler callback.
213
+ */
214
+ type CaretEvent = {
215
+ /**
216
+ * - The component that triggered the event.
217
+ */
218
+ target: object;
219
+ /**
220
+ * - Always `change`.
221
+ */
222
+ type: string;
223
+ /**
224
+ * - The new caret position.
225
+ */
226
+ position: number;
227
+ /**
228
+ * - Start position of selected text.
229
+ */
230
+ selectionStart: number;
231
+ /**
232
+ * - End position of selected text.
233
+ */
234
+ selectionEnd: number;
235
+ /**
236
+ * - Line number where the caret is located. Present in components like `DocumentEditor`.
237
+ */
238
+ line?: number | undefined;
239
+ /**
240
+ * - Column number (offset from line start) of the caret. Present in multi-line components like `DocumentEditor`.
241
+ */
242
+ column?: number | undefined;
243
+ /**
244
+ * - Text formatting information at the caret’s position. Present only for `DocumentEditor` when HTML is enabled.
245
+ */
246
+ styles?: object | undefined;
247
+ /**
248
+ * - HTML tag hierarchy at the caret’s position. Present only for `DocumentEditor` when HTML is enabled.
249
+ */
250
+ path?: string[] | undefined;
251
+ };
252
+ /**
253
+ * Action event received by the {@link UIComponent#onAction |onAction()} handler callback.
254
+ */
255
+ type ActionEvent = {
256
+ /**
257
+ * - The component that triggered the event.
258
+ */
259
+ target: object;
260
+ /**
261
+ * - The command string, usually the button text or a custom value set with `.command("")`.
262
+ */
263
+ command: string;
264
+ /**
265
+ * - Keyboard modifiers (bitmask or flags).
266
+ */
267
+ modifiers?: number | undefined;
268
+ /**
269
+ * - Indicates if ALT key was pressed.
270
+ */
271
+ alt?: boolean | undefined;
272
+ /**
273
+ * - Indicates if SHIFT key was pressed.
274
+ */
275
+ shift?: boolean | undefined;
276
+ /**
277
+ * - Indicates if CTRL key was pressed.
278
+ */
279
+ ctrl?: boolean | undefined;
280
+ /**
281
+ * - One of `action` or `index_change`. Present when applicable.
282
+ */
283
+ type: string;
284
+ /**
285
+ * - Mouse X position relative to the component.
286
+ */
287
+ x?: number | undefined;
288
+ /**
289
+ * - Mouse Y position relative to the component.
290
+ */
291
+ y?: number | undefined;
292
+ /**
293
+ * - Mouse X position relative to the screen.
294
+ */
295
+ screenX?: number | undefined;
296
+ /**
297
+ * - Mouse Y position relative to the screen.
298
+ */
299
+ screenY?: number | undefined;
300
+ /**
301
+ * - Indicates if the action was triggered by user interaction (not programmatically).
302
+ */
303
+ interactive?: boolean | undefined;
304
+ /**
305
+ * - Indicates selection state when applicable.
306
+ */
307
+ selected?: boolean | undefined;
308
+ };
309
+ /**
310
+ * Mouse event received by the {@link UIComponent#onMouseEvents |onMouseEvents()} handler callback.
311
+ */
312
+ type MouseEvent = {
313
+ /**
314
+ * - The component that triggered the event.
315
+ */
316
+ target: object;
317
+ /**
318
+ * - One of `click`, `down`, `up`, `enter`, `leave`.
319
+ */
320
+ type: string;
321
+ /**
322
+ * - Button number. One of {@link MouseButton} enum values. Present when type is `click`, `down`, or `up`.
323
+ */
324
+ button?: number | undefined;
325
+ /**
326
+ * - Number of times the button was clicked. Present only when applicable, such as when type is `click`.
327
+ */
328
+ clicks?: number | undefined;
329
+ /**
330
+ * - Keyboard modifiers (bitmask or flags).
331
+ */
332
+ modifiers?: number | undefined;
333
+ /**
334
+ * - Indicates if ALT key was pressed.
335
+ */
336
+ alt?: boolean | undefined;
337
+ /**
338
+ * - Indicates if SHIFT key was pressed.
339
+ */
340
+ shift?: boolean | undefined;
341
+ /**
342
+ * - Indicates if CTRL key was pressed.
343
+ */
344
+ ctrl?: boolean | undefined;
345
+ /**
346
+ * - Mouse X position relative to the component. Present when applicable.
347
+ */
348
+ x?: number | undefined;
349
+ /**
350
+ * - Mouse Y position relative to the component. Present when applicable.
351
+ */
352
+ y?: number | undefined;
353
+ /**
354
+ * - Mouse X position relative to the primary screen. Present when applicable.
355
+ */
356
+ screenX?: number | undefined;
357
+ /**
358
+ * - Mouse Y position relative to the primary screen. Present when applicable.
359
+ */
360
+ screenY?: number | undefined;
361
+ };
362
+ /**
363
+ * Mouse motion event received by the {@link UIComponent#onMouseMotion |onMouseMotion()} handler callback.
364
+ */
365
+ type MouseMotionEvent = {
366
+ /**
367
+ * - The component that triggered the event.
368
+ */
369
+ target: object;
370
+ /**
371
+ * - One of `move`, `drag`.
372
+ */
373
+ type: string;
374
+ /**
375
+ * - Button number. One of `MouseButton` enum values. Present when applicable.
376
+ */
377
+ button?: number | undefined;
378
+ /**
379
+ * - Keyboard modifiers (bitmask or flags).
380
+ */
381
+ modifiers?: number | undefined;
382
+ /**
383
+ * - Mouse X position relative to the component.
384
+ */
385
+ x: number;
386
+ /**
387
+ * - Mouse Y position relative to the component.
388
+ */
389
+ y: number;
390
+ /**
391
+ * - Mouse X position relative to the screen.
392
+ */
393
+ screenX: number;
394
+ /**
395
+ * - Mouse Y position relative to the screen.
396
+ */
397
+ screenY: number;
398
+ };
399
+ /**
400
+ * Mouse wheel event received by the {@link UIComponent#onMouseWheel |onMouseWheel()} or {@link SwingUI#onMouseWheel |ui.onMouseWheel()} handler callback.
401
+ */
402
+ type MouseWheelEvent = {
403
+ /**
404
+ * - The component that triggered the event.
405
+ */
406
+ target: object;
407
+ /**
408
+ * - One of: `pixels`, `line`, or `pages`.
409
+ */
410
+ type: string;
411
+ /**
412
+ * - Amount of units scrolled in horizontal direction.
413
+ */
414
+ deltaX: number;
415
+ /**
416
+ * - Amount of units scrolled in vertical direction.
417
+ */
418
+ deltaY: number;
419
+ /**
420
+ * - Tells how many `pixels`, `line`, or `pages` to scroll, depending on teh `type`.
421
+ */
422
+ scrollAmount: number;
423
+ /**
424
+ * - Number of wheel "clicks" rotated. Can be zero until a full click is accumulated on high-resolution wheels.
425
+ */
426
+ rotation: number;
427
+ /**
428
+ * - Mouse X position relative to the screen.
429
+ */
430
+ screenX: number;
431
+ /**
432
+ * - Mouse Y position relative to the screen.
433
+ */
434
+ screenY: number;
435
+ /**
436
+ * - Mouse X position relative to the component. (not present for global event)
437
+ */
438
+ x?: number | undefined;
439
+ /**
440
+ * - Mouse Y position relative to the component. (not present for global event)
441
+ */
442
+ y?: number | undefined;
443
+ /**
444
+ * - Button number. One of `MouseButton` enum values. Present when applicable.
445
+ */
446
+ button?: number | undefined;
447
+ /**
448
+ * - Keyboard modifiers (bitmask or flags).
449
+ */
450
+ modifiers?: number | undefined;
451
+ /**
452
+ * - Indicates if ALT key was pressed.
453
+ */
454
+ alt?: boolean | undefined;
455
+ /**
456
+ * - Indicates if SHIFT key was pressed.
457
+ */
458
+ shift?: boolean | undefined;
459
+ /**
460
+ * - Indicates if CTRL key was pressed.
461
+ */
462
+ ctrl?: boolean | undefined;
463
+ };
464
+ /**
465
+ * Key event received by the {@link UIComponent#onKey |onKey()} handler callback.
466
+ */
467
+ type KeyEvent = {
468
+ /**
469
+ * - The component that triggered the event.
470
+ */
471
+ target: object;
472
+ /**
473
+ * - One of `up`, `down`, `type`.
474
+ */
475
+ type: string;
476
+ /**
477
+ * - Numeric code associated with the key.
478
+ */
479
+ keyCode: number;
480
+ /**
481
+ * - Unique id assigned to a key depending on the current keyboard layout. Not present for global ui.onKey() events.
482
+ */
483
+ extendedKeyCode?: number | undefined;
484
+ /**
485
+ * - The character produced by the key. Present only for `type` events.
486
+ */
487
+ keyChar?: string | undefined;
488
+ /**
489
+ * - Keyboard modifiers (bitmask or flags).
490
+ */
491
+ modifiers?: number | undefined;
492
+ /**
493
+ * - Human-readable representation of modifiers.
494
+ */
495
+ modifiersText?: string | undefined;
496
+ /**
497
+ * - Indicates if ALT key was pressed.
498
+ */
499
+ alt?: boolean | undefined;
500
+ /**
501
+ * - Indicates if SHIFT key was pressed.
502
+ */
503
+ shift?: boolean | undefined;
504
+ /**
505
+ * - Indicates if CTRL key was pressed.
506
+ */
507
+ ctrl?: boolean | undefined;
508
+ /**
509
+ * - Indicates if META (Windows or Command) key was pressed.
510
+ */
511
+ meta?: boolean | undefined;
512
+ /**
513
+ * - One of `standard`, `numpad`, `left`, `right`. Present for `up` and `down` events.
514
+ */
515
+ keyLocation?: string | undefined;
516
+ };
517
+ /**
518
+ * Focus event received by the {@link UIComponent#onFocusEvents |onFocusEvents()} handler callback.
519
+ */
520
+ type FocusEvent = {
521
+ /**
522
+ * - The component that triggered the event.
523
+ */
524
+ target: object;
525
+ /**
526
+ * - One of `focus`, `blur`.
527
+ */
528
+ type: string;
529
+ /**
530
+ * - One of `Unknown`, `Activation`, `TraversalForward`, `TraversalBackward`.
531
+ */
532
+ cause: string;
533
+ /**
534
+ * - Indicates if the focus change is temporary (lost and is expected to return, or gained after being lost tempararily).
535
+ */
536
+ temporary: boolean;
537
+ /**
538
+ * - Indicates if the focus was changed by user interaction. If `false`, then it was changed programmatically.
539
+ */
540
+ interactive: boolean;
541
+ };
542
+ /**
543
+ * Component event received by the {@link UIComponent#onComponentEvents |onComponentEvents()} handler callback.
544
+ */
545
+ type ComponentEvent = {
546
+ /**
547
+ * - The component that triggered the event.
548
+ */
549
+ target: object;
550
+ /**
551
+ * - One of `resize`, `move`, `show`, `hide`.
552
+ */
553
+ type: string;
554
+ /**
555
+ * - Indicates if the event was triggered by user interaction (not programmatically). Present for `move` and `resize` for component like Window, InternalWindow.
556
+ */
557
+ interactive?: boolean | undefined;
558
+ /**
559
+ * - New X position of the component.
560
+ */
561
+ x?: number | undefined;
562
+ /**
563
+ * - New Y position of the component.
564
+ */
565
+ y?: number | undefined;
566
+ /**
567
+ * - New width of the component. Present when type is `resize`.
568
+ */
569
+ width?: number | undefined;
570
+ /**
571
+ * - New height of the component. Present when type is `resize`.
572
+ */
573
+ height?: number | undefined;
574
+ /**
575
+ * - New width of the content area. Present for `resize` when component is `Window` or `InternalWindow`.
576
+ */
577
+ innerWidth?: number | undefined;
578
+ /**
579
+ * - New height of the content area. Present for `resize` when component is `Window` or `InternalWindow`.
580
+ */
581
+ innerHeight?: number | undefined;
582
+ };
583
+ /**
584
+ * Container event received by the {@link UIComponent#onContainerEvents |onContainerEvents()} handler callback.
585
+ */
586
+ type ContainerEvent = {
587
+ /**
588
+ * - The container component that triggered the event.
589
+ */
590
+ target: object;
591
+ /**
592
+ * - One of `add`, `remove`.
593
+ */
594
+ type: string;
595
+ /**
596
+ * - The child component that was added or removed.
597
+ */
598
+ child: object;
599
+ };
600
+ /**
601
+ * Property change event received by the {@link UIComponent#onPropertyChange |onPropertyChange()} handler callback.
602
+ */
603
+ type PropertyChangeEvent = {
604
+ /**
605
+ * - The component that triggered the event.
606
+ */
607
+ target: object;
608
+ /**
609
+ * - Always `change`.
610
+ */
611
+ type: string;
612
+ /**
613
+ * - The property that was changed.
614
+ */
615
+ property: string;
616
+ /**
617
+ * - Previous value of the changed property.
618
+ */
619
+ oldValue: any;
620
+ /**
621
+ * - New value of the changed property.
622
+ */
623
+ newValue: any;
624
+ };
625
+ /**
626
+ * Popup list event received by the onPopupEvents() handler callback in ComboBox, Menu and ContextMenu components.
627
+ */
628
+ type PopupEvent = {
629
+ /**
630
+ * - The component that triggered the event.
631
+ */
632
+ target: object;
633
+ /**
634
+ * - One of `show`, `hide`, `cancel`.
635
+ */
636
+ type: string;
637
+ /**
638
+ * - Component's X position relative to invoker. For `Menu` component it's only present when invoker is not `null`.
639
+ */
640
+ x?: number | undefined;
641
+ /**
642
+ * - Component's Y position relative to invoker. For `Menu` component it's only present when invoker is not `null`.
643
+ */
644
+ y?: number | undefined;
645
+ /**
646
+ * - Indicates if the popup was triggered by user's interaction (not programmatically).
647
+ */
648
+ interactive: boolean;
649
+ /**
650
+ * - X position of a `Menu` component relative to default screen.
651
+ */
652
+ screenX?: number | undefined;
653
+ /**
654
+ * - Y position of a `Menu` component relative to default screen.
655
+ */
656
+ screenY?: number | undefined;
657
+ /**
658
+ * - UI Component that invoked the popup, or `null` if it was invoked programmatically.
659
+ */
660
+ invoker?: object | undefined;
661
+ };
662
+ /**
663
+ * Event object passed to hyperlink event handlers in {@link DocumentEditor#onLinkEvents}.
664
+ */
665
+ type LinkEvent = {
666
+ /**
667
+ * - The component that triggered the event.
668
+ */
669
+ target: DocumentEditor;
670
+ /**
671
+ * - The event type: `click`, `mouseenter`, or `mouseleave`.
672
+ */
673
+ type: string;
674
+ /**
675
+ * - The `href` attribute of the `<a>` tag.
676
+ */
677
+ url: string;
678
+ /**
679
+ * - The text content of the hyperlink.
680
+ */
681
+ text: string;
682
+ /**
683
+ * - Whether the Shift key was pressed.
684
+ */
685
+ shift: boolean;
686
+ /**
687
+ * - Whether the Ctrl key was pressed.
688
+ */
689
+ ctrl: boolean;
690
+ /**
691
+ * - Whether the Alt key was pressed.
692
+ */
693
+ alt: boolean;
694
+ /**
695
+ * - Keyboard modifiers mask.
696
+ */
697
+ modifiers: string;
698
+ /**
699
+ * - String representation of the keyboard modifiers.
700
+ */
701
+ modifiersText: string;
702
+ };
703
+ /**
704
+ * Event object passed to MediaPlayer event handlers.
705
+ */
706
+ type PlayerEvent = {
707
+ /**
708
+ * - Type of the event: `loadstart`, `loadedmetadata`, `seeking`, `timeupdate`, `play`, `stop`, `subtitle`.
709
+ */
710
+ type: string;
711
+ /**
712
+ * - Type of media loaded in the player: `File`, `InputDevice`, `URL`.
713
+ */
714
+ mediaType?: string | undefined;
715
+ /**
716
+ * - A {@link Media} object containing details about the loaded media.
717
+ */
718
+ media?: Media | undefined;
719
+ /**
720
+ * - Current playback time in seconds.
721
+ */
722
+ currentTime?: number | undefined;
723
+ /**
724
+ * - Total duration of the media in seconds. Present when `type` is `timeupdate`.
725
+ */
726
+ duration?: number | undefined;
727
+ /**
728
+ * - Reason for stopping playback: `Pause`, `EndOfMediaFile`.
729
+ */
730
+ reason?: string | undefined;
731
+ /**
732
+ * - Index of a subtitle since the player started playing (not from the beginning of the video}. (Only present when event type is `subtitle`).
733
+ */
734
+ index?: number | undefined;
735
+ /**
736
+ * - Time when to show the subtitle relative to the position when the video started (not to the beginning of the video). (Only present when event type is `subtitle`).
737
+ */
738
+ fromTime?: string | undefined;
739
+ /**
740
+ * - Time when to show the subtitle relative to the position when the video started (not to the beginning of the video). (Only present when event type is `subtitle`).
741
+ */
742
+ toTime?: string | undefined;
743
+ /**
744
+ * - Subtitle text. (Only present when event type is `subtitle`).
745
+ */
746
+ text?: string | undefined;
747
+ };
748
+ /**
749
+ * Represents an event related to a Window and InternalWindow component. Used for handling window state changes
750
+ * such as activation, minimization, maximization, hiding, showing, and closing.
751
+ */
752
+ type WindowEvent = {
753
+ /**
754
+ * - The window component that triggered the event.
755
+ */
756
+ target: Window | InternalWindow;
757
+ /**
758
+ * - The event type. One of: `activate`, `deactivate`, `minimize`, `restore`, `closing`, `close`, `show`.
759
+ */
760
+ type: string;
761
+ /**
762
+ * - Indicates if the event was triggered by the user's interaction with the window.
763
+ */
764
+ interactive: boolean;
765
+ };
766
+ /**
767
+ * Represents a window state change event. Used when a window changes its state
768
+ * such as minimized, maximized, or restored.
769
+ */
770
+ type WindowStateEvent = {
771
+ /**
772
+ * - The window component that triggered the event.
773
+ */
774
+ target: Window;
775
+ /**
776
+ * - The event type. Always `change` for state changes.
777
+ */
778
+ type: string;
779
+ /**
780
+ * - The new state of the window.
781
+ */
782
+ state: Window.State;
783
+ /**
784
+ * - The previous state of the window.
785
+ */
786
+ new_state: Window.State;
787
+ /**
788
+ * - Indicates if the state change was triggered by the user's interaction with the window.
789
+ */
790
+ interactive: boolean;
791
+ };
792
+ /**
793
+ * Represents an application event used in `{@link SwingUI#onAppEvents |ui.onAppEvents(callback)}`.
794
+ */
795
+ type AppEvent = {
796
+ /**
797
+ * - One of event types: `about`, `foreground`, `background`, `searchTerm`, `files`, `print`, `uri`, `preferences`, `quit`, `screenSleep`, `screenAwake`, `systemSleep`, `systemAwake`
798
+ */
799
+ type: string;
800
+ /**
801
+ * - File list. Present when type is `files` or `print`.
802
+ */
803
+ files?: string[] | undefined;
804
+ /**
805
+ * - Present when type is `files`.
806
+ */
807
+ searchTerm?: string | undefined;
808
+ };
809
+ /**
810
+ * Represents a table row event triggered by a `{@link Table}` component `{@link Table#onRowEvents}` events.
811
+ */
812
+ type RowEvent = {
813
+ /**
814
+ * - The Table component that triggered the event.
815
+ */
816
+ target: Table;
817
+ /**
818
+ * - Type of the row event: `insert`, `remove`, `update`.
819
+ */
820
+ type: string;
821
+ /**
822
+ * - Index of the affected row. Present when a single row is affected.
823
+ */
824
+ row?: number | undefined;
825
+ /**
826
+ * - Column index of the affected cell. Only present when type is `update`.
827
+ * A value of `-1` means all columns in the row were affected.
828
+ */
829
+ column?: number | undefined;
830
+ /**
831
+ * - Start index of affected row range. Present when multiple rows are affected.
832
+ */
833
+ fromRow?: number | undefined;
834
+ /**
835
+ * - End index of affected row range. Present when multiple rows are affected.
836
+ */
837
+ toRow?: number | undefined;
838
+ /**
839
+ * - Only present when type is `update`.
840
+ * `true` if the update was triggered by user interaction, `false` if done programmatically.
841
+ */
842
+ interactive?: boolean | undefined;
843
+ };
844
+ /**
845
+ * Represents a table column event triggered by a `{@link Table}` component.
846
+ */
847
+ type ColumnEvent = {
848
+ /**
849
+ * - The Table component that triggered the event.
850
+ */
851
+ target: Table;
852
+ /**
853
+ * - Type of the column event: `insert`, `remove`, `move`, `resize`;
854
+ */
855
+ type: string;
856
+ /**
857
+ * - Column index. Present when type is `insert`, `remove`, or `resize`.
858
+ */
859
+ index?: number | undefined;
860
+ /**
861
+ * - Previous column index. Present when type is `move`.
862
+ */
863
+ fromIndex?: number | undefined;
864
+ /**
865
+ * - New column index. Present when type is `move`.
866
+ */
867
+ toIndex?: number | undefined;
868
+ /**
869
+ * - Previous column size. Present when type is `resize`.
870
+ */
871
+ fromSize?: number | undefined;
872
+ /**
873
+ * - New column size. Present when type is `resize`.
874
+ */
875
+ toSize?: number | undefined;
876
+ /**
877
+ * - Present for `move` events. `true` if triggered by user interaction, `false` if done programmatically.
878
+ */
879
+ interactive?: boolean | undefined;
880
+ };
881
+ /**
882
+ * Represents a table sort event triggered by a `{@link Table}` component.
883
+ */
884
+ type SortEvent = {
885
+ /**
886
+ * - The Table component that triggered the event.
887
+ */
888
+ target: Table;
889
+ /**
890
+ * - Sort order state: `Table.SortOrder.None`, `Table.SortOrder.Ascending`, or `Table.SortOrder.Descending`.
891
+ */
892
+ type: Table.SortOrder;
893
+ /**
894
+ * - Column index. Present when type is not `Table.SortOrder.None`.
895
+ */
896
+ column?: number | undefined;
897
+ /**
898
+ * - New column index after reordering. Present when type is not `Table.SortOrder.None`.
899
+ */
900
+ newOrderColumn?: number | undefined;
901
+ /**
902
+ * - `true` if triggered by user interaction, `false` if triggered programmatically.
903
+ */
904
+ interactive: boolean;
905
+ };
906
+ /**
907
+ * Represents an event triggered by a performing a keyboard shortcut (one key or a key combination) on a component.
908
+ */
909
+ type ShortcutEvent = {
910
+ /**
911
+ * - The component that triggered the event.
912
+ */
913
+ target: UIComponent;
914
+ /**
915
+ * - One of values from {@link ShortcutScope} enum.
916
+ */
917
+ scope: ShortcutScope;
918
+ /**
919
+ * - User provided action string, or the key exactly as user specifed it (not normalized).
920
+ */
921
+ action: string;
922
+ /**
923
+ * - The keyboard key or a key combination that triggered the shortcut (normalized, might be not exactly same as user specified).
924
+ */
925
+ key: string;
926
+ };
927
+ /**
928
+ * Shape event received by the {@link Panel#onShapeEvents |onShapeEvents()} and {@link Window#onShapeEvents |Window.onShapeEvents()} handler callback.
929
+ */
930
+ type ShapeEvent = {
931
+ /**
932
+ * - The Panel component that triggered the event.
933
+ */
934
+ target: object;
935
+ /**
936
+ * - One of `add`, `remove`, `click`, `mousedown`, `mouseup`, `mouseenter`, `mouseleave`.
937
+ */
938
+ type: string;
939
+ /**
940
+ * - X position of the pointer relative to the target component.
941
+ */
942
+ x?: number | undefined;
943
+ /**
944
+ * - Y position of the pointer relative to the target component.
945
+ */
946
+ y?: number | undefined;
947
+ /**
948
+ * - Index of the shape that triggered the event.
949
+ */
950
+ shapeIndex: number;
951
+ /**
952
+ * - `true` if mouse is down while moving, otherwise `false`.
953
+ */
954
+ dragging?: boolean | undefined;
955
+ /**
956
+ * - `true` if Alt key was pressed on keyboard when event was emitted.
957
+ */
958
+ alt?: boolean | undefined;
959
+ /**
960
+ * - `true` if Shift key was pressed on keyboard when event was emitted.
961
+ */
962
+ shift?: boolean | undefined;
963
+ /**
964
+ * - `true` if Control key was pressed on keyboard when event was emitted.
965
+ */
966
+ ctrl?: boolean | undefined;
967
+ /**
968
+ * - Modifiers used when the event was emitted.
969
+ */
970
+ modifiers?: string | undefined;
971
+ /**
972
+ * - Description of used modifiers.
973
+ */
974
+ modifiersText?: string | undefined;
975
+ };
976
+ /**
977
+ * List item object used in {@link ComboBox}, {@link List}, and {@link Tree} components.
978
+ */
979
+ type ListItem = {
980
+ /**
981
+ * - Item text. (Required for a new list item).
982
+ */
983
+ text?: string | undefined;
984
+ /**
985
+ * - Value that can be used by software logic to identify this item.
986
+ */
987
+ id?: string | number | undefined;
988
+ /**
989
+ * - Additional value to be stored in the item for later use.
990
+ */
991
+ value?: string | number | undefined;
992
+ /**
993
+ * - Absolute/relative path to icon image, base64 encoded image string, or `null` to remove icon.
994
+ */
995
+ icon?: string | null | undefined;
996
+ /**
997
+ * - Item text color as a 6-character hex string (e.g. `#665500`).
998
+ */
999
+ color?: string | undefined;
1000
+ /**
1001
+ * - Item background color as a 6-character hex string (e.g. `#665500`).
1002
+ */
1003
+ background?: string | undefined;
1004
+ /**
1005
+ * - Tooltip text shown when hovering the item (only in List and Tree components).
1006
+ */
1007
+ tooltip?: string | undefined;
1008
+ /**
1009
+ * - {@link Font} formatted object.
1010
+ */
1011
+ font?: Font | undefined;
1012
+ /**
1013
+ * - In some cases items are returned with `index` property to indicate their position within component.
1014
+ */
1015
+ index?: number | undefined;
1016
+ /**
1017
+ * - For Tree component nodes only! An array of child nodes.
1018
+ */
1019
+ children?: ListItem[] | undefined;
1020
+ };
1021
+ /**
1022
+ * Font object used in most UI components, {@link ListItem}, {@link TableColumn}, {@link Text} shape and other text-rendering components.
1023
+ */
1024
+ type Font = {
1025
+ /**
1026
+ * - Font family name (e.g., `"sans-serif"`).
1027
+ */
1028
+ name?: string | FontFamily;
1029
+ /**
1030
+ * - Font size in pixels.
1031
+ */
1032
+ size?: number | undefined;
1033
+ /**
1034
+ * - Whether the text is bold.
1035
+ */
1036
+ bold?: boolean | undefined;
1037
+ /**
1038
+ * - Whether the text is italic.
1039
+ */
1040
+ italic?: boolean | undefined;
1041
+ /**
1042
+ * - Whether the text is underlined.
1043
+ */
1044
+ underlined?: boolean | undefined;
1045
+ /**
1046
+ * - Whether the text has a strikethrough.
1047
+ */
1048
+ strikethrough?: boolean | undefined;
1049
+ /**
1050
+ * - Text direction: `"ltr"` or `"rtl"`.
1051
+ */
1052
+ direction?: string | undefined;
1053
+ /**
1054
+ * - Enable or disable kerning.
1055
+ */
1056
+ kerning?: boolean | undefined;
1057
+ /**
1058
+ * - Enable or disable font ligatures.
1059
+ */
1060
+ ligatures?: boolean | undefined;
1061
+ /**
1062
+ * - Letter spacing adjustment: -1, 0 (default), or 1.
1063
+ */
1064
+ tracking?: number | undefined;
1065
+ };
1066
+ /**
1067
+ * Border object used to define the visual border of UI components like Panel, Label, Button, TextField, TextArea and more.
1068
+ */
1069
+ type Border = {
1070
+ /**
1071
+ * - (Required) The border style.
1072
+ */
1073
+ style: BorderStyle;
1074
+ /**
1075
+ * - Border size in pixels. Must be >= 1.
1076
+ */
1077
+ size?: number | undefined;
1078
+ /**
1079
+ * - Inner padding as a space-separated string of four integer values: `"top right bottom left"`. Example: `"5 10 5 10"`. Can be set even when `style` is `"none"`.
1080
+ */
1081
+ padding?: string | undefined;
1082
+ /**
1083
+ * - Border color. Only applicable for `"line"` or `"dashed"` styles.
1084
+ */
1085
+ color?: string | undefined;
1086
+ /**
1087
+ * - If `true`, renders rounded corners for `"line"` style, or rounded dashes for `"dashed"` style. Only applicable for `"line"` or `"dashed"` styles.
1088
+ */
1089
+ rounded?: boolean | undefined;
1090
+ /**
1091
+ * - Length of each dash. Only applicable for `"dashed"` style.
1092
+ */
1093
+ length?: number | undefined;
1094
+ /**
1095
+ * - Length of the gaps between dashes. Only applicable for `"dashed"` style.
1096
+ */
1097
+ spacing?: number | undefined;
1098
+ /**
1099
+ * - Starting offset of the dash pattern. Can be used to animate dashes. Only applicable for `"dashed"` style.
1100
+ */
1101
+ offset?: number | undefined;
1102
+ /**
1103
+ * - Label text displayed at the top-left of the border, creating a titled border effect.
1104
+ */
1105
+ text?: string | undefined;
1106
+ /**
1107
+ * - Placement of the border label text. Accepts a combination of: `"left"`, `"center"`, `"right"`, `"leading"`, `"trailing"`, `"top"`, `"bottom"`, `"above"`, `"below"`. `"above"` and `"below"` refer to placement relative to the border line itself. Defaults to `"top left"`.
1108
+ */
1109
+ alignment?: string | undefined;
1110
+ /**
1111
+ * - Font used to render the border label text.
1112
+ */
1113
+ font?: Font | undefined;
1114
+ };
1115
+ /**
1116
+ * Table column configuration object used in {@link Table} components.
1117
+ */
1118
+ type TableColumn = {
1119
+ /**
1120
+ * - The text to be displayed in the column header. (Required when creating a new column)
1121
+ */
1122
+ text?: string | undefined;
1123
+ /**
1124
+ * - Type of component to display/edit cell data. Possible values:
1125
+ * - `text` - Plain text or HTML.
1126
+ * - `password` - Masked password text field.
1127
+ * - `textarea` - Multi-line text field.
1128
+ * - `icon` - Displays an image loaded from the cell's value as a URL or path. Use table.onAction(callback) for click events.
1129
+ * - `button` - A string of button names separated by `"|"`. Use table.onAction(callback) for click events.
1130
+ * - `checkbox` - Boolean check mark selection component.
1131
+ * - `combobox` - Drop-down list of values, can be editable.
1132
+ * - `progress` - Progress bar showing integer value 0–100.
1133
+ */
1134
+ type?: string | undefined;
1135
+ /**
1136
+ * - Initial desired width of the column.
1137
+ */
1138
+ width?: number | undefined;
1139
+ /**
1140
+ * - Minimum width column can be resized to.
1141
+ */
1142
+ minWidth?: number | undefined;
1143
+ /**
1144
+ * - Maximum width column can be resized to.
1145
+ */
1146
+ maxWidth?: number | undefined;
1147
+ /**
1148
+ * - Whether text fields are editable.
1149
+ */
1150
+ editable?: boolean | undefined;
1151
+ /**
1152
+ * - Number of clicks required to enter edit mode. Takes effect only when `editable` is `true`.
1153
+ */
1154
+ clicksToEdit?: number | undefined;
1155
+ /**
1156
+ * - Indicates if the column can be resized by the user.
1157
+ */
1158
+ resizable?: boolean | undefined;
1159
+ /**
1160
+ * - Indicates if column auto-resizes with table (Has no effect if the table's auto-resize mode is Table.AutoResize.None).
1161
+ */
1162
+ autoResize?: boolean | undefined;
1163
+ /**
1164
+ * - Whether the column is hidden by collapsing its width to 0.
1165
+ */
1166
+ hidden?: boolean | undefined;
1167
+ /**
1168
+ * - Indicates a column with primary data, such as a URL or file path, used as the data source for list generation or drag-and-drop operations.
1169
+ */
1170
+ primary?: boolean | undefined;
1171
+ /**
1172
+ * - Sorting mode. `Table.Sorting.None` disables sorting.
1173
+ */
1174
+ sorting?: Table.Sorting;
1175
+ /**
1176
+ * - List of values to choose from in a ComboBox component when type is `combobox`.
1177
+ */
1178
+ options?: string[] | undefined;
1179
+ /**
1180
+ * - The character used to mask input for the `password` type.
1181
+ */
1182
+ character?: string | undefined;
1183
+ /**
1184
+ * - Icon shown in the column header. Value can be a local file path, URI, or base64 encoded image string.
1185
+ */
1186
+ icon?: string | undefined;
1187
+ /**
1188
+ * - For `"icon"` type, fixed width/height of the icon (largest dimension).
1189
+ */
1190
+ iconSize?: number | undefined;
1191
+ /**
1192
+ * - For `"icon"` type, number of images cached in RAM.
1193
+ */
1194
+ cacheCapacity?: number | undefined;
1195
+ /**
1196
+ * - Tooltip for the column header.
1197
+ */
1198
+ tooltip?: string | undefined;
1199
+ /**
1200
+ * - Text color of cells of the column.
1201
+ */
1202
+ color?: string | null | undefined;
1203
+ /**
1204
+ * - Background color of cells of the column.
1205
+ */
1206
+ background?: string | null | undefined;
1207
+ /**
1208
+ * - Text color of a column header.
1209
+ */
1210
+ headerColor?: string | null | undefined;
1211
+ /**
1212
+ * - Background color of a column header.
1213
+ */
1214
+ headerBackground?: string | null | undefined;
1215
+ /**
1216
+ * - Font of cells of a column.
1217
+ */
1218
+ font?: Font | null | undefined;
1219
+ /**
1220
+ * - Font of a column header.
1221
+ */
1222
+ headerFont?: Font | null | undefined;
1223
+ /**
1224
+ * - Minimum value for progress bar component when type is `progress`.
1225
+ */
1226
+ min?: number | undefined;
1227
+ /**
1228
+ * - Maximum value for progress bar component when type is `progress`.
1229
+ */
1230
+ max?: number | undefined;
1231
+ /**
1232
+ * - Whether to display the value as text inside the progress bar component when type is `progress`.
1233
+ */
1234
+ showText?: boolean | undefined;
1235
+ /**
1236
+ * - Text alignment in cells of the column. Maximum one horizontal and one vertical alignment keywords: 'center','left','right','leading','trailing','top','bottom'.
1237
+ */
1238
+ align?: string | undefined;
1239
+ /**
1240
+ * - Text alignment of a column header. Maximum one horizontal and one vertical alignment keywords: 'center','left','right','leading','trailing','top','bottom'.
1241
+ */
1242
+ headerAlign?: string | undefined;
1243
+ };
1244
+ /**
1245
+ * Table cell coordinates containing column and row property.
1246
+ */
1247
+ type Cell = {
1248
+ /**
1249
+ * - a column index of the cell
1250
+ */
1251
+ column: number;
1252
+ /**
1253
+ * - a row index of the cell
1254
+ */
1255
+ row: number;
1256
+ };
1257
+ /**
1258
+ * Describes metadata and streams of the media.
1259
+ */
1260
+ type Media = {
1261
+ /**
1262
+ * - Duration of the media in seconds. Not present for live streams.
1263
+ */
1264
+ duration?: number | undefined;
1265
+ /**
1266
+ * - Array of video streams available in the media.
1267
+ */
1268
+ videoStreams: VideoStream[];
1269
+ /**
1270
+ * - Array of audio streams available in the media.
1271
+ */
1272
+ audioStreams: AudioStream[];
1273
+ /**
1274
+ * - Array of subtitle streams available in the media.
1275
+ */
1276
+ subtitleStreams: SubtitleStream[];
1277
+ };
1278
+ /**
1279
+ * Describes a video stream in the media.
1280
+ */
1281
+ type VideoStream = {
1282
+ /**
1283
+ * - Original width of the video frame in pixels.
1284
+ */
1285
+ sampleWidth: number;
1286
+ /**
1287
+ * - Original height of the video frame in pixels.
1288
+ */
1289
+ sampleHeight: number;
1290
+ /**
1291
+ * - Display width of the video.
1292
+ */
1293
+ width: number;
1294
+ /**
1295
+ * - Display height of the video.
1296
+ */
1297
+ height: number;
1298
+ /**
1299
+ * - Pixel aspect ratio (e.g., `"1:1"`).
1300
+ */
1301
+ pixelAspectRatio: string;
1302
+ /**
1303
+ * - Display aspect ratio (e.g., `"16:9"`).
1304
+ */
1305
+ displayAspectRatio: string;
1306
+ /**
1307
+ * - Frame rate of the video stream.
1308
+ */
1309
+ frameRate: number;
1310
+ /**
1311
+ * - Codec used to encode the video stream (e.g., `"h264"`).
1312
+ */
1313
+ codec: string;
1314
+ /**
1315
+ * - Pixel format of the video stream (e.g., `"yuv420p"`).
1316
+ */
1317
+ pixelFormat: string;
1318
+ /**
1319
+ * - Whether the video stream is progressive or interlaced.
1320
+ */
1321
+ progressive: boolean;
1322
+ /**
1323
+ * - Indicates if this is the default video stream.
1324
+ */
1325
+ default: boolean;
1326
+ };
1327
+ /**
1328
+ * Describes an audio stream in the media.
1329
+ */
1330
+ type AudioStream = {
1331
+ /**
1332
+ * - Sample rate of the audio stream in Hz.
1333
+ */
1334
+ sampleRate: number;
1335
+ /**
1336
+ * - Number of audio channels (1 - mono, 2 - stereo, etc.)
1337
+ */
1338
+ channels: number;
1339
+ /**
1340
+ * - Bit depth of the audio samples.
1341
+ */
1342
+ bitDepth: number;
1343
+ /**
1344
+ * - Codec used to encode the audio stream (e.g., `"aac"`).
1345
+ */
1346
+ codec: string;
1347
+ /**
1348
+ * - Indicates if this is the default audio stream.
1349
+ */
1350
+ default: boolean;
1351
+ };
1352
+ /**
1353
+ * Describes a subtitle stream in the media.
1354
+ */
1355
+ type SubtitleStream = {
1356
+ /**
1357
+ * - Language of the subtitle stream (e.g., `"en"`).
1358
+ */
1359
+ language: string;
1360
+ /**
1361
+ * - Codec used for the subtitle stream (e.g., `"srt"`).
1362
+ */
1363
+ codec: string;
1364
+ /**
1365
+ * - Indicates if this is the default subtitle stream.
1366
+ */
1367
+ default: boolean;
1368
+ };
1369
+ /**
1370
+ * Represents a video input device, such as WebCam, video capture device, etc. Used when getting input devices with {@link MediaPlayer#videoInputDevices |videoInputDevices} getter and when setting input device with {@link MediaPlayer#setInputDevice |setInputDevice()} method.
1371
+ */
1372
+ type VideoDevice = {
1373
+ /**
1374
+ * - Name of the video input device (only present when retrieving a list of video input devices).
1375
+ */
1376
+ name?: string | undefined;
1377
+ /**
1378
+ * - ID of the video input device.
1379
+ */
1380
+ id: string;
1381
+ /**
1382
+ * - List of available video formats (only present when retrieving a list of video input devices).
1383
+ */
1384
+ formats?: VideoFormat[] | undefined;
1385
+ /**
1386
+ * - Chosen video format to use (required when setting a video input device).
1387
+ */
1388
+ format?: VideoFormat | undefined;
1389
+ };
1390
+ /**
1391
+ * Represents a video format for a VideoDevice. When using this VideoFormat for video input device, make sure that either "pixel_format" or "vcodec" is specified as it was set when you retrieved the supported formats.
1392
+ */
1393
+ type VideoFormat = {
1394
+ /**
1395
+ * - Video frame size in pixels (e.g., "1920x1080").
1396
+ */
1397
+ size: string;
1398
+ /**
1399
+ * - Minimum available frame rate (e.g., 7.5). (provided when retrieving video input devices)
1400
+ */
1401
+ min_fps?: number | undefined;
1402
+ /**
1403
+ * - Maximum available frame rate (e.g., 30). (provided when retrieving video input devices)
1404
+ */
1405
+ max_fps?: number | undefined;
1406
+ /**
1407
+ * - Frame rate in frames per second (required when setting a video input device).
1408
+ */
1409
+ fps?: number | undefined;
1410
+ /**
1411
+ * - Frame image pixel format coming out of the device (e.g., "yuyv422"). If this is present, then `vcodec` is absent.
1412
+ */
1413
+ pixel_format?: string | undefined;
1414
+ /**
1415
+ * - Encoded video format that the video device supports (e.g., "mjpeg", "h264"). If this is present, then `pixel_format` is absent.
1416
+ */
1417
+ vcodec?: string | undefined;
1418
+ };
1419
+ /**
1420
+ * Represents an audio input or output device, such as a microphone, audio card, etc.
1421
+ */
1422
+ type AudioDevice = {
1423
+ /**
1424
+ * - Name of the audio device (required when setting an audio input device).
1425
+ */
1426
+ name: string;
1427
+ /**
1428
+ * - ID of the audio device.
1429
+ */
1430
+ id?: string | undefined;
1431
+ /**
1432
+ * - List of available audio formats provided when retrieving a list of installed audio devices.
1433
+ */
1434
+ formats?: AudioFormat[] | undefined;
1435
+ /**
1436
+ * - Specifies the chosen audio format to use (only when setting audio input device).
1437
+ */
1438
+ format?: AudioFormat | undefined;
1439
+ };
1440
+ /**
1441
+ * Represents an audio format for an audio device.
1442
+ */
1443
+ type AudioFormat = {
1444
+ /**
1445
+ * - Number of audio channels. (1-Mono, 2-Stereo, etc.)
1446
+ */
1447
+ channels: number;
1448
+ /**
1449
+ * - Bits per audio sample.
1450
+ */
1451
+ bits: number;
1452
+ /**
1453
+ * - Sample rate in Hz (only available for audio input devices).
1454
+ */
1455
+ rate?: number | undefined;
1456
+ /**
1457
+ * - Audio encoding (e.g., "PCM_UNSIGNED", "PCM_SIGNED"); (only available for audio output device formats).
1458
+ */
1459
+ encoding?: string | undefined;
1460
+ };
1461
+ /**
1462
+ * Represents a point in 2D space with X and Y coordinates. Used when setting or getting position of UI component, Shape position, or Shape's anchor.
1463
+ */
1464
+ type Point = {
1465
+ /**
1466
+ * - The x-coordinate.
1467
+ */
1468
+ x: number;
1469
+ /**
1470
+ * - The y-coordinate.
1471
+ */
1472
+ y: number;
1473
+ };
1474
+ /**
1475
+ * Represents the size of a 2D object. Used when setting or getting the size of UI component, Shape size, and more.
1476
+ */
1477
+ type Size = {
1478
+ /**
1479
+ * - The width dimension.
1480
+ */
1481
+ width: number;
1482
+ /**
1483
+ * - The height dimension.
1484
+ */
1485
+ height: number;
1486
+ };
1487
+ /**
1488
+ * Options object for configuring file or directory selection dialogs. Used in {@link Window#chooseFile}.
1489
+ */
1490
+ type FileChooserOptions = {
1491
+ /**
1492
+ * - `true` to select directories, `false` to select files.
1493
+ */
1494
+ directory: boolean;
1495
+ /**
1496
+ * - `true` to display a Save dialog, `false` for an Open dialog.
1497
+ */
1498
+ save: boolean;
1499
+ /**
1500
+ * - `true` to allow selection of multiple files or folders.
1501
+ */
1502
+ multiple: boolean;
1503
+ /**
1504
+ * - `true` to display hidden files.
1505
+ */
1506
+ hidden: boolean;
1507
+ /**
1508
+ * - File type filter string (e.g. `"Documents:doc,docx,txt,rtf|Music:mp3,m4a,ogg,wma|Images:gif,jpg,jpeg,bmp,webp"`).
1509
+ */
1510
+ filter: string;
1511
+ /**
1512
+ * - Initial directory path or file path to open in the dialog.
1513
+ */
1514
+ path: string;
1515
+ };
1516
+ /**
1517
+ * Options object that hold optional video filters to be applied to video by FFMPEG for MediaPlayer component. Used in {@link MediaPlayer#videoFilters}.
1518
+ */
1519
+ type VideoFilters = {
1520
+ /**
1521
+ * - A number of degrees to rotate the video by.
1522
+ */
1523
+ rotate?: number | undefined;
1524
+ /**
1525
+ * - `h` for horizontal, `v` for vertical.
1526
+ */
1527
+ flip?: string | undefined;
1528
+ /**
1529
+ * - `gray`, `sepia`, or `negative`.
1530
+ */
1531
+ color?: string | undefined;
1532
+ /**
1533
+ * - A number between 1 and -1. Default is 0.
1534
+ */
1535
+ brightness?: number | undefined;
1536
+ /**
1537
+ * - A number between 0.0 and 2.0. Default is 1.
1538
+ */
1539
+ contrast?: number | undefined;
1540
+ /**
1541
+ * - A number between 0.0 and 3.0. Default is 1.
1542
+ */
1543
+ saturation?: number | undefined;
1544
+ /**
1545
+ * - A number between 0.1 and 10.0. Default is 1.
1546
+ */
1547
+ gamma?: number | undefined;
1548
+ /**
1549
+ * - Allows to insert any custom video filters separated by comma. Must be compatible with `ffmpeg -vf` option.
1550
+ */
1551
+ custom?: string | undefined;
1552
+ };
1553
+ /**
1554
+ * An object returned by ui.fileStat(path), which contains information about a file or directory.
1555
+ */
1556
+ type FileStat = {
1557
+ /**
1558
+ * - Indicates if the entry is a regular file
1559
+ */
1560
+ isFile: boolean;
1561
+ /**
1562
+ * - Indicates if the entry is a directory
1563
+ */
1564
+ isDirectory: boolean;
1565
+ /**
1566
+ * - Indicates if the entry is a symbolic link
1567
+ */
1568
+ isSymlink: boolean;
1569
+ /**
1570
+ * - Device ID containing the file
1571
+ */
1572
+ dev: number;
1573
+ /**
1574
+ * - Device ID (if special file)
1575
+ */
1576
+ rdev: number;
1577
+ /**
1578
+ * - Number of hard links
1579
+ */
1580
+ nlink: number;
1581
+ /**
1582
+ * - User ID of the file owner
1583
+ */
1584
+ user: number;
1585
+ /**
1586
+ * - Group ID of the file owner
1587
+ */
1588
+ group: number;
1589
+ /**
1590
+ * - Size of the file in bytes
1591
+ */
1592
+ size: number;
1593
+ /**
1594
+ * - File mode (permissions and file type)
1595
+ */
1596
+ mode: number;
1597
+ /**
1598
+ * - Last access time
1599
+ */
1600
+ atime: Date;
1601
+ /**
1602
+ * - Last modification time (e.g. 2025-11-10T08:13:44.386Z)
1603
+ */
1604
+ mtime: Date;
1605
+ /**
1606
+ * - Last status change time (e.g. 2025-11-10T08:13:44.386Z)
1607
+ */
1608
+ ctime: Date;
1609
+ /**
1610
+ * - File creation time (e.g. 2025-11-10T08:13:44.386Z)
1611
+ */
1612
+ birthtime: Date;
1613
+ };
1614
+ /**
1615
+ * An object returned and accepted by .scrollbars() method for components with scroll bars, which contains scroll bar settings for horizontal and vertical scroll bars.
1616
+ */
1617
+ type Scrollbars = {
1618
+ /**
1619
+ * - Visibility of horizontal scroll bar: `true` = visible, `false` = hidden, `null` = auto.
1620
+ */
1621
+ horizontal?: boolean | null | undefined;
1622
+ /**
1623
+ * - Visibility of horizontal scroll bar: `true` = visible, `false` = hidden, `null` = auto.
1624
+ */
1625
+ vertical?: boolean | null | undefined;
1626
+ };