@girs/atspi-2.0 2.0.0-4.0.0-beta.2 → 2.0.0-4.0.0-beta.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.
Files changed (3) hide show
  1. package/README.md +1 -19
  2. package/atspi-2.0.d.ts +77 -257
  3. package/package.json +5 -5
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/atspi-2.0)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for Atspi-2.0, generated from library version 2.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.2.
8
+ GJS TypeScript type definitions for Atspi-2.0, generated from library version 2.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.3.
9
9
 
10
10
 
11
11
  ## Install
@@ -22,11 +22,6 @@ You can import this package into your project like this:
22
22
  import Atspi from '@girs/atspi-2.0';
23
23
  ```
24
24
 
25
- Or if you prefer CommonJS, you can also use this:
26
- ```ts
27
- const Atspi = require('@girs/atspi-2.0');
28
- ```
29
-
30
25
  ### Ambient Modules
31
26
 
32
27
  You can also use [ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules) to import this module like you would do this in JavaScript.
@@ -81,19 +76,6 @@ Now you have also type support for this, too:
81
76
  const Atspi = imports.gi.Atspi;
82
77
  ```
83
78
 
84
-
85
- ### ESM vs. CommonJS
86
-
87
- GJS supports two different import syntaxes. The new modern ESM syntax and the old global imports syntax.
88
-
89
- In TypeScript projects for GJS and GNOME Shell extensions, you have the flexibility to use `ESM` syntax and then decide the import syntax for your bundled file. If your bundler is configured to use `CommonJS`, it will convert to the GJS-specific global imports syntax, like `const moduleName = imports.gi[moduleName]`. This is different from the traditional `require` syntax seen in Node.js. The global imports syntax is chosen because it aligns with the CommonJS format supported by NPM, which is used for the generated type definitions and this package.
90
-
91
- On the other hand, if you configure your bundler to use ESM, it will retain the ESM import syntax. It's crucial to ensure that your bundler is set up to correctly translate and bundle these imports into either CommonJS or ESM format, depending on your project's requirements.
92
-
93
- This approach is particularly important due to the `@girs` types, which include both `*.cjs `files, using the GJS global imports syntax, and `*.js` files, which utilize the ESM syntax. By appropriately setting up your bundler, you can control which syntax—CommonJS or ESM—is used in your project. The choice of CommonJS in this context is also due to the similarity between the GJS-specific global imports and CommonJS syntax, allowing for easier management and bundling in these specific types of projects.
94
-
95
- Since GNOME Shell 45, you should only use ESM, even for GNOME Shell extensions. Before that, extensions had to use the global import syntax, unlike normal GJS applications, where ESM has been available for some time.
96
-
97
79
  ### Bundle
98
80
 
99
81
  Depending on your project configuration, it is recommended to use a bundler like [esbuild](https://esbuild.github.io/). You can find examples using different bundlers [here](https://github.com/gjsify/ts-for-gir/tree/main/examples).
package/atspi-2.0.d.ts CHANGED
@@ -288,26 +288,6 @@ export namespace Atspi {
288
288
  */
289
289
  UNLOCKMODIFIERS,
290
290
  }
291
- /**
292
- * Enumeration used to indicate a type of live region and how assertive it
293
- * should be in terms of speaking notifications. Currently, this is only used
294
- * for "announcement" events, but it may be used for additional purposes
295
- * in the future.
296
- */
297
- enum Live {
298
- /**
299
- * No live region.
300
- */
301
- NONE,
302
- /**
303
- * This live region should be considered polite.
304
- */
305
- POLITE,
306
- /**
307
- * This live region should be considered assertive.
308
- */
309
- ASSERTIVE,
310
- }
311
291
  /**
312
292
  * Used by interfaces #AtspiText and #AtspiDocument, this
313
293
  * enumeration corresponds to the POSIX 'setlocale' enum values.
@@ -623,7 +603,7 @@ export namespace Atspi {
623
603
  */
624
604
  DATE_EDITOR,
625
605
  /**
626
- * An inconifed internal frame within a DESKTOP_FRAME.
606
+ * An inconifed internal frame within a DESKTOP_PANE.
627
607
  */
628
608
  DESKTOP_ICON,
629
609
  /**
@@ -645,16 +625,16 @@ export namespace Atspi {
645
625
  * and select the contents of a directory.
646
626
  */
647
627
  DIRECTORY_PANE,
648
- /**
649
- * An object used for drawing custom user interface
650
- * elements.
651
- */
652
- DRAWING_AREA,
653
628
  /**
654
629
  * A specialized dialog that displays the files in
655
630
  * the directory and lets the user select a file, browse a different
656
631
  * directory, or specify a filename.
657
632
  */
633
+ DRAWING_AREA,
634
+ /**
635
+ * An object used for drawing custom user interface
636
+ * elements.
637
+ */
658
638
  FILE_CHOOSER,
659
639
  /**
660
640
  * A object that fills up space in a user interface.
@@ -813,13 +793,14 @@ export namespace Atspi {
813
793
  SEPARATOR,
814
794
  /**
815
795
  * An object that allows the user to select from a bounded
816
- * range. Unlike `ATSPI_ROLE_SCROLL_BAR,` `ATSPI_ROLE_SLIDER` objects need not control
817
- * 'viewport'-like objects.
796
+ * range.
818
797
  */
819
798
  SLIDER,
820
799
  /**
821
800
  * An object which allows one of a set of choices to
822
- * be selected, and which displays the current choice.
801
+ * be selected, and which displays the current choice. Unlike
802
+ * `ATSPI_ROLE_SCROLL_BAR,` `ATSPI_ROLE_SLIDER` objects need not control
803
+ * 'viewport'-like objects.
823
804
  */
824
805
  SPIN_BUTTON,
825
806
  /**
@@ -942,7 +923,7 @@ export namespace Atspi {
942
923
  /**
943
924
  * An object corresponding to the toplevel accessible
944
925
  * of an application, which may contain `ATSPI_ROLE_FRAME` objects or other
945
- * accessible objects. Children of objects with the #ATSPI_ROLE_DESKTOP_FRAME role are generally
926
+ * accessible objects. Children of #AccessibleDesktop objects are generally
946
927
  * `ATSPI_ROLE_APPLICATION` objects.
947
928
  */
948
929
  APPLICATION,
@@ -1278,18 +1259,14 @@ export namespace Atspi {
1278
1259
  /**
1279
1260
  * A container for content that is called out as a proposed
1280
1261
  * change from the current version of the document, such as by a reviewer of the
1281
- * content. An object with this role should include children with %ATSPI_ROLE_CONTENT_DELETION and/or
1282
- * %ATSPI_ROLE_CONTENT_INSERTION, in any order, to indicate what the
1262
+ * content. This role should include either %ATSPI_ROLE_CONTENT_DELETION and/or
1263
+ * %ATSPI_ROLE_CONTENT_INSERTION children, in any order, to indicate what the
1283
1264
  * actual change is. `Since:` 2.36
1284
1265
  */
1285
1266
  SUGGESTION,
1286
- /**
1287
- * A specialized push button to open a menu. `Since` 2.46
1288
- */
1289
- PUSH_BUTTON_MENU,
1290
1267
  /**
1291
1268
  * Not a valid role, used for finding end of
1292
- * enumeration.
1269
+ * enumeration.
1293
1270
  */
1294
1271
  LAST_DEFINED,
1295
1272
  }
@@ -1914,19 +1891,6 @@ export namespace Atspi {
1914
1891
  * @returns %TRUE if successful, otherwise %FALSE.
1915
1892
  */
1916
1893
  function generate_mouse_event(x: number, y: number, name: string): boolean;
1917
- /**
1918
- * Like atspi_generate_mouse_event, but asynchronous.
1919
- * @param x a #glong indicating the screen x coordinate of the mouse event.
1920
- * @param y a #glong indicating the screen y coordinate of the mouse event.
1921
- * @param name a string indicating which mouse event to be synthesized (e.g. "b1p", "b1c", "b2r", "rel", "abs").
1922
- * @param callback a callback to be called when a reply is received. May be NULL.
1923
- */
1924
- function generate_mouse_event_async(
1925
- x: number,
1926
- y: number,
1927
- name: string,
1928
- callback?: GenerateMouseEventCB | null,
1929
- ): void;
1930
1894
  /**
1931
1895
  * Gets the virtual desktop indicated by index `i`.
1932
1896
  * NOTE: currently multiple virtual desktops are not implemented;
@@ -1955,10 +1919,6 @@ export namespace Atspi {
1955
1919
  * @returns a #GArray of desktops.
1956
1920
  */
1957
1921
  function get_desktop_list(): Accessible[];
1958
- /**
1959
- * Returns the version of the AT-SPI library being used at runtime.
1960
- */
1961
- function get_version(): [number, number, number];
1962
1922
  /**
1963
1923
  * Connects to the accessibility registry and initializes the SPI.
1964
1924
  * @returns 0 on success, 1 if already initialized, or an integer error code.
@@ -1970,11 +1930,11 @@ export namespace Atspi {
1970
1930
  */
1971
1931
  function is_initialized(): boolean;
1972
1932
  /**
1973
- * This function does nothing and should not be called.
1974
- * @param listener
1975
- * @param event_types
1976
- * @param filter
1977
- * @returns Always returns %FALSE.
1933
+ * Registers a listener for device events, for instance button events.
1934
+ * @param listener a pointer to the #AtspiDeviceListener which requests the events.
1935
+ * @param event_types an #AtspiDeviceEventMask mask indicating which types of key events are requested (%ATSPI_KEY_PRESSED, etc.).
1936
+ * @param filter Unused parameter.
1937
+ * @returns %TRUE if successful, otherwise %FALSE.
1978
1938
  */
1979
1939
  function register_device_event_listener(
1980
1940
  listener: DeviceListener,
@@ -2003,14 +1963,9 @@ export namespace Atspi {
2003
1963
  event_types: KeyEventMask,
2004
1964
  sync_type: KeyListenerSyncType,
2005
1965
  ): boolean;
2006
- /**
2007
- * Gets the localized description string describing the #AtspiRole `role`.
2008
- * @param role an #AtspiRole object to query.
2009
- * @returns the localized string describing the AtspiRole
2010
- */
2011
- function role_get_localized_name(role: Role): string;
2012
1966
  /**
2013
1967
  * Gets a localizable string that indicates the name of an #AtspiRole.
1968
+ * <em>DEPRECATED.</em>
2014
1969
  * @param role an #AtspiRole object to query.
2015
1970
  * @returns a localizable string name for an #AtspiRole enumerated type.
2016
1971
  */
@@ -2024,13 +1979,18 @@ export namespace Atspi {
2024
1979
  */
2025
1980
  function set_main_context(cnx: GLib.MainContext): void;
2026
1981
  /**
2027
- * Deprecated. This function no longer does anything and should not be used.
1982
+ * Sets the reference window that will be used when atspi_generate_mouse_event
1983
+ * is called. Coordinates will be assumed to be relative to this window. This
1984
+ * is needed because, due to Wayland's security model, it is not currently
1985
+ * possible to retrieve global coordinates.
1986
+ * If NULL is passed, then AT-SPI will use the window that has focus at the
1987
+ * time that atspi_generate_mouse_event is called.
2028
1988
  * @param accessible the #AtspiAccessible corresponding to the window to select. should be a top-level window with a role of ATSPI_ROLE_APPLICATION.
2029
1989
  */
2030
1990
  function set_reference_window(accessible: Accessible): void;
2031
1991
  /**
2032
1992
  * Set the timeout used for method calls. If this is not set explicitly,
2033
- * a default of 800 ms is used.
1993
+ * a default of 0.8 ms is used.
2034
1994
  * Note that at-spi2-registryd currently uses a timeout of 3 seconds when
2035
1995
  * sending a keyboard event notification. This means that, if an AT makes
2036
1996
  * a call in response to the keyboard notification and the application
@@ -2058,9 +2018,6 @@ export namespace Atspi {
2058
2018
  interface EventListenerSimpleCB {
2059
2019
  (event: Event): void;
2060
2020
  }
2061
- interface GenerateMouseEventCB {
2062
- (): void;
2063
- }
2064
2021
  interface KeyCallback {
2065
2022
  (device: Device, pressed: boolean, keycode: number, keysym: number, modifiers: number, keystring: string): void;
2066
2023
  }
@@ -2096,7 +2053,7 @@ export namespace Atspi {
2096
2053
  NOSYNC,
2097
2054
  /**
2098
2055
  * Events are delivered synchronously, before the
2099
- * currently focused application sees them.
2056
+ * currently focussed application sees them.
2100
2057
  */
2101
2058
  SYNCHRONOUS,
2102
2059
  /**
@@ -2144,13 +2101,6 @@ export namespace Atspi {
2144
2101
  Value.ConstructorProps {}
2145
2102
  }
2146
2103
 
2147
- /**
2148
- * The base interface which is implemented by all accessible objects.
2149
- *
2150
- * All objects support interfaces for querying their contained 'children'
2151
- * and position in the accessible-object hierarchy, whether or not they
2152
- * actually have children.
2153
- */
2154
2104
  class Accessible
2155
2105
  extends Object
2156
2106
  implements
@@ -2210,10 +2160,6 @@ export namespace Atspi {
2210
2160
  * descendants.
2211
2161
  */
2212
2162
  clear_cache(): void;
2213
- /**
2214
- * Clears the cached information only for the given accessible.
2215
- */
2216
- clear_cache_single(): void;
2217
2163
  /**
2218
2164
  * Gets the accessible id of the accessible. This is not meant to be presented
2219
2165
  * to the user, but to be an id which is stable over application development.
@@ -2225,7 +2171,7 @@ export namespace Atspi {
2225
2171
  * Gets the #AtspiAction interface for an #AtspiAccessible.
2226
2172
  * @returns a pointer to an #AtspiAction interface instance, or NULL if @obj does not implement #AtspiAction.
2227
2173
  */
2228
- get_action(): Action;
2174
+ get_action_iface(): Action;
2229
2175
  /**
2230
2176
  * Gets the #AtspiAction interface for an #AtspiAccessible.
2231
2177
  * @returns a pointer to an #AtspiAction interface instance, or NULL if @obj does not implement #AtspiAction.
@@ -2274,7 +2220,7 @@ export namespace Atspi {
2274
2220
  * Gets the #AtspiCollection interface for an #AtspiAccessible.
2275
2221
  * @returns a pointer to an #AtspiCollection interface instance, or NULL if @obj does not implement #AtspiCollection.
2276
2222
  */
2277
- get_collection(): Collection;
2223
+ get_collection_iface(): Collection;
2278
2224
  /**
2279
2225
  * Gets the #AtspiCollection interface for an #AtspiAccessible.
2280
2226
  * @returns a pointer to an #AtspiCollection interface instance, or NULL if @obj does not implement #AtspiCollection.
@@ -2284,7 +2230,7 @@ export namespace Atspi {
2284
2230
  * Gets the #AtspiComponent interface for an #AtspiAccessible.
2285
2231
  * @returns a pointer to an #AtspiComponent interface instance, or NULL if @obj does not implement #AtspiComponent.
2286
2232
  */
2287
- get_component(): Component;
2233
+ get_component_iface(): Component;
2288
2234
  /**
2289
2235
  * Gets the #AtspiComponent interface for an #AtspiAccessible.
2290
2236
  * @returns a pointer to an #AtspiComponent interface instance, or NULL if @obj does not implement #AtspiComponent.
@@ -2299,7 +2245,7 @@ export namespace Atspi {
2299
2245
  * Gets the #AtspiDocument interface for an #AtspiAccessible.
2300
2246
  * @returns a pointer to an #AtspiDocument interface instance, or NULL if @obj does not implement #AtspiDocument.
2301
2247
  */
2302
- get_document(): Document;
2248
+ get_document_iface(): Document;
2303
2249
  /**
2304
2250
  * Gets the #AtspiDocument interface for an #AtspiAccessible.
2305
2251
  * @returns a pointer to an #AtspiDocument interface instance, or NULL if @obj does not implement #AtspiDocument.
@@ -2309,19 +2255,12 @@ export namespace Atspi {
2309
2255
  * Gets the #AtspiEditableText interface for an #AtspiAccessible.
2310
2256
  * @returns a pointer to an #AtspiEditableText interface instance, or NULL if @obj does not implement #AtspiEditableText.
2311
2257
  */
2312
- get_editable_text(): EditableText;
2258
+ get_editable_text_iface(): EditableText;
2313
2259
  /**
2314
2260
  * Gets the #AtspiEditableText interface for an #AtspiAccessible.
2315
2261
  * @returns a pointer to an #AtspiEditableText interface instance, or NULL if @obj does not implement #AtspiEditableText.
2316
2262
  */
2317
2263
  get_editable_text_iface(): EditableText;
2318
- /**
2319
- * Gets the help text associated with the accessible, if set. When this is
2320
- * present, it provides information that a screen reader can relay to the user
2321
- * to explain how to interact with the object.
2322
- * @returns a character string representing the help text for the #AtspiAccessible object or NULL on exception.
2323
- */
2324
- get_help_text(): string;
2325
2264
  /**
2326
2265
  * Gets the #AtspiHyperlink interface for an #AtspiAccessible.
2327
2266
  * @returns the #AtspiHyperlink object associated with the given #AtspiAccessible, or NULL if not supported.
@@ -2331,7 +2270,7 @@ export namespace Atspi {
2331
2270
  * Gets the #AtspiHypertext interface for an #AtspiAccessible.
2332
2271
  * @returns a pointer to an #AtspiHypertext interface instance, or NULL if @obj does not implement #AtspiHypertext.
2333
2272
  */
2334
- get_hypertext(): Hypertext;
2273
+ get_hypertext_iface(): Hypertext;
2335
2274
  /**
2336
2275
  * Gets the #AtspiHypertext interface for an #AtspiAccessible.
2337
2276
  * @returns a pointer to an #AtspiHypertext interface instance, or NULL if @obj does not implement #AtspiHypertext.
@@ -2347,7 +2286,7 @@ export namespace Atspi {
2347
2286
  * Gets the #AtspiImage interface for an #AtspiAccessible.
2348
2287
  * @returns a pointer to an #AtspiImage interface instance, or NULL if @obj does not implement #AtspiImage.
2349
2288
  */
2350
- get_image(): Image;
2289
+ get_image_iface(): Image;
2351
2290
  /**
2352
2291
  * Gets the #AtspiImage interface for an #AtspiAccessible.
2353
2292
  * @returns a pointer to an #AtspiImage interface instance, or NULL if @obj does not implement #AtspiImage.
@@ -2413,9 +2352,7 @@ export namespace Atspi {
2413
2352
  * Gets the #AtspiSelection interface for an #AtspiAccessible.
2414
2353
  * @returns a pointer to an #AtspiSelection interface instance, or NULL if @obj does not implement #AtspiSelection.
2415
2354
  */
2416
- get_selection(): Selection;
2417
- // Conflicted with Atspi.Text.get_selection
2418
- get_selection(...args: never[]): any;
2355
+ get_selection_iface(): Selection;
2419
2356
  /**
2420
2357
  * Gets the #AtspiSelection interface for an #AtspiAccessible.
2421
2358
  * @returns a pointer to an #AtspiSelection interface instance, or NULL if @obj does not implement #AtspiSelection.
@@ -2430,9 +2367,7 @@ export namespace Atspi {
2430
2367
  * Gets the #AtspiTable interface for an #AtspiAccessible.
2431
2368
  * @returns a pointer to an #AtspiTable interface instance, or NULL if @obj does not implement #AtspiTable.
2432
2369
  */
2433
- get_table(): Table;
2434
- // Conflicted with Atspi.TableCell.get_table
2435
- get_table(...args: never[]): any;
2370
+ get_table_iface(): Table;
2436
2371
  /**
2437
2372
  * Gets the #AtspiTableCell interface for an #AtspiAccessible.
2438
2373
  * @returns a pointer to an #AtspiTableCell interface instance, or NULL if @obj does not implement #AtspiTable.
@@ -2447,9 +2382,7 @@ export namespace Atspi {
2447
2382
  * Gets the #AtspiTable interface for an #AtspiAccessible.
2448
2383
  * @returns a pointer to an #AtspiText interface instance, or NULL if @obj does not implement #AtspiText.
2449
2384
  */
2450
- get_text(): Text;
2451
- // Conflicted with Atspi.Text.get_text
2452
- get_text(...args: never[]): any;
2385
+ get_text_iface(): Text;
2453
2386
  /**
2454
2387
  * Gets the #AtspiTable interface for an #AtspiAccessible.
2455
2388
  * @returns a pointer to an #AtspiText interface instance, or NULL if @obj does not implement #AtspiText.
@@ -2471,7 +2404,7 @@ export namespace Atspi {
2471
2404
  * Gets the #AtspiTable interface for an #AtspiAccessible.
2472
2405
  * @returns a pointer to an #AtspiValue interface instance, or NULL if @obj does not implement #AtspiValue.
2473
2406
  */
2474
- get_value(): Value;
2407
+ get_value_iface(): Value;
2475
2408
  /**
2476
2409
  * Gets the #AtspiTable interface for an #AtspiAccessible.
2477
2410
  * @returns a pointer to an #AtspiValue interface instance, or NULL if @obj does not implement #AtspiValue.
@@ -2686,8 +2619,8 @@ export namespace Atspi {
2686
2619
  scroll_to_point(coords: CoordType, x: number, y: number): boolean;
2687
2620
  /**
2688
2621
  * Moves and resizes the specified component.
2689
- * @param x the new horizontal position to which the component should be moved.
2690
- * @param y the new vertical position to which the component should be moved.
2622
+ * @param x the new vertical position to which the component should be moved.
2623
+ * @param y the new horizontal position to which the component should be moved.
2691
2624
  * @param width the width to which the component should be resized.
2692
2625
  * @param height the height to which the component should be resized.
2693
2626
  * @param ctype the coordinate system in which the position is specified. (e.g. ATSPI_COORD_TYPE_WINDOW, ATSPI_COORD_TYPE_SCREEN).
@@ -2696,14 +2629,14 @@ export namespace Atspi {
2696
2629
  set_extents(x: number, y: number, width: number, height: number, ctype: CoordType): boolean;
2697
2630
  /**
2698
2631
  * Moves the component to the specified position.
2699
- * @param x the new horizontal position to which the component should be moved.
2700
- * @param y the new vertical position to which the component should be moved.
2632
+ * @param x the new vertical position to which the component should be moved.
2633
+ * @param y the new horizontal position to which the component should be moved.
2701
2634
  * @param ctype the coordinate system in which the position is specified. (e.g. ATSPI_COORD_TYPE_WINDOW, ATSPI_COORD_TYPE_SCREEN).
2702
2635
  * @returns #TRUE if successful; #FALSE otherwise.
2703
2636
  */
2704
2637
  set_position(x: number, y: number, ctype: CoordType): boolean;
2705
2638
  /**
2706
- * Resizes the specified component to the given pixel dimensions.
2639
+ * Resizes the specified component to the given coordinates.
2707
2640
  * @param width the width to which the component should be resized.
2708
2641
  * @param height the height to which the component should be resized.
2709
2642
  * @returns #TRUE if successful; #FALSE otherwise.
@@ -2737,21 +2670,6 @@ export namespace Atspi {
2737
2670
  * @returns a #gint indicating the page count of an #AccessibleDocument object.
2738
2671
  */
2739
2672
  get_page_count(): number;
2740
- /**
2741
- * Returns an array of AtspiTextSelections within this document.
2742
- * @returns a GArray of AtspiTextSelection structures representing the selection.
2743
- */
2744
- get_text_selections(): TextSelection[];
2745
- /**
2746
- * Makes 1 or more selections within this document denoted by the given
2747
- * array of AtspiTextSelections. Any existing physical selection (inside or
2748
- * outside this document) is replaced by the new selections. All objects within
2749
- * the given selection ranges must be descendants of this document. Otherwise
2750
- * FALSE will be returned.
2751
- * @param selections a GArray of AtspiTextSelections to be selected.
2752
- * @returns TRUE if the selection was made successfully; FALSE otherwise.
2753
- */
2754
- set_text_selections(selections: TextSelection[]): boolean;
2755
2673
  /**
2756
2674
  * Copies text from an #AtspiEditableText object into the system clipboard.
2757
2675
  *
@@ -3172,6 +3090,11 @@ export namespace Atspi {
3172
3090
  * @returns a gint representing the number of rows occupied by this cell, or 0 if the cell does not implement this method.
3173
3091
  */
3174
3092
  get_row_span(): number;
3093
+ /**
3094
+ * Returns a reference to the accessible of the containing table.
3095
+ * @returns the AtspiAccessible for the containing table.
3096
+ */
3097
+ get_table(): Accessible;
3175
3098
  /**
3176
3099
  * Selects some text (adds a text selection) in an #AtspiText object.
3177
3100
  * @param start_offset the starting offset of the desired new selection.
@@ -3198,6 +3121,7 @@ export namespace Atspi {
3198
3121
  * Gets the attributes applied to a range of text from an #AtspiText
3199
3122
  * object. The text attributes correspond to CSS attributes
3200
3123
  * where possible.
3124
+ * <em>DEPRECATED</em>
3201
3125
  * @param offset a #gint indicating the offset from which the attribute search is based.
3202
3126
  * @returns a #GHashTable describing the attributes at the given character offset.
3203
3127
  */
@@ -3282,6 +3206,12 @@ export namespace Atspi {
3282
3206
  * @returns An #AtspiRect giving the position and size of the specified range of text.
3283
3207
  */
3284
3208
  get_range_extents(start_offset: number, end_offset: number, type: CoordType): Rect;
3209
+ /**
3210
+ * Gets the bounds of the `selection_num-th` active text selection for an
3211
+ * #AtspiText object.
3212
+ * @param selection_num a #gint indicating which selection to query.
3213
+ */
3214
+ get_selection(selection_num: number): Range;
3285
3215
  /**
3286
3216
  * Gets a portion of the text exposed through an #AtspiText according to a given `offset`
3287
3217
  * and a specific `granularity,` along with the start and end offsets defining the
@@ -3318,6 +3248,17 @@ export namespace Atspi {
3318
3248
  * @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.
3319
3249
  */
3320
3250
  get_string_at_offset(offset: number, granularity: TextGranularity): TextRange;
3251
+ /**
3252
+ * Gets a range of text from an #AtspiText object. The number of bytes
3253
+ * in the returned string may exceed either end_offset or start_offset, since
3254
+ * UTF-8 is a variable-width encoding.
3255
+ * @param start_offset a #gint indicating the start of the desired text range.
3256
+ * @param end_offset a #gint indicating the first character past the desired range.
3257
+ * @returns a text string containing characters from @start_offset to @end_offset-1, inclusive, encoded as UTF-8.
3258
+ */
3259
+ get_text(start_offset: number, end_offset: number): string;
3260
+ // Conflicted with Atspi.Value.get_text
3261
+ get_text(...args: never[]): any;
3321
3262
  /**
3322
3263
  * Gets delimited text from an #AtspiText object which follows a given
3323
3264
  * text offset.
@@ -3777,13 +3718,6 @@ export namespace Atspi {
3777
3718
  interface ConstructorProps extends GObject.Object.ConstructorProps {}
3778
3719
  }
3779
3720
 
3780
- /**
3781
- * An interface identifying the root object associated
3782
- * with a running application.
3783
- *
3784
- * An interface identifying an object which is the root of the
3785
- * hierarchy associated with a running application.
3786
- */
3787
3721
  class Application extends GObject.Object {
3788
3722
  static $gtype: GObject.GType<Application>;
3789
3723
 
@@ -3823,27 +3757,14 @@ export namespace Atspi {
3823
3757
 
3824
3758
  // Own virtual methods of Atspi.Device
3825
3759
 
3826
- vfunc_add_key_grab(kd: KeyDefinition): boolean;
3827
- /**
3828
- * Synthesizes a mouse event at a specific screen coordinate.
3829
- * Most AT clients should use the #AccessibleAction interface when
3830
- * tempted to generate mouse events, rather than this method.
3831
- * Event names: b1p = button 1 press; b2r = button 2 release;
3832
- * b3c = button 3 click; b2d = button 2 double-click;
3833
- * abs = absolute motion; rel = relative motion.
3834
- * @param obj The #AtspiAccessible that should receive the click.
3835
- * @param x a #gint indicating the x coordinate of the mouse event, relative to @obj..
3836
- * @param y a #gint indicating the y coordinate of the mouse event, relative to @obj..
3837
- * @param name a string indicating which mouse event to be synthesized (e.g. "b1p", "b1c", "b2r", "rel", "abs").
3838
- */
3839
- vfunc_generate_mouse_event(obj: Accessible, x: number, y: number, name: string): void;
3760
+ vfunc_add_key_grab(kd: KeyDefinition): void;
3840
3761
  /**
3841
3762
  * Returns the locked modifiers (ie, num lock, caps lock) associated with this
3842
3763
  * keyboard.
3843
3764
  */
3844
3765
  vfunc_get_locked_modifiers(): number;
3845
3766
  /**
3846
- * Gets the modifier for a given keycode, if one exists. Does not create a new
3767
+ * Gets the modifier for a given keycode, if one exists. Does not creatt a new
3847
3768
  * mapping. This function should be used when the intention is to query a
3848
3769
  * locking modifier such as num lock via atspi_device_get_locked_modifiers,
3849
3770
  * rather than to add key grabs.
@@ -3891,19 +3812,6 @@ export namespace Atspi {
3891
3812
  * pressed or released.
3892
3813
  */
3893
3814
  add_key_watcher(): void;
3894
- /**
3895
- * Synthesizes a mouse event at a specific screen coordinate.
3896
- * Most AT clients should use the #AccessibleAction interface when
3897
- * tempted to generate mouse events, rather than this method.
3898
- * Event names: b1p = button 1 press; b2r = button 2 release;
3899
- * b3c = button 3 click; b2d = button 2 double-click;
3900
- * abs = absolute motion; rel = relative motion.
3901
- * @param obj The #AtspiAccessible that should receive the click.
3902
- * @param x a #gint indicating the x coordinate of the mouse event, relative to @obj..
3903
- * @param y a #gint indicating the y coordinate of the mouse event, relative to @obj..
3904
- * @param name a string indicating which mouse event to be synthesized (e.g. "b1p", "b1c", "b2r", "rel", "abs").
3905
- */
3906
- generate_mouse_event(obj: Accessible, x: number, y: number, name: string): void;
3907
3815
  get_grab_by_id(id: number): KeyDefinition;
3908
3816
  /**
3909
3817
  * Returns the locked modifiers (ie, num lock, caps lock) associated with this
@@ -3912,7 +3820,7 @@ export namespace Atspi {
3912
3820
  */
3913
3821
  get_locked_modifiers(): number;
3914
3822
  /**
3915
- * Gets the modifier for a given keycode, if one exists. Does not create a new
3823
+ * Gets the modifier for a given keycode, if one exists. Does not creatt a new
3916
3824
  * mapping. This function should be used when the intention is to query a
3917
3825
  * locking modifier such as num lock via atspi_device_get_locked_modifiers,
3918
3826
  * rather than to add key grabs.
@@ -4040,15 +3948,6 @@ export namespace Atspi {
4040
3948
  interface ConstructorProps extends GObject.Object.ConstructorProps {}
4041
3949
  }
4042
3950
 
4043
- /**
4044
- * A generic interface implemented by objects for the receipt of event
4045
- * notifications.
4046
- *
4047
- * A generic interface implemented by objects for the receipt of event
4048
- * notifications. atspi-event-listener is the interface via which clients of
4049
- * the atspi-registry receive notification of changes to an application's user
4050
- * interface and content.
4051
- */
4052
3951
  class EventListener extends GObject.Object {
4053
3952
  static $gtype: GObject.GType<EventListener>;
4054
3953
 
@@ -4134,7 +4033,6 @@ export namespace Atspi {
4134
4033
  * object:column-deleted
4135
4034
  * object:model-changed
4136
4035
  * object:active-descendant-changed
4137
- * object:announcement
4138
4036
  *
4139
4037
  * (screen reader events)
4140
4038
  * screen-reader:region-changed
@@ -4208,18 +4106,6 @@ export namespace Atspi {
4208
4106
  interface ConstructorProps extends Object.ConstructorProps {}
4209
4107
  }
4210
4108
 
4211
- /**
4212
- * Instances of atspi-hyperlink are the means by which end users
4213
- * and clients interact with linked content.
4214
- *
4215
- * Instances of atspi-hyperlink are returned by
4216
- * atspi-hypertext objects, and are the means by
4217
- * which end users and clients interact with linked,
4218
- * and in some cases embedded, content. These instances
4219
- * may have multiple "anchors", where an anchor corresponds to a
4220
- * reference to a particular resource with a corresponding resource
4221
- * identified (URI).
4222
- */
4223
4109
  class Hyperlink extends Object {
4224
4110
  static $gtype: GObject.GType<Hyperlink>;
4225
4111
 
@@ -4283,10 +4169,6 @@ export namespace Atspi {
4283
4169
  interface ConstructorProps extends GObject.Object.ConstructorProps {}
4284
4170
  }
4285
4171
 
4286
- /**
4287
- * An interface that allows the definition of match rules
4288
- * for accessible objects.
4289
- */
4290
4172
  class MatchRule extends GObject.Object {
4291
4173
  static $gtype: GObject.GType<MatchRule>;
4292
4174
 
@@ -4347,14 +4229,6 @@ export namespace Atspi {
4347
4229
  interface ConstructorProps extends GObject.Object.ConstructorProps {}
4348
4230
  }
4349
4231
 
4350
- /**
4351
- * An interface via which non-hierarchical relationships
4352
- * are indicated.
4353
- *
4354
- * An interface via which non-hierarchical relationships
4355
- * are indicated. An instance of this interface represents
4356
- * a "one-to-many" correspondence.
4357
- */
4358
4232
  class Relation extends GObject.Object {
4359
4233
  static $gtype: GObject.GType<Relation>;
4360
4234
 
@@ -4397,10 +4271,6 @@ export namespace Atspi {
4397
4271
  interface ConstructorProps extends GObject.Object.ConstructorProps {}
4398
4272
  }
4399
4273
 
4400
- /**
4401
- * The atspi-stateset objects implement wrappers around a
4402
- * bitmap of accessible states.
4403
- */
4404
4274
  class StateSet extends GObject.Object {
4405
4275
  static $gtype: GObject.GType<StateSet>;
4406
4276
 
@@ -4708,43 +4578,6 @@ export namespace Atspi {
4708
4578
  _init(...args: any[]): void;
4709
4579
  }
4710
4580
 
4711
- /**
4712
- * This structure represents a single text selection within a document. This
4713
- * selection is defined by two points in the content, where each one is defined
4714
- * by an AtkObject supporting the AtkText interface and a character offset
4715
- * relative to it.
4716
- *
4717
- * The end object must appear after the start object in the accessibility tree,
4718
- * i.e. the end object must be reachable from the start object by navigating
4719
- * forward (next, first child etc).
4720
- *
4721
- * This struct also contains a `start_is_active` boolean, to communicate if the
4722
- * start of the selection is the active point or not.
4723
- *
4724
- * The active point corresponds to the user's focus or point of interest. The
4725
- * user moves the active point to expand or collapse the range. The anchor
4726
- * point is the other point of the range and typically remains constant. In
4727
- * most cases, anchor is the start of the range and active is the end. However,
4728
- * when selecting backwards (e.g. pressing shift+left arrow in a text field),
4729
- * the start of the range is the active point, as the user moves this to
4730
- * manipulate the selection.
4731
- */
4732
- class TextSelection {
4733
- static $gtype: GObject.GType<TextSelection>;
4734
-
4735
- // Own fields of Atspi.TextSelection
4736
-
4737
- start_object: Accessible;
4738
- start_offset: number;
4739
- end_object: Accessible;
4740
- end_offset: number;
4741
- start_is_active: boolean;
4742
-
4743
- // Constructors of Atspi.TextSelection
4744
-
4745
- _init(...args: any[]): void;
4746
- }
4747
-
4748
4581
  module Action {
4749
4582
  // Constructor properties interface
4750
4583
 
@@ -5000,8 +4833,8 @@ export namespace Atspi {
5000
4833
  scroll_to_point(coords: CoordType, x: number, y: number): boolean;
5001
4834
  /**
5002
4835
  * Moves and resizes the specified component.
5003
- * @param x the new horizontal position to which the component should be moved.
5004
- * @param y the new vertical position to which the component should be moved.
4836
+ * @param x the new vertical position to which the component should be moved.
4837
+ * @param y the new horizontal position to which the component should be moved.
5005
4838
  * @param width the width to which the component should be resized.
5006
4839
  * @param height the height to which the component should be resized.
5007
4840
  * @param ctype the coordinate system in which the position is specified. (e.g. ATSPI_COORD_TYPE_WINDOW, ATSPI_COORD_TYPE_SCREEN).
@@ -5010,14 +4843,14 @@ export namespace Atspi {
5010
4843
  set_extents(x: number, y: number, width: number, height: number, ctype: CoordType): boolean;
5011
4844
  /**
5012
4845
  * Moves the component to the specified position.
5013
- * @param x the new horizontal position to which the component should be moved.
5014
- * @param y the new vertical position to which the component should be moved.
4846
+ * @param x the new vertical position to which the component should be moved.
4847
+ * @param y the new horizontal position to which the component should be moved.
5015
4848
  * @param ctype the coordinate system in which the position is specified. (e.g. ATSPI_COORD_TYPE_WINDOW, ATSPI_COORD_TYPE_SCREEN).
5016
4849
  * @returns #TRUE if successful; #FALSE otherwise.
5017
4850
  */
5018
4851
  set_position(x: number, y: number, ctype: CoordType): boolean;
5019
4852
  /**
5020
- * Resizes the specified component to the given pixel dimensions.
4853
+ * Resizes the specified component to the given coordinates.
5021
4854
  * @param width the width to which the component should be resized.
5022
4855
  * @param height the height to which the component should be resized.
5023
4856
  * @returns #TRUE if successful; #FALSE otherwise.
@@ -5080,21 +4913,6 @@ export namespace Atspi {
5080
4913
  * @returns a #gint indicating the page count of an #AccessibleDocument object.
5081
4914
  */
5082
4915
  get_page_count(): number;
5083
- /**
5084
- * Returns an array of AtspiTextSelections within this document.
5085
- * @returns a GArray of AtspiTextSelection structures representing the selection.
5086
- */
5087
- get_text_selections(): TextSelection[];
5088
- /**
5089
- * Makes 1 or more selections within this document denoted by the given
5090
- * array of AtspiTextSelections. Any existing physical selection (inside or
5091
- * outside this document) is replaced by the new selections. All objects within
5092
- * the given selection ranges must be descendants of this document. Otherwise
5093
- * FALSE will be returned.
5094
- * @param selections a GArray of AtspiTextSelections to be selected.
5095
- * @returns TRUE if the selection was made successfully; FALSE otherwise.
5096
- */
5097
- set_text_selections(selections: TextSelection[]): boolean;
5098
4916
  }
5099
4917
 
5100
4918
  export const Document: DocumentNamespace;
@@ -5670,6 +5488,7 @@ export namespace Atspi {
5670
5488
  * Gets the attributes applied to a range of text from an #AtspiText
5671
5489
  * object. The text attributes correspond to CSS attributes
5672
5490
  * where possible.
5491
+ * <em>DEPRECATED</em>
5673
5492
  * @param offset a #gint indicating the offset from which the attribute search is based.
5674
5493
  * @returns a #GHashTable describing the attributes at the given character offset.
5675
5494
  */
@@ -5832,6 +5651,7 @@ export namespace Atspi {
5832
5651
  * Gets the attributes applied to a range of text from an #AtspiText
5833
5652
  * object. The text attributes correspond to CSS attributes
5834
5653
  * where possible.
5654
+ * <em>DEPRECATED</em>
5835
5655
  * @param offset a #gint indicating the offset from which the attribute search is based.
5836
5656
  * @returns a #GHashTable describing the attributes at the given character offset.
5837
5657
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/atspi-2.0",
3
- "version": "2.0.0-4.0.0-beta.2",
3
+ "version": "2.0.0-4.0.0-beta.4",
4
4
  "description": "GJS TypeScript type definitions for Atspi-2.0, generated from library version 2.0.0",
5
5
  "type": "module",
6
6
  "module": "atspi-2.0.js",
@@ -26,10 +26,10 @@
26
26
  "test": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit atspi-2.0.d.ts"
27
27
  },
28
28
  "dependencies": {
29
- "@girs/dbus-1.0": "^1.0.0-4.0.0-beta.2",
30
- "@girs/gjs": "^4.0.0-beta.2",
31
- "@girs/glib-2.0": "^2.80.0-4.0.0-beta.2",
32
- "@girs/gobject-2.0": "^2.80.0-4.0.0-beta.2"
29
+ "@girs/dbus-1.0": "^1.0.0-4.0.0-beta.4",
30
+ "@girs/gjs": "^4.0.0-beta.4",
31
+ "@girs/glib-2.0": "^2.80.0-4.0.0-beta.4",
32
+ "@girs/gobject-2.0": "^2.80.0-4.0.0-beta.4"
33
33
  },
34
34
  "devDependencies": {
35
35
  "typescript": "*"