@girs/cally-15 4.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cally-15.d.ts ADDED
@@ -0,0 +1,2513 @@
1
+
2
+ /**
3
+ * Type Definitions for Gjs (https://gjs.guide/)
4
+ *
5
+ * These type definitions are automatically generated, do not edit them by hand.
6
+ * If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
7
+ *
8
+ * The based EJS template file is used for the generated .d.ts file of each GIR module like Gtk-4.0, GObject-2.0, ...
9
+ */
10
+
11
+ import '@girs/gjs';
12
+
13
+ // Module dependencies
14
+ import type Mtk from '@girs/mtk-15';
15
+ import type Graphene from '@girs/graphene-1.0';
16
+ import type GObject from '@girs/gobject-2.0';
17
+ import type GLib from '@girs/glib-2.0';
18
+ import type CoglPango from '@girs/coglpango-15';
19
+ import type PangoCairo from '@girs/pangocairo-1.0';
20
+ import type cairo from 'cairo';
21
+ import type Pango from '@girs/pango-1.0';
22
+ import type HarfBuzz from '@girs/harfbuzz-0.0';
23
+ import type freetype2 from '@girs/freetype2-2.0';
24
+ import type Gio from '@girs/gio-2.0';
25
+ import type GModule from '@girs/gmodule-2.0';
26
+ import type Cogl from '@girs/cogl-15';
27
+ import type xlib from '@girs/xlib-2.0';
28
+ import type GL from '@girs/gl-1.0';
29
+ import type Clutter from '@girs/clutter-15';
30
+ import type Atk from '@girs/atk-1.0';
31
+
32
+ export namespace Cally {
33
+
34
+ /**
35
+ * Cally-15
36
+ */
37
+
38
+
39
+ /**
40
+ * Initializes the accessibility support.
41
+ * @returns `true` if accessibility support has been correctly initialized.
42
+ */
43
+ function accessibility_init(): boolean;
44
+
45
+ /**
46
+ * Returns if the accessibility support using cally is enabled.
47
+ * @returns `true` if accessibility support has been correctly initialized.
48
+ */
49
+ function get_cally_initialized(): boolean;
50
+
51
+ /**
52
+ * @param stage
53
+ * @param key
54
+ */
55
+ function snoop_key_event(stage: Clutter.Stage, key: Clutter.KeyEvent): boolean;
56
+
57
+ namespace Actor {
58
+ // Signal signatures
59
+ interface SignalSignatures extends Atk.GObjectAccessible.SignalSignatures {
60
+ "notify::accessible-component-layer": (pspec: GObject.ParamSpec) => void;
61
+ "notify::accessible-component-mdi-zorder": (pspec: GObject.ParamSpec) => void;
62
+ "notify::accessible-description": (pspec: GObject.ParamSpec) => void;
63
+ "notify::accessible-help-text": (pspec: GObject.ParamSpec) => void;
64
+ "notify::accessible-hypertext-nlinks": (pspec: GObject.ParamSpec) => void;
65
+ "notify::accessible-id": (pspec: GObject.ParamSpec) => void;
66
+ "notify::accessible-name": (pspec: GObject.ParamSpec) => void;
67
+ "notify::accessible-parent": (pspec: GObject.ParamSpec) => void;
68
+ "notify::accessible-role": (pspec: GObject.ParamSpec) => void;
69
+ "notify::accessible-table-caption": (pspec: GObject.ParamSpec) => void;
70
+ "notify::accessible-table-caption-object": (pspec: GObject.ParamSpec) => void;
71
+ "notify::accessible-table-column-description": (pspec: GObject.ParamSpec) => void;
72
+ "notify::accessible-table-column-header": (pspec: GObject.ParamSpec) => void;
73
+ "notify::accessible-table-row-description": (pspec: GObject.ParamSpec) => void;
74
+ "notify::accessible-table-row-header": (pspec: GObject.ParamSpec) => void;
75
+ "notify::accessible-table-summary": (pspec: GObject.ParamSpec) => void;
76
+ "notify::accessible-value": (pspec: GObject.ParamSpec) => void;
77
+ }
78
+
79
+ // Constructor properties interface
80
+ interface ConstructorProps extends Atk.GObjectAccessible.ConstructorProps, Atk.Component.ConstructorProps {}
81
+ }
82
+
83
+ /**
84
+ * Implementation of the ATK interfaces for {@link Clutter.Actor}
85
+ *
86
+ * {@link Cally.Actor} implements the required ATK interfaces of {@link Clutter.Actor}
87
+ * exposing the common elements on each actor (position, extents, etc).
88
+ * @gir-type Class
89
+ */
90
+ class Actor extends Atk.GObjectAccessible implements Atk.Component {
91
+ static $gtype: GObject.GType<Actor>;
92
+
93
+ /**
94
+ * Compile-time signal type information.
95
+ *
96
+ * This instance property is generated only for TypeScript type checking.
97
+ * It is not defined at runtime and should not be accessed in JS code.
98
+ * @internal
99
+ */
100
+ $signals: Actor.SignalSignatures;
101
+
102
+ // Constructors
103
+ constructor(properties?: Partial<Actor.ConstructorProps>, ...args: any[]);
104
+
105
+ _init(...args: any[]): void;
106
+
107
+ static ["new"](actor: Clutter.Actor): Actor;
108
+
109
+ // Signals
110
+ /** @signal */
111
+ connect<K extends keyof Actor.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Actor.SignalSignatures[K]>): number;
112
+ connect(signal: string, callback: (...args: any[]) => any): number;
113
+
114
+ /** @signal */
115
+ connect_after<K extends keyof Actor.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Actor.SignalSignatures[K]>): number;
116
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
117
+
118
+ /** @signal */
119
+ emit<K extends keyof Actor.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<Actor.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
120
+ emit(signal: string, ...args: any[]): void;
121
+
122
+ /**
123
+ * Checks whether the specified point is within the extent of the `component`.
124
+ *
125
+ * Toolkit implementor note: ATK provides a default implementation for
126
+ * this virtual method. In general there are little reason to
127
+ * re-implement it.
128
+ * @param x x coordinate
129
+ * @param y y coordinate
130
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
131
+ * @returns `true` or `false` indicating whether the specified point is within the extent of the `component` or not
132
+ */
133
+ contains(x: number, y: number, coord_type: Atk.CoordType): boolean;
134
+
135
+ /**
136
+ * Returns the alpha value (i.e. the opacity) for this
137
+ * `component`, on a scale from 0 (fully transparent) to 1.0
138
+ * (fully opaque).
139
+ * @returns An alpha value from 0 to 1.0, inclusive.
140
+ */
141
+ get_alpha(): number;
142
+
143
+ /**
144
+ * Gets the rectangle which gives the extent of the `component`.
145
+ *
146
+ * If the extent can not be obtained (e.g. a non-embedded plug or missing
147
+ * support), all of x, y, width, height are set to -1.
148
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
149
+ */
150
+ get_extents(coord_type: Atk.CoordType): [number, number, number, number];
151
+
152
+ /**
153
+ * Gets the layer of the component.
154
+ * @returns an {@link Atk.Layer} which is the layer of the component
155
+ */
156
+ get_layer(): Atk.Layer;
157
+
158
+ /**
159
+ * Gets the zorder of the component. The value G_MININT will be returned
160
+ * if the layer of the component is not ATK_LAYER_MDI or ATK_LAYER_WINDOW.
161
+ * @returns a gint which is the zorder of the component, i.e. the depth at which the component is shown in relation to other components in the same container.
162
+ */
163
+ get_mdi_zorder(): number;
164
+
165
+ /**
166
+ * Gets the position of `component` in the form of
167
+ * a point specifying `component`'s top-left corner.
168
+ *
169
+ * If the position can not be obtained (e.g. a non-embedded plug or missing
170
+ * support), x and y are set to -1.
171
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
172
+ */
173
+ get_position(coord_type: Atk.CoordType): [number, number];
174
+
175
+ /**
176
+ * Gets the size of the `component` in terms of width and height.
177
+ *
178
+ * If the size can not be obtained (e.g. a non-embedded plug or missing
179
+ * support), width and height are set to -1.
180
+ */
181
+ get_size(): [number, number];
182
+
183
+ /**
184
+ * Grabs focus for this `component`.
185
+ * @returns `true` if successful, `false` otherwise.
186
+ */
187
+ grab_focus(): boolean;
188
+
189
+ /**
190
+ * Gets a reference to the accessible child, if one exists, at the
191
+ * coordinate point specified by `x` and `y`.
192
+ * @param x x coordinate
193
+ * @param y y coordinate
194
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
195
+ * @returns a reference to the accessible child, if one exists
196
+ */
197
+ ref_accessible_at_point(x: number, y: number, coord_type: Atk.CoordType): Atk.Object | null;
198
+
199
+ /**
200
+ * Remove the handler specified by `handler_id` from the list of
201
+ * functions to be executed when this object receives focus events
202
+ * (in or out).
203
+ * @param handler_id the handler id of the focus handler to be removed from `component`
204
+ */
205
+ remove_focus_handler(handler_id: number): void;
206
+
207
+ /**
208
+ * Makes `component` visible on the screen by scrolling all necessary parents.
209
+ *
210
+ * Contrary to atk_component_set_position, this does not actually move
211
+ * `component` in its parent, this only makes the parents scroll so that the
212
+ * object shows up on the screen, given its current position within the parents.
213
+ * @param type specify where the object should be made visible.
214
+ * @returns whether scrolling was successful.
215
+ */
216
+ scroll_to(type: Atk.ScrollType): boolean;
217
+
218
+ /**
219
+ * Move the top-left of `component` to a given position of the screen by
220
+ * scrolling all necessary parents.
221
+ * @param coords specify whether coordinates are relative to the screen or to the parent object.
222
+ * @param x x-position where to scroll to
223
+ * @param y y-position where to scroll to
224
+ * @returns whether scrolling was successful.
225
+ */
226
+ scroll_to_point(coords: Atk.CoordType, x: number, y: number): boolean;
227
+
228
+ /**
229
+ * Sets the extents of `component`.
230
+ * @param x x coordinate
231
+ * @param y y coordinate
232
+ * @param width width to set for `component`
233
+ * @param height height to set for `component`
234
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
235
+ * @returns `true` or `false` whether the extents were set or not
236
+ */
237
+ set_extents(x: number, y: number, width: number, height: number, coord_type: Atk.CoordType): boolean;
238
+
239
+ /**
240
+ * Sets the position of `component`.
241
+ *
242
+ * Contrary to atk_component_scroll_to, this does not trigger any scrolling,
243
+ * this just moves `component` in its parent.
244
+ * @param x x coordinate
245
+ * @param y y coordinate
246
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the component's top level window
247
+ * @returns `true` or `false` whether or not the position was set or not
248
+ */
249
+ set_position(x: number, y: number, coord_type: Atk.CoordType): boolean;
250
+
251
+ /**
252
+ * Set the size of the `component` in terms of width and height.
253
+ * @param width width to set for `component`
254
+ * @param height height to set for `component`
255
+ * @returns `true` or `false` whether the size was set or not
256
+ */
257
+ set_size(width: number, height: number): boolean;
258
+
259
+ /**
260
+ * @param bounds
261
+ * @virtual
262
+ */
263
+ vfunc_bounds_changed(bounds: Atk.Rectangle): void;
264
+
265
+ /**
266
+ * Checks whether the specified point is within the extent of the `component`.
267
+ *
268
+ * Toolkit implementor note: ATK provides a default implementation for
269
+ * this virtual method. In general there are little reason to
270
+ * re-implement it.
271
+ * @param x x coordinate
272
+ * @param y y coordinate
273
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
274
+ * @virtual
275
+ */
276
+ vfunc_contains(x: number, y: number, coord_type: Atk.CoordType): boolean;
277
+
278
+ /**
279
+ * Returns the alpha value (i.e. the opacity) for this
280
+ * `component`, on a scale from 0 (fully transparent) to 1.0
281
+ * (fully opaque).
282
+ * @virtual
283
+ */
284
+ vfunc_get_alpha(): number;
285
+
286
+ /**
287
+ * Gets the rectangle which gives the extent of the `component`.
288
+ *
289
+ * If the extent can not be obtained (e.g. a non-embedded plug or missing
290
+ * support), all of x, y, width, height are set to -1.
291
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
292
+ * @virtual
293
+ */
294
+ vfunc_get_extents(coord_type: Atk.CoordType): [number, number, number, number];
295
+
296
+ /**
297
+ * Gets the layer of the component.
298
+ * @virtual
299
+ */
300
+ vfunc_get_layer(): Atk.Layer;
301
+
302
+ /**
303
+ * Gets the zorder of the component. The value G_MININT will be returned
304
+ * if the layer of the component is not ATK_LAYER_MDI or ATK_LAYER_WINDOW.
305
+ * @virtual
306
+ */
307
+ vfunc_get_mdi_zorder(): number;
308
+
309
+ /**
310
+ * Gets the position of `component` in the form of
311
+ * a point specifying `component`'s top-left corner.
312
+ *
313
+ * If the position can not be obtained (e.g. a non-embedded plug or missing
314
+ * support), x and y are set to -1.
315
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
316
+ * @virtual
317
+ */
318
+ vfunc_get_position(coord_type: Atk.CoordType): [number, number];
319
+
320
+ /**
321
+ * Gets the size of the `component` in terms of width and height.
322
+ *
323
+ * If the size can not be obtained (e.g. a non-embedded plug or missing
324
+ * support), width and height are set to -1.
325
+ * @virtual
326
+ */
327
+ vfunc_get_size(): [number, number];
328
+
329
+ /**
330
+ * Grabs focus for this `component`.
331
+ * @virtual
332
+ */
333
+ vfunc_grab_focus(): boolean;
334
+
335
+ /**
336
+ * Gets a reference to the accessible child, if one exists, at the
337
+ * coordinate point specified by `x` and `y`.
338
+ * @param x x coordinate
339
+ * @param y y coordinate
340
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
341
+ * @virtual
342
+ */
343
+ vfunc_ref_accessible_at_point(x: number, y: number, coord_type: Atk.CoordType): Atk.Object | null;
344
+
345
+ /**
346
+ * Remove the handler specified by `handler_id` from the list of
347
+ * functions to be executed when this object receives focus events
348
+ * (in or out).
349
+ * @param handler_id the handler id of the focus handler to be removed from `component`
350
+ * @virtual
351
+ */
352
+ vfunc_remove_focus_handler(handler_id: number): void;
353
+
354
+ /**
355
+ * Makes `component` visible on the screen by scrolling all necessary parents.
356
+ *
357
+ * Contrary to atk_component_set_position, this does not actually move
358
+ * `component` in its parent, this only makes the parents scroll so that the
359
+ * object shows up on the screen, given its current position within the parents.
360
+ * @param type specify where the object should be made visible.
361
+ * @virtual
362
+ */
363
+ vfunc_scroll_to(type: Atk.ScrollType): boolean;
364
+
365
+ /**
366
+ * Move the top-left of `component` to a given position of the screen by
367
+ * scrolling all necessary parents.
368
+ * @param coords specify whether coordinates are relative to the screen or to the parent object.
369
+ * @param x x-position where to scroll to
370
+ * @param y y-position where to scroll to
371
+ * @virtual
372
+ */
373
+ vfunc_scroll_to_point(coords: Atk.CoordType, x: number, y: number): boolean;
374
+
375
+ /**
376
+ * Sets the extents of `component`.
377
+ * @param x x coordinate
378
+ * @param y y coordinate
379
+ * @param width width to set for `component`
380
+ * @param height height to set for `component`
381
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
382
+ * @virtual
383
+ */
384
+ vfunc_set_extents(x: number, y: number, width: number, height: number, coord_type: Atk.CoordType): boolean;
385
+
386
+ /**
387
+ * Sets the position of `component`.
388
+ *
389
+ * Contrary to atk_component_scroll_to, this does not trigger any scrolling,
390
+ * this just moves `component` in its parent.
391
+ * @param x x coordinate
392
+ * @param y y coordinate
393
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the component's top level window
394
+ * @virtual
395
+ */
396
+ vfunc_set_position(x: number, y: number, coord_type: Atk.CoordType): boolean;
397
+
398
+ /**
399
+ * Set the size of the `component` in terms of width and height.
400
+ * @param width width to set for `component`
401
+ * @param height height to set for `component`
402
+ * @virtual
403
+ */
404
+ vfunc_set_size(width: number, height: number): boolean;
405
+ }
406
+
407
+
408
+ namespace Clone {
409
+ // Signal signatures
410
+ interface SignalSignatures extends Actor.SignalSignatures {
411
+ "notify::accessible-component-layer": (pspec: GObject.ParamSpec) => void;
412
+ "notify::accessible-component-mdi-zorder": (pspec: GObject.ParamSpec) => void;
413
+ "notify::accessible-description": (pspec: GObject.ParamSpec) => void;
414
+ "notify::accessible-help-text": (pspec: GObject.ParamSpec) => void;
415
+ "notify::accessible-hypertext-nlinks": (pspec: GObject.ParamSpec) => void;
416
+ "notify::accessible-id": (pspec: GObject.ParamSpec) => void;
417
+ "notify::accessible-name": (pspec: GObject.ParamSpec) => void;
418
+ "notify::accessible-parent": (pspec: GObject.ParamSpec) => void;
419
+ "notify::accessible-role": (pspec: GObject.ParamSpec) => void;
420
+ "notify::accessible-table-caption": (pspec: GObject.ParamSpec) => void;
421
+ "notify::accessible-table-caption-object": (pspec: GObject.ParamSpec) => void;
422
+ "notify::accessible-table-column-description": (pspec: GObject.ParamSpec) => void;
423
+ "notify::accessible-table-column-header": (pspec: GObject.ParamSpec) => void;
424
+ "notify::accessible-table-row-description": (pspec: GObject.ParamSpec) => void;
425
+ "notify::accessible-table-row-header": (pspec: GObject.ParamSpec) => void;
426
+ "notify::accessible-table-summary": (pspec: GObject.ParamSpec) => void;
427
+ "notify::accessible-value": (pspec: GObject.ParamSpec) => void;
428
+ }
429
+
430
+ // Constructor properties interface
431
+ interface ConstructorProps extends Actor.ConstructorProps, Atk.Component.ConstructorProps {}
432
+ }
433
+
434
+ /**
435
+ * Implementation of the ATK interfaces for a {@link Clutter.Clone}
436
+ *
437
+ * {@link Cally.Clone} implements the required ATK interfaces of {@link Clutter.Clone}
438
+ *
439
+ * In particular it sets a proper role for the clone, as just a image,
440
+ * as it is the sanest and simplest approach.
441
+ * @gir-type Class
442
+ */
443
+ class Clone extends Actor implements Atk.Component {
444
+ static $gtype: GObject.GType<Clone>;
445
+
446
+ /**
447
+ * Compile-time signal type information.
448
+ *
449
+ * This instance property is generated only for TypeScript type checking.
450
+ * It is not defined at runtime and should not be accessed in JS code.
451
+ * @internal
452
+ */
453
+ $signals: Clone.SignalSignatures;
454
+
455
+ // Constructors
456
+ constructor(properties?: Partial<Clone.ConstructorProps>, ...args: any[]);
457
+
458
+ _init(...args: any[]): void;
459
+
460
+ static ["new"](actor: Clutter.Actor): Clone;
461
+
462
+ // Signals
463
+ /** @signal */
464
+ connect<K extends keyof Clone.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Clone.SignalSignatures[K]>): number;
465
+ connect(signal: string, callback: (...args: any[]) => any): number;
466
+
467
+ /** @signal */
468
+ connect_after<K extends keyof Clone.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Clone.SignalSignatures[K]>): number;
469
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
470
+
471
+ /** @signal */
472
+ emit<K extends keyof Clone.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<Clone.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
473
+ emit(signal: string, ...args: any[]): void;
474
+
475
+ /**
476
+ * Checks whether the specified point is within the extent of the `component`.
477
+ *
478
+ * Toolkit implementor note: ATK provides a default implementation for
479
+ * this virtual method. In general there are little reason to
480
+ * re-implement it.
481
+ * @param x x coordinate
482
+ * @param y y coordinate
483
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
484
+ * @returns `true` or `false` indicating whether the specified point is within the extent of the `component` or not
485
+ */
486
+ contains(x: number, y: number, coord_type: Atk.CoordType): boolean;
487
+
488
+ /**
489
+ * Returns the alpha value (i.e. the opacity) for this
490
+ * `component`, on a scale from 0 (fully transparent) to 1.0
491
+ * (fully opaque).
492
+ * @returns An alpha value from 0 to 1.0, inclusive.
493
+ */
494
+ get_alpha(): number;
495
+
496
+ /**
497
+ * Gets the rectangle which gives the extent of the `component`.
498
+ *
499
+ * If the extent can not be obtained (e.g. a non-embedded plug or missing
500
+ * support), all of x, y, width, height are set to -1.
501
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
502
+ */
503
+ get_extents(coord_type: Atk.CoordType): [number, number, number, number];
504
+
505
+ /**
506
+ * Gets the layer of the component.
507
+ * @returns an {@link Atk.Layer} which is the layer of the component
508
+ */
509
+ get_layer(): Atk.Layer;
510
+
511
+ /**
512
+ * Gets the zorder of the component. The value G_MININT will be returned
513
+ * if the layer of the component is not ATK_LAYER_MDI or ATK_LAYER_WINDOW.
514
+ * @returns a gint which is the zorder of the component, i.e. the depth at which the component is shown in relation to other components in the same container.
515
+ */
516
+ get_mdi_zorder(): number;
517
+
518
+ /**
519
+ * Gets the position of `component` in the form of
520
+ * a point specifying `component`'s top-left corner.
521
+ *
522
+ * If the position can not be obtained (e.g. a non-embedded plug or missing
523
+ * support), x and y are set to -1.
524
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
525
+ */
526
+ get_position(coord_type: Atk.CoordType): [number, number];
527
+
528
+ /**
529
+ * Gets the size of the `component` in terms of width and height.
530
+ *
531
+ * If the size can not be obtained (e.g. a non-embedded plug or missing
532
+ * support), width and height are set to -1.
533
+ */
534
+ get_size(): [number, number];
535
+
536
+ /**
537
+ * Grabs focus for this `component`.
538
+ * @returns `true` if successful, `false` otherwise.
539
+ */
540
+ grab_focus(): boolean;
541
+
542
+ /**
543
+ * Gets a reference to the accessible child, if one exists, at the
544
+ * coordinate point specified by `x` and `y`.
545
+ * @param x x coordinate
546
+ * @param y y coordinate
547
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
548
+ * @returns a reference to the accessible child, if one exists
549
+ */
550
+ ref_accessible_at_point(x: number, y: number, coord_type: Atk.CoordType): Atk.Object | null;
551
+
552
+ /**
553
+ * Remove the handler specified by `handler_id` from the list of
554
+ * functions to be executed when this object receives focus events
555
+ * (in or out).
556
+ * @param handler_id the handler id of the focus handler to be removed from `component`
557
+ */
558
+ remove_focus_handler(handler_id: number): void;
559
+
560
+ /**
561
+ * Makes `component` visible on the screen by scrolling all necessary parents.
562
+ *
563
+ * Contrary to atk_component_set_position, this does not actually move
564
+ * `component` in its parent, this only makes the parents scroll so that the
565
+ * object shows up on the screen, given its current position within the parents.
566
+ * @param type specify where the object should be made visible.
567
+ * @returns whether scrolling was successful.
568
+ */
569
+ scroll_to(type: Atk.ScrollType): boolean;
570
+
571
+ /**
572
+ * Move the top-left of `component` to a given position of the screen by
573
+ * scrolling all necessary parents.
574
+ * @param coords specify whether coordinates are relative to the screen or to the parent object.
575
+ * @param x x-position where to scroll to
576
+ * @param y y-position where to scroll to
577
+ * @returns whether scrolling was successful.
578
+ */
579
+ scroll_to_point(coords: Atk.CoordType, x: number, y: number): boolean;
580
+
581
+ /**
582
+ * Sets the extents of `component`.
583
+ * @param x x coordinate
584
+ * @param y y coordinate
585
+ * @param width width to set for `component`
586
+ * @param height height to set for `component`
587
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
588
+ * @returns `true` or `false` whether the extents were set or not
589
+ */
590
+ set_extents(x: number, y: number, width: number, height: number, coord_type: Atk.CoordType): boolean;
591
+
592
+ /**
593
+ * Sets the position of `component`.
594
+ *
595
+ * Contrary to atk_component_scroll_to, this does not trigger any scrolling,
596
+ * this just moves `component` in its parent.
597
+ * @param x x coordinate
598
+ * @param y y coordinate
599
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the component's top level window
600
+ * @returns `true` or `false` whether or not the position was set or not
601
+ */
602
+ set_position(x: number, y: number, coord_type: Atk.CoordType): boolean;
603
+
604
+ /**
605
+ * Set the size of the `component` in terms of width and height.
606
+ * @param width width to set for `component`
607
+ * @param height height to set for `component`
608
+ * @returns `true` or `false` whether the size was set or not
609
+ */
610
+ set_size(width: number, height: number): boolean;
611
+
612
+ /**
613
+ * @param bounds
614
+ * @virtual
615
+ */
616
+ vfunc_bounds_changed(bounds: Atk.Rectangle): void;
617
+
618
+ /**
619
+ * Checks whether the specified point is within the extent of the `component`.
620
+ *
621
+ * Toolkit implementor note: ATK provides a default implementation for
622
+ * this virtual method. In general there are little reason to
623
+ * re-implement it.
624
+ * @param x x coordinate
625
+ * @param y y coordinate
626
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
627
+ * @virtual
628
+ */
629
+ vfunc_contains(x: number, y: number, coord_type: Atk.CoordType): boolean;
630
+
631
+ /**
632
+ * Returns the alpha value (i.e. the opacity) for this
633
+ * `component`, on a scale from 0 (fully transparent) to 1.0
634
+ * (fully opaque).
635
+ * @virtual
636
+ */
637
+ vfunc_get_alpha(): number;
638
+
639
+ /**
640
+ * Gets the rectangle which gives the extent of the `component`.
641
+ *
642
+ * If the extent can not be obtained (e.g. a non-embedded plug or missing
643
+ * support), all of x, y, width, height are set to -1.
644
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
645
+ * @virtual
646
+ */
647
+ vfunc_get_extents(coord_type: Atk.CoordType): [number, number, number, number];
648
+
649
+ /**
650
+ * Gets the layer of the component.
651
+ * @virtual
652
+ */
653
+ vfunc_get_layer(): Atk.Layer;
654
+
655
+ /**
656
+ * Gets the zorder of the component. The value G_MININT will be returned
657
+ * if the layer of the component is not ATK_LAYER_MDI or ATK_LAYER_WINDOW.
658
+ * @virtual
659
+ */
660
+ vfunc_get_mdi_zorder(): number;
661
+
662
+ /**
663
+ * Gets the position of `component` in the form of
664
+ * a point specifying `component`'s top-left corner.
665
+ *
666
+ * If the position can not be obtained (e.g. a non-embedded plug or missing
667
+ * support), x and y are set to -1.
668
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
669
+ * @virtual
670
+ */
671
+ vfunc_get_position(coord_type: Atk.CoordType): [number, number];
672
+
673
+ /**
674
+ * Gets the size of the `component` in terms of width and height.
675
+ *
676
+ * If the size can not be obtained (e.g. a non-embedded plug or missing
677
+ * support), width and height are set to -1.
678
+ * @virtual
679
+ */
680
+ vfunc_get_size(): [number, number];
681
+
682
+ /**
683
+ * Grabs focus for this `component`.
684
+ * @virtual
685
+ */
686
+ vfunc_grab_focus(): boolean;
687
+
688
+ /**
689
+ * Gets a reference to the accessible child, if one exists, at the
690
+ * coordinate point specified by `x` and `y`.
691
+ * @param x x coordinate
692
+ * @param y y coordinate
693
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
694
+ * @virtual
695
+ */
696
+ vfunc_ref_accessible_at_point(x: number, y: number, coord_type: Atk.CoordType): Atk.Object | null;
697
+
698
+ /**
699
+ * Remove the handler specified by `handler_id` from the list of
700
+ * functions to be executed when this object receives focus events
701
+ * (in or out).
702
+ * @param handler_id the handler id of the focus handler to be removed from `component`
703
+ * @virtual
704
+ */
705
+ vfunc_remove_focus_handler(handler_id: number): void;
706
+
707
+ /**
708
+ * Makes `component` visible on the screen by scrolling all necessary parents.
709
+ *
710
+ * Contrary to atk_component_set_position, this does not actually move
711
+ * `component` in its parent, this only makes the parents scroll so that the
712
+ * object shows up on the screen, given its current position within the parents.
713
+ * @param type specify where the object should be made visible.
714
+ * @virtual
715
+ */
716
+ vfunc_scroll_to(type: Atk.ScrollType): boolean;
717
+
718
+ /**
719
+ * Move the top-left of `component` to a given position of the screen by
720
+ * scrolling all necessary parents.
721
+ * @param coords specify whether coordinates are relative to the screen or to the parent object.
722
+ * @param x x-position where to scroll to
723
+ * @param y y-position where to scroll to
724
+ * @virtual
725
+ */
726
+ vfunc_scroll_to_point(coords: Atk.CoordType, x: number, y: number): boolean;
727
+
728
+ /**
729
+ * Sets the extents of `component`.
730
+ * @param x x coordinate
731
+ * @param y y coordinate
732
+ * @param width width to set for `component`
733
+ * @param height height to set for `component`
734
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
735
+ * @virtual
736
+ */
737
+ vfunc_set_extents(x: number, y: number, width: number, height: number, coord_type: Atk.CoordType): boolean;
738
+
739
+ /**
740
+ * Sets the position of `component`.
741
+ *
742
+ * Contrary to atk_component_scroll_to, this does not trigger any scrolling,
743
+ * this just moves `component` in its parent.
744
+ * @param x x coordinate
745
+ * @param y y coordinate
746
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the component's top level window
747
+ * @virtual
748
+ */
749
+ vfunc_set_position(x: number, y: number, coord_type: Atk.CoordType): boolean;
750
+
751
+ /**
752
+ * Set the size of the `component` in terms of width and height.
753
+ * @param width width to set for `component`
754
+ * @param height height to set for `component`
755
+ * @virtual
756
+ */
757
+ vfunc_set_size(width: number, height: number): boolean;
758
+ }
759
+
760
+
761
+ namespace Root {
762
+ // Signal signatures
763
+ interface SignalSignatures extends Atk.GObjectAccessible.SignalSignatures {
764
+ "notify::accessible-component-layer": (pspec: GObject.ParamSpec) => void;
765
+ "notify::accessible-component-mdi-zorder": (pspec: GObject.ParamSpec) => void;
766
+ "notify::accessible-description": (pspec: GObject.ParamSpec) => void;
767
+ "notify::accessible-help-text": (pspec: GObject.ParamSpec) => void;
768
+ "notify::accessible-hypertext-nlinks": (pspec: GObject.ParamSpec) => void;
769
+ "notify::accessible-id": (pspec: GObject.ParamSpec) => void;
770
+ "notify::accessible-name": (pspec: GObject.ParamSpec) => void;
771
+ "notify::accessible-parent": (pspec: GObject.ParamSpec) => void;
772
+ "notify::accessible-role": (pspec: GObject.ParamSpec) => void;
773
+ "notify::accessible-table-caption": (pspec: GObject.ParamSpec) => void;
774
+ "notify::accessible-table-caption-object": (pspec: GObject.ParamSpec) => void;
775
+ "notify::accessible-table-column-description": (pspec: GObject.ParamSpec) => void;
776
+ "notify::accessible-table-column-header": (pspec: GObject.ParamSpec) => void;
777
+ "notify::accessible-table-row-description": (pspec: GObject.ParamSpec) => void;
778
+ "notify::accessible-table-row-header": (pspec: GObject.ParamSpec) => void;
779
+ "notify::accessible-table-summary": (pspec: GObject.ParamSpec) => void;
780
+ "notify::accessible-value": (pspec: GObject.ParamSpec) => void;
781
+ }
782
+
783
+ // Constructor properties interface
784
+ interface ConstructorProps extends Atk.GObjectAccessible.ConstructorProps {}
785
+ }
786
+
787
+ /**
788
+ * Root object for the Cally toolkit
789
+ *
790
+ * {@link Cally.Root} is the root object of the accessibility tree-like
791
+ * hierarchy, exposing the application level.
792
+ *
793
+ * Somewhat equivalent to `GailTopLevel`. We consider that this class
794
+ * expose the a11y information of the {@link Clutter.StageManager}, as the
795
+ * children of this object are the different {@link Clutter.Stage} managed (so
796
+ * the {@link GObject.Object} used in the {@link Atk.Object.initialize} is the
797
+ * {@link Clutter.StageManager}).
798
+ * @gir-type Class
799
+ */
800
+ class Root extends Atk.GObjectAccessible {
801
+ static $gtype: GObject.GType<Root>;
802
+
803
+ /**
804
+ * Compile-time signal type information.
805
+ *
806
+ * This instance property is generated only for TypeScript type checking.
807
+ * It is not defined at runtime and should not be accessed in JS code.
808
+ * @internal
809
+ */
810
+ $signals: Root.SignalSignatures;
811
+
812
+ // Constructors
813
+ constructor(properties?: Partial<Root.ConstructorProps>, ...args: any[]);
814
+
815
+ _init(...args: any[]): void;
816
+
817
+ static ["new"](): Root;
818
+
819
+ // Signals
820
+ /** @signal */
821
+ connect<K extends keyof Root.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Root.SignalSignatures[K]>): number;
822
+ connect(signal: string, callback: (...args: any[]) => any): number;
823
+
824
+ /** @signal */
825
+ connect_after<K extends keyof Root.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Root.SignalSignatures[K]>): number;
826
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
827
+
828
+ /** @signal */
829
+ emit<K extends keyof Root.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<Root.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
830
+ emit(signal: string, ...args: any[]): void;
831
+ }
832
+
833
+
834
+ namespace Stage {
835
+ // Signal signatures
836
+ interface SignalSignatures extends Actor.SignalSignatures {
837
+ "notify::accessible-component-layer": (pspec: GObject.ParamSpec) => void;
838
+ "notify::accessible-component-mdi-zorder": (pspec: GObject.ParamSpec) => void;
839
+ "notify::accessible-description": (pspec: GObject.ParamSpec) => void;
840
+ "notify::accessible-help-text": (pspec: GObject.ParamSpec) => void;
841
+ "notify::accessible-hypertext-nlinks": (pspec: GObject.ParamSpec) => void;
842
+ "notify::accessible-id": (pspec: GObject.ParamSpec) => void;
843
+ "notify::accessible-name": (pspec: GObject.ParamSpec) => void;
844
+ "notify::accessible-parent": (pspec: GObject.ParamSpec) => void;
845
+ "notify::accessible-role": (pspec: GObject.ParamSpec) => void;
846
+ "notify::accessible-table-caption": (pspec: GObject.ParamSpec) => void;
847
+ "notify::accessible-table-caption-object": (pspec: GObject.ParamSpec) => void;
848
+ "notify::accessible-table-column-description": (pspec: GObject.ParamSpec) => void;
849
+ "notify::accessible-table-column-header": (pspec: GObject.ParamSpec) => void;
850
+ "notify::accessible-table-row-description": (pspec: GObject.ParamSpec) => void;
851
+ "notify::accessible-table-row-header": (pspec: GObject.ParamSpec) => void;
852
+ "notify::accessible-table-summary": (pspec: GObject.ParamSpec) => void;
853
+ "notify::accessible-value": (pspec: GObject.ParamSpec) => void;
854
+ }
855
+
856
+ // Constructor properties interface
857
+ interface ConstructorProps extends Actor.ConstructorProps, Atk.Component.ConstructorProps, Atk.Window.ConstructorProps {}
858
+ }
859
+
860
+ /**
861
+ * Implementation of the ATK interfaces for a {@link Clutter.Stage}
862
+ *
863
+ * {@link Cally.Stage} implements the required ATK interfaces for {@link Clutter.Stage}
864
+ *
865
+ * Some implementation details: at this moment {@link Cally.Stage} is used as
866
+ * the most similar Window object in this toolkit (ie: emitting window
867
+ * related signals), although the real purpose of {@link Clutter.Stage} is
868
+ * being a canvas. Anyway, this is required for applications using
869
+ * just clutter, or directly {@link Clutter.Stage}
870
+ * @gir-type Class
871
+ */
872
+ class Stage extends Actor implements Atk.Component, Atk.Window {
873
+ static $gtype: GObject.GType<Stage>;
874
+
875
+ /**
876
+ * Compile-time signal type information.
877
+ *
878
+ * This instance property is generated only for TypeScript type checking.
879
+ * It is not defined at runtime and should not be accessed in JS code.
880
+ * @internal
881
+ */
882
+ $signals: Stage.SignalSignatures;
883
+
884
+ // Constructors
885
+ constructor(properties?: Partial<Stage.ConstructorProps>, ...args: any[]);
886
+
887
+ _init(...args: any[]): void;
888
+
889
+ static ["new"](actor: Clutter.Actor): Stage;
890
+
891
+ // Signals
892
+ /** @signal */
893
+ connect<K extends keyof Stage.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Stage.SignalSignatures[K]>): number;
894
+ connect(signal: string, callback: (...args: any[]) => any): number;
895
+
896
+ /** @signal */
897
+ connect_after<K extends keyof Stage.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Stage.SignalSignatures[K]>): number;
898
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
899
+
900
+ /** @signal */
901
+ emit<K extends keyof Stage.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<Stage.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
902
+ emit(signal: string, ...args: any[]): void;
903
+
904
+ /**
905
+ * Checks whether the specified point is within the extent of the `component`.
906
+ *
907
+ * Toolkit implementor note: ATK provides a default implementation for
908
+ * this virtual method. In general there are little reason to
909
+ * re-implement it.
910
+ * @param x x coordinate
911
+ * @param y y coordinate
912
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
913
+ * @returns `true` or `false` indicating whether the specified point is within the extent of the `component` or not
914
+ */
915
+ contains(x: number, y: number, coord_type: Atk.CoordType): boolean;
916
+
917
+ /**
918
+ * Returns the alpha value (i.e. the opacity) for this
919
+ * `component`, on a scale from 0 (fully transparent) to 1.0
920
+ * (fully opaque).
921
+ * @returns An alpha value from 0 to 1.0, inclusive.
922
+ */
923
+ get_alpha(): number;
924
+
925
+ /**
926
+ * Gets the rectangle which gives the extent of the `component`.
927
+ *
928
+ * If the extent can not be obtained (e.g. a non-embedded plug or missing
929
+ * support), all of x, y, width, height are set to -1.
930
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
931
+ */
932
+ get_extents(coord_type: Atk.CoordType): [number, number, number, number];
933
+
934
+ /**
935
+ * Gets the layer of the component.
936
+ * @returns an {@link Atk.Layer} which is the layer of the component
937
+ */
938
+ get_layer(): Atk.Layer;
939
+
940
+ /**
941
+ * Gets the zorder of the component. The value G_MININT will be returned
942
+ * if the layer of the component is not ATK_LAYER_MDI or ATK_LAYER_WINDOW.
943
+ * @returns a gint which is the zorder of the component, i.e. the depth at which the component is shown in relation to other components in the same container.
944
+ */
945
+ get_mdi_zorder(): number;
946
+
947
+ /**
948
+ * Gets the position of `component` in the form of
949
+ * a point specifying `component`'s top-left corner.
950
+ *
951
+ * If the position can not be obtained (e.g. a non-embedded plug or missing
952
+ * support), x and y are set to -1.
953
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
954
+ */
955
+ get_position(coord_type: Atk.CoordType): [number, number];
956
+
957
+ /**
958
+ * Gets the size of the `component` in terms of width and height.
959
+ *
960
+ * If the size can not be obtained (e.g. a non-embedded plug or missing
961
+ * support), width and height are set to -1.
962
+ */
963
+ get_size(): [number, number];
964
+
965
+ /**
966
+ * Grabs focus for this `component`.
967
+ * @returns `true` if successful, `false` otherwise.
968
+ */
969
+ grab_focus(): boolean;
970
+
971
+ /**
972
+ * Gets a reference to the accessible child, if one exists, at the
973
+ * coordinate point specified by `x` and `y`.
974
+ * @param x x coordinate
975
+ * @param y y coordinate
976
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
977
+ * @returns a reference to the accessible child, if one exists
978
+ */
979
+ ref_accessible_at_point(x: number, y: number, coord_type: Atk.CoordType): Atk.Object | null;
980
+
981
+ /**
982
+ * Remove the handler specified by `handler_id` from the list of
983
+ * functions to be executed when this object receives focus events
984
+ * (in or out).
985
+ * @param handler_id the handler id of the focus handler to be removed from `component`
986
+ */
987
+ remove_focus_handler(handler_id: number): void;
988
+
989
+ /**
990
+ * Makes `component` visible on the screen by scrolling all necessary parents.
991
+ *
992
+ * Contrary to atk_component_set_position, this does not actually move
993
+ * `component` in its parent, this only makes the parents scroll so that the
994
+ * object shows up on the screen, given its current position within the parents.
995
+ * @param type specify where the object should be made visible.
996
+ * @returns whether scrolling was successful.
997
+ */
998
+ scroll_to(type: Atk.ScrollType): boolean;
999
+
1000
+ /**
1001
+ * Move the top-left of `component` to a given position of the screen by
1002
+ * scrolling all necessary parents.
1003
+ * @param coords specify whether coordinates are relative to the screen or to the parent object.
1004
+ * @param x x-position where to scroll to
1005
+ * @param y y-position where to scroll to
1006
+ * @returns whether scrolling was successful.
1007
+ */
1008
+ scroll_to_point(coords: Atk.CoordType, x: number, y: number): boolean;
1009
+
1010
+ /**
1011
+ * Sets the extents of `component`.
1012
+ * @param x x coordinate
1013
+ * @param y y coordinate
1014
+ * @param width width to set for `component`
1015
+ * @param height height to set for `component`
1016
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
1017
+ * @returns `true` or `false` whether the extents were set or not
1018
+ */
1019
+ set_extents(x: number, y: number, width: number, height: number, coord_type: Atk.CoordType): boolean;
1020
+
1021
+ /**
1022
+ * Sets the position of `component`.
1023
+ *
1024
+ * Contrary to atk_component_scroll_to, this does not trigger any scrolling,
1025
+ * this just moves `component` in its parent.
1026
+ * @param x x coordinate
1027
+ * @param y y coordinate
1028
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the component's top level window
1029
+ * @returns `true` or `false` whether or not the position was set or not
1030
+ */
1031
+ set_position(x: number, y: number, coord_type: Atk.CoordType): boolean;
1032
+
1033
+ /**
1034
+ * Set the size of the `component` in terms of width and height.
1035
+ * @param width width to set for `component`
1036
+ * @param height height to set for `component`
1037
+ * @returns `true` or `false` whether the size was set or not
1038
+ */
1039
+ set_size(width: number, height: number): boolean;
1040
+
1041
+ /**
1042
+ * @param bounds
1043
+ * @virtual
1044
+ */
1045
+ vfunc_bounds_changed(bounds: Atk.Rectangle): void;
1046
+
1047
+ /**
1048
+ * Checks whether the specified point is within the extent of the `component`.
1049
+ *
1050
+ * Toolkit implementor note: ATK provides a default implementation for
1051
+ * this virtual method. In general there are little reason to
1052
+ * re-implement it.
1053
+ * @param x x coordinate
1054
+ * @param y y coordinate
1055
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
1056
+ * @virtual
1057
+ */
1058
+ vfunc_contains(x: number, y: number, coord_type: Atk.CoordType): boolean;
1059
+
1060
+ /**
1061
+ * Returns the alpha value (i.e. the opacity) for this
1062
+ * `component`, on a scale from 0 (fully transparent) to 1.0
1063
+ * (fully opaque).
1064
+ * @virtual
1065
+ */
1066
+ vfunc_get_alpha(): number;
1067
+
1068
+ /**
1069
+ * Gets the rectangle which gives the extent of the `component`.
1070
+ *
1071
+ * If the extent can not be obtained (e.g. a non-embedded plug or missing
1072
+ * support), all of x, y, width, height are set to -1.
1073
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
1074
+ * @virtual
1075
+ */
1076
+ vfunc_get_extents(coord_type: Atk.CoordType): [number, number, number, number];
1077
+
1078
+ /**
1079
+ * Gets the layer of the component.
1080
+ * @virtual
1081
+ */
1082
+ vfunc_get_layer(): Atk.Layer;
1083
+
1084
+ /**
1085
+ * Gets the zorder of the component. The value G_MININT will be returned
1086
+ * if the layer of the component is not ATK_LAYER_MDI or ATK_LAYER_WINDOW.
1087
+ * @virtual
1088
+ */
1089
+ vfunc_get_mdi_zorder(): number;
1090
+
1091
+ /**
1092
+ * Gets the position of `component` in the form of
1093
+ * a point specifying `component`'s top-left corner.
1094
+ *
1095
+ * If the position can not be obtained (e.g. a non-embedded plug or missing
1096
+ * support), x and y are set to -1.
1097
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
1098
+ * @virtual
1099
+ */
1100
+ vfunc_get_position(coord_type: Atk.CoordType): [number, number];
1101
+
1102
+ /**
1103
+ * Gets the size of the `component` in terms of width and height.
1104
+ *
1105
+ * If the size can not be obtained (e.g. a non-embedded plug or missing
1106
+ * support), width and height are set to -1.
1107
+ * @virtual
1108
+ */
1109
+ vfunc_get_size(): [number, number];
1110
+
1111
+ /**
1112
+ * Grabs focus for this `component`.
1113
+ * @virtual
1114
+ */
1115
+ vfunc_grab_focus(): boolean;
1116
+
1117
+ /**
1118
+ * Gets a reference to the accessible child, if one exists, at the
1119
+ * coordinate point specified by `x` and `y`.
1120
+ * @param x x coordinate
1121
+ * @param y y coordinate
1122
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
1123
+ * @virtual
1124
+ */
1125
+ vfunc_ref_accessible_at_point(x: number, y: number, coord_type: Atk.CoordType): Atk.Object | null;
1126
+
1127
+ /**
1128
+ * Remove the handler specified by `handler_id` from the list of
1129
+ * functions to be executed when this object receives focus events
1130
+ * (in or out).
1131
+ * @param handler_id the handler id of the focus handler to be removed from `component`
1132
+ * @virtual
1133
+ */
1134
+ vfunc_remove_focus_handler(handler_id: number): void;
1135
+
1136
+ /**
1137
+ * Makes `component` visible on the screen by scrolling all necessary parents.
1138
+ *
1139
+ * Contrary to atk_component_set_position, this does not actually move
1140
+ * `component` in its parent, this only makes the parents scroll so that the
1141
+ * object shows up on the screen, given its current position within the parents.
1142
+ * @param type specify where the object should be made visible.
1143
+ * @virtual
1144
+ */
1145
+ vfunc_scroll_to(type: Atk.ScrollType): boolean;
1146
+
1147
+ /**
1148
+ * Move the top-left of `component` to a given position of the screen by
1149
+ * scrolling all necessary parents.
1150
+ * @param coords specify whether coordinates are relative to the screen or to the parent object.
1151
+ * @param x x-position where to scroll to
1152
+ * @param y y-position where to scroll to
1153
+ * @virtual
1154
+ */
1155
+ vfunc_scroll_to_point(coords: Atk.CoordType, x: number, y: number): boolean;
1156
+
1157
+ /**
1158
+ * Sets the extents of `component`.
1159
+ * @param x x coordinate
1160
+ * @param y y coordinate
1161
+ * @param width width to set for `component`
1162
+ * @param height height to set for `component`
1163
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
1164
+ * @virtual
1165
+ */
1166
+ vfunc_set_extents(x: number, y: number, width: number, height: number, coord_type: Atk.CoordType): boolean;
1167
+
1168
+ /**
1169
+ * Sets the position of `component`.
1170
+ *
1171
+ * Contrary to atk_component_scroll_to, this does not trigger any scrolling,
1172
+ * this just moves `component` in its parent.
1173
+ * @param x x coordinate
1174
+ * @param y y coordinate
1175
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the component's top level window
1176
+ * @virtual
1177
+ */
1178
+ vfunc_set_position(x: number, y: number, coord_type: Atk.CoordType): boolean;
1179
+
1180
+ /**
1181
+ * Set the size of the `component` in terms of width and height.
1182
+ * @param width width to set for `component`
1183
+ * @param height height to set for `component`
1184
+ * @virtual
1185
+ */
1186
+ vfunc_set_size(width: number, height: number): boolean;
1187
+ }
1188
+
1189
+
1190
+ namespace Text {
1191
+ // Signal signatures
1192
+ interface SignalSignatures extends Actor.SignalSignatures {
1193
+ "notify::accessible-component-layer": (pspec: GObject.ParamSpec) => void;
1194
+ "notify::accessible-component-mdi-zorder": (pspec: GObject.ParamSpec) => void;
1195
+ "notify::accessible-description": (pspec: GObject.ParamSpec) => void;
1196
+ "notify::accessible-help-text": (pspec: GObject.ParamSpec) => void;
1197
+ "notify::accessible-hypertext-nlinks": (pspec: GObject.ParamSpec) => void;
1198
+ "notify::accessible-id": (pspec: GObject.ParamSpec) => void;
1199
+ "notify::accessible-name": (pspec: GObject.ParamSpec) => void;
1200
+ "notify::accessible-parent": (pspec: GObject.ParamSpec) => void;
1201
+ "notify::accessible-role": (pspec: GObject.ParamSpec) => void;
1202
+ "notify::accessible-table-caption": (pspec: GObject.ParamSpec) => void;
1203
+ "notify::accessible-table-caption-object": (pspec: GObject.ParamSpec) => void;
1204
+ "notify::accessible-table-column-description": (pspec: GObject.ParamSpec) => void;
1205
+ "notify::accessible-table-column-header": (pspec: GObject.ParamSpec) => void;
1206
+ "notify::accessible-table-row-description": (pspec: GObject.ParamSpec) => void;
1207
+ "notify::accessible-table-row-header": (pspec: GObject.ParamSpec) => void;
1208
+ "notify::accessible-table-summary": (pspec: GObject.ParamSpec) => void;
1209
+ "notify::accessible-value": (pspec: GObject.ParamSpec) => void;
1210
+ }
1211
+
1212
+ // Constructor properties interface
1213
+ interface ConstructorProps extends Actor.ConstructorProps, Atk.Action.ConstructorProps, Atk.Component.ConstructorProps, Atk.EditableText.ConstructorProps, Atk.Text.ConstructorProps {}
1214
+ }
1215
+
1216
+ /**
1217
+ * Implementation of the ATK interfaces for a {@link Clutter.Text}
1218
+ *
1219
+ * {@link Cally.Text} implements the required ATK interfaces of
1220
+ * {@link Clutter.Text}, {@link Atk.Text} and {@link Atk.EditableText}
1221
+ * @gir-type Class
1222
+ */
1223
+ class Text extends Actor implements Atk.Action, Atk.Component, Atk.EditableText, Atk.Text {
1224
+ static $gtype: GObject.GType<Text>;
1225
+
1226
+ /**
1227
+ * Compile-time signal type information.
1228
+ *
1229
+ * This instance property is generated only for TypeScript type checking.
1230
+ * It is not defined at runtime and should not be accessed in JS code.
1231
+ * @internal
1232
+ */
1233
+ $signals: Text.SignalSignatures;
1234
+
1235
+ // Constructors
1236
+ constructor(properties?: Partial<Text.ConstructorProps>, ...args: any[]);
1237
+
1238
+ _init(...args: any[]): void;
1239
+
1240
+ static ["new"](actor: Clutter.Actor): Text;
1241
+
1242
+ // Signals
1243
+ /** @signal */
1244
+ connect<K extends keyof Text.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Text.SignalSignatures[K]>): number;
1245
+ connect(signal: string, callback: (...args: any[]) => any): number;
1246
+
1247
+ /** @signal */
1248
+ connect_after<K extends keyof Text.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Text.SignalSignatures[K]>): number;
1249
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
1250
+
1251
+ /** @signal */
1252
+ emit<K extends keyof Text.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<Text.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
1253
+ emit(signal: string, ...args: any[]): void;
1254
+
1255
+ /**
1256
+ * Perform the specified action on the object.
1257
+ * @param i the action index corresponding to the action to be performed
1258
+ * @returns `true` if success, `false` otherwise
1259
+ */
1260
+ do_action(i: number): boolean;
1261
+
1262
+ /**
1263
+ * Returns a description of the specified action of the object.
1264
+ * @param i the action index corresponding to the action to be performed
1265
+ * @returns a description string, or `null` if `action` does not implement this interface.
1266
+ */
1267
+ get_description(i: number): string | null;
1268
+
1269
+ /**
1270
+ * @param args
1271
+ */
1272
+ // Conflicted with Atk.Object.get_description
1273
+ get_description(...args: never[]): any;
1274
+
1275
+ /**
1276
+ * Gets the keybinding which can be used to activate this action, if one
1277
+ * exists. The string returned should contain localized, human-readable,
1278
+ * key sequences as they would appear when displayed on screen. It must
1279
+ * be in the format "mnemonic;sequence;shortcut".
1280
+ *
1281
+ * - The mnemonic key activates the object if it is presently enabled onscreen.
1282
+ * This typically corresponds to the underlined letter within the widget.
1283
+ * Example: "n" in a traditional "New..." menu item or the "a" in "Apply" for
1284
+ * a button.
1285
+ * - The sequence is the full list of keys which invoke the action even if the
1286
+ * relevant element is not currently shown on screen. For instance, for a menu
1287
+ * item the sequence is the keybindings used to open the parent menus before
1288
+ * invoking. The sequence string is colon-delimited. Example: "Alt+F:N" in a
1289
+ * traditional "New..." menu item.
1290
+ * - The shortcut, if it exists, will invoke the same action without showing
1291
+ * the component or its enclosing menus or dialogs. Example: "Ctrl+N" in a
1292
+ * traditional "New..." menu item.
1293
+ *
1294
+ * Example: For a traditional "New..." menu item, the expected return value
1295
+ * would be: "N;Alt+F:N;Ctrl+N" for the English locale and "N;Alt+D:N;Strg+N"
1296
+ * for the German locale. If, hypothetically, this menu item lacked a mnemonic,
1297
+ * it would be represented by ";;Ctrl+N" and ";;Strg+N" respectively.
1298
+ * @param i the action index corresponding to the action to be performed
1299
+ * @returns the keybinding which can be used to activate this action, or `null` if there is no keybinding for this action.
1300
+ */
1301
+ get_keybinding(i: number): string | null;
1302
+
1303
+ /**
1304
+ * Returns the localized name of the specified action of the object.
1305
+ * @param i the action index corresponding to the action to be performed
1306
+ * @returns a name string, or `null` if `action` does not implement this interface.
1307
+ */
1308
+ get_localized_name(i: number): string | null;
1309
+
1310
+ /**
1311
+ * Gets the number of accessible actions available on the object.
1312
+ * If there are more than one, the first one is considered the
1313
+ * "default" action of the object.
1314
+ * @returns a the number of actions, or 0 if `action` does not implement this interface.
1315
+ */
1316
+ get_n_actions(): number;
1317
+
1318
+ /**
1319
+ * Returns a non-localized string naming the specified action of the
1320
+ * object. This name is generally not descriptive of the end result
1321
+ * of the action, but instead names the 'interaction type' which the
1322
+ * object supports. By convention, the above strings should be used to
1323
+ * represent the actions which correspond to the common point-and-click
1324
+ * interaction techniques of the same name: i.e.
1325
+ * "click", "press", "release", "drag", "drop", "popup", etc.
1326
+ * The "popup" action should be used to pop up a context menu for the
1327
+ * object, if one exists.
1328
+ *
1329
+ * For technical reasons, some toolkits cannot guarantee that the
1330
+ * reported action is actually 'bound' to a nontrivial user event;
1331
+ * i.e. the result of some actions via `atk_action_do_action()` may be
1332
+ * NIL.
1333
+ * @param i the action index corresponding to the action to be performed
1334
+ * @returns a name string, or `null` if `action` does not implement this interface.
1335
+ */
1336
+ get_name(i: number): string | null;
1337
+
1338
+ /**
1339
+ * @param args
1340
+ */
1341
+ // Conflicted with Atk.Object.get_name
1342
+ get_name(...args: never[]): any;
1343
+
1344
+ /**
1345
+ * Sets a description of the specified action of the object.
1346
+ * @param i the action index corresponding to the action to be performed
1347
+ * @param desc the description to be assigned to this action
1348
+ * @returns a gboolean representing if the description was successfully set;
1349
+ */
1350
+ set_description(i: number, desc: string): boolean;
1351
+
1352
+ /**
1353
+ * @param args
1354
+ */
1355
+ // Conflicted with Atk.Object.set_description
1356
+ set_description(...args: never[]): any;
1357
+
1358
+ /**
1359
+ * Perform the specified action on the object.
1360
+ * @param i the action index corresponding to the action to be performed
1361
+ * @virtual
1362
+ */
1363
+ vfunc_do_action(i: number): boolean;
1364
+
1365
+ /**
1366
+ * Returns a description of the specified action of the object.
1367
+ * @param i the action index corresponding to the action to be performed
1368
+ * @virtual
1369
+ */
1370
+ vfunc_get_description(i: number): string | null;
1371
+
1372
+ /**
1373
+ * @param args
1374
+ * @virtual
1375
+ */
1376
+ // Conflicted with Atk.Object.vfunc_get_description
1377
+ vfunc_get_description(...args: never[]): any;
1378
+
1379
+ /**
1380
+ * Gets the keybinding which can be used to activate this action, if one
1381
+ * exists. The string returned should contain localized, human-readable,
1382
+ * key sequences as they would appear when displayed on screen. It must
1383
+ * be in the format "mnemonic;sequence;shortcut".
1384
+ *
1385
+ * - The mnemonic key activates the object if it is presently enabled onscreen.
1386
+ * This typically corresponds to the underlined letter within the widget.
1387
+ * Example: "n" in a traditional "New..." menu item or the "a" in "Apply" for
1388
+ * a button.
1389
+ * - The sequence is the full list of keys which invoke the action even if the
1390
+ * relevant element is not currently shown on screen. For instance, for a menu
1391
+ * item the sequence is the keybindings used to open the parent menus before
1392
+ * invoking. The sequence string is colon-delimited. Example: "Alt+F:N" in a
1393
+ * traditional "New..." menu item.
1394
+ * - The shortcut, if it exists, will invoke the same action without showing
1395
+ * the component or its enclosing menus or dialogs. Example: "Ctrl+N" in a
1396
+ * traditional "New..." menu item.
1397
+ *
1398
+ * Example: For a traditional "New..." menu item, the expected return value
1399
+ * would be: "N;Alt+F:N;Ctrl+N" for the English locale and "N;Alt+D:N;Strg+N"
1400
+ * for the German locale. If, hypothetically, this menu item lacked a mnemonic,
1401
+ * it would be represented by ";;Ctrl+N" and ";;Strg+N" respectively.
1402
+ * @param i the action index corresponding to the action to be performed
1403
+ * @virtual
1404
+ */
1405
+ vfunc_get_keybinding(i: number): string | null;
1406
+
1407
+ /**
1408
+ * Returns the localized name of the specified action of the object.
1409
+ * @param i the action index corresponding to the action to be performed
1410
+ * @virtual
1411
+ */
1412
+ vfunc_get_localized_name(i: number): string | null;
1413
+
1414
+ /**
1415
+ * Gets the number of accessible actions available on the object.
1416
+ * If there are more than one, the first one is considered the
1417
+ * "default" action of the object.
1418
+ * @virtual
1419
+ */
1420
+ vfunc_get_n_actions(): number;
1421
+
1422
+ /**
1423
+ * Returns a non-localized string naming the specified action of the
1424
+ * object. This name is generally not descriptive of the end result
1425
+ * of the action, but instead names the 'interaction type' which the
1426
+ * object supports. By convention, the above strings should be used to
1427
+ * represent the actions which correspond to the common point-and-click
1428
+ * interaction techniques of the same name: i.e.
1429
+ * "click", "press", "release", "drag", "drop", "popup", etc.
1430
+ * The "popup" action should be used to pop up a context menu for the
1431
+ * object, if one exists.
1432
+ *
1433
+ * For technical reasons, some toolkits cannot guarantee that the
1434
+ * reported action is actually 'bound' to a nontrivial user event;
1435
+ * i.e. the result of some actions via `atk_action_do_action()` may be
1436
+ * NIL.
1437
+ * @param i the action index corresponding to the action to be performed
1438
+ * @virtual
1439
+ */
1440
+ vfunc_get_name(i: number): string | null;
1441
+
1442
+ /**
1443
+ * @param args
1444
+ * @virtual
1445
+ */
1446
+ // Conflicted with Atk.Object.vfunc_get_name
1447
+ vfunc_get_name(...args: never[]): any;
1448
+
1449
+ /**
1450
+ * Sets a description of the specified action of the object.
1451
+ * @param i the action index corresponding to the action to be performed
1452
+ * @param desc the description to be assigned to this action
1453
+ * @virtual
1454
+ */
1455
+ vfunc_set_description(i: number, desc: string): boolean;
1456
+
1457
+ /**
1458
+ * @param args
1459
+ * @virtual
1460
+ */
1461
+ // Conflicted with Atk.Object.vfunc_set_description
1462
+ vfunc_set_description(...args: never[]): any;
1463
+
1464
+ /**
1465
+ * Checks whether the specified point is within the extent of the `component`.
1466
+ *
1467
+ * Toolkit implementor note: ATK provides a default implementation for
1468
+ * this virtual method. In general there are little reason to
1469
+ * re-implement it.
1470
+ * @param x x coordinate
1471
+ * @param y y coordinate
1472
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
1473
+ * @returns `true` or `false` indicating whether the specified point is within the extent of the `component` or not
1474
+ */
1475
+ contains(x: number, y: number, coord_type: Atk.CoordType): boolean;
1476
+
1477
+ /**
1478
+ * Returns the alpha value (i.e. the opacity) for this
1479
+ * `component`, on a scale from 0 (fully transparent) to 1.0
1480
+ * (fully opaque).
1481
+ * @returns An alpha value from 0 to 1.0, inclusive.
1482
+ */
1483
+ get_alpha(): number;
1484
+
1485
+ /**
1486
+ * Gets the rectangle which gives the extent of the `component`.
1487
+ *
1488
+ * If the extent can not be obtained (e.g. a non-embedded plug or missing
1489
+ * support), all of x, y, width, height are set to -1.
1490
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
1491
+ */
1492
+ get_extents(coord_type: Atk.CoordType): [number, number, number, number];
1493
+
1494
+ /**
1495
+ * Gets the layer of the component.
1496
+ * @returns an {@link Atk.Layer} which is the layer of the component
1497
+ */
1498
+ get_layer(): Atk.Layer;
1499
+
1500
+ /**
1501
+ * Gets the zorder of the component. The value G_MININT will be returned
1502
+ * if the layer of the component is not ATK_LAYER_MDI or ATK_LAYER_WINDOW.
1503
+ * @returns a gint which is the zorder of the component, i.e. the depth at which the component is shown in relation to other components in the same container.
1504
+ */
1505
+ get_mdi_zorder(): number;
1506
+
1507
+ /**
1508
+ * Gets the position of `component` in the form of
1509
+ * a point specifying `component`'s top-left corner.
1510
+ *
1511
+ * If the position can not be obtained (e.g. a non-embedded plug or missing
1512
+ * support), x and y are set to -1.
1513
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
1514
+ */
1515
+ get_position(coord_type: Atk.CoordType): [number, number];
1516
+
1517
+ /**
1518
+ * Gets the size of the `component` in terms of width and height.
1519
+ *
1520
+ * If the size can not be obtained (e.g. a non-embedded plug or missing
1521
+ * support), width and height are set to -1.
1522
+ */
1523
+ get_size(): [number, number];
1524
+
1525
+ /**
1526
+ * Grabs focus for this `component`.
1527
+ * @returns `true` if successful, `false` otherwise.
1528
+ */
1529
+ grab_focus(): boolean;
1530
+
1531
+ /**
1532
+ * Gets a reference to the accessible child, if one exists, at the
1533
+ * coordinate point specified by `x` and `y`.
1534
+ * @param x x coordinate
1535
+ * @param y y coordinate
1536
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
1537
+ * @returns a reference to the accessible child, if one exists
1538
+ */
1539
+ ref_accessible_at_point(x: number, y: number, coord_type: Atk.CoordType): Atk.Object | null;
1540
+
1541
+ /**
1542
+ * Remove the handler specified by `handler_id` from the list of
1543
+ * functions to be executed when this object receives focus events
1544
+ * (in or out).
1545
+ * @param handler_id the handler id of the focus handler to be removed from `component`
1546
+ */
1547
+ remove_focus_handler(handler_id: number): void;
1548
+
1549
+ /**
1550
+ * Makes `component` visible on the screen by scrolling all necessary parents.
1551
+ *
1552
+ * Contrary to atk_component_set_position, this does not actually move
1553
+ * `component` in its parent, this only makes the parents scroll so that the
1554
+ * object shows up on the screen, given its current position within the parents.
1555
+ * @param type specify where the object should be made visible.
1556
+ * @returns whether scrolling was successful.
1557
+ */
1558
+ scroll_to(type: Atk.ScrollType): boolean;
1559
+
1560
+ /**
1561
+ * Move the top-left of `component` to a given position of the screen by
1562
+ * scrolling all necessary parents.
1563
+ * @param coords specify whether coordinates are relative to the screen or to the parent object.
1564
+ * @param x x-position where to scroll to
1565
+ * @param y y-position where to scroll to
1566
+ * @returns whether scrolling was successful.
1567
+ */
1568
+ scroll_to_point(coords: Atk.CoordType, x: number, y: number): boolean;
1569
+
1570
+ /**
1571
+ * Sets the extents of `component`.
1572
+ * @param x x coordinate
1573
+ * @param y y coordinate
1574
+ * @param width width to set for `component`
1575
+ * @param height height to set for `component`
1576
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
1577
+ * @returns `true` or `false` whether the extents were set or not
1578
+ */
1579
+ set_extents(x: number, y: number, width: number, height: number, coord_type: Atk.CoordType): boolean;
1580
+
1581
+ /**
1582
+ * Sets the position of `component`.
1583
+ *
1584
+ * Contrary to atk_component_scroll_to, this does not trigger any scrolling,
1585
+ * this just moves `component` in its parent.
1586
+ * @param x x coordinate
1587
+ * @param y y coordinate
1588
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the component's top level window
1589
+ * @returns `true` or `false` whether or not the position was set or not
1590
+ */
1591
+ set_position(x: number, y: number, coord_type: Atk.CoordType): boolean;
1592
+
1593
+ /**
1594
+ * Set the size of the `component` in terms of width and height.
1595
+ * @param width width to set for `component`
1596
+ * @param height height to set for `component`
1597
+ * @returns `true` or `false` whether the size was set or not
1598
+ */
1599
+ set_size(width: number, height: number): boolean;
1600
+
1601
+ /**
1602
+ * @param bounds
1603
+ * @virtual
1604
+ */
1605
+ vfunc_bounds_changed(bounds: Atk.Rectangle): void;
1606
+
1607
+ /**
1608
+ * Checks whether the specified point is within the extent of the `component`.
1609
+ *
1610
+ * Toolkit implementor note: ATK provides a default implementation for
1611
+ * this virtual method. In general there are little reason to
1612
+ * re-implement it.
1613
+ * @param x x coordinate
1614
+ * @param y y coordinate
1615
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
1616
+ * @virtual
1617
+ */
1618
+ vfunc_contains(x: number, y: number, coord_type: Atk.CoordType): boolean;
1619
+
1620
+ /**
1621
+ * Returns the alpha value (i.e. the opacity) for this
1622
+ * `component`, on a scale from 0 (fully transparent) to 1.0
1623
+ * (fully opaque).
1624
+ * @virtual
1625
+ */
1626
+ vfunc_get_alpha(): number;
1627
+
1628
+ /**
1629
+ * Gets the rectangle which gives the extent of the `component`.
1630
+ *
1631
+ * If the extent can not be obtained (e.g. a non-embedded plug or missing
1632
+ * support), all of x, y, width, height are set to -1.
1633
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
1634
+ * @virtual
1635
+ */
1636
+ vfunc_get_extents(coord_type: Atk.CoordType): [number, number, number, number];
1637
+
1638
+ /**
1639
+ * Gets the layer of the component.
1640
+ * @virtual
1641
+ */
1642
+ vfunc_get_layer(): Atk.Layer;
1643
+
1644
+ /**
1645
+ * Gets the zorder of the component. The value G_MININT will be returned
1646
+ * if the layer of the component is not ATK_LAYER_MDI or ATK_LAYER_WINDOW.
1647
+ * @virtual
1648
+ */
1649
+ vfunc_get_mdi_zorder(): number;
1650
+
1651
+ /**
1652
+ * Gets the position of `component` in the form of
1653
+ * a point specifying `component`'s top-left corner.
1654
+ *
1655
+ * If the position can not be obtained (e.g. a non-embedded plug or missing
1656
+ * support), x and y are set to -1.
1657
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
1658
+ * @virtual
1659
+ */
1660
+ vfunc_get_position(coord_type: Atk.CoordType): [number, number];
1661
+
1662
+ /**
1663
+ * Gets the size of the `component` in terms of width and height.
1664
+ *
1665
+ * If the size can not be obtained (e.g. a non-embedded plug or missing
1666
+ * support), width and height are set to -1.
1667
+ * @virtual
1668
+ */
1669
+ vfunc_get_size(): [number, number];
1670
+
1671
+ /**
1672
+ * Grabs focus for this `component`.
1673
+ * @virtual
1674
+ */
1675
+ vfunc_grab_focus(): boolean;
1676
+
1677
+ /**
1678
+ * Gets a reference to the accessible child, if one exists, at the
1679
+ * coordinate point specified by `x` and `y`.
1680
+ * @param x x coordinate
1681
+ * @param y y coordinate
1682
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
1683
+ * @virtual
1684
+ */
1685
+ vfunc_ref_accessible_at_point(x: number, y: number, coord_type: Atk.CoordType): Atk.Object | null;
1686
+
1687
+ /**
1688
+ * Remove the handler specified by `handler_id` from the list of
1689
+ * functions to be executed when this object receives focus events
1690
+ * (in or out).
1691
+ * @param handler_id the handler id of the focus handler to be removed from `component`
1692
+ * @virtual
1693
+ */
1694
+ vfunc_remove_focus_handler(handler_id: number): void;
1695
+
1696
+ /**
1697
+ * Makes `component` visible on the screen by scrolling all necessary parents.
1698
+ *
1699
+ * Contrary to atk_component_set_position, this does not actually move
1700
+ * `component` in its parent, this only makes the parents scroll so that the
1701
+ * object shows up on the screen, given its current position within the parents.
1702
+ * @param type specify where the object should be made visible.
1703
+ * @virtual
1704
+ */
1705
+ vfunc_scroll_to(type: Atk.ScrollType): boolean;
1706
+
1707
+ /**
1708
+ * Move the top-left of `component` to a given position of the screen by
1709
+ * scrolling all necessary parents.
1710
+ * @param coords specify whether coordinates are relative to the screen or to the parent object.
1711
+ * @param x x-position where to scroll to
1712
+ * @param y y-position where to scroll to
1713
+ * @virtual
1714
+ */
1715
+ vfunc_scroll_to_point(coords: Atk.CoordType, x: number, y: number): boolean;
1716
+
1717
+ /**
1718
+ * Sets the extents of `component`.
1719
+ * @param x x coordinate
1720
+ * @param y y coordinate
1721
+ * @param width width to set for `component`
1722
+ * @param height height to set for `component`
1723
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
1724
+ * @virtual
1725
+ */
1726
+ vfunc_set_extents(x: number, y: number, width: number, height: number, coord_type: Atk.CoordType): boolean;
1727
+
1728
+ /**
1729
+ * Sets the position of `component`.
1730
+ *
1731
+ * Contrary to atk_component_scroll_to, this does not trigger any scrolling,
1732
+ * this just moves `component` in its parent.
1733
+ * @param x x coordinate
1734
+ * @param y y coordinate
1735
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the component's top level window
1736
+ * @virtual
1737
+ */
1738
+ vfunc_set_position(x: number, y: number, coord_type: Atk.CoordType): boolean;
1739
+
1740
+ /**
1741
+ * Set the size of the `component` in terms of width and height.
1742
+ * @param width width to set for `component`
1743
+ * @param height height to set for `component`
1744
+ * @virtual
1745
+ */
1746
+ vfunc_set_size(width: number, height: number): boolean;
1747
+
1748
+ /**
1749
+ * Copy text from `start_pos` up to, but not including `end_pos`
1750
+ * to the clipboard.
1751
+ * @param start_pos start position
1752
+ * @param end_pos end position
1753
+ */
1754
+ copy_text(start_pos: number, end_pos: number): void;
1755
+
1756
+ /**
1757
+ * Copy text from `start_pos` up to, but not including `end_pos`
1758
+ * to the clipboard and then delete from the widget.
1759
+ * @param start_pos start position
1760
+ * @param end_pos end position
1761
+ */
1762
+ cut_text(start_pos: number, end_pos: number): void;
1763
+
1764
+ /**
1765
+ * Delete text `start_pos` up to, but not including `end_pos`.
1766
+ * @param start_pos start position
1767
+ * @param end_pos end position
1768
+ */
1769
+ delete_text(start_pos: number, end_pos: number): void;
1770
+
1771
+ /**
1772
+ * Insert text at a given position.
1773
+ * @param string the text to insert
1774
+ * @param length the length of text to insert, in bytes
1775
+ * @param position The caller initializes this to the position at which to insert the text. After the call it points at the position after the newly inserted text.
1776
+ */
1777
+ insert_text(string: string, length: number, position: number): void;
1778
+
1779
+ /**
1780
+ * Paste text from clipboard to specified `position`.
1781
+ * @param position position to paste
1782
+ */
1783
+ paste_text(position: number): void;
1784
+
1785
+ /**
1786
+ * Sets the attributes for a specified range. See the ATK_ATTRIBUTE
1787
+ * macros (such as #ATK_ATTRIBUTE_LEFT_MARGIN) for examples of attributes
1788
+ * that can be set. Note that other attributes that do not have corresponding
1789
+ * ATK_ATTRIBUTE macros may also be set for certain text widgets.
1790
+ * @param attrib_set an {@link Atk.AttributeSet}
1791
+ * @param start_offset start of range in which to set attributes
1792
+ * @param end_offset end of range in which to set attributes
1793
+ * @returns `true` if attributes successfully set for the specified range, otherwise `false`
1794
+ */
1795
+ set_run_attributes(attrib_set: Atk.AttributeSet, start_offset: number, end_offset: number): boolean;
1796
+
1797
+ /**
1798
+ * Set text contents of `text`.
1799
+ * @param string string to set for text contents of `text`
1800
+ */
1801
+ set_text_contents(string: string): void;
1802
+
1803
+ /**
1804
+ * Copy text from `start_pos` up to, but not including `end_pos`
1805
+ * to the clipboard.
1806
+ * @param start_pos start position
1807
+ * @param end_pos end position
1808
+ * @virtual
1809
+ */
1810
+ vfunc_copy_text(start_pos: number, end_pos: number): void;
1811
+
1812
+ /**
1813
+ * Copy text from `start_pos` up to, but not including `end_pos`
1814
+ * to the clipboard and then delete from the widget.
1815
+ * @param start_pos start position
1816
+ * @param end_pos end position
1817
+ * @virtual
1818
+ */
1819
+ vfunc_cut_text(start_pos: number, end_pos: number): void;
1820
+
1821
+ /**
1822
+ * Delete text `start_pos` up to, but not including `end_pos`.
1823
+ * @param start_pos start position
1824
+ * @param end_pos end position
1825
+ * @virtual
1826
+ */
1827
+ vfunc_delete_text(start_pos: number, end_pos: number): void;
1828
+
1829
+ /**
1830
+ * Insert text at a given position.
1831
+ * @param string the text to insert
1832
+ * @param length the length of text to insert, in bytes
1833
+ * @param position The caller initializes this to the position at which to insert the text. After the call it points at the position after the newly inserted text.
1834
+ * @virtual
1835
+ */
1836
+ vfunc_insert_text(string: string, length: number, position: number): void;
1837
+
1838
+ /**
1839
+ * Paste text from clipboard to specified `position`.
1840
+ * @param position position to paste
1841
+ * @virtual
1842
+ */
1843
+ vfunc_paste_text(position: number): void;
1844
+
1845
+ /**
1846
+ * Sets the attributes for a specified range. See the ATK_ATTRIBUTE
1847
+ * macros (such as #ATK_ATTRIBUTE_LEFT_MARGIN) for examples of attributes
1848
+ * that can be set. Note that other attributes that do not have corresponding
1849
+ * ATK_ATTRIBUTE macros may also be set for certain text widgets.
1850
+ * @param attrib_set an {@link Atk.AttributeSet}
1851
+ * @param start_offset start of range in which to set attributes
1852
+ * @param end_offset end of range in which to set attributes
1853
+ * @virtual
1854
+ */
1855
+ vfunc_set_run_attributes(attrib_set: Atk.AttributeSet, start_offset: number, end_offset: number): boolean;
1856
+
1857
+ /**
1858
+ * Set text contents of `text`.
1859
+ * @param string string to set for text contents of `text`
1860
+ * @virtual
1861
+ */
1862
+ vfunc_set_text_contents(string: string): void;
1863
+
1864
+ /**
1865
+ * Adds a selection bounded by the specified offsets.
1866
+ * @param start_offset the starting character offset of the selected region
1867
+ * @param end_offset the offset of the first character after the selected region.
1868
+ * @returns `true` if successful, `false` otherwise
1869
+ */
1870
+ add_selection(start_offset: number, end_offset: number): boolean;
1871
+
1872
+ /**
1873
+ * Get the ranges of text in the specified bounding box.
1874
+ * @param rect An AtkTextRectangle giving the dimensions of the bounding box.
1875
+ * @param coord_type Specify whether coordinates are relative to the screen or widget window.
1876
+ * @param x_clip_type Specify the horizontal clip type.
1877
+ * @param y_clip_type Specify the vertical clip type.
1878
+ * @returns Array of AtkTextRange. The last element of the array returned by this function will be NULL.
1879
+ */
1880
+ get_bounded_ranges(rect: Atk.TextRectangle, coord_type: Atk.CoordType, x_clip_type: Atk.TextClipType, y_clip_type: Atk.TextClipType): Atk.TextRange[];
1881
+
1882
+ /**
1883
+ * Gets the offset of the position of the caret (cursor).
1884
+ * @returns the character offset of the position of the caret or -1 if the caret is not located inside the element or in the case of any other failure.
1885
+ */
1886
+ get_caret_offset(): number;
1887
+
1888
+ /**
1889
+ * Gets the specified text.
1890
+ * @param offset a character offset within `text`
1891
+ * @returns the character at `offset` or 0 in the case of failure.
1892
+ */
1893
+ get_character_at_offset(offset: number): string;
1894
+
1895
+ /**
1896
+ * Gets the character count.
1897
+ * @returns the number of characters or -1 in case of failure.
1898
+ */
1899
+ get_character_count(): number;
1900
+
1901
+ /**
1902
+ * If the extent can not be obtained (e.g. missing support), all of x, y, width,
1903
+ * height are set to -1.
1904
+ *
1905
+ * Get the bounding box containing the glyph representing the character at
1906
+ * a particular text offset.
1907
+ * @param offset The offset of the text character for which bounding information is required.
1908
+ * @param coords specify whether coordinates are relative to the screen or widget window
1909
+ */
1910
+ get_character_extents(offset: number, coords: Atk.CoordType): [number, number, number, number];
1911
+
1912
+ /**
1913
+ * Creates an {@link Atk.AttributeSet} which consists of the default values of
1914
+ * attributes for the text. See the enum AtkTextAttribute for types of text
1915
+ * attributes that can be returned. Note that other attributes may also be
1916
+ * returned.
1917
+ * @returns an {@link Atk.AttributeSet} which contains the default text attributes for this {@link Atk.Text}. This {@link Atk.AttributeSet} should be freed by a call to `atk_attribute_set_free()`.
1918
+ */
1919
+ get_default_attributes(): Atk.AttributeSet;
1920
+
1921
+ /**
1922
+ * Gets the number of selected regions.
1923
+ * @returns The number of selected regions, or -1 in the case of failure.
1924
+ */
1925
+ get_n_selections(): number;
1926
+
1927
+ /**
1928
+ * Gets the offset of the character located at coordinates `x` and `y`. `x` and `y`
1929
+ * are interpreted as being relative to the screen or this widget's window
1930
+ * depending on `coords`.
1931
+ * @param x screen x-position of character
1932
+ * @param y screen y-position of character
1933
+ * @param coords specify whether coordinates are relative to the screen or widget window
1934
+ * @returns the offset to the character which is located at the specified `x` and `y` coordinates of -1 in case of failure.
1935
+ */
1936
+ get_offset_at_point(x: number, y: number, coords: Atk.CoordType): number;
1937
+
1938
+ /**
1939
+ * Get the bounding box for text within the specified range.
1940
+ *
1941
+ * If the extents can not be obtained (e.g. or missing support), the rectangle
1942
+ * fields are set to -1.
1943
+ * @param start_offset The offset of the first text character for which boundary information is required.
1944
+ * @param end_offset The offset of the text character after the last character for which boundary information is required.
1945
+ * @param coord_type Specify whether coordinates are relative to the screen or widget window.
1946
+ */
1947
+ get_range_extents(start_offset: number, end_offset: number, coord_type: Atk.CoordType): Atk.TextRectangle;
1948
+
1949
+ /**
1950
+ * Creates an {@link Atk.AttributeSet} which consists of the attributes explicitly
1951
+ * set at the position `offset` in the text. `start_offset` and `end_offset` are
1952
+ * set to the start and end of the range around `offset` where the attributes are
1953
+ * invariant. Note that `end_offset` is the offset of the first character
1954
+ * after the range. See the enum AtkTextAttribute for types of text
1955
+ * attributes that can be returned. Note that other attributes may also be
1956
+ * returned.
1957
+ * @param offset the character offset at which to get the attributes, -1 means the offset of the character to be inserted at the caret location.
1958
+ * @returns an {@link Atk.AttributeSet} which contains the attributes explicitly set at `offset`. This {@link Atk.AttributeSet} should be freed by a call to `atk_attribute_set_free()`.
1959
+ */
1960
+ get_run_attributes(offset: number): [Atk.AttributeSet, number, number];
1961
+
1962
+ /**
1963
+ * Gets the text from the specified selection.
1964
+ * @param selection_num The selection number. The selected regions are assigned numbers that correspond to how far the region is from the start of the text. The selected region closest to the beginning of the text region is assigned the number 0, etc. Note that adding, moving or deleting a selected region can change the numbering.
1965
+ * @returns a newly allocated string containing the selected text. Use `g_free()` to free the returned string.
1966
+ */
1967
+ get_selection(selection_num: number): [string, number, number];
1968
+
1969
+ /**
1970
+ * Gets a portion of the text exposed through an {@link Atk.Text} according to a given `offset`
1971
+ * and a specific `granularity`, along with the start and end offsets defining the
1972
+ * boundaries of such a portion of text.
1973
+ *
1974
+ * If `granularity` is ATK_TEXT_GRANULARITY_CHAR the character at the
1975
+ * offset is returned.
1976
+ *
1977
+ * If `granularity` is ATK_TEXT_GRANULARITY_WORD the returned string
1978
+ * is from the word start at or before the offset to the word start after
1979
+ * the offset.
1980
+ *
1981
+ * The returned string will contain the word at the offset if the offset
1982
+ * is inside a word and will contain the word before the offset if the
1983
+ * offset is not inside a word.
1984
+ *
1985
+ * If `granularity` is ATK_TEXT_GRANULARITY_SENTENCE the returned string
1986
+ * is from the sentence start at or before the offset to the sentence
1987
+ * start after the offset.
1988
+ *
1989
+ * The returned string will contain the sentence at the offset if the offset
1990
+ * is inside a sentence and will contain the sentence before the offset
1991
+ * if the offset is not inside a sentence.
1992
+ *
1993
+ * If `granularity` is ATK_TEXT_GRANULARITY_LINE the returned string
1994
+ * is from the line start at or before the offset to the line
1995
+ * start after the offset.
1996
+ *
1997
+ * If `granularity` is ATK_TEXT_GRANULARITY_PARAGRAPH the returned string
1998
+ * is from the start of the paragraph at or before the offset to the start
1999
+ * of the following paragraph after the offset.
2000
+ * @param offset position
2001
+ * @param granularity An {@link Atk.TextGranularity}
2002
+ * @returns a newly allocated string containing the text at the `offset` bounded by the specified `granularity`. Use `g_free()` to free the returned string. Returns `null` if the offset is invalid or no implementation is available.
2003
+ */
2004
+ get_string_at_offset(offset: number, granularity: Atk.TextGranularity): [string | null, number, number];
2005
+
2006
+ /**
2007
+ * Gets the specified text.
2008
+ * @param start_offset a starting character offset within `text`
2009
+ * @param end_offset an ending character offset within `text`, or -1 for the end of the string.
2010
+ * @returns a newly allocated string containing the text from `start_offset` up to, but not including `end_offset`. Use `g_free()` to free the returned string.
2011
+ */
2012
+ get_text(start_offset: number, end_offset: number): string;
2013
+
2014
+ /**
2015
+ * Gets the specified text.
2016
+ * @param offset position
2017
+ * @param boundary_type An {@link Atk.TextBoundary}
2018
+ * @returns a newly allocated string containing the text after `offset` bounded by the specified `boundary_type`. Use `g_free()` to free the returned string.
2019
+ */
2020
+ get_text_after_offset(offset: number, boundary_type: Atk.TextBoundary): [string, number, number];
2021
+
2022
+ /**
2023
+ * Gets the specified text.
2024
+ *
2025
+ * If the boundary_type if ATK_TEXT_BOUNDARY_CHAR the character at the
2026
+ * offset is returned.
2027
+ *
2028
+ * If the boundary_type is ATK_TEXT_BOUNDARY_WORD_START the returned string
2029
+ * is from the word start at or before the offset to the word start after
2030
+ * the offset.
2031
+ *
2032
+ * The returned string will contain the word at the offset if the offset
2033
+ * is inside a word and will contain the word before the offset if the
2034
+ * offset is not inside a word.
2035
+ *
2036
+ * If the boundary type is ATK_TEXT_BOUNDARY_SENTENCE_START the returned
2037
+ * string is from the sentence start at or before the offset to the sentence
2038
+ * start after the offset.
2039
+ *
2040
+ * The returned string will contain the sentence at the offset if the offset
2041
+ * is inside a sentence and will contain the sentence before the offset
2042
+ * if the offset is not inside a sentence.
2043
+ *
2044
+ * If the boundary type is ATK_TEXT_BOUNDARY_LINE_START the returned
2045
+ * string is from the line start at or before the offset to the line
2046
+ * start after the offset.
2047
+ * @param offset position
2048
+ * @param boundary_type An {@link Atk.TextBoundary}
2049
+ * @returns a newly allocated string containing the text at `offset` bounded by the specified `boundary_type`. Use `g_free()` to free the returned string.
2050
+ */
2051
+ get_text_at_offset(offset: number, boundary_type: Atk.TextBoundary): [string, number, number];
2052
+
2053
+ /**
2054
+ * Gets the specified text.
2055
+ * @param offset position
2056
+ * @param boundary_type An {@link Atk.TextBoundary}
2057
+ * @returns a newly allocated string containing the text before `offset` bounded by the specified `boundary_type`. Use `g_free()` to free the returned string.
2058
+ */
2059
+ get_text_before_offset(offset: number, boundary_type: Atk.TextBoundary): [string, number, number];
2060
+
2061
+ /**
2062
+ * Removes the specified selection.
2063
+ * @param selection_num The selection number. The selected regions are assigned numbers that correspond to how far the region is from the start of the text. The selected region closest to the beginning of the text region is assigned the number 0, etc. Note that adding, moving or deleting a selected region can change the numbering.
2064
+ * @returns `true` if successful, `false` otherwise
2065
+ */
2066
+ remove_selection(selection_num: number): boolean;
2067
+
2068
+ /**
2069
+ * Makes a substring of `text` visible on the screen by scrolling all necessary parents.
2070
+ * @param start_offset start offset in the `text`
2071
+ * @param end_offset end offset in the `text`, or -1 for the end of the text.
2072
+ * @param type specify where the object should be made visible.
2073
+ * @returns whether scrolling was successful.
2074
+ */
2075
+ scroll_substring_to(start_offset: number, end_offset: number, type: Atk.ScrollType): boolean;
2076
+
2077
+ /**
2078
+ * Move the top-left of a substring of `text` to a given position of the screen
2079
+ * by scrolling all necessary parents.
2080
+ * @param start_offset start offset in the `text`
2081
+ * @param end_offset end offset in the `text`, or -1 for the end of the text.
2082
+ * @param coords specify whether coordinates are relative to the screen or to the parent object.
2083
+ * @param x x-position where to scroll to
2084
+ * @param y y-position where to scroll to
2085
+ * @returns whether scrolling was successful.
2086
+ */
2087
+ scroll_substring_to_point(start_offset: number, end_offset: number, coords: Atk.CoordType, x: number, y: number): boolean;
2088
+
2089
+ /**
2090
+ * Sets the caret (cursor) position to the specified `offset`.
2091
+ *
2092
+ * In the case of rich-text content, this method should either grab focus
2093
+ * or move the sequential focus navigation starting point (if the application
2094
+ * supports this concept) as if the user had clicked on the new caret position.
2095
+ * Typically, this means that the target of this operation is the node containing
2096
+ * the new caret position or one of its ancestors. In other words, after this
2097
+ * method is called, if the user advances focus, it should move to the first
2098
+ * focusable node following the new caret position.
2099
+ *
2100
+ * Calling this method should also scroll the application viewport in a way
2101
+ * that matches the behavior of the application's typical caret motion or tab
2102
+ * navigation as closely as possible. This also means that if the application's
2103
+ * caret motion or focus navigation does not trigger a scroll operation, this
2104
+ * method should not trigger one either. If the application does not have a caret
2105
+ * motion or focus navigation operation, this method should try to scroll the new
2106
+ * caret position into view while minimizing unnecessary scroll motion.
2107
+ * @param offset the character offset of the new caret position
2108
+ * @returns `true` if successful, `false` otherwise.
2109
+ */
2110
+ set_caret_offset(offset: number): boolean;
2111
+
2112
+ /**
2113
+ * Changes the start and end offset of the specified selection.
2114
+ * @param selection_num The selection number. The selected regions are assigned numbers that correspond to how far the region is from the start of the text. The selected region closest to the beginning of the text region is assigned the number 0, etc. Note that adding, moving or deleting a selected region can change the numbering.
2115
+ * @param start_offset the new starting character offset of the selection
2116
+ * @param end_offset the new end position of (e.g. offset immediately past) the selection
2117
+ * @returns `true` if successful, `false` otherwise
2118
+ */
2119
+ set_selection(selection_num: number, start_offset: number, end_offset: number): boolean;
2120
+
2121
+ /**
2122
+ * Adds a selection bounded by the specified offsets.
2123
+ * @param start_offset the starting character offset of the selected region
2124
+ * @param end_offset the offset of the first character after the selected region.
2125
+ * @virtual
2126
+ */
2127
+ vfunc_add_selection(start_offset: number, end_offset: number): boolean;
2128
+
2129
+ /**
2130
+ * Get the ranges of text in the specified bounding box.
2131
+ * @param rect An AtkTextRectangle giving the dimensions of the bounding box.
2132
+ * @param coord_type Specify whether coordinates are relative to the screen or widget window.
2133
+ * @param x_clip_type Specify the horizontal clip type.
2134
+ * @param y_clip_type Specify the vertical clip type.
2135
+ * @virtual
2136
+ */
2137
+ vfunc_get_bounded_ranges(rect: Atk.TextRectangle, coord_type: Atk.CoordType, x_clip_type: Atk.TextClipType, y_clip_type: Atk.TextClipType): Atk.TextRange[];
2138
+
2139
+ /**
2140
+ * Gets the offset of the position of the caret (cursor).
2141
+ * @virtual
2142
+ */
2143
+ vfunc_get_caret_offset(): number;
2144
+
2145
+ /**
2146
+ * Gets the specified text.
2147
+ * @param offset a character offset within `text`
2148
+ * @virtual
2149
+ */
2150
+ vfunc_get_character_at_offset(offset: number): string;
2151
+
2152
+ /**
2153
+ * Gets the character count.
2154
+ * @virtual
2155
+ */
2156
+ vfunc_get_character_count(): number;
2157
+
2158
+ /**
2159
+ * If the extent can not be obtained (e.g. missing support), all of x, y, width,
2160
+ * height are set to -1.
2161
+ *
2162
+ * Get the bounding box containing the glyph representing the character at
2163
+ * a particular text offset.
2164
+ * @param offset The offset of the text character for which bounding information is required.
2165
+ * @param coords specify whether coordinates are relative to the screen or widget window
2166
+ * @virtual
2167
+ */
2168
+ vfunc_get_character_extents(offset: number, coords: Atk.CoordType): [number, number, number, number];
2169
+
2170
+ /**
2171
+ * Creates an {@link Atk.AttributeSet} which consists of the default values of
2172
+ * attributes for the text. See the enum AtkTextAttribute for types of text
2173
+ * attributes that can be returned. Note that other attributes may also be
2174
+ * returned.
2175
+ * @virtual
2176
+ */
2177
+ vfunc_get_default_attributes(): Atk.AttributeSet;
2178
+
2179
+ /**
2180
+ * Gets the number of selected regions.
2181
+ * @virtual
2182
+ */
2183
+ vfunc_get_n_selections(): number;
2184
+
2185
+ /**
2186
+ * Gets the offset of the character located at coordinates `x` and `y`. `x` and `y`
2187
+ * are interpreted as being relative to the screen or this widget's window
2188
+ * depending on `coords`.
2189
+ * @param x screen x-position of character
2190
+ * @param y screen y-position of character
2191
+ * @param coords specify whether coordinates are relative to the screen or widget window
2192
+ * @virtual
2193
+ */
2194
+ vfunc_get_offset_at_point(x: number, y: number, coords: Atk.CoordType): number;
2195
+
2196
+ /**
2197
+ * Get the bounding box for text within the specified range.
2198
+ *
2199
+ * If the extents can not be obtained (e.g. or missing support), the rectangle
2200
+ * fields are set to -1.
2201
+ * @param start_offset The offset of the first text character for which boundary information is required.
2202
+ * @param end_offset The offset of the text character after the last character for which boundary information is required.
2203
+ * @param coord_type Specify whether coordinates are relative to the screen or widget window.
2204
+ * @virtual
2205
+ */
2206
+ vfunc_get_range_extents(start_offset: number, end_offset: number, coord_type: Atk.CoordType): Atk.TextRectangle;
2207
+
2208
+ /**
2209
+ * Creates an {@link Atk.AttributeSet} which consists of the attributes explicitly
2210
+ * set at the position `offset` in the text. `start_offset` and `end_offset` are
2211
+ * set to the start and end of the range around `offset` where the attributes are
2212
+ * invariant. Note that `end_offset` is the offset of the first character
2213
+ * after the range. See the enum AtkTextAttribute for types of text
2214
+ * attributes that can be returned. Note that other attributes may also be
2215
+ * returned.
2216
+ * @param offset the character offset at which to get the attributes, -1 means the offset of the character to be inserted at the caret location.
2217
+ * @virtual
2218
+ */
2219
+ vfunc_get_run_attributes(offset: number): [Atk.AttributeSet, number, number];
2220
+
2221
+ /**
2222
+ * Gets the text from the specified selection.
2223
+ * @param selection_num The selection number. The selected regions are assigned numbers that correspond to how far the region is from the start of the text. The selected region closest to the beginning of the text region is assigned the number 0, etc. Note that adding, moving or deleting a selected region can change the numbering.
2224
+ * @virtual
2225
+ */
2226
+ vfunc_get_selection(selection_num: number): [string, number, number];
2227
+
2228
+ /**
2229
+ * Gets a portion of the text exposed through an {@link Atk.Text} according to a given `offset`
2230
+ * and a specific `granularity`, along with the start and end offsets defining the
2231
+ * boundaries of such a portion of text.
2232
+ *
2233
+ * If `granularity` is ATK_TEXT_GRANULARITY_CHAR the character at the
2234
+ * offset is returned.
2235
+ *
2236
+ * If `granularity` is ATK_TEXT_GRANULARITY_WORD the returned string
2237
+ * is from the word start at or before the offset to the word start after
2238
+ * the offset.
2239
+ *
2240
+ * The returned string will contain the word at the offset if the offset
2241
+ * is inside a word and will contain the word before the offset if the
2242
+ * offset is not inside a word.
2243
+ *
2244
+ * If `granularity` is ATK_TEXT_GRANULARITY_SENTENCE the returned string
2245
+ * is from the sentence start at or before the offset to the sentence
2246
+ * start after the offset.
2247
+ *
2248
+ * The returned string will contain the sentence at the offset if the offset
2249
+ * is inside a sentence and will contain the sentence before the offset
2250
+ * if the offset is not inside a sentence.
2251
+ *
2252
+ * If `granularity` is ATK_TEXT_GRANULARITY_LINE the returned string
2253
+ * is from the line start at or before the offset to the line
2254
+ * start after the offset.
2255
+ *
2256
+ * If `granularity` is ATK_TEXT_GRANULARITY_PARAGRAPH the returned string
2257
+ * is from the start of the paragraph at or before the offset to the start
2258
+ * of the following paragraph after the offset.
2259
+ * @param offset position
2260
+ * @param granularity An {@link Atk.TextGranularity}
2261
+ * @virtual
2262
+ */
2263
+ vfunc_get_string_at_offset(offset: number, granularity: Atk.TextGranularity): [string | null, number, number];
2264
+
2265
+ /**
2266
+ * Gets the specified text.
2267
+ * @param start_offset a starting character offset within `text`
2268
+ * @param end_offset an ending character offset within `text`, or -1 for the end of the string.
2269
+ * @virtual
2270
+ */
2271
+ vfunc_get_text(start_offset: number, end_offset: number): string;
2272
+
2273
+ /**
2274
+ * Gets the specified text.
2275
+ * @param offset position
2276
+ * @param boundary_type An {@link Atk.TextBoundary}
2277
+ * @virtual
2278
+ */
2279
+ vfunc_get_text_after_offset(offset: number, boundary_type: Atk.TextBoundary): [string, number, number];
2280
+
2281
+ /**
2282
+ * Gets the specified text.
2283
+ *
2284
+ * If the boundary_type if ATK_TEXT_BOUNDARY_CHAR the character at the
2285
+ * offset is returned.
2286
+ *
2287
+ * If the boundary_type is ATK_TEXT_BOUNDARY_WORD_START the returned string
2288
+ * is from the word start at or before the offset to the word start after
2289
+ * the offset.
2290
+ *
2291
+ * The returned string will contain the word at the offset if the offset
2292
+ * is inside a word and will contain the word before the offset if the
2293
+ * offset is not inside a word.
2294
+ *
2295
+ * If the boundary type is ATK_TEXT_BOUNDARY_SENTENCE_START the returned
2296
+ * string is from the sentence start at or before the offset to the sentence
2297
+ * start after the offset.
2298
+ *
2299
+ * The returned string will contain the sentence at the offset if the offset
2300
+ * is inside a sentence and will contain the sentence before the offset
2301
+ * if the offset is not inside a sentence.
2302
+ *
2303
+ * If the boundary type is ATK_TEXT_BOUNDARY_LINE_START the returned
2304
+ * string is from the line start at or before the offset to the line
2305
+ * start after the offset.
2306
+ * @param offset position
2307
+ * @param boundary_type An {@link Atk.TextBoundary}
2308
+ * @virtual
2309
+ */
2310
+ vfunc_get_text_at_offset(offset: number, boundary_type: Atk.TextBoundary): [string, number, number];
2311
+
2312
+ /**
2313
+ * Gets the specified text.
2314
+ * @param offset position
2315
+ * @param boundary_type An {@link Atk.TextBoundary}
2316
+ * @virtual
2317
+ */
2318
+ vfunc_get_text_before_offset(offset: number, boundary_type: Atk.TextBoundary): [string, number, number];
2319
+
2320
+ /**
2321
+ * Removes the specified selection.
2322
+ * @param selection_num The selection number. The selected regions are assigned numbers that correspond to how far the region is from the start of the text. The selected region closest to the beginning of the text region is assigned the number 0, etc. Note that adding, moving or deleting a selected region can change the numbering.
2323
+ * @virtual
2324
+ */
2325
+ vfunc_remove_selection(selection_num: number): boolean;
2326
+
2327
+ /**
2328
+ * Makes a substring of `text` visible on the screen by scrolling all necessary parents.
2329
+ * @param start_offset start offset in the `text`
2330
+ * @param end_offset end offset in the `text`, or -1 for the end of the text.
2331
+ * @param type specify where the object should be made visible.
2332
+ * @virtual
2333
+ */
2334
+ vfunc_scroll_substring_to(start_offset: number, end_offset: number, type: Atk.ScrollType): boolean;
2335
+
2336
+ /**
2337
+ * Move the top-left of a substring of `text` to a given position of the screen
2338
+ * by scrolling all necessary parents.
2339
+ * @param start_offset start offset in the `text`
2340
+ * @param end_offset end offset in the `text`, or -1 for the end of the text.
2341
+ * @param coords specify whether coordinates are relative to the screen or to the parent object.
2342
+ * @param x x-position where to scroll to
2343
+ * @param y y-position where to scroll to
2344
+ * @virtual
2345
+ */
2346
+ vfunc_scroll_substring_to_point(start_offset: number, end_offset: number, coords: Atk.CoordType, x: number, y: number): boolean;
2347
+
2348
+ /**
2349
+ * Sets the caret (cursor) position to the specified `offset`.
2350
+ *
2351
+ * In the case of rich-text content, this method should either grab focus
2352
+ * or move the sequential focus navigation starting point (if the application
2353
+ * supports this concept) as if the user had clicked on the new caret position.
2354
+ * Typically, this means that the target of this operation is the node containing
2355
+ * the new caret position or one of its ancestors. In other words, after this
2356
+ * method is called, if the user advances focus, it should move to the first
2357
+ * focusable node following the new caret position.
2358
+ *
2359
+ * Calling this method should also scroll the application viewport in a way
2360
+ * that matches the behavior of the application's typical caret motion or tab
2361
+ * navigation as closely as possible. This also means that if the application's
2362
+ * caret motion or focus navigation does not trigger a scroll operation, this
2363
+ * method should not trigger one either. If the application does not have a caret
2364
+ * motion or focus navigation operation, this method should try to scroll the new
2365
+ * caret position into view while minimizing unnecessary scroll motion.
2366
+ * @param offset the character offset of the new caret position
2367
+ * @virtual
2368
+ */
2369
+ vfunc_set_caret_offset(offset: number): boolean;
2370
+
2371
+ /**
2372
+ * Changes the start and end offset of the specified selection.
2373
+ * @param selection_num The selection number. The selected regions are assigned numbers that correspond to how far the region is from the start of the text. The selected region closest to the beginning of the text region is assigned the number 0, etc. Note that adding, moving or deleting a selected region can change the numbering.
2374
+ * @param start_offset the new starting character offset of the selection
2375
+ * @param end_offset the new end position of (e.g. offset immediately past) the selection
2376
+ * @virtual
2377
+ */
2378
+ vfunc_set_selection(selection_num: number, start_offset: number, end_offset: number): boolean;
2379
+
2380
+ /**
2381
+ * @virtual
2382
+ */
2383
+ vfunc_text_attributes_changed(): void;
2384
+
2385
+ /**
2386
+ * @param location
2387
+ * @virtual
2388
+ */
2389
+ vfunc_text_caret_moved(location: number): void;
2390
+
2391
+ /**
2392
+ * the signal handler which is executed when there is a
2393
+ * text change. This virtual function is deprecated sice 2.9.4 and
2394
+ * it should not be overriden.
2395
+ * @param position
2396
+ * @param length
2397
+ * @virtual
2398
+ */
2399
+ vfunc_text_changed(position: number, length: number): void;
2400
+
2401
+ /**
2402
+ * @virtual
2403
+ */
2404
+ vfunc_text_selection_changed(): void;
2405
+ }
2406
+
2407
+
2408
+ namespace Util {
2409
+ // Signal signatures
2410
+ interface SignalSignatures extends Atk.Util.SignalSignatures {}
2411
+
2412
+ // Constructor properties interface
2413
+ interface ConstructorProps extends Atk.Util.ConstructorProps {}
2414
+ }
2415
+
2416
+ /**
2417
+ * {@link Atk.Util} implementation
2418
+ *
2419
+ * {@link Cally.Util} implements {@link Atk.Util} abstract methods. Although it
2420
+ * includes the name "Util" it is in fact one of the most important
2421
+ * interfaces to be implemented in any ATK toolkit implementation.
2422
+ *
2423
+ * For instance, it defines {@link Atk.get_root}, the method that returns
2424
+ * the root object in the hierarchy. Without it, you don't have
2425
+ * available any accessible object.
2426
+ * @gir-type Class
2427
+ */
2428
+ class Util extends Atk.Util {
2429
+ static $gtype: GObject.GType<Util>;
2430
+
2431
+ /**
2432
+ * Compile-time signal type information.
2433
+ *
2434
+ * This instance property is generated only for TypeScript type checking.
2435
+ * It is not defined at runtime and should not be accessed in JS code.
2436
+ * @internal
2437
+ */
2438
+ $signals: Util.SignalSignatures;
2439
+
2440
+ // Constructors
2441
+ constructor(properties?: Partial<Util.ConstructorProps>, ...args: any[]);
2442
+
2443
+ _init(...args: any[]): void;
2444
+
2445
+ // Signals
2446
+ /** @signal */
2447
+ connect<K extends keyof Util.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Util.SignalSignatures[K]>): number;
2448
+ connect(signal: string, callback: (...args: any[]) => any): number;
2449
+
2450
+ /** @signal */
2451
+ connect_after<K extends keyof Util.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Util.SignalSignatures[K]>): number;
2452
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
2453
+
2454
+ /** @signal */
2455
+ emit<K extends keyof Util.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<Util.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
2456
+ emit(signal: string, ...args: any[]): void;
2457
+ }
2458
+
2459
+
2460
+ /**
2461
+ * @gir-type Alias
2462
+ */
2463
+ type ActorClass = typeof Actor;
2464
+
2465
+ /**
2466
+ * @gir-type Struct
2467
+ */
2468
+ abstract class ActorPrivate {
2469
+ static $gtype: GObject.GType<ActorPrivate>;
2470
+ }
2471
+
2472
+
2473
+ /**
2474
+ * @gir-type Alias
2475
+ */
2476
+ type CloneClass = typeof Clone;
2477
+
2478
+ /**
2479
+ * @gir-type Alias
2480
+ */
2481
+ type RootClass = typeof Root;
2482
+
2483
+ /**
2484
+ * @gir-type Alias
2485
+ */
2486
+ type StageClass = typeof Stage;
2487
+
2488
+ /**
2489
+ * @gir-type Alias
2490
+ */
2491
+ type TextClass = typeof Text;
2492
+
2493
+ /**
2494
+ * @gir-type Alias
2495
+ */
2496
+ type UtilClass = typeof Util;
2497
+
2498
+ /**
2499
+ * Name of the imported GIR library
2500
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
2501
+ */
2502
+ const __name__: string;
2503
+
2504
+ /**
2505
+ * Version of the imported GIR library
2506
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
2507
+ */
2508
+ const __version__: string;
2509
+ }
2510
+
2511
+ export default Cally;
2512
+
2513
+ // END