@girs/clutter-15 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/clutter-15)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for Clutter-15 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.2.0.
8
+ GJS TypeScript type definitions for Clutter-15 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/clutter-15
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 Clutter from '@girs/clutter-15';
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/clutter-15` or `@girs/clutter-15/ambient` in your `tsconfig` or entry point Typescript file:
28
28
 
29
29
  `index.ts`:
@@ -42,7 +42,7 @@ import '@girs/clutter-15'
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 Clutter from 'gi://Clutter?version=15';
@@ -50,7 +50,7 @@ import Clutter from 'gi://Clutter?version=15';
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/clutter-15` or `@girs/clutter-15/import` in your `tsconfig` or entry point Typescript file:
55
55
 
56
56
  `index.ts`:
@@ -69,7 +69,7 @@ import '@girs/clutter-15'
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 Clutter = imports.gi.Clutter;
@@ -77,7 +77,7 @@ const Clutter = imports.gi.Clutter;
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
 
package/clutter-15.d.ts CHANGED
@@ -12472,6 +12472,7 @@ export namespace Clutter {
12472
12472
  * This function does not realize child actors, except in the special
12473
12473
  * case that realizing the stage, when the stage is visible, will
12474
12474
  * suddenly map (and thus realize) the children of the stage.
12475
+ * @deprecated since 1.16: Actors are automatically realized, and nothing requires explicit realization.
12475
12476
  * @virtual
12476
12477
  */
12477
12478
  vfunc_realize(): void;
@@ -12554,6 +12555,7 @@ export namespace Clutter {
12554
12555
  * If you were using `clutter_actor_unrealize()` to implement
12555
12556
  * unrealizing children of your container, then don't, ClutterActor
12556
12557
  * will already take care of that.
12558
+ * @deprecated since 1.16: Actors are automatically unrealized, and nothing requires explicit realization.
12557
12559
  * @virtual
12558
12560
  */
12559
12561
  vfunc_unrealize(): void;
@@ -14152,6 +14154,7 @@ export namespace Clutter {
14152
14154
  * This function does not realize child actors, except in the special
14153
14155
  * case that realizing the stage, when the stage is visible, will
14154
14156
  * suddenly map (and thus realize) the children of the stage.
14157
+ * @deprecated since 1.16: Actors are automatically realized, and nothing requires explicit realization.
14155
14158
  */
14156
14159
  realize(): void;
14157
14160
 
@@ -14954,6 +14957,7 @@ export namespace Clutter {
14954
14957
  * If you were using `clutter_actor_unrealize()` to implement
14955
14958
  * unrealizing children of your container, then don't, ClutterActor
14956
14959
  * will already take care of that.
14960
+ * @deprecated since 1.16: Actors are automatically unrealized, and nothing requires explicit realization.
14957
14961
  */
14958
14962
  unrealize(): void;
14959
14963
 
@@ -15131,6 +15135,7 @@ export namespace Clutter {
15131
15135
  * `component`, on a scale from 0 (fully transparent) to 1.0
15132
15136
  * (fully opaque).
15133
15137
  * @returns An alpha value from 0 to 1.0, inclusive.
15138
+ * @since 1.12
15134
15139
  */
15135
15140
  get_alpha(): number;
15136
15141
 
@@ -15163,6 +15168,7 @@ export namespace Clutter {
15163
15168
  * If the position can not be obtained (e.g. a non-embedded plug or missing
15164
15169
  * support), x and y are set to -1.
15165
15170
  * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
15171
+ * @deprecated Since 2.12. Use `atk_component_get_extents()` instead.
15166
15172
  */
15167
15173
  get_position(coord_type: Atk.CoordType): [number, number];
15168
15174
 
@@ -15171,6 +15177,7 @@ export namespace Clutter {
15171
15177
  *
15172
15178
  * If the size can not be obtained (e.g. a non-embedded plug or missing
15173
15179
  * support), width and height are set to -1.
15180
+ * @deprecated Since 2.12. Use `atk_component_get_extents()` instead.
15174
15181
  */
15175
15182
  get_size(): [number, number];
15176
15183
 
@@ -15195,6 +15202,7 @@ export namespace Clutter {
15195
15202
  * functions to be executed when this object receives focus events
15196
15203
  * (in or out).
15197
15204
  * @param handler_id the handler id of the focus handler to be removed from `component`
15205
+ * @deprecated since 2.9.4: If you need to track when an object gains or lose the focus, use the {@link Atk.Object.SignalSignatures.state_change | Atk.Object::state-change} "focused" notification instead.
15198
15206
  */
15199
15207
  remove_focus_handler(handler_id: number): void;
15200
15208
 
@@ -15206,6 +15214,7 @@ export namespace Clutter {
15206
15214
  * object shows up on the screen, given its current position within the parents.
15207
15215
  * @param type specify where the object should be made visible.
15208
15216
  * @returns whether scrolling was successful.
15217
+ * @since 2.30
15209
15218
  */
15210
15219
  scroll_to(type: Atk.ScrollType): boolean;
15211
15220
 
@@ -15216,6 +15225,7 @@ export namespace Clutter {
15216
15225
  * @param x x-position where to scroll to
15217
15226
  * @param y y-position where to scroll to
15218
15227
  * @returns whether scrolling was successful.
15228
+ * @since 2.30
15219
15229
  */
15220
15230
  scroll_to_point(coords: Atk.CoordType, x: number, y: number): boolean;
15221
15231
 
@@ -15273,6 +15283,7 @@ export namespace Clutter {
15273
15283
  * Returns the alpha value (i.e. the opacity) for this
15274
15284
  * `component`, on a scale from 0 (fully transparent) to 1.0
15275
15285
  * (fully opaque).
15286
+ * @since 1.12
15276
15287
  * @virtual
15277
15288
  */
15278
15289
  vfunc_get_alpha(): number;
@@ -15307,6 +15318,7 @@ export namespace Clutter {
15307
15318
  * If the position can not be obtained (e.g. a non-embedded plug or missing
15308
15319
  * support), x and y are set to -1.
15309
15320
  * @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
15321
+ * @deprecated Since 2.12. Use `atk_component_get_extents()` instead.
15310
15322
  * @virtual
15311
15323
  */
15312
15324
  vfunc_get_position(coord_type: Atk.CoordType): [number, number];
@@ -15316,6 +15328,7 @@ export namespace Clutter {
15316
15328
  *
15317
15329
  * If the size can not be obtained (e.g. a non-embedded plug or missing
15318
15330
  * support), width and height are set to -1.
15331
+ * @deprecated Since 2.12. Use `atk_component_get_extents()` instead.
15319
15332
  * @virtual
15320
15333
  */
15321
15334
  vfunc_get_size(): [number, number];
@@ -15341,6 +15354,7 @@ export namespace Clutter {
15341
15354
  * functions to be executed when this object receives focus events
15342
15355
  * (in or out).
15343
15356
  * @param handler_id the handler id of the focus handler to be removed from `component`
15357
+ * @deprecated since 2.9.4: If you need to track when an object gains or lose the focus, use the {@link Atk.Object.SignalSignatures.state_change | Atk.Object::state-change} "focused" notification instead.
15344
15358
  * @virtual
15345
15359
  */
15346
15360
  vfunc_remove_focus_handler(handler_id: number): void;
@@ -15352,6 +15366,7 @@ export namespace Clutter {
15352
15366
  * `component` in its parent, this only makes the parents scroll so that the
15353
15367
  * object shows up on the screen, given its current position within the parents.
15354
15368
  * @param type specify where the object should be made visible.
15369
+ * @since 2.30
15355
15370
  * @virtual
15356
15371
  */
15357
15372
  vfunc_scroll_to(type: Atk.ScrollType): boolean;
@@ -15362,6 +15377,7 @@ export namespace Clutter {
15362
15377
  * @param coords specify whether coordinates are relative to the screen or to the parent object.
15363
15378
  * @param x x-position where to scroll to
15364
15379
  * @param y y-position where to scroll to
15380
+ * @since 2.30
15365
15381
  * @virtual
15366
15382
  */
15367
15383
  vfunc_scroll_to_point(coords: Atk.CoordType, x: number, y: number): boolean;
@@ -23400,6 +23416,7 @@ export namespace Clutter {
23400
23416
  // Static methods
23401
23417
  /**
23402
23418
  * Retrieves the singleton instance of {@link Clutter.Settings}
23419
+ * @deprecated Use {@link Clutter.Context.get_settings} instead
23403
23420
  */
23404
23421
  static get_default(): Settings;
23405
23422
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/clutter-15",
3
- "version": "4.2.0",
3
+ "version": "4.4.0",
4
4
  "description": "GJS TypeScript type definitions for Clutter-15",
5
5
  "type": "module",
6
6
  "module": "clutter-15.js",
@@ -31,23 +31,23 @@
31
31
  "test": "tsc --project tsconfig.json"
32
32
  },
33
33
  "dependencies": {
34
- "@girs/gjs": "^4.2.0",
35
- "@girs/cairo-1.0": "^4.2.0",
36
- "@girs/gobject-2.0": "^4.2.0",
37
- "@girs/glib-2.0": "^4.2.0",
38
- "@girs/mtk-15": "^4.2.0",
39
- "@girs/graphene-1.0": "^4.2.0",
40
- "@girs/gio-2.0": "^4.2.0",
41
- "@girs/gmodule-2.0": "^4.2.0",
42
- "@girs/gl-1.0": "^4.2.0",
43
- "@girs/coglpango-15": "^4.2.0",
44
- "@girs/pangocairo-1.0": "^4.2.0",
45
- "@girs/pango-1.0": "^4.2.0",
46
- "@girs/harfbuzz-0.0": "^4.2.0",
47
- "@girs/freetype2-2.0": "^4.2.0",
48
- "@girs/cogl-15": "^4.2.0",
49
- "@girs/xlib-2.0": "^4.2.0",
50
- "@girs/atk-1.0": "^4.2.0" },
34
+ "@girs/gjs": "^4.4.0",
35
+ "@girs/cairo-1.0": "^4.4.0",
36
+ "@girs/gobject-2.0": "^4.4.0",
37
+ "@girs/glib-2.0": "^4.4.0",
38
+ "@girs/mtk-15": "^4.4.0",
39
+ "@girs/graphene-1.0": "^4.4.0",
40
+ "@girs/gio-2.0": "^4.4.0",
41
+ "@girs/gmodule-2.0": "^4.4.0",
42
+ "@girs/gl-1.0": "^4.4.0",
43
+ "@girs/coglpango-15": "^4.4.0",
44
+ "@girs/pangocairo-1.0": "^4.4.0",
45
+ "@girs/pango-1.0": "^4.4.0",
46
+ "@girs/harfbuzz-0.0": "^4.4.0",
47
+ "@girs/freetype2-2.0": "^4.4.0",
48
+ "@girs/cogl-15": "^4.4.0",
49
+ "@girs/xlib-2.0": "^4.4.0",
50
+ "@girs/atk-1.0": "^4.4.0" },
51
51
  "devDependencies": {
52
52
  "typescript": "*"
53
53
  },