@girs/meta-11 11.0.0-3.0.0-beta.13 → 11.0.0-3.0.1

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
@@ -1,11 +1,12 @@
1
1
 
2
2
  # Meta-11
3
3
 
4
- GJS TypeScript type definitions for Meta-11, generated from library version 11.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gjs) v3.0.0-beta.13.
4
+ GJS TypeScript type definitions for Meta-11, generated from library version 11.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.0.1.
5
+
5
6
 
6
7
  ## Install
7
8
 
8
- To use this type definitions, install them with NPM like this:
9
+ To use this type definitions, install them with NPM:
9
10
  ```bash
10
11
  npm install @girs/meta-11
11
12
  ```
@@ -22,10 +23,65 @@ Or if you prefer CommonJS, you can also use this:
22
23
  const Meta = require('@girs/meta-11');
23
24
  ```
24
25
 
25
- If you use [ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules), you can also import this module like you would do this in JavaScript:
26
+ ### Ambient Modules
27
+
28
+ 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.
29
+ For this you need to include `@girs/meta-11` or `@girs/meta-11/ambient` in your `tsconfig` or entry point Typescript file:
30
+
31
+ `index.ts`:
32
+ ```ts
33
+ import '@girs/meta-11'
34
+ ```
35
+
36
+ `tsconfig.json`:
37
+ ```json
38
+ {
39
+ "compilerOptions": {
40
+ ...
41
+ },
42
+ "include": ["@girs/meta-11"],
43
+ ...
44
+ }
45
+ ```
46
+
47
+ Now you can import the ambient module with TypeScript support:
26
48
 
27
49
  ```ts
28
50
  import Meta from 'gi://Meta?version=11';
29
51
  ```
30
52
 
31
- 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).
53
+ ### Global import
54
+
55
+ You can also import the module with Typescript support using the global `imports.gi` object of GJS.
56
+ For this you need to include `@girs/meta-11` or `@girs/meta-11/import` in your `tsconfig` or entry point Typescript file:
57
+
58
+ `index.ts`:
59
+ ```ts
60
+ import '@girs/meta-11'
61
+ ```
62
+
63
+ `tsconfig.json`:
64
+ ```json
65
+ {
66
+ "compilerOptions": {
67
+ ...
68
+ },
69
+ "include": ["@girs/meta-11"],
70
+ ...
71
+ }
72
+ ```
73
+
74
+ Now you have also type support for this, too:
75
+
76
+ ```ts
77
+ const Meta = imports.gi.Meta;
78
+ ```
79
+
80
+ ### Bundle
81
+
82
+ 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).
83
+
84
+ ## Other packages
85
+
86
+ All existing pre-generated packages can be found on [gjsify/types](https://github.com/gjsify/types).
87
+
@@ -0,0 +1,9 @@
1
+
2
+
3
+ declare module 'gi://Meta?version=11' {
4
+ import Meta11 from '@girs/meta-11';
5
+ export default Meta11;
6
+ }
7
+
8
+
9
+
@@ -0,0 +1,13 @@
1
+
2
+
3
+ import Meta11 from '@girs/meta-11';
4
+
5
+ declare global {
6
+ export interface GjsGiImports {
7
+ Meta: typeof Meta11;
8
+ }
9
+ }
10
+
11
+ export default GjsGiImports;
12
+
13
+
package/meta-11.cjs CHANGED
@@ -7,3 +7,5 @@
7
7
 
8
8
 
9
9
 
10
+
11
+
package/meta-11.d.cts CHANGED
@@ -3,8 +3,11 @@
3
3
  * Type Definitions for Gjs (https://gjs.guide/)
4
4
  *
5
5
  * These type definitions are automatically generated, do not edit them by hand.
6
- * If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gjs
6
+ * If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
7
7
  */
8
+
9
+ import './meta-11-ambient.d.ts';
10
+ import './meta-11-import.d.ts';
8
11
  /**
9
12
  * Meta-11
10
13
  */
@@ -3058,23 +3061,6 @@ export class Compositor extends GObject.Object {
3058
3061
 
3059
3062
  export module Context {
3060
3063
 
3061
- // Signal callback interfaces
3062
-
3063
- /**
3064
- * Signal callback interface for `prepare-shutdown`
3065
- */
3066
- export interface PrepareShutdownSignalCallback {
3067
- ($obj: Context): void
3068
- }
3069
-
3070
- /**
3071
- * Signal callback interface for `started`
3072
- */
3073
- export interface StartedSignalCallback {
3074
- ($obj: Context): void
3075
- }
3076
-
3077
-
3078
3064
  // Constructor properties interface
3079
3065
 
3080
3066
  export interface ConstructorProperties extends GObject.Object.ConstructorProperties {
@@ -3135,15 +3121,6 @@ export interface Context {
3135
3121
  terminate(): void
3136
3122
  terminate_with_error(error: GLib.Error): void
3137
3123
 
3138
- // Own signals of Meta-11.Meta.Context
3139
-
3140
- connect(sigName: "prepare-shutdown", callback: Context.PrepareShutdownSignalCallback): number
3141
- connect_after(sigName: "prepare-shutdown", callback: Context.PrepareShutdownSignalCallback): number
3142
- emit(sigName: "prepare-shutdown", ...args: any[]): void
3143
- connect(sigName: "started", callback: Context.StartedSignalCallback): number
3144
- connect_after(sigName: "started", callback: Context.StartedSignalCallback): number
3145
- emit(sigName: "started", ...args: any[]): void
3146
-
3147
3124
  // Class property signals of Meta-11.Meta.Context
3148
3125
 
3149
3126
  connect(sigName: "notify::name", callback: (($obj: Context, pspec: GObject.ParamSpec) => void)): number
@@ -4442,6 +4419,22 @@ export interface Selection {
4442
4419
  * @param callback User callback
4443
4420
  */
4444
4421
  transfer_async(selection_type: SelectionType, mimetype: string | null, size: number, output: Gio.OutputStream, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
4422
+
4423
+ // Overloads of transfer_async
4424
+
4425
+ /**
4426
+ * Promisified version of {@link transfer_async}
4427
+ *
4428
+ * Requests a transfer of `mimetype` on the selection given by
4429
+ * `selection_type`.
4430
+ * @param selection_type Selection type
4431
+ * @param mimetype Mimetype to transfer
4432
+ * @param size Maximum size to transfer, -1 for unlimited
4433
+ * @param output Output stream to write contents to
4434
+ * @param cancellable Cancellable
4435
+ * @returns A Promise of: #TRUE if the transfer was successful.
4436
+ */
4437
+ transfer_async(selection_type: SelectionType, mimetype: string | null, size: number, output: Gio.OutputStream, cancellable: Gio.Cancellable | null): globalThis.Promise<boolean>
4445
4438
  /**
4446
4439
  * Finishes the transfer of a queried mimetype.
4447
4440
  * @param result The async result
@@ -4530,6 +4523,18 @@ export interface SelectionSource {
4530
4523
  */
4531
4524
  is_active(): boolean
4532
4525
  read_async(mimetype: string | null, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
4526
+
4527
+ // Overloads of read_async
4528
+
4529
+ /**
4530
+ * Promisified version of {@link read_async}
4531
+ *
4532
+ *
4533
+ * @param mimetype
4534
+ * @param cancellable
4535
+ * @returns A Promise of: The resulting #GInputStream
4536
+ */
4537
+ read_async(mimetype: string | null, cancellable: Gio.Cancellable | null): globalThis.Promise<Gio.InputStream>
4533
4538
  /**
4534
4539
  * Finishes a read from the selection source.
4535
4540
  * @param result The async result
@@ -5374,6 +5379,13 @@ export module Window {
5374
5379
  ($obj: Window): void
5375
5380
  }
5376
5381
 
5382
+ /**
5383
+ * Signal callback interface for `monitor-changed`
5384
+ */
5385
+ export interface MonitorChangedSignalCallback {
5386
+ ($obj: Window, old_monitor: number): void
5387
+ }
5388
+
5377
5389
  /**
5378
5390
  * Signal callback interface for `position-changed`
5379
5391
  */
@@ -5806,6 +5818,9 @@ export interface Window {
5806
5818
  connect(sigName: "focus", callback: Window.FocusSignalCallback): number
5807
5819
  connect_after(sigName: "focus", callback: Window.FocusSignalCallback): number
5808
5820
  emit(sigName: "focus", ...args: any[]): void
5821
+ connect(sigName: "monitor-changed", callback: Window.MonitorChangedSignalCallback): number
5822
+ connect_after(sigName: "monitor-changed", callback: Window.MonitorChangedSignalCallback): number
5823
+ emit(sigName: "monitor-changed", old_monitor: number, ...args: any[]): void
5809
5824
  connect(sigName: "position-changed", callback: Window.PositionChangedSignalCallback): number
5810
5825
  connect_after(sigName: "position-changed", callback: Window.PositionChangedSignalCallback): number
5811
5826
  emit(sigName: "position-changed", ...args: any[]): void
package/meta-11.d.ts CHANGED
@@ -3,8 +3,11 @@
3
3
  * Type Definitions for Gjs (https://gjs.guide/)
4
4
  *
5
5
  * These type definitions are automatically generated, do not edit them by hand.
6
- * If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gjs
6
+ * If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
7
7
  */
8
+
9
+ import './meta-11-ambient.d.ts';
10
+ import './meta-11-import.d.ts';
8
11
  /**
9
12
  * Meta-11
10
13
  */
@@ -3060,23 +3063,6 @@ class Compositor extends GObject.Object {
3060
3063
 
3061
3064
  module Context {
3062
3065
 
3063
- // Signal callback interfaces
3064
-
3065
- /**
3066
- * Signal callback interface for `prepare-shutdown`
3067
- */
3068
- interface PrepareShutdownSignalCallback {
3069
- ($obj: Context): void
3070
- }
3071
-
3072
- /**
3073
- * Signal callback interface for `started`
3074
- */
3075
- interface StartedSignalCallback {
3076
- ($obj: Context): void
3077
- }
3078
-
3079
-
3080
3066
  // Constructor properties interface
3081
3067
 
3082
3068
  interface ConstructorProperties extends GObject.Object.ConstructorProperties {
@@ -3137,15 +3123,6 @@ interface Context {
3137
3123
  terminate(): void
3138
3124
  terminate_with_error(error: GLib.Error): void
3139
3125
 
3140
- // Own signals of Meta-11.Meta.Context
3141
-
3142
- connect(sigName: "prepare-shutdown", callback: Context.PrepareShutdownSignalCallback): number
3143
- connect_after(sigName: "prepare-shutdown", callback: Context.PrepareShutdownSignalCallback): number
3144
- emit(sigName: "prepare-shutdown", ...args: any[]): void
3145
- connect(sigName: "started", callback: Context.StartedSignalCallback): number
3146
- connect_after(sigName: "started", callback: Context.StartedSignalCallback): number
3147
- emit(sigName: "started", ...args: any[]): void
3148
-
3149
3126
  // Class property signals of Meta-11.Meta.Context
3150
3127
 
3151
3128
  connect(sigName: "notify::name", callback: (($obj: Context, pspec: GObject.ParamSpec) => void)): number
@@ -4444,6 +4421,22 @@ interface Selection {
4444
4421
  * @param callback User callback
4445
4422
  */
4446
4423
  transfer_async(selection_type: SelectionType, mimetype: string | null, size: number, output: Gio.OutputStream, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
4424
+
4425
+ // Overloads of transfer_async
4426
+
4427
+ /**
4428
+ * Promisified version of {@link transfer_async}
4429
+ *
4430
+ * Requests a transfer of `mimetype` on the selection given by
4431
+ * `selection_type`.
4432
+ * @param selection_type Selection type
4433
+ * @param mimetype Mimetype to transfer
4434
+ * @param size Maximum size to transfer, -1 for unlimited
4435
+ * @param output Output stream to write contents to
4436
+ * @param cancellable Cancellable
4437
+ * @returns A Promise of: #TRUE if the transfer was successful.
4438
+ */
4439
+ transfer_async(selection_type: SelectionType, mimetype: string | null, size: number, output: Gio.OutputStream, cancellable: Gio.Cancellable | null): globalThis.Promise<boolean>
4447
4440
  /**
4448
4441
  * Finishes the transfer of a queried mimetype.
4449
4442
  * @param result The async result
@@ -4532,6 +4525,18 @@ interface SelectionSource {
4532
4525
  */
4533
4526
  is_active(): boolean
4534
4527
  read_async(mimetype: string | null, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
4528
+
4529
+ // Overloads of read_async
4530
+
4531
+ /**
4532
+ * Promisified version of {@link read_async}
4533
+ *
4534
+ *
4535
+ * @param mimetype
4536
+ * @param cancellable
4537
+ * @returns A Promise of: The resulting #GInputStream
4538
+ */
4539
+ read_async(mimetype: string | null, cancellable: Gio.Cancellable | null): globalThis.Promise<Gio.InputStream>
4535
4540
  /**
4536
4541
  * Finishes a read from the selection source.
4537
4542
  * @param result The async result
@@ -5376,6 +5381,13 @@ module Window {
5376
5381
  ($obj: Window): void
5377
5382
  }
5378
5383
 
5384
+ /**
5385
+ * Signal callback interface for `monitor-changed`
5386
+ */
5387
+ interface MonitorChangedSignalCallback {
5388
+ ($obj: Window, old_monitor: number): void
5389
+ }
5390
+
5379
5391
  /**
5380
5392
  * Signal callback interface for `position-changed`
5381
5393
  */
@@ -5808,6 +5820,9 @@ interface Window {
5808
5820
  connect(sigName: "focus", callback: Window.FocusSignalCallback): number
5809
5821
  connect_after(sigName: "focus", callback: Window.FocusSignalCallback): number
5810
5822
  emit(sigName: "focus", ...args: any[]): void
5823
+ connect(sigName: "monitor-changed", callback: Window.MonitorChangedSignalCallback): number
5824
+ connect_after(sigName: "monitor-changed", callback: Window.MonitorChangedSignalCallback): number
5825
+ emit(sigName: "monitor-changed", old_monitor: number, ...args: any[]): void
5811
5826
  connect(sigName: "position-changed", callback: Window.PositionChangedSignalCallback): number
5812
5827
  connect_after(sigName: "position-changed", callback: Window.PositionChangedSignalCallback): number
5813
5828
  emit(sigName: "position-changed", ...args: any[]): void
package/meta-11.js CHANGED
@@ -6,3 +6,5 @@
6
6
  export default Meta;
7
7
 
8
8
 
9
+
10
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/meta-11",
3
- "version": "11.0.0-3.0.0-beta.13",
3
+ "version": "11.0.0-3.0.1",
4
4
  "description": "GJS TypeScript type definitions for Meta-11, generated from library version 11.0.0",
5
5
  "type": "module",
6
6
  "module": "meta-11.js",
@@ -12,6 +12,8 @@
12
12
  "tsconfig": "./tsconfig.doc.json"
13
13
  },
14
14
  "exports": {
15
+ "./ambient": "./meta-11-ambient.d.ts",
16
+ "./import": "./meta-11-import.d.ts",
15
17
  ".": {
16
18
  "import": {
17
19
  "types": "./meta-11.d.ts",
@@ -29,45 +31,49 @@
29
31
  "test:cjs": "tsc --noEmit meta-11.d.cts"
30
32
  },
31
33
  "dependencies": {
32
- "@girs/atk-1.0": "^2.45.1-3.0.0-beta.13",
33
- "@girs/cairo-1.0": "^1.0.0-3.0.0-beta.13",
34
- "@girs/clutter-11": "^11.0.0-3.0.0-beta.13",
35
- "@girs/cogl-11": "^11.0.0-3.0.0-beta.13",
36
- "@girs/coglpango-11": "^11.0.0-3.0.0-beta.13",
37
- "@girs/freetype2-2.0": "^2.0.0-3.0.0-beta.13",
38
- "@girs/gdesktopenums-3.0": "^3.0.0-3.0.0-beta.13",
39
- "@girs/gdk-3.0": "^3.24.36-3.0.0-beta.13",
40
- "@girs/gdkpixbuf-2.0": "^2.0.0-3.0.0-beta.13",
41
- "@girs/gio-2.0": "^2.76.1-3.0.0-beta.13",
42
- "@girs/gl-1.0": "^1.0.0-3.0.0-beta.13",
43
- "@girs/glib-2.0": "^2.76.1-3.0.0-beta.13",
44
- "@girs/gmodule-2.0": "^2.0.0-3.0.0-beta.13",
45
- "@girs/gobject-2.0": "^2.76.1-3.0.0-beta.13",
46
- "@girs/graphene-1.0": "^1.0.0-3.0.0-beta.13",
47
- "@girs/gtk-3.0": "^3.24.36-3.0.0-beta.13",
48
- "@girs/harfbuzz-0.0": "^6.0.0-3.0.0-beta.13",
49
- "@girs/json-1.0": "^1.7.1-3.0.0-beta.13",
50
- "@girs/pango-1.0": "^1.50.13-3.0.0-beta.13",
51
- "@girs/pangocairo-1.0": "^1.0.0-3.0.0-beta.13",
52
- "@girs/xfixes-4.0": "^4.0.0-3.0.0-beta.13",
53
- "@girs/xlib-2.0": "^2.0.0-3.0.0-beta.13"
34
+ "@girs/atk-1.0": "^2.48.2-3.0.1",
35
+ "@girs/cairo-1.0": "^1.0.0-3.0.1",
36
+ "@girs/clutter-11": "^11.0.0-3.0.1",
37
+ "@girs/cogl-11": "^11.0.0-3.0.1",
38
+ "@girs/coglpango-11": "^11.0.0-3.0.1",
39
+ "@girs/freetype2-2.0": "^2.0.0-3.0.1",
40
+ "@girs/gdesktopenums-3.0": "^3.0.0-3.0.1",
41
+ "@girs/gdk-3.0": "^3.24.37-3.0.1",
42
+ "@girs/gdkpixbuf-2.0": "^2.0.0-3.0.1",
43
+ "@girs/gio-2.0": "^2.76.1-3.0.1",
44
+ "@girs/gjs": "^3.0.1",
45
+ "@girs/gl-1.0": "^1.0.0-3.0.1",
46
+ "@girs/glib-2.0": "^2.76.1-3.0.1",
47
+ "@girs/gmodule-2.0": "^2.0.0-3.0.1",
48
+ "@girs/gobject-2.0": "^2.76.1-3.0.1",
49
+ "@girs/graphene-1.0": "^1.0.0-3.0.1",
50
+ "@girs/gtk-3.0": "^3.24.37-3.0.1",
51
+ "@girs/harfbuzz-0.0": "^7.1.0-3.0.1",
52
+ "@girs/json-1.0": "^1.7.1-3.0.1",
53
+ "@girs/pango-1.0": "^1.50.14-3.0.1",
54
+ "@girs/pangocairo-1.0": "^1.0.0-3.0.1",
55
+ "@girs/xfixes-4.0": "^4.0.0-3.0.1",
56
+ "@girs/xlib-2.0": "^2.0.0-3.0.1"
54
57
  },
55
58
  "devDependencies": {
56
- "typescript": "^*"
59
+ "typescript": "^5.0.4"
57
60
  },
58
61
  "keywords": [
59
62
  "Gir",
60
63
  "TypeScript",
64
+ "types",
65
+ "GObject-Introspection",
66
+ "GJS",
61
67
  "Meta-11"
62
68
  ],
63
69
  "author": "ts-for-gir",
64
- "license": "Apache-2.0",
70
+ "license": "MIT",
65
71
  "repository": {
66
72
  "type": "git",
67
- "url": "git+https://github.com/gjsify/ts-for-gir.git"
73
+ "url": "git+https://github.com/gjsify/types.git"
68
74
  },
69
75
  "bugs": {
70
76
  "url": "https://github.com/gjsify/ts-for-gir/issues"
71
77
  },
72
- "homepage": "https://github.com/gjsify/ts-for-gir#readme"
78
+ "homepage": "https://github.com/gjsify/types/tree/main/meta-11#readme"
73
79
  }
package/tsconfig.doc.json CHANGED
@@ -17,3 +17,5 @@
17
17
  },
18
18
  "include": ["./meta-11.d.ts"]
19
19
  }
20
+
21
+