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