@girs/foundryadw-1 4.1.0 → 4.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 +8 -8
- package/foundryadw-1-surface.d.ts +270 -0
- package/foundryadw-1-surface.js +66 -0
- package/foundryadw-1.d.ts +80 -7
- package/package.json +30 -25
- package/tsconfig.json +4 -1
package/README.md
CHANGED
|
@@ -5,25 +5,25 @@
|
|
|
5
5
|

|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
GJS TypeScript type definitions for FoundryAdw-1
|
|
8
|
+
GJS TypeScript type definitions for FoundryAdw-1 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.3.0.
|
|
9
9
|
|
|
10
10
|
## Install
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Install the type definitions with npm:
|
|
13
13
|
```bash
|
|
14
14
|
npm install @girs/foundryadw-1
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
## Usage
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Import it like any other module:
|
|
20
20
|
```ts
|
|
21
21
|
import FoundryAdw from '@girs/foundryadw-1';
|
|
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/foundryadw-1` or `@girs/foundryadw-1/ambient` in your `tsconfig` or entry point Typescript file:
|
|
28
28
|
|
|
29
29
|
`index.ts`:
|
|
@@ -42,7 +42,7 @@ import '@girs/foundryadw-1'
|
|
|
42
42
|
}
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
The ambient module now resolves with types:
|
|
46
46
|
|
|
47
47
|
```ts
|
|
48
48
|
import FoundryAdw from 'gi://FoundryAdw?version=1';
|
|
@@ -50,7 +50,7 @@ import FoundryAdw from 'gi://FoundryAdw?version=1';
|
|
|
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/foundryadw-1` or `@girs/foundryadw-1/import` in your `tsconfig` or entry point Typescript file:
|
|
55
55
|
|
|
56
56
|
`index.ts`:
|
|
@@ -69,7 +69,7 @@ import '@girs/foundryadw-1'
|
|
|
69
69
|
}
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
That form carries types as well:
|
|
73
73
|
|
|
74
74
|
```ts
|
|
75
75
|
const FoundryAdw = imports.gi.FoundryAdw;
|
|
@@ -77,7 +77,7 @@ const FoundryAdw = imports.gi.FoundryAdw;
|
|
|
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
|
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The GIR-derived widget VOCABULARY for FoundryAdw-1.
|
|
3
|
+
*
|
|
4
|
+
* GENERATED — do not edit. Provenance: FoundryAdw-1 — dropped empty base(s): GObject.InitiallyUnowned GObject.Object
|
|
5
|
+
*
|
|
6
|
+
* 7 concrete widgets, 7 declarations, 1 enum nick unions, 12 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 Foundry from '@girs/foundry-1';
|
|
28
|
+
import type FoundryAdw from './foundryadw-1.js';
|
|
29
|
+
import type Gdk from '@girs/gdk-4.0';
|
|
30
|
+
import type Gio from '@girs/gio-2.0';
|
|
31
|
+
import type Gtk from '@girs/gtk-4.0';
|
|
32
|
+
import type { AdwDialogConstructOnly, AdwDialogProps, AdwEntryRowConstructOnly, AdwEntryRowProps, AdwPreferencesRowConstructOnly, AdwPreferencesRowProps } from '@girs/adw-1/surface';
|
|
33
|
+
import type { GtkAccessibleConstructOnly, GtkAccessibleProps, GtkActionableConstructOnly, GtkActionableProps, GtkBuildableConstructOnly, GtkBuildableProps, GtkConstraintTargetConstructOnly, GtkConstraintTargetProps, GtkEditableConstructOnly, GtkEditableProps, GtkListBoxRowConstructOnly, GtkListBoxRowProps, GtkShortcutManagerConstructOnly, GtkShortcutManagerProps, GtkWidgetConstructOnly, GtkWidgetProps } from '@girs/gtk-4.0/surface';
|
|
34
|
+
|
|
35
|
+
// ---------------------------------------------------------------------------
|
|
36
|
+
// Enum nicks — the string vocabulary GObject registered, from GIR's `glib:nick`.
|
|
37
|
+
//
|
|
38
|
+
// Not derived from the member name. Substituting underscores for dashes is not a law:
|
|
39
|
+
// some nicks keep an underscore the substitution would have replaced, and only the
|
|
40
|
+
// attribute knows which. Gtk-4.0 and Adw-1 contradict no derivation at all, which is
|
|
41
|
+
// how a derived nick passes review and breaks elsewhere.
|
|
42
|
+
// Re-measure with `scripts/check-nick-derivation.mjs` in ts-for-gir.
|
|
43
|
+
// ---------------------------------------------------------------------------
|
|
44
|
+
|
|
45
|
+
export type GFileTypeNick = 'unknown' | 'regular' | 'directory' | 'symbolic-link' | 'special' | 'shortcut' | 'mountable';
|
|
46
|
+
|
|
47
|
+
// ---------------------------------------------------------------------------
|
|
48
|
+
// Property surfaces — one interface per GIR DECLARATION, mirroring GIR's own
|
|
49
|
+
// inheritance rather than flattening per widget.
|
|
50
|
+
//
|
|
51
|
+
// The interfaces are load-bearing, not tidiness: `GtkBox` declares four properties
|
|
52
|
+
// of its own and `orientation` is not among them — it lives on `Gtk.Orientable`,
|
|
53
|
+
// because GObject installs interface properties on the implementor at runtime while
|
|
54
|
+
// GIR keeps them once, on the interface.
|
|
55
|
+
// ---------------------------------------------------------------------------
|
|
56
|
+
|
|
57
|
+
/** An `AdwPreferencesRow` that allows typing or navigating to a file or directory path. */
|
|
58
|
+
export interface FoundryFileRowProps extends AdwEntryRowProps, GtkAccessibleProps, GtkActionableProps, GtkBuildableProps, GtkConstraintTargetProps, GtkEditableProps {
|
|
59
|
+
file?: Gio.File;
|
|
60
|
+
'file-type'?: GFileTypeNick | Gio.FileType;
|
|
61
|
+
}
|
|
62
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
63
|
+
export type FoundryFileRowConstructOnly = AdwEntryRowConstructOnly | GtkAccessibleConstructOnly | GtkActionableConstructOnly | GtkBuildableConstructOnly | GtkConstraintTargetConstructOnly | GtkEditableConstructOnly;
|
|
64
|
+
|
|
65
|
+
export interface FoundryPageProps extends GtkWidgetProps, GtkAccessibleProps, GtkBuildableProps, GtkConstraintTargetProps {
|
|
66
|
+
auxiliary?: Gtk.Widget | null;
|
|
67
|
+
content?: Gtk.Widget | null;
|
|
68
|
+
'needs-attention'?: boolean;
|
|
69
|
+
}
|
|
70
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
71
|
+
export type FoundryPageConstructOnly = GtkWidgetConstructOnly | GtkAccessibleConstructOnly | GtkBuildableConstructOnly | GtkConstraintTargetConstructOnly;
|
|
72
|
+
|
|
73
|
+
export interface FoundryPanelBarProps extends GtkWidgetProps, GtkAccessibleProps, GtkBuildableProps, GtkConstraintTargetProps {
|
|
74
|
+
'show-bottom'?: boolean;
|
|
75
|
+
'show-start'?: boolean;
|
|
76
|
+
workspace?: FoundryAdw.Workspace | null;
|
|
77
|
+
}
|
|
78
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
79
|
+
export type FoundryPanelBarConstructOnly = GtkWidgetConstructOnly | GtkAccessibleConstructOnly | GtkBuildableConstructOnly | GtkConstraintTargetConstructOnly;
|
|
80
|
+
|
|
81
|
+
export interface FoundryPathBarProps extends GtkWidgetProps, GtkAccessibleProps, GtkBuildableProps, GtkConstraintTargetProps {
|
|
82
|
+
root?: FoundryAdw.PathNavigator;
|
|
83
|
+
'selected-item'?: FoundryAdw.PathNavigator | null;
|
|
84
|
+
}
|
|
85
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
86
|
+
export type FoundryPathBarConstructOnly = GtkWidgetConstructOnly | GtkAccessibleConstructOnly | GtkBuildableConstructOnly | GtkConstraintTargetConstructOnly;
|
|
87
|
+
|
|
88
|
+
export interface FoundrySearchDialogProps extends AdwDialogProps, GtkAccessibleProps, GtkBuildableProps, GtkConstraintTargetProps, GtkShortcutManagerProps {
|
|
89
|
+
context?: Foundry.Context;
|
|
90
|
+
'search-text'?: string;
|
|
91
|
+
}
|
|
92
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
93
|
+
export type FoundrySearchDialogConstructOnly = AdwDialogConstructOnly | GtkAccessibleConstructOnly | GtkBuildableConstructOnly | GtkConstraintTargetConstructOnly | GtkShortcutManagerConstructOnly;
|
|
94
|
+
|
|
95
|
+
export interface FoundryTreeExpanderProps extends GtkWidgetProps, GtkAccessibleProps, GtkBuildableProps, GtkConstraintTargetProps {
|
|
96
|
+
/**
|
|
97
|
+
* Whether clicking on the expander should activate the row instead of expanding or collapsing it.
|
|
98
|
+
* @since 1.1
|
|
99
|
+
*/
|
|
100
|
+
'activate-on-click'?: boolean;
|
|
101
|
+
'expanded-icon'?: Gio.Icon | null;
|
|
102
|
+
'expanded-icon-name'?: string;
|
|
103
|
+
'expanded-paintable'?: Gdk.Paintable | null;
|
|
104
|
+
icon?: Gio.Icon | null;
|
|
105
|
+
'icon-name'?: string;
|
|
106
|
+
ignored?: boolean;
|
|
107
|
+
'list-row'?: Gtk.TreeListRow | null;
|
|
108
|
+
'menu-model'?: Gio.MenuModel | null;
|
|
109
|
+
/**
|
|
110
|
+
* The paintable to display for the row.
|
|
111
|
+
* @since 1.1
|
|
112
|
+
*/
|
|
113
|
+
paintable?: Gdk.Paintable | null;
|
|
114
|
+
suffix?: Gtk.Widget | null;
|
|
115
|
+
title?: string;
|
|
116
|
+
'use-markup'?: boolean;
|
|
117
|
+
}
|
|
118
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
119
|
+
export type FoundryTreeExpanderConstructOnly = GtkWidgetConstructOnly | GtkAccessibleConstructOnly | GtkBuildableConstructOnly | GtkConstraintTargetConstructOnly;
|
|
120
|
+
|
|
121
|
+
export interface FoundryWorkspaceProps extends GtkWidgetProps, GtkAccessibleProps, GtkBuildableProps, GtkConstraintTargetProps {
|
|
122
|
+
'auxiliary-placeholder'?: Gtk.Widget | null;
|
|
123
|
+
'collapsed-titlebar'?: Gtk.Widget | null;
|
|
124
|
+
context?: Foundry.Context | null;
|
|
125
|
+
'primary-menu'?: Gio.MenuModel | null;
|
|
126
|
+
'show-auxiliary'?: boolean;
|
|
127
|
+
'show-sidebar'?: boolean;
|
|
128
|
+
'show-utilities'?: boolean;
|
|
129
|
+
'sidebar-titlebar'?: Gtk.Widget | null;
|
|
130
|
+
'status-widget'?: Gtk.Widget | null;
|
|
131
|
+
titlebar?: Gtk.Widget | null;
|
|
132
|
+
}
|
|
133
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
134
|
+
export type FoundryWorkspaceConstructOnly = GtkWidgetConstructOnly | GtkAccessibleConstructOnly | GtkBuildableConstructOnly | GtkConstraintTargetConstructOnly;
|
|
135
|
+
|
|
136
|
+
// ---------------------------------------------------------------------------
|
|
137
|
+
// The GType-keyed widget map.
|
|
138
|
+
//
|
|
139
|
+
// Keyed by GType because that is also the GtkBuilder XML key and the typelib key. A
|
|
140
|
+
// consumer maps GTypes to tags in ITS convention — kebab for JSX intrinsics, Pascal
|
|
141
|
+
// for a Vue `GlobalComponents`, the class itself for a renderer whose element type
|
|
142
|
+
// is the class. None of those is baked in here.
|
|
143
|
+
//
|
|
144
|
+
// `slotCandidates` is a candidate list and never an answer: derived from methods
|
|
145
|
+
// taking exactly one widget argument. The GIR cannot tell adoption from reference —
|
|
146
|
+
// `set_title_widget` parents its argument and `set_activatable_widget` does not, and
|
|
147
|
+
// both are `void f(GtkWidget*)` at `transfer-ownership="none"`. Curation decides;
|
|
148
|
+
// this is what notices when a release adds a candidate.
|
|
149
|
+
// ---------------------------------------------------------------------------
|
|
150
|
+
|
|
151
|
+
export interface Widgets {
|
|
152
|
+
FoundryFileRow: {
|
|
153
|
+
class: FoundryAdw.FileRow;
|
|
154
|
+
props: FoundryFileRowProps;
|
|
155
|
+
signals: FoundryAdw.FileRow.SignalSignatures;
|
|
156
|
+
constructOnly: FoundryFileRowConstructOnly;
|
|
157
|
+
slotCandidates: {};
|
|
158
|
+
};
|
|
159
|
+
FoundryPage: {
|
|
160
|
+
class: FoundryAdw.Page;
|
|
161
|
+
props: FoundryPageProps;
|
|
162
|
+
signals: FoundryAdw.Page.SignalSignatures;
|
|
163
|
+
constructOnly: FoundryPageConstructOnly;
|
|
164
|
+
slotCandidates: {
|
|
165
|
+
'auxiliary': 'set_auxiliary';
|
|
166
|
+
'content': 'set_content';
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
FoundryPanelBar: {
|
|
170
|
+
class: FoundryAdw.PanelBar;
|
|
171
|
+
props: FoundryPanelBarProps;
|
|
172
|
+
signals: FoundryAdw.PanelBar.SignalSignatures;
|
|
173
|
+
constructOnly: FoundryPanelBarConstructOnly;
|
|
174
|
+
slotCandidates: {
|
|
175
|
+
'workspace': 'set_workspace';
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
FoundryPathBar: {
|
|
179
|
+
class: FoundryAdw.PathBar;
|
|
180
|
+
props: FoundryPathBarProps;
|
|
181
|
+
signals: FoundryAdw.PathBar.SignalSignatures;
|
|
182
|
+
constructOnly: FoundryPathBarConstructOnly;
|
|
183
|
+
slotCandidates: {};
|
|
184
|
+
};
|
|
185
|
+
FoundrySearchDialog: {
|
|
186
|
+
class: FoundryAdw.SearchDialog;
|
|
187
|
+
props: FoundrySearchDialogProps;
|
|
188
|
+
signals: FoundryAdw.SearchDialog.SignalSignatures;
|
|
189
|
+
constructOnly: FoundrySearchDialogConstructOnly;
|
|
190
|
+
slotCandidates: {};
|
|
191
|
+
};
|
|
192
|
+
FoundryTreeExpander: {
|
|
193
|
+
class: FoundryAdw.TreeExpander;
|
|
194
|
+
props: FoundryTreeExpanderProps;
|
|
195
|
+
signals: FoundryAdw.TreeExpander.SignalSignatures;
|
|
196
|
+
constructOnly: FoundryTreeExpanderConstructOnly;
|
|
197
|
+
slotCandidates: {
|
|
198
|
+
'suffix': 'set_suffix';
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
FoundryWorkspace: {
|
|
202
|
+
class: FoundryAdw.Workspace;
|
|
203
|
+
props: FoundryWorkspaceProps;
|
|
204
|
+
signals: FoundryAdw.Workspace.SignalSignatures;
|
|
205
|
+
constructOnly: FoundryWorkspaceConstructOnly;
|
|
206
|
+
slotCandidates: {
|
|
207
|
+
'auxiliary-placeholder': 'set_auxiliary_placeholder';
|
|
208
|
+
'bottom-panel': 'add_bottom_panel';
|
|
209
|
+
'collapsed-titlebar': 'set_collapsed_titlebar';
|
|
210
|
+
'page': 'add_page';
|
|
211
|
+
'sidebar-panel': 'add_sidebar_panel';
|
|
212
|
+
'sidebar-titlebar': 'set_sidebar_titlebar';
|
|
213
|
+
'status': 'set_status_widget';
|
|
214
|
+
'titlebar': 'set_titlebar';
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/** Every GType this namespace can create. A consumer derives its own tag map. */
|
|
220
|
+
export type WidgetGType = keyof Widgets;
|
|
221
|
+
|
|
222
|
+
/** The writable, optional, GObject-keyed property surface of one GType. */
|
|
223
|
+
export type PropsOf<G extends WidgetGType> = Widgets[G]['props'];
|
|
224
|
+
|
|
225
|
+
/** The signal table this package already emits, reached by GType. */
|
|
226
|
+
export type SignalsOf<G extends WidgetGType> = Widgets[G]['signals'];
|
|
227
|
+
|
|
228
|
+
/** The instance type — what a `ref`-shaped prop should infer. */
|
|
229
|
+
export type InstanceOf<G extends WidgetGType> = Widgets[G]['class'];
|
|
230
|
+
|
|
231
|
+
/** Property names that can only be set at construction. */
|
|
232
|
+
export type ConstructOnlyOf<G extends WidgetGType> = Widgets[G]['constructOnly'];
|
|
233
|
+
|
|
234
|
+
/** Candidate child slots — see the note above; curation decides. */
|
|
235
|
+
export type SlotCandidatesOf<G extends WidgetGType> = keyof Widgets[G]['slotCandidates'];
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* The same facts as runtime data, for a consumer that CHECKS them.
|
|
239
|
+
*
|
|
240
|
+
* Types are erased, so a spec that asks the installed GTK whether every property
|
|
241
|
+
* here is a writable ParamSpec, every signal resolvable by `GObject.signal_lookup`
|
|
242
|
+
* and every nick resolvable through an enum lookup cannot read the interfaces
|
|
243
|
+
* above. Emitted headlessly with no GTK present, which is exactly why the checking
|
|
244
|
+
* belongs to the consumer and the DATA belongs here.
|
|
245
|
+
*/
|
|
246
|
+
export const SURFACE_PROVENANCE: string;
|
|
247
|
+
|
|
248
|
+
/** Declaration GType -> its own settable properties, as GObject registered them. */
|
|
249
|
+
export const OWN_PROPS: Readonly<Record<string, readonly string[]>>;
|
|
250
|
+
|
|
251
|
+
/** Widget GType -> its own signals. */
|
|
252
|
+
export const OWN_SIGNALS: Readonly<Record<string, readonly string[]>>;
|
|
253
|
+
|
|
254
|
+
/** Widget GType -> every declaration its members come from, self first. */
|
|
255
|
+
export const DECLS: Readonly<Record<string, readonly string[]>>;
|
|
256
|
+
|
|
257
|
+
/** Enum GType -> the nicks this surface offers. */
|
|
258
|
+
export const ENUM_NICKS: Readonly<Record<string, readonly string[]>>;
|
|
259
|
+
|
|
260
|
+
/** Widget GType -> slot name -> the method that may adopt a child there. */
|
|
261
|
+
export const SLOT_CANDIDATES: Readonly<Record<string, Readonly<Record<string, string>>>>;
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* `Type.property` -> the release that introduced it.
|
|
265
|
+
*
|
|
266
|
+
* What keeps a runtime cross-check honest across a version gap without an
|
|
267
|
+
* allowlist: a member the installed library lacks is a defect UNLESS the version
|
|
268
|
+
* here is newer than the one running.
|
|
269
|
+
*/
|
|
270
|
+
export const SINCE: Readonly<Record<string, string>>;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
// The widget vocabulary of FoundryAdw-1 as runtime data.
|
|
2
|
+
//
|
|
3
|
+
// GENERATED — do not edit. Provenance: FoundryAdw-1 — 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 SURFACE_PROVENANCE = 'FoundryAdw-1 — dropped empty base(s): GObject.InitiallyUnowned GObject.Object';
|
|
10
|
+
|
|
11
|
+
export const OWN_PROPS = {
|
|
12
|
+
FoundryFileRow: ['file', 'file-type'],
|
|
13
|
+
FoundryPage: ['auxiliary', 'content', 'needs-attention'],
|
|
14
|
+
FoundryPanelBar: ['show-bottom', 'show-start', 'workspace'],
|
|
15
|
+
FoundryPathBar: ['root', 'selected-item'],
|
|
16
|
+
FoundrySearchDialog: ['context', 'search-text'],
|
|
17
|
+
FoundryTreeExpander: ['activate-on-click', 'expanded-icon', 'expanded-icon-name', 'expanded-paintable', 'icon', 'icon-name', 'ignored', 'list-row', 'menu-model', 'paintable', 'suffix', 'title', 'use-markup'],
|
|
18
|
+
FoundryWorkspace: ['auxiliary-placeholder', 'collapsed-titlebar', 'context', 'primary-menu', 'show-auxiliary', 'show-sidebar', 'show-utilities', 'sidebar-titlebar', 'status-widget', 'titlebar'],
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export const OWN_SIGNALS = {
|
|
22
|
+
FoundryPage: ['presented', 'raise'],
|
|
23
|
+
FoundryTreeExpander: ['context-menu'],
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export const DECLS = {
|
|
27
|
+
FoundryFileRow: ['FoundryFileRow', 'AdwEntryRow', 'AdwPreferencesRow', 'GtkListBoxRow', 'GtkWidget', 'GtkAccessible', 'GtkActionable', 'GtkBuildable', 'GtkConstraintTarget', 'GtkEditable'],
|
|
28
|
+
FoundryPage: ['FoundryPage', 'GtkWidget', 'GtkAccessible', 'GtkBuildable', 'GtkConstraintTarget'],
|
|
29
|
+
FoundryPanelBar: ['FoundryPanelBar', 'GtkWidget', 'GtkAccessible', 'GtkBuildable', 'GtkConstraintTarget'],
|
|
30
|
+
FoundryPathBar: ['FoundryPathBar', 'GtkWidget', 'GtkAccessible', 'GtkBuildable', 'GtkConstraintTarget'],
|
|
31
|
+
FoundrySearchDialog: ['FoundrySearchDialog', 'AdwDialog', 'GtkWidget', 'GtkAccessible', 'GtkBuildable', 'GtkConstraintTarget', 'GtkShortcutManager'],
|
|
32
|
+
FoundryTreeExpander: ['FoundryTreeExpander', 'GtkWidget', 'GtkAccessible', 'GtkBuildable', 'GtkConstraintTarget'],
|
|
33
|
+
FoundryWorkspace: ['FoundryWorkspace', 'GtkWidget', 'GtkAccessible', 'GtkBuildable', 'GtkConstraintTarget'],
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export const ENUM_NICKS = {
|
|
37
|
+
GFileType: ['unknown', 'regular', 'directory', 'symbolic-link', 'special', 'shortcut', 'mountable'],
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export const SLOT_CANDIDATES = {
|
|
41
|
+
FoundryPage: {
|
|
42
|
+
'auxiliary': 'set_auxiliary',
|
|
43
|
+
'content': 'set_content',
|
|
44
|
+
},
|
|
45
|
+
FoundryPanelBar: {
|
|
46
|
+
'workspace': 'set_workspace',
|
|
47
|
+
},
|
|
48
|
+
FoundryTreeExpander: {
|
|
49
|
+
'suffix': 'set_suffix',
|
|
50
|
+
},
|
|
51
|
+
FoundryWorkspace: {
|
|
52
|
+
'auxiliary-placeholder': 'set_auxiliary_placeholder',
|
|
53
|
+
'bottom-panel': 'add_bottom_panel',
|
|
54
|
+
'collapsed-titlebar': 'set_collapsed_titlebar',
|
|
55
|
+
'page': 'add_page',
|
|
56
|
+
'sidebar-panel': 'add_sidebar_panel',
|
|
57
|
+
'sidebar-titlebar': 'set_sidebar_titlebar',
|
|
58
|
+
'status': 'set_status_widget',
|
|
59
|
+
'titlebar': 'set_titlebar',
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export const SINCE = {
|
|
64
|
+
'FoundryTreeExpander.activate-on-click': '1.1',
|
|
65
|
+
'FoundryTreeExpander.paintable': '1.1',
|
|
66
|
+
};
|
package/foundryadw-1.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ import type Json from '@girs/json-1.0';
|
|
|
31
31
|
import type GtkSource from '@girs/gtksource-5';
|
|
32
32
|
import type Foundry from '@girs/foundry-1';
|
|
33
33
|
import type Dex from '@girs/dex-1';
|
|
34
|
+
import type GioUnix from '@girs/giounix-2.0';
|
|
34
35
|
import type Adw from '@girs/adw-1';
|
|
35
36
|
|
|
36
37
|
export namespace FoundryAdw {
|
|
@@ -227,9 +228,11 @@ export namespace FoundryAdw {
|
|
|
227
228
|
"notify::vexpand-set": (pspec: GObject.ParamSpec) => void;
|
|
228
229
|
"notify::visible": (pspec: GObject.ParamSpec) => void;
|
|
229
230
|
"notify::width-request": (pspec: GObject.ParamSpec) => void;
|
|
231
|
+
"notify::complete-text": (pspec: GObject.ParamSpec) => void;
|
|
230
232
|
"notify::cursor-position": (pspec: GObject.ParamSpec) => void;
|
|
231
233
|
"notify::editable": (pspec: GObject.ParamSpec) => void;
|
|
232
234
|
"notify::enable-undo": (pspec: GObject.ParamSpec) => void;
|
|
235
|
+
"notify::input-interceptor": (pspec: GObject.ParamSpec) => void;
|
|
233
236
|
"notify::max-width-chars": (pspec: GObject.ParamSpec) => void;
|
|
234
237
|
"notify::selection-bound": (pspec: GObject.ParamSpec) => void;
|
|
235
238
|
"notify::text": (pspec: GObject.ParamSpec) => void;
|
|
@@ -323,6 +326,24 @@ export namespace FoundryAdw {
|
|
|
323
326
|
*/
|
|
324
327
|
set_file_type(file_type: Gio.FileType): void;
|
|
325
328
|
|
|
329
|
+
/**
|
|
330
|
+
* The contents of the entry, including uncommited content such as the
|
|
331
|
+
* preedit.
|
|
332
|
+
* @since 4.24
|
|
333
|
+
* @read-only
|
|
334
|
+
* @category Inherited from Gtk.Editable
|
|
335
|
+
*/
|
|
336
|
+
get complete_text(): string;
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* The contents of the entry, including uncommited content such as the
|
|
340
|
+
* preedit.
|
|
341
|
+
* @since 4.24
|
|
342
|
+
* @read-only
|
|
343
|
+
* @category Inherited from Gtk.Editable
|
|
344
|
+
*/
|
|
345
|
+
get completeText(): string;
|
|
346
|
+
|
|
326
347
|
/**
|
|
327
348
|
* The current position of the insertion cursor in chars.
|
|
328
349
|
* @read-only
|
|
@@ -363,6 +384,22 @@ export namespace FoundryAdw {
|
|
|
363
384
|
get enableUndo(): boolean;
|
|
364
385
|
set enableUndo(val: boolean);
|
|
365
386
|
|
|
387
|
+
/**
|
|
388
|
+
* The widget used to intercept input for this editable
|
|
389
|
+
* @since 4.24
|
|
390
|
+
* @category Inherited from Gtk.Editable
|
|
391
|
+
*/
|
|
392
|
+
get input_interceptor(): Gtk.Widget | null;
|
|
393
|
+
set input_interceptor(val: Gtk.Widget | null);
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* The widget used to intercept input for this editable
|
|
397
|
+
* @since 4.24
|
|
398
|
+
* @category Inherited from Gtk.Editable
|
|
399
|
+
*/
|
|
400
|
+
get inputInterceptor(): Gtk.Widget | null;
|
|
401
|
+
set inputInterceptor(val: Gtk.Widget | null);
|
|
402
|
+
|
|
366
403
|
/**
|
|
367
404
|
* The desired maximum width of the entry, in characters.
|
|
368
405
|
* @default -1
|
|
@@ -469,7 +506,7 @@ export namespace FoundryAdw {
|
|
|
469
506
|
/**
|
|
470
507
|
* Deletes the currently selected text of the editable.
|
|
471
508
|
*
|
|
472
|
-
* This call doesn
|
|
509
|
+
* This call doesn’t do anything if there is no selected text.
|
|
473
510
|
*/
|
|
474
511
|
delete_selection(): void;
|
|
475
512
|
|
|
@@ -516,6 +553,13 @@ export namespace FoundryAdw {
|
|
|
516
553
|
*/
|
|
517
554
|
get_chars(start_pos: number, end_pos: number): string;
|
|
518
555
|
|
|
556
|
+
/**
|
|
557
|
+
* Retrieves the contents of `editable`, including *pseudo-content*
|
|
558
|
+
* such as the preedit buffer.
|
|
559
|
+
* @returns the complete contents of the editable
|
|
560
|
+
*/
|
|
561
|
+
get_complete_text(): string;
|
|
562
|
+
|
|
519
563
|
/**
|
|
520
564
|
* Gets the {@link Gtk.Editable} that `editable` is delegating its
|
|
521
565
|
* implementation to.
|
|
@@ -537,6 +581,13 @@ export namespace FoundryAdw {
|
|
|
537
581
|
*/
|
|
538
582
|
get_enable_undo(): boolean;
|
|
539
583
|
|
|
584
|
+
/**
|
|
585
|
+
* Retrieves the widget that was previously set up as input interceptor
|
|
586
|
+
* for `editable`. See {@link Gtk.Editable.set_input_interceptor}.
|
|
587
|
+
* @returns The editable widget
|
|
588
|
+
*/
|
|
589
|
+
get_input_interceptor(): Gtk.Widget | null;
|
|
590
|
+
|
|
540
591
|
/**
|
|
541
592
|
* Retrieves the desired maximum width of `editable`, in characters.
|
|
542
593
|
* @returns the maximum width of the entry, in characters
|
|
@@ -643,6 +694,21 @@ export namespace FoundryAdw {
|
|
|
643
694
|
*/
|
|
644
695
|
set_enable_undo(enable_undo: boolean): void;
|
|
645
696
|
|
|
697
|
+
/**
|
|
698
|
+
* Sets `interceptor` as the widget that `editable` will intercept key events from.
|
|
699
|
+
*
|
|
700
|
+
* A typical usecase for this is implementing auto-showing search entries, so
|
|
701
|
+
* that textual input may be intercepted from another widget and handled first
|
|
702
|
+
* hand by the given editable. The events will be handled in the bubble phase
|
|
703
|
+
* of `interceptor`, which means that editable child widgets of `interceptor` will
|
|
704
|
+
* receive the text input before it can be captured.
|
|
705
|
+
*
|
|
706
|
+
* Only those events that would be handled by an input method will be handled,
|
|
707
|
+
* this excludes combinations of Ctrl/Alt/Mod, and other shortcuts.
|
|
708
|
+
* @param interceptor the input interceptor widget
|
|
709
|
+
*/
|
|
710
|
+
set_input_interceptor(interceptor: Gtk.Widget | null): void;
|
|
711
|
+
|
|
646
712
|
/**
|
|
647
713
|
* Sets the desired maximum width in characters of `editable`.
|
|
648
714
|
* @param n_chars the new desired maximum width, in characters
|
|
@@ -729,6 +795,13 @@ export namespace FoundryAdw {
|
|
|
729
795
|
*/
|
|
730
796
|
vfunc_do_insert_text(text: string, length: number, position: number): number;
|
|
731
797
|
|
|
798
|
+
/**
|
|
799
|
+
* Retrieves the contents of `editable`, including *pseudo-content*
|
|
800
|
+
* such as the preedit buffer.
|
|
801
|
+
* @virtual
|
|
802
|
+
*/
|
|
803
|
+
vfunc_get_complete_text(): string;
|
|
804
|
+
|
|
732
805
|
/**
|
|
733
806
|
* Gets the {@link Gtk.Editable} that `editable` is delegating its
|
|
734
807
|
* implementation to.
|
|
@@ -1421,7 +1494,7 @@ export namespace FoundryAdw {
|
|
|
1421
1494
|
/**
|
|
1422
1495
|
* Stores the id attribute given in the {@link Gtk.Builder} UI definition.
|
|
1423
1496
|
* {@link Gtk.Widget} stores the name as object data. Implement this method if your
|
|
1424
|
-
* object has some notion of
|
|
1497
|
+
* object has some notion of “ID” and it makes sense to map the XML id
|
|
1425
1498
|
* attribute to it.
|
|
1426
1499
|
* @param id
|
|
1427
1500
|
* @virtual
|
|
@@ -1975,7 +2048,7 @@ export namespace FoundryAdw {
|
|
|
1975
2048
|
/**
|
|
1976
2049
|
* Stores the id attribute given in the {@link Gtk.Builder} UI definition.
|
|
1977
2050
|
* {@link Gtk.Widget} stores the name as object data. Implement this method if your
|
|
1978
|
-
* object has some notion of
|
|
2051
|
+
* object has some notion of “ID” and it makes sense to map the XML id
|
|
1979
2052
|
* attribute to it.
|
|
1980
2053
|
* @param id
|
|
1981
2054
|
* @virtual
|
|
@@ -2461,7 +2534,7 @@ export namespace FoundryAdw {
|
|
|
2461
2534
|
/**
|
|
2462
2535
|
* Stores the id attribute given in the {@link Gtk.Builder} UI definition.
|
|
2463
2536
|
* {@link Gtk.Widget} stores the name as object data. Implement this method if your
|
|
2464
|
-
* object has some notion of
|
|
2537
|
+
* object has some notion of “ID” and it makes sense to map the XML id
|
|
2465
2538
|
* attribute to it.
|
|
2466
2539
|
* @param id
|
|
2467
2540
|
* @virtual
|
|
@@ -2923,7 +2996,7 @@ export namespace FoundryAdw {
|
|
|
2923
2996
|
/**
|
|
2924
2997
|
* Stores the id attribute given in the {@link Gtk.Builder} UI definition.
|
|
2925
2998
|
* {@link Gtk.Widget} stores the name as object data. Implement this method if your
|
|
2926
|
-
* object has some notion of
|
|
2999
|
+
* object has some notion of “ID” and it makes sense to map the XML id
|
|
2927
3000
|
* attribute to it.
|
|
2928
3001
|
* @param id
|
|
2929
3002
|
* @virtual
|
|
@@ -4005,7 +4078,7 @@ export namespace FoundryAdw {
|
|
|
4005
4078
|
/**
|
|
4006
4079
|
* Stores the id attribute given in the {@link Gtk.Builder} UI definition.
|
|
4007
4080
|
* {@link Gtk.Widget} stores the name as object data. Implement this method if your
|
|
4008
|
-
* object has some notion of
|
|
4081
|
+
* object has some notion of “ID” and it makes sense to map the XML id
|
|
4009
4082
|
* attribute to it.
|
|
4010
4083
|
* @param id
|
|
4011
4084
|
* @virtual
|
|
@@ -4725,7 +4798,7 @@ export namespace FoundryAdw {
|
|
|
4725
4798
|
/**
|
|
4726
4799
|
* Stores the id attribute given in the {@link Gtk.Builder} UI definition.
|
|
4727
4800
|
* {@link Gtk.Widget} stores the name as object data. Implement this method if your
|
|
4728
|
-
* object has some notion of
|
|
4801
|
+
* object has some notion of “ID” and it makes sense to map the XML id
|
|
4729
4802
|
* attribute to it.
|
|
4730
4803
|
* @param id
|
|
4731
4804
|
* @virtual
|
package/package.json
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/foundryadw-1",
|
|
3
|
-
"version": "4.
|
|
4
|
-
"
|
|
5
|
-
"description": "GJS TypeScript type definitions for FoundryAdw-1, generated from library version 1.0.0",
|
|
3
|
+
"version": "4.3.0",
|
|
4
|
+
"description": "GJS TypeScript type definitions for FoundryAdw-1",
|
|
6
5
|
"type": "module",
|
|
7
6
|
"module": "foundryadw-1.js",
|
|
8
7
|
"main": "foundryadw-1.js",
|
|
@@ -17,6 +16,11 @@
|
|
|
17
16
|
"import": "./foundryadw-1-import.js",
|
|
18
17
|
"default": "./foundryadw-1-import.js"
|
|
19
18
|
},
|
|
19
|
+
"./surface": {
|
|
20
|
+
"types": "./foundryadw-1-surface.d.ts",
|
|
21
|
+
"import": "./foundryadw-1-surface.js",
|
|
22
|
+
"default": "./foundryadw-1-surface.js"
|
|
23
|
+
},
|
|
20
24
|
"./foundryadw-1": {
|
|
21
25
|
"types": "./foundryadw-1.d.ts",
|
|
22
26
|
"import": "./foundryadw-1.js",
|
|
@@ -32,28 +36,29 @@
|
|
|
32
36
|
"test": "tsc --project tsconfig.json"
|
|
33
37
|
},
|
|
34
38
|
"dependencies": {
|
|
35
|
-
"@girs/gjs": "^4.
|
|
36
|
-
"@girs/peas-2": "^4.
|
|
37
|
-
"@girs/gio-2.0": "^4.
|
|
38
|
-
"@girs/gobject-2.0": "^4.
|
|
39
|
-
"@girs/glib-2.0": "^4.
|
|
40
|
-
"@girs/gmodule-2.0": "^4.
|
|
41
|
-
"@girs/gtk-4.0": "^4.
|
|
42
|
-
"@girs/gsk-4.0": "^4.
|
|
43
|
-
"@girs/graphene-1.0": "^4.
|
|
44
|
-
"@girs/gdk-4.0": "^4.
|
|
45
|
-
"@girs/cairo-1.0": "^4.
|
|
46
|
-
"@girs/pangocairo-1.0": "^4.
|
|
47
|
-
"@girs/pango-1.0": "^4.
|
|
48
|
-
"@girs/harfbuzz-0.0": "^4.
|
|
49
|
-
"@girs/freetype2-2.0": "^4.
|
|
50
|
-
"@girs/gdkpixbuf-2.0": "^4.
|
|
51
|
-
"@girs/foundrygtk-1": "^4.
|
|
52
|
-
"@girs/json-1.0": "^4.
|
|
53
|
-
"@girs/gtksource-5": "^4.
|
|
54
|
-
"@girs/foundry-1": "^4.
|
|
55
|
-
"@girs/dex-1": "^4.
|
|
56
|
-
"@girs/
|
|
39
|
+
"@girs/gjs": "^4.3.0",
|
|
40
|
+
"@girs/peas-2": "^4.3.0",
|
|
41
|
+
"@girs/gio-2.0": "^4.3.0",
|
|
42
|
+
"@girs/gobject-2.0": "^4.3.0",
|
|
43
|
+
"@girs/glib-2.0": "^4.3.0",
|
|
44
|
+
"@girs/gmodule-2.0": "^4.3.0",
|
|
45
|
+
"@girs/gtk-4.0": "^4.3.0",
|
|
46
|
+
"@girs/gsk-4.0": "^4.3.0",
|
|
47
|
+
"@girs/graphene-1.0": "^4.3.0",
|
|
48
|
+
"@girs/gdk-4.0": "^4.3.0",
|
|
49
|
+
"@girs/cairo-1.0": "^4.3.0",
|
|
50
|
+
"@girs/pangocairo-1.0": "^4.3.0",
|
|
51
|
+
"@girs/pango-1.0": "^4.3.0",
|
|
52
|
+
"@girs/harfbuzz-0.0": "^4.3.0",
|
|
53
|
+
"@girs/freetype2-2.0": "^4.3.0",
|
|
54
|
+
"@girs/gdkpixbuf-2.0": "^4.3.0",
|
|
55
|
+
"@girs/foundrygtk-1": "^4.3.0",
|
|
56
|
+
"@girs/json-1.0": "^4.3.0",
|
|
57
|
+
"@girs/gtksource-5": "^4.3.0",
|
|
58
|
+
"@girs/foundry-1": "^4.3.0",
|
|
59
|
+
"@girs/dex-1": "^4.3.0",
|
|
60
|
+
"@girs/giounix-2.0": "^4.3.0",
|
|
61
|
+
"@girs/adw-1": "^4.3.0" },
|
|
57
62
|
"devDependencies": {
|
|
58
63
|
"typescript": "*"
|
|
59
64
|
},
|
package/tsconfig.json
CHANGED
|
@@ -78,6 +78,9 @@
|
|
|
78
78
|
"@girs/dex-1": [
|
|
79
79
|
"../dex-1/index.d.ts"
|
|
80
80
|
],
|
|
81
|
+
"@girs/giounix-2.0": [
|
|
82
|
+
"../giounix-2.0/index.d.ts"
|
|
83
|
+
],
|
|
81
84
|
"@girs/adw-1": [
|
|
82
85
|
"../adw-1/index.d.ts"
|
|
83
86
|
],
|
|
@@ -86,7 +89,7 @@
|
|
|
86
89
|
]
|
|
87
90
|
}
|
|
88
91
|
},
|
|
89
|
-
"include": ["./foundryadw-1.d.ts"]
|
|
92
|
+
"include": ["./foundryadw-1.d.ts","./foundryadw-1-surface.d.ts"]
|
|
90
93
|
}
|
|
91
94
|
|
|
92
95
|
|