@girs/gtksource-3.0 4.4.0 → 4.6.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/gtksource-3.0-vocabulary.d.ts +312 -0
- package/gtksource-3.0-vocabulary.js +77 -0
- package/gtksource-3.0.d.ts +119 -78
- package/package.json +19 -19
- 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 GtkSource-3.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.6.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/gtksource-3.0
|
|
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/gtksource-3.0` | the namespace as a default export, plus the ambient and global declarations |
|
|
26
|
+
| `@girs/gtksource-3.0/ambient` | only the `gi://` module declarations |
|
|
27
|
+
| `@girs/gtksource-3.0/import` | only the `imports.gi` declarations |
|
|
28
|
+
| `@girs/gtksource-3.0/gtksource-3.0` | the namespace, without the side-effecting declarations |
|
|
29
|
+
| `@girs/gtksource-3.0/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 GtkSource from '@girs/gtksource-3.0';
|
|
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/gtksource-3.0'
|
|
47
|
+
import '@girs/gtksource-3.0';
|
|
32
48
|
```
|
|
33
49
|
|
|
34
|
-
`tsconfig.json`:
|
|
35
50
|
```json
|
|
36
|
-
{
|
|
37
|
-
"compilerOptions": {
|
|
38
|
-
...
|
|
39
|
-
},
|
|
40
|
-
"include": ["@girs/gtksource-3.0"],
|
|
41
|
-
...
|
|
42
|
-
}
|
|
51
|
+
{ "include": ["@girs/gtksource-3.0"] }
|
|
43
52
|
```
|
|
44
53
|
|
|
45
|
-
|
|
54
|
+
Then the runtime spelling type-checks:
|
|
46
55
|
|
|
47
56
|
```ts
|
|
48
57
|
import GtkSource from 'gi://GtkSource?version=3.0';
|
|
49
58
|
```
|
|
50
59
|
|
|
51
|
-
|
|
60
|
+
Referencing `@girs/gtksource-3.0/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/gtksource-3.0` or `@girs/gtksource-3.0/import` in your `tsconfig` or entry point Typescript file:
|
|
65
|
+
GJS's global object works the same way, via `@girs/gtksource-3.0/import`:
|
|
55
66
|
|
|
56
|
-
`index.ts`:
|
|
57
67
|
```ts
|
|
58
|
-
|
|
68
|
+
const GtkSource = imports.gi.GtkSource;
|
|
59
69
|
```
|
|
60
70
|
|
|
61
|
-
|
|
62
|
-
```json
|
|
63
|
-
{
|
|
64
|
-
"compilerOptions": {
|
|
65
|
-
...
|
|
66
|
-
},
|
|
67
|
-
"include": ["@girs/gtksource-3.0"],
|
|
68
|
-
...
|
|
69
|
-
}
|
|
70
|
-
```
|
|
71
|
+
## Widget vocabulary
|
|
71
72
|
|
|
72
|
-
|
|
73
|
+
`gtksource-3.0` 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/gtksource-3.0/vocabulary';
|
|
78
|
+
import { OWN_PROPS, ENUM_NICKS, PROVENANCE } from '@girs/gtksource-3.0/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
|
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The GIR-derived widget VOCABULARY for GtkSource-3.0.
|
|
3
|
+
*
|
|
4
|
+
* GENERATED — do not edit. Provenance: GtkSource-3.0 — dropped empty base(s): GObject.InitiallyUnowned GObject.Object Atk.ImplementorIface
|
|
5
|
+
*
|
|
6
|
+
* 5 concrete widgets, 6 declarations, 8 enum nick unions, 2 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 GtkSource from './gtksource-3.0.js';
|
|
28
|
+
import type Pango from '@girs/pango-1.0';
|
|
29
|
+
import type { GtkActionableConstructOnly, GtkActionableProps, GtkActivatableConstructOnly, GtkActivatableProps, GtkBinConstructOnly, GtkBinProps, GtkBuildableConstructOnly, GtkBuildableProps, GtkButtonConstructOnly, GtkButtonProps, GtkContainerConstructOnly, GtkContainerProps, GtkScrollableConstructOnly, GtkScrollableProps, GtkTextViewConstructOnly, GtkTextViewProps, GtkWidgetConstructOnly, GtkWidgetProps, GtkWindowConstructOnly, GtkWindowProps } from '@girs/gtk-3.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
|
+
export type GtkSourceBackgroundPatternTypeNick = 'none' | 'grid';
|
|
42
|
+
export type GtkSourceBracketMatchTypeNick = 'none' | 'out-of-range' | 'not-found' | 'found';
|
|
43
|
+
export type GtkSourceChangeCaseTypeNick = 'lower' | 'upper' | 'toggle' | 'title';
|
|
44
|
+
export type GtkSourceCompressionTypeNick = 'none' | 'gzip';
|
|
45
|
+
export type GtkSourceGutterRendererAlignmentModeNick = 'cell' | 'first' | 'last';
|
|
46
|
+
export type GtkSourceNewlineTypeNick = 'lf' | 'cr' | 'cr-lf';
|
|
47
|
+
export type GtkSourceSmartHomeEndTypeNick = 'disabled' | 'before' | 'after' | 'always';
|
|
48
|
+
export type GtkSourceViewGutterPositionNick = 'lines' | 'marks';
|
|
49
|
+
|
|
50
|
+
// ---------------------------------------------------------------------------
|
|
51
|
+
// Property surfaces — one interface per GIR DECLARATION, mirroring GIR's own
|
|
52
|
+
// inheritance rather than flattening per widget.
|
|
53
|
+
//
|
|
54
|
+
// The interfaces are load-bearing, not tidiness: `GtkBox` declares four properties
|
|
55
|
+
// of its own and `orientation` is not among them — it lives on `Gtk.Orientable`,
|
|
56
|
+
// because GObject installs interface properties on the implementor at runtime while
|
|
57
|
+
// GIR keeps them once, on the interface.
|
|
58
|
+
// ---------------------------------------------------------------------------
|
|
59
|
+
|
|
60
|
+
export interface GtkSourceCompletionInfoProps extends GtkWindowProps, GtkBuildableProps {
|
|
61
|
+
}
|
|
62
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
63
|
+
export type GtkSourceCompletionInfoConstructOnly = GtkWindowConstructOnly | GtkBuildableConstructOnly;
|
|
64
|
+
|
|
65
|
+
export interface GtkSourceMapProps extends GtkSourceViewProps, GtkBuildableProps, GtkScrollableProps {
|
|
66
|
+
'font-desc'?: Pango.FontDescription;
|
|
67
|
+
view?: GtkSource.View | null;
|
|
68
|
+
}
|
|
69
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
70
|
+
export type GtkSourceMapConstructOnly = GtkSourceViewConstructOnly | GtkBuildableConstructOnly | GtkScrollableConstructOnly;
|
|
71
|
+
|
|
72
|
+
export interface GtkSourceStyleSchemeChooserProps {
|
|
73
|
+
/**
|
|
74
|
+
* The :style-scheme property contains the currently selected style scheme.
|
|
75
|
+
* @since 3.16
|
|
76
|
+
*/
|
|
77
|
+
'style-scheme'?: GtkSource.StyleScheme;
|
|
78
|
+
}
|
|
79
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
80
|
+
export type GtkSourceStyleSchemeChooserConstructOnly = never;
|
|
81
|
+
|
|
82
|
+
export interface GtkSourceStyleSchemeChooserButtonProps extends GtkButtonProps, GtkActionableProps, GtkActivatableProps, GtkBuildableProps, GtkSourceStyleSchemeChooserProps {
|
|
83
|
+
}
|
|
84
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
85
|
+
export type GtkSourceStyleSchemeChooserButtonConstructOnly = GtkButtonConstructOnly | GtkActionableConstructOnly | GtkActivatableConstructOnly | GtkBuildableConstructOnly | GtkSourceStyleSchemeChooserConstructOnly;
|
|
86
|
+
|
|
87
|
+
export interface GtkSourceStyleSchemeChooserWidgetProps extends GtkBinProps, GtkBuildableProps, GtkSourceStyleSchemeChooserProps {
|
|
88
|
+
}
|
|
89
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
90
|
+
export type GtkSourceStyleSchemeChooserWidgetConstructOnly = GtkBinConstructOnly | GtkBuildableConstructOnly | GtkSourceStyleSchemeChooserConstructOnly;
|
|
91
|
+
|
|
92
|
+
export interface GtkSourceViewProps extends GtkTextViewProps, GtkBuildableProps, GtkScrollableProps {
|
|
93
|
+
/** @default FALSE */
|
|
94
|
+
'auto-indent'?: boolean;
|
|
95
|
+
/**
|
|
96
|
+
* Draw a specific background pattern on the view.
|
|
97
|
+
* @since 3.16
|
|
98
|
+
* @default GTK_SOURCE_BACKGROUND_PATTERN_TYPE_NONE
|
|
99
|
+
*/
|
|
100
|
+
'background-pattern'?: GtkSourceBackgroundPatternTypeNick | GtkSource.BackgroundPatternType;
|
|
101
|
+
/**
|
|
102
|
+
* Set if and how the spaces should be visualized.
|
|
103
|
+
* @since 2.4
|
|
104
|
+
* @default 0
|
|
105
|
+
* @deprecated since 3.24: Use the #GtkSourceSpaceDrawer:matrix property instead.
|
|
106
|
+
*/
|
|
107
|
+
'draw-spaces'?: number;
|
|
108
|
+
/** @default FALSE */
|
|
109
|
+
'highlight-current-line'?: boolean;
|
|
110
|
+
/** @default TRUE */
|
|
111
|
+
'indent-on-tab'?: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Width of an indentation step expressed in number of spaces.
|
|
114
|
+
* @default -1
|
|
115
|
+
*/
|
|
116
|
+
'indent-width'?: number;
|
|
117
|
+
/** @default FALSE */
|
|
118
|
+
'insert-spaces-instead-of-tabs'?: boolean;
|
|
119
|
+
/**
|
|
120
|
+
* Position of the right margin.
|
|
121
|
+
* @default 80
|
|
122
|
+
*/
|
|
123
|
+
'right-margin-position'?: number;
|
|
124
|
+
/**
|
|
125
|
+
* Whether to display line mark pixbufs
|
|
126
|
+
* @default FALSE
|
|
127
|
+
*/
|
|
128
|
+
'show-line-marks'?: boolean;
|
|
129
|
+
/**
|
|
130
|
+
* Whether to display line numbers
|
|
131
|
+
* @default FALSE
|
|
132
|
+
*/
|
|
133
|
+
'show-line-numbers'?: boolean;
|
|
134
|
+
/**
|
|
135
|
+
* Whether to display the right margin.
|
|
136
|
+
* @default FALSE
|
|
137
|
+
*/
|
|
138
|
+
'show-right-margin'?: boolean;
|
|
139
|
+
/**
|
|
140
|
+
* Whether smart Backspace should be used.
|
|
141
|
+
* @since 3.18
|
|
142
|
+
* @default FALSE
|
|
143
|
+
*/
|
|
144
|
+
'smart-backspace'?: boolean;
|
|
145
|
+
/**
|
|
146
|
+
* Set the behavior of the HOME and END keys.
|
|
147
|
+
* @since 2.0
|
|
148
|
+
* @default GTK_SOURCE_SMART_HOME_END_DISABLED
|
|
149
|
+
*/
|
|
150
|
+
'smart-home-end'?: GtkSourceSmartHomeEndTypeNick | GtkSource.SmartHomeEndType;
|
|
151
|
+
/**
|
|
152
|
+
* Width of a tab character expressed in number of spaces.
|
|
153
|
+
* @default 8
|
|
154
|
+
*/
|
|
155
|
+
'tab-width'?: number;
|
|
156
|
+
}
|
|
157
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
158
|
+
export type GtkSourceViewConstructOnly = GtkTextViewConstructOnly | GtkBuildableConstructOnly | GtkScrollableConstructOnly;
|
|
159
|
+
|
|
160
|
+
// ---------------------------------------------------------------------------
|
|
161
|
+
// The GType-keyed widget map.
|
|
162
|
+
//
|
|
163
|
+
// Keyed by GType because that is also the GtkBuilder XML key and the typelib key. A
|
|
164
|
+
// consumer maps GTypes to tags in ITS convention — kebab for JSX intrinsics, Pascal
|
|
165
|
+
// for a Vue `GlobalComponents`, the class itself for a renderer whose element type
|
|
166
|
+
// is the class. None of those is baked in here.
|
|
167
|
+
//
|
|
168
|
+
// `slotCandidates` is a candidate list and never an answer: derived from methods
|
|
169
|
+
// taking exactly one widget argument. The GIR cannot tell adoption from reference —
|
|
170
|
+
// `set_title_widget` parents its argument and `set_activatable_widget` does not, and
|
|
171
|
+
// both are `void f(GtkWidget*)` at `transfer-ownership="none"`. Curation decides;
|
|
172
|
+
// this is what notices when a release adds a candidate.
|
|
173
|
+
// ---------------------------------------------------------------------------
|
|
174
|
+
|
|
175
|
+
export interface Widgets {
|
|
176
|
+
GtkSourceCompletionInfo: {
|
|
177
|
+
class: GtkSource.CompletionInfo;
|
|
178
|
+
props: GtkSourceCompletionInfoProps;
|
|
179
|
+
signals: GtkSource.CompletionInfo.SignalSignatures;
|
|
180
|
+
constructOnly: GtkSourceCompletionInfoConstructOnly;
|
|
181
|
+
slotCandidates: {
|
|
182
|
+
'widget': 'set_widget';
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
GtkSourceMap: {
|
|
186
|
+
class: GtkSource.Map;
|
|
187
|
+
props: GtkSourceMapProps;
|
|
188
|
+
signals: GtkSource.Map.SignalSignatures;
|
|
189
|
+
constructOnly: GtkSourceMapConstructOnly;
|
|
190
|
+
slotCandidates: {
|
|
191
|
+
'view': 'set_view';
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
GtkSourceStyleSchemeChooserButton: {
|
|
195
|
+
class: GtkSource.StyleSchemeChooserButton;
|
|
196
|
+
props: GtkSourceStyleSchemeChooserButtonProps;
|
|
197
|
+
signals: GtkSource.StyleSchemeChooserButton.SignalSignatures;
|
|
198
|
+
constructOnly: GtkSourceStyleSchemeChooserButtonConstructOnly;
|
|
199
|
+
slotCandidates: {};
|
|
200
|
+
};
|
|
201
|
+
GtkSourceStyleSchemeChooserWidget: {
|
|
202
|
+
class: GtkSource.StyleSchemeChooserWidget;
|
|
203
|
+
props: GtkSourceStyleSchemeChooserWidgetProps;
|
|
204
|
+
signals: GtkSource.StyleSchemeChooserWidget.SignalSignatures;
|
|
205
|
+
constructOnly: GtkSourceStyleSchemeChooserWidgetConstructOnly;
|
|
206
|
+
slotCandidates: {};
|
|
207
|
+
};
|
|
208
|
+
GtkSourceView: {
|
|
209
|
+
class: GtkSource.View;
|
|
210
|
+
props: GtkSourceViewProps;
|
|
211
|
+
signals: GtkSource.View.SignalSignatures;
|
|
212
|
+
constructOnly: GtkSourceViewConstructOnly;
|
|
213
|
+
slotCandidates: {};
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/** Every GType this namespace can create. A consumer derives its own tag map. */
|
|
218
|
+
export type WidgetGType = keyof Widgets;
|
|
219
|
+
|
|
220
|
+
// ---------------------------------------------------------------------------
|
|
221
|
+
// Child holders — the same shape, for objects that CARRY a widget without being one.
|
|
222
|
+
//
|
|
223
|
+
// `GtkListItem`, `GtkListHeader`, `GtkColumnViewCell` and `AdwToggle` descend from
|
|
224
|
+
// `GObject.Object` and hold a widget through `set_child`/`get_child`. A renderer places
|
|
225
|
+
// them exactly like a container, so they belong in the vocabulary; a check asking "is
|
|
226
|
+
// this a widget" must still be able to say no. Hence a sibling table rather than four
|
|
227
|
+
// more rows in `Widgets`: concatenate them when you mean both.
|
|
228
|
+
// ---------------------------------------------------------------------------
|
|
229
|
+
|
|
230
|
+
export interface ChildHolders {
|
|
231
|
+
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/** Every GType this namespace holds a child in without it being a widget. */
|
|
235
|
+
export type ChildHolderGType = keyof ChildHolders;
|
|
236
|
+
|
|
237
|
+
/** The writable, optional, GObject-keyed property surface of one GType. */
|
|
238
|
+
export type PropsOf<G extends WidgetGType> = Widgets[G]['props'];
|
|
239
|
+
|
|
240
|
+
/** The signal table this package already emits, reached by GType. */
|
|
241
|
+
export type SignalsOf<G extends WidgetGType> = Widgets[G]['signals'];
|
|
242
|
+
|
|
243
|
+
/** The instance type — what a `ref`-shaped prop should infer. */
|
|
244
|
+
export type InstanceOf<G extends WidgetGType> = Widgets[G]['class'];
|
|
245
|
+
|
|
246
|
+
/** Property names that can only be set at construction. */
|
|
247
|
+
export type ConstructOnlyOf<G extends WidgetGType> = Widgets[G]['constructOnly'];
|
|
248
|
+
|
|
249
|
+
/** Candidate child slots — see the note above; curation decides. */
|
|
250
|
+
export type SlotCandidatesOf<G extends WidgetGType> = keyof Widgets[G]['slotCandidates'];
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* The same facts as runtime data, for a consumer that CHECKS them.
|
|
254
|
+
*
|
|
255
|
+
* Types are erased, so a spec that asks the installed GTK whether every property
|
|
256
|
+
* here is a writable ParamSpec, every signal resolvable by `GObject.signal_lookup`
|
|
257
|
+
* and every nick resolvable through an enum lookup cannot read the interfaces
|
|
258
|
+
* above. Emitted headlessly with no GTK present, which is exactly why the checking
|
|
259
|
+
* belongs to the consumer and the DATA belongs here.
|
|
260
|
+
*/
|
|
261
|
+
export const PROVENANCE: {
|
|
262
|
+
readonly namespace: string;
|
|
263
|
+
readonly version: string;
|
|
264
|
+
/** The version the LIBRARY states, or null where it states none. Never the namespace's. */
|
|
265
|
+
readonly libraryVersion: string | null;
|
|
266
|
+
readonly childHolders: number;
|
|
267
|
+
readonly droppedBases: readonly string[];
|
|
268
|
+
readonly inlinedBases: readonly string[];
|
|
269
|
+
readonly unsettableProps: readonly string[];
|
|
270
|
+
};
|
|
271
|
+
|
|
272
|
+
/** Declaration GType -> its own settable properties, as GObject registered them. */
|
|
273
|
+
export const OWN_PROPS: Readonly<Record<string, readonly string[]>>;
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* Declaration GType -> the signals it registers itself, never its parents'.
|
|
277
|
+
*
|
|
278
|
+
* Keyed like `OWN_PROPS`, so both are read at every link of a `DECLS` chain. An
|
|
279
|
+
* abstract base has no `Widgets` row and still owns signals — `GtkWidget` owns 13.
|
|
280
|
+
*/
|
|
281
|
+
export const OWN_SIGNALS: Readonly<Record<string, readonly string[]>>;
|
|
282
|
+
|
|
283
|
+
/** Widget GType -> every declaration its members come from, self first. */
|
|
284
|
+
export const DECLS: Readonly<Record<string, readonly string[]>>;
|
|
285
|
+
|
|
286
|
+
/** The GTypes in `DECLS` that hold a widget without being one — see `ChildHolders`. */
|
|
287
|
+
export const CHILD_HOLDERS: readonly string[];
|
|
288
|
+
|
|
289
|
+
/** Enum GType -> the nicks this surface offers. */
|
|
290
|
+
export const ENUM_NICKS: Readonly<Record<string, readonly string[]>>;
|
|
291
|
+
|
|
292
|
+
/** Widget GType -> slot name -> the method that may adopt a child there. */
|
|
293
|
+
export const SLOT_CANDIDATES: Readonly<Record<string, Readonly<Record<string, string>>>>;
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* `Type`, `Type.property` and `Type::signal` -> the release that introduced it.
|
|
297
|
+
*
|
|
298
|
+
* What keeps a runtime cross-check honest across a version gap without an
|
|
299
|
+
* allowlist: a name the installed library lacks is a defect UNLESS the version
|
|
300
|
+
* here is newer than the one running.
|
|
301
|
+
*
|
|
302
|
+
* ALL THREE key shapes, because that test only works for the names it covers. A
|
|
303
|
+
* property-only map leaves a consumer no way to explain a missing SIGNAL, which is
|
|
304
|
+
* a correct vocabulary reported as 18 defects; a member-only map leaves it no way to
|
|
305
|
+
* explain a missing CLASS, and that one fails as a bare
|
|
306
|
+
* `TypeError: can't access property "$gtype", ctor() is undefined` that does not
|
|
307
|
+
* even name the GType.
|
|
308
|
+
*
|
|
309
|
+
* A key is present only where the GIR states a version — sparse by nature (`version`
|
|
310
|
+
* sits on 29 of the 301 classes and interfaces in Gtk-4.0), never inferred.
|
|
311
|
+
*/
|
|
312
|
+
export const SINCE: Readonly<Record<string, string>>;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// The widget vocabulary of GtkSource-3.0 as runtime data.
|
|
2
|
+
//
|
|
3
|
+
// GENERATED — do not edit. Provenance: GtkSource-3.0 — dropped empty base(s): GObject.InitiallyUnowned GObject.Object Atk.ImplementorIface
|
|
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: 'GtkSource',
|
|
11
|
+
version: '3.0',
|
|
12
|
+
libraryVersion: null,
|
|
13
|
+
childHolders: 0,
|
|
14
|
+
droppedBases: ['GObject.InitiallyUnowned', 'GObject.Object', 'Atk.ImplementorIface'],
|
|
15
|
+
inlinedBases: [],
|
|
16
|
+
unsettableProps: [],
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const OWN_PROPS = {
|
|
20
|
+
GtkSourceMap: ['font-desc', 'view'],
|
|
21
|
+
GtkSourceStyleSchemeChooser: ['style-scheme'],
|
|
22
|
+
GtkSourceView: ['auto-indent', 'background-pattern', 'draw-spaces', 'highlight-current-line', 'indent-on-tab', 'indent-width', 'insert-spaces-instead-of-tabs', 'right-margin-position', 'show-line-marks', 'show-line-numbers', 'show-right-margin', 'smart-backspace', 'smart-home-end', 'tab-width'],
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const OWN_SIGNALS = {
|
|
26
|
+
GtkSourceCompletionInfo: ['before-show'],
|
|
27
|
+
GtkSourceView: ['change-case', 'change-number', 'join-lines', 'line-mark-activated', 'move-lines', 'move-to-matching-bracket', 'move-words', 'redo', 'show-completion', 'smart-home-end', 'undo'],
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export const DECLS = {
|
|
31
|
+
GtkSourceCompletionInfo: ['GtkSourceCompletionInfo', 'GtkWindow', 'GtkBin', 'GtkContainer', 'GtkWidget', 'GtkBuildable'],
|
|
32
|
+
GtkSourceMap: ['GtkSourceMap', 'GtkSourceView', 'GtkTextView', 'GtkContainer', 'GtkWidget', 'GtkBuildable', 'GtkScrollable'],
|
|
33
|
+
GtkSourceStyleSchemeChooserButton: ['GtkSourceStyleSchemeChooserButton', 'GtkButton', 'GtkBin', 'GtkContainer', 'GtkWidget', 'GtkActionable', 'GtkActivatable', 'GtkBuildable', 'GtkSourceStyleSchemeChooser'],
|
|
34
|
+
GtkSourceStyleSchemeChooserWidget: ['GtkSourceStyleSchemeChooserWidget', 'GtkBin', 'GtkContainer', 'GtkWidget', 'GtkBuildable', 'GtkSourceStyleSchemeChooser'],
|
|
35
|
+
GtkSourceView: ['GtkSourceView', 'GtkTextView', 'GtkContainer', 'GtkWidget', 'GtkBuildable', 'GtkScrollable'],
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
// The GTypes above that are NOT widgets: they hold one through `set_child`/`get_child`
|
|
39
|
+
// and descend from `GObject.Object`. A renderer places them like a container; a check
|
|
40
|
+
// asking "is this a widget" must not count them. Derived from the accessor pair, never
|
|
41
|
+
// from a list — the count is in the provenance line above.
|
|
42
|
+
export const CHILD_HOLDERS = [];
|
|
43
|
+
|
|
44
|
+
export const ENUM_NICKS = {
|
|
45
|
+
GtkSourceBackgroundPatternType: ['none', 'grid'],
|
|
46
|
+
GtkSourceBracketMatchType: ['none', 'out-of-range', 'not-found', 'found'],
|
|
47
|
+
GtkSourceChangeCaseType: ['lower', 'upper', 'toggle', 'title'],
|
|
48
|
+
GtkSourceCompressionType: ['none', 'gzip'],
|
|
49
|
+
GtkSourceGutterRendererAlignmentMode: ['cell', 'first', 'last'],
|
|
50
|
+
GtkSourceNewlineType: ['lf', 'cr', 'cr-lf'],
|
|
51
|
+
GtkSourceSmartHomeEndType: ['disabled', 'before', 'after', 'always'],
|
|
52
|
+
GtkSourceViewGutterPosition: ['lines', 'marks'],
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export const SLOT_CANDIDATES = {
|
|
56
|
+
GtkSourceCompletionInfo: {
|
|
57
|
+
'widget': 'set_widget',
|
|
58
|
+
},
|
|
59
|
+
GtkSourceMap: {
|
|
60
|
+
'view': 'set_view',
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export const SINCE = {
|
|
65
|
+
'GtkSourceStyleSchemeChooser.style-scheme': '3.16',
|
|
66
|
+
'GtkSourceView.background-pattern': '3.16',
|
|
67
|
+
'GtkSourceView.draw-spaces': '2.4',
|
|
68
|
+
'GtkSourceView.smart-backspace': '3.18',
|
|
69
|
+
'GtkSourceView.smart-home-end': '2.0',
|
|
70
|
+
'GtkSourceView::change-case': '3.16',
|
|
71
|
+
'GtkSourceView::change-number': '3.16',
|
|
72
|
+
'GtkSourceView::join-lines': '3.16',
|
|
73
|
+
'GtkSourceView::move-lines': '2.10',
|
|
74
|
+
'GtkSourceView::move-to-matching-bracket': '3.16',
|
|
75
|
+
'GtkSourceView::move-words': '3.0',
|
|
76
|
+
'GtkSourceView::smart-home-end': '3.0',
|
|
77
|
+
};
|
package/gtksource-3.0.d.ts
CHANGED
|
@@ -47,11 +47,11 @@ export namespace GtkSource {
|
|
|
47
47
|
/**
|
|
48
48
|
* no pattern
|
|
49
49
|
*/
|
|
50
|
-
NONE,
|
|
50
|
+
NONE = 0,
|
|
51
51
|
/**
|
|
52
52
|
* grid pattern
|
|
53
53
|
*/
|
|
54
|
-
GRID,
|
|
54
|
+
GRID = 1,
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
|
|
@@ -69,20 +69,20 @@ export namespace GtkSource {
|
|
|
69
69
|
/**
|
|
70
70
|
* there is no bracket to match.
|
|
71
71
|
*/
|
|
72
|
-
NONE,
|
|
72
|
+
NONE = 0,
|
|
73
73
|
/**
|
|
74
74
|
* matching a bracket
|
|
75
75
|
* failed because the maximum range was reached.
|
|
76
76
|
*/
|
|
77
|
-
OUT_OF_RANGE,
|
|
77
|
+
OUT_OF_RANGE = 1,
|
|
78
78
|
/**
|
|
79
79
|
* a matching bracket was not found.
|
|
80
80
|
*/
|
|
81
|
-
NOT_FOUND,
|
|
81
|
+
NOT_FOUND = 2,
|
|
82
82
|
/**
|
|
83
83
|
* a matching bracket was found.
|
|
84
84
|
*/
|
|
85
|
-
FOUND,
|
|
85
|
+
FOUND = 3,
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
|
|
@@ -101,19 +101,19 @@ export namespace GtkSource {
|
|
|
101
101
|
/**
|
|
102
102
|
* change case to lowercase.
|
|
103
103
|
*/
|
|
104
|
-
LOWER,
|
|
104
|
+
LOWER = 0,
|
|
105
105
|
/**
|
|
106
106
|
* change case to uppercase.
|
|
107
107
|
*/
|
|
108
|
-
UPPER,
|
|
108
|
+
UPPER = 1,
|
|
109
109
|
/**
|
|
110
110
|
* toggle case of each character.
|
|
111
111
|
*/
|
|
112
|
-
TOGGLE,
|
|
112
|
+
TOGGLE = 2,
|
|
113
113
|
/**
|
|
114
114
|
* capitalize each word.
|
|
115
115
|
*/
|
|
116
|
-
TITLE,
|
|
116
|
+
TITLE = 3,
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
|
|
@@ -161,11 +161,11 @@ export namespace GtkSource {
|
|
|
161
161
|
/**
|
|
162
162
|
* plain text.
|
|
163
163
|
*/
|
|
164
|
-
NONE,
|
|
164
|
+
NONE = 0,
|
|
165
165
|
/**
|
|
166
166
|
* gzip compression.
|
|
167
167
|
*/
|
|
168
|
-
GZIP,
|
|
168
|
+
GZIP = 1,
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
|
|
@@ -246,15 +246,15 @@ export namespace GtkSource {
|
|
|
246
246
|
/**
|
|
247
247
|
* The full cell.
|
|
248
248
|
*/
|
|
249
|
-
CELL,
|
|
249
|
+
CELL = 0,
|
|
250
250
|
/**
|
|
251
251
|
* The first line.
|
|
252
252
|
*/
|
|
253
|
-
FIRST,
|
|
253
|
+
FIRST = 1,
|
|
254
254
|
/**
|
|
255
255
|
* The last line.
|
|
256
256
|
*/
|
|
257
|
-
LAST,
|
|
257
|
+
LAST = 2,
|
|
258
258
|
}
|
|
259
259
|
|
|
260
260
|
|
|
@@ -273,16 +273,16 @@ export namespace GtkSource {
|
|
|
273
273
|
/**
|
|
274
274
|
* line feed, used on UNIX.
|
|
275
275
|
*/
|
|
276
|
-
LF,
|
|
276
|
+
LF = 0,
|
|
277
277
|
/**
|
|
278
278
|
* carriage return, used on Mac.
|
|
279
279
|
*/
|
|
280
|
-
CR,
|
|
280
|
+
CR = 1,
|
|
281
281
|
/**
|
|
282
282
|
* carriage return followed by a line feed, used
|
|
283
283
|
* on Windows.
|
|
284
284
|
*/
|
|
285
|
-
CR_LF,
|
|
285
|
+
CR_LF = 2,
|
|
286
286
|
}
|
|
287
287
|
|
|
288
288
|
|
|
@@ -300,24 +300,24 @@ export namespace GtkSource {
|
|
|
300
300
|
/**
|
|
301
301
|
* smart-home-end disabled.
|
|
302
302
|
*/
|
|
303
|
-
DISABLED,
|
|
303
|
+
DISABLED = 0,
|
|
304
304
|
/**
|
|
305
305
|
* move to the first/last
|
|
306
306
|
* non-whitespace character on the first press of the HOME/END keys and
|
|
307
307
|
* to the beginning/end of the line on the second press.
|
|
308
308
|
*/
|
|
309
|
-
BEFORE,
|
|
309
|
+
BEFORE = 1,
|
|
310
310
|
/**
|
|
311
311
|
* move to the beginning/end of the
|
|
312
312
|
* line on the first press of the HOME/END keys and to the first/last
|
|
313
313
|
* non-whitespace character on the second press.
|
|
314
314
|
*/
|
|
315
|
-
AFTER,
|
|
315
|
+
AFTER = 2,
|
|
316
316
|
/**
|
|
317
317
|
* always move to the first/last
|
|
318
318
|
* non-whitespace character when the HOME/END keys are pressed.
|
|
319
319
|
*/
|
|
320
|
-
ALWAYS,
|
|
320
|
+
ALWAYS = 3,
|
|
321
321
|
}
|
|
322
322
|
|
|
323
323
|
|
|
@@ -336,12 +336,12 @@ export namespace GtkSource {
|
|
|
336
336
|
* the gutter position of the lines
|
|
337
337
|
* renderer
|
|
338
338
|
*/
|
|
339
|
-
LINES,
|
|
339
|
+
LINES = -30,
|
|
340
340
|
/**
|
|
341
341
|
* the gutter position of the marks
|
|
342
342
|
* renderer
|
|
343
343
|
*/
|
|
344
|
-
MARKS,
|
|
344
|
+
MARKS = -20,
|
|
345
345
|
}
|
|
346
346
|
|
|
347
347
|
|
|
@@ -444,19 +444,19 @@ export namespace GtkSource {
|
|
|
444
444
|
/**
|
|
445
445
|
* None.
|
|
446
446
|
*/
|
|
447
|
-
NONE,
|
|
447
|
+
NONE = 0,
|
|
448
448
|
/**
|
|
449
449
|
* Interactive activation. By
|
|
450
450
|
* default, it occurs on each insertion in the {@link Gtk.TextBuffer}. This can be
|
|
451
451
|
* blocked temporarily with `gtk_source_completion_block_interactive()`.
|
|
452
452
|
*/
|
|
453
|
-
INTERACTIVE,
|
|
453
|
+
INTERACTIVE = 1,
|
|
454
454
|
/**
|
|
455
455
|
* User requested activation.
|
|
456
456
|
* By default, it occurs when the user presses
|
|
457
457
|
* <keycombo><keycap>Control</keycap><keycap>space</keycap></keycombo>.
|
|
458
458
|
*/
|
|
459
|
-
USER_REQUESTED,
|
|
459
|
+
USER_REQUESTED = 2,
|
|
460
460
|
}
|
|
461
461
|
|
|
462
462
|
|
|
@@ -479,37 +479,37 @@ export namespace GtkSource {
|
|
|
479
479
|
/**
|
|
480
480
|
* whether the space character should be drawn.
|
|
481
481
|
*/
|
|
482
|
-
SPACE,
|
|
482
|
+
SPACE = 1,
|
|
483
483
|
/**
|
|
484
484
|
* whether the tab character should be drawn.
|
|
485
485
|
*/
|
|
486
|
-
TAB,
|
|
486
|
+
TAB = 2,
|
|
487
487
|
/**
|
|
488
488
|
* whether the line breaks should be drawn. If
|
|
489
489
|
* the {@link GtkSource.Buffer.implicit_trailing_newline} property is `true`, a line
|
|
490
490
|
* break is also drawn at the end of the buffer.
|
|
491
491
|
*/
|
|
492
|
-
NEWLINE,
|
|
492
|
+
NEWLINE = 4,
|
|
493
493
|
/**
|
|
494
494
|
* whether the non-breaking whitespaces should be drawn.
|
|
495
495
|
*/
|
|
496
|
-
NBSP,
|
|
496
|
+
NBSP = 8,
|
|
497
497
|
/**
|
|
498
498
|
* whether leading whitespaces should be drawn.
|
|
499
499
|
*/
|
|
500
|
-
LEADING,
|
|
500
|
+
LEADING = 16,
|
|
501
501
|
/**
|
|
502
502
|
* whether whitespaces inside text should be drawn.
|
|
503
503
|
*/
|
|
504
|
-
TEXT,
|
|
504
|
+
TEXT = 32,
|
|
505
505
|
/**
|
|
506
506
|
* whether trailing whitespaces should be drawn.
|
|
507
507
|
*/
|
|
508
|
-
TRAILING,
|
|
508
|
+
TRAILING = 64,
|
|
509
509
|
/**
|
|
510
510
|
* wheter all kind of spaces should be drawn.
|
|
511
511
|
*/
|
|
512
|
-
ALL,
|
|
512
|
+
ALL = 127,
|
|
513
513
|
}
|
|
514
514
|
|
|
515
515
|
|
|
@@ -529,19 +529,19 @@ export namespace GtkSource {
|
|
|
529
529
|
/**
|
|
530
530
|
* No flags.
|
|
531
531
|
*/
|
|
532
|
-
NONE,
|
|
532
|
+
NONE = 0,
|
|
533
533
|
/**
|
|
534
534
|
* Ignore invalid characters.
|
|
535
535
|
*/
|
|
536
|
-
IGNORE_INVALID_CHARS,
|
|
536
|
+
IGNORE_INVALID_CHARS = 1,
|
|
537
537
|
/**
|
|
538
538
|
* Save file despite external modifications.
|
|
539
539
|
*/
|
|
540
|
-
IGNORE_MODIFICATION_TIME,
|
|
540
|
+
IGNORE_MODIFICATION_TIME = 2,
|
|
541
541
|
/**
|
|
542
542
|
* Create a backup before saving the file.
|
|
543
543
|
*/
|
|
544
|
-
CREATE_BACKUP,
|
|
544
|
+
CREATE_BACKUP = 4,
|
|
545
545
|
}
|
|
546
546
|
|
|
547
547
|
|
|
@@ -559,22 +559,22 @@ export namespace GtkSource {
|
|
|
559
559
|
/**
|
|
560
560
|
* normal state
|
|
561
561
|
*/
|
|
562
|
-
NORMAL,
|
|
562
|
+
NORMAL = 0,
|
|
563
563
|
/**
|
|
564
564
|
* area in the renderer represents the
|
|
565
565
|
* line on which the insert cursor is currently positioned
|
|
566
566
|
*/
|
|
567
|
-
CURSOR,
|
|
567
|
+
CURSOR = 1,
|
|
568
568
|
/**
|
|
569
569
|
* the mouse pointer is currently
|
|
570
570
|
* over the activatable area of the renderer
|
|
571
571
|
*/
|
|
572
|
-
PRELIT,
|
|
572
|
+
PRELIT = 2,
|
|
573
573
|
/**
|
|
574
574
|
* area in the renderer represents
|
|
575
575
|
* a line in the buffer which contains part of the selection
|
|
576
576
|
*/
|
|
577
|
-
SELECTED,
|
|
577
|
+
SELECTED = 4,
|
|
578
578
|
}
|
|
579
579
|
|
|
580
580
|
|
|
@@ -593,19 +593,19 @@ export namespace GtkSource {
|
|
|
593
593
|
/**
|
|
594
594
|
* no flags specified
|
|
595
595
|
*/
|
|
596
|
-
NONE,
|
|
596
|
+
NONE = 0,
|
|
597
597
|
/**
|
|
598
598
|
* case sensitive sort
|
|
599
599
|
*/
|
|
600
|
-
CASE_SENSITIVE,
|
|
600
|
+
CASE_SENSITIVE = 1,
|
|
601
601
|
/**
|
|
602
602
|
* sort in reverse order
|
|
603
603
|
*/
|
|
604
|
-
REVERSE_ORDER,
|
|
604
|
+
REVERSE_ORDER = 2,
|
|
605
605
|
/**
|
|
606
606
|
* remove duplicates
|
|
607
607
|
*/
|
|
608
|
-
REMOVE_DUPLICATES,
|
|
608
|
+
REMOVE_DUPLICATES = 4,
|
|
609
609
|
}
|
|
610
610
|
|
|
611
611
|
|
|
@@ -628,24 +628,24 @@ export namespace GtkSource {
|
|
|
628
628
|
/**
|
|
629
629
|
* No flags.
|
|
630
630
|
*/
|
|
631
|
-
NONE,
|
|
631
|
+
NONE = 0,
|
|
632
632
|
/**
|
|
633
633
|
* Leading white spaces on a line, i.e. the
|
|
634
634
|
* indentation.
|
|
635
635
|
*/
|
|
636
|
-
LEADING,
|
|
636
|
+
LEADING = 1,
|
|
637
637
|
/**
|
|
638
638
|
* White spaces inside a line of text.
|
|
639
639
|
*/
|
|
640
|
-
INSIDE_TEXT,
|
|
640
|
+
INSIDE_TEXT = 2,
|
|
641
641
|
/**
|
|
642
642
|
* Trailing white spaces on a line.
|
|
643
643
|
*/
|
|
644
|
-
TRAILING,
|
|
644
|
+
TRAILING = 4,
|
|
645
645
|
/**
|
|
646
646
|
* White spaces anywhere.
|
|
647
647
|
*/
|
|
648
|
-
ALL,
|
|
648
|
+
ALL = 7,
|
|
649
649
|
}
|
|
650
650
|
|
|
651
651
|
|
|
@@ -665,29 +665,29 @@ export namespace GtkSource {
|
|
|
665
665
|
/**
|
|
666
666
|
* No flags.
|
|
667
667
|
*/
|
|
668
|
-
NONE,
|
|
668
|
+
NONE = 0,
|
|
669
669
|
/**
|
|
670
670
|
* Space character.
|
|
671
671
|
*/
|
|
672
|
-
SPACE,
|
|
672
|
+
SPACE = 1,
|
|
673
673
|
/**
|
|
674
674
|
* Tab character.
|
|
675
675
|
*/
|
|
676
|
-
TAB,
|
|
676
|
+
TAB = 2,
|
|
677
677
|
/**
|
|
678
678
|
* Line break character. If the
|
|
679
679
|
* {@link GtkSource.Buffer.implicit_trailing_newline} property is `true`,
|
|
680
680
|
* {@link GtkSource.SpaceDrawer} also draws a line break at the end of the buffer.
|
|
681
681
|
*/
|
|
682
|
-
NEWLINE,
|
|
682
|
+
NEWLINE = 4,
|
|
683
683
|
/**
|
|
684
684
|
* Non-breaking space character.
|
|
685
685
|
*/
|
|
686
|
-
NBSP,
|
|
686
|
+
NBSP = 8,
|
|
687
687
|
/**
|
|
688
688
|
* All white spaces.
|
|
689
689
|
*/
|
|
690
|
-
ALL,
|
|
690
|
+
ALL = 15,
|
|
691
691
|
}
|
|
692
692
|
|
|
693
693
|
|
|
@@ -707,7 +707,7 @@ export namespace GtkSource {
|
|
|
707
707
|
* @since 2.12
|
|
708
708
|
* @run-last
|
|
709
709
|
*/
|
|
710
|
-
"bracket-matched": (
|
|
710
|
+
"bracket-matched": (iter: Gtk.TextIter | null, state: BracketMatchType) => void;
|
|
711
711
|
/**
|
|
712
712
|
* The ::highlight-updated signal is emitted when the syntax
|
|
713
713
|
* highlighting and [context classes][context-classes] are updated in a
|
|
@@ -715,7 +715,7 @@ export namespace GtkSource {
|
|
|
715
715
|
* @signal
|
|
716
716
|
* @run-last
|
|
717
717
|
*/
|
|
718
|
-
"highlight-updated": (
|
|
718
|
+
"highlight-updated": (start: Gtk.TextIter, end: Gtk.TextIter) => void;
|
|
719
719
|
/**
|
|
720
720
|
* The ::redo signal is emitted to redo the last undo operation.
|
|
721
721
|
* @signal
|
|
@@ -728,7 +728,7 @@ export namespace GtkSource {
|
|
|
728
728
|
* @signal
|
|
729
729
|
* @run-last
|
|
730
730
|
*/
|
|
731
|
-
"source-mark-updated": (
|
|
731
|
+
"source-mark-updated": (mark: Gtk.TextMark) => void;
|
|
732
732
|
/**
|
|
733
733
|
* The ::undo signal is emitted to undo the last user action which
|
|
734
734
|
* modified the buffer.
|
|
@@ -1345,7 +1345,7 @@ export namespace GtkSource {
|
|
|
1345
1345
|
* @action
|
|
1346
1346
|
* @run-last
|
|
1347
1347
|
*/
|
|
1348
|
-
"move-cursor": (
|
|
1348
|
+
"move-cursor": (step: Gtk.ScrollStep, num: number) => void;
|
|
1349
1349
|
/**
|
|
1350
1350
|
* The {@link GtkSource.Completion.SignalSignatures.move_page | GtkSource.Completion::move-page} signal is a keybinding
|
|
1351
1351
|
* signal which gets emitted when the user initiates a page
|
|
@@ -1370,7 +1370,7 @@ export namespace GtkSource {
|
|
|
1370
1370
|
* @action
|
|
1371
1371
|
* @run-last
|
|
1372
1372
|
*/
|
|
1373
|
-
"move-page": (
|
|
1373
|
+
"move-page": (step: Gtk.ScrollStep, num: number) => void;
|
|
1374
1374
|
/**
|
|
1375
1375
|
* Emitted just before starting to populate the completion with providers.
|
|
1376
1376
|
* You can use this signal to add additional attributes in the context.
|
|
@@ -1378,7 +1378,7 @@ export namespace GtkSource {
|
|
|
1378
1378
|
* @action
|
|
1379
1379
|
* @run-last
|
|
1380
1380
|
*/
|
|
1381
|
-
"populate-context": (
|
|
1381
|
+
"populate-context": (context: CompletionContext) => void;
|
|
1382
1382
|
/**
|
|
1383
1383
|
* Emitted when the completion window is shown. The default handler
|
|
1384
1384
|
* will actually show the window.
|
|
@@ -1645,6 +1645,7 @@ export namespace GtkSource {
|
|
|
1645
1645
|
* no longer need it.
|
|
1646
1646
|
* @param provider a {@link GtkSource.CompletionProvider}.
|
|
1647
1647
|
* @returns `true` if `provider` was successfully added, otherwise if `error` is provided, it will be set with the error and `false` is returned.
|
|
1648
|
+
* @throws GLib.Error
|
|
1648
1649
|
*/
|
|
1649
1650
|
add_provider(provider: CompletionProvider): boolean;
|
|
1650
1651
|
|
|
@@ -1706,6 +1707,7 @@ export namespace GtkSource {
|
|
|
1706
1707
|
* Remove `provider` from the completion.
|
|
1707
1708
|
* @param provider a {@link GtkSource.CompletionProvider}.
|
|
1708
1709
|
* @returns `true` if `provider` was successfully removed, otherwise if `error` is provided, it will be set with the error and `false` is returned.
|
|
1710
|
+
* @throws GLib.Error
|
|
1709
1711
|
*/
|
|
1710
1712
|
remove_provider(provider: CompletionProvider): boolean;
|
|
1711
1713
|
|
|
@@ -2221,7 +2223,7 @@ export namespace GtkSource {
|
|
|
2221
2223
|
|
|
2222
2224
|
namespace CompletionItem {
|
|
2223
2225
|
// Signal signatures
|
|
2224
|
-
interface SignalSignatures extends GObject.Object.SignalSignatures {
|
|
2226
|
+
interface SignalSignatures extends GObject.Object.SignalSignatures, CompletionProposal.SignalSignatures {
|
|
2225
2227
|
"notify::gicon": (pspec: GObject.ParamSpec) => void;
|
|
2226
2228
|
"notify::icon": (pspec: GObject.ParamSpec) => void;
|
|
2227
2229
|
"notify::icon-name": (pspec: GObject.ParamSpec) => void;
|
|
@@ -3383,6 +3385,7 @@ export namespace GtkSource {
|
|
|
3383
3385
|
* @param result a {@link Gio.AsyncResult}.
|
|
3384
3386
|
* @returns whether the contents has been loaded successfully.
|
|
3385
3387
|
* @since 3.14
|
|
3388
|
+
* @throws GLib.Error
|
|
3386
3389
|
*/
|
|
3387
3390
|
load_finish(result: Gio.AsyncResult): boolean;
|
|
3388
3391
|
|
|
@@ -3630,6 +3633,7 @@ export namespace GtkSource {
|
|
|
3630
3633
|
* @param result a {@link Gio.AsyncResult}.
|
|
3631
3634
|
* @returns whether the file was saved successfully.
|
|
3632
3635
|
* @since 3.14
|
|
3636
|
+
* @throws GLib.Error
|
|
3633
3637
|
*/
|
|
3634
3638
|
save_finish(result: Gio.AsyncResult): boolean;
|
|
3635
3639
|
|
|
@@ -3842,14 +3846,14 @@ export namespace GtkSource {
|
|
|
3842
3846
|
* @signal
|
|
3843
3847
|
* @run-last
|
|
3844
3848
|
*/
|
|
3845
|
-
activate: (
|
|
3849
|
+
activate: (iter: Gtk.TextIter, area: Gdk.Rectangle, event: Gdk.Event) => void;
|
|
3846
3850
|
/**
|
|
3847
3851
|
* The ::query-activatable signal is emitted when the renderer
|
|
3848
3852
|
* can possibly be activated.
|
|
3849
3853
|
* @signal
|
|
3850
3854
|
* @run-last
|
|
3851
3855
|
*/
|
|
3852
|
-
"query-activatable": (
|
|
3856
|
+
"query-activatable": (iter: Gtk.TextIter, area: Gdk.Rectangle, event: Gdk.Event) => boolean | void;
|
|
3853
3857
|
/**
|
|
3854
3858
|
* The ::query-data signal is emitted when the renderer needs
|
|
3855
3859
|
* to be filled with data just before a cell is drawn. This can
|
|
@@ -3858,14 +3862,14 @@ export namespace GtkSource {
|
|
|
3858
3862
|
* @signal
|
|
3859
3863
|
* @run-last
|
|
3860
3864
|
*/
|
|
3861
|
-
"query-data": (
|
|
3865
|
+
"query-data": (start: Gtk.TextIter, end: Gtk.TextIter, state: GutterRendererState) => void;
|
|
3862
3866
|
/**
|
|
3863
3867
|
* The ::query-tooltip signal is emitted when the renderer can
|
|
3864
3868
|
* show a tooltip.
|
|
3865
3869
|
* @signal
|
|
3866
3870
|
* @run-last
|
|
3867
3871
|
*/
|
|
3868
|
-
"query-tooltip": (
|
|
3872
|
+
"query-tooltip": (iter: Gtk.TextIter, area: Gdk.Rectangle, x: number, y: number, tooltip: Gtk.Tooltip) => boolean | void;
|
|
3869
3873
|
/**
|
|
3870
3874
|
* The ::queue-draw signal is emitted when the renderer needs
|
|
3871
3875
|
* to be redrawn. Use `gtk_source_gutter_renderer_queue_draw()`
|
|
@@ -5168,14 +5172,14 @@ export namespace GtkSource {
|
|
|
5168
5172
|
* @signal
|
|
5169
5173
|
* @run-last
|
|
5170
5174
|
*/
|
|
5171
|
-
"query-tooltip-markup": (
|
|
5175
|
+
"query-tooltip-markup": (mark: Mark) => string;
|
|
5172
5176
|
/**
|
|
5173
5177
|
* The code should connect to this signal to provide a tooltip for given
|
|
5174
5178
|
* `mark`. The tooltip should be just a plain text.
|
|
5175
5179
|
* @signal
|
|
5176
5180
|
* @run-last
|
|
5177
5181
|
*/
|
|
5178
|
-
"query-tooltip-text": (
|
|
5182
|
+
"query-tooltip-text": (mark: Mark) => string;
|
|
5179
5183
|
"notify::background": (pspec: GObject.ParamSpec) => void;
|
|
5180
5184
|
"notify::gicon": (pspec: GObject.ParamSpec) => void;
|
|
5181
5185
|
"notify::icon-name": (pspec: GObject.ParamSpec) => void;
|
|
@@ -6594,6 +6598,7 @@ export namespace GtkSource {
|
|
|
6594
6598
|
* @returns whether a match was found.
|
|
6595
6599
|
* @since 3.10
|
|
6596
6600
|
* @deprecated since 3.22: Use `gtk_source_search_context_backward_finish2()` instead.
|
|
6601
|
+
* @throws GLib.Error
|
|
6597
6602
|
*/
|
|
6598
6603
|
backward_finish(result: Gio.AsyncResult): [boolean, Gtk.TextIter | null, Gtk.TextIter | null];
|
|
6599
6604
|
|
|
@@ -6606,6 +6611,7 @@ export namespace GtkSource {
|
|
|
6606
6611
|
* @param result a {@link Gio.AsyncResult}.
|
|
6607
6612
|
* @returns whether a match was found.
|
|
6608
6613
|
* @since 3.22
|
|
6614
|
+
* @throws GLib.Error
|
|
6609
6615
|
*/
|
|
6610
6616
|
backward_finish2(result: Gio.AsyncResult): [boolean, Gtk.TextIter | null, Gtk.TextIter | null, boolean];
|
|
6611
6617
|
|
|
@@ -6700,6 +6706,7 @@ export namespace GtkSource {
|
|
|
6700
6706
|
* @returns whether a match was found.
|
|
6701
6707
|
* @since 3.10
|
|
6702
6708
|
* @deprecated since 3.22: Use `gtk_source_search_context_forward_finish2()` instead.
|
|
6709
|
+
* @throws GLib.Error
|
|
6703
6710
|
*/
|
|
6704
6711
|
forward_finish(result: Gio.AsyncResult): [boolean, Gtk.TextIter | null, Gtk.TextIter | null];
|
|
6705
6712
|
|
|
@@ -6712,6 +6719,7 @@ export namespace GtkSource {
|
|
|
6712
6719
|
* @param result a {@link Gio.AsyncResult}.
|
|
6713
6720
|
* @returns whether a match was found.
|
|
6714
6721
|
* @since 3.22
|
|
6722
|
+
* @throws GLib.Error
|
|
6715
6723
|
*/
|
|
6716
6724
|
forward_finish2(result: Gio.AsyncResult): [boolean, Gtk.TextIter | null, Gtk.TextIter | null, boolean];
|
|
6717
6725
|
|
|
@@ -6785,6 +6793,7 @@ export namespace GtkSource {
|
|
|
6785
6793
|
* @returns whether the match has been replaced.
|
|
6786
6794
|
* @since 3.10
|
|
6787
6795
|
* @deprecated since 3.22: Use `gtk_source_search_context_replace2()` instead.
|
|
6796
|
+
* @throws GLib.Error
|
|
6788
6797
|
*/
|
|
6789
6798
|
replace(match_start: Gtk.TextIter, match_end: Gtk.TextIter, replace: string, replace_length: number): boolean;
|
|
6790
6799
|
|
|
@@ -6804,6 +6813,7 @@ export namespace GtkSource {
|
|
|
6804
6813
|
* @param replace_length the length of `replace` in bytes, or -1.
|
|
6805
6814
|
* @returns whether the match has been replaced.
|
|
6806
6815
|
* @since 3.22
|
|
6816
|
+
* @throws GLib.Error
|
|
6807
6817
|
*/
|
|
6808
6818
|
replace2(match_start: Gtk.TextIter, match_end: Gtk.TextIter, replace: string, replace_length: number): boolean;
|
|
6809
6819
|
|
|
@@ -6818,6 +6828,7 @@ export namespace GtkSource {
|
|
|
6818
6828
|
* @param replace_length the length of `replace` in bytes, or -1.
|
|
6819
6829
|
* @returns the number of replaced matches.
|
|
6820
6830
|
* @since 3.10
|
|
6831
|
+
* @throws GLib.Error
|
|
6821
6832
|
*/
|
|
6822
6833
|
replace_all(replace: string, replace_length: number): number;
|
|
6823
6834
|
|
|
@@ -8647,7 +8658,7 @@ export namespace GtkSource {
|
|
|
8647
8658
|
* @action
|
|
8648
8659
|
* @run-last
|
|
8649
8660
|
*/
|
|
8650
|
-
"change-case": (
|
|
8661
|
+
"change-case": (case_type: ChangeCaseType) => void;
|
|
8651
8662
|
/**
|
|
8652
8663
|
* Keybinding signal to edit a number at the current cursor position.
|
|
8653
8664
|
* @signal
|
|
@@ -8655,7 +8666,7 @@ export namespace GtkSource {
|
|
|
8655
8666
|
* @action
|
|
8656
8667
|
* @run-last
|
|
8657
8668
|
*/
|
|
8658
|
-
"change-number": (
|
|
8669
|
+
"change-number": (count: number) => void;
|
|
8659
8670
|
/**
|
|
8660
8671
|
* Keybinding signal to join the lines currently selected.
|
|
8661
8672
|
* @signal
|
|
@@ -8671,7 +8682,7 @@ export namespace GtkSource {
|
|
|
8671
8682
|
* @signal
|
|
8672
8683
|
* @run-last
|
|
8673
8684
|
*/
|
|
8674
|
-
"line-mark-activated": (
|
|
8685
|
+
"line-mark-activated": (iter: Gtk.TextIter, event: Gdk.Event) => void;
|
|
8675
8686
|
/**
|
|
8676
8687
|
* The ::move-lines signal is a keybinding which gets emitted
|
|
8677
8688
|
* when the user initiates moving a line. The default binding key
|
|
@@ -8686,7 +8697,7 @@ export namespace GtkSource {
|
|
|
8686
8697
|
* @action
|
|
8687
8698
|
* @run-last
|
|
8688
8699
|
*/
|
|
8689
|
-
"move-lines": (
|
|
8700
|
+
"move-lines": (copy: boolean, count: number) => void;
|
|
8690
8701
|
/**
|
|
8691
8702
|
* Keybinding signal to move the cursor to the matching bracket.
|
|
8692
8703
|
* @signal
|
|
@@ -8694,7 +8705,7 @@ export namespace GtkSource {
|
|
|
8694
8705
|
* @action
|
|
8695
8706
|
* @run-last
|
|
8696
8707
|
*/
|
|
8697
|
-
"move-to-matching-bracket": (
|
|
8708
|
+
"move-to-matching-bracket": (extend_selection: boolean) => void;
|
|
8698
8709
|
/**
|
|
8699
8710
|
* The ::move-words signal is a keybinding which gets emitted
|
|
8700
8711
|
* when the user initiates moving a word. The default binding key
|
|
@@ -8705,7 +8716,7 @@ export namespace GtkSource {
|
|
|
8705
8716
|
* @action
|
|
8706
8717
|
* @run-last
|
|
8707
8718
|
*/
|
|
8708
|
-
"move-words": (
|
|
8719
|
+
"move-words": (count: number) => void;
|
|
8709
8720
|
/**
|
|
8710
8721
|
* @signal
|
|
8711
8722
|
* @action
|
|
@@ -8738,7 +8749,7 @@ export namespace GtkSource {
|
|
|
8738
8749
|
* @since 3.0
|
|
8739
8750
|
* @run-last
|
|
8740
8751
|
*/
|
|
8741
|
-
"smart-home-end": (
|
|
8752
|
+
"smart-home-end": (iter: Gtk.TextIter, count: number) => void;
|
|
8742
8753
|
/**
|
|
8743
8754
|
* @signal
|
|
8744
8755
|
* @action
|
|
@@ -10080,6 +10091,17 @@ export namespace GtkSource {
|
|
|
10080
10091
|
|
|
10081
10092
|
|
|
10082
10093
|
namespace CompletionProposal {
|
|
10094
|
+
// Signal signatures
|
|
10095
|
+
interface SignalSignatures {
|
|
10096
|
+
/**
|
|
10097
|
+
* Emitted when the proposal has changed. The completion popup
|
|
10098
|
+
* will react to this by updating the shown information.
|
|
10099
|
+
* @signal
|
|
10100
|
+
* @action
|
|
10101
|
+
* @run-last
|
|
10102
|
+
*/
|
|
10103
|
+
changed: () => void;
|
|
10104
|
+
}
|
|
10083
10105
|
/**
|
|
10084
10106
|
* Interface for implementing CompletionProposal.
|
|
10085
10107
|
* Contains only the virtual methods that need to be implemented.
|
|
@@ -10658,6 +10680,25 @@ export namespace GtkSource {
|
|
|
10658
10680
|
};
|
|
10659
10681
|
|
|
10660
10682
|
namespace UndoManager {
|
|
10683
|
+
// Signal signatures
|
|
10684
|
+
interface SignalSignatures {
|
|
10685
|
+
/**
|
|
10686
|
+
* Emitted when the ability to redo has changed.
|
|
10687
|
+
* @signal
|
|
10688
|
+
* @since 2.10
|
|
10689
|
+
* @action
|
|
10690
|
+
* @run-last
|
|
10691
|
+
*/
|
|
10692
|
+
"can-redo-changed": () => void;
|
|
10693
|
+
/**
|
|
10694
|
+
* Emitted when the ability to undo has changed.
|
|
10695
|
+
* @signal
|
|
10696
|
+
* @since 2.10
|
|
10697
|
+
* @action
|
|
10698
|
+
* @run-last
|
|
10699
|
+
*/
|
|
10700
|
+
"can-undo-changed": () => void;
|
|
10701
|
+
}
|
|
10661
10702
|
/**
|
|
10662
10703
|
* Interface for implementing UndoManager.
|
|
10663
10704
|
* Contains only the virtual methods that need to be implemented.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/gtksource-3.0",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.6.0",
|
|
4
4
|
"description": "GJS TypeScript type definitions for GtkSource-3.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "gtksource-3.0.js",
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
"import": "./gtksource-3.0-import.js",
|
|
17
17
|
"default": "./gtksource-3.0-import.js"
|
|
18
18
|
},
|
|
19
|
-
"./
|
|
20
|
-
"types": "./gtksource-3.0-
|
|
21
|
-
"import": "./gtksource-3.0-
|
|
22
|
-
"default": "./gtksource-3.0-
|
|
19
|
+
"./vocabulary": {
|
|
20
|
+
"types": "./gtksource-3.0-vocabulary.d.ts",
|
|
21
|
+
"import": "./gtksource-3.0-vocabulary.js",
|
|
22
|
+
"default": "./gtksource-3.0-vocabulary.js"
|
|
23
23
|
},
|
|
24
24
|
"./gtksource-3.0": {
|
|
25
25
|
"types": "./gtksource-3.0.d.ts",
|
|
@@ -36,20 +36,20 @@
|
|
|
36
36
|
"test": "tsc --project tsconfig.json"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@girs/gjs": "^4.
|
|
40
|
-
"@girs/gtk-3.0": "^4.
|
|
41
|
-
"@girs/xlib-2.0": "^4.
|
|
42
|
-
"@girs/gdk-3.0": "^4.
|
|
43
|
-
"@girs/cairo-1.0": "^4.
|
|
44
|
-
"@girs/gobject-2.0": "^4.
|
|
45
|
-
"@girs/glib-2.0": "^4.
|
|
46
|
-
"@girs/pango-1.0": "^4.
|
|
47
|
-
"@girs/harfbuzz-0.0": "^4.
|
|
48
|
-
"@girs/freetype2-2.0": "^4.
|
|
49
|
-
"@girs/gio-2.0": "^4.
|
|
50
|
-
"@girs/gmodule-2.0": "^4.
|
|
51
|
-
"@girs/gdkpixbuf-2.0": "^4.
|
|
52
|
-
"@girs/atk-1.0": "^4.
|
|
39
|
+
"@girs/gjs": "^4.6.0",
|
|
40
|
+
"@girs/gtk-3.0": "^4.6.0",
|
|
41
|
+
"@girs/xlib-2.0": "^4.6.0",
|
|
42
|
+
"@girs/gdk-3.0": "^4.6.0",
|
|
43
|
+
"@girs/cairo-1.0": "^4.6.0",
|
|
44
|
+
"@girs/gobject-2.0": "^4.6.0",
|
|
45
|
+
"@girs/glib-2.0": "^4.6.0",
|
|
46
|
+
"@girs/pango-1.0": "^4.6.0",
|
|
47
|
+
"@girs/harfbuzz-0.0": "^4.6.0",
|
|
48
|
+
"@girs/freetype2-2.0": "^4.6.0",
|
|
49
|
+
"@girs/gio-2.0": "^4.6.0",
|
|
50
|
+
"@girs/gmodule-2.0": "^4.6.0",
|
|
51
|
+
"@girs/gdkpixbuf-2.0": "^4.6.0",
|
|
52
|
+
"@girs/atk-1.0": "^4.6.0" },
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"typescript": "*"
|
|
55
55
|
},
|