@girs/foundryadw-1 4.2.0 → 4.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -8
- package/foundryadw-1.d.ts +80 -7
- package/package.json +24 -23
- package/tsconfig.json +3 -0
package/README.md
CHANGED
|
@@ -5,25 +5,25 @@
|
|
|
5
5
|

|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
GJS TypeScript type definitions for FoundryAdw-1 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.
|
|
8
|
+
GJS TypeScript type definitions for FoundryAdw-1 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.3.0.
|
|
9
9
|
|
|
10
10
|
## Install
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Install the type definitions with npm:
|
|
13
13
|
```bash
|
|
14
14
|
npm install @girs/foundryadw-1
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
## Usage
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Import it like any other module:
|
|
20
20
|
```ts
|
|
21
21
|
import FoundryAdw from '@girs/foundryadw-1';
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
### Ambient Modules
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
[Ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules) let you write the same import you would in plain JavaScript.
|
|
27
27
|
For this you need to include `@girs/foundryadw-1` or `@girs/foundryadw-1/ambient` in your `tsconfig` or entry point Typescript file:
|
|
28
28
|
|
|
29
29
|
`index.ts`:
|
|
@@ -42,7 +42,7 @@ import '@girs/foundryadw-1'
|
|
|
42
42
|
}
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
The ambient module now resolves with types:
|
|
46
46
|
|
|
47
47
|
```ts
|
|
48
48
|
import FoundryAdw from 'gi://FoundryAdw?version=1';
|
|
@@ -50,7 +50,7 @@ import FoundryAdw from 'gi://FoundryAdw?version=1';
|
|
|
50
50
|
|
|
51
51
|
### Global import
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
GJS's global `imports.gi` works too, with types.
|
|
54
54
|
For this you need to include `@girs/foundryadw-1` or `@girs/foundryadw-1/import` in your `tsconfig` or entry point Typescript file:
|
|
55
55
|
|
|
56
56
|
`index.ts`:
|
|
@@ -69,7 +69,7 @@ import '@girs/foundryadw-1'
|
|
|
69
69
|
}
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
That form carries types as well:
|
|
73
73
|
|
|
74
74
|
```ts
|
|
75
75
|
const FoundryAdw = imports.gi.FoundryAdw;
|
|
@@ -77,7 +77,7 @@ const FoundryAdw = imports.gi.FoundryAdw;
|
|
|
77
77
|
|
|
78
78
|
### Bundle
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
Most projects want a bundler. [esbuild](https://esbuild.github.io/) is the smallest thing that works; the [examples directory](https://github.com/gjsify/ts-for-gir/tree/main/examples) has setups for several others.
|
|
81
81
|
|
|
82
82
|
## Other packages
|
|
83
83
|
|
package/foundryadw-1.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ import type Json from '@girs/json-1.0';
|
|
|
31
31
|
import type GtkSource from '@girs/gtksource-5';
|
|
32
32
|
import type Foundry from '@girs/foundry-1';
|
|
33
33
|
import type Dex from '@girs/dex-1';
|
|
34
|
+
import type GioUnix from '@girs/giounix-2.0';
|
|
34
35
|
import type Adw from '@girs/adw-1';
|
|
35
36
|
|
|
36
37
|
export namespace FoundryAdw {
|
|
@@ -227,9 +228,11 @@ export namespace FoundryAdw {
|
|
|
227
228
|
"notify::vexpand-set": (pspec: GObject.ParamSpec) => void;
|
|
228
229
|
"notify::visible": (pspec: GObject.ParamSpec) => void;
|
|
229
230
|
"notify::width-request": (pspec: GObject.ParamSpec) => void;
|
|
231
|
+
"notify::complete-text": (pspec: GObject.ParamSpec) => void;
|
|
230
232
|
"notify::cursor-position": (pspec: GObject.ParamSpec) => void;
|
|
231
233
|
"notify::editable": (pspec: GObject.ParamSpec) => void;
|
|
232
234
|
"notify::enable-undo": (pspec: GObject.ParamSpec) => void;
|
|
235
|
+
"notify::input-interceptor": (pspec: GObject.ParamSpec) => void;
|
|
233
236
|
"notify::max-width-chars": (pspec: GObject.ParamSpec) => void;
|
|
234
237
|
"notify::selection-bound": (pspec: GObject.ParamSpec) => void;
|
|
235
238
|
"notify::text": (pspec: GObject.ParamSpec) => void;
|
|
@@ -323,6 +326,24 @@ export namespace FoundryAdw {
|
|
|
323
326
|
*/
|
|
324
327
|
set_file_type(file_type: Gio.FileType): void;
|
|
325
328
|
|
|
329
|
+
/**
|
|
330
|
+
* The contents of the entry, including uncommited content such as the
|
|
331
|
+
* preedit.
|
|
332
|
+
* @since 4.24
|
|
333
|
+
* @read-only
|
|
334
|
+
* @category Inherited from Gtk.Editable
|
|
335
|
+
*/
|
|
336
|
+
get complete_text(): string;
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* The contents of the entry, including uncommited content such as the
|
|
340
|
+
* preedit.
|
|
341
|
+
* @since 4.24
|
|
342
|
+
* @read-only
|
|
343
|
+
* @category Inherited from Gtk.Editable
|
|
344
|
+
*/
|
|
345
|
+
get completeText(): string;
|
|
346
|
+
|
|
326
347
|
/**
|
|
327
348
|
* The current position of the insertion cursor in chars.
|
|
328
349
|
* @read-only
|
|
@@ -363,6 +384,22 @@ export namespace FoundryAdw {
|
|
|
363
384
|
get enableUndo(): boolean;
|
|
364
385
|
set enableUndo(val: boolean);
|
|
365
386
|
|
|
387
|
+
/**
|
|
388
|
+
* The widget used to intercept input for this editable
|
|
389
|
+
* @since 4.24
|
|
390
|
+
* @category Inherited from Gtk.Editable
|
|
391
|
+
*/
|
|
392
|
+
get input_interceptor(): Gtk.Widget | null;
|
|
393
|
+
set input_interceptor(val: Gtk.Widget | null);
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* The widget used to intercept input for this editable
|
|
397
|
+
* @since 4.24
|
|
398
|
+
* @category Inherited from Gtk.Editable
|
|
399
|
+
*/
|
|
400
|
+
get inputInterceptor(): Gtk.Widget | null;
|
|
401
|
+
set inputInterceptor(val: Gtk.Widget | null);
|
|
402
|
+
|
|
366
403
|
/**
|
|
367
404
|
* The desired maximum width of the entry, in characters.
|
|
368
405
|
* @default -1
|
|
@@ -469,7 +506,7 @@ export namespace FoundryAdw {
|
|
|
469
506
|
/**
|
|
470
507
|
* Deletes the currently selected text of the editable.
|
|
471
508
|
*
|
|
472
|
-
* This call doesn
|
|
509
|
+
* This call doesn’t do anything if there is no selected text.
|
|
473
510
|
*/
|
|
474
511
|
delete_selection(): void;
|
|
475
512
|
|
|
@@ -516,6 +553,13 @@ export namespace FoundryAdw {
|
|
|
516
553
|
*/
|
|
517
554
|
get_chars(start_pos: number, end_pos: number): string;
|
|
518
555
|
|
|
556
|
+
/**
|
|
557
|
+
* Retrieves the contents of `editable`, including *pseudo-content*
|
|
558
|
+
* such as the preedit buffer.
|
|
559
|
+
* @returns the complete contents of the editable
|
|
560
|
+
*/
|
|
561
|
+
get_complete_text(): string;
|
|
562
|
+
|
|
519
563
|
/**
|
|
520
564
|
* Gets the {@link Gtk.Editable} that `editable` is delegating its
|
|
521
565
|
* implementation to.
|
|
@@ -537,6 +581,13 @@ export namespace FoundryAdw {
|
|
|
537
581
|
*/
|
|
538
582
|
get_enable_undo(): boolean;
|
|
539
583
|
|
|
584
|
+
/**
|
|
585
|
+
* Retrieves the widget that was previously set up as input interceptor
|
|
586
|
+
* for `editable`. See {@link Gtk.Editable.set_input_interceptor}.
|
|
587
|
+
* @returns The editable widget
|
|
588
|
+
*/
|
|
589
|
+
get_input_interceptor(): Gtk.Widget | null;
|
|
590
|
+
|
|
540
591
|
/**
|
|
541
592
|
* Retrieves the desired maximum width of `editable`, in characters.
|
|
542
593
|
* @returns the maximum width of the entry, in characters
|
|
@@ -643,6 +694,21 @@ export namespace FoundryAdw {
|
|
|
643
694
|
*/
|
|
644
695
|
set_enable_undo(enable_undo: boolean): void;
|
|
645
696
|
|
|
697
|
+
/**
|
|
698
|
+
* Sets `interceptor` as the widget that `editable` will intercept key events from.
|
|
699
|
+
*
|
|
700
|
+
* A typical usecase for this is implementing auto-showing search entries, so
|
|
701
|
+
* that textual input may be intercepted from another widget and handled first
|
|
702
|
+
* hand by the given editable. The events will be handled in the bubble phase
|
|
703
|
+
* of `interceptor`, which means that editable child widgets of `interceptor` will
|
|
704
|
+
* receive the text input before it can be captured.
|
|
705
|
+
*
|
|
706
|
+
* Only those events that would be handled by an input method will be handled,
|
|
707
|
+
* this excludes combinations of Ctrl/Alt/Mod, and other shortcuts.
|
|
708
|
+
* @param interceptor the input interceptor widget
|
|
709
|
+
*/
|
|
710
|
+
set_input_interceptor(interceptor: Gtk.Widget | null): void;
|
|
711
|
+
|
|
646
712
|
/**
|
|
647
713
|
* Sets the desired maximum width in characters of `editable`.
|
|
648
714
|
* @param n_chars the new desired maximum width, in characters
|
|
@@ -729,6 +795,13 @@ export namespace FoundryAdw {
|
|
|
729
795
|
*/
|
|
730
796
|
vfunc_do_insert_text(text: string, length: number, position: number): number;
|
|
731
797
|
|
|
798
|
+
/**
|
|
799
|
+
* Retrieves the contents of `editable`, including *pseudo-content*
|
|
800
|
+
* such as the preedit buffer.
|
|
801
|
+
* @virtual
|
|
802
|
+
*/
|
|
803
|
+
vfunc_get_complete_text(): string;
|
|
804
|
+
|
|
732
805
|
/**
|
|
733
806
|
* Gets the {@link Gtk.Editable} that `editable` is delegating its
|
|
734
807
|
* implementation to.
|
|
@@ -1421,7 +1494,7 @@ export namespace FoundryAdw {
|
|
|
1421
1494
|
/**
|
|
1422
1495
|
* Stores the id attribute given in the {@link Gtk.Builder} UI definition.
|
|
1423
1496
|
* {@link Gtk.Widget} stores the name as object data. Implement this method if your
|
|
1424
|
-
* object has some notion of
|
|
1497
|
+
* object has some notion of “ID” and it makes sense to map the XML id
|
|
1425
1498
|
* attribute to it.
|
|
1426
1499
|
* @param id
|
|
1427
1500
|
* @virtual
|
|
@@ -1975,7 +2048,7 @@ export namespace FoundryAdw {
|
|
|
1975
2048
|
/**
|
|
1976
2049
|
* Stores the id attribute given in the {@link Gtk.Builder} UI definition.
|
|
1977
2050
|
* {@link Gtk.Widget} stores the name as object data. Implement this method if your
|
|
1978
|
-
* object has some notion of
|
|
2051
|
+
* object has some notion of “ID” and it makes sense to map the XML id
|
|
1979
2052
|
* attribute to it.
|
|
1980
2053
|
* @param id
|
|
1981
2054
|
* @virtual
|
|
@@ -2461,7 +2534,7 @@ export namespace FoundryAdw {
|
|
|
2461
2534
|
/**
|
|
2462
2535
|
* Stores the id attribute given in the {@link Gtk.Builder} UI definition.
|
|
2463
2536
|
* {@link Gtk.Widget} stores the name as object data. Implement this method if your
|
|
2464
|
-
* object has some notion of
|
|
2537
|
+
* object has some notion of “ID” and it makes sense to map the XML id
|
|
2465
2538
|
* attribute to it.
|
|
2466
2539
|
* @param id
|
|
2467
2540
|
* @virtual
|
|
@@ -2923,7 +2996,7 @@ export namespace FoundryAdw {
|
|
|
2923
2996
|
/**
|
|
2924
2997
|
* Stores the id attribute given in the {@link Gtk.Builder} UI definition.
|
|
2925
2998
|
* {@link Gtk.Widget} stores the name as object data. Implement this method if your
|
|
2926
|
-
* object has some notion of
|
|
2999
|
+
* object has some notion of “ID” and it makes sense to map the XML id
|
|
2927
3000
|
* attribute to it.
|
|
2928
3001
|
* @param id
|
|
2929
3002
|
* @virtual
|
|
@@ -4005,7 +4078,7 @@ export namespace FoundryAdw {
|
|
|
4005
4078
|
/**
|
|
4006
4079
|
* Stores the id attribute given in the {@link Gtk.Builder} UI definition.
|
|
4007
4080
|
* {@link Gtk.Widget} stores the name as object data. Implement this method if your
|
|
4008
|
-
* object has some notion of
|
|
4081
|
+
* object has some notion of “ID” and it makes sense to map the XML id
|
|
4009
4082
|
* attribute to it.
|
|
4010
4083
|
* @param id
|
|
4011
4084
|
* @virtual
|
|
@@ -4725,7 +4798,7 @@ export namespace FoundryAdw {
|
|
|
4725
4798
|
/**
|
|
4726
4799
|
* Stores the id attribute given in the {@link Gtk.Builder} UI definition.
|
|
4727
4800
|
* {@link Gtk.Widget} stores the name as object data. Implement this method if your
|
|
4728
|
-
* object has some notion of
|
|
4801
|
+
* object has some notion of “ID” and it makes sense to map the XML id
|
|
4729
4802
|
* attribute to it.
|
|
4730
4803
|
* @param id
|
|
4731
4804
|
* @virtual
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/foundryadw-1",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.0",
|
|
4
4
|
"description": "GJS TypeScript type definitions for FoundryAdw-1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "foundryadw-1.js",
|
|
@@ -36,28 +36,29 @@
|
|
|
36
36
|
"test": "tsc --project tsconfig.json"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@girs/gjs": "^4.
|
|
40
|
-
"@girs/peas-2": "^4.
|
|
41
|
-
"@girs/gio-2.0": "^4.
|
|
42
|
-
"@girs/gobject-2.0": "^4.
|
|
43
|
-
"@girs/glib-2.0": "^4.
|
|
44
|
-
"@girs/gmodule-2.0": "^4.
|
|
45
|
-
"@girs/gtk-4.0": "^4.
|
|
46
|
-
"@girs/gsk-4.0": "^4.
|
|
47
|
-
"@girs/graphene-1.0": "^4.
|
|
48
|
-
"@girs/gdk-4.0": "^4.
|
|
49
|
-
"@girs/cairo-1.0": "^4.
|
|
50
|
-
"@girs/pangocairo-1.0": "^4.
|
|
51
|
-
"@girs/pango-1.0": "^4.
|
|
52
|
-
"@girs/harfbuzz-0.0": "^4.
|
|
53
|
-
"@girs/freetype2-2.0": "^4.
|
|
54
|
-
"@girs/gdkpixbuf-2.0": "^4.
|
|
55
|
-
"@girs/foundrygtk-1": "^4.
|
|
56
|
-
"@girs/json-1.0": "^4.
|
|
57
|
-
"@girs/gtksource-5": "^4.
|
|
58
|
-
"@girs/foundry-1": "^4.
|
|
59
|
-
"@girs/dex-1": "^4.
|
|
60
|
-
"@girs/
|
|
39
|
+
"@girs/gjs": "^4.3.0",
|
|
40
|
+
"@girs/peas-2": "^4.3.0",
|
|
41
|
+
"@girs/gio-2.0": "^4.3.0",
|
|
42
|
+
"@girs/gobject-2.0": "^4.3.0",
|
|
43
|
+
"@girs/glib-2.0": "^4.3.0",
|
|
44
|
+
"@girs/gmodule-2.0": "^4.3.0",
|
|
45
|
+
"@girs/gtk-4.0": "^4.3.0",
|
|
46
|
+
"@girs/gsk-4.0": "^4.3.0",
|
|
47
|
+
"@girs/graphene-1.0": "^4.3.0",
|
|
48
|
+
"@girs/gdk-4.0": "^4.3.0",
|
|
49
|
+
"@girs/cairo-1.0": "^4.3.0",
|
|
50
|
+
"@girs/pangocairo-1.0": "^4.3.0",
|
|
51
|
+
"@girs/pango-1.0": "^4.3.0",
|
|
52
|
+
"@girs/harfbuzz-0.0": "^4.3.0",
|
|
53
|
+
"@girs/freetype2-2.0": "^4.3.0",
|
|
54
|
+
"@girs/gdkpixbuf-2.0": "^4.3.0",
|
|
55
|
+
"@girs/foundrygtk-1": "^4.3.0",
|
|
56
|
+
"@girs/json-1.0": "^4.3.0",
|
|
57
|
+
"@girs/gtksource-5": "^4.3.0",
|
|
58
|
+
"@girs/foundry-1": "^4.3.0",
|
|
59
|
+
"@girs/dex-1": "^4.3.0",
|
|
60
|
+
"@girs/giounix-2.0": "^4.3.0",
|
|
61
|
+
"@girs/adw-1": "^4.3.0" },
|
|
61
62
|
"devDependencies": {
|
|
62
63
|
"typescript": "*"
|
|
63
64
|
},
|