-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathAtk-1.0.d.ts
5971 lines (5724 loc) · 226 KB
/
Atk-1.0.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/** Generated with https://github.com/Gr3q/GIR2TS - If possible do not modify. */
declare namespace imports.gi.Atk {
/** This construct is only for enabling class multi-inheritance,
* use {@link GObjectAccessible} instead.
*/
interface IGObjectAccessible {
/**
* Gets the GObject for which #obj is the accessible object.
* @returns a #GObject which is the object for which #obj is
* the accessible object
*/
get_object(): GObject.Object;
}
type GObjectAccessibleInitOptionsMixin = ObjectInitOptions
export interface GObjectAccessibleInitOptions extends GObjectAccessibleInitOptionsMixin {}
/** This construct is only for enabling class multi-inheritance,
* use {@link GObjectAccessible} instead.
*/
type GObjectAccessibleMixin = IGObjectAccessible & Object;
/**
* This object class is derived from AtkObject and can be used as a basis implementing accessible objects.
*
* This object class is derived from AtkObject. It can be used as a
* basis for implementing accessible objects for GObjects which are
* not derived from GtkWidget. One example of its use is in providing
* an accessible object for GnomeCanvasItem in the GAIL library.
*/
interface GObjectAccessible extends GObjectAccessibleMixin {}
class GObjectAccessible {
public constructor(options?: Partial<GObjectAccessibleInitOptions>);
/**
* Gets the accessible object for the specified #obj.
* @param obj a #GObject
* @returns a {@link Object} which is the accessible object for
* the #obj
*/
public static for_object(obj: GObject.Object): Object;
}
/** This construct is only for enabling class multi-inheritance,
* use {@link Hyperlink} instead.
*/
interface IHyperlink {
readonly end_index: number;
readonly number_of_anchors: number;
/**
* @deprecated
* Please use ATK_STATE_FOCUSABLE for all links, and
* ATK_STATE_FOCUSED for focused links.
*
* Selected link
*/
readonly selected_link: boolean;
readonly start_index: number;
/**
* Gets the index with the hypertext document at which this link ends.
* @returns the index with the hypertext document at which this link ends
*/
get_end_index(): number;
/**
* Gets the number of anchors associated with this hyperlink.
* @returns the number of anchors associated with this hyperlink
*/
get_n_anchors(): number;
/**
* Returns the item associated with this hyperlinks nth anchor.
* For instance, the returned {@link Object} will implement #AtkText
* if #link_ is a text hyperlink, #AtkImage if #link_ is an image
* hyperlink etc.
*
* Multiple anchors are primarily used by client-side image maps.
* @param i a (zero-index) integer specifying the desired anchor
* @returns an {@link Object} associated with this hyperlinks
* i-th anchor
*/
get_object(i: number): Object;
/**
* Gets the index with the hypertext document at which this link begins.
* @returns the index with the hypertext document at which this link begins
*/
get_start_index(): number;
/**
* Get a the URI associated with the anchor specified
* by #i of #link_.
*
* Multiple anchors are primarily used by client-side image maps.
* @param i a (zero-index) integer specifying the desired anchor
* @returns a string specifying the URI
*/
get_uri(i: number): string;
/**
* Indicates whether the link currently displays some or all of its
* content inline. Ordinary HTML links will usually return
* %FALSE, but an inline <src> HTML element will return
* %TRUE.
* @returns whether or not this link displays its content inline.
*/
is_inline(): boolean;
/**
* @deprecated
* Please use ATK_STATE_FOCUSABLE for all links,
* and ATK_STATE_FOCUSED for focused links.
*
* Determines whether this AtkHyperlink is selected
* @returns True if the AtkHyperlink is selected, False otherwise
*/
is_selected_link(): boolean;
/**
* Since the document that a link is associated with may have changed
* this method returns %TRUE if the link is still valid (with
* respect to the document it references) and %FALSE otherwise.
* @returns whether or not this link is still valid
*/
is_valid(): boolean;
/**
* The signal link-activated is emitted when a link is activated.
* @param signal
* @param callback Callback function
* - owner: owner of the emitted event
*
* @returns Callback ID
*/
connect(signal: "link-activated", callback: (owner: this) => void): number;
connect(signal: "notify::end-index", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::number-of-anchors", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::selected-link", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::start-index", callback: (owner: this, ...args: any) => void): number;
}
type HyperlinkInitOptionsMixin = GObject.ObjectInitOptions & ActionInitOptions
export interface HyperlinkInitOptions extends HyperlinkInitOptionsMixin {}
/** This construct is only for enabling class multi-inheritance,
* use {@link Hyperlink} instead.
*/
type HyperlinkMixin = IHyperlink & GObject.Object & Action;
/**
* An ATK object which encapsulates a link or set of links in a hypertext document.
*
* An ATK object which encapsulates a link or set of links (for
* instance in the case of client-side image maps) in a hypertext
* document. It may implement the AtkAction interface. AtkHyperlink
* may also be used to refer to inline embedded content, since it
* allows specification of a start and end offset within the host
* AtkHypertext object.
*/
interface Hyperlink extends HyperlinkMixin {}
class Hyperlink {
public constructor(options?: Partial<HyperlinkInitOptions>);
}
/** This construct is only for enabling class multi-inheritance,
* use {@link Misc} instead.
*/
interface IMisc {
/**
* @deprecated
* Since 2.12.
*
* Take the thread mutex for the GUI toolkit,
* if one exists.
* (This method is implemented by the toolkit ATK implementation layer;
* for instance, for GTK+, GAIL implements this via GDK_THREADS_ENTER).
*/
threads_enter(): void;
/**
* @deprecated
* Since 2.12.
*
* Release the thread mutex for the GUI toolkit,
* if one exists. This method, and atk_misc_threads_enter,
* are needed in some situations by threaded application code which
* services ATK requests, since fulfilling ATK requests often
* requires calling into the GUI toolkit. If a long-running or
* potentially blocking call takes place inside such a block, it should
* be bracketed by atk_misc_threads_leave/atk_misc_threads_enter calls.
* (This method is implemented by the toolkit ATK implementation layer;
* for instance, for GTK+, GAIL implements this via GDK_THREADS_LEAVE).
*/
threads_leave(): void;
}
type MiscInitOptionsMixin = GObject.ObjectInitOptions
export interface MiscInitOptions extends MiscInitOptionsMixin {}
/** This construct is only for enabling class multi-inheritance,
* use {@link Misc} instead.
*/
type MiscMixin = IMisc & GObject.Object;
/**
* A set of ATK utility functions for thread locking
*
* A set of utility functions for thread locking. This interface and
* all his related methods are deprecated since 2.12.
*/
interface Misc extends MiscMixin {}
class Misc {
public constructor(options?: Partial<MiscInitOptions>);
/**
* @deprecated
* Since 2.12.
*
* Obtain the singleton instance of AtkMisc for this application.
* @returns The singleton instance of AtkMisc for this application.
*/
public static get_instance(): Misc;
}
/** This construct is only for enabling class multi-inheritance,
* use {@link NoOpObject} instead.
*/
interface INoOpObject {
}
type NoOpObjectInitOptionsMixin = ObjectInitOptions & ActionInitOptions & ComponentInitOptions & DocumentInitOptions & EditableTextInitOptions & HypertextInitOptions & ImageInitOptions & SelectionInitOptions & TableInitOptions & TableCellInitOptions & TextInitOptions & ValueInitOptions & WindowInitOptions
export interface NoOpObjectInitOptions extends NoOpObjectInitOptionsMixin {}
/** This construct is only for enabling class multi-inheritance,
* use {@link NoOpObject} instead.
*/
type NoOpObjectMixin = INoOpObject & Object & Action & Component & Document & EditableText & Hypertext & Image & Selection & Table & TableCell & Text & Value & Window;
/**
* An AtkObject which purports to implement all ATK interfaces.
*
* An AtkNoOpObject is an AtkObject which purports to implement all
* ATK interfaces. It is the type of AtkObject which is created if an
* accessible object is requested for an object type for which no
* factory type is specified.
*/
// interface NoOpObject extends NoOpObjectMixin {}
class NoOpObject {
public constructor(options?: Partial<NoOpObjectInitOptions>);
/**
* Provides a default (non-functioning stub) {@link Object}.
* Application maintainers should not use this method.
* @param obj a #GObject
* @returns a default (non-functioning stub) {@link Object}
*/
public static new(obj: GObject.Object): Object;
}
/** This construct is only for enabling class multi-inheritance,
* use {@link NoOpObjectFactory} instead.
*/
interface INoOpObjectFactory {
}
type NoOpObjectFactoryInitOptionsMixin = ObjectFactoryInitOptions
export interface NoOpObjectFactoryInitOptions extends NoOpObjectFactoryInitOptionsMixin {}
/** This construct is only for enabling class multi-inheritance,
* use {@link NoOpObjectFactory} instead.
*/
type NoOpObjectFactoryMixin = INoOpObjectFactory & ObjectFactory;
/**
* The AtkObjectFactory which creates an AtkNoOpObject.
*
* The AtkObjectFactory which creates an AtkNoOpObject. An instance of
* this is created by an AtkRegistry if no factory type has not been
* specified to create an accessible object of a particular type.
*/
interface NoOpObjectFactory extends NoOpObjectFactoryMixin {}
class NoOpObjectFactory {
public constructor(options?: Partial<NoOpObjectFactoryInitOptions>);
/**
* Creates an instance of an {@link ObjectFactory} which generates primitive
* (non-functioning) #AtkObjects.
* @returns an instance of an {@link ObjectFactory}
*/
public static new(): ObjectFactory;
}
/** This construct is only for enabling class multi-inheritance,
* use {@link Object} instead.
*/
interface IObject {
readonly accessible_component_layer: number;
readonly accessible_component_mdi_zorder: number;
accessible_description: string;
readonly accessible_hypertext_nlinks: number;
accessible_name: string;
accessible_parent: Object;
accessible_role: Role;
/**
* @deprecated
* Since 1.3. Use table-caption-object instead.
*
* Table caption.
*/
accessible_table_caption: string;
accessible_table_caption_object: Object;
/**
* @deprecated
* Since 2.12. Use {@link Atk.Table.get_column_description}
* and atk_table_set_column_description() instead.
*
* Accessible table column description.
*/
accessible_table_column_description: string;
/**
* @deprecated
* Since 2.12. Use {@link Atk.Table.get_column_header} and
* atk_table_set_column_header() instead.
*
* Accessible table column header.
*/
accessible_table_column_header: Object;
/**
* @deprecated
* Since 2.12. Use {@link Atk.Table.get_row_description} and
* atk_table_set_row_description() instead.
*
* Accessible table row description.
*/
accessible_table_row_description: string;
/**
* @deprecated
* Since 2.12. Use {@link Atk.Table.get_row_header} and
* atk_table_set_row_header() instead.
*
* Accessible table row header.
*/
accessible_table_row_header: Object;
accessible_table_summary: Object;
/**
* @deprecated
* Since 2.12. Use {@link Atk.Value.get_value_and_text} to get
* the value, and value-changed signal to be notified on their value
* changes.
*
* Numeric value of this object, in case being and AtkValue.
*/
accessible_value: number;
readonly description: string;
readonly name: string;
// readonly accessible_parent: Object;
readonly role: Role;
readonly relation_set: RelationSet;
readonly layer: Layer;
/**
* Adds a relationship of the specified type with the specified target.
* @param relationship The {@link RelationType} of the relation
* @param target The {@link Object} which is to be the target of the relation.
* @returns TRUE if the relationship is added.
*/
add_relationship(relationship: RelationType, target: Object): boolean;
/**
* Gets the accessible id of the accessible.
* @returns a character string representing the accessible id of the object, or
* NULL if no such string was set.
*/
get_accessible_id(): string;
/**
* Get a list of properties applied to this object as a whole, as an {@link AttributeSet} consisting of
* name-value pairs. As such these attributes may be considered weakly-typed properties or annotations,
* as distinct from strongly-typed object data available via other get/set methods.
* Not all objects have explicit "name-value pair" #AtkAttributeSet properties.
* @returns an {@link AttributeSet} consisting of all
* explicit properties/annotations applied to the object, or an empty
* set if the object has no name-value pair attributes assigned to
* it. This #atkattributeset should be freed by a call to
* {@link Atk.attribute.set_free}.
*/
get_attributes(): AttributeSet;
/**
* Gets the accessible description of the accessible.
* @returns a character string representing the accessible description
* of the accessible.
*/
// get_description(): string;
/**
* Gets the 0-based index of this accessible in its parent; returns -1 if the
* accessible does not have an accessible parent.
* @returns an integer which is the index of the accessible in its parent
*/
get_index_in_parent(): number;
/**
* @deprecated
* Use atk_component_get_layer instead.
*
* Gets the layer of the accessible.
* @returns an {@link Layer} which is the layer of the accessible
*/
get_layer(): Layer;
/**
* @deprecated
* Use atk_component_get_mdi_zorder instead.
*
* Gets the zorder of the accessible. The value G_MININT will be returned
* if the layer of the accessible is not ATK_LAYER_MDI.
* @returns a gint which is the zorder of the accessible, i.e. the depth at
* which the component is shown in relation to other components in the same
* container.
*/
get_mdi_zorder(): number;
/**
* Gets the number of accessible children of the accessible.
* @returns an integer representing the number of accessible children
* of the accessible.
*/
get_n_accessible_children(): number;
/**
* Gets the accessible name of the accessible.
* @returns a character string representing the accessible name of the object.
*/
get_name(): string;
/**
* Gets a UTF-8 string indicating the POSIX-style LC_MESSAGES locale
* of #accessible.
* @returns a UTF-8 string indicating the POSIX-style LC_MESSAGES
* locale of #accessible.
*/
get_object_locale(): string;
/**
* Gets the accessible parent of the accessible. By default this is
* the one assigned with {@link Atk.Object.set_parent}, but it is assumed
* that ATK implementors have ways to get the parent of the object
* without the need of assigning it manually with
* atk_object_set_parent(), and will return it with this method.
*
* If you are only interested on the parent assigned with
* atk_object_set_parent(), use atk_object_peek_parent().
* @returns an {@link Object} representing the accessible
* parent of the accessible
*/
get_parent(): Object;
/**
* Gets the role of the accessible.
* @returns an {@link Role} which is the role of the accessible
*/
get_role(): Role;
/**
* This function is called when implementing subclasses of {@link Object}.
* It does initialization required for the new object. It is intended
* that this function should called only in the {@link ....new} functions used
* to create an instance of a subclass of #AtkObject
* @param data a #gpointer which identifies the object for which the AtkObject was created.
*/
initialize(data?: any | null): void;
/**
* Emits a state-change signal for the specified state.
*
* Note that as a general rule when the state of an existing object changes,
* emitting a notification is expected.
* @param state an {@link State} whose state is changed
* @param value a gboolean which indicates whether the state is being set on or off
*/
notify_state_change(state: State, value: boolean): void;
/**
* Gets the accessible parent of the accessible, if it has been
* manually assigned with atk_object_set_parent. Otherwise, this
* function returns %NULL.
*
* This method is intended as an utility for ATK implementors, and not
* to be exposed to accessible tools. See {@link Atk.Object.get_parent} for
* further reference.
* @returns an {@link Object} representing the accessible
* parent of the accessible if assigned
*/
peek_parent(): Object;
/**
* Gets a reference to the specified accessible child of the object.
* The accessible children are 0-based so the first accessible child is
* at index 0, the second at index 1 and so on.
* @param i a gint representing the position of the child, starting from 0
* @returns an {@link Object} representing the specified
* accessible child of the accessible.
*/
ref_accessible_child(i: number): Object;
/**
* Gets the {@link RelationSet} associated with the object.
* @returns an {@link RelationSet} representing the relation set
* of the object.
*/
ref_relation_set(): RelationSet;
/**
* Gets a reference to the state set of the accessible; the caller must
* unreference it when it is no longer needed.
* @returns a reference to an {@link StateSet} which is the state
* set of the accessible
*/
ref_state_set(): StateSet;
/**
* @deprecated
* See {@link Atk.Object.connect_property_change_handler}
*
* Removes a property change handler.
* @param handler_id a guint which identifies the handler to be removed.
*/
remove_property_change_handler(handler_id: number): void;
/**
* Removes a relationship of the specified type with the specified target.
* @param relationship The {@link RelationType} of the relation
* @param target The {@link Object} which is the target of the relation to be removed.
* @returns TRUE if the relationship is removed.
*/
remove_relationship(relationship: RelationType, target: Object): boolean;
/**
* Sets the accessible ID of the accessible. This is not meant to be presented
* to the user, but to be an ID which is stable over application development.
* Typically, this is the gtkbuilder ID. Such an ID will be available for
* instance to identify a given well-known accessible object for tailored screen
* reading, or for automatic regression testing.
* @param name a character string to be set as the accessible id
*/
set_accessible_id(name: string): void;
/**
* Sets the accessible description of the accessible. You can't set
* the description to NULL. This is reserved for the initial value. In
* this aspect NULL is similar to ATK_ROLE_UNKNOWN. If you want to set
* the name to a empty value you can use "".
* @param description a character string to be set as the accessible description
*/
set_description(description: string): void;
/**
* Sets the accessible name of the accessible. You can't set the name
* to NULL. This is reserved for the initial value. In this aspect
* NULL is similar to ATK_ROLE_UNKNOWN. If you want to set the name to
* a empty value you can use "".
* @param name a character string to be set as the accessible name
*/
set_name(name: string): void;
/**
* Sets the accessible parent of the accessible. #parent can be NULL.
* @param parent an {@link Object} to be set as the accessible parent
*/
set_parent(parent: Object): void;
/**
* Sets the role of the accessible.
* @param role an {@link Role} to be set as the role
*/
set_role(role: Role): void;
/**
* The "active-descendant-changed" signal is emitted by an object
* which has the state ATK_STATE_MANAGES_DESCENDANTS when the focus
* object in the object changes. For instance, a table will emit the
* signal when the cell in the table which has focus changes.
* @param signal
* @param callback Callback function
* - owner: owner of the emitted event
* - arg1: the newly focused object.
*
* @returns Callback ID
*/
connect(signal: "active-descendant-changed", callback: (owner: this, arg1: Object) => void): number;
/**
* The "announcement" signal can be emitted to pass an announcement on to
* be read by a screen reader.
*
* Depcrecated (2.50): Use AtkObject::notification instead.
* @param signal
* @param callback Callback function
* - owner: owner of the emitted event
* - arg1: the text to be announced.
*
* @returns Callback ID
*/
connect(signal: "announcement", callback: (owner: this, arg1: string) => void): number;
/**
* The signal "children-changed" is emitted when a child is added or
* removed form an object. It supports two details: "add" and
* "remove"
* @param signal
* @param callback Callback function
* - owner: owner of the emitted event
* - arg1: The index of the added or removed child. The value can be
* -1. This is used if the value is not known by the implementor
* when the child is added/removed or irrelevant.
* - arg2: A gpointer to the child AtkObject which was added or
* removed. If the child was removed, it is possible that it is not
* available for the implementor. In that case this pointer can be
* NULL.
*
* @returns Callback ID
*/
connect(signal: "children-changed", callback: (owner: this, arg1: number, arg2: Object) => void): number;
/**
* The signal "focus-event" is emitted when an object gained or lost
* focus.
* @param signal
* @param callback Callback function
* - owner: owner of the emitted event
* - arg1: a boolean value which indicates whether the object gained
* or lost focus.
*
* @returns Callback ID
*/
connect(signal: "focus-event", callback: (owner: this, arg1: boolean) => void): number;
/**
* The "notification" signal can be emitted to pass an announcement on to
* be read by a screen reader.
* @param signal
* @param callback Callback function
* - owner: owner of the emitted event
* - arg1: the text to be announced.
* - arg2: an {@link Live} specifying the politeness of the notification.
* Should be either ATK_LIVE_POLITE or ATK_LIVE_ASSERTIVE.
*
* @returns Callback ID
*/
connect(signal: "notification", callback: (owner: this, arg1: string, arg2: number) => void): number;
/**
* The signal "property-change" is emitted when an object's property
* value changes. #arg1 contains an {@link PropertyValues} with the name
* and the new value of the property whose value has changed. Note
* that, as with GObject notify, getting this signal does not
* guarantee that the value of the property has actually changed; it
* may also be emitted when the setter of the property is called to
* reinstate the previous value.
*
* Toolkit implementor note: ATK implementors should use
* {@link GObject.Object.notify} to emit property-changed
* notifications. #AtkObject::property-changed is needed by the
* implementation of atk_add_global_event_listener() because GObject
* notify doesn't support emission hooks.
* @param signal
* @param callback Callback function
* - owner: owner of the emitted event
* - arg1: an {@link PropertyValues} containing the new
* value of the property which changed.
*
* @returns Callback ID
*/
connect(signal: "property-change", callback: (owner: this, arg1: PropertyValues) => void): number;
/**
* The "state-change" signal is emitted when an object's state
* changes. The detail value identifies the state type which has
* changed.
* @param signal
* @param callback Callback function
* - owner: owner of the emitted event
* - arg1: The name of the state which has changed
* - arg2: A boolean which indicates whether the state has been set or unset.
*
* @returns Callback ID
*/
connect(signal: "state-change", callback: (owner: this, arg1: string, arg2: boolean) => void): number;
/**
* The "visible-data-changed" signal is emitted when the visual
* appearance of the object changed.
* @param signal
* @param callback Callback function
* - owner: owner of the emitted event
*
* @returns Callback ID
*/
connect(signal: "visible-data-changed", callback: (owner: this) => void): number;
connect(signal: "notify::accessible-component-layer", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::accessible-component-mdi-zorder", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::accessible-description", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::accessible-hypertext-nlinks", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::accessible-name", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::accessible-parent", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::accessible-role", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::accessible-table-caption", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::accessible-table-caption-object", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::accessible-table-column-description", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::accessible-table-column-header", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::accessible-table-row-description", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::accessible-table-row-header", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::accessible-table-summary", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::accessible-value", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::description", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::name", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::accessible_parent", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::role", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::relation_set", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::layer", callback: (owner: this, ...args: any) => void): number;
}
type ObjectInitOptionsMixin = GObject.ObjectInitOptions &
Pick<IObject,
"accessible_description" |
"accessible_name" |
"accessible_parent" |
"accessible_role" |
"accessible_table_caption" |
"accessible_table_caption_object" |
"accessible_table_column_description" |
"accessible_table_column_header" |
"accessible_table_row_description" |
"accessible_table_row_header" |
"accessible_table_summary" |
"accessible_value">;
export interface ObjectInitOptions extends ObjectInitOptionsMixin {}
/** This construct is only for enabling class multi-inheritance,
* use {@link Object} instead.
*/
type ObjectMixin = IObject & GObject.Object;
/**
* The base object class for the Accessibility Toolkit API.
*
* This class is the primary class for accessibility support via the
* Accessibility ToolKit (ATK). Objects which are instances of
* {@link Object} (or instances of AtkObject-derived types) are queried
* for properties which relate basic (and generic) properties of a UI
* component such as name and description. Instances of #AtkObject
* may also be queried as to whether they implement other ATK
* interfaces (e.g. #AtkAction, #AtkComponent, etc.), as appropriate
* to the role which a given UI component plays in a user interface.
*
* All UI components in an application which provide useful
* information or services to the user must provide corresponding
* #AtkObject instances on request (in GTK+, for instance, usually on
* a call to #gtk_widget_get_accessible ()), either via ATK support
* built into the toolkit for the widget class or ancestor class, or
* in the case of custom widgets, if the inherited #AtkObject
* implementation is insufficient, via instances of a new #AtkObject
* subclass.
*
* See [class#AtkObjectFactory], [class#AtkRegistry]. (GTK+ users see also
* #GtkAccessible).
*/
interface Object extends ObjectMixin {}
class Object {
public constructor(options?: Partial<ObjectInitOptions>);
}
/** This construct is only for enabling class multi-inheritance,
* use {@link ObjectFactory} instead.
*/
interface IObjectFactory {
/**
* Provides an {@link Object} that implements an accessibility interface
* on behalf of #obj
* @param obj a #GObject
* @returns an {@link Object} that implements an accessibility
* interface on behalf of #obj
*/
create_accessible(obj: GObject.Object): Object;
/**
* Gets the GType of the accessible which is created by the factory.
* @returns the type of the accessible which is created by the #factory.
* The value G_TYPE_INVALID is returned if no type if found.
*/
get_accessible_type(): GObject.Type;
/**
* Inform #factory that it is no longer being used to create
* accessibles. When called, #factory may need to inform
* {@link Objects} which it has created that they need to be re-instantiated.
* Note: primarily used for runtime replacement of #AtkObjectFactorys
* in object registries.
*/
invalidate(): void;
}
type ObjectFactoryInitOptionsMixin = GObject.ObjectInitOptions
export interface ObjectFactoryInitOptions extends ObjectFactoryInitOptionsMixin {}
/** This construct is only for enabling class multi-inheritance,
* use {@link ObjectFactory} instead.
*/
type ObjectFactoryMixin = IObjectFactory & GObject.Object;
/**
* The base object class for a factory used to
* create accessible objects for objects of a specific GType.
*
* This class is the base object class for a factory used to create an
* accessible object for a specific GType. The function
* {@link Atk.Registry.set_factory_type} is normally called to store in the
* registry the factory type to be used to create an accessible of a
* particular GType.
*/
interface ObjectFactory extends ObjectFactoryMixin {}
class ObjectFactory {
public constructor(options?: Partial<ObjectFactoryInitOptions>);
}
/** This construct is only for enabling class multi-inheritance,
* use {@link Plug} instead.
*/
interface IPlug {
/**
* Gets the unique ID of an {@link Plug} object, which can be used to
* embed inside of an #AtkSocket using {@link Atk.Socket.embed}.
*
* Internally, this calls a class function that should be registered
* by the IPC layer (usually at-spi2-atk). The implementor of an
* #AtkPlug object should call this function (after atk-bridge is
* loaded) and pass the value to the process implementing the
* #AtkSocket, so it could embed the plug.
* @returns the unique ID for the plug
*/
get_id(): string;
/**
* Sets #child as accessible child of #plug and #plug as accessible parent of
* #child. #child can be NULL.
*
* In some cases, one can not use the AtkPlug type directly as accessible
* object for the toplevel widget of the application. For instance in the gtk
* case, GtkPlugAccessible can not inherit both from GtkWindowAccessible and
* from AtkPlug. In such a case, one can create, in addition to the standard
* accessible object for the toplevel widget, an AtkPlug object, and make the
* former the child of the latter by calling {@link Atk.Plug.set_child}.
* @param child an {@link Object} to be set as accessible child of #plug.
*/
set_child(child: Object): void;
}
type PlugInitOptionsMixin = ObjectInitOptions & ComponentInitOptions
export interface PlugInitOptions extends PlugInitOptionsMixin {}
/** This construct is only for enabling class multi-inheritance,
* use {@link Plug} instead.
*/
type PlugMixin = IPlug & Object & Component;
/**
* Toplevel for embedding into other processes
*
* See [class{@link Socket}]
*/
interface Plug extends PlugMixin {}
class Plug {
public constructor(options?: Partial<PlugInitOptions>);
/**
* Creates a new {@link Plug} instance.
* @returns the newly created {@link Plug}
*/
public static new(): Object;
}
/** This construct is only for enabling class multi-inheritance,
* use {@link Registry} instead.
*/
interface IRegistry {
readonly factory_type_registry: any[];
readonly factory_singleton_cache: any[];
/**
* Gets an {@link ObjectFactory} appropriate for creating #AtkObjects
* appropriate for #type.
* @param type a #GType with which to look up the associated {@link ObjectFactory}
* @returns an {@link ObjectFactory} appropriate for creating
* #AtkObjects appropriate for #type.
*/
get_factory(type: GObject.Type): ObjectFactory;
/**
* Provides a #GType indicating the {@link ObjectFactory} subclass
* associated with #type.
* @param type a #GType with which to look up the associated {@link ObjectFactory}
* subclass
* @returns a #GType associated with type #type
*/
get_factory_type(type: GObject.Type): GObject.Type;
/**
* Associate an {@link ObjectFactory} subclass with a #GType. Note:
* The associated #factory_type will thereafter be responsible for
* the creation of new #AtkObject implementations for instances
* appropriate for #type.
* @param type an {@link Object} type
* @param factory_type an {@link ObjectFactory} type to associate with #type. Must
* implement AtkObject appropriate for #type.
*/
set_factory_type(type: GObject.Type, factory_type: GObject.Type): void;
connect(signal: "notify::factory_type_registry", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::factory_singleton_cache", callback: (owner: this, ...args: any) => void): number;
}
type RegistryInitOptionsMixin = GObject.ObjectInitOptions
export interface RegistryInitOptions extends RegistryInitOptionsMixin {}
/** This construct is only for enabling class multi-inheritance,
* use {@link Registry} instead.
*/
type RegistryMixin = IRegistry & GObject.Object;
/**
* An object used to store the GType of the
* factories used to create an accessible object for an object of a
* particular GType.
*
* The AtkRegistry is normally used to create appropriate ATK "peers"
* for user interface components. Application developers usually need
* only interact with the AtkRegistry by associating appropriate ATK
* implementation classes with GObject classes via the
* atk_registry_set_factory_type call, passing the appropriate GType
* for application custom widget classes.
*/
interface Registry extends RegistryMixin {}
class Registry {
public constructor(options?: Partial<RegistryInitOptions>);
}
/** This construct is only for enabling class multi-inheritance,
* use {@link Relation} instead.
*/
interface IRelation {
relation_type: RelationType;
target: GObject.ValueArray;
// readonly target: any[];
readonly relationship: RelationType;
/**
* Adds the specified AtkObject to the target for the relation, if it is
* not already present. See also {@link Atk.Object.add_relationship}.
* @param target an {@link Object}
*/
add_target(target: Object): void;
/**
* Gets the type of #relation
* @returns the type of #relation
*/
get_relation_type(): RelationType;
/**
* Gets the target list of #relation
* @returns the target list of #relation
*/
get_target(): Object[];
/**
* Remove the specified AtkObject from the target for the relation.
* @param target an {@link Object}
* @returns TRUE if the removal is successful.
*/
remove_target(target: Object): boolean;
connect(signal: "notify::relation-type", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::target", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::target", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::relationship", callback: (owner: this, ...args: any) => void): number;
}
type RelationInitOptionsMixin = GObject.ObjectInitOptions &
Pick<IRelation,
"relation_type" |
"target">;
export interface RelationInitOptions extends RelationInitOptionsMixin {}
/** This construct is only for enabling class multi-inheritance,
* use {@link Relation} instead.
*/
type RelationMixin = IRelation & GObject.Object;
/**
* An object used to describe a relation between a
* object and one or more other objects.
*
* An AtkRelation describes a relation between an object and one or
* more other objects. The actual relations that an object has with
* other objects are defined as an AtkRelationSet, which is a set of
* AtkRelations.
*/
interface Relation extends RelationMixin {}
class Relation {
public constructor(options?: Partial<RelationInitOptions>);
/**
* Create a new relation for the specified key and the specified list
* of targets. See also {@link Atk.Object.add_relationship}.
* @param targets an array of pointers to
* {@link Objects}
* @param relationship an {@link RelationType} with which to create the new
* #AtkRelation
* @returns a pointer to a new {@link Relation}
*/
public static new(targets: Object[], relationship: RelationType): Relation;
}
/** This construct is only for enabling class multi-inheritance,
* use {@link RelationSet} instead.
*/
interface IRelationSet {
readonly relations: any[];
/**
* Add a new relation to the current relation set if it is not already
* present.
* This function ref's the AtkRelation so the caller of this function
* should unref it to ensure that it will be destroyed when the AtkRelationSet
* is destroyed.
* @param relation an {@link Relation}
*/
add(relation: Relation): void;
/**
* Add a new relation of the specified type with the specified target to