@girs/clutter-16 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 +8 -8
- package/clutter-16.d.ts +17 -0
- package/package.json +16 -16
package/README.md
CHANGED
|
@@ -5,25 +5,25 @@
|
|
|
5
5
|

|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
GJS TypeScript type definitions for Clutter-16 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.
|
|
8
|
+
GJS TypeScript type definitions for Clutter-16 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.4.0.
|
|
9
9
|
|
|
10
10
|
## Install
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Install the type definitions with npm:
|
|
13
13
|
```bash
|
|
14
14
|
npm install @girs/clutter-16
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
## Usage
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Import it like any other module:
|
|
20
20
|
```ts
|
|
21
21
|
import Clutter from '@girs/clutter-16';
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
### Ambient Modules
|
|
25
25
|
|
|
26
|
-
|
|
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-16` or `@girs/clutter-16/ambient` in your `tsconfig` or entry point Typescript file:
|
|
28
28
|
|
|
29
29
|
`index.ts`:
|
|
@@ -42,7 +42,7 @@ import '@girs/clutter-16'
|
|
|
42
42
|
}
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
The ambient module now resolves with types:
|
|
46
46
|
|
|
47
47
|
```ts
|
|
48
48
|
import Clutter from 'gi://Clutter?version=16';
|
|
@@ -50,7 +50,7 @@ import Clutter from 'gi://Clutter?version=16';
|
|
|
50
50
|
|
|
51
51
|
### Global import
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
GJS's global `imports.gi` works too, with types.
|
|
54
54
|
For this you need to include `@girs/clutter-16` or `@girs/clutter-16/import` in your `tsconfig` or entry point Typescript file:
|
|
55
55
|
|
|
56
56
|
`index.ts`:
|
|
@@ -69,7 +69,7 @@ import '@girs/clutter-16'
|
|
|
69
69
|
}
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
-
|
|
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
|
-
|
|
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-16.d.ts
CHANGED
|
@@ -12706,6 +12706,7 @@ export namespace Clutter {
|
|
|
12706
12706
|
* This function does not realize child actors, except in the special
|
|
12707
12707
|
* case that realizing the stage, when the stage is visible, will
|
|
12708
12708
|
* suddenly map (and thus realize) the children of the stage.
|
|
12709
|
+
* @deprecated since 1.16: Actors are automatically realized, and nothing requires explicit realization.
|
|
12709
12710
|
* @virtual
|
|
12710
12711
|
*/
|
|
12711
12712
|
vfunc_realize(): void;
|
|
@@ -12788,6 +12789,7 @@ export namespace Clutter {
|
|
|
12788
12789
|
* If you were using `clutter_actor_unrealize()` to implement
|
|
12789
12790
|
* unrealizing children of your container, then don't, ClutterActor
|
|
12790
12791
|
* will already take care of that.
|
|
12792
|
+
* @deprecated since 1.16: Actors are automatically unrealized, and nothing requires explicit realization.
|
|
12791
12793
|
* @virtual
|
|
12792
12794
|
*/
|
|
12793
12795
|
vfunc_unrealize(): void;
|
|
@@ -14364,6 +14366,7 @@ export namespace Clutter {
|
|
|
14364
14366
|
* This function does not realize child actors, except in the special
|
|
14365
14367
|
* case that realizing the stage, when the stage is visible, will
|
|
14366
14368
|
* suddenly map (and thus realize) the children of the stage.
|
|
14369
|
+
* @deprecated since 1.16: Actors are automatically realized, and nothing requires explicit realization.
|
|
14367
14370
|
*/
|
|
14368
14371
|
realize(): void;
|
|
14369
14372
|
|
|
@@ -15173,6 +15176,7 @@ export namespace Clutter {
|
|
|
15173
15176
|
* If you were using `clutter_actor_unrealize()` to implement
|
|
15174
15177
|
* unrealizing children of your container, then don't, ClutterActor
|
|
15175
15178
|
* will already take care of that.
|
|
15179
|
+
* @deprecated since 1.16: Actors are automatically unrealized, and nothing requires explicit realization.
|
|
15176
15180
|
*/
|
|
15177
15181
|
unrealize(): void;
|
|
15178
15182
|
|
|
@@ -15350,6 +15354,7 @@ export namespace Clutter {
|
|
|
15350
15354
|
* `component`, on a scale from 0 (fully transparent) to 1.0
|
|
15351
15355
|
* (fully opaque).
|
|
15352
15356
|
* @returns An alpha value from 0 to 1.0, inclusive.
|
|
15357
|
+
* @since 1.12
|
|
15353
15358
|
*/
|
|
15354
15359
|
get_alpha(): number;
|
|
15355
15360
|
|
|
@@ -15382,6 +15387,7 @@ export namespace Clutter {
|
|
|
15382
15387
|
* If the position can not be obtained (e.g. a non-embedded plug or missing
|
|
15383
15388
|
* support), x and y are set to -1.
|
|
15384
15389
|
* @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
|
|
15390
|
+
* @deprecated Since 2.12. Use `atk_component_get_extents()` instead.
|
|
15385
15391
|
*/
|
|
15386
15392
|
get_position(coord_type: Atk.CoordType): [number, number];
|
|
15387
15393
|
|
|
@@ -15390,6 +15396,7 @@ export namespace Clutter {
|
|
|
15390
15396
|
*
|
|
15391
15397
|
* If the size can not be obtained (e.g. a non-embedded plug or missing
|
|
15392
15398
|
* support), width and height are set to -1.
|
|
15399
|
+
* @deprecated Since 2.12. Use `atk_component_get_extents()` instead.
|
|
15393
15400
|
*/
|
|
15394
15401
|
get_size(): [number, number];
|
|
15395
15402
|
|
|
@@ -15414,6 +15421,7 @@ export namespace Clutter {
|
|
|
15414
15421
|
* functions to be executed when this object receives focus events
|
|
15415
15422
|
* (in or out).
|
|
15416
15423
|
* @param handler_id the handler id of the focus handler to be removed from `component`
|
|
15424
|
+
* @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.
|
|
15417
15425
|
*/
|
|
15418
15426
|
remove_focus_handler(handler_id: number): void;
|
|
15419
15427
|
|
|
@@ -15425,6 +15433,7 @@ export namespace Clutter {
|
|
|
15425
15433
|
* object shows up on the screen, given its current position within the parents.
|
|
15426
15434
|
* @param type specify where the object should be made visible.
|
|
15427
15435
|
* @returns whether scrolling was successful.
|
|
15436
|
+
* @since 2.30
|
|
15428
15437
|
*/
|
|
15429
15438
|
scroll_to(type: Atk.ScrollType): boolean;
|
|
15430
15439
|
|
|
@@ -15435,6 +15444,7 @@ export namespace Clutter {
|
|
|
15435
15444
|
* @param x x-position where to scroll to
|
|
15436
15445
|
* @param y y-position where to scroll to
|
|
15437
15446
|
* @returns whether scrolling was successful.
|
|
15447
|
+
* @since 2.30
|
|
15438
15448
|
*/
|
|
15439
15449
|
scroll_to_point(coords: Atk.CoordType, x: number, y: number): boolean;
|
|
15440
15450
|
|
|
@@ -15492,6 +15502,7 @@ export namespace Clutter {
|
|
|
15492
15502
|
* Returns the alpha value (i.e. the opacity) for this
|
|
15493
15503
|
* `component`, on a scale from 0 (fully transparent) to 1.0
|
|
15494
15504
|
* (fully opaque).
|
|
15505
|
+
* @since 1.12
|
|
15495
15506
|
* @virtual
|
|
15496
15507
|
*/
|
|
15497
15508
|
vfunc_get_alpha(): number;
|
|
@@ -15526,6 +15537,7 @@ export namespace Clutter {
|
|
|
15526
15537
|
* If the position can not be obtained (e.g. a non-embedded plug or missing
|
|
15527
15538
|
* support), x and y are set to -1.
|
|
15528
15539
|
* @param coord_type specifies whether the coordinates are relative to the screen or to the components top level window
|
|
15540
|
+
* @deprecated Since 2.12. Use `atk_component_get_extents()` instead.
|
|
15529
15541
|
* @virtual
|
|
15530
15542
|
*/
|
|
15531
15543
|
vfunc_get_position(coord_type: Atk.CoordType): [number, number];
|
|
@@ -15535,6 +15547,7 @@ export namespace Clutter {
|
|
|
15535
15547
|
*
|
|
15536
15548
|
* If the size can not be obtained (e.g. a non-embedded plug or missing
|
|
15537
15549
|
* support), width and height are set to -1.
|
|
15550
|
+
* @deprecated Since 2.12. Use `atk_component_get_extents()` instead.
|
|
15538
15551
|
* @virtual
|
|
15539
15552
|
*/
|
|
15540
15553
|
vfunc_get_size(): [number, number];
|
|
@@ -15560,6 +15573,7 @@ export namespace Clutter {
|
|
|
15560
15573
|
* functions to be executed when this object receives focus events
|
|
15561
15574
|
* (in or out).
|
|
15562
15575
|
* @param handler_id the handler id of the focus handler to be removed from `component`
|
|
15576
|
+
* @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.
|
|
15563
15577
|
* @virtual
|
|
15564
15578
|
*/
|
|
15565
15579
|
vfunc_remove_focus_handler(handler_id: number): void;
|
|
@@ -15571,6 +15585,7 @@ export namespace Clutter {
|
|
|
15571
15585
|
* `component` in its parent, this only makes the parents scroll so that the
|
|
15572
15586
|
* object shows up on the screen, given its current position within the parents.
|
|
15573
15587
|
* @param type specify where the object should be made visible.
|
|
15588
|
+
* @since 2.30
|
|
15574
15589
|
* @virtual
|
|
15575
15590
|
*/
|
|
15576
15591
|
vfunc_scroll_to(type: Atk.ScrollType): boolean;
|
|
@@ -15581,6 +15596,7 @@ export namespace Clutter {
|
|
|
15581
15596
|
* @param coords specify whether coordinates are relative to the screen or to the parent object.
|
|
15582
15597
|
* @param x x-position where to scroll to
|
|
15583
15598
|
* @param y y-position where to scroll to
|
|
15599
|
+
* @since 2.30
|
|
15584
15600
|
* @virtual
|
|
15585
15601
|
*/
|
|
15586
15602
|
vfunc_scroll_to_point(coords: Atk.CoordType, x: number, y: number): boolean;
|
|
@@ -23268,6 +23284,7 @@ export namespace Clutter {
|
|
|
23268
23284
|
// Static methods
|
|
23269
23285
|
/**
|
|
23270
23286
|
* Retrieves the singleton instance of {@link Clutter.Settings}
|
|
23287
|
+
* @deprecated Use {@link Clutter.Context.get_settings} instead
|
|
23271
23288
|
*/
|
|
23272
23289
|
static get_default(): Settings;
|
|
23273
23290
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/clutter-16",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.0",
|
|
4
4
|
"description": "GJS TypeScript type definitions for Clutter-16",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "clutter-16.js",
|
|
@@ -31,21 +31,21 @@
|
|
|
31
31
|
"test": "tsc --project tsconfig.json"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@girs/gjs": "^4.
|
|
35
|
-
"@girs/pango-1.0": "^4.
|
|
36
|
-
"@girs/cairo-1.0": "^4.
|
|
37
|
-
"@girs/gobject-2.0": "^4.
|
|
38
|
-
"@girs/glib-2.0": "^4.
|
|
39
|
-
"@girs/harfbuzz-0.0": "^4.
|
|
40
|
-
"@girs/freetype2-2.0": "^4.
|
|
41
|
-
"@girs/gio-2.0": "^4.
|
|
42
|
-
"@girs/gmodule-2.0": "^4.
|
|
43
|
-
"@girs/mtk-16": "^4.
|
|
44
|
-
"@girs/graphene-1.0": "^4.
|
|
45
|
-
"@girs/gl-1.0": "^4.
|
|
46
|
-
"@girs/cogl-16": "^4.
|
|
47
|
-
"@girs/xlib-2.0": "^4.
|
|
48
|
-
"@girs/atk-1.0": "^4.
|
|
34
|
+
"@girs/gjs": "^4.4.0",
|
|
35
|
+
"@girs/pango-1.0": "^4.4.0",
|
|
36
|
+
"@girs/cairo-1.0": "^4.4.0",
|
|
37
|
+
"@girs/gobject-2.0": "^4.4.0",
|
|
38
|
+
"@girs/glib-2.0": "^4.4.0",
|
|
39
|
+
"@girs/harfbuzz-0.0": "^4.4.0",
|
|
40
|
+
"@girs/freetype2-2.0": "^4.4.0",
|
|
41
|
+
"@girs/gio-2.0": "^4.4.0",
|
|
42
|
+
"@girs/gmodule-2.0": "^4.4.0",
|
|
43
|
+
"@girs/mtk-16": "^4.4.0",
|
|
44
|
+
"@girs/graphene-1.0": "^4.4.0",
|
|
45
|
+
"@girs/gl-1.0": "^4.4.0",
|
|
46
|
+
"@girs/cogl-16": "^4.4.0",
|
|
47
|
+
"@girs/xlib-2.0": "^4.4.0",
|
|
48
|
+
"@girs/atk-1.0": "^4.4.0" },
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"typescript": "*"
|
|
51
51
|
},
|