@girs/foundrygtk-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 CHANGED
@@ -5,25 +5,25 @@
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/foundrygtk-1)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for FoundryGtk-1, generated from library version 1.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.1.0.
8
+ GJS TypeScript type definitions for FoundryGtk-1 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.3.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/foundrygtk-1
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 FoundryGtk from '@girs/foundrygtk-1';
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/foundrygtk-1` or `@girs/foundrygtk-1/ambient` in your `tsconfig` or entry point Typescript file:
28
28
 
29
29
  `index.ts`:
@@ -42,7 +42,7 @@ import '@girs/foundrygtk-1'
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 FoundryGtk from 'gi://FoundryGtk?version=1';
@@ -50,7 +50,7 @@ import FoundryGtk from 'gi://FoundryGtk?version=1';
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/foundrygtk-1` or `@girs/foundrygtk-1/import` in your `tsconfig` or entry point Typescript file:
55
55
 
56
56
  `index.ts`:
@@ -69,7 +69,7 @@ import '@girs/foundrygtk-1'
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 FoundryGtk = imports.gi.FoundryGtk;
@@ -77,7 +77,7 @@ const FoundryGtk = imports.gi.FoundryGtk;
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
 
@@ -0,0 +1,217 @@
1
+ /**
2
+ * The GIR-derived widget VOCABULARY for FoundryGtk-1.
3
+ *
4
+ * GENERATED — do not edit. Provenance: FoundryGtk-1 — dropped empty base(s): GObject.InitiallyUnowned GObject.Object
5
+ *
6
+ * 6 concrete widgets, 6 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 Foundry from '@girs/foundry-1';
28
+ import type FoundryGtk from './foundrygtk-1.js';
29
+ import type Pango from '@girs/pango-1.0';
30
+ import type { GtkAccessibleConstructOnly, GtkAccessibleProps, GtkAccessibleTextConstructOnly, GtkAccessibleTextProps, GtkBuildableConstructOnly, GtkBuildableProps, GtkConstraintTargetConstructOnly, GtkConstraintTargetProps, GtkScrollableConstructOnly, GtkScrollableProps, GtkTextViewConstructOnly, GtkTextViewProps, GtkWidgetConstructOnly, GtkWidgetProps } from '@girs/gtk-4.0/surface';
31
+ import type { GtkSourceGutterRendererConstructOnly, GtkSourceGutterRendererProps, GtkSourceViewConstructOnly, GtkSourceViewProps } from '@girs/gtksource-5/surface';
32
+
33
+ // ---------------------------------------------------------------------------
34
+ // Enum nicks — the string vocabulary GObject registered, from GIR's `glib:nick`.
35
+ //
36
+ // Not derived from the member name. Substituting underscores for dashes is not a law:
37
+ // some nicks keep an underscore the substitution would have replaced, and only the
38
+ // attribute knows which. Gtk-4.0 and Adw-1 contradict no derivation at all, which is
39
+ // how a derived nick passes review and breaks elsewhere.
40
+ // Re-measure with `scripts/check-nick-derivation.mjs` in ts-for-gir.
41
+ // ---------------------------------------------------------------------------
42
+
43
+
44
+
45
+ // ---------------------------------------------------------------------------
46
+ // Property surfaces — one interface per GIR DECLARATION, mirroring GIR's own
47
+ // inheritance rather than flattening per widget.
48
+ //
49
+ // The interfaces are load-bearing, not tidiness: `GtkBox` declares four properties
50
+ // of its own and `orientation` is not among them — it lives on `Gtk.Orientable`,
51
+ // because GObject installs interface properties on the implementor at runtime while
52
+ // GIR keeps them once, on the interface.
53
+ // ---------------------------------------------------------------------------
54
+
55
+ export interface FoundryChangesGutterRendererProps extends GtkSourceGutterRendererProps, GtkAccessibleProps, GtkBuildableProps, GtkConstraintTargetProps {
56
+ 'show-overview'?: boolean;
57
+ }
58
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
59
+ export type FoundryChangesGutterRendererConstructOnly = GtkSourceGutterRendererConstructOnly | GtkAccessibleConstructOnly | GtkBuildableConstructOnly | GtkConstraintTargetConstructOnly;
60
+
61
+ export interface FoundryDiagnosticsGutterRendererProps extends GtkSourceGutterRendererProps, GtkAccessibleProps, GtkBuildableProps, GtkConstraintTargetProps {
62
+ diagnostics?: Foundry.OnTypeDiagnostics;
63
+ }
64
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
65
+ export type FoundryDiagnosticsGutterRendererConstructOnly = GtkSourceGutterRendererConstructOnly | GtkAccessibleConstructOnly | GtkBuildableConstructOnly | GtkConstraintTargetConstructOnly;
66
+
67
+ /** A widget that displays Git graph lanes for a [class@Foundry.VcsGraphEntry]. */
68
+ export interface FoundryGitLanesProps extends GtkWidgetProps, GtkAccessibleProps, GtkBuildableProps, GtkConstraintTargetProps {
69
+ /**
70
+ * The graph entry to render.
71
+ * @since 1.2
72
+ */
73
+ entry?: Foundry.VcsGraphEntry;
74
+ }
75
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
76
+ export type FoundryGitLanesConstructOnly = GtkWidgetConstructOnly | GtkAccessibleConstructOnly | GtkBuildableConstructOnly | GtkConstraintTargetConstructOnly;
77
+
78
+ export interface FoundryMarkupViewProps extends GtkWidgetProps, GtkAccessibleProps, GtkBuildableProps, GtkConstraintTargetProps {
79
+ }
80
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
81
+ export type FoundryMarkupViewConstructOnly = GtkWidgetConstructOnly | GtkAccessibleConstructOnly | GtkBuildableConstructOnly | GtkConstraintTargetConstructOnly;
82
+
83
+ export interface FoundrySourceViewProps extends GtkSourceViewProps, GtkAccessibleProps, GtkAccessibleTextProps, GtkBuildableProps, GtkConstraintTargetProps, GtkScrollableProps {
84
+ document?: Foundry.TextDocument;
85
+ 'enable-completion'?: boolean;
86
+ 'enable-vim'?: boolean;
87
+ font?: Pango.FontDescription;
88
+ /** Specify a non-default line height for text within the editor. */
89
+ 'line-height'?: number;
90
+ /** Shows the line changes on the left-hand side of the editor (when in LTR direction) for each line in the editor. */
91
+ 'show-diagnostics'?: boolean;
92
+ /** Shows the line changes on the left-hand side of the editor (when in LTR direction) for each line in the editor. */
93
+ 'show-line-changes'?: boolean;
94
+ /** Shows the line changes on the right-hand side of the editor (when in LTR direction) but as an overview of the entire document. */
95
+ 'show-line-changes-overview'?: boolean;
96
+ }
97
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
98
+ export type FoundrySourceViewConstructOnly = GtkSourceViewConstructOnly | GtkAccessibleConstructOnly | GtkAccessibleTextConstructOnly | GtkBuildableConstructOnly | GtkConstraintTargetConstructOnly | GtkScrollableConstructOnly | 'document';
99
+
100
+ export interface FoundryTerminalProps extends GtkWidgetProps, GtkAccessibleProps, GtkAccessibleTextProps, GtkBuildableProps, GtkConstraintTargetProps, GtkScrollableProps {
101
+ palette?: FoundryGtk.TerminalPalette | null;
102
+ }
103
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
104
+ export type FoundryTerminalConstructOnly = GtkWidgetConstructOnly | GtkAccessibleConstructOnly | GtkAccessibleTextConstructOnly | GtkBuildableConstructOnly | GtkConstraintTargetConstructOnly | GtkScrollableConstructOnly;
105
+
106
+ // ---------------------------------------------------------------------------
107
+ // The GType-keyed widget map.
108
+ //
109
+ // Keyed by GType because that is also the GtkBuilder XML key and the typelib key. A
110
+ // consumer maps GTypes to tags in ITS convention — kebab for JSX intrinsics, Pascal
111
+ // for a Vue `GlobalComponents`, the class itself for a renderer whose element type
112
+ // is the class. None of those is baked in here.
113
+ //
114
+ // `slotCandidates` is a candidate list and never an answer: derived from methods
115
+ // taking exactly one widget argument. The GIR cannot tell adoption from reference —
116
+ // `set_title_widget` parents its argument and `set_activatable_widget` does not, and
117
+ // both are `void f(GtkWidget*)` at `transfer-ownership="none"`. Curation decides;
118
+ // this is what notices when a release adds a candidate.
119
+ // ---------------------------------------------------------------------------
120
+
121
+ export interface Widgets {
122
+ FoundryChangesGutterRenderer: {
123
+ class: FoundryGtk.ChangesGutterRenderer;
124
+ props: FoundryChangesGutterRendererProps;
125
+ signals: FoundryGtk.ChangesGutterRenderer.SignalSignatures;
126
+ constructOnly: FoundryChangesGutterRendererConstructOnly;
127
+ slotCandidates: {};
128
+ };
129
+ FoundryDiagnosticsGutterRenderer: {
130
+ class: FoundryGtk.DiagnosticsGutterRenderer;
131
+ props: FoundryDiagnosticsGutterRendererProps;
132
+ signals: FoundryGtk.DiagnosticsGutterRenderer.SignalSignatures;
133
+ constructOnly: FoundryDiagnosticsGutterRendererConstructOnly;
134
+ slotCandidates: {};
135
+ };
136
+ FoundryGitLanes: {
137
+ class: FoundryGtk.GitLanes;
138
+ props: FoundryGitLanesProps;
139
+ signals: FoundryGtk.GitLanes.SignalSignatures;
140
+ constructOnly: FoundryGitLanesConstructOnly;
141
+ slotCandidates: {};
142
+ };
143
+ FoundryMarkupView: {
144
+ class: FoundryGtk.MarkupView;
145
+ props: FoundryMarkupViewProps;
146
+ signals: FoundryGtk.MarkupView.SignalSignatures;
147
+ constructOnly: FoundryMarkupViewConstructOnly;
148
+ slotCandidates: {};
149
+ };
150
+ FoundrySourceView: {
151
+ class: FoundryGtk.SourceView;
152
+ props: FoundrySourceViewProps;
153
+ signals: FoundryGtk.SourceView.SignalSignatures;
154
+ constructOnly: FoundrySourceViewConstructOnly;
155
+ slotCandidates: {};
156
+ };
157
+ FoundryTerminal: {
158
+ class: FoundryGtk.Terminal;
159
+ props: FoundryTerminalProps;
160
+ signals: FoundryGtk.Terminal.SignalSignatures;
161
+ constructOnly: FoundryTerminalConstructOnly;
162
+ slotCandidates: {};
163
+ };
164
+ }
165
+
166
+ /** Every GType this namespace can create. A consumer derives its own tag map. */
167
+ export type WidgetGType = keyof Widgets;
168
+
169
+ /** The writable, optional, GObject-keyed property surface of one GType. */
170
+ export type PropsOf<G extends WidgetGType> = Widgets[G]['props'];
171
+
172
+ /** The signal table this package already emits, reached by GType. */
173
+ export type SignalsOf<G extends WidgetGType> = Widgets[G]['signals'];
174
+
175
+ /** The instance type — what a `ref`-shaped prop should infer. */
176
+ export type InstanceOf<G extends WidgetGType> = Widgets[G]['class'];
177
+
178
+ /** Property names that can only be set at construction. */
179
+ export type ConstructOnlyOf<G extends WidgetGType> = Widgets[G]['constructOnly'];
180
+
181
+ /** Candidate child slots — see the note above; curation decides. */
182
+ export type SlotCandidatesOf<G extends WidgetGType> = keyof Widgets[G]['slotCandidates'];
183
+
184
+ /**
185
+ * The same facts as runtime data, for a consumer that CHECKS them.
186
+ *
187
+ * Types are erased, so a spec that asks the installed GTK whether every property
188
+ * here is a writable ParamSpec, every signal resolvable by `GObject.signal_lookup`
189
+ * and every nick resolvable through an enum lookup cannot read the interfaces
190
+ * above. Emitted headlessly with no GTK present, which is exactly why the checking
191
+ * belongs to the consumer and the DATA belongs here.
192
+ */
193
+ export const SURFACE_PROVENANCE: string;
194
+
195
+ /** Declaration GType -> its own settable properties, as GObject registered them. */
196
+ export const OWN_PROPS: Readonly<Record<string, readonly string[]>>;
197
+
198
+ /** Widget GType -> its own signals. */
199
+ export const OWN_SIGNALS: Readonly<Record<string, readonly string[]>>;
200
+
201
+ /** Widget GType -> every declaration its members come from, self first. */
202
+ export const DECLS: Readonly<Record<string, readonly string[]>>;
203
+
204
+ /** Enum GType -> the nicks this surface offers. */
205
+ export const ENUM_NICKS: Readonly<Record<string, readonly string[]>>;
206
+
207
+ /** Widget GType -> slot name -> the method that may adopt a child there. */
208
+ export const SLOT_CANDIDATES: Readonly<Record<string, Readonly<Record<string, string>>>>;
209
+
210
+ /**
211
+ * `Type.property` -> the release that introduced it.
212
+ *
213
+ * What keeps a runtime cross-check honest across a version gap without an
214
+ * allowlist: a member the installed library lacks is a defect UNLESS the version
215
+ * here is newer than the one running.
216
+ */
217
+ export const SINCE: Readonly<Record<string, string>>;
@@ -0,0 +1,36 @@
1
+ // The widget vocabulary of FoundryGtk-1 as runtime data.
2
+ //
3
+ // GENERATED — do not edit. Provenance: FoundryGtk-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 = 'FoundryGtk-1 — dropped empty base(s): GObject.InitiallyUnowned GObject.Object';
10
+
11
+ export const OWN_PROPS = {
12
+ FoundryChangesGutterRenderer: ['show-overview'],
13
+ FoundryDiagnosticsGutterRenderer: ['diagnostics'],
14
+ FoundryGitLanes: ['entry'],
15
+ FoundrySourceView: ['document', 'enable-completion', 'enable-vim', 'font', 'line-height', 'show-diagnostics', 'show-line-changes', 'show-line-changes-overview'],
16
+ FoundryTerminal: ['palette'],
17
+ };
18
+
19
+ export const OWN_SIGNALS = {};
20
+
21
+ export const DECLS = {
22
+ FoundryChangesGutterRenderer: ['FoundryChangesGutterRenderer', 'GtkSourceGutterRenderer', 'GtkWidget', 'GtkAccessible', 'GtkBuildable', 'GtkConstraintTarget'],
23
+ FoundryDiagnosticsGutterRenderer: ['FoundryDiagnosticsGutterRenderer', 'GtkSourceGutterRenderer', 'GtkWidget', 'GtkAccessible', 'GtkBuildable', 'GtkConstraintTarget'],
24
+ FoundryGitLanes: ['FoundryGitLanes', 'GtkWidget', 'GtkAccessible', 'GtkBuildable', 'GtkConstraintTarget'],
25
+ FoundryMarkupView: ['FoundryMarkupView', 'GtkWidget', 'GtkAccessible', 'GtkBuildable', 'GtkConstraintTarget'],
26
+ FoundrySourceView: ['FoundrySourceView', 'GtkSourceView', 'GtkTextView', 'GtkWidget', 'GtkAccessible', 'GtkAccessibleText', 'GtkBuildable', 'GtkConstraintTarget', 'GtkScrollable'],
27
+ FoundryTerminal: ['FoundryTerminal', 'GtkWidget', 'GtkAccessible', 'GtkAccessibleText', 'GtkBuildable', 'GtkConstraintTarget', 'GtkScrollable'],
28
+ };
29
+
30
+ export const ENUM_NICKS = {};
31
+
32
+ export const SLOT_CANDIDATES = {};
33
+
34
+ export const SINCE = {
35
+ 'FoundryGitLanes.entry': '1.2',
36
+ };
package/foundrygtk-1.d.ts CHANGED
@@ -30,6 +30,7 @@ import type freetype2 from '@girs/freetype2-2.0';
30
30
  import type GdkPixbuf from '@girs/gdkpixbuf-2.0';
31
31
  import type Foundry from '@girs/foundry-1';
32
32
  import type Dex from '@girs/dex-1';
33
+ import type GioUnix from '@girs/giounix-2.0';
33
34
 
34
35
  export namespace FoundryGtk {
35
36
 
@@ -271,6 +272,468 @@ export namespace FoundryGtk {
271
272
  }
272
273
 
273
274
 
275
+ namespace GitLanes {
276
+ // Signal signatures
277
+ interface SignalSignatures extends Gtk.Widget.SignalSignatures {
278
+ "notify::entry": (pspec: GObject.ParamSpec) => void;
279
+ "notify::can-focus": (pspec: GObject.ParamSpec) => void;
280
+ "notify::can-target": (pspec: GObject.ParamSpec) => void;
281
+ "notify::css-classes": (pspec: GObject.ParamSpec) => void;
282
+ "notify::css-name": (pspec: GObject.ParamSpec) => void;
283
+ "notify::cursor": (pspec: GObject.ParamSpec) => void;
284
+ "notify::focus-on-click": (pspec: GObject.ParamSpec) => void;
285
+ "notify::focusable": (pspec: GObject.ParamSpec) => void;
286
+ "notify::halign": (pspec: GObject.ParamSpec) => void;
287
+ "notify::has-default": (pspec: GObject.ParamSpec) => void;
288
+ "notify::has-focus": (pspec: GObject.ParamSpec) => void;
289
+ "notify::has-tooltip": (pspec: GObject.ParamSpec) => void;
290
+ "notify::height-request": (pspec: GObject.ParamSpec) => void;
291
+ "notify::hexpand": (pspec: GObject.ParamSpec) => void;
292
+ "notify::hexpand-set": (pspec: GObject.ParamSpec) => void;
293
+ "notify::layout-manager": (pspec: GObject.ParamSpec) => void;
294
+ "notify::limit-events": (pspec: GObject.ParamSpec) => void;
295
+ "notify::margin-bottom": (pspec: GObject.ParamSpec) => void;
296
+ "notify::margin-end": (pspec: GObject.ParamSpec) => void;
297
+ "notify::margin-start": (pspec: GObject.ParamSpec) => void;
298
+ "notify::margin-top": (pspec: GObject.ParamSpec) => void;
299
+ "notify::name": (pspec: GObject.ParamSpec) => void;
300
+ "notify::opacity": (pspec: GObject.ParamSpec) => void;
301
+ "notify::overflow": (pspec: GObject.ParamSpec) => void;
302
+ "notify::parent": (pspec: GObject.ParamSpec) => void;
303
+ "notify::receives-default": (pspec: GObject.ParamSpec) => void;
304
+ "notify::root": (pspec: GObject.ParamSpec) => void;
305
+ "notify::scale-factor": (pspec: GObject.ParamSpec) => void;
306
+ "notify::sensitive": (pspec: GObject.ParamSpec) => void;
307
+ "notify::tooltip-markup": (pspec: GObject.ParamSpec) => void;
308
+ "notify::tooltip-text": (pspec: GObject.ParamSpec) => void;
309
+ "notify::valign": (pspec: GObject.ParamSpec) => void;
310
+ "notify::vexpand": (pspec: GObject.ParamSpec) => void;
311
+ "notify::vexpand-set": (pspec: GObject.ParamSpec) => void;
312
+ "notify::visible": (pspec: GObject.ParamSpec) => void;
313
+ "notify::width-request": (pspec: GObject.ParamSpec) => void;
314
+ "notify::accessible-role": (pspec: GObject.ParamSpec) => void;
315
+ }
316
+
317
+ // Constructor properties interface
318
+ interface ConstructorProps extends Gtk.Widget.ConstructorProps, Gtk.Accessible.ConstructorProps, Gtk.Buildable.ConstructorProps, Gtk.ConstraintTarget.ConstructorProps {
319
+ entry: Foundry.VcsGraphEntry;
320
+ }
321
+ }
322
+
323
+ /**
324
+ * A widget that displays Git graph lanes for a {@link Foundry.VcsGraphEntry}.
325
+ * @gir-type Class
326
+ * @since 1.2
327
+ */
328
+ class GitLanes extends Gtk.Widget implements Gtk.Accessible, Gtk.Buildable, Gtk.ConstraintTarget {
329
+ static $gtype: GObject.GType<GitLanes>;
330
+
331
+ // Properties
332
+ /**
333
+ * The graph entry to render.
334
+ * @since 1.2
335
+ */
336
+ get entry(): Foundry.VcsGraphEntry;
337
+ set entry(val: Foundry.VcsGraphEntry);
338
+
339
+ /**
340
+ * Compile-time signal type information.
341
+ *
342
+ * This instance property is generated only for TypeScript type checking.
343
+ * It is not defined at runtime and should not be accessed in JS code.
344
+ * @internal
345
+ */
346
+ $signals: GitLanes.SignalSignatures;
347
+
348
+ // Constructors
349
+ constructor(properties?: Partial<GitLanes.ConstructorProps>, ...args: any[]);
350
+
351
+ _init(...args: any[]): void;
352
+
353
+ static ["new"](): GitLanes;
354
+
355
+ // Signals
356
+ /** @signal */
357
+ connect<K extends keyof GitLanes.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, GitLanes.SignalSignatures[K]>): number;
358
+ connect(signal: string, callback: (...args: any[]) => any): number;
359
+
360
+ /** @signal */
361
+ connect_after<K extends keyof GitLanes.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, GitLanes.SignalSignatures[K]>): number;
362
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
363
+
364
+ /** @signal */
365
+ emit<K extends keyof GitLanes.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<GitLanes.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
366
+ emit(signal: string, ...args: any[]): void;
367
+
368
+ // Methods
369
+ /**
370
+ * Gets the graph entry displayed by `self`.
371
+ * @returns a {@link Foundry.VcsGraphEntry}
372
+ */
373
+ dup_entry(): Foundry.VcsGraphEntry | null;
374
+
375
+ /**
376
+ * Sets the graph entry displayed by `self`.
377
+ * @param entry a {@link Foundry.VcsGraphEntry}
378
+ */
379
+ set_entry(entry: Foundry.VcsGraphEntry | null): void;
380
+
381
+ /**
382
+ * Sets the colors to use when drawing graph lanes.
383
+ *
384
+ * If `colors` is `null`, the default lane colors are used. When `colors` is not
385
+ * `null`, the colors are copied and `n_colors` must be greater than zero.
386
+ * @param colors the lane colors
387
+ */
388
+ set_lane_colors(colors: Gdk.RGBA[] | null): void;
389
+
390
+ /**
391
+ * The accessible role of the given {@link Gtk.Accessible} implementation.
392
+ *
393
+ * The accessible role cannot be changed once set.
394
+ * @default Gtk.AccessibleRole.NONE
395
+ * @category Inherited from Gtk.Accessible
396
+ */
397
+ get accessible_role(): Gtk.AccessibleRole;
398
+ set accessible_role(val: Gtk.AccessibleRole);
399
+
400
+ /**
401
+ * The accessible role of the given {@link Gtk.Accessible} implementation.
402
+ *
403
+ * The accessible role cannot be changed once set.
404
+ * @default Gtk.AccessibleRole.NONE
405
+ * @category Inherited from Gtk.Accessible
406
+ */
407
+ get accessibleRole(): Gtk.AccessibleRole;
408
+ set accessibleRole(val: Gtk.AccessibleRole);
409
+
410
+ /**
411
+ * Requests the user's screen reader to announce the given message.
412
+ *
413
+ * This kind of notification is useful for messages that
414
+ * either have only a visual representation or that are not
415
+ * exposed visually at all, e.g. a notification about a
416
+ * successful operation.
417
+ *
418
+ * Also, by using this API, you can ensure that the message
419
+ * does not interrupts the user's current screen reader output.
420
+ * @param message the string to announce
421
+ * @param priority the priority of the announcement
422
+ */
423
+ announce(message: string, priority: Gtk.AccessibleAnnouncementPriority): void;
424
+
425
+ /**
426
+ * Retrieves the accessible identifier for the accessible object.
427
+ *
428
+ * This functionality can be overridden by {@link Gtk.Accessible}
429
+ * implementations.
430
+ *
431
+ * It is left to the accessible implementation to define the scope
432
+ * and uniqueness of the identifier.
433
+ * @returns the accessible identifier
434
+ */
435
+ get_accessible_id(): string | null;
436
+
437
+ /**
438
+ * Retrieves the accessible parent for an accessible object.
439
+ *
440
+ * This function returns `NULL` for top level widgets.
441
+ * @returns the accessible parent
442
+ */
443
+ get_accessible_parent(): Gtk.Accessible | null;
444
+
445
+ /**
446
+ * Retrieves the accessible role of an accessible object.
447
+ * @returns the accessible role
448
+ */
449
+ get_accessible_role(): Gtk.AccessibleRole;
450
+
451
+ /**
452
+ * Retrieves the implementation for the given accessible object.
453
+ * @returns the accessible implementation object
454
+ */
455
+ get_at_context(): Gtk.ATContext;
456
+
457
+ /**
458
+ * Queries the coordinates and dimensions of this accessible
459
+ *
460
+ * This functionality can be overridden by {@link Gtk.Accessible}
461
+ * implementations, e.g. to get the bounds from an ignored
462
+ * child widget.
463
+ * @returns true if the bounds are valid, and false otherwise
464
+ */
465
+ get_bounds(): [boolean, number, number, number, number];
466
+
467
+ /**
468
+ * Retrieves the first accessible child of an accessible object.
469
+ * @returns the first accessible child
470
+ */
471
+ get_first_accessible_child(): Gtk.Accessible | null;
472
+
473
+ /**
474
+ * Retrieves the next accessible sibling of an accessible object
475
+ * @returns the next accessible sibling
476
+ */
477
+ get_next_accessible_sibling(): Gtk.Accessible | null;
478
+
479
+ /**
480
+ * Queries a platform state, such as focus.
481
+ *
482
+ * This functionality can be overridden by {@link Gtk.Accessible}
483
+ * implementations, e.g. to get platform state from an ignored
484
+ * child widget, as is the case for {@link Gtk.Text} wrappers.
485
+ * @param state platform state to query
486
+ * @returns the value of state for the accessible
487
+ */
488
+ get_platform_state(state: Gtk.AccessiblePlatformState): boolean;
489
+
490
+ /**
491
+ * Resets the accessible property to its default value.
492
+ * @param property the accessible property
493
+ */
494
+ reset_property(property: Gtk.AccessibleProperty): void;
495
+
496
+ /**
497
+ * Resets the accessible relation to its default value.
498
+ * @param relation the accessible relation
499
+ */
500
+ reset_relation(relation: Gtk.AccessibleRelation): void;
501
+
502
+ /**
503
+ * Resets the accessible state to its default value.
504
+ * @param state the accessible state
505
+ */
506
+ reset_state(state: Gtk.AccessibleState): void;
507
+
508
+ /**
509
+ * Sets the parent and sibling of an accessible object.
510
+ *
511
+ * This function is meant to be used by accessible implementations that are
512
+ * not part of the widget hierarchy, and but act as a logical bridge between
513
+ * widgets. For instance, if a widget creates an object that holds metadata
514
+ * for each child, and you want that object to implement the {@link Gtk.Accessible}
515
+ * interface, you will use this function to ensure that the parent of each
516
+ * child widget is the metadata object, and the parent of each metadata
517
+ * object is the container widget.
518
+ * @param parent the parent accessible object
519
+ * @param next_sibling the sibling accessible object
520
+ */
521
+ set_accessible_parent(parent: Gtk.Accessible | null, next_sibling: Gtk.Accessible | null): void;
522
+
523
+ /**
524
+ * Updates the next accessible sibling.
525
+ *
526
+ * That might be useful when a new child of a custom accessible
527
+ * is created, and it needs to be linked to a previous child.
528
+ * @param new_sibling the new next accessible sibling to set
529
+ */
530
+ update_next_accessible_sibling(new_sibling: Gtk.Accessible | null): void;
531
+
532
+ /**
533
+ * Informs ATs that the platform state has changed.
534
+ *
535
+ * This function should be used by {@link Gtk.Accessible} implementations that
536
+ * have a platform state but are not widgets. Widgets handle platform
537
+ * states automatically.
538
+ * @param state the platform state to update
539
+ */
540
+ update_platform_state(state: Gtk.AccessiblePlatformState): void;
541
+
542
+ /**
543
+ * Updates an array of accessible properties.
544
+ *
545
+ * This function should be called by {@link Gtk.Widget} types whenever an accessible
546
+ * property change must be communicated to assistive technologies.
547
+ *
548
+ * This function is meant to be used by language bindings.
549
+ * @param properties an array of accessible properties
550
+ * @param values an array of `GValues`, one for each property
551
+ */
552
+ update_property(properties: Gtk.AccessibleProperty[], values: (GObject.Value | any)[]): void;
553
+
554
+ /**
555
+ * Updates an array of accessible relations.
556
+ *
557
+ * This function should be called by {@link Gtk.Widget} types whenever an accessible
558
+ * relation change must be communicated to assistive technologies.
559
+ *
560
+ * This function is meant to be used by language bindings.
561
+ * @param relations an array of accessible relations
562
+ * @param values an array of `GValues`, one for each relation
563
+ */
564
+ update_relation(relations: Gtk.AccessibleRelation[], values: (GObject.Value | any)[]): void;
565
+
566
+ /**
567
+ * Updates an array of accessible states.
568
+ *
569
+ * This function should be called by {@link Gtk.Widget} types whenever an accessible
570
+ * state change must be communicated to assistive technologies.
571
+ *
572
+ * This function is meant to be used by language bindings.
573
+ * @param states an array of accessible states
574
+ * @param values an array of `GValues`, one for each state
575
+ */
576
+ update_state(states: Gtk.AccessibleState[], values: (GObject.Value | any)[]): void;
577
+
578
+ /**
579
+ * Retrieves the accessible identifier for the accessible object.
580
+ *
581
+ * This functionality can be overridden by {@link Gtk.Accessible}
582
+ * implementations.
583
+ *
584
+ * It is left to the accessible implementation to define the scope
585
+ * and uniqueness of the identifier.
586
+ * @virtual
587
+ */
588
+ vfunc_get_accessible_id(): string | null;
589
+
590
+ /**
591
+ * Retrieves the accessible parent for an accessible object.
592
+ *
593
+ * This function returns `NULL` for top level widgets.
594
+ * @virtual
595
+ */
596
+ vfunc_get_accessible_parent(): Gtk.Accessible | null;
597
+
598
+ /**
599
+ * Retrieves the implementation for the given accessible object.
600
+ * @virtual
601
+ */
602
+ vfunc_get_at_context(): Gtk.ATContext | null;
603
+
604
+ /**
605
+ * Queries the coordinates and dimensions of this accessible
606
+ *
607
+ * This functionality can be overridden by {@link Gtk.Accessible}
608
+ * implementations, e.g. to get the bounds from an ignored
609
+ * child widget.
610
+ * @virtual
611
+ */
612
+ vfunc_get_bounds(): [boolean, number, number, number, number];
613
+
614
+ /**
615
+ * Retrieves the first accessible child of an accessible object.
616
+ * @virtual
617
+ */
618
+ vfunc_get_first_accessible_child(): Gtk.Accessible | null;
619
+
620
+ /**
621
+ * Retrieves the next accessible sibling of an accessible object
622
+ * @virtual
623
+ */
624
+ vfunc_get_next_accessible_sibling(): Gtk.Accessible | null;
625
+
626
+ /**
627
+ * Queries a platform state, such as focus.
628
+ *
629
+ * This functionality can be overridden by {@link Gtk.Accessible}
630
+ * implementations, e.g. to get platform state from an ignored
631
+ * child widget, as is the case for {@link Gtk.Text} wrappers.
632
+ * @param state platform state to query
633
+ * @virtual
634
+ */
635
+ vfunc_get_platform_state(state: Gtk.AccessiblePlatformState): boolean;
636
+
637
+ /**
638
+ * Gets the ID of the `buildable` object.
639
+ *
640
+ * {@link Gtk.Builder} sets the name based on the ID attribute
641
+ * of the `<object>` tag used to construct the `buildable`.
642
+ * @returns the ID of the buildable object
643
+ */
644
+ get_buildable_id(): string | null;
645
+
646
+ /**
647
+ * Adds a child to `buildable`. `type` is an optional string
648
+ * describing how the child should be added.
649
+ * @param builder a {@link Gtk.Builder}
650
+ * @param child child to add
651
+ * @param type kind of child or `null`
652
+ * @virtual
653
+ */
654
+ vfunc_add_child(builder: Gtk.Builder, child: GObject.Object, type: string | null): void;
655
+
656
+ /**
657
+ * Similar to `gtk_buildable_parser_finished()` but is
658
+ * called once for each custom tag handled by the `buildable`.
659
+ * @param builder a {@link Gtk.Builder}
660
+ * @param child child object or `null` for non-child tags
661
+ * @param tagname the name of the tag
662
+ * @param data user data created in custom_tag_start
663
+ * @virtual
664
+ */
665
+ vfunc_custom_finished(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data: null): void;
666
+
667
+ /**
668
+ * Called at the end of each custom element handled by
669
+ * the buildable.
670
+ * @param builder {@link Gtk.Builder} used to construct this object
671
+ * @param child child object or `null` for non-child tags
672
+ * @param tagname name of tag
673
+ * @param data user data that will be passed in to parser functions
674
+ * @virtual
675
+ */
676
+ vfunc_custom_tag_end(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data: null): void;
677
+
678
+ /**
679
+ * Called for each unknown element under `<child>`.
680
+ * @param builder a {@link Gtk.Builder} used to construct this object
681
+ * @param child child object or `null` for non-child tags
682
+ * @param tagname name of tag
683
+ * @virtual
684
+ */
685
+ vfunc_custom_tag_start(builder: Gtk.Builder, child: GObject.Object | null, tagname: string): [boolean, Gtk.BuildableParser, never];
686
+
687
+ /**
688
+ * The getter corresponding to `set_id`. Implement this
689
+ * if you implement `set_id`.
690
+ * @virtual
691
+ */
692
+ vfunc_get_id(): string;
693
+
694
+ /**
695
+ * Retrieves the internal child called `childname` of the `buildable` object.
696
+ * @param builder a {@link Gtk.Builder}
697
+ * @param childname name of child
698
+ * @virtual
699
+ */
700
+ vfunc_get_internal_child<T = GObject.Object>(builder: Gtk.Builder, childname: string): T;
701
+
702
+ /**
703
+ * Called when a builder finishes the parsing
704
+ * of a UI definition. It is normally not necessary to implement this,
705
+ * unless you need to perform special cleanup actions. {@link Gtk.Window} sets
706
+ * the {@link Gtk.Widget.visible} property here.
707
+ * @param builder
708
+ * @virtual
709
+ */
710
+ vfunc_parser_finished(builder: Gtk.Builder): void;
711
+
712
+ /**
713
+ * Sets a property of a buildable object.
714
+ * It is normally not necessary to implement this, `g_object_set_property()`
715
+ * is used by default. {@link Gtk.Window} implements this to delay showing itself
716
+ * (i.e. setting the {@link Gtk.Widget.visible} property) until the whole
717
+ * interface is created.
718
+ * @param builder
719
+ * @param name
720
+ * @param value
721
+ * @virtual
722
+ */
723
+ vfunc_set_buildable_property(builder: Gtk.Builder, name: string, value: unknown): void;
724
+
725
+ /**
726
+ * Stores the id attribute given in the {@link Gtk.Builder} UI definition.
727
+ * {@link Gtk.Widget} stores the name as object data. Implement this method if your
728
+ * object has some notion of “ID” and it makes sense to map the XML id
729
+ * attribute to it.
730
+ * @param id
731
+ * @virtual
732
+ */
733
+ vfunc_set_id(id: string): void;
734
+ }
735
+
736
+
274
737
  namespace MarkupView {
275
738
  // Signal signatures
276
739
  interface SignalSignatures extends Gtk.Widget.SignalSignatures {
@@ -695,7 +1158,7 @@ export namespace FoundryGtk {
695
1158
  /**
696
1159
  * Stores the id attribute given in the {@link Gtk.Builder} UI definition.
697
1160
  * {@link Gtk.Widget} stores the name as object data. Implement this method if your
698
- * object has some notion of &#x201C;ID&#x201D; and it makes sense to map the XML id
1161
+ * object has some notion of ID and it makes sense to map the XML id
699
1162
  * attribute to it.
700
1163
  * @param id
701
1164
  * @virtual
@@ -1982,12 +2445,12 @@ export namespace FoundryGtk {
1982
2445
  namespace SourceViewAddin {
1983
2446
  // Signal signatures
1984
2447
  interface SignalSignatures extends GObject.Object.SignalSignatures {
1985
- "notify::vie": (pspec: GObject.ParamSpec) => void;
2448
+ "notify::view": (pspec: GObject.ParamSpec) => void;
1986
2449
  }
1987
2450
 
1988
2451
  // Constructor properties interface
1989
2452
  interface ConstructorProps extends GObject.Object.ConstructorProps {
1990
- vie: SourceView;
2453
+ view: SourceView | null;
1991
2454
  }
1992
2455
  }
1993
2456
 
@@ -2001,7 +2464,7 @@ export namespace FoundryGtk {
2001
2464
  /**
2002
2465
  * @read-only
2003
2466
  */
2004
- get vie(): SourceView;
2467
+ get view(): SourceView | null;
2005
2468
 
2006
2469
  /**
2007
2470
  * Compile-time signal type information.
@@ -2032,7 +2495,7 @@ export namespace FoundryGtk {
2032
2495
 
2033
2496
  // Methods
2034
2497
  /**
2035
- * Gets teh view for the addin.
2498
+ * Gets the view for the addin.
2036
2499
  *
2037
2500
  * This will always be `null` before load has been called and after
2038
2501
  * unload has been called.
@@ -2684,7 +3147,7 @@ export namespace FoundryGtk {
2684
3147
  /**
2685
3148
  * Stores the id attribute given in the {@link Gtk.Builder} UI definition.
2686
3149
  * {@link Gtk.Widget} stores the name as object data. Implement this method if your
2687
- * object has some notion of &#x201C;ID&#x201D; and it makes sense to map the XML id
3150
+ * object has some notion of ID and it makes sense to map the XML id
2688
3151
  * attribute to it.
2689
3152
  * @param id
2690
3153
  * @virtual
@@ -2926,6 +3389,11 @@ export namespace FoundryGtk {
2926
3389
  */
2927
3390
  type DiagnosticsGutterRendererClass = typeof DiagnosticsGutterRenderer;
2928
3391
 
3392
+ /**
3393
+ * @gir-type Alias
3394
+ */
3395
+ type GitLanesClass = typeof GitLanes;
3396
+
2929
3397
  /**
2930
3398
  * @gir-type Alias
2931
3399
  */
package/package.json CHANGED
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "name": "@girs/foundrygtk-1",
3
- "version": "4.1.0",
4
- "libraryVersion": "1.0.0",
5
- "description": "GJS TypeScript type definitions for FoundryGtk-1, generated from library version 1.0.0",
3
+ "version": "4.3.0",
4
+ "description": "GJS TypeScript type definitions for FoundryGtk-1",
6
5
  "type": "module",
7
6
  "module": "foundrygtk-1.js",
8
7
  "main": "foundrygtk-1.js",
@@ -17,6 +16,11 @@
17
16
  "import": "./foundrygtk-1-import.js",
18
17
  "default": "./foundrygtk-1-import.js"
19
18
  },
19
+ "./surface": {
20
+ "types": "./foundrygtk-1-surface.d.ts",
21
+ "import": "./foundrygtk-1-surface.js",
22
+ "default": "./foundrygtk-1-surface.js"
23
+ },
20
24
  "./foundrygtk-1": {
21
25
  "types": "./foundrygtk-1.d.ts",
22
26
  "import": "./foundrygtk-1.js",
@@ -32,26 +36,27 @@
32
36
  "test": "tsc --project tsconfig.json"
33
37
  },
34
38
  "dependencies": {
35
- "@girs/gjs": "^4.1.0",
36
- "@girs/peas-2": "^4.1.0",
37
- "@girs/gio-2.0": "^4.1.0",
38
- "@girs/gobject-2.0": "^4.1.0",
39
- "@girs/glib-2.0": "^4.1.0",
40
- "@girs/gmodule-2.0": "^4.1.0",
41
- "@girs/json-1.0": "^4.1.0",
42
- "@girs/gtksource-5": "^4.1.0",
43
- "@girs/gtk-4.0": "^4.1.0",
44
- "@girs/gsk-4.0": "^4.1.0",
45
- "@girs/graphene-1.0": "^4.1.0",
46
- "@girs/gdk-4.0": "^4.1.0",
47
- "@girs/cairo-1.0": "^4.1.0",
48
- "@girs/pangocairo-1.0": "^4.1.0",
49
- "@girs/pango-1.0": "^4.1.0",
50
- "@girs/harfbuzz-0.0": "^4.1.0",
51
- "@girs/freetype2-2.0": "^4.1.0",
52
- "@girs/gdkpixbuf-2.0": "^4.1.0",
53
- "@girs/foundry-1": "^4.1.0",
54
- "@girs/dex-1": "^4.1.0" },
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/json-1.0": "^4.3.0",
46
+ "@girs/gtksource-5": "^4.3.0",
47
+ "@girs/gtk-4.0": "^4.3.0",
48
+ "@girs/gsk-4.0": "^4.3.0",
49
+ "@girs/graphene-1.0": "^4.3.0",
50
+ "@girs/gdk-4.0": "^4.3.0",
51
+ "@girs/cairo-1.0": "^4.3.0",
52
+ "@girs/pangocairo-1.0": "^4.3.0",
53
+ "@girs/pango-1.0": "^4.3.0",
54
+ "@girs/harfbuzz-0.0": "^4.3.0",
55
+ "@girs/freetype2-2.0": "^4.3.0",
56
+ "@girs/gdkpixbuf-2.0": "^4.3.0",
57
+ "@girs/foundry-1": "^4.3.0",
58
+ "@girs/dex-1": "^4.3.0",
59
+ "@girs/giounix-2.0": "^4.3.0" },
55
60
  "devDependencies": {
56
61
  "typescript": "*"
57
62
  },
package/tsconfig.json CHANGED
@@ -75,12 +75,15 @@
75
75
  "@girs/dex-1": [
76
76
  "../dex-1/index.d.ts"
77
77
  ],
78
+ "@girs/giounix-2.0": [
79
+ "../giounix-2.0/index.d.ts"
80
+ ],
78
81
  "@girs/gjs": [
79
82
  "../gjs/index.d.ts"
80
83
  ]
81
84
  }
82
85
  },
83
- "include": ["./foundrygtk-1.d.ts"]
86
+ "include": ["./foundrygtk-1.d.ts","./foundrygtk-1-surface.d.ts"]
84
87
  }
85
88
 
86
89