@girs/gcrgtk4-4 4.3.0 → 4.5.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 +52 -38
- package/gcrgtk4-4-surface.d.ts +20 -0
- package/gcrgtk4-4-surface.js +6 -0
- package/gcrgtk4-4-vocabulary.d.ts +179 -0
- package/gcrgtk4-4-vocabulary.js +39 -0
- package/gcrgtk4-4.d.ts +18 -0
- package/package.json +22 -22
- package/tsconfig.json +1 -1
package/README.md
CHANGED
|
@@ -4,82 +4,96 @@
|
|
|
4
4
|

|
|
5
5
|

|
|
6
6
|
|
|
7
|
+
GJS TypeScript type definitions for GcrGtk4-4 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.5.0.
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
This package contains type declarations only. It ships no runtime code, so it adds
|
|
10
|
+
nothing to your program and works with any bundler or none at all.
|
|
9
11
|
|
|
10
12
|
## Install
|
|
11
13
|
|
|
12
|
-
Install the type definitions with npm:
|
|
13
14
|
```bash
|
|
14
15
|
npm install @girs/gcrgtk4-4
|
|
15
16
|
```
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
Any package manager works. The package has no dependencies beyond other `@girs/*`
|
|
19
|
+
type packages.
|
|
20
|
+
|
|
21
|
+
## What it exports
|
|
22
|
+
|
|
23
|
+
| Import | What you get |
|
|
24
|
+
|---|---|
|
|
25
|
+
| `@girs/gcrgtk4-4` | the namespace as a default export, plus the ambient and global declarations |
|
|
26
|
+
| `@girs/gcrgtk4-4/ambient` | only the `gi://` module declarations |
|
|
27
|
+
| `@girs/gcrgtk4-4/import` | only the `imports.gi` declarations |
|
|
28
|
+
| `@girs/gcrgtk4-4/gcrgtk4-4` | the namespace, without the side-effecting declarations |
|
|
29
|
+
| `@girs/gcrgtk4-4/vocabulary` | GIR-derived widget data: settable properties, enum nicks, slot candidates |
|
|
30
|
+
|
|
31
|
+
## Three ways to import
|
|
32
|
+
|
|
33
|
+
Which one you use depends on how you write imports elsewhere, not on your toolchain.
|
|
34
|
+
|
|
35
|
+
### As a module
|
|
18
36
|
|
|
19
|
-
Import it like any other module:
|
|
20
37
|
```ts
|
|
21
38
|
import GcrGtk4 from '@girs/gcrgtk4-4';
|
|
22
39
|
```
|
|
23
40
|
|
|
24
|
-
###
|
|
41
|
+
### As `gi://`
|
|
25
42
|
|
|
26
|
-
|
|
27
|
-
|
|
43
|
+
GJS resolves `gi://` at runtime. To give it types, reference the package once, either
|
|
44
|
+
from your entry point or from `tsconfig.json`:
|
|
28
45
|
|
|
29
|
-
`index.ts`:
|
|
30
46
|
```ts
|
|
31
|
-
import '@girs/gcrgtk4-4'
|
|
47
|
+
import '@girs/gcrgtk4-4';
|
|
32
48
|
```
|
|
33
49
|
|
|
34
|
-
`tsconfig.json`:
|
|
35
50
|
```json
|
|
36
|
-
{
|
|
37
|
-
"compilerOptions": {
|
|
38
|
-
...
|
|
39
|
-
},
|
|
40
|
-
"include": ["@girs/gcrgtk4-4"],
|
|
41
|
-
...
|
|
42
|
-
}
|
|
51
|
+
{ "include": ["@girs/gcrgtk4-4"] }
|
|
43
52
|
```
|
|
44
53
|
|
|
45
|
-
|
|
54
|
+
Then the runtime spelling type-checks:
|
|
46
55
|
|
|
47
56
|
```ts
|
|
48
57
|
import GcrGtk4 from 'gi://GcrGtk4?version=4';
|
|
49
58
|
```
|
|
50
59
|
|
|
51
|
-
|
|
60
|
+
Referencing `@girs/gcrgtk4-4/ambient` instead pulls in these declarations
|
|
61
|
+
alone. See [ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules).
|
|
62
|
+
|
|
63
|
+
### As `imports.gi`
|
|
52
64
|
|
|
53
|
-
GJS's global
|
|
54
|
-
For this you need to include `@girs/gcrgtk4-4` or `@girs/gcrgtk4-4/import` in your `tsconfig` or entry point Typescript file:
|
|
65
|
+
GJS's global object works the same way, via `@girs/gcrgtk4-4/import`:
|
|
55
66
|
|
|
56
|
-
`index.ts`:
|
|
57
67
|
```ts
|
|
58
|
-
|
|
68
|
+
const GcrGtk4 = imports.gi.GcrGtk4;
|
|
59
69
|
```
|
|
60
70
|
|
|
61
|
-
|
|
62
|
-
```json
|
|
63
|
-
{
|
|
64
|
-
"compilerOptions": {
|
|
65
|
-
...
|
|
66
|
-
},
|
|
67
|
-
"include": ["@girs/gcrgtk4-4"],
|
|
68
|
-
...
|
|
69
|
-
}
|
|
70
|
-
```
|
|
71
|
+
## Widget vocabulary
|
|
71
72
|
|
|
72
|
-
|
|
73
|
+
`gcrgtk4-4` declares widgets, so it also carries what the GIR says about them, as
|
|
74
|
+
types and as values a test can read:
|
|
73
75
|
|
|
74
76
|
```ts
|
|
75
|
-
|
|
77
|
+
import type { Widgets, PropsOf } from '@girs/gcrgtk4-4/vocabulary';
|
|
78
|
+
import { OWN_PROPS, ENUM_NICKS, PROVENANCE } from '@girs/gcrgtk4-4/vocabulary';
|
|
76
79
|
```
|
|
77
80
|
|
|
78
|
-
|
|
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".
|
|
79
85
|
|
|
80
|
-
|
|
86
|
+
This subpath answers what the GIR says, not what the installed library has. For the
|
|
87
|
+
second question, ask the library.
|
|
88
|
+
|
|
89
|
+
## Building
|
|
90
|
+
|
|
91
|
+
The declarations need no build step. If you bundle, every bundler works, since there is
|
|
92
|
+
no runtime code to resolve. The [examples](https://github.com/gjsify/ts-for-gir/tree/main/examples)
|
|
93
|
+
show working setups for several.
|
|
81
94
|
|
|
82
95
|
## Other packages
|
|
83
96
|
|
|
84
|
-
|
|
97
|
+
Every pre-generated package is at [gjsify/types](https://github.com/gjsify/types).
|
|
98
|
+
|
|
85
99
|
|
package/gcrgtk4-4-surface.d.ts
CHANGED
|
@@ -84,6 +84,23 @@ export interface Widgets {
|
|
|
84
84
|
/** Every GType this namespace can create. A consumer derives its own tag map. */
|
|
85
85
|
export type WidgetGType = keyof Widgets;
|
|
86
86
|
|
|
87
|
+
// ---------------------------------------------------------------------------
|
|
88
|
+
// Child holders — the same shape, for objects that CARRY a widget without being one.
|
|
89
|
+
//
|
|
90
|
+
// `GtkListItem`, `GtkListHeader`, `GtkColumnViewCell` and `AdwToggle` descend from
|
|
91
|
+
// `GObject.Object` and hold a widget through `set_child`/`get_child`. A renderer places
|
|
92
|
+
// them exactly like a container, so they belong in the vocabulary; a check asking "is
|
|
93
|
+
// this a widget" must still be able to say no. Hence a sibling table rather than four
|
|
94
|
+
// more rows in `Widgets`: concatenate them when you mean both.
|
|
95
|
+
// ---------------------------------------------------------------------------
|
|
96
|
+
|
|
97
|
+
export interface ChildHolders {
|
|
98
|
+
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/** Every GType this namespace holds a child in without it being a widget. */
|
|
102
|
+
export type ChildHolderGType = keyof ChildHolders;
|
|
103
|
+
|
|
87
104
|
/** The writable, optional, GObject-keyed property surface of one GType. */
|
|
88
105
|
export type PropsOf<G extends WidgetGType> = Widgets[G]['props'];
|
|
89
106
|
|
|
@@ -119,6 +136,9 @@ export const OWN_SIGNALS: Readonly<Record<string, readonly string[]>>;
|
|
|
119
136
|
/** Widget GType -> every declaration its members come from, self first. */
|
|
120
137
|
export const DECLS: Readonly<Record<string, readonly string[]>>;
|
|
121
138
|
|
|
139
|
+
/** The GTypes in `DECLS` that hold a widget without being one — see `ChildHolders`. */
|
|
140
|
+
export const CHILD_HOLDERS: readonly string[];
|
|
141
|
+
|
|
122
142
|
/** Enum GType -> the nicks this surface offers. */
|
|
123
143
|
export const ENUM_NICKS: Readonly<Record<string, readonly string[]>>;
|
|
124
144
|
|
package/gcrgtk4-4-surface.js
CHANGED
|
@@ -18,6 +18,12 @@ export const DECLS = {
|
|
|
18
18
|
GcrCertificateWidget: ['GcrCertificateWidget', 'GtkWidget', 'GtkAccessible', 'GtkBuildable', 'GtkConstraintTarget'],
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
+
// The GTypes above that are NOT widgets: they hold one through `set_child`/`get_child`
|
|
22
|
+
// and descend from `GObject.Object`. A renderer places them like a container; a check
|
|
23
|
+
// asking "is this a widget" must not count them. Derived from the accessor pair, never
|
|
24
|
+
// from a list — the count is in the provenance line above.
|
|
25
|
+
export const CHILD_HOLDERS = [];
|
|
26
|
+
|
|
21
27
|
export const ENUM_NICKS = {};
|
|
22
28
|
|
|
23
29
|
export const SLOT_CANDIDATES = {};
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The GIR-derived widget VOCABULARY for GcrGtk4-4.
|
|
3
|
+
*
|
|
4
|
+
* GENERATED — do not edit. Provenance: GcrGtk4-4 — dropped empty base(s): GObject.InitiallyUnowned GObject.Object
|
|
5
|
+
*
|
|
6
|
+
* 1 concrete widgets, 1 declarations, 0 enum nick unions, 0 slot candidates.
|
|
7
|
+
*
|
|
8
|
+
* Module-scoped exports only. There is no `JSX` namespace here, no tag spelling and
|
|
9
|
+
* no `on<Signal>` prop name: those are DIALECT, and every framework answers them
|
|
10
|
+
* differently. The shape to avoid is the GLOBAL AUGMENT — a `declare global` on
|
|
11
|
+
* `React.JSX` collides with every other library on a shared tag — while a
|
|
12
|
+
* module-scoped `JSX` behind a `jsxImportSource` does not. This package is used by
|
|
13
|
+
* projects that want nothing to do with JSX, so it emits neither; a consumer declaring
|
|
14
|
+
* a module-scoped namespace over these names is doing it right.
|
|
15
|
+
*
|
|
16
|
+
* Three things this is and `ConstructorProps` is not: WRITABLE-only (measured on
|
|
17
|
+
* Gtk-4.0, `ConstructorProps` offers 150 read-only properties across 68 classes as
|
|
18
|
+
* settable, and GTK's failure mode for writing one is exit 0), OPTIONAL, and keyed
|
|
19
|
+
* by the name GObject actually REGISTERED — the dashed spelling `g_object_set`,
|
|
20
|
+
* GtkBuilder XML and Blueprint all use.
|
|
21
|
+
*
|
|
22
|
+
* Signal handler types are not re-derived: `X.SignalSignatures`, which this package
|
|
23
|
+
* already emits for every class with the parent chain, every implemented interface
|
|
24
|
+
* and the `notify::` keys folded in, is what `Widgets[G]['signals']` points at.
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
import type Gcr from '@girs/gcr-4';
|
|
28
|
+
import type GcrGtk4 from './gcrgtk4-4.js';
|
|
29
|
+
import type { GtkAccessibleConstructOnly, GtkAccessibleProps, GtkBuildableConstructOnly, GtkBuildableProps, GtkConstraintTargetConstructOnly, GtkConstraintTargetProps, GtkWidgetConstructOnly, GtkWidgetProps } from '@girs/gtk-4.0/vocabulary';
|
|
30
|
+
|
|
31
|
+
// ---------------------------------------------------------------------------
|
|
32
|
+
// Enum nicks — the string vocabulary GObject registered, from GIR's `glib:nick`.
|
|
33
|
+
//
|
|
34
|
+
// Not derived from the member name. Substituting underscores for dashes is not a law:
|
|
35
|
+
// some nicks keep an underscore the substitution would have replaced, and only the
|
|
36
|
+
// attribute knows which. Gtk-4.0 and Adw-1 contradict no derivation at all, which is
|
|
37
|
+
// how a derived nick passes review and breaks elsewhere.
|
|
38
|
+
// Re-measure with `scripts/check-nick-derivation.mjs` in ts-for-gir.
|
|
39
|
+
// ---------------------------------------------------------------------------
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
// ---------------------------------------------------------------------------
|
|
44
|
+
// Property surfaces — one interface per GIR DECLARATION, mirroring GIR's own
|
|
45
|
+
// inheritance rather than flattening per widget.
|
|
46
|
+
//
|
|
47
|
+
// The interfaces are load-bearing, not tidiness: `GtkBox` declares four properties
|
|
48
|
+
// of its own and `orientation` is not among them — it lives on `Gtk.Orientable`,
|
|
49
|
+
// because GObject installs interface properties on the implementor at runtime while
|
|
50
|
+
// GIR keeps them once, on the interface.
|
|
51
|
+
// ---------------------------------------------------------------------------
|
|
52
|
+
|
|
53
|
+
export interface GcrCertificateWidgetProps extends GtkWidgetProps, GtkAccessibleProps, GtkBuildableProps, GtkConstraintTargetProps {
|
|
54
|
+
certificate?: Gcr.Certificate | null;
|
|
55
|
+
}
|
|
56
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
57
|
+
export type GcrCertificateWidgetConstructOnly = GtkWidgetConstructOnly | GtkAccessibleConstructOnly | GtkBuildableConstructOnly | GtkConstraintTargetConstructOnly;
|
|
58
|
+
|
|
59
|
+
// ---------------------------------------------------------------------------
|
|
60
|
+
// The GType-keyed widget map.
|
|
61
|
+
//
|
|
62
|
+
// Keyed by GType because that is also the GtkBuilder XML key and the typelib key. A
|
|
63
|
+
// consumer maps GTypes to tags in ITS convention — kebab for JSX intrinsics, Pascal
|
|
64
|
+
// for a Vue `GlobalComponents`, the class itself for a renderer whose element type
|
|
65
|
+
// is the class. None of those is baked in here.
|
|
66
|
+
//
|
|
67
|
+
// `slotCandidates` is a candidate list and never an answer: derived from methods
|
|
68
|
+
// taking exactly one widget argument. The GIR cannot tell adoption from reference —
|
|
69
|
+
// `set_title_widget` parents its argument and `set_activatable_widget` does not, and
|
|
70
|
+
// both are `void f(GtkWidget*)` at `transfer-ownership="none"`. Curation decides;
|
|
71
|
+
// this is what notices when a release adds a candidate.
|
|
72
|
+
// ---------------------------------------------------------------------------
|
|
73
|
+
|
|
74
|
+
export interface Widgets {
|
|
75
|
+
GcrCertificateWidget: {
|
|
76
|
+
class: GcrGtk4.CertificateWidget;
|
|
77
|
+
props: GcrCertificateWidgetProps;
|
|
78
|
+
signals: GcrGtk4.CertificateWidget.SignalSignatures;
|
|
79
|
+
constructOnly: GcrCertificateWidgetConstructOnly;
|
|
80
|
+
slotCandidates: {};
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/** Every GType this namespace can create. A consumer derives its own tag map. */
|
|
85
|
+
export type WidgetGType = keyof Widgets;
|
|
86
|
+
|
|
87
|
+
// ---------------------------------------------------------------------------
|
|
88
|
+
// Child holders — the same shape, for objects that CARRY a widget without being one.
|
|
89
|
+
//
|
|
90
|
+
// `GtkListItem`, `GtkListHeader`, `GtkColumnViewCell` and `AdwToggle` descend from
|
|
91
|
+
// `GObject.Object` and hold a widget through `set_child`/`get_child`. A renderer places
|
|
92
|
+
// them exactly like a container, so they belong in the vocabulary; a check asking "is
|
|
93
|
+
// this a widget" must still be able to say no. Hence a sibling table rather than four
|
|
94
|
+
// more rows in `Widgets`: concatenate them when you mean both.
|
|
95
|
+
// ---------------------------------------------------------------------------
|
|
96
|
+
|
|
97
|
+
export interface ChildHolders {
|
|
98
|
+
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/** Every GType this namespace holds a child in without it being a widget. */
|
|
102
|
+
export type ChildHolderGType = keyof ChildHolders;
|
|
103
|
+
|
|
104
|
+
/** The writable, optional, GObject-keyed property surface of one GType. */
|
|
105
|
+
export type PropsOf<G extends WidgetGType> = Widgets[G]['props'];
|
|
106
|
+
|
|
107
|
+
/** The signal table this package already emits, reached by GType. */
|
|
108
|
+
export type SignalsOf<G extends WidgetGType> = Widgets[G]['signals'];
|
|
109
|
+
|
|
110
|
+
/** The instance type — what a `ref`-shaped prop should infer. */
|
|
111
|
+
export type InstanceOf<G extends WidgetGType> = Widgets[G]['class'];
|
|
112
|
+
|
|
113
|
+
/** Property names that can only be set at construction. */
|
|
114
|
+
export type ConstructOnlyOf<G extends WidgetGType> = Widgets[G]['constructOnly'];
|
|
115
|
+
|
|
116
|
+
/** Candidate child slots — see the note above; curation decides. */
|
|
117
|
+
export type SlotCandidatesOf<G extends WidgetGType> = keyof Widgets[G]['slotCandidates'];
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* The same facts as runtime data, for a consumer that CHECKS them.
|
|
121
|
+
*
|
|
122
|
+
* Types are erased, so a spec that asks the installed GTK whether every property
|
|
123
|
+
* here is a writable ParamSpec, every signal resolvable by `GObject.signal_lookup`
|
|
124
|
+
* and every nick resolvable through an enum lookup cannot read the interfaces
|
|
125
|
+
* above. Emitted headlessly with no GTK present, which is exactly why the checking
|
|
126
|
+
* belongs to the consumer and the DATA belongs here.
|
|
127
|
+
*/
|
|
128
|
+
export const PROVENANCE: {
|
|
129
|
+
readonly namespace: string;
|
|
130
|
+
readonly version: string;
|
|
131
|
+
/** The version the LIBRARY states, or null where it states none. Never the namespace's. */
|
|
132
|
+
readonly libraryVersion: string | null;
|
|
133
|
+
readonly childHolders: number;
|
|
134
|
+
readonly droppedBases: readonly string[];
|
|
135
|
+
readonly inlinedBases: readonly string[];
|
|
136
|
+
readonly unsettableProps: readonly string[];
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
/** Declaration GType -> its own settable properties, as GObject registered them. */
|
|
140
|
+
export const OWN_PROPS: Readonly<Record<string, readonly string[]>>;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Declaration GType -> the signals it registers itself, never its parents'.
|
|
144
|
+
*
|
|
145
|
+
* Keyed like `OWN_PROPS`, so both are read at every link of a `DECLS` chain. An
|
|
146
|
+
* abstract base has no `Widgets` row and still owns signals — `GtkWidget` owns 13.
|
|
147
|
+
*/
|
|
148
|
+
export const OWN_SIGNALS: Readonly<Record<string, readonly string[]>>;
|
|
149
|
+
|
|
150
|
+
/** Widget GType -> every declaration its members come from, self first. */
|
|
151
|
+
export const DECLS: Readonly<Record<string, readonly string[]>>;
|
|
152
|
+
|
|
153
|
+
/** The GTypes in `DECLS` that hold a widget without being one — see `ChildHolders`. */
|
|
154
|
+
export const CHILD_HOLDERS: readonly string[];
|
|
155
|
+
|
|
156
|
+
/** Enum GType -> the nicks this surface offers. */
|
|
157
|
+
export const ENUM_NICKS: Readonly<Record<string, readonly string[]>>;
|
|
158
|
+
|
|
159
|
+
/** Widget GType -> slot name -> the method that may adopt a child there. */
|
|
160
|
+
export const SLOT_CANDIDATES: Readonly<Record<string, Readonly<Record<string, string>>>>;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* `Type`, `Type.property` and `Type::signal` -> the release that introduced it.
|
|
164
|
+
*
|
|
165
|
+
* What keeps a runtime cross-check honest across a version gap without an
|
|
166
|
+
* allowlist: a name the installed library lacks is a defect UNLESS the version
|
|
167
|
+
* here is newer than the one running.
|
|
168
|
+
*
|
|
169
|
+
* ALL THREE key shapes, because that test only works for the names it covers. A
|
|
170
|
+
* property-only map leaves a consumer no way to explain a missing SIGNAL, which is
|
|
171
|
+
* a correct vocabulary reported as 18 defects; a member-only map leaves it no way to
|
|
172
|
+
* explain a missing CLASS, and that one fails as a bare
|
|
173
|
+
* `TypeError: can't access property "$gtype", ctor() is undefined` that does not
|
|
174
|
+
* even name the GType.
|
|
175
|
+
*
|
|
176
|
+
* A key is present only where the GIR states a version — sparse by nature (`version`
|
|
177
|
+
* sits on 29 of the 301 classes and interfaces in Gtk-4.0), never inferred.
|
|
178
|
+
*/
|
|
179
|
+
export const SINCE: Readonly<Record<string, string>>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// The widget vocabulary of GcrGtk4-4 as runtime data.
|
|
2
|
+
//
|
|
3
|
+
// GENERATED — do not edit. Provenance: GcrGtk4-4 — dropped empty base(s): GObject.InitiallyUnowned GObject.Object
|
|
4
|
+
//
|
|
5
|
+
// The type half of this subpath is the sibling `.d.ts`. This file exists because
|
|
6
|
+
// types are erased: a consumer that wants to ask the installed library whether every
|
|
7
|
+
// name here is real needs values, not declarations.
|
|
8
|
+
|
|
9
|
+
export const PROVENANCE = {
|
|
10
|
+
namespace: 'GcrGtk4',
|
|
11
|
+
version: '4',
|
|
12
|
+
libraryVersion: null,
|
|
13
|
+
childHolders: 0,
|
|
14
|
+
droppedBases: ['GObject.InitiallyUnowned', 'GObject.Object'],
|
|
15
|
+
inlinedBases: [],
|
|
16
|
+
unsettableProps: [],
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const OWN_PROPS = {
|
|
20
|
+
GcrCertificateWidget: ['certificate'],
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const OWN_SIGNALS = {};
|
|
24
|
+
|
|
25
|
+
export const DECLS = {
|
|
26
|
+
GcrCertificateWidget: ['GcrCertificateWidget', 'GtkWidget', 'GtkAccessible', 'GtkBuildable', 'GtkConstraintTarget'],
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
// The GTypes above that are NOT widgets: they hold one through `set_child`/`get_child`
|
|
30
|
+
// and descend from `GObject.Object`. A renderer places them like a container; a check
|
|
31
|
+
// asking "is this a widget" must not count them. Derived from the accessor pair, never
|
|
32
|
+
// from a list — the count is in the provenance line above.
|
|
33
|
+
export const CHILD_HOLDERS = [];
|
|
34
|
+
|
|
35
|
+
export const ENUM_NICKS = {};
|
|
36
|
+
|
|
37
|
+
export const SLOT_CANDIDATES = {};
|
|
38
|
+
|
|
39
|
+
export const SINCE = {};
|
package/gcrgtk4-4.d.ts
CHANGED
|
@@ -167,6 +167,7 @@ export namespace GcrGtk4 {
|
|
|
167
167
|
* does not interrupts the user's current screen reader output.
|
|
168
168
|
* @param message the string to announce
|
|
169
169
|
* @param priority the priority of the announcement
|
|
170
|
+
* @since 4.14
|
|
170
171
|
*/
|
|
171
172
|
announce(message: string, priority: Gtk.AccessibleAnnouncementPriority): void;
|
|
172
173
|
|
|
@@ -179,6 +180,7 @@ export namespace GcrGtk4 {
|
|
|
179
180
|
* It is left to the accessible implementation to define the scope
|
|
180
181
|
* and uniqueness of the identifier.
|
|
181
182
|
* @returns the accessible identifier
|
|
183
|
+
* @since 4.22
|
|
182
184
|
*/
|
|
183
185
|
get_accessible_id(): string | null;
|
|
184
186
|
|
|
@@ -187,6 +189,7 @@ export namespace GcrGtk4 {
|
|
|
187
189
|
*
|
|
188
190
|
* This function returns `NULL` for top level widgets.
|
|
189
191
|
* @returns the accessible parent
|
|
192
|
+
* @since 4.10
|
|
190
193
|
*/
|
|
191
194
|
get_accessible_parent(): Gtk.Accessible | null;
|
|
192
195
|
|
|
@@ -199,6 +202,7 @@ export namespace GcrGtk4 {
|
|
|
199
202
|
/**
|
|
200
203
|
* Retrieves the implementation for the given accessible object.
|
|
201
204
|
* @returns the accessible implementation object
|
|
205
|
+
* @since 4.10
|
|
202
206
|
*/
|
|
203
207
|
get_at_context(): Gtk.ATContext;
|
|
204
208
|
|
|
@@ -209,18 +213,21 @@ export namespace GcrGtk4 {
|
|
|
209
213
|
* implementations, e.g. to get the bounds from an ignored
|
|
210
214
|
* child widget.
|
|
211
215
|
* @returns true if the bounds are valid, and false otherwise
|
|
216
|
+
* @since 4.10
|
|
212
217
|
*/
|
|
213
218
|
get_bounds(): [boolean, number, number, number, number];
|
|
214
219
|
|
|
215
220
|
/**
|
|
216
221
|
* Retrieves the first accessible child of an accessible object.
|
|
217
222
|
* @returns the first accessible child
|
|
223
|
+
* @since 4.10
|
|
218
224
|
*/
|
|
219
225
|
get_first_accessible_child(): Gtk.Accessible | null;
|
|
220
226
|
|
|
221
227
|
/**
|
|
222
228
|
* Retrieves the next accessible sibling of an accessible object
|
|
223
229
|
* @returns the next accessible sibling
|
|
230
|
+
* @since 4.10
|
|
224
231
|
*/
|
|
225
232
|
get_next_accessible_sibling(): Gtk.Accessible | null;
|
|
226
233
|
|
|
@@ -232,6 +239,7 @@ export namespace GcrGtk4 {
|
|
|
232
239
|
* child widget, as is the case for {@link Gtk.Text} wrappers.
|
|
233
240
|
* @param state platform state to query
|
|
234
241
|
* @returns the value of state for the accessible
|
|
242
|
+
* @since 4.10
|
|
235
243
|
*/
|
|
236
244
|
get_platform_state(state: Gtk.AccessiblePlatformState): boolean;
|
|
237
245
|
|
|
@@ -265,6 +273,7 @@ export namespace GcrGtk4 {
|
|
|
265
273
|
* object is the container widget.
|
|
266
274
|
* @param parent the parent accessible object
|
|
267
275
|
* @param next_sibling the sibling accessible object
|
|
276
|
+
* @since 4.10
|
|
268
277
|
*/
|
|
269
278
|
set_accessible_parent(parent: Gtk.Accessible | null, next_sibling: Gtk.Accessible | null): void;
|
|
270
279
|
|
|
@@ -274,6 +283,7 @@ export namespace GcrGtk4 {
|
|
|
274
283
|
* That might be useful when a new child of a custom accessible
|
|
275
284
|
* is created, and it needs to be linked to a previous child.
|
|
276
285
|
* @param new_sibling the new next accessible sibling to set
|
|
286
|
+
* @since 4.10
|
|
277
287
|
*/
|
|
278
288
|
update_next_accessible_sibling(new_sibling: Gtk.Accessible | null): void;
|
|
279
289
|
|
|
@@ -284,6 +294,7 @@ export namespace GcrGtk4 {
|
|
|
284
294
|
* have a platform state but are not widgets. Widgets handle platform
|
|
285
295
|
* states automatically.
|
|
286
296
|
* @param state the platform state to update
|
|
297
|
+
* @since 4.18
|
|
287
298
|
*/
|
|
288
299
|
update_platform_state(state: Gtk.AccessiblePlatformState): void;
|
|
289
300
|
|
|
@@ -331,6 +342,7 @@ export namespace GcrGtk4 {
|
|
|
331
342
|
*
|
|
332
343
|
* It is left to the accessible implementation to define the scope
|
|
333
344
|
* and uniqueness of the identifier.
|
|
345
|
+
* @since 4.22
|
|
334
346
|
* @virtual
|
|
335
347
|
*/
|
|
336
348
|
vfunc_get_accessible_id(): string | null;
|
|
@@ -339,12 +351,14 @@ export namespace GcrGtk4 {
|
|
|
339
351
|
* Retrieves the accessible parent for an accessible object.
|
|
340
352
|
*
|
|
341
353
|
* This function returns `NULL` for top level widgets.
|
|
354
|
+
* @since 4.10
|
|
342
355
|
* @virtual
|
|
343
356
|
*/
|
|
344
357
|
vfunc_get_accessible_parent(): Gtk.Accessible | null;
|
|
345
358
|
|
|
346
359
|
/**
|
|
347
360
|
* Retrieves the implementation for the given accessible object.
|
|
361
|
+
* @since 4.10
|
|
348
362
|
* @virtual
|
|
349
363
|
*/
|
|
350
364
|
vfunc_get_at_context(): Gtk.ATContext | null;
|
|
@@ -355,18 +369,21 @@ export namespace GcrGtk4 {
|
|
|
355
369
|
* This functionality can be overridden by {@link Gtk.Accessible}
|
|
356
370
|
* implementations, e.g. to get the bounds from an ignored
|
|
357
371
|
* child widget.
|
|
372
|
+
* @since 4.10
|
|
358
373
|
* @virtual
|
|
359
374
|
*/
|
|
360
375
|
vfunc_get_bounds(): [boolean, number, number, number, number];
|
|
361
376
|
|
|
362
377
|
/**
|
|
363
378
|
* Retrieves the first accessible child of an accessible object.
|
|
379
|
+
* @since 4.10
|
|
364
380
|
* @virtual
|
|
365
381
|
*/
|
|
366
382
|
vfunc_get_first_accessible_child(): Gtk.Accessible | null;
|
|
367
383
|
|
|
368
384
|
/**
|
|
369
385
|
* Retrieves the next accessible sibling of an accessible object
|
|
386
|
+
* @since 4.10
|
|
370
387
|
* @virtual
|
|
371
388
|
*/
|
|
372
389
|
vfunc_get_next_accessible_sibling(): Gtk.Accessible | null;
|
|
@@ -378,6 +395,7 @@ export namespace GcrGtk4 {
|
|
|
378
395
|
* implementations, e.g. to get platform state from an ignored
|
|
379
396
|
* child widget, as is the case for {@link Gtk.Text} wrappers.
|
|
380
397
|
* @param state platform state to query
|
|
398
|
+
* @since 4.10
|
|
381
399
|
* @virtual
|
|
382
400
|
*/
|
|
383
401
|
vfunc_get_platform_state(state: Gtk.AccessiblePlatformState): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/gcrgtk4-4",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.0",
|
|
4
4
|
"description": "GJS TypeScript type definitions for GcrGtk4-4",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "gcrgtk4-4.js",
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
"import": "./gcrgtk4-4-import.js",
|
|
17
17
|
"default": "./gcrgtk4-4-import.js"
|
|
18
18
|
},
|
|
19
|
-
"./
|
|
20
|
-
"types": "./gcrgtk4-4-
|
|
21
|
-
"import": "./gcrgtk4-4-
|
|
22
|
-
"default": "./gcrgtk4-4-
|
|
19
|
+
"./vocabulary": {
|
|
20
|
+
"types": "./gcrgtk4-4-vocabulary.d.ts",
|
|
21
|
+
"import": "./gcrgtk4-4-vocabulary.js",
|
|
22
|
+
"default": "./gcrgtk4-4-vocabulary.js"
|
|
23
23
|
},
|
|
24
24
|
"./gcrgtk4-4": {
|
|
25
25
|
"types": "./gcrgtk4-4.d.ts",
|
|
@@ -36,23 +36,23 @@
|
|
|
36
36
|
"test": "tsc --project tsconfig.json"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@girs/gjs": "^4.
|
|
40
|
-
"@girs/gtk-4.0": "^4.
|
|
41
|
-
"@girs/gsk-4.0": "^4.
|
|
42
|
-
"@girs/graphene-1.0": "^4.
|
|
43
|
-
"@girs/gobject-2.0": "^4.
|
|
44
|
-
"@girs/glib-2.0": "^4.
|
|
45
|
-
"@girs/gdk-4.0": "^4.
|
|
46
|
-
"@girs/cairo-1.0": "^4.
|
|
47
|
-
"@girs/pangocairo-1.0": "^4.
|
|
48
|
-
"@girs/pango-1.0": "^4.
|
|
49
|
-
"@girs/harfbuzz-0.0": "^4.
|
|
50
|
-
"@girs/freetype2-2.0": "^4.
|
|
51
|
-
"@girs/gio-2.0": "^4.
|
|
52
|
-
"@girs/gmodule-2.0": "^4.
|
|
53
|
-
"@girs/gdkpixbuf-2.0": "^4.
|
|
54
|
-
"@girs/gcr-4": "^4.
|
|
55
|
-
"@girs/gck-2": "^4.
|
|
39
|
+
"@girs/gjs": "^4.5.0",
|
|
40
|
+
"@girs/gtk-4.0": "^4.5.0",
|
|
41
|
+
"@girs/gsk-4.0": "^4.5.0",
|
|
42
|
+
"@girs/graphene-1.0": "^4.5.0",
|
|
43
|
+
"@girs/gobject-2.0": "^4.5.0",
|
|
44
|
+
"@girs/glib-2.0": "^4.5.0",
|
|
45
|
+
"@girs/gdk-4.0": "^4.5.0",
|
|
46
|
+
"@girs/cairo-1.0": "^4.5.0",
|
|
47
|
+
"@girs/pangocairo-1.0": "^4.5.0",
|
|
48
|
+
"@girs/pango-1.0": "^4.5.0",
|
|
49
|
+
"@girs/harfbuzz-0.0": "^4.5.0",
|
|
50
|
+
"@girs/freetype2-2.0": "^4.5.0",
|
|
51
|
+
"@girs/gio-2.0": "^4.5.0",
|
|
52
|
+
"@girs/gmodule-2.0": "^4.5.0",
|
|
53
|
+
"@girs/gdkpixbuf-2.0": "^4.5.0",
|
|
54
|
+
"@girs/gcr-4": "^4.5.0",
|
|
55
|
+
"@girs/gck-2": "^4.5.0" },
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"typescript": "*"
|
|
58
58
|
},
|