@girs/cinnamondesktop-3.0 4.2.0 → 4.4.0

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/README.md CHANGED
@@ -5,25 +5,25 @@
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/cinnamondesktop-3.0)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for CinnamonDesktop-3.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.2.0.
8
+ GJS TypeScript type definitions for CinnamonDesktop-3.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.4.0.
9
9
 
10
10
  ## Install
11
11
 
12
- To use this type definitions, install them with NPM:
12
+ Install the type definitions with npm:
13
13
  ```bash
14
14
  npm install @girs/cinnamondesktop-3.0
15
15
  ```
16
16
 
17
17
  ## Usage
18
18
 
19
- You can import this package into your project like this:
19
+ Import it like any other module:
20
20
  ```ts
21
21
  import CinnamonDesktop from '@girs/cinnamondesktop-3.0';
22
22
  ```
23
23
 
24
24
  ### Ambient Modules
25
25
 
26
- 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.
26
+ [Ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules) let you write the same import you would in plain JavaScript.
27
27
  For this you need to include `@girs/cinnamondesktop-3.0` or `@girs/cinnamondesktop-3.0/ambient` in your `tsconfig` or entry point Typescript file:
28
28
 
29
29
  `index.ts`:
@@ -42,7 +42,7 @@ import '@girs/cinnamondesktop-3.0'
42
42
  }
43
43
  ```
44
44
 
45
- Now you can import the ambient module with TypeScript support:
45
+ The ambient module now resolves with types:
46
46
 
47
47
  ```ts
48
48
  import CinnamonDesktop from 'gi://CinnamonDesktop?version=3.0';
@@ -50,7 +50,7 @@ import CinnamonDesktop from 'gi://CinnamonDesktop?version=3.0';
50
50
 
51
51
  ### Global import
52
52
 
53
- You can also import the module with Typescript support using the global `imports.gi` object of GJS.
53
+ GJS's global `imports.gi` works too, with types.
54
54
  For this you need to include `@girs/cinnamondesktop-3.0` or `@girs/cinnamondesktop-3.0/import` in your `tsconfig` or entry point Typescript file:
55
55
 
56
56
  `index.ts`:
@@ -69,7 +69,7 @@ import '@girs/cinnamondesktop-3.0'
69
69
  }
70
70
  ```
71
71
 
72
- Now you have also type support for this, too:
72
+ That form carries types as well:
73
73
 
74
74
  ```ts
75
75
  const CinnamonDesktop = imports.gi.CinnamonDesktop;
@@ -77,7 +77,7 @@ const CinnamonDesktop = imports.gi.CinnamonDesktop;
77
77
 
78
78
  ### Bundle
79
79
 
80
- 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).
80
+ Most projects want a bundler. [esbuild](https://esbuild.github.io/) is the smallest thing that works; the [examples directory](https://github.com/gjsify/ts-for-gir/tree/main/examples) has setups for several others.
81
81
 
82
82
  ## Other packages
83
83
 
@@ -786,6 +786,7 @@ export namespace CinnamonDesktop {
786
786
  * @param mime_type the mime type of the file
787
787
  * @param mtime the mtime of the file
788
788
  * @returns TRUE if the file can be thumbnailed.
789
+ * @since 2.2
789
790
  */
790
791
  can_thumbnail(uri: string, mime_type: string, mtime: bigint | number): boolean;
791
792
 
@@ -796,6 +797,7 @@ export namespace CinnamonDesktop {
796
797
  * Usage of this function is threadsafe.
797
798
  * @param uri the uri of a file
798
799
  * @param mtime the modification time of the file
800
+ * @since 2.2
799
801
  */
800
802
  create_failed_thumbnail(uri: string, mtime: bigint | number): void;
801
803
 
@@ -807,6 +809,7 @@ export namespace CinnamonDesktop {
807
809
  * @param uri the uri of a file
808
810
  * @param mime_type the mime type of the file
809
811
  * @returns thumbnail pixbuf if thumbnailing succeeded, `null` otherwise.
812
+ * @since 2.2
810
813
  */
811
814
  generate_thumbnail(uri: string, mime_type: string): GdkPixbuf.Pixbuf;
812
815
 
@@ -819,6 +822,7 @@ export namespace CinnamonDesktop {
819
822
  * @param uri the uri of a file
820
823
  * @param mtime the mtime of the file
821
824
  * @returns TRUE if there is a failed thumbnail for the file.
825
+ * @since 2.2
822
826
  */
823
827
  has_valid_failed_thumbnail(uri: string, mtime: bigint | number): boolean;
824
828
 
@@ -829,6 +833,7 @@ export namespace CinnamonDesktop {
829
833
  * @param uri the uri of a file
830
834
  * @param mtime the mtime of the file
831
835
  * @returns The absolute path of the thumbnail, or `null` if none exist.
836
+ * @since 2.2
832
837
  */
833
838
  lookup(uri: string, mtime: bigint | number): string;
834
839
 
@@ -840,6 +845,7 @@ export namespace CinnamonDesktop {
840
845
  * @param thumbnail the thumbnail as a pixbuf
841
846
  * @param uri the uri of a file
842
847
  * @param original_mtime the modification time of the original file
848
+ * @since 2.2
843
849
  */
844
850
  save_thumbnail(thumbnail: GdkPixbuf.Pixbuf, uri: string, original_mtime: bigint | number): void;
845
851
  }
@@ -956,6 +962,7 @@ export namespace CinnamonDesktop {
956
962
  * instance.
957
963
  * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
958
964
  * @returns `true` if successful. If an error has occurred, this function will return `false` and set `error` appropriately if present.
965
+ * @since 2.22
959
966
  */
960
967
  init(cancellable: Gio.Cancellable | null): boolean;
961
968
 
@@ -999,6 +1006,7 @@ export namespace CinnamonDesktop {
999
1006
  * on the result of `g_object_new()`, regardless of whether it is in fact a new
1000
1007
  * instance.
1001
1008
  * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
1009
+ * @since 2.22
1002
1010
  * @virtual
1003
1011
  */
1004
1012
  vfunc_init(cancellable: Gio.Cancellable | null): boolean;
@@ -1609,6 +1617,7 @@ export namespace CinnamonDesktop {
1609
1617
  * any interface methods.
1610
1618
  * @param io_priority the [I/O priority](iface.AsyncResult.html#io-priority) of the operation
1611
1619
  * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
1620
+ * @since 2.22
1612
1621
  */
1613
1622
  init_async(io_priority: number, cancellable: Gio.Cancellable | null): globalThis.Promise<boolean>;
1614
1623
 
@@ -1652,6 +1661,7 @@ export namespace CinnamonDesktop {
1652
1661
  * @param io_priority the [I/O priority](iface.AsyncResult.html#io-priority) of the operation
1653
1662
  * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
1654
1663
  * @param callback a {@link Gio.AsyncReadyCallback} to call when the request is satisfied
1664
+ * @since 2.22
1655
1665
  */
1656
1666
  init_async(io_priority: number, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void;
1657
1667
 
@@ -1695,6 +1705,7 @@ export namespace CinnamonDesktop {
1695
1705
  * @param io_priority the [I/O priority](iface.AsyncResult.html#io-priority) of the operation
1696
1706
  * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
1697
1707
  * @param callback a {@link Gio.AsyncReadyCallback} to call when the request is satisfied
1708
+ * @since 2.22
1698
1709
  */
1699
1710
  init_async(io_priority: number, cancellable: Gio.Cancellable | null, callback?: Gio.AsyncReadyCallback<this> | null): globalThis.Promise<boolean> | void;
1700
1711
 
@@ -1703,6 +1714,7 @@ export namespace CinnamonDesktop {
1703
1714
  * See `g_async_initable_init_async()`.
1704
1715
  * @param res a {@link Gio.AsyncResult}.
1705
1716
  * @returns `true` if successful. If an error has occurred, this function will return `false` and set `error` appropriately if present.
1717
+ * @since 2.22
1706
1718
  */
1707
1719
  init_finish(res: Gio.AsyncResult): boolean;
1708
1720
 
@@ -1711,6 +1723,7 @@ export namespace CinnamonDesktop {
1711
1723
  * calls, returning the created object or `null` on error.
1712
1724
  * @param res the {@link Gio.AsyncResult} from the callback
1713
1725
  * @returns a newly created {@link GObject.Object}, or `null` on error. Free with `g_object_unref()`.
1726
+ * @since 2.22
1714
1727
  */
1715
1728
  new_finish(res: Gio.AsyncResult): RRScreen;
1716
1729
 
@@ -1754,6 +1767,7 @@ export namespace CinnamonDesktop {
1754
1767
  * @param io_priority the [I/O priority](iface.AsyncResult.html#io-priority) of the operation
1755
1768
  * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
1756
1769
  * @param callback a {@link Gio.AsyncReadyCallback} to call when the request is satisfied
1770
+ * @since 2.22
1757
1771
  * @virtual
1758
1772
  */
1759
1773
  vfunc_init_async(io_priority: number, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void;
@@ -1762,6 +1776,7 @@ export namespace CinnamonDesktop {
1762
1776
  * Finishes asynchronous initialization and returns the result.
1763
1777
  * See `g_async_initable_init_async()`.
1764
1778
  * @param res a {@link Gio.AsyncResult}.
1779
+ * @since 2.22
1765
1780
  * @virtual
1766
1781
  */
1767
1782
  vfunc_init_finish(res: Gio.AsyncResult): boolean;
@@ -1807,6 +1822,7 @@ export namespace CinnamonDesktop {
1807
1822
  * instance.
1808
1823
  * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
1809
1824
  * @returns `true` if successful. If an error has occurred, this function will return `false` and set `error` appropriately if present.
1825
+ * @since 2.22
1810
1826
  */
1811
1827
  init(cancellable: Gio.Cancellable | null): boolean;
1812
1828
 
@@ -1850,6 +1866,7 @@ export namespace CinnamonDesktop {
1850
1866
  * on the result of `g_object_new()`, regardless of whether it is in fact a new
1851
1867
  * instance.
1852
1868
  * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
1869
+ * @since 2.22
1853
1870
  * @virtual
1854
1871
  */
1855
1872
  vfunc_init(cancellable: Gio.Cancellable | null): boolean;
@@ -2042,6 +2059,7 @@ export namespace CinnamonDesktop {
2042
2059
  /**
2043
2060
  * @param group_id identifier for group
2044
2061
  * @returns the translated description for the group `group_id`.
2062
+ * @since 3.8
2045
2063
  */
2046
2064
  description_for_group(group_id: string): string;
2047
2065
 
@@ -2049,18 +2067,21 @@ export namespace CinnamonDesktop {
2049
2067
  * @param group_id identifier for group containing the option
2050
2068
  * @param id option identifier
2051
2069
  * @returns the translated description for the option `id`.
2070
+ * @since 3.6
2052
2071
  */
2053
2072
  description_for_option(group_id: string, id: string): string;
2054
2073
 
2055
2074
  /**
2056
2075
  * Returns a list of all layout identifiers we know about.
2057
2076
  * @returns the list of layout names. The caller takes ownership of the {@link GLib.List} but not of the strings themselves, those are internally allocated and must not be modified.
2077
+ * @since 3.6
2058
2078
  */
2059
2079
  get_all_layouts(): string[];
2060
2080
 
2061
2081
  /**
2062
2082
  * Returns a list of all option group identifiers we know about.
2063
2083
  * @returns the list of option group ids. The caller takes ownership of the {@link GLib.List} but not of the strings themselves, those are internally allocated and must not be modified.
2084
+ * @since 3.6
2064
2085
  */
2065
2086
  get_all_option_groups(): string[];
2066
2087
 
@@ -2069,6 +2090,7 @@ export namespace CinnamonDesktop {
2069
2090
  * `layout_id`.
2070
2091
  * @param layout_id a layout identifier
2071
2092
  * @returns the list of ISO 639 code strings. The caller takes ownership of the {@link GLib.List} but not of the strings themselves, those are internally allocated and must not be modified.
2093
+ * @since 3.18
2072
2094
  */
2073
2095
  get_languages_for_layout(layout_id: string): string[];
2074
2096
 
@@ -2085,6 +2107,7 @@ export namespace CinnamonDesktop {
2085
2107
  * all the (out) parameters are set to `null`.
2086
2108
  * @param id layout's identifier about which to retrieve the info
2087
2109
  * @returns `true` if the layout exists or `false` otherwise.
2110
+ * @since 3.6
2088
2111
  */
2089
2112
  get_layout_info(id: string): [boolean, string, string, string, string];
2090
2113
 
@@ -2093,6 +2116,7 @@ export namespace CinnamonDesktop {
2093
2116
  * `country_code`.
2094
2117
  * @param country_code an ISO 3166 code string
2095
2118
  * @returns the list of layout ids. The caller takes ownership of the {@link GLib.List} but not of the strings themselves, those are internally allocated and must not be modified.
2119
+ * @since 3.8
2096
2120
  */
2097
2121
  get_layouts_for_country(country_code: string): string[];
2098
2122
 
@@ -2101,6 +2125,7 @@ export namespace CinnamonDesktop {
2101
2125
  * `language_code`.
2102
2126
  * @param language_code an ISO 639 code string
2103
2127
  * @returns the list of layout ids. The caller takes ownership of the {@link GLib.List} but not of the strings themselves, those are internally allocated and must not be modified.
2128
+ * @since 3.8
2104
2129
  */
2105
2130
  get_layouts_for_language(language_code: string): string[];
2106
2131
 
@@ -2116,6 +2141,7 @@ export namespace CinnamonDesktop {
2116
2141
  * `group_id`.
2117
2142
  * @param group_id group's identifier about which to retrieve the options
2118
2143
  * @returns the list of option ids. The caller takes ownership of the {@link GLib.List} but not of the strings themselves, those are internally allocated and must not be modified.
2144
+ * @since 6.6
2119
2145
  */
2120
2146
  get_options_for_group(group_id: string): string[];
2121
2147
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/cinnamondesktop-3.0",
3
- "version": "4.2.0",
3
+ "version": "4.4.0",
4
4
  "description": "GJS TypeScript type definitions for CinnamonDesktop-3.0",
5
5
  "type": "module",
6
6
  "module": "cinnamondesktop-3.0.js",
@@ -31,21 +31,21 @@
31
31
  "test": "tsc --project tsconfig.json"
32
32
  },
33
33
  "dependencies": {
34
- "@girs/gjs": "^4.2.0",
35
- "@girs/gtk-3.0": "^4.2.0",
36
- "@girs/xlib-2.0": "^4.2.0",
37
- "@girs/gdk-3.0": "^4.2.0",
38
- "@girs/cairo-1.0": "^4.2.0",
39
- "@girs/gobject-2.0": "^4.2.0",
40
- "@girs/glib-2.0": "^4.2.0",
41
- "@girs/pango-1.0": "^4.2.0",
42
- "@girs/harfbuzz-0.0": "^4.2.0",
43
- "@girs/freetype2-2.0": "^4.2.0",
44
- "@girs/gio-2.0": "^4.2.0",
45
- "@girs/gmodule-2.0": "^4.2.0",
46
- "@girs/gdkpixbuf-2.0": "^4.2.0",
47
- "@girs/atk-1.0": "^4.2.0",
48
- "@girs/cdesktopenums-3.0": "^4.2.0" },
34
+ "@girs/gjs": "^4.4.0",
35
+ "@girs/gtk-3.0": "^4.4.0",
36
+ "@girs/xlib-2.0": "^4.4.0",
37
+ "@girs/gdk-3.0": "^4.4.0",
38
+ "@girs/cairo-1.0": "^4.4.0",
39
+ "@girs/gobject-2.0": "^4.4.0",
40
+ "@girs/glib-2.0": "^4.4.0",
41
+ "@girs/pango-1.0": "^4.4.0",
42
+ "@girs/harfbuzz-0.0": "^4.4.0",
43
+ "@girs/freetype2-2.0": "^4.4.0",
44
+ "@girs/gio-2.0": "^4.4.0",
45
+ "@girs/gmodule-2.0": "^4.4.0",
46
+ "@girs/gdkpixbuf-2.0": "^4.4.0",
47
+ "@girs/atk-1.0": "^4.4.0",
48
+ "@girs/cdesktopenums-3.0": "^4.4.0" },
49
49
  "devDependencies": {
50
50
  "typescript": "*"
51
51
  },