@girs/clutter-15 5.1.0 → 5.3.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 +20 -1
- package/clutter-15-vocabulary.d.ts +1619 -0
- package/clutter-15-vocabulary.js +870 -0
- package/package.json +23 -18
- package/tsconfig.json +1 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|

|
|
5
5
|

|
|
6
6
|
|
|
7
|
-
GJS TypeScript type definitions for Clutter-15 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v5.
|
|
7
|
+
GJS TypeScript type definitions for Clutter-15 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v5.3.0.
|
|
8
8
|
|
|
9
9
|
This package contains type declarations only. It ships no runtime code, so it adds
|
|
10
10
|
nothing to your program and works with any bundler or none at all.
|
|
@@ -26,6 +26,7 @@ type packages.
|
|
|
26
26
|
| `@girs/clutter-15/ambient` | only the `gi://` module declarations |
|
|
27
27
|
| `@girs/clutter-15/import` | only the `imports.gi` declarations |
|
|
28
28
|
| `@girs/clutter-15/clutter-15` | the namespace, without the side-effecting declarations |
|
|
29
|
+
| `@girs/clutter-15/vocabulary` | GIR-derived widget data: settable properties, enum nicks, slot candidates |
|
|
29
30
|
|
|
30
31
|
## Three ways to import
|
|
31
32
|
|
|
@@ -67,6 +68,24 @@ GJS's global object works the same way, via `@girs/clutter-15/import`:
|
|
|
67
68
|
const Clutter = imports.gi.Clutter;
|
|
68
69
|
```
|
|
69
70
|
|
|
71
|
+
## Widget vocabulary
|
|
72
|
+
|
|
73
|
+
`clutter-15` declares widgets, so it also carries what the GIR says about them, as
|
|
74
|
+
types and as values a test can read:
|
|
75
|
+
|
|
76
|
+
```ts
|
|
77
|
+
import type { Widgets, PropsOf } from '@girs/clutter-15/vocabulary';
|
|
78
|
+
import { OWN_PROPS, ENUM_NICKS, PROVENANCE } from '@girs/clutter-15/vocabulary';
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Properties are keyed the way GObject registered them, writable-only and optional, so they
|
|
82
|
+
match `g_object_set`, GtkBuilder XML and Blueprint. `PROVENANCE.libraryVersion` names the
|
|
83
|
+
library release this was generated from, which lets a check tell "newer than what is
|
|
84
|
+
installed" from "wrong".
|
|
85
|
+
|
|
86
|
+
This subpath answers what the GIR says, not what the installed library has. For the
|
|
87
|
+
second question, ask the library.
|
|
88
|
+
|
|
70
89
|
## Building
|
|
71
90
|
|
|
72
91
|
The declarations need no build step. If you bundle, every bundler works, since there is
|