@girs/cally-14 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-14.d.ts ADDED
@@ -0,0 +1,3180 @@
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-14';
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-14';
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-14';
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-14';
30
+ import type Atk from '@girs/atk-1.0';
31
+
32
+ export namespace Cally {
33
+
34
+ /**
35
+ * Cally-14
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
+ /**
58
+ * @gir-type Callback
59
+ */
60
+ interface ActionCallback {
61
+ (cally_actor: Actor): void;
62
+ }
63
+
64
+ /**
65
+ * @gir-type Callback
66
+ */
67
+ interface ActionFunc {
68
+ (cally_actor: Actor): void;
69
+ }
70
+
71
+ namespace Actor {
72
+ // Signal signatures
73
+ interface SignalSignatures extends Atk.GObjectAccessible.SignalSignatures {
74
+ "notify::accessible-component-layer": (pspec: GObject.ParamSpec) => void;
75
+ "notify::accessible-component-mdi-zorder": (pspec: GObject.ParamSpec) => void;
76
+ "notify::accessible-description": (pspec: GObject.ParamSpec) => void;
77
+ "notify::accessible-help-text": (pspec: GObject.ParamSpec) => void;
78
+ "notify::accessible-hypertext-nlinks": (pspec: GObject.ParamSpec) => void;
79
+ "notify::accessible-id": (pspec: GObject.ParamSpec) => void;
80
+ "notify::accessible-name": (pspec: GObject.ParamSpec) => void;
81
+ "notify::accessible-parent": (pspec: GObject.ParamSpec) => void;
82
+ "notify::accessible-role": (pspec: GObject.ParamSpec) => void;
83
+ "notify::accessible-table-caption": (pspec: GObject.ParamSpec) => void;
84
+ "notify::accessible-table-caption-object": (pspec: GObject.ParamSpec) => void;
85
+ "notify::accessible-table-column-description": (pspec: GObject.ParamSpec) => void;
86
+ "notify::accessible-table-column-header": (pspec: GObject.ParamSpec) => void;
87
+ "notify::accessible-table-row-description": (pspec: GObject.ParamSpec) => void;
88
+ "notify::accessible-table-row-header": (pspec: GObject.ParamSpec) => void;
89
+ "notify::accessible-table-summary": (pspec: GObject.ParamSpec) => void;
90
+ "notify::accessible-value": (pspec: GObject.ParamSpec) => void;
91
+ }
92
+
93
+ // Constructor properties interface
94
+ interface ConstructorProps extends Atk.GObjectAccessible.ConstructorProps, Atk.Action.ConstructorProps, Atk.Component.ConstructorProps {}
95
+ }
96
+
97
+ /**
98
+ * Implementation of the ATK interfaces for {@link Clutter.Actor}
99
+ *
100
+ * {@link Cally.Actor} implements the required ATK interfaces of {@link Clutter.Actor}
101
+ * exposing the common elements on each actor (position, extents, etc).
102
+ * @gir-type Class
103
+ */
104
+ class Actor extends Atk.GObjectAccessible implements Atk.Action, Atk.Component {
105
+ static $gtype: GObject.GType<Actor>;
106
+
107
+ /**
108
+ * Compile-time signal type information.
109
+ *
110
+ * This instance property is generated only for TypeScript type checking.
111
+ * It is not defined at runtime and should not be accessed in JS code.
112
+ * @internal
113
+ */
114
+ $signals: Actor.SignalSignatures;
115
+
116
+ // Constructors
117
+ constructor(properties?: Partial<Actor.ConstructorProps>, ...args: any[]);
118
+
119
+ _init(...args: any[]): void;
120
+
121
+ static ["new"](actor: Clutter.Actor): Actor;
122
+
123
+ // Signals
124
+ /** @signal */
125
+ connect<K extends keyof Actor.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Actor.SignalSignatures[K]>): number;
126
+ connect(signal: string, callback: (...args: any[]) => any): number;
127
+
128
+ /** @signal */
129
+ connect_after<K extends keyof Actor.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Actor.SignalSignatures[K]>): number;
130
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
131
+
132
+ /** @signal */
133
+ emit<K extends keyof Actor.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<Actor.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
134
+ emit(signal: string, ...args: any[]): void;
135
+
136
+ // Methods
137
+ /**
138
+ * Adds a new action to be accessed with the {@link Atk.Action} interface.
139
+ * @param action_name the action name
140
+ * @param action_description the action description
141
+ * @param action_keybinding the action keybinding
142
+ * @param callback the callback of the action
143
+ * @returns added action id, or -1 if failure
144
+ */
145
+ add_action(action_name: string, action_description: string, action_keybinding: string, callback: ActionCallback): number;
146
+
147
+ /**
148
+ * Removes a action, using the `action_id` returned by {@link Actor.add_action}
149
+ * @param action_id the action id
150
+ * @returns `true` if the operation was successful, `false` otherwise
151
+ */
152
+ remove_action(action_id: number): boolean;
153
+
154
+ /**
155
+ * Removes an action, using the `action_name` used when the action was added
156
+ * with {@link Actor.add_action}
157
+ * @param action_name the name of the action to remove
158
+ * @returns `true` if the operation was successful, `false` otherwise
159
+ */
160
+ remove_action_by_name(action_name: string): boolean;
161
+
162
+ /**
163
+ * Perform the specified action on the object.
164
+ * @param i the action index corresponding to the action to be performed
165
+ * @returns `true` if success, `false` otherwise
166
+ */
167
+ do_action(i: number): boolean;
168
+
169
+ /**
170
+ * Returns a description of the specified action of the object.
171
+ * @param i the action index corresponding to the action to be performed
172
+ * @returns a description string, or `null` if `action` does not implement this interface.
173
+ */
174
+ get_description(i: number): string | null;
175
+
176
+ /**
177
+ * @param args
178
+ */
179
+ // Conflicted with Atk.Object.get_description
180
+ get_description(...args: never[]): any;
181
+
182
+ /**
183
+ * Gets the keybinding which can be used to activate this action, if one
184
+ * exists. The string returned should contain localized, human-readable,
185
+ * key sequences as they would appear when displayed on screen. It must
186
+ * be in the format "mnemonic;sequence;shortcut".
187
+ *
188
+ * - The mnemonic key activates the object if it is presently enabled onscreen.
189
+ * This typically corresponds to the underlined letter within the widget.
190
+ * Example: "n" in a traditional "New..." menu item or the "a" in "Apply" for
191
+ * a button.
192
+ * - The sequence is the full list of keys which invoke the action even if the
193
+ * relevant element is not currently shown on screen. For instance, for a menu
194
+ * item the sequence is the keybindings used to open the parent menus before
195
+ * invoking. The sequence string is colon-delimited. Example: "Alt+F:N" in a
196
+ * traditional "New..." menu item.
197
+ * - The shortcut, if it exists, will invoke the same action without showing
198
+ * the component or its enclosing menus or dialogs. Example: "Ctrl+N" in a
199
+ * traditional "New..." menu item.
200
+ *
201
+ * Example: For a traditional "New..." menu item, the expected return value
202
+ * would be: "N;Alt+F:N;Ctrl+N" for the English locale and "N;Alt+D:N;Strg+N"
203
+ * for the German locale. If, hypothetically, this menu item lacked a mnemonic,
204
+ * it would be represented by ";;Ctrl+N" and ";;Strg+N" respectively.
205
+ * @param i the action index corresponding to the action to be performed
206
+ * @returns the keybinding which can be used to activate this action, or `null` if there is no keybinding for this action.
207
+ */
208
+ get_keybinding(i: number): string | null;
209
+
210
+ /**
211
+ * Returns the localized name of the specified action of the object.
212
+ * @param i the action index corresponding to the action to be performed
213
+ * @returns a name string, or `null` if `action` does not implement this interface.
214
+ */
215
+ get_localized_name(i: number): string | null;
216
+
217
+ /**
218
+ * Gets the number of accessible actions available on the object.
219
+ * If there are more than one, the first one is considered the
220
+ * "default" action of the object.
221
+ * @returns a the number of actions, or 0 if `action` does not implement this interface.
222
+ */
223
+ get_n_actions(): number;
224
+
225
+ /**
226
+ * Returns a non-localized string naming the specified action of the
227
+ * object. This name is generally not descriptive of the end result
228
+ * of the action, but instead names the 'interaction type' which the
229
+ * object supports. By convention, the above strings should be used to
230
+ * represent the actions which correspond to the common point-and-click
231
+ * interaction techniques of the same name: i.e.
232
+ * "click", "press", "release", "drag", "drop", "popup", etc.
233
+ * The "popup" action should be used to pop up a context menu for the
234
+ * object, if one exists.
235
+ *
236
+ * For technical reasons, some toolkits cannot guarantee that the
237
+ * reported action is actually 'bound' to a nontrivial user event;
238
+ * i.e. the result of some actions via `atk_action_do_action()` may be
239
+ * NIL.
240
+ * @param i the action index corresponding to the action to be performed
241
+ * @returns a name string, or `null` if `action` does not implement this interface.
242
+ */
243
+ get_name(i: number): string | null;
244
+
245
+ /**
246
+ * @param args
247
+ */
248
+ // Conflicted with Atk.Object.get_name
249
+ get_name(...args: never[]): any;
250
+
251
+ /**
252
+ * Sets a description of the specified action of the object.
253
+ * @param i the action index corresponding to the action to be performed
254
+ * @param desc the description to be assigned to this action
255
+ * @returns a gboolean representing if the description was successfully set;
256
+ */
257
+ set_description(i: number, desc: string): boolean;
258
+
259
+ /**
260
+ * @param args
261
+ */
262
+ // Conflicted with Atk.Object.set_description
263
+ set_description(...args: never[]): any;
264
+
265
+ /**
266
+ * Perform the specified action on the object.
267
+ * @param i the action index corresponding to the action to be performed
268
+ * @virtual
269
+ */
270
+ vfunc_do_action(i: number): boolean;
271
+
272
+ /**
273
+ * Returns a description of the specified action of the object.
274
+ * @param i the action index corresponding to the action to be performed
275
+ * @virtual
276
+ */
277
+ vfunc_get_description(i: number): string | null;
278
+
279
+ /**
280
+ * @param args
281
+ * @virtual
282
+ */
283
+ // Conflicted with Atk.Object.vfunc_get_description
284
+ vfunc_get_description(...args: never[]): any;
285
+
286
+ /**
287
+ * Gets the keybinding which can be used to activate this action, if one
288
+ * exists. The string returned should contain localized, human-readable,
289
+ * key sequences as they would appear when displayed on screen. It must
290
+ * be in the format "mnemonic;sequence;shortcut".
291
+ *
292
+ * - The mnemonic key activates the object if it is presently enabled onscreen.
293
+ * This typically corresponds to the underlined letter within the widget.
294
+ * Example: "n" in a traditional "New..." menu item or the "a" in "Apply" for
295
+ * a button.
296
+ * - The sequence is the full list of keys which invoke the action even if the
297
+ * relevant element is not currently shown on screen. For instance, for a menu
298
+ * item the sequence is the keybindings used to open the parent menus before
299
+ * invoking. The sequence string is colon-delimited. Example: "Alt+F:N" in a
300
+ * traditional "New..." menu item.
301
+ * - The shortcut, if it exists, will invoke the same action without showing
302
+ * the component or its enclosing menus or dialogs. Example: "Ctrl+N" in a
303
+ * traditional "New..." menu item.
304
+ *
305
+ * Example: For a traditional "New..." menu item, the expected return value
306
+ * would be: "N;Alt+F:N;Ctrl+N" for the English locale and "N;Alt+D:N;Strg+N"
307
+ * for the German locale. If, hypothetically, this menu item lacked a mnemonic,
308
+ * it would be represented by ";;Ctrl+N" and ";;Strg+N" respectively.
309
+ * @param i the action index corresponding to the action to be performed
310
+ * @virtual
311
+ */
312
+ vfunc_get_keybinding(i: number): string | null;
313
+
314
+ /**
315
+ * Returns the localized name of the specified action of the object.
316
+ * @param i the action index corresponding to the action to be performed
317
+ * @virtual
318
+ */
319
+ vfunc_get_localized_name(i: number): string | null;
320
+
321
+ /**
322
+ * Gets the number of accessible actions available on the object.
323
+ * If there are more than one, the first one is considered the
324
+ * "default" action of the object.
325
+ * @virtual
326
+ */
327
+ vfunc_get_n_actions(): number;
328
+
329
+ /**
330
+ * Returns a non-localized string naming the specified action of the
331
+ * object. This name is generally not descriptive of the end result
332
+ * of the action, but instead names the 'interaction type' which the
333
+ * object supports. By convention, the above strings should be used to
334
+ * represent the actions which correspond to the common point-and-click
335
+ * interaction techniques of the same name: i.e.
336
+ * "click", "press", "release", "drag", "drop", "popup", etc.
337
+ * The "popup" action should be used to pop up a context menu for the
338
+ * object, if one exists.
339
+ *
340
+ * For technical reasons, some toolkits cannot guarantee that the
341
+ * reported action is actually 'bound' to a nontrivial user event;
342
+ * i.e. the result of some actions via `atk_action_do_action()` may be
343
+ * NIL.
344
+ * @param i the action index corresponding to the action to be performed
345
+ * @virtual
346
+ */
347
+ vfunc_get_name(i: number): string | null;
348
+
349
+ /**
350
+ * @param args
351
+ * @virtual
352
+ */
353
+ // Conflicted with Atk.Object.vfunc_get_name
354
+ vfunc_get_name(...args: never[]): any;
355
+
356
+ /**
357
+ * Sets a description of the specified action of the object.
358
+ * @param i the action index corresponding to the action to be performed
359
+ * @param desc the description to be assigned to this action
360
+ * @virtual
361
+ */
362
+ vfunc_set_description(i: number, desc: string): boolean;
363
+
364
+ /**
365
+ * @param args
366
+ * @virtual
367
+ */
368
+ // Conflicted with Atk.Object.vfunc_set_description
369
+ vfunc_set_description(...args: never[]): any;
370
+
371
+ /**
372
+ * Checks whether the specified point is within the extent of the `component`.
373
+ *
374
+ * Toolkit implementor note: ATK provides a default implementation for
375
+ * this virtual method. In general there are little reason to
376
+ * re-implement it.
377
+ * @param x x coordinate
378
+ * @param y y coordinate
379
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
380
+ * @returns `true` or `false` indicating whether the specified point is within the extent of the `component` or not
381
+ */
382
+ contains(x: number, y: number, coord_type: Atk.CoordType): boolean;
383
+
384
+ /**
385
+ * Returns the alpha value (i.e. the opacity) for this
386
+ * `component`, on a scale from 0 (fully transparent) to 1.0
387
+ * (fully opaque).
388
+ * @returns An alpha value from 0 to 1.0, inclusive.
389
+ */
390
+ get_alpha(): number;
391
+
392
+ /**
393
+ * Gets the rectangle which gives the extent of the `component`.
394
+ *
395
+ * If the extent can not be obtained (e.g. a non-embedded plug or missing
396
+ * support), all of x, y, width, height are set to -1.
397
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
398
+ */
399
+ get_extents(coord_type: Atk.CoordType): [number, number, number, number];
400
+
401
+ /**
402
+ * Gets the layer of the component.
403
+ * @returns an {@link Atk.Layer} which is the layer of the component
404
+ */
405
+ get_layer(): Atk.Layer;
406
+
407
+ /**
408
+ * Gets the zorder of the component. The value G_MININT will be returned
409
+ * if the layer of the component is not ATK_LAYER_MDI or ATK_LAYER_WINDOW.
410
+ * @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.
411
+ */
412
+ get_mdi_zorder(): number;
413
+
414
+ /**
415
+ * Gets the position of `component` in the form of
416
+ * a point specifying `component`'s top-left corner.
417
+ *
418
+ * If the position can not be obtained (e.g. a non-embedded plug or missing
419
+ * support), x and y are set to -1.
420
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
421
+ */
422
+ get_position(coord_type: Atk.CoordType): [number, number];
423
+
424
+ /**
425
+ * Gets the size of the `component` in terms of width and height.
426
+ *
427
+ * If the size can not be obtained (e.g. a non-embedded plug or missing
428
+ * support), width and height are set to -1.
429
+ */
430
+ get_size(): [number, number];
431
+
432
+ /**
433
+ * Grabs focus for this `component`.
434
+ * @returns `true` if successful, `false` otherwise.
435
+ */
436
+ grab_focus(): boolean;
437
+
438
+ /**
439
+ * Gets a reference to the accessible child, if one exists, at the
440
+ * coordinate point specified by `x` and `y`.
441
+ * @param x x coordinate
442
+ * @param y y coordinate
443
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
444
+ * @returns a reference to the accessible child, if one exists
445
+ */
446
+ ref_accessible_at_point(x: number, y: number, coord_type: Atk.CoordType): Atk.Object | null;
447
+
448
+ /**
449
+ * Remove the handler specified by `handler_id` from the list of
450
+ * functions to be executed when this object receives focus events
451
+ * (in or out).
452
+ * @param handler_id the handler id of the focus handler to be removed from `component`
453
+ */
454
+ remove_focus_handler(handler_id: number): void;
455
+
456
+ /**
457
+ * Makes `component` visible on the screen by scrolling all necessary parents.
458
+ *
459
+ * Contrary to atk_component_set_position, this does not actually move
460
+ * `component` in its parent, this only makes the parents scroll so that the
461
+ * object shows up on the screen, given its current position within the parents.
462
+ * @param type specify where the object should be made visible.
463
+ * @returns whether scrolling was successful.
464
+ */
465
+ scroll_to(type: Atk.ScrollType): boolean;
466
+
467
+ /**
468
+ * Move the top-left of `component` to a given position of the screen by
469
+ * scrolling all necessary parents.
470
+ * @param coords specify whether coordinates are relative to the screen or to the parent object.
471
+ * @param x x-position where to scroll to
472
+ * @param y y-position where to scroll to
473
+ * @returns whether scrolling was successful.
474
+ */
475
+ scroll_to_point(coords: Atk.CoordType, x: number, y: number): boolean;
476
+
477
+ /**
478
+ * Sets the extents of `component`.
479
+ * @param x x coordinate
480
+ * @param y y coordinate
481
+ * @param width width to set for `component`
482
+ * @param height height to set for `component`
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` whether the extents were set or not
485
+ */
486
+ set_extents(x: number, y: number, width: number, height: number, coord_type: Atk.CoordType): boolean;
487
+
488
+ /**
489
+ * Sets the position of `component`.
490
+ *
491
+ * Contrary to atk_component_scroll_to, this does not trigger any scrolling,
492
+ * this just moves `component` in its parent.
493
+ * @param x x coordinate
494
+ * @param y y coordinate
495
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the component's top level window
496
+ * @returns `true` or `false` whether or not the position was set or not
497
+ */
498
+ set_position(x: number, y: number, coord_type: Atk.CoordType): boolean;
499
+
500
+ /**
501
+ * Set the size of the `component` in terms of width and height.
502
+ * @param width width to set for `component`
503
+ * @param height height to set for `component`
504
+ * @returns `true` or `false` whether the size was set or not
505
+ */
506
+ set_size(width: number, height: number): boolean;
507
+
508
+ /**
509
+ * @param bounds
510
+ * @virtual
511
+ */
512
+ vfunc_bounds_changed(bounds: Atk.Rectangle): void;
513
+
514
+ /**
515
+ * Checks whether the specified point is within the extent of the `component`.
516
+ *
517
+ * Toolkit implementor note: ATK provides a default implementation for
518
+ * this virtual method. In general there are little reason to
519
+ * re-implement it.
520
+ * @param x x coordinate
521
+ * @param y y coordinate
522
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
523
+ * @virtual
524
+ */
525
+ vfunc_contains(x: number, y: number, coord_type: Atk.CoordType): boolean;
526
+
527
+ /**
528
+ * Returns the alpha value (i.e. the opacity) for this
529
+ * `component`, on a scale from 0 (fully transparent) to 1.0
530
+ * (fully opaque).
531
+ * @virtual
532
+ */
533
+ vfunc_get_alpha(): number;
534
+
535
+ /**
536
+ * Gets the rectangle which gives the extent of the `component`.
537
+ *
538
+ * If the extent can not be obtained (e.g. a non-embedded plug or missing
539
+ * support), all of x, y, width, height are set to -1.
540
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
541
+ * @virtual
542
+ */
543
+ vfunc_get_extents(coord_type: Atk.CoordType): [number, number, number, number];
544
+
545
+ /**
546
+ * Gets the layer of the component.
547
+ * @virtual
548
+ */
549
+ vfunc_get_layer(): Atk.Layer;
550
+
551
+ /**
552
+ * Gets the zorder of the component. The value G_MININT will be returned
553
+ * if the layer of the component is not ATK_LAYER_MDI or ATK_LAYER_WINDOW.
554
+ * @virtual
555
+ */
556
+ vfunc_get_mdi_zorder(): number;
557
+
558
+ /**
559
+ * Gets the position of `component` in the form of
560
+ * a point specifying `component`'s top-left corner.
561
+ *
562
+ * If the position can not be obtained (e.g. a non-embedded plug or missing
563
+ * support), x and y are set to -1.
564
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
565
+ * @virtual
566
+ */
567
+ vfunc_get_position(coord_type: Atk.CoordType): [number, number];
568
+
569
+ /**
570
+ * Gets the size of the `component` in terms of width and height.
571
+ *
572
+ * If the size can not be obtained (e.g. a non-embedded plug or missing
573
+ * support), width and height are set to -1.
574
+ * @virtual
575
+ */
576
+ vfunc_get_size(): [number, number];
577
+
578
+ /**
579
+ * Grabs focus for this `component`.
580
+ * @virtual
581
+ */
582
+ vfunc_grab_focus(): boolean;
583
+
584
+ /**
585
+ * Gets a reference to the accessible child, if one exists, at the
586
+ * coordinate point specified by `x` and `y`.
587
+ * @param x x coordinate
588
+ * @param y y coordinate
589
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
590
+ * @virtual
591
+ */
592
+ vfunc_ref_accessible_at_point(x: number, y: number, coord_type: Atk.CoordType): Atk.Object | null;
593
+
594
+ /**
595
+ * Remove the handler specified by `handler_id` from the list of
596
+ * functions to be executed when this object receives focus events
597
+ * (in or out).
598
+ * @param handler_id the handler id of the focus handler to be removed from `component`
599
+ * @virtual
600
+ */
601
+ vfunc_remove_focus_handler(handler_id: number): void;
602
+
603
+ /**
604
+ * Makes `component` visible on the screen by scrolling all necessary parents.
605
+ *
606
+ * Contrary to atk_component_set_position, this does not actually move
607
+ * `component` in its parent, this only makes the parents scroll so that the
608
+ * object shows up on the screen, given its current position within the parents.
609
+ * @param type specify where the object should be made visible.
610
+ * @virtual
611
+ */
612
+ vfunc_scroll_to(type: Atk.ScrollType): boolean;
613
+
614
+ /**
615
+ * Move the top-left of `component` to a given position of the screen by
616
+ * scrolling all necessary parents.
617
+ * @param coords specify whether coordinates are relative to the screen or to the parent object.
618
+ * @param x x-position where to scroll to
619
+ * @param y y-position where to scroll to
620
+ * @virtual
621
+ */
622
+ vfunc_scroll_to_point(coords: Atk.CoordType, x: number, y: number): boolean;
623
+
624
+ /**
625
+ * Sets the extents of `component`.
626
+ * @param x x coordinate
627
+ * @param y y coordinate
628
+ * @param width width to set for `component`
629
+ * @param height height to set for `component`
630
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
631
+ * @virtual
632
+ */
633
+ vfunc_set_extents(x: number, y: number, width: number, height: number, coord_type: Atk.CoordType): boolean;
634
+
635
+ /**
636
+ * Sets the position of `component`.
637
+ *
638
+ * Contrary to atk_component_scroll_to, this does not trigger any scrolling,
639
+ * this just moves `component` in its parent.
640
+ * @param x x coordinate
641
+ * @param y y coordinate
642
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the component's top level window
643
+ * @virtual
644
+ */
645
+ vfunc_set_position(x: number, y: number, coord_type: Atk.CoordType): boolean;
646
+
647
+ /**
648
+ * Set the size of the `component` in terms of width and height.
649
+ * @param width width to set for `component`
650
+ * @param height height to set for `component`
651
+ * @virtual
652
+ */
653
+ vfunc_set_size(width: number, height: number): boolean;
654
+ }
655
+
656
+
657
+ namespace Clone {
658
+ // Signal signatures
659
+ interface SignalSignatures extends Actor.SignalSignatures {
660
+ "notify::accessible-component-layer": (pspec: GObject.ParamSpec) => void;
661
+ "notify::accessible-component-mdi-zorder": (pspec: GObject.ParamSpec) => void;
662
+ "notify::accessible-description": (pspec: GObject.ParamSpec) => void;
663
+ "notify::accessible-help-text": (pspec: GObject.ParamSpec) => void;
664
+ "notify::accessible-hypertext-nlinks": (pspec: GObject.ParamSpec) => void;
665
+ "notify::accessible-id": (pspec: GObject.ParamSpec) => void;
666
+ "notify::accessible-name": (pspec: GObject.ParamSpec) => void;
667
+ "notify::accessible-parent": (pspec: GObject.ParamSpec) => void;
668
+ "notify::accessible-role": (pspec: GObject.ParamSpec) => void;
669
+ "notify::accessible-table-caption": (pspec: GObject.ParamSpec) => void;
670
+ "notify::accessible-table-caption-object": (pspec: GObject.ParamSpec) => void;
671
+ "notify::accessible-table-column-description": (pspec: GObject.ParamSpec) => void;
672
+ "notify::accessible-table-column-header": (pspec: GObject.ParamSpec) => void;
673
+ "notify::accessible-table-row-description": (pspec: GObject.ParamSpec) => void;
674
+ "notify::accessible-table-row-header": (pspec: GObject.ParamSpec) => void;
675
+ "notify::accessible-table-summary": (pspec: GObject.ParamSpec) => void;
676
+ "notify::accessible-value": (pspec: GObject.ParamSpec) => void;
677
+ }
678
+
679
+ // Constructor properties interface
680
+ interface ConstructorProps extends Actor.ConstructorProps, Atk.Action.ConstructorProps, Atk.Component.ConstructorProps {}
681
+ }
682
+
683
+ /**
684
+ * Implementation of the ATK interfaces for a {@link Clutter.Clone}
685
+ *
686
+ * {@link Cally.Clone} implements the required ATK interfaces of {@link Clutter.Clone}
687
+ *
688
+ * In particular it sets a proper role for the clone, as just a image,
689
+ * as it is the sanest and simplest approach.
690
+ * @gir-type Class
691
+ */
692
+ class Clone extends Actor implements Atk.Action, Atk.Component {
693
+ static $gtype: GObject.GType<Clone>;
694
+
695
+ /**
696
+ * Compile-time signal type information.
697
+ *
698
+ * This instance property is generated only for TypeScript type checking.
699
+ * It is not defined at runtime and should not be accessed in JS code.
700
+ * @internal
701
+ */
702
+ $signals: Clone.SignalSignatures;
703
+
704
+ // Constructors
705
+ constructor(properties?: Partial<Clone.ConstructorProps>, ...args: any[]);
706
+
707
+ _init(...args: any[]): void;
708
+
709
+ static ["new"](actor: Clutter.Actor): Clone;
710
+
711
+ // Signals
712
+ /** @signal */
713
+ connect<K extends keyof Clone.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Clone.SignalSignatures[K]>): number;
714
+ connect(signal: string, callback: (...args: any[]) => any): number;
715
+
716
+ /** @signal */
717
+ connect_after<K extends keyof Clone.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Clone.SignalSignatures[K]>): number;
718
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
719
+
720
+ /** @signal */
721
+ emit<K extends keyof Clone.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<Clone.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
722
+ emit(signal: string, ...args: any[]): void;
723
+
724
+ /**
725
+ * Perform the specified action on the object.
726
+ * @param i the action index corresponding to the action to be performed
727
+ * @returns `true` if success, `false` otherwise
728
+ */
729
+ do_action(i: number): boolean;
730
+
731
+ /**
732
+ * Returns a description of the specified action of the object.
733
+ * @param i the action index corresponding to the action to be performed
734
+ * @returns a description string, or `null` if `action` does not implement this interface.
735
+ */
736
+ get_description(i: number): string | null;
737
+
738
+ /**
739
+ * @param args
740
+ */
741
+ // Conflicted with Atk.Object.get_description
742
+ get_description(...args: never[]): any;
743
+
744
+ /**
745
+ * Gets the keybinding which can be used to activate this action, if one
746
+ * exists. The string returned should contain localized, human-readable,
747
+ * key sequences as they would appear when displayed on screen. It must
748
+ * be in the format "mnemonic;sequence;shortcut".
749
+ *
750
+ * - The mnemonic key activates the object if it is presently enabled onscreen.
751
+ * This typically corresponds to the underlined letter within the widget.
752
+ * Example: "n" in a traditional "New..." menu item or the "a" in "Apply" for
753
+ * a button.
754
+ * - The sequence is the full list of keys which invoke the action even if the
755
+ * relevant element is not currently shown on screen. For instance, for a menu
756
+ * item the sequence is the keybindings used to open the parent menus before
757
+ * invoking. The sequence string is colon-delimited. Example: "Alt+F:N" in a
758
+ * traditional "New..." menu item.
759
+ * - The shortcut, if it exists, will invoke the same action without showing
760
+ * the component or its enclosing menus or dialogs. Example: "Ctrl+N" in a
761
+ * traditional "New..." menu item.
762
+ *
763
+ * Example: For a traditional "New..." menu item, the expected return value
764
+ * would be: "N;Alt+F:N;Ctrl+N" for the English locale and "N;Alt+D:N;Strg+N"
765
+ * for the German locale. If, hypothetically, this menu item lacked a mnemonic,
766
+ * it would be represented by ";;Ctrl+N" and ";;Strg+N" respectively.
767
+ * @param i the action index corresponding to the action to be performed
768
+ * @returns the keybinding which can be used to activate this action, or `null` if there is no keybinding for this action.
769
+ */
770
+ get_keybinding(i: number): string | null;
771
+
772
+ /**
773
+ * Returns the localized name of the specified action of the object.
774
+ * @param i the action index corresponding to the action to be performed
775
+ * @returns a name string, or `null` if `action` does not implement this interface.
776
+ */
777
+ get_localized_name(i: number): string | null;
778
+
779
+ /**
780
+ * Gets the number of accessible actions available on the object.
781
+ * If there are more than one, the first one is considered the
782
+ * "default" action of the object.
783
+ * @returns a the number of actions, or 0 if `action` does not implement this interface.
784
+ */
785
+ get_n_actions(): number;
786
+
787
+ /**
788
+ * Returns a non-localized string naming the specified action of the
789
+ * object. This name is generally not descriptive of the end result
790
+ * of the action, but instead names the 'interaction type' which the
791
+ * object supports. By convention, the above strings should be used to
792
+ * represent the actions which correspond to the common point-and-click
793
+ * interaction techniques of the same name: i.e.
794
+ * "click", "press", "release", "drag", "drop", "popup", etc.
795
+ * The "popup" action should be used to pop up a context menu for the
796
+ * object, if one exists.
797
+ *
798
+ * For technical reasons, some toolkits cannot guarantee that the
799
+ * reported action is actually 'bound' to a nontrivial user event;
800
+ * i.e. the result of some actions via `atk_action_do_action()` may be
801
+ * NIL.
802
+ * @param i the action index corresponding to the action to be performed
803
+ * @returns a name string, or `null` if `action` does not implement this interface.
804
+ */
805
+ get_name(i: number): string | null;
806
+
807
+ /**
808
+ * @param args
809
+ */
810
+ // Conflicted with Atk.Object.get_name
811
+ get_name(...args: never[]): any;
812
+
813
+ /**
814
+ * Sets a description of the specified action of the object.
815
+ * @param i the action index corresponding to the action to be performed
816
+ * @param desc the description to be assigned to this action
817
+ * @returns a gboolean representing if the description was successfully set;
818
+ */
819
+ set_description(i: number, desc: string): boolean;
820
+
821
+ /**
822
+ * @param args
823
+ */
824
+ // Conflicted with Atk.Object.set_description
825
+ set_description(...args: never[]): any;
826
+
827
+ /**
828
+ * Perform the specified action on the object.
829
+ * @param i the action index corresponding to the action to be performed
830
+ * @virtual
831
+ */
832
+ vfunc_do_action(i: number): boolean;
833
+
834
+ /**
835
+ * Returns a description of the specified action of the object.
836
+ * @param i the action index corresponding to the action to be performed
837
+ * @virtual
838
+ */
839
+ vfunc_get_description(i: number): string | null;
840
+
841
+ /**
842
+ * @param args
843
+ * @virtual
844
+ */
845
+ // Conflicted with Atk.Object.vfunc_get_description
846
+ vfunc_get_description(...args: never[]): any;
847
+
848
+ /**
849
+ * Gets the keybinding which can be used to activate this action, if one
850
+ * exists. The string returned should contain localized, human-readable,
851
+ * key sequences as they would appear when displayed on screen. It must
852
+ * be in the format "mnemonic;sequence;shortcut".
853
+ *
854
+ * - The mnemonic key activates the object if it is presently enabled onscreen.
855
+ * This typically corresponds to the underlined letter within the widget.
856
+ * Example: "n" in a traditional "New..." menu item or the "a" in "Apply" for
857
+ * a button.
858
+ * - The sequence is the full list of keys which invoke the action even if the
859
+ * relevant element is not currently shown on screen. For instance, for a menu
860
+ * item the sequence is the keybindings used to open the parent menus before
861
+ * invoking. The sequence string is colon-delimited. Example: "Alt+F:N" in a
862
+ * traditional "New..." menu item.
863
+ * - The shortcut, if it exists, will invoke the same action without showing
864
+ * the component or its enclosing menus or dialogs. Example: "Ctrl+N" in a
865
+ * traditional "New..." menu item.
866
+ *
867
+ * Example: For a traditional "New..." menu item, the expected return value
868
+ * would be: "N;Alt+F:N;Ctrl+N" for the English locale and "N;Alt+D:N;Strg+N"
869
+ * for the German locale. If, hypothetically, this menu item lacked a mnemonic,
870
+ * it would be represented by ";;Ctrl+N" and ";;Strg+N" respectively.
871
+ * @param i the action index corresponding to the action to be performed
872
+ * @virtual
873
+ */
874
+ vfunc_get_keybinding(i: number): string | null;
875
+
876
+ /**
877
+ * Returns the localized name of the specified action of the object.
878
+ * @param i the action index corresponding to the action to be performed
879
+ * @virtual
880
+ */
881
+ vfunc_get_localized_name(i: number): string | null;
882
+
883
+ /**
884
+ * Gets the number of accessible actions available on the object.
885
+ * If there are more than one, the first one is considered the
886
+ * "default" action of the object.
887
+ * @virtual
888
+ */
889
+ vfunc_get_n_actions(): number;
890
+
891
+ /**
892
+ * Returns a non-localized string naming the specified action of the
893
+ * object. This name is generally not descriptive of the end result
894
+ * of the action, but instead names the 'interaction type' which the
895
+ * object supports. By convention, the above strings should be used to
896
+ * represent the actions which correspond to the common point-and-click
897
+ * interaction techniques of the same name: i.e.
898
+ * "click", "press", "release", "drag", "drop", "popup", etc.
899
+ * The "popup" action should be used to pop up a context menu for the
900
+ * object, if one exists.
901
+ *
902
+ * For technical reasons, some toolkits cannot guarantee that the
903
+ * reported action is actually 'bound' to a nontrivial user event;
904
+ * i.e. the result of some actions via `atk_action_do_action()` may be
905
+ * NIL.
906
+ * @param i the action index corresponding to the action to be performed
907
+ * @virtual
908
+ */
909
+ vfunc_get_name(i: number): string | null;
910
+
911
+ /**
912
+ * @param args
913
+ * @virtual
914
+ */
915
+ // Conflicted with Atk.Object.vfunc_get_name
916
+ vfunc_get_name(...args: never[]): any;
917
+
918
+ /**
919
+ * Sets a description of the specified action of the object.
920
+ * @param i the action index corresponding to the action to be performed
921
+ * @param desc the description to be assigned to this action
922
+ * @virtual
923
+ */
924
+ vfunc_set_description(i: number, desc: string): boolean;
925
+
926
+ /**
927
+ * @param args
928
+ * @virtual
929
+ */
930
+ // Conflicted with Atk.Object.vfunc_set_description
931
+ vfunc_set_description(...args: never[]): any;
932
+
933
+ /**
934
+ * Checks whether the specified point is within the extent of the `component`.
935
+ *
936
+ * Toolkit implementor note: ATK provides a default implementation for
937
+ * this virtual method. In general there are little reason to
938
+ * re-implement it.
939
+ * @param x x coordinate
940
+ * @param y y coordinate
941
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
942
+ * @returns `true` or `false` indicating whether the specified point is within the extent of the `component` or not
943
+ */
944
+ contains(x: number, y: number, coord_type: Atk.CoordType): boolean;
945
+
946
+ /**
947
+ * Returns the alpha value (i.e. the opacity) for this
948
+ * `component`, on a scale from 0 (fully transparent) to 1.0
949
+ * (fully opaque).
950
+ * @returns An alpha value from 0 to 1.0, inclusive.
951
+ */
952
+ get_alpha(): number;
953
+
954
+ /**
955
+ * Gets the rectangle which gives the extent of the `component`.
956
+ *
957
+ * If the extent can not be obtained (e.g. a non-embedded plug or missing
958
+ * support), all of x, y, width, height are set to -1.
959
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
960
+ */
961
+ get_extents(coord_type: Atk.CoordType): [number, number, number, number];
962
+
963
+ /**
964
+ * Gets the layer of the component.
965
+ * @returns an {@link Atk.Layer} which is the layer of the component
966
+ */
967
+ get_layer(): Atk.Layer;
968
+
969
+ /**
970
+ * Gets the zorder of the component. The value G_MININT will be returned
971
+ * if the layer of the component is not ATK_LAYER_MDI or ATK_LAYER_WINDOW.
972
+ * @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.
973
+ */
974
+ get_mdi_zorder(): number;
975
+
976
+ /**
977
+ * Gets the position of `component` in the form of
978
+ * a point specifying `component`'s top-left corner.
979
+ *
980
+ * If the position can not be obtained (e.g. a non-embedded plug or missing
981
+ * support), x and y are set to -1.
982
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
983
+ */
984
+ get_position(coord_type: Atk.CoordType): [number, number];
985
+
986
+ /**
987
+ * Gets the size of the `component` in terms of width and height.
988
+ *
989
+ * If the size can not be obtained (e.g. a non-embedded plug or missing
990
+ * support), width and height are set to -1.
991
+ */
992
+ get_size(): [number, number];
993
+
994
+ /**
995
+ * Grabs focus for this `component`.
996
+ * @returns `true` if successful, `false` otherwise.
997
+ */
998
+ grab_focus(): boolean;
999
+
1000
+ /**
1001
+ * Gets a reference to the accessible child, if one exists, at the
1002
+ * coordinate point specified by `x` and `y`.
1003
+ * @param x x coordinate
1004
+ * @param y y coordinate
1005
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
1006
+ * @returns a reference to the accessible child, if one exists
1007
+ */
1008
+ ref_accessible_at_point(x: number, y: number, coord_type: Atk.CoordType): Atk.Object | null;
1009
+
1010
+ /**
1011
+ * Remove the handler specified by `handler_id` from the list of
1012
+ * functions to be executed when this object receives focus events
1013
+ * (in or out).
1014
+ * @param handler_id the handler id of the focus handler to be removed from `component`
1015
+ */
1016
+ remove_focus_handler(handler_id: number): void;
1017
+
1018
+ /**
1019
+ * Makes `component` visible on the screen by scrolling all necessary parents.
1020
+ *
1021
+ * Contrary to atk_component_set_position, this does not actually move
1022
+ * `component` in its parent, this only makes the parents scroll so that the
1023
+ * object shows up on the screen, given its current position within the parents.
1024
+ * @param type specify where the object should be made visible.
1025
+ * @returns whether scrolling was successful.
1026
+ */
1027
+ scroll_to(type: Atk.ScrollType): boolean;
1028
+
1029
+ /**
1030
+ * Move the top-left of `component` to a given position of the screen by
1031
+ * scrolling all necessary parents.
1032
+ * @param coords specify whether coordinates are relative to the screen or to the parent object.
1033
+ * @param x x-position where to scroll to
1034
+ * @param y y-position where to scroll to
1035
+ * @returns whether scrolling was successful.
1036
+ */
1037
+ scroll_to_point(coords: Atk.CoordType, x: number, y: number): boolean;
1038
+
1039
+ /**
1040
+ * Sets the extents of `component`.
1041
+ * @param x x coordinate
1042
+ * @param y y coordinate
1043
+ * @param width width to set for `component`
1044
+ * @param height height to set for `component`
1045
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
1046
+ * @returns `true` or `false` whether the extents were set or not
1047
+ */
1048
+ set_extents(x: number, y: number, width: number, height: number, coord_type: Atk.CoordType): boolean;
1049
+
1050
+ /**
1051
+ * Sets the position of `component`.
1052
+ *
1053
+ * Contrary to atk_component_scroll_to, this does not trigger any scrolling,
1054
+ * this just moves `component` in its parent.
1055
+ * @param x x coordinate
1056
+ * @param y y coordinate
1057
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the component's top level window
1058
+ * @returns `true` or `false` whether or not the position was set or not
1059
+ */
1060
+ set_position(x: number, y: number, coord_type: Atk.CoordType): boolean;
1061
+
1062
+ /**
1063
+ * Set the size of the `component` in terms of width and height.
1064
+ * @param width width to set for `component`
1065
+ * @param height height to set for `component`
1066
+ * @returns `true` or `false` whether the size was set or not
1067
+ */
1068
+ set_size(width: number, height: number): boolean;
1069
+
1070
+ /**
1071
+ * @param bounds
1072
+ * @virtual
1073
+ */
1074
+ vfunc_bounds_changed(bounds: Atk.Rectangle): void;
1075
+
1076
+ /**
1077
+ * Checks whether the specified point is within the extent of the `component`.
1078
+ *
1079
+ * Toolkit implementor note: ATK provides a default implementation for
1080
+ * this virtual method. In general there are little reason to
1081
+ * re-implement it.
1082
+ * @param x x coordinate
1083
+ * @param y y coordinate
1084
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
1085
+ * @virtual
1086
+ */
1087
+ vfunc_contains(x: number, y: number, coord_type: Atk.CoordType): boolean;
1088
+
1089
+ /**
1090
+ * Returns the alpha value (i.e. the opacity) for this
1091
+ * `component`, on a scale from 0 (fully transparent) to 1.0
1092
+ * (fully opaque).
1093
+ * @virtual
1094
+ */
1095
+ vfunc_get_alpha(): number;
1096
+
1097
+ /**
1098
+ * Gets the rectangle which gives the extent of the `component`.
1099
+ *
1100
+ * If the extent can not be obtained (e.g. a non-embedded plug or missing
1101
+ * support), all of x, y, width, height are set to -1.
1102
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
1103
+ * @virtual
1104
+ */
1105
+ vfunc_get_extents(coord_type: Atk.CoordType): [number, number, number, number];
1106
+
1107
+ /**
1108
+ * Gets the layer of the component.
1109
+ * @virtual
1110
+ */
1111
+ vfunc_get_layer(): Atk.Layer;
1112
+
1113
+ /**
1114
+ * Gets the zorder of the component. The value G_MININT will be returned
1115
+ * if the layer of the component is not ATK_LAYER_MDI or ATK_LAYER_WINDOW.
1116
+ * @virtual
1117
+ */
1118
+ vfunc_get_mdi_zorder(): number;
1119
+
1120
+ /**
1121
+ * Gets the position of `component` in the form of
1122
+ * a point specifying `component`'s top-left corner.
1123
+ *
1124
+ * If the position can not be obtained (e.g. a non-embedded plug or missing
1125
+ * support), x and y are set to -1.
1126
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
1127
+ * @virtual
1128
+ */
1129
+ vfunc_get_position(coord_type: Atk.CoordType): [number, number];
1130
+
1131
+ /**
1132
+ * Gets the size of the `component` in terms of width and height.
1133
+ *
1134
+ * If the size can not be obtained (e.g. a non-embedded plug or missing
1135
+ * support), width and height are set to -1.
1136
+ * @virtual
1137
+ */
1138
+ vfunc_get_size(): [number, number];
1139
+
1140
+ /**
1141
+ * Grabs focus for this `component`.
1142
+ * @virtual
1143
+ */
1144
+ vfunc_grab_focus(): boolean;
1145
+
1146
+ /**
1147
+ * Gets a reference to the accessible child, if one exists, at the
1148
+ * coordinate point specified by `x` and `y`.
1149
+ * @param x x coordinate
1150
+ * @param y y coordinate
1151
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
1152
+ * @virtual
1153
+ */
1154
+ vfunc_ref_accessible_at_point(x: number, y: number, coord_type: Atk.CoordType): Atk.Object | null;
1155
+
1156
+ /**
1157
+ * Remove the handler specified by `handler_id` from the list of
1158
+ * functions to be executed when this object receives focus events
1159
+ * (in or out).
1160
+ * @param handler_id the handler id of the focus handler to be removed from `component`
1161
+ * @virtual
1162
+ */
1163
+ vfunc_remove_focus_handler(handler_id: number): void;
1164
+
1165
+ /**
1166
+ * Makes `component` visible on the screen by scrolling all necessary parents.
1167
+ *
1168
+ * Contrary to atk_component_set_position, this does not actually move
1169
+ * `component` in its parent, this only makes the parents scroll so that the
1170
+ * object shows up on the screen, given its current position within the parents.
1171
+ * @param type specify where the object should be made visible.
1172
+ * @virtual
1173
+ */
1174
+ vfunc_scroll_to(type: Atk.ScrollType): boolean;
1175
+
1176
+ /**
1177
+ * Move the top-left of `component` to a given position of the screen by
1178
+ * scrolling all necessary parents.
1179
+ * @param coords specify whether coordinates are relative to the screen or to the parent object.
1180
+ * @param x x-position where to scroll to
1181
+ * @param y y-position where to scroll to
1182
+ * @virtual
1183
+ */
1184
+ vfunc_scroll_to_point(coords: Atk.CoordType, x: number, y: number): boolean;
1185
+
1186
+ /**
1187
+ * Sets the extents of `component`.
1188
+ * @param x x coordinate
1189
+ * @param y y coordinate
1190
+ * @param width width to set for `component`
1191
+ * @param height height to set for `component`
1192
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
1193
+ * @virtual
1194
+ */
1195
+ vfunc_set_extents(x: number, y: number, width: number, height: number, coord_type: Atk.CoordType): boolean;
1196
+
1197
+ /**
1198
+ * Sets the position of `component`.
1199
+ *
1200
+ * Contrary to atk_component_scroll_to, this does not trigger any scrolling,
1201
+ * this just moves `component` in its parent.
1202
+ * @param x x coordinate
1203
+ * @param y y coordinate
1204
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the component's top level window
1205
+ * @virtual
1206
+ */
1207
+ vfunc_set_position(x: number, y: number, coord_type: Atk.CoordType): boolean;
1208
+
1209
+ /**
1210
+ * Set the size of the `component` in terms of width and height.
1211
+ * @param width width to set for `component`
1212
+ * @param height height to set for `component`
1213
+ * @virtual
1214
+ */
1215
+ vfunc_set_size(width: number, height: number): boolean;
1216
+ }
1217
+
1218
+
1219
+ namespace Root {
1220
+ // Signal signatures
1221
+ interface SignalSignatures extends Atk.GObjectAccessible.SignalSignatures {
1222
+ "notify::accessible-component-layer": (pspec: GObject.ParamSpec) => void;
1223
+ "notify::accessible-component-mdi-zorder": (pspec: GObject.ParamSpec) => void;
1224
+ "notify::accessible-description": (pspec: GObject.ParamSpec) => void;
1225
+ "notify::accessible-help-text": (pspec: GObject.ParamSpec) => void;
1226
+ "notify::accessible-hypertext-nlinks": (pspec: GObject.ParamSpec) => void;
1227
+ "notify::accessible-id": (pspec: GObject.ParamSpec) => void;
1228
+ "notify::accessible-name": (pspec: GObject.ParamSpec) => void;
1229
+ "notify::accessible-parent": (pspec: GObject.ParamSpec) => void;
1230
+ "notify::accessible-role": (pspec: GObject.ParamSpec) => void;
1231
+ "notify::accessible-table-caption": (pspec: GObject.ParamSpec) => void;
1232
+ "notify::accessible-table-caption-object": (pspec: GObject.ParamSpec) => void;
1233
+ "notify::accessible-table-column-description": (pspec: GObject.ParamSpec) => void;
1234
+ "notify::accessible-table-column-header": (pspec: GObject.ParamSpec) => void;
1235
+ "notify::accessible-table-row-description": (pspec: GObject.ParamSpec) => void;
1236
+ "notify::accessible-table-row-header": (pspec: GObject.ParamSpec) => void;
1237
+ "notify::accessible-table-summary": (pspec: GObject.ParamSpec) => void;
1238
+ "notify::accessible-value": (pspec: GObject.ParamSpec) => void;
1239
+ }
1240
+
1241
+ // Constructor properties interface
1242
+ interface ConstructorProps extends Atk.GObjectAccessible.ConstructorProps {}
1243
+ }
1244
+
1245
+ /**
1246
+ * Root object for the Cally toolkit
1247
+ *
1248
+ * {@link Cally.Root} is the root object of the accessibility tree-like
1249
+ * hierarchy, exposing the application level.
1250
+ *
1251
+ * Somewhat equivalent to `GailTopLevel`. We consider that this class
1252
+ * expose the a11y information of the {@link Clutter.StageManager}, as the
1253
+ * children of this object are the different {@link Clutter.Stage} managed (so
1254
+ * the {@link GObject.Object} used in the {@link Atk.Object.initialize} is the
1255
+ * {@link Clutter.StageManager}).
1256
+ * @gir-type Class
1257
+ */
1258
+ class Root extends Atk.GObjectAccessible {
1259
+ static $gtype: GObject.GType<Root>;
1260
+
1261
+ /**
1262
+ * Compile-time signal type information.
1263
+ *
1264
+ * This instance property is generated only for TypeScript type checking.
1265
+ * It is not defined at runtime and should not be accessed in JS code.
1266
+ * @internal
1267
+ */
1268
+ $signals: Root.SignalSignatures;
1269
+
1270
+ // Constructors
1271
+ constructor(properties?: Partial<Root.ConstructorProps>, ...args: any[]);
1272
+
1273
+ _init(...args: any[]): void;
1274
+
1275
+ static ["new"](): Root;
1276
+
1277
+ // Signals
1278
+ /** @signal */
1279
+ connect<K extends keyof Root.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Root.SignalSignatures[K]>): number;
1280
+ connect(signal: string, callback: (...args: any[]) => any): number;
1281
+
1282
+ /** @signal */
1283
+ connect_after<K extends keyof Root.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Root.SignalSignatures[K]>): number;
1284
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
1285
+
1286
+ /** @signal */
1287
+ emit<K extends keyof Root.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<Root.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
1288
+ emit(signal: string, ...args: any[]): void;
1289
+ }
1290
+
1291
+
1292
+ namespace Stage {
1293
+ // Signal signatures
1294
+ interface SignalSignatures extends Actor.SignalSignatures {
1295
+ "notify::accessible-component-layer": (pspec: GObject.ParamSpec) => void;
1296
+ "notify::accessible-component-mdi-zorder": (pspec: GObject.ParamSpec) => void;
1297
+ "notify::accessible-description": (pspec: GObject.ParamSpec) => void;
1298
+ "notify::accessible-help-text": (pspec: GObject.ParamSpec) => void;
1299
+ "notify::accessible-hypertext-nlinks": (pspec: GObject.ParamSpec) => void;
1300
+ "notify::accessible-id": (pspec: GObject.ParamSpec) => void;
1301
+ "notify::accessible-name": (pspec: GObject.ParamSpec) => void;
1302
+ "notify::accessible-parent": (pspec: GObject.ParamSpec) => void;
1303
+ "notify::accessible-role": (pspec: GObject.ParamSpec) => void;
1304
+ "notify::accessible-table-caption": (pspec: GObject.ParamSpec) => void;
1305
+ "notify::accessible-table-caption-object": (pspec: GObject.ParamSpec) => void;
1306
+ "notify::accessible-table-column-description": (pspec: GObject.ParamSpec) => void;
1307
+ "notify::accessible-table-column-header": (pspec: GObject.ParamSpec) => void;
1308
+ "notify::accessible-table-row-description": (pspec: GObject.ParamSpec) => void;
1309
+ "notify::accessible-table-row-header": (pspec: GObject.ParamSpec) => void;
1310
+ "notify::accessible-table-summary": (pspec: GObject.ParamSpec) => void;
1311
+ "notify::accessible-value": (pspec: GObject.ParamSpec) => void;
1312
+ }
1313
+
1314
+ // Constructor properties interface
1315
+ interface ConstructorProps extends Actor.ConstructorProps, Atk.Action.ConstructorProps, Atk.Component.ConstructorProps, Atk.Window.ConstructorProps {}
1316
+ }
1317
+
1318
+ /**
1319
+ * Implementation of the ATK interfaces for a {@link Clutter.Stage}
1320
+ *
1321
+ * {@link Cally.Stage} implements the required ATK interfaces for {@link Clutter.Stage}
1322
+ *
1323
+ * Some implementation details: at this moment {@link Cally.Stage} is used as
1324
+ * the most similar Window object in this toolkit (ie: emitting window
1325
+ * related signals), although the real purpose of {@link Clutter.Stage} is
1326
+ * being a canvas. Anyway, this is required for applications using
1327
+ * just clutter, or directly {@link Clutter.Stage}
1328
+ * @gir-type Class
1329
+ */
1330
+ class Stage extends Actor implements Atk.Action, Atk.Component, Atk.Window {
1331
+ static $gtype: GObject.GType<Stage>;
1332
+
1333
+ /**
1334
+ * Compile-time signal type information.
1335
+ *
1336
+ * This instance property is generated only for TypeScript type checking.
1337
+ * It is not defined at runtime and should not be accessed in JS code.
1338
+ * @internal
1339
+ */
1340
+ $signals: Stage.SignalSignatures;
1341
+
1342
+ // Constructors
1343
+ constructor(properties?: Partial<Stage.ConstructorProps>, ...args: any[]);
1344
+
1345
+ _init(...args: any[]): void;
1346
+
1347
+ static ["new"](actor: Clutter.Actor): Stage;
1348
+
1349
+ // Signals
1350
+ /** @signal */
1351
+ connect<K extends keyof Stage.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Stage.SignalSignatures[K]>): number;
1352
+ connect(signal: string, callback: (...args: any[]) => any): number;
1353
+
1354
+ /** @signal */
1355
+ connect_after<K extends keyof Stage.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Stage.SignalSignatures[K]>): number;
1356
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
1357
+
1358
+ /** @signal */
1359
+ emit<K extends keyof Stage.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<Stage.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
1360
+ emit(signal: string, ...args: any[]): void;
1361
+
1362
+ /**
1363
+ * Perform the specified action on the object.
1364
+ * @param i the action index corresponding to the action to be performed
1365
+ * @returns `true` if success, `false` otherwise
1366
+ */
1367
+ do_action(i: number): boolean;
1368
+
1369
+ /**
1370
+ * Returns a description of the specified action of the object.
1371
+ * @param i the action index corresponding to the action to be performed
1372
+ * @returns a description string, or `null` if `action` does not implement this interface.
1373
+ */
1374
+ get_description(i: number): string | null;
1375
+
1376
+ /**
1377
+ * @param args
1378
+ */
1379
+ // Conflicted with Atk.Object.get_description
1380
+ get_description(...args: never[]): any;
1381
+
1382
+ /**
1383
+ * Gets the keybinding which can be used to activate this action, if one
1384
+ * exists. The string returned should contain localized, human-readable,
1385
+ * key sequences as they would appear when displayed on screen. It must
1386
+ * be in the format "mnemonic;sequence;shortcut".
1387
+ *
1388
+ * - The mnemonic key activates the object if it is presently enabled onscreen.
1389
+ * This typically corresponds to the underlined letter within the widget.
1390
+ * Example: "n" in a traditional "New..." menu item or the "a" in "Apply" for
1391
+ * a button.
1392
+ * - The sequence is the full list of keys which invoke the action even if the
1393
+ * relevant element is not currently shown on screen. For instance, for a menu
1394
+ * item the sequence is the keybindings used to open the parent menus before
1395
+ * invoking. The sequence string is colon-delimited. Example: "Alt+F:N" in a
1396
+ * traditional "New..." menu item.
1397
+ * - The shortcut, if it exists, will invoke the same action without showing
1398
+ * the component or its enclosing menus or dialogs. Example: "Ctrl+N" in a
1399
+ * traditional "New..." menu item.
1400
+ *
1401
+ * Example: For a traditional "New..." menu item, the expected return value
1402
+ * would be: "N;Alt+F:N;Ctrl+N" for the English locale and "N;Alt+D:N;Strg+N"
1403
+ * for the German locale. If, hypothetically, this menu item lacked a mnemonic,
1404
+ * it would be represented by ";;Ctrl+N" and ";;Strg+N" respectively.
1405
+ * @param i the action index corresponding to the action to be performed
1406
+ * @returns the keybinding which can be used to activate this action, or `null` if there is no keybinding for this action.
1407
+ */
1408
+ get_keybinding(i: number): string | null;
1409
+
1410
+ /**
1411
+ * Returns the localized name of the specified action of the object.
1412
+ * @param i the action index corresponding to the action to be performed
1413
+ * @returns a name string, or `null` if `action` does not implement this interface.
1414
+ */
1415
+ get_localized_name(i: number): string | null;
1416
+
1417
+ /**
1418
+ * Gets the number of accessible actions available on the object.
1419
+ * If there are more than one, the first one is considered the
1420
+ * "default" action of the object.
1421
+ * @returns a the number of actions, or 0 if `action` does not implement this interface.
1422
+ */
1423
+ get_n_actions(): number;
1424
+
1425
+ /**
1426
+ * Returns a non-localized string naming the specified action of the
1427
+ * object. This name is generally not descriptive of the end result
1428
+ * of the action, but instead names the 'interaction type' which the
1429
+ * object supports. By convention, the above strings should be used to
1430
+ * represent the actions which correspond to the common point-and-click
1431
+ * interaction techniques of the same name: i.e.
1432
+ * "click", "press", "release", "drag", "drop", "popup", etc.
1433
+ * The "popup" action should be used to pop up a context menu for the
1434
+ * object, if one exists.
1435
+ *
1436
+ * For technical reasons, some toolkits cannot guarantee that the
1437
+ * reported action is actually 'bound' to a nontrivial user event;
1438
+ * i.e. the result of some actions via `atk_action_do_action()` may be
1439
+ * NIL.
1440
+ * @param i the action index corresponding to the action to be performed
1441
+ * @returns a name string, or `null` if `action` does not implement this interface.
1442
+ */
1443
+ get_name(i: number): string | null;
1444
+
1445
+ /**
1446
+ * @param args
1447
+ */
1448
+ // Conflicted with Atk.Object.get_name
1449
+ get_name(...args: never[]): any;
1450
+
1451
+ /**
1452
+ * Sets a description of the specified action of the object.
1453
+ * @param i the action index corresponding to the action to be performed
1454
+ * @param desc the description to be assigned to this action
1455
+ * @returns a gboolean representing if the description was successfully set;
1456
+ */
1457
+ set_description(i: number, desc: string): boolean;
1458
+
1459
+ /**
1460
+ * @param args
1461
+ */
1462
+ // Conflicted with Atk.Object.set_description
1463
+ set_description(...args: never[]): any;
1464
+
1465
+ /**
1466
+ * Perform the specified action on the object.
1467
+ * @param i the action index corresponding to the action to be performed
1468
+ * @virtual
1469
+ */
1470
+ vfunc_do_action(i: number): boolean;
1471
+
1472
+ /**
1473
+ * Returns a description of the specified action of the object.
1474
+ * @param i the action index corresponding to the action to be performed
1475
+ * @virtual
1476
+ */
1477
+ vfunc_get_description(i: number): string | null;
1478
+
1479
+ /**
1480
+ * @param args
1481
+ * @virtual
1482
+ */
1483
+ // Conflicted with Atk.Object.vfunc_get_description
1484
+ vfunc_get_description(...args: never[]): any;
1485
+
1486
+ /**
1487
+ * Gets the keybinding which can be used to activate this action, if one
1488
+ * exists. The string returned should contain localized, human-readable,
1489
+ * key sequences as they would appear when displayed on screen. It must
1490
+ * be in the format "mnemonic;sequence;shortcut".
1491
+ *
1492
+ * - The mnemonic key activates the object if it is presently enabled onscreen.
1493
+ * This typically corresponds to the underlined letter within the widget.
1494
+ * Example: "n" in a traditional "New..." menu item or the "a" in "Apply" for
1495
+ * a button.
1496
+ * - The sequence is the full list of keys which invoke the action even if the
1497
+ * relevant element is not currently shown on screen. For instance, for a menu
1498
+ * item the sequence is the keybindings used to open the parent menus before
1499
+ * invoking. The sequence string is colon-delimited. Example: "Alt+F:N" in a
1500
+ * traditional "New..." menu item.
1501
+ * - The shortcut, if it exists, will invoke the same action without showing
1502
+ * the component or its enclosing menus or dialogs. Example: "Ctrl+N" in a
1503
+ * traditional "New..." menu item.
1504
+ *
1505
+ * Example: For a traditional "New..." menu item, the expected return value
1506
+ * would be: "N;Alt+F:N;Ctrl+N" for the English locale and "N;Alt+D:N;Strg+N"
1507
+ * for the German locale. If, hypothetically, this menu item lacked a mnemonic,
1508
+ * it would be represented by ";;Ctrl+N" and ";;Strg+N" respectively.
1509
+ * @param i the action index corresponding to the action to be performed
1510
+ * @virtual
1511
+ */
1512
+ vfunc_get_keybinding(i: number): string | null;
1513
+
1514
+ /**
1515
+ * Returns the localized name of the specified action of the object.
1516
+ * @param i the action index corresponding to the action to be performed
1517
+ * @virtual
1518
+ */
1519
+ vfunc_get_localized_name(i: number): string | null;
1520
+
1521
+ /**
1522
+ * Gets the number of accessible actions available on the object.
1523
+ * If there are more than one, the first one is considered the
1524
+ * "default" action of the object.
1525
+ * @virtual
1526
+ */
1527
+ vfunc_get_n_actions(): number;
1528
+
1529
+ /**
1530
+ * Returns a non-localized string naming the specified action of the
1531
+ * object. This name is generally not descriptive of the end result
1532
+ * of the action, but instead names the 'interaction type' which the
1533
+ * object supports. By convention, the above strings should be used to
1534
+ * represent the actions which correspond to the common point-and-click
1535
+ * interaction techniques of the same name: i.e.
1536
+ * "click", "press", "release", "drag", "drop", "popup", etc.
1537
+ * The "popup" action should be used to pop up a context menu for the
1538
+ * object, if one exists.
1539
+ *
1540
+ * For technical reasons, some toolkits cannot guarantee that the
1541
+ * reported action is actually 'bound' to a nontrivial user event;
1542
+ * i.e. the result of some actions via `atk_action_do_action()` may be
1543
+ * NIL.
1544
+ * @param i the action index corresponding to the action to be performed
1545
+ * @virtual
1546
+ */
1547
+ vfunc_get_name(i: number): string | null;
1548
+
1549
+ /**
1550
+ * @param args
1551
+ * @virtual
1552
+ */
1553
+ // Conflicted with Atk.Object.vfunc_get_name
1554
+ vfunc_get_name(...args: never[]): any;
1555
+
1556
+ /**
1557
+ * Sets a description of the specified action of the object.
1558
+ * @param i the action index corresponding to the action to be performed
1559
+ * @param desc the description to be assigned to this action
1560
+ * @virtual
1561
+ */
1562
+ vfunc_set_description(i: number, desc: string): boolean;
1563
+
1564
+ /**
1565
+ * @param args
1566
+ * @virtual
1567
+ */
1568
+ // Conflicted with Atk.Object.vfunc_set_description
1569
+ vfunc_set_description(...args: never[]): any;
1570
+
1571
+ /**
1572
+ * Checks whether the specified point is within the extent of the `component`.
1573
+ *
1574
+ * Toolkit implementor note: ATK provides a default implementation for
1575
+ * this virtual method. In general there are little reason to
1576
+ * re-implement it.
1577
+ * @param x x coordinate
1578
+ * @param y y coordinate
1579
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
1580
+ * @returns `true` or `false` indicating whether the specified point is within the extent of the `component` or not
1581
+ */
1582
+ contains(x: number, y: number, coord_type: Atk.CoordType): boolean;
1583
+
1584
+ /**
1585
+ * Returns the alpha value (i.e. the opacity) for this
1586
+ * `component`, on a scale from 0 (fully transparent) to 1.0
1587
+ * (fully opaque).
1588
+ * @returns An alpha value from 0 to 1.0, inclusive.
1589
+ */
1590
+ get_alpha(): number;
1591
+
1592
+ /**
1593
+ * Gets the rectangle which gives the extent of the `component`.
1594
+ *
1595
+ * If the extent can not be obtained (e.g. a non-embedded plug or missing
1596
+ * support), all of x, y, width, height are set to -1.
1597
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
1598
+ */
1599
+ get_extents(coord_type: Atk.CoordType): [number, number, number, number];
1600
+
1601
+ /**
1602
+ * Gets the layer of the component.
1603
+ * @returns an {@link Atk.Layer} which is the layer of the component
1604
+ */
1605
+ get_layer(): Atk.Layer;
1606
+
1607
+ /**
1608
+ * Gets the zorder of the component. The value G_MININT will be returned
1609
+ * if the layer of the component is not ATK_LAYER_MDI or ATK_LAYER_WINDOW.
1610
+ * @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.
1611
+ */
1612
+ get_mdi_zorder(): number;
1613
+
1614
+ /**
1615
+ * Gets the position of `component` in the form of
1616
+ * a point specifying `component`'s top-left corner.
1617
+ *
1618
+ * If the position can not be obtained (e.g. a non-embedded plug or missing
1619
+ * support), x and y are set to -1.
1620
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
1621
+ */
1622
+ get_position(coord_type: Atk.CoordType): [number, number];
1623
+
1624
+ /**
1625
+ * Gets the size of the `component` in terms of width and height.
1626
+ *
1627
+ * If the size can not be obtained (e.g. a non-embedded plug or missing
1628
+ * support), width and height are set to -1.
1629
+ */
1630
+ get_size(): [number, number];
1631
+
1632
+ /**
1633
+ * Grabs focus for this `component`.
1634
+ * @returns `true` if successful, `false` otherwise.
1635
+ */
1636
+ grab_focus(): boolean;
1637
+
1638
+ /**
1639
+ * Gets a reference to the accessible child, if one exists, at the
1640
+ * coordinate point specified by `x` and `y`.
1641
+ * @param x x coordinate
1642
+ * @param y y coordinate
1643
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
1644
+ * @returns a reference to the accessible child, if one exists
1645
+ */
1646
+ ref_accessible_at_point(x: number, y: number, coord_type: Atk.CoordType): Atk.Object | null;
1647
+
1648
+ /**
1649
+ * Remove the handler specified by `handler_id` from the list of
1650
+ * functions to be executed when this object receives focus events
1651
+ * (in or out).
1652
+ * @param handler_id the handler id of the focus handler to be removed from `component`
1653
+ */
1654
+ remove_focus_handler(handler_id: number): void;
1655
+
1656
+ /**
1657
+ * Makes `component` visible on the screen by scrolling all necessary parents.
1658
+ *
1659
+ * Contrary to atk_component_set_position, this does not actually move
1660
+ * `component` in its parent, this only makes the parents scroll so that the
1661
+ * object shows up on the screen, given its current position within the parents.
1662
+ * @param type specify where the object should be made visible.
1663
+ * @returns whether scrolling was successful.
1664
+ */
1665
+ scroll_to(type: Atk.ScrollType): boolean;
1666
+
1667
+ /**
1668
+ * Move the top-left of `component` to a given position of the screen by
1669
+ * scrolling all necessary parents.
1670
+ * @param coords specify whether coordinates are relative to the screen or to the parent object.
1671
+ * @param x x-position where to scroll to
1672
+ * @param y y-position where to scroll to
1673
+ * @returns whether scrolling was successful.
1674
+ */
1675
+ scroll_to_point(coords: Atk.CoordType, x: number, y: number): boolean;
1676
+
1677
+ /**
1678
+ * Sets the extents of `component`.
1679
+ * @param x x coordinate
1680
+ * @param y y coordinate
1681
+ * @param width width to set for `component`
1682
+ * @param height height to set for `component`
1683
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
1684
+ * @returns `true` or `false` whether the extents were set or not
1685
+ */
1686
+ set_extents(x: number, y: number, width: number, height: number, coord_type: Atk.CoordType): boolean;
1687
+
1688
+ /**
1689
+ * Sets the position of `component`.
1690
+ *
1691
+ * Contrary to atk_component_scroll_to, this does not trigger any scrolling,
1692
+ * this just moves `component` in its parent.
1693
+ * @param x x coordinate
1694
+ * @param y y coordinate
1695
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the component's top level window
1696
+ * @returns `true` or `false` whether or not the position was set or not
1697
+ */
1698
+ set_position(x: number, y: number, coord_type: Atk.CoordType): boolean;
1699
+
1700
+ /**
1701
+ * Set the size of the `component` in terms of width and height.
1702
+ * @param width width to set for `component`
1703
+ * @param height height to set for `component`
1704
+ * @returns `true` or `false` whether the size was set or not
1705
+ */
1706
+ set_size(width: number, height: number): boolean;
1707
+
1708
+ /**
1709
+ * @param bounds
1710
+ * @virtual
1711
+ */
1712
+ vfunc_bounds_changed(bounds: Atk.Rectangle): void;
1713
+
1714
+ /**
1715
+ * Checks whether the specified point is within the extent of the `component`.
1716
+ *
1717
+ * Toolkit implementor note: ATK provides a default implementation for
1718
+ * this virtual method. In general there are little reason to
1719
+ * re-implement it.
1720
+ * @param x x coordinate
1721
+ * @param y y coordinate
1722
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
1723
+ * @virtual
1724
+ */
1725
+ vfunc_contains(x: number, y: number, coord_type: Atk.CoordType): boolean;
1726
+
1727
+ /**
1728
+ * Returns the alpha value (i.e. the opacity) for this
1729
+ * `component`, on a scale from 0 (fully transparent) to 1.0
1730
+ * (fully opaque).
1731
+ * @virtual
1732
+ */
1733
+ vfunc_get_alpha(): number;
1734
+
1735
+ /**
1736
+ * Gets the rectangle which gives the extent of the `component`.
1737
+ *
1738
+ * If the extent can not be obtained (e.g. a non-embedded plug or missing
1739
+ * support), all of x, y, width, height are set to -1.
1740
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
1741
+ * @virtual
1742
+ */
1743
+ vfunc_get_extents(coord_type: Atk.CoordType): [number, number, number, number];
1744
+
1745
+ /**
1746
+ * Gets the layer of the component.
1747
+ * @virtual
1748
+ */
1749
+ vfunc_get_layer(): Atk.Layer;
1750
+
1751
+ /**
1752
+ * Gets the zorder of the component. The value G_MININT will be returned
1753
+ * if the layer of the component is not ATK_LAYER_MDI or ATK_LAYER_WINDOW.
1754
+ * @virtual
1755
+ */
1756
+ vfunc_get_mdi_zorder(): number;
1757
+
1758
+ /**
1759
+ * Gets the position of `component` in the form of
1760
+ * a point specifying `component`'s top-left corner.
1761
+ *
1762
+ * If the position can not be obtained (e.g. a non-embedded plug or missing
1763
+ * support), x and y are set to -1.
1764
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
1765
+ * @virtual
1766
+ */
1767
+ vfunc_get_position(coord_type: Atk.CoordType): [number, number];
1768
+
1769
+ /**
1770
+ * Gets the size of the `component` in terms of width and height.
1771
+ *
1772
+ * If the size can not be obtained (e.g. a non-embedded plug or missing
1773
+ * support), width and height are set to -1.
1774
+ * @virtual
1775
+ */
1776
+ vfunc_get_size(): [number, number];
1777
+
1778
+ /**
1779
+ * Grabs focus for this `component`.
1780
+ * @virtual
1781
+ */
1782
+ vfunc_grab_focus(): boolean;
1783
+
1784
+ /**
1785
+ * Gets a reference to the accessible child, if one exists, at the
1786
+ * coordinate point specified by `x` and `y`.
1787
+ * @param x x coordinate
1788
+ * @param y y coordinate
1789
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
1790
+ * @virtual
1791
+ */
1792
+ vfunc_ref_accessible_at_point(x: number, y: number, coord_type: Atk.CoordType): Atk.Object | null;
1793
+
1794
+ /**
1795
+ * Remove the handler specified by `handler_id` from the list of
1796
+ * functions to be executed when this object receives focus events
1797
+ * (in or out).
1798
+ * @param handler_id the handler id of the focus handler to be removed from `component`
1799
+ * @virtual
1800
+ */
1801
+ vfunc_remove_focus_handler(handler_id: number): void;
1802
+
1803
+ /**
1804
+ * Makes `component` visible on the screen by scrolling all necessary parents.
1805
+ *
1806
+ * Contrary to atk_component_set_position, this does not actually move
1807
+ * `component` in its parent, this only makes the parents scroll so that the
1808
+ * object shows up on the screen, given its current position within the parents.
1809
+ * @param type specify where the object should be made visible.
1810
+ * @virtual
1811
+ */
1812
+ vfunc_scroll_to(type: Atk.ScrollType): boolean;
1813
+
1814
+ /**
1815
+ * Move the top-left of `component` to a given position of the screen by
1816
+ * scrolling all necessary parents.
1817
+ * @param coords specify whether coordinates are relative to the screen or to the parent object.
1818
+ * @param x x-position where to scroll to
1819
+ * @param y y-position where to scroll to
1820
+ * @virtual
1821
+ */
1822
+ vfunc_scroll_to_point(coords: Atk.CoordType, x: number, y: number): boolean;
1823
+
1824
+ /**
1825
+ * Sets the extents of `component`.
1826
+ * @param x x coordinate
1827
+ * @param y y coordinate
1828
+ * @param width width to set for `component`
1829
+ * @param height height to set for `component`
1830
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
1831
+ * @virtual
1832
+ */
1833
+ vfunc_set_extents(x: number, y: number, width: number, height: number, coord_type: Atk.CoordType): boolean;
1834
+
1835
+ /**
1836
+ * Sets the position of `component`.
1837
+ *
1838
+ * Contrary to atk_component_scroll_to, this does not trigger any scrolling,
1839
+ * this just moves `component` in its parent.
1840
+ * @param x x coordinate
1841
+ * @param y y coordinate
1842
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the component's top level window
1843
+ * @virtual
1844
+ */
1845
+ vfunc_set_position(x: number, y: number, coord_type: Atk.CoordType): boolean;
1846
+
1847
+ /**
1848
+ * Set the size of the `component` in terms of width and height.
1849
+ * @param width width to set for `component`
1850
+ * @param height height to set for `component`
1851
+ * @virtual
1852
+ */
1853
+ vfunc_set_size(width: number, height: number): boolean;
1854
+ }
1855
+
1856
+
1857
+ namespace Text {
1858
+ // Signal signatures
1859
+ interface SignalSignatures extends Actor.SignalSignatures {
1860
+ "notify::accessible-component-layer": (pspec: GObject.ParamSpec) => void;
1861
+ "notify::accessible-component-mdi-zorder": (pspec: GObject.ParamSpec) => void;
1862
+ "notify::accessible-description": (pspec: GObject.ParamSpec) => void;
1863
+ "notify::accessible-help-text": (pspec: GObject.ParamSpec) => void;
1864
+ "notify::accessible-hypertext-nlinks": (pspec: GObject.ParamSpec) => void;
1865
+ "notify::accessible-id": (pspec: GObject.ParamSpec) => void;
1866
+ "notify::accessible-name": (pspec: GObject.ParamSpec) => void;
1867
+ "notify::accessible-parent": (pspec: GObject.ParamSpec) => void;
1868
+ "notify::accessible-role": (pspec: GObject.ParamSpec) => void;
1869
+ "notify::accessible-table-caption": (pspec: GObject.ParamSpec) => void;
1870
+ "notify::accessible-table-caption-object": (pspec: GObject.ParamSpec) => void;
1871
+ "notify::accessible-table-column-description": (pspec: GObject.ParamSpec) => void;
1872
+ "notify::accessible-table-column-header": (pspec: GObject.ParamSpec) => void;
1873
+ "notify::accessible-table-row-description": (pspec: GObject.ParamSpec) => void;
1874
+ "notify::accessible-table-row-header": (pspec: GObject.ParamSpec) => void;
1875
+ "notify::accessible-table-summary": (pspec: GObject.ParamSpec) => void;
1876
+ "notify::accessible-value": (pspec: GObject.ParamSpec) => void;
1877
+ }
1878
+
1879
+ // Constructor properties interface
1880
+ interface ConstructorProps extends Actor.ConstructorProps, Atk.Action.ConstructorProps, Atk.Component.ConstructorProps, Atk.EditableText.ConstructorProps, Atk.Text.ConstructorProps {}
1881
+ }
1882
+
1883
+ /**
1884
+ * Implementation of the ATK interfaces for a {@link Clutter.Text}
1885
+ *
1886
+ * {@link Cally.Text} implements the required ATK interfaces of
1887
+ * {@link Clutter.Text}, {@link Atk.Text} and {@link Atk.EditableText}
1888
+ * @gir-type Class
1889
+ */
1890
+ class Text extends Actor implements Atk.Action, Atk.Component, Atk.EditableText, Atk.Text {
1891
+ static $gtype: GObject.GType<Text>;
1892
+
1893
+ /**
1894
+ * Compile-time signal type information.
1895
+ *
1896
+ * This instance property is generated only for TypeScript type checking.
1897
+ * It is not defined at runtime and should not be accessed in JS code.
1898
+ * @internal
1899
+ */
1900
+ $signals: Text.SignalSignatures;
1901
+
1902
+ // Constructors
1903
+ constructor(properties?: Partial<Text.ConstructorProps>, ...args: any[]);
1904
+
1905
+ _init(...args: any[]): void;
1906
+
1907
+ static ["new"](actor: Clutter.Actor): Text;
1908
+
1909
+ // Signals
1910
+ /** @signal */
1911
+ connect<K extends keyof Text.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Text.SignalSignatures[K]>): number;
1912
+ connect(signal: string, callback: (...args: any[]) => any): number;
1913
+
1914
+ /** @signal */
1915
+ connect_after<K extends keyof Text.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Text.SignalSignatures[K]>): number;
1916
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
1917
+
1918
+ /** @signal */
1919
+ emit<K extends keyof Text.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<Text.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
1920
+ emit(signal: string, ...args: any[]): void;
1921
+
1922
+ /**
1923
+ * Perform the specified action on the object.
1924
+ * @param i the action index corresponding to the action to be performed
1925
+ * @returns `true` if success, `false` otherwise
1926
+ */
1927
+ do_action(i: number): boolean;
1928
+
1929
+ /**
1930
+ * Returns a description of the specified action of the object.
1931
+ * @param i the action index corresponding to the action to be performed
1932
+ * @returns a description string, or `null` if `action` does not implement this interface.
1933
+ */
1934
+ get_description(i: number): string | null;
1935
+
1936
+ /**
1937
+ * @param args
1938
+ */
1939
+ // Conflicted with Atk.Object.get_description
1940
+ get_description(...args: never[]): any;
1941
+
1942
+ /**
1943
+ * Gets the keybinding which can be used to activate this action, if one
1944
+ * exists. The string returned should contain localized, human-readable,
1945
+ * key sequences as they would appear when displayed on screen. It must
1946
+ * be in the format "mnemonic;sequence;shortcut".
1947
+ *
1948
+ * - The mnemonic key activates the object if it is presently enabled onscreen.
1949
+ * This typically corresponds to the underlined letter within the widget.
1950
+ * Example: "n" in a traditional "New..." menu item or the "a" in "Apply" for
1951
+ * a button.
1952
+ * - The sequence is the full list of keys which invoke the action even if the
1953
+ * relevant element is not currently shown on screen. For instance, for a menu
1954
+ * item the sequence is the keybindings used to open the parent menus before
1955
+ * invoking. The sequence string is colon-delimited. Example: "Alt+F:N" in a
1956
+ * traditional "New..." menu item.
1957
+ * - The shortcut, if it exists, will invoke the same action without showing
1958
+ * the component or its enclosing menus or dialogs. Example: "Ctrl+N" in a
1959
+ * traditional "New..." menu item.
1960
+ *
1961
+ * Example: For a traditional "New..." menu item, the expected return value
1962
+ * would be: "N;Alt+F:N;Ctrl+N" for the English locale and "N;Alt+D:N;Strg+N"
1963
+ * for the German locale. If, hypothetically, this menu item lacked a mnemonic,
1964
+ * it would be represented by ";;Ctrl+N" and ";;Strg+N" respectively.
1965
+ * @param i the action index corresponding to the action to be performed
1966
+ * @returns the keybinding which can be used to activate this action, or `null` if there is no keybinding for this action.
1967
+ */
1968
+ get_keybinding(i: number): string | null;
1969
+
1970
+ /**
1971
+ * Returns the localized name of the specified action of the object.
1972
+ * @param i the action index corresponding to the action to be performed
1973
+ * @returns a name string, or `null` if `action` does not implement this interface.
1974
+ */
1975
+ get_localized_name(i: number): string | null;
1976
+
1977
+ /**
1978
+ * Gets the number of accessible actions available on the object.
1979
+ * If there are more than one, the first one is considered the
1980
+ * "default" action of the object.
1981
+ * @returns a the number of actions, or 0 if `action` does not implement this interface.
1982
+ */
1983
+ get_n_actions(): number;
1984
+
1985
+ /**
1986
+ * Returns a non-localized string naming the specified action of the
1987
+ * object. This name is generally not descriptive of the end result
1988
+ * of the action, but instead names the 'interaction type' which the
1989
+ * object supports. By convention, the above strings should be used to
1990
+ * represent the actions which correspond to the common point-and-click
1991
+ * interaction techniques of the same name: i.e.
1992
+ * "click", "press", "release", "drag", "drop", "popup", etc.
1993
+ * The "popup" action should be used to pop up a context menu for the
1994
+ * object, if one exists.
1995
+ *
1996
+ * For technical reasons, some toolkits cannot guarantee that the
1997
+ * reported action is actually 'bound' to a nontrivial user event;
1998
+ * i.e. the result of some actions via `atk_action_do_action()` may be
1999
+ * NIL.
2000
+ * @param i the action index corresponding to the action to be performed
2001
+ * @returns a name string, or `null` if `action` does not implement this interface.
2002
+ */
2003
+ get_name(i: number): string | null;
2004
+
2005
+ /**
2006
+ * @param args
2007
+ */
2008
+ // Conflicted with Atk.Object.get_name
2009
+ get_name(...args: never[]): any;
2010
+
2011
+ /**
2012
+ * Sets a description of the specified action of the object.
2013
+ * @param i the action index corresponding to the action to be performed
2014
+ * @param desc the description to be assigned to this action
2015
+ * @returns a gboolean representing if the description was successfully set;
2016
+ */
2017
+ set_description(i: number, desc: string): boolean;
2018
+
2019
+ /**
2020
+ * @param args
2021
+ */
2022
+ // Conflicted with Atk.Object.set_description
2023
+ set_description(...args: never[]): any;
2024
+
2025
+ /**
2026
+ * Perform the specified action on the object.
2027
+ * @param i the action index corresponding to the action to be performed
2028
+ * @virtual
2029
+ */
2030
+ vfunc_do_action(i: number): boolean;
2031
+
2032
+ /**
2033
+ * Returns a description of the specified action of the object.
2034
+ * @param i the action index corresponding to the action to be performed
2035
+ * @virtual
2036
+ */
2037
+ vfunc_get_description(i: number): string | null;
2038
+
2039
+ /**
2040
+ * @param args
2041
+ * @virtual
2042
+ */
2043
+ // Conflicted with Atk.Object.vfunc_get_description
2044
+ vfunc_get_description(...args: never[]): any;
2045
+
2046
+ /**
2047
+ * Gets the keybinding which can be used to activate this action, if one
2048
+ * exists. The string returned should contain localized, human-readable,
2049
+ * key sequences as they would appear when displayed on screen. It must
2050
+ * be in the format "mnemonic;sequence;shortcut".
2051
+ *
2052
+ * - The mnemonic key activates the object if it is presently enabled onscreen.
2053
+ * This typically corresponds to the underlined letter within the widget.
2054
+ * Example: "n" in a traditional "New..." menu item or the "a" in "Apply" for
2055
+ * a button.
2056
+ * - The sequence is the full list of keys which invoke the action even if the
2057
+ * relevant element is not currently shown on screen. For instance, for a menu
2058
+ * item the sequence is the keybindings used to open the parent menus before
2059
+ * invoking. The sequence string is colon-delimited. Example: "Alt+F:N" in a
2060
+ * traditional "New..." menu item.
2061
+ * - The shortcut, if it exists, will invoke the same action without showing
2062
+ * the component or its enclosing menus or dialogs. Example: "Ctrl+N" in a
2063
+ * traditional "New..." menu item.
2064
+ *
2065
+ * Example: For a traditional "New..." menu item, the expected return value
2066
+ * would be: "N;Alt+F:N;Ctrl+N" for the English locale and "N;Alt+D:N;Strg+N"
2067
+ * for the German locale. If, hypothetically, this menu item lacked a mnemonic,
2068
+ * it would be represented by ";;Ctrl+N" and ";;Strg+N" respectively.
2069
+ * @param i the action index corresponding to the action to be performed
2070
+ * @virtual
2071
+ */
2072
+ vfunc_get_keybinding(i: number): string | null;
2073
+
2074
+ /**
2075
+ * Returns the localized name of the specified action of the object.
2076
+ * @param i the action index corresponding to the action to be performed
2077
+ * @virtual
2078
+ */
2079
+ vfunc_get_localized_name(i: number): string | null;
2080
+
2081
+ /**
2082
+ * Gets the number of accessible actions available on the object.
2083
+ * If there are more than one, the first one is considered the
2084
+ * "default" action of the object.
2085
+ * @virtual
2086
+ */
2087
+ vfunc_get_n_actions(): number;
2088
+
2089
+ /**
2090
+ * Returns a non-localized string naming the specified action of the
2091
+ * object. This name is generally not descriptive of the end result
2092
+ * of the action, but instead names the 'interaction type' which the
2093
+ * object supports. By convention, the above strings should be used to
2094
+ * represent the actions which correspond to the common point-and-click
2095
+ * interaction techniques of the same name: i.e.
2096
+ * "click", "press", "release", "drag", "drop", "popup", etc.
2097
+ * The "popup" action should be used to pop up a context menu for the
2098
+ * object, if one exists.
2099
+ *
2100
+ * For technical reasons, some toolkits cannot guarantee that the
2101
+ * reported action is actually 'bound' to a nontrivial user event;
2102
+ * i.e. the result of some actions via `atk_action_do_action()` may be
2103
+ * NIL.
2104
+ * @param i the action index corresponding to the action to be performed
2105
+ * @virtual
2106
+ */
2107
+ vfunc_get_name(i: number): string | null;
2108
+
2109
+ /**
2110
+ * @param args
2111
+ * @virtual
2112
+ */
2113
+ // Conflicted with Atk.Object.vfunc_get_name
2114
+ vfunc_get_name(...args: never[]): any;
2115
+
2116
+ /**
2117
+ * Sets a description of the specified action of the object.
2118
+ * @param i the action index corresponding to the action to be performed
2119
+ * @param desc the description to be assigned to this action
2120
+ * @virtual
2121
+ */
2122
+ vfunc_set_description(i: number, desc: string): boolean;
2123
+
2124
+ /**
2125
+ * @param args
2126
+ * @virtual
2127
+ */
2128
+ // Conflicted with Atk.Object.vfunc_set_description
2129
+ vfunc_set_description(...args: never[]): any;
2130
+
2131
+ /**
2132
+ * Checks whether the specified point is within the extent of the `component`.
2133
+ *
2134
+ * Toolkit implementor note: ATK provides a default implementation for
2135
+ * this virtual method. In general there are little reason to
2136
+ * re-implement it.
2137
+ * @param x x coordinate
2138
+ * @param y y coordinate
2139
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
2140
+ * @returns `true` or `false` indicating whether the specified point is within the extent of the `component` or not
2141
+ */
2142
+ contains(x: number, y: number, coord_type: Atk.CoordType): boolean;
2143
+
2144
+ /**
2145
+ * Returns the alpha value (i.e. the opacity) for this
2146
+ * `component`, on a scale from 0 (fully transparent) to 1.0
2147
+ * (fully opaque).
2148
+ * @returns An alpha value from 0 to 1.0, inclusive.
2149
+ */
2150
+ get_alpha(): number;
2151
+
2152
+ /**
2153
+ * Gets the rectangle which gives the extent of the `component`.
2154
+ *
2155
+ * If the extent can not be obtained (e.g. a non-embedded plug or missing
2156
+ * support), all of x, y, width, height are set to -1.
2157
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
2158
+ */
2159
+ get_extents(coord_type: Atk.CoordType): [number, number, number, number];
2160
+
2161
+ /**
2162
+ * Gets the layer of the component.
2163
+ * @returns an {@link Atk.Layer} which is the layer of the component
2164
+ */
2165
+ get_layer(): Atk.Layer;
2166
+
2167
+ /**
2168
+ * Gets the zorder of the component. The value G_MININT will be returned
2169
+ * if the layer of the component is not ATK_LAYER_MDI or ATK_LAYER_WINDOW.
2170
+ * @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.
2171
+ */
2172
+ get_mdi_zorder(): number;
2173
+
2174
+ /**
2175
+ * Gets the position of `component` in the form of
2176
+ * a point specifying `component`'s top-left corner.
2177
+ *
2178
+ * If the position can not be obtained (e.g. a non-embedded plug or missing
2179
+ * support), x and y are set to -1.
2180
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
2181
+ */
2182
+ get_position(coord_type: Atk.CoordType): [number, number];
2183
+
2184
+ /**
2185
+ * Gets the size of the `component` in terms of width and height.
2186
+ *
2187
+ * If the size can not be obtained (e.g. a non-embedded plug or missing
2188
+ * support), width and height are set to -1.
2189
+ */
2190
+ get_size(): [number, number];
2191
+
2192
+ /**
2193
+ * Grabs focus for this `component`.
2194
+ * @returns `true` if successful, `false` otherwise.
2195
+ */
2196
+ grab_focus(): boolean;
2197
+
2198
+ /**
2199
+ * Gets a reference to the accessible child, if one exists, at the
2200
+ * coordinate point specified by `x` and `y`.
2201
+ * @param x x coordinate
2202
+ * @param y y coordinate
2203
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
2204
+ * @returns a reference to the accessible child, if one exists
2205
+ */
2206
+ ref_accessible_at_point(x: number, y: number, coord_type: Atk.CoordType): Atk.Object | null;
2207
+
2208
+ /**
2209
+ * Remove the handler specified by `handler_id` from the list of
2210
+ * functions to be executed when this object receives focus events
2211
+ * (in or out).
2212
+ * @param handler_id the handler id of the focus handler to be removed from `component`
2213
+ */
2214
+ remove_focus_handler(handler_id: number): void;
2215
+
2216
+ /**
2217
+ * Makes `component` visible on the screen by scrolling all necessary parents.
2218
+ *
2219
+ * Contrary to atk_component_set_position, this does not actually move
2220
+ * `component` in its parent, this only makes the parents scroll so that the
2221
+ * object shows up on the screen, given its current position within the parents.
2222
+ * @param type specify where the object should be made visible.
2223
+ * @returns whether scrolling was successful.
2224
+ */
2225
+ scroll_to(type: Atk.ScrollType): boolean;
2226
+
2227
+ /**
2228
+ * Move the top-left of `component` to a given position of the screen by
2229
+ * scrolling all necessary parents.
2230
+ * @param coords specify whether coordinates are relative to the screen or to the parent object.
2231
+ * @param x x-position where to scroll to
2232
+ * @param y y-position where to scroll to
2233
+ * @returns whether scrolling was successful.
2234
+ */
2235
+ scroll_to_point(coords: Atk.CoordType, x: number, y: number): boolean;
2236
+
2237
+ /**
2238
+ * Sets the extents of `component`.
2239
+ * @param x x coordinate
2240
+ * @param y y coordinate
2241
+ * @param width width to set for `component`
2242
+ * @param height height to set for `component`
2243
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
2244
+ * @returns `true` or `false` whether the extents were set or not
2245
+ */
2246
+ set_extents(x: number, y: number, width: number, height: number, coord_type: Atk.CoordType): boolean;
2247
+
2248
+ /**
2249
+ * Sets the position of `component`.
2250
+ *
2251
+ * Contrary to atk_component_scroll_to, this does not trigger any scrolling,
2252
+ * this just moves `component` in its parent.
2253
+ * @param x x coordinate
2254
+ * @param y y coordinate
2255
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the component's top level window
2256
+ * @returns `true` or `false` whether or not the position was set or not
2257
+ */
2258
+ set_position(x: number, y: number, coord_type: Atk.CoordType): boolean;
2259
+
2260
+ /**
2261
+ * Set the size of the `component` in terms of width and height.
2262
+ * @param width width to set for `component`
2263
+ * @param height height to set for `component`
2264
+ * @returns `true` or `false` whether the size was set or not
2265
+ */
2266
+ set_size(width: number, height: number): boolean;
2267
+
2268
+ /**
2269
+ * @param bounds
2270
+ * @virtual
2271
+ */
2272
+ vfunc_bounds_changed(bounds: Atk.Rectangle): void;
2273
+
2274
+ /**
2275
+ * Checks whether the specified point is within the extent of the `component`.
2276
+ *
2277
+ * Toolkit implementor note: ATK provides a default implementation for
2278
+ * this virtual method. In general there are little reason to
2279
+ * re-implement it.
2280
+ * @param x x coordinate
2281
+ * @param y y coordinate
2282
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
2283
+ * @virtual
2284
+ */
2285
+ vfunc_contains(x: number, y: number, coord_type: Atk.CoordType): boolean;
2286
+
2287
+ /**
2288
+ * Returns the alpha value (i.e. the opacity) for this
2289
+ * `component`, on a scale from 0 (fully transparent) to 1.0
2290
+ * (fully opaque).
2291
+ * @virtual
2292
+ */
2293
+ vfunc_get_alpha(): number;
2294
+
2295
+ /**
2296
+ * Gets the rectangle which gives the extent of the `component`.
2297
+ *
2298
+ * If the extent can not be obtained (e.g. a non-embedded plug or missing
2299
+ * support), all of x, y, width, height are set to -1.
2300
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
2301
+ * @virtual
2302
+ */
2303
+ vfunc_get_extents(coord_type: Atk.CoordType): [number, number, number, number];
2304
+
2305
+ /**
2306
+ * Gets the layer of the component.
2307
+ * @virtual
2308
+ */
2309
+ vfunc_get_layer(): Atk.Layer;
2310
+
2311
+ /**
2312
+ * Gets the zorder of the component. The value G_MININT will be returned
2313
+ * if the layer of the component is not ATK_LAYER_MDI or ATK_LAYER_WINDOW.
2314
+ * @virtual
2315
+ */
2316
+ vfunc_get_mdi_zorder(): number;
2317
+
2318
+ /**
2319
+ * Gets the position of `component` in the form of
2320
+ * a point specifying `component`'s top-left corner.
2321
+ *
2322
+ * If the position can not be obtained (e.g. a non-embedded plug or missing
2323
+ * support), x and y are set to -1.
2324
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
2325
+ * @virtual
2326
+ */
2327
+ vfunc_get_position(coord_type: Atk.CoordType): [number, number];
2328
+
2329
+ /**
2330
+ * Gets the size of the `component` in terms of width and height.
2331
+ *
2332
+ * If the size can not be obtained (e.g. a non-embedded plug or missing
2333
+ * support), width and height are set to -1.
2334
+ * @virtual
2335
+ */
2336
+ vfunc_get_size(): [number, number];
2337
+
2338
+ /**
2339
+ * Grabs focus for this `component`.
2340
+ * @virtual
2341
+ */
2342
+ vfunc_grab_focus(): boolean;
2343
+
2344
+ /**
2345
+ * Gets a reference to the accessible child, if one exists, at the
2346
+ * coordinate point specified by `x` and `y`.
2347
+ * @param x x coordinate
2348
+ * @param y y coordinate
2349
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
2350
+ * @virtual
2351
+ */
2352
+ vfunc_ref_accessible_at_point(x: number, y: number, coord_type: Atk.CoordType): Atk.Object | null;
2353
+
2354
+ /**
2355
+ * Remove the handler specified by `handler_id` from the list of
2356
+ * functions to be executed when this object receives focus events
2357
+ * (in or out).
2358
+ * @param handler_id the handler id of the focus handler to be removed from `component`
2359
+ * @virtual
2360
+ */
2361
+ vfunc_remove_focus_handler(handler_id: number): void;
2362
+
2363
+ /**
2364
+ * Makes `component` visible on the screen by scrolling all necessary parents.
2365
+ *
2366
+ * Contrary to atk_component_set_position, this does not actually move
2367
+ * `component` in its parent, this only makes the parents scroll so that the
2368
+ * object shows up on the screen, given its current position within the parents.
2369
+ * @param type specify where the object should be made visible.
2370
+ * @virtual
2371
+ */
2372
+ vfunc_scroll_to(type: Atk.ScrollType): boolean;
2373
+
2374
+ /**
2375
+ * Move the top-left of `component` to a given position of the screen by
2376
+ * scrolling all necessary parents.
2377
+ * @param coords specify whether coordinates are relative to the screen or to the parent object.
2378
+ * @param x x-position where to scroll to
2379
+ * @param y y-position where to scroll to
2380
+ * @virtual
2381
+ */
2382
+ vfunc_scroll_to_point(coords: Atk.CoordType, x: number, y: number): boolean;
2383
+
2384
+ /**
2385
+ * Sets the extents of `component`.
2386
+ * @param x x coordinate
2387
+ * @param y y coordinate
2388
+ * @param width width to set for `component`
2389
+ * @param height height to set for `component`
2390
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
2391
+ * @virtual
2392
+ */
2393
+ vfunc_set_extents(x: number, y: number, width: number, height: number, coord_type: Atk.CoordType): boolean;
2394
+
2395
+ /**
2396
+ * Sets the position of `component`.
2397
+ *
2398
+ * Contrary to atk_component_scroll_to, this does not trigger any scrolling,
2399
+ * this just moves `component` in its parent.
2400
+ * @param x x coordinate
2401
+ * @param y y coordinate
2402
+ * @param coord_type specifies whether the coordinates are relative to the screen or to the component's top level window
2403
+ * @virtual
2404
+ */
2405
+ vfunc_set_position(x: number, y: number, coord_type: Atk.CoordType): boolean;
2406
+
2407
+ /**
2408
+ * Set the size of the `component` in terms of width and height.
2409
+ * @param width width to set for `component`
2410
+ * @param height height to set for `component`
2411
+ * @virtual
2412
+ */
2413
+ vfunc_set_size(width: number, height: number): boolean;
2414
+
2415
+ /**
2416
+ * Copy text from `start_pos` up to, but not including `end_pos`
2417
+ * to the clipboard.
2418
+ * @param start_pos start position
2419
+ * @param end_pos end position
2420
+ */
2421
+ copy_text(start_pos: number, end_pos: number): void;
2422
+
2423
+ /**
2424
+ * Copy text from `start_pos` up to, but not including `end_pos`
2425
+ * to the clipboard and then delete from the widget.
2426
+ * @param start_pos start position
2427
+ * @param end_pos end position
2428
+ */
2429
+ cut_text(start_pos: number, end_pos: number): void;
2430
+
2431
+ /**
2432
+ * Delete text `start_pos` up to, but not including `end_pos`.
2433
+ * @param start_pos start position
2434
+ * @param end_pos end position
2435
+ */
2436
+ delete_text(start_pos: number, end_pos: number): void;
2437
+
2438
+ /**
2439
+ * Insert text at a given position.
2440
+ * @param string the text to insert
2441
+ * @param length the length of text to insert, in bytes
2442
+ * @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.
2443
+ */
2444
+ insert_text(string: string, length: number, position: number): void;
2445
+
2446
+ /**
2447
+ * Paste text from clipboard to specified `position`.
2448
+ * @param position position to paste
2449
+ */
2450
+ paste_text(position: number): void;
2451
+
2452
+ /**
2453
+ * Sets the attributes for a specified range. See the ATK_ATTRIBUTE
2454
+ * macros (such as #ATK_ATTRIBUTE_LEFT_MARGIN) for examples of attributes
2455
+ * that can be set. Note that other attributes that do not have corresponding
2456
+ * ATK_ATTRIBUTE macros may also be set for certain text widgets.
2457
+ * @param attrib_set an {@link Atk.AttributeSet}
2458
+ * @param start_offset start of range in which to set attributes
2459
+ * @param end_offset end of range in which to set attributes
2460
+ * @returns `true` if attributes successfully set for the specified range, otherwise `false`
2461
+ */
2462
+ set_run_attributes(attrib_set: Atk.AttributeSet, start_offset: number, end_offset: number): boolean;
2463
+
2464
+ /**
2465
+ * Set text contents of `text`.
2466
+ * @param string string to set for text contents of `text`
2467
+ */
2468
+ set_text_contents(string: string): void;
2469
+
2470
+ /**
2471
+ * Copy text from `start_pos` up to, but not including `end_pos`
2472
+ * to the clipboard.
2473
+ * @param start_pos start position
2474
+ * @param end_pos end position
2475
+ * @virtual
2476
+ */
2477
+ vfunc_copy_text(start_pos: number, end_pos: number): void;
2478
+
2479
+ /**
2480
+ * Copy text from `start_pos` up to, but not including `end_pos`
2481
+ * to the clipboard and then delete from the widget.
2482
+ * @param start_pos start position
2483
+ * @param end_pos end position
2484
+ * @virtual
2485
+ */
2486
+ vfunc_cut_text(start_pos: number, end_pos: number): void;
2487
+
2488
+ /**
2489
+ * Delete text `start_pos` up to, but not including `end_pos`.
2490
+ * @param start_pos start position
2491
+ * @param end_pos end position
2492
+ * @virtual
2493
+ */
2494
+ vfunc_delete_text(start_pos: number, end_pos: number): void;
2495
+
2496
+ /**
2497
+ * Insert text at a given position.
2498
+ * @param string the text to insert
2499
+ * @param length the length of text to insert, in bytes
2500
+ * @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.
2501
+ * @virtual
2502
+ */
2503
+ vfunc_insert_text(string: string, length: number, position: number): void;
2504
+
2505
+ /**
2506
+ * Paste text from clipboard to specified `position`.
2507
+ * @param position position to paste
2508
+ * @virtual
2509
+ */
2510
+ vfunc_paste_text(position: number): void;
2511
+
2512
+ /**
2513
+ * Sets the attributes for a specified range. See the ATK_ATTRIBUTE
2514
+ * macros (such as #ATK_ATTRIBUTE_LEFT_MARGIN) for examples of attributes
2515
+ * that can be set. Note that other attributes that do not have corresponding
2516
+ * ATK_ATTRIBUTE macros may also be set for certain text widgets.
2517
+ * @param attrib_set an {@link Atk.AttributeSet}
2518
+ * @param start_offset start of range in which to set attributes
2519
+ * @param end_offset end of range in which to set attributes
2520
+ * @virtual
2521
+ */
2522
+ vfunc_set_run_attributes(attrib_set: Atk.AttributeSet, start_offset: number, end_offset: number): boolean;
2523
+
2524
+ /**
2525
+ * Set text contents of `text`.
2526
+ * @param string string to set for text contents of `text`
2527
+ * @virtual
2528
+ */
2529
+ vfunc_set_text_contents(string: string): void;
2530
+
2531
+ /**
2532
+ * Adds a selection bounded by the specified offsets.
2533
+ * @param start_offset the starting character offset of the selected region
2534
+ * @param end_offset the offset of the first character after the selected region.
2535
+ * @returns `true` if successful, `false` otherwise
2536
+ */
2537
+ add_selection(start_offset: number, end_offset: number): boolean;
2538
+
2539
+ /**
2540
+ * Get the ranges of text in the specified bounding box.
2541
+ * @param rect An AtkTextRectangle giving the dimensions of the bounding box.
2542
+ * @param coord_type Specify whether coordinates are relative to the screen or widget window.
2543
+ * @param x_clip_type Specify the horizontal clip type.
2544
+ * @param y_clip_type Specify the vertical clip type.
2545
+ * @returns Array of AtkTextRange. The last element of the array returned by this function will be NULL.
2546
+ */
2547
+ get_bounded_ranges(rect: Atk.TextRectangle, coord_type: Atk.CoordType, x_clip_type: Atk.TextClipType, y_clip_type: Atk.TextClipType): Atk.TextRange[];
2548
+
2549
+ /**
2550
+ * Gets the offset of the position of the caret (cursor).
2551
+ * @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.
2552
+ */
2553
+ get_caret_offset(): number;
2554
+
2555
+ /**
2556
+ * Gets the specified text.
2557
+ * @param offset a character offset within `text`
2558
+ * @returns the character at `offset` or 0 in the case of failure.
2559
+ */
2560
+ get_character_at_offset(offset: number): string;
2561
+
2562
+ /**
2563
+ * Gets the character count.
2564
+ * @returns the number of characters or -1 in case of failure.
2565
+ */
2566
+ get_character_count(): number;
2567
+
2568
+ /**
2569
+ * If the extent can not be obtained (e.g. missing support), all of x, y, width,
2570
+ * height are set to -1.
2571
+ *
2572
+ * Get the bounding box containing the glyph representing the character at
2573
+ * a particular text offset.
2574
+ * @param offset The offset of the text character for which bounding information is required.
2575
+ * @param coords specify whether coordinates are relative to the screen or widget window
2576
+ */
2577
+ get_character_extents(offset: number, coords: Atk.CoordType): [number, number, number, number];
2578
+
2579
+ /**
2580
+ * Creates an {@link Atk.AttributeSet} which consists of the default values of
2581
+ * attributes for the text. See the enum AtkTextAttribute for types of text
2582
+ * attributes that can be returned. Note that other attributes may also be
2583
+ * returned.
2584
+ * @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()`.
2585
+ */
2586
+ get_default_attributes(): Atk.AttributeSet;
2587
+
2588
+ /**
2589
+ * Gets the number of selected regions.
2590
+ * @returns The number of selected regions, or -1 in the case of failure.
2591
+ */
2592
+ get_n_selections(): number;
2593
+
2594
+ /**
2595
+ * Gets the offset of the character located at coordinates `x` and `y`. `x` and `y`
2596
+ * are interpreted as being relative to the screen or this widget's window
2597
+ * depending on `coords`.
2598
+ * @param x screen x-position of character
2599
+ * @param y screen y-position of character
2600
+ * @param coords specify whether coordinates are relative to the screen or widget window
2601
+ * @returns the offset to the character which is located at the specified `x` and `y` coordinates of -1 in case of failure.
2602
+ */
2603
+ get_offset_at_point(x: number, y: number, coords: Atk.CoordType): number;
2604
+
2605
+ /**
2606
+ * Get the bounding box for text within the specified range.
2607
+ *
2608
+ * If the extents can not be obtained (e.g. or missing support), the rectangle
2609
+ * fields are set to -1.
2610
+ * @param start_offset The offset of the first text character for which boundary information is required.
2611
+ * @param end_offset The offset of the text character after the last character for which boundary information is required.
2612
+ * @param coord_type Specify whether coordinates are relative to the screen or widget window.
2613
+ */
2614
+ get_range_extents(start_offset: number, end_offset: number, coord_type: Atk.CoordType): Atk.TextRectangle;
2615
+
2616
+ /**
2617
+ * Creates an {@link Atk.AttributeSet} which consists of the attributes explicitly
2618
+ * set at the position `offset` in the text. `start_offset` and `end_offset` are
2619
+ * set to the start and end of the range around `offset` where the attributes are
2620
+ * invariant. Note that `end_offset` is the offset of the first character
2621
+ * after the range. See the enum AtkTextAttribute for types of text
2622
+ * attributes that can be returned. Note that other attributes may also be
2623
+ * returned.
2624
+ * @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.
2625
+ * @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()`.
2626
+ */
2627
+ get_run_attributes(offset: number): [Atk.AttributeSet, number, number];
2628
+
2629
+ /**
2630
+ * Gets the text from the specified selection.
2631
+ * @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.
2632
+ * @returns a newly allocated string containing the selected text. Use `g_free()` to free the returned string.
2633
+ */
2634
+ get_selection(selection_num: number): [string, number, number];
2635
+
2636
+ /**
2637
+ * Gets a portion of the text exposed through an {@link Atk.Text} according to a given `offset`
2638
+ * and a specific `granularity`, along with the start and end offsets defining the
2639
+ * boundaries of such a portion of text.
2640
+ *
2641
+ * If `granularity` is ATK_TEXT_GRANULARITY_CHAR the character at the
2642
+ * offset is returned.
2643
+ *
2644
+ * If `granularity` is ATK_TEXT_GRANULARITY_WORD the returned string
2645
+ * is from the word start at or before the offset to the word start after
2646
+ * the offset.
2647
+ *
2648
+ * The returned string will contain the word at the offset if the offset
2649
+ * is inside a word and will contain the word before the offset if the
2650
+ * offset is not inside a word.
2651
+ *
2652
+ * If `granularity` is ATK_TEXT_GRANULARITY_SENTENCE the returned string
2653
+ * is from the sentence start at or before the offset to the sentence
2654
+ * start after the offset.
2655
+ *
2656
+ * The returned string will contain the sentence at the offset if the offset
2657
+ * is inside a sentence and will contain the sentence before the offset
2658
+ * if the offset is not inside a sentence.
2659
+ *
2660
+ * If `granularity` is ATK_TEXT_GRANULARITY_LINE the returned string
2661
+ * is from the line start at or before the offset to the line
2662
+ * start after the offset.
2663
+ *
2664
+ * If `granularity` is ATK_TEXT_GRANULARITY_PARAGRAPH the returned string
2665
+ * is from the start of the paragraph at or before the offset to the start
2666
+ * of the following paragraph after the offset.
2667
+ * @param offset position
2668
+ * @param granularity An {@link Atk.TextGranularity}
2669
+ * @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.
2670
+ */
2671
+ get_string_at_offset(offset: number, granularity: Atk.TextGranularity): [string | null, number, number];
2672
+
2673
+ /**
2674
+ * Gets the specified text.
2675
+ * @param start_offset a starting character offset within `text`
2676
+ * @param end_offset an ending character offset within `text`, or -1 for the end of the string.
2677
+ * @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.
2678
+ */
2679
+ get_text(start_offset: number, end_offset: number): string;
2680
+
2681
+ /**
2682
+ * Gets the specified text.
2683
+ * @param offset position
2684
+ * @param boundary_type An {@link Atk.TextBoundary}
2685
+ * @returns a newly allocated string containing the text after `offset` bounded by the specified `boundary_type`. Use `g_free()` to free the returned string.
2686
+ */
2687
+ get_text_after_offset(offset: number, boundary_type: Atk.TextBoundary): [string, number, number];
2688
+
2689
+ /**
2690
+ * Gets the specified text.
2691
+ *
2692
+ * If the boundary_type if ATK_TEXT_BOUNDARY_CHAR the character at the
2693
+ * offset is returned.
2694
+ *
2695
+ * If the boundary_type is ATK_TEXT_BOUNDARY_WORD_START the returned string
2696
+ * is from the word start at or before the offset to the word start after
2697
+ * the offset.
2698
+ *
2699
+ * The returned string will contain the word at the offset if the offset
2700
+ * is inside a word and will contain the word before the offset if the
2701
+ * offset is not inside a word.
2702
+ *
2703
+ * If the boundary type is ATK_TEXT_BOUNDARY_SENTENCE_START the returned
2704
+ * string is from the sentence start at or before the offset to the sentence
2705
+ * start after the offset.
2706
+ *
2707
+ * The returned string will contain the sentence at the offset if the offset
2708
+ * is inside a sentence and will contain the sentence before the offset
2709
+ * if the offset is not inside a sentence.
2710
+ *
2711
+ * If the boundary type is ATK_TEXT_BOUNDARY_LINE_START the returned
2712
+ * string is from the line start at or before the offset to the line
2713
+ * start after the offset.
2714
+ * @param offset position
2715
+ * @param boundary_type An {@link Atk.TextBoundary}
2716
+ * @returns a newly allocated string containing the text at `offset` bounded by the specified `boundary_type`. Use `g_free()` to free the returned string.
2717
+ */
2718
+ get_text_at_offset(offset: number, boundary_type: Atk.TextBoundary): [string, number, number];
2719
+
2720
+ /**
2721
+ * Gets the specified text.
2722
+ * @param offset position
2723
+ * @param boundary_type An {@link Atk.TextBoundary}
2724
+ * @returns a newly allocated string containing the text before `offset` bounded by the specified `boundary_type`. Use `g_free()` to free the returned string.
2725
+ */
2726
+ get_text_before_offset(offset: number, boundary_type: Atk.TextBoundary): [string, number, number];
2727
+
2728
+ /**
2729
+ * Removes the specified selection.
2730
+ * @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.
2731
+ * @returns `true` if successful, `false` otherwise
2732
+ */
2733
+ remove_selection(selection_num: number): boolean;
2734
+
2735
+ /**
2736
+ * Makes a substring of `text` visible on the screen by scrolling all necessary parents.
2737
+ * @param start_offset start offset in the `text`
2738
+ * @param end_offset end offset in the `text`, or -1 for the end of the text.
2739
+ * @param type specify where the object should be made visible.
2740
+ * @returns whether scrolling was successful.
2741
+ */
2742
+ scroll_substring_to(start_offset: number, end_offset: number, type: Atk.ScrollType): boolean;
2743
+
2744
+ /**
2745
+ * Move the top-left of a substring of `text` to a given position of the screen
2746
+ * by scrolling all necessary parents.
2747
+ * @param start_offset start offset in the `text`
2748
+ * @param end_offset end offset in the `text`, or -1 for the end of the text.
2749
+ * @param coords specify whether coordinates are relative to the screen or to the parent object.
2750
+ * @param x x-position where to scroll to
2751
+ * @param y y-position where to scroll to
2752
+ * @returns whether scrolling was successful.
2753
+ */
2754
+ scroll_substring_to_point(start_offset: number, end_offset: number, coords: Atk.CoordType, x: number, y: number): boolean;
2755
+
2756
+ /**
2757
+ * Sets the caret (cursor) position to the specified `offset`.
2758
+ *
2759
+ * In the case of rich-text content, this method should either grab focus
2760
+ * or move the sequential focus navigation starting point (if the application
2761
+ * supports this concept) as if the user had clicked on the new caret position.
2762
+ * Typically, this means that the target of this operation is the node containing
2763
+ * the new caret position or one of its ancestors. In other words, after this
2764
+ * method is called, if the user advances focus, it should move to the first
2765
+ * focusable node following the new caret position.
2766
+ *
2767
+ * Calling this method should also scroll the application viewport in a way
2768
+ * that matches the behavior of the application's typical caret motion or tab
2769
+ * navigation as closely as possible. This also means that if the application's
2770
+ * caret motion or focus navigation does not trigger a scroll operation, this
2771
+ * method should not trigger one either. If the application does not have a caret
2772
+ * motion or focus navigation operation, this method should try to scroll the new
2773
+ * caret position into view while minimizing unnecessary scroll motion.
2774
+ * @param offset the character offset of the new caret position
2775
+ * @returns `true` if successful, `false` otherwise.
2776
+ */
2777
+ set_caret_offset(offset: number): boolean;
2778
+
2779
+ /**
2780
+ * Changes the start and end offset of the specified selection.
2781
+ * @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.
2782
+ * @param start_offset the new starting character offset of the selection
2783
+ * @param end_offset the new end position of (e.g. offset immediately past) the selection
2784
+ * @returns `true` if successful, `false` otherwise
2785
+ */
2786
+ set_selection(selection_num: number, start_offset: number, end_offset: number): boolean;
2787
+
2788
+ /**
2789
+ * Adds a selection bounded by the specified offsets.
2790
+ * @param start_offset the starting character offset of the selected region
2791
+ * @param end_offset the offset of the first character after the selected region.
2792
+ * @virtual
2793
+ */
2794
+ vfunc_add_selection(start_offset: number, end_offset: number): boolean;
2795
+
2796
+ /**
2797
+ * Get the ranges of text in the specified bounding box.
2798
+ * @param rect An AtkTextRectangle giving the dimensions of the bounding box.
2799
+ * @param coord_type Specify whether coordinates are relative to the screen or widget window.
2800
+ * @param x_clip_type Specify the horizontal clip type.
2801
+ * @param y_clip_type Specify the vertical clip type.
2802
+ * @virtual
2803
+ */
2804
+ vfunc_get_bounded_ranges(rect: Atk.TextRectangle, coord_type: Atk.CoordType, x_clip_type: Atk.TextClipType, y_clip_type: Atk.TextClipType): Atk.TextRange[];
2805
+
2806
+ /**
2807
+ * Gets the offset of the position of the caret (cursor).
2808
+ * @virtual
2809
+ */
2810
+ vfunc_get_caret_offset(): number;
2811
+
2812
+ /**
2813
+ * Gets the specified text.
2814
+ * @param offset a character offset within `text`
2815
+ * @virtual
2816
+ */
2817
+ vfunc_get_character_at_offset(offset: number): string;
2818
+
2819
+ /**
2820
+ * Gets the character count.
2821
+ * @virtual
2822
+ */
2823
+ vfunc_get_character_count(): number;
2824
+
2825
+ /**
2826
+ * If the extent can not be obtained (e.g. missing support), all of x, y, width,
2827
+ * height are set to -1.
2828
+ *
2829
+ * Get the bounding box containing the glyph representing the character at
2830
+ * a particular text offset.
2831
+ * @param offset The offset of the text character for which bounding information is required.
2832
+ * @param coords specify whether coordinates are relative to the screen or widget window
2833
+ * @virtual
2834
+ */
2835
+ vfunc_get_character_extents(offset: number, coords: Atk.CoordType): [number, number, number, number];
2836
+
2837
+ /**
2838
+ * Creates an {@link Atk.AttributeSet} which consists of the default values of
2839
+ * attributes for the text. See the enum AtkTextAttribute for types of text
2840
+ * attributes that can be returned. Note that other attributes may also be
2841
+ * returned.
2842
+ * @virtual
2843
+ */
2844
+ vfunc_get_default_attributes(): Atk.AttributeSet;
2845
+
2846
+ /**
2847
+ * Gets the number of selected regions.
2848
+ * @virtual
2849
+ */
2850
+ vfunc_get_n_selections(): number;
2851
+
2852
+ /**
2853
+ * Gets the offset of the character located at coordinates `x` and `y`. `x` and `y`
2854
+ * are interpreted as being relative to the screen or this widget's window
2855
+ * depending on `coords`.
2856
+ * @param x screen x-position of character
2857
+ * @param y screen y-position of character
2858
+ * @param coords specify whether coordinates are relative to the screen or widget window
2859
+ * @virtual
2860
+ */
2861
+ vfunc_get_offset_at_point(x: number, y: number, coords: Atk.CoordType): number;
2862
+
2863
+ /**
2864
+ * Get the bounding box for text within the specified range.
2865
+ *
2866
+ * If the extents can not be obtained (e.g. or missing support), the rectangle
2867
+ * fields are set to -1.
2868
+ * @param start_offset The offset of the first text character for which boundary information is required.
2869
+ * @param end_offset The offset of the text character after the last character for which boundary information is required.
2870
+ * @param coord_type Specify whether coordinates are relative to the screen or widget window.
2871
+ * @virtual
2872
+ */
2873
+ vfunc_get_range_extents(start_offset: number, end_offset: number, coord_type: Atk.CoordType): Atk.TextRectangle;
2874
+
2875
+ /**
2876
+ * Creates an {@link Atk.AttributeSet} which consists of the attributes explicitly
2877
+ * set at the position `offset` in the text. `start_offset` and `end_offset` are
2878
+ * set to the start and end of the range around `offset` where the attributes are
2879
+ * invariant. Note that `end_offset` is the offset of the first character
2880
+ * after the range. See the enum AtkTextAttribute for types of text
2881
+ * attributes that can be returned. Note that other attributes may also be
2882
+ * returned.
2883
+ * @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.
2884
+ * @virtual
2885
+ */
2886
+ vfunc_get_run_attributes(offset: number): [Atk.AttributeSet, number, number];
2887
+
2888
+ /**
2889
+ * Gets the text from the specified selection.
2890
+ * @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.
2891
+ * @virtual
2892
+ */
2893
+ vfunc_get_selection(selection_num: number): [string, number, number];
2894
+
2895
+ /**
2896
+ * Gets a portion of the text exposed through an {@link Atk.Text} according to a given `offset`
2897
+ * and a specific `granularity`, along with the start and end offsets defining the
2898
+ * boundaries of such a portion of text.
2899
+ *
2900
+ * If `granularity` is ATK_TEXT_GRANULARITY_CHAR the character at the
2901
+ * offset is returned.
2902
+ *
2903
+ * If `granularity` is ATK_TEXT_GRANULARITY_WORD the returned string
2904
+ * is from the word start at or before the offset to the word start after
2905
+ * the offset.
2906
+ *
2907
+ * The returned string will contain the word at the offset if the offset
2908
+ * is inside a word and will contain the word before the offset if the
2909
+ * offset is not inside a word.
2910
+ *
2911
+ * If `granularity` is ATK_TEXT_GRANULARITY_SENTENCE the returned string
2912
+ * is from the sentence start at or before the offset to the sentence
2913
+ * start after the offset.
2914
+ *
2915
+ * The returned string will contain the sentence at the offset if the offset
2916
+ * is inside a sentence and will contain the sentence before the offset
2917
+ * if the offset is not inside a sentence.
2918
+ *
2919
+ * If `granularity` is ATK_TEXT_GRANULARITY_LINE the returned string
2920
+ * is from the line start at or before the offset to the line
2921
+ * start after the offset.
2922
+ *
2923
+ * If `granularity` is ATK_TEXT_GRANULARITY_PARAGRAPH the returned string
2924
+ * is from the start of the paragraph at or before the offset to the start
2925
+ * of the following paragraph after the offset.
2926
+ * @param offset position
2927
+ * @param granularity An {@link Atk.TextGranularity}
2928
+ * @virtual
2929
+ */
2930
+ vfunc_get_string_at_offset(offset: number, granularity: Atk.TextGranularity): [string | null, number, number];
2931
+
2932
+ /**
2933
+ * Gets the specified text.
2934
+ * @param start_offset a starting character offset within `text`
2935
+ * @param end_offset an ending character offset within `text`, or -1 for the end of the string.
2936
+ * @virtual
2937
+ */
2938
+ vfunc_get_text(start_offset: number, end_offset: number): string;
2939
+
2940
+ /**
2941
+ * Gets the specified text.
2942
+ * @param offset position
2943
+ * @param boundary_type An {@link Atk.TextBoundary}
2944
+ * @virtual
2945
+ */
2946
+ vfunc_get_text_after_offset(offset: number, boundary_type: Atk.TextBoundary): [string, number, number];
2947
+
2948
+ /**
2949
+ * Gets the specified text.
2950
+ *
2951
+ * If the boundary_type if ATK_TEXT_BOUNDARY_CHAR the character at the
2952
+ * offset is returned.
2953
+ *
2954
+ * If the boundary_type is ATK_TEXT_BOUNDARY_WORD_START the returned string
2955
+ * is from the word start at or before the offset to the word start after
2956
+ * the offset.
2957
+ *
2958
+ * The returned string will contain the word at the offset if the offset
2959
+ * is inside a word and will contain the word before the offset if the
2960
+ * offset is not inside a word.
2961
+ *
2962
+ * If the boundary type is ATK_TEXT_BOUNDARY_SENTENCE_START the returned
2963
+ * string is from the sentence start at or before the offset to the sentence
2964
+ * start after the offset.
2965
+ *
2966
+ * The returned string will contain the sentence at the offset if the offset
2967
+ * is inside a sentence and will contain the sentence before the offset
2968
+ * if the offset is not inside a sentence.
2969
+ *
2970
+ * If the boundary type is ATK_TEXT_BOUNDARY_LINE_START the returned
2971
+ * string is from the line start at or before the offset to the line
2972
+ * start after the offset.
2973
+ * @param offset position
2974
+ * @param boundary_type An {@link Atk.TextBoundary}
2975
+ * @virtual
2976
+ */
2977
+ vfunc_get_text_at_offset(offset: number, boundary_type: Atk.TextBoundary): [string, number, number];
2978
+
2979
+ /**
2980
+ * Gets the specified text.
2981
+ * @param offset position
2982
+ * @param boundary_type An {@link Atk.TextBoundary}
2983
+ * @virtual
2984
+ */
2985
+ vfunc_get_text_before_offset(offset: number, boundary_type: Atk.TextBoundary): [string, number, number];
2986
+
2987
+ /**
2988
+ * Removes the specified selection.
2989
+ * @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.
2990
+ * @virtual
2991
+ */
2992
+ vfunc_remove_selection(selection_num: number): boolean;
2993
+
2994
+ /**
2995
+ * Makes a substring of `text` visible on the screen by scrolling all necessary parents.
2996
+ * @param start_offset start offset in the `text`
2997
+ * @param end_offset end offset in the `text`, or -1 for the end of the text.
2998
+ * @param type specify where the object should be made visible.
2999
+ * @virtual
3000
+ */
3001
+ vfunc_scroll_substring_to(start_offset: number, end_offset: number, type: Atk.ScrollType): boolean;
3002
+
3003
+ /**
3004
+ * Move the top-left of a substring of `text` to a given position of the screen
3005
+ * by scrolling all necessary parents.
3006
+ * @param start_offset start offset in the `text`
3007
+ * @param end_offset end offset in the `text`, or -1 for the end of the text.
3008
+ * @param coords specify whether coordinates are relative to the screen or to the parent object.
3009
+ * @param x x-position where to scroll to
3010
+ * @param y y-position where to scroll to
3011
+ * @virtual
3012
+ */
3013
+ vfunc_scroll_substring_to_point(start_offset: number, end_offset: number, coords: Atk.CoordType, x: number, y: number): boolean;
3014
+
3015
+ /**
3016
+ * Sets the caret (cursor) position to the specified `offset`.
3017
+ *
3018
+ * In the case of rich-text content, this method should either grab focus
3019
+ * or move the sequential focus navigation starting point (if the application
3020
+ * supports this concept) as if the user had clicked on the new caret position.
3021
+ * Typically, this means that the target of this operation is the node containing
3022
+ * the new caret position or one of its ancestors. In other words, after this
3023
+ * method is called, if the user advances focus, it should move to the first
3024
+ * focusable node following the new caret position.
3025
+ *
3026
+ * Calling this method should also scroll the application viewport in a way
3027
+ * that matches the behavior of the application's typical caret motion or tab
3028
+ * navigation as closely as possible. This also means that if the application's
3029
+ * caret motion or focus navigation does not trigger a scroll operation, this
3030
+ * method should not trigger one either. If the application does not have a caret
3031
+ * motion or focus navigation operation, this method should try to scroll the new
3032
+ * caret position into view while minimizing unnecessary scroll motion.
3033
+ * @param offset the character offset of the new caret position
3034
+ * @virtual
3035
+ */
3036
+ vfunc_set_caret_offset(offset: number): boolean;
3037
+
3038
+ /**
3039
+ * Changes the start and end offset of the specified selection.
3040
+ * @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.
3041
+ * @param start_offset the new starting character offset of the selection
3042
+ * @param end_offset the new end position of (e.g. offset immediately past) the selection
3043
+ * @virtual
3044
+ */
3045
+ vfunc_set_selection(selection_num: number, start_offset: number, end_offset: number): boolean;
3046
+
3047
+ /**
3048
+ * @virtual
3049
+ */
3050
+ vfunc_text_attributes_changed(): void;
3051
+
3052
+ /**
3053
+ * @param location
3054
+ * @virtual
3055
+ */
3056
+ vfunc_text_caret_moved(location: number): void;
3057
+
3058
+ /**
3059
+ * the signal handler which is executed when there is a
3060
+ * text change. This virtual function is deprecated sice 2.9.4 and
3061
+ * it should not be overriden.
3062
+ * @param position
3063
+ * @param length
3064
+ * @virtual
3065
+ */
3066
+ vfunc_text_changed(position: number, length: number): void;
3067
+
3068
+ /**
3069
+ * @virtual
3070
+ */
3071
+ vfunc_text_selection_changed(): void;
3072
+ }
3073
+
3074
+
3075
+ namespace Util {
3076
+ // Signal signatures
3077
+ interface SignalSignatures extends Atk.Util.SignalSignatures {}
3078
+
3079
+ // Constructor properties interface
3080
+ interface ConstructorProps extends Atk.Util.ConstructorProps {}
3081
+ }
3082
+
3083
+ /**
3084
+ * {@link Atk.Util} implementation
3085
+ *
3086
+ * {@link Cally.Util} implements {@link Atk.Util} abstract methods. Although it
3087
+ * includes the name "Util" it is in fact one of the most important
3088
+ * interfaces to be implemented in any ATK toolkit implementation.
3089
+ *
3090
+ * For instance, it defines {@link Atk.get_root}, the method that returns
3091
+ * the root object in the hierarchy. Without it, you don't have
3092
+ * available any accessible object.
3093
+ * @gir-type Class
3094
+ */
3095
+ class Util extends Atk.Util {
3096
+ static $gtype: GObject.GType<Util>;
3097
+
3098
+ /**
3099
+ * Compile-time signal type information.
3100
+ *
3101
+ * This instance property is generated only for TypeScript type checking.
3102
+ * It is not defined at runtime and should not be accessed in JS code.
3103
+ * @internal
3104
+ */
3105
+ $signals: Util.SignalSignatures;
3106
+
3107
+ // Constructors
3108
+ constructor(properties?: Partial<Util.ConstructorProps>, ...args: any[]);
3109
+
3110
+ _init(...args: any[]): void;
3111
+
3112
+ // Signals
3113
+ /** @signal */
3114
+ connect<K extends keyof Util.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Util.SignalSignatures[K]>): number;
3115
+ connect(signal: string, callback: (...args: any[]) => any): number;
3116
+
3117
+ /** @signal */
3118
+ connect_after<K extends keyof Util.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Util.SignalSignatures[K]>): number;
3119
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
3120
+
3121
+ /** @signal */
3122
+ emit<K extends keyof Util.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<Util.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
3123
+ emit(signal: string, ...args: any[]): void;
3124
+ }
3125
+
3126
+
3127
+ /**
3128
+ * @gir-type Alias
3129
+ */
3130
+ type ActorClass = typeof Actor;
3131
+
3132
+ /**
3133
+ * @gir-type Struct
3134
+ */
3135
+ abstract class ActorPrivate {
3136
+ static $gtype: GObject.GType<ActorPrivate>;
3137
+ }
3138
+
3139
+
3140
+ /**
3141
+ * @gir-type Alias
3142
+ */
3143
+ type CloneClass = typeof Clone;
3144
+
3145
+ /**
3146
+ * @gir-type Alias
3147
+ */
3148
+ type RootClass = typeof Root;
3149
+
3150
+ /**
3151
+ * @gir-type Alias
3152
+ */
3153
+ type StageClass = typeof Stage;
3154
+
3155
+ /**
3156
+ * @gir-type Alias
3157
+ */
3158
+ type TextClass = typeof Text;
3159
+
3160
+ /**
3161
+ * @gir-type Alias
3162
+ */
3163
+ type UtilClass = typeof Util;
3164
+
3165
+ /**
3166
+ * Name of the imported GIR library
3167
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
3168
+ */
3169
+ const __name__: string;
3170
+
3171
+ /**
3172
+ * Version of the imported GIR library
3173
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
3174
+ */
3175
+ const __version__: string;
3176
+ }
3177
+
3178
+ export default Cally;
3179
+
3180
+ // END