@girs/gtksource-5 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/gtksource-5-surface.d.ts +1 -1
- package/gtksource-5-surface.js +2 -2
- package/gtksource-5.d.ts +58 -22
- package/package.json +18 -18
package/README.md
CHANGED
|
@@ -5,25 +5,25 @@
|
|
|
5
5
|

|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
GJS TypeScript type definitions for GtkSource-5, generated from library version 5.
|
|
8
|
+
GJS TypeScript type definitions for GtkSource-5, generated from library version 5.21.0 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/gtksource-5
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
## Usage
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Import it like any other module:
|
|
20
20
|
```ts
|
|
21
21
|
import GtkSource from '@girs/gtksource-5';
|
|
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/gtksource-5` or `@girs/gtksource-5/ambient` in your `tsconfig` or entry point Typescript file:
|
|
28
28
|
|
|
29
29
|
`index.ts`:
|
|
@@ -42,7 +42,7 @@ import '@girs/gtksource-5'
|
|
|
42
42
|
}
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
The ambient module now resolves with types:
|
|
46
46
|
|
|
47
47
|
```ts
|
|
48
48
|
import GtkSource from 'gi://GtkSource?version=5';
|
|
@@ -50,7 +50,7 @@ import GtkSource from 'gi://GtkSource?version=5';
|
|
|
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/gtksource-5` or `@girs/gtksource-5/import` in your `tsconfig` or entry point Typescript file:
|
|
55
55
|
|
|
56
56
|
`index.ts`:
|
|
@@ -69,7 +69,7 @@ import '@girs/gtksource-5'
|
|
|
69
69
|
}
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
That form carries types as well:
|
|
73
73
|
|
|
74
74
|
```ts
|
|
75
75
|
const GtkSource = imports.gi.GtkSource;
|
|
@@ -77,7 +77,7 @@ const GtkSource = imports.gi.GtkSource;
|
|
|
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/gtksource-5-surface.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The GIR-derived widget VOCABULARY for GtkSource-5.
|
|
3
3
|
*
|
|
4
|
-
* GENERATED — do not edit. Provenance: GtkSource-5 — library 5.
|
|
4
|
+
* GENERATED — do not edit. Provenance: GtkSource-5 — library 5.21.0 — dropped empty base(s): GObject.InitiallyUnowned GObject.Object
|
|
5
5
|
*
|
|
6
6
|
* 10 concrete widgets, 12 declarations, 11 enum nick unions, 2 slot candidates.
|
|
7
7
|
*
|
package/gtksource-5-surface.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// The widget vocabulary of GtkSource-5 as runtime data.
|
|
2
2
|
//
|
|
3
|
-
// GENERATED — do not edit. Provenance: GtkSource-5 — library 5.
|
|
3
|
+
// GENERATED — do not edit. Provenance: GtkSource-5 — library 5.21.0 — dropped empty base(s): GObject.InitiallyUnowned GObject.Object
|
|
4
4
|
//
|
|
5
5
|
// The type half of this subpath is the sibling `.d.ts`. This file exists because
|
|
6
6
|
// types are erased: a consumer that wants to ask the installed library whether every
|
|
7
7
|
// name here is real needs values, not declarations.
|
|
8
8
|
|
|
9
|
-
export const SURFACE_PROVENANCE = 'GtkSource-5 — library 5.
|
|
9
|
+
export const SURFACE_PROVENANCE = 'GtkSource-5 — library 5.21.0 — dropped empty base(s): GObject.InitiallyUnowned GObject.Object';
|
|
10
10
|
|
|
11
11
|
export const OWN_PROPS = {
|
|
12
12
|
GtkSourceCompletionCell: ['column', 'markup', 'paintable', 'text', 'widget'],
|
package/gtksource-5.d.ts
CHANGED
|
@@ -2386,7 +2386,7 @@ export namespace GtkSource {
|
|
|
2386
2386
|
/**
|
|
2387
2387
|
* Stores the id attribute given in the {@link Gtk.Builder} UI definition.
|
|
2388
2388
|
* {@link Gtk.Widget} stores the name as object data. Implement this method if your
|
|
2389
|
-
* object has some notion of
|
|
2389
|
+
* object has some notion of “ID” and it makes sense to map the XML id
|
|
2390
2390
|
* attribute to it.
|
|
2391
2391
|
* @param id
|
|
2392
2392
|
* @virtual
|
|
@@ -3672,6 +3672,7 @@ export namespace GtkSource {
|
|
|
3672
3672
|
"notify::file": (pspec: GObject.ParamSpec) => void;
|
|
3673
3673
|
"notify::input-stream": (pspec: GObject.ParamSpec) => void;
|
|
3674
3674
|
"notify::location": (pspec: GObject.ParamSpec) => void;
|
|
3675
|
+
"notify::max-size": (pspec: GObject.ParamSpec) => void;
|
|
3675
3676
|
}
|
|
3676
3677
|
|
|
3677
3678
|
// Constructor properties interface
|
|
@@ -3681,6 +3682,8 @@ export namespace GtkSource {
|
|
|
3681
3682
|
input_stream: Gio.InputStream | null;
|
|
3682
3683
|
inputStream: Gio.InputStream | null;
|
|
3683
3684
|
location: Gio.File | null;
|
|
3685
|
+
max_size: bigint | number;
|
|
3686
|
+
maxSize: bigint | number;
|
|
3684
3687
|
}
|
|
3685
3688
|
}
|
|
3686
3689
|
|
|
@@ -3745,6 +3748,24 @@ export namespace GtkSource {
|
|
|
3745
3748
|
*/
|
|
3746
3749
|
get location(): Gio.File | null;
|
|
3747
3750
|
|
|
3751
|
+
/**
|
|
3752
|
+
* The maximum expanded size, in bytes, that the loader will insert into
|
|
3753
|
+
* the buffer. A value of 0 disables the limit.
|
|
3754
|
+
* @since 5.22
|
|
3755
|
+
* @default 1073741824
|
|
3756
|
+
*/
|
|
3757
|
+
get max_size(): number;
|
|
3758
|
+
set max_size(val: bigint | number);
|
|
3759
|
+
|
|
3760
|
+
/**
|
|
3761
|
+
* The maximum expanded size, in bytes, that the loader will insert into
|
|
3762
|
+
* the buffer. A value of 0 disables the limit.
|
|
3763
|
+
* @since 5.22
|
|
3764
|
+
* @default 1073741824
|
|
3765
|
+
*/
|
|
3766
|
+
get maxSize(): number;
|
|
3767
|
+
set maxSize(val: bigint | number);
|
|
3768
|
+
|
|
3748
3769
|
/**
|
|
3749
3770
|
* Compile-time signal type information.
|
|
3750
3771
|
*
|
|
@@ -3807,6 +3828,12 @@ export namespace GtkSource {
|
|
|
3807
3828
|
*/
|
|
3808
3829
|
get_location(): Gio.File | null;
|
|
3809
3830
|
|
|
3831
|
+
/**
|
|
3832
|
+
* Gets the maximum expanded size that `loader` will insert into the buffer.
|
|
3833
|
+
* @returns the maximum expanded size in bytes, or 0 if the limit is disabled.
|
|
3834
|
+
*/
|
|
3835
|
+
get_max_size(): number;
|
|
3836
|
+
|
|
3810
3837
|
/**
|
|
3811
3838
|
* @returns the detected newline type.
|
|
3812
3839
|
*/
|
|
@@ -3873,6 +3900,15 @@ export namespace GtkSource {
|
|
|
3873
3900
|
* @param candidate_encodings a list of {@link GtkSource.Encoding}<!-- -->s.
|
|
3874
3901
|
*/
|
|
3875
3902
|
set_candidate_encodings(candidate_encodings: Encoding[]): void;
|
|
3903
|
+
|
|
3904
|
+
/**
|
|
3905
|
+
* Sets the maximum expanded size that `loader` will insert into the buffer.
|
|
3906
|
+
*
|
|
3907
|
+
* The limit is checked after decompression, so compressed files are limited by
|
|
3908
|
+
* the size of their uncompressed contents rather than their on-disk size.
|
|
3909
|
+
* @param max_size maximum expanded size in bytes, or 0 to disable the limit.
|
|
3910
|
+
*/
|
|
3911
|
+
set_max_size(max_size: bigint | number): void;
|
|
3876
3912
|
}
|
|
3877
3913
|
|
|
3878
3914
|
|
|
@@ -4609,7 +4645,7 @@ export namespace GtkSource {
|
|
|
4609
4645
|
/**
|
|
4610
4646
|
* Stores the id attribute given in the {@link Gtk.Builder} UI definition.
|
|
4611
4647
|
* {@link Gtk.Widget} stores the name as object data. Implement this method if your
|
|
4612
|
-
* object has some notion of
|
|
4648
|
+
* object has some notion of “ID” and it makes sense to map the XML id
|
|
4613
4649
|
* attribute to it.
|
|
4614
4650
|
* @param id
|
|
4615
4651
|
* @virtual
|
|
@@ -5565,7 +5601,7 @@ export namespace GtkSource {
|
|
|
5565
5601
|
/**
|
|
5566
5602
|
* Stores the id attribute given in the {@link Gtk.Builder} UI definition.
|
|
5567
5603
|
* {@link Gtk.Widget} stores the name as object data. Implement this method if your
|
|
5568
|
-
* object has some notion of
|
|
5604
|
+
* object has some notion of “ID” and it makes sense to map the XML id
|
|
5569
5605
|
* attribute to it.
|
|
5570
5606
|
* @param id
|
|
5571
5607
|
* @virtual
|
|
@@ -6514,7 +6550,7 @@ export namespace GtkSource {
|
|
|
6514
6550
|
/**
|
|
6515
6551
|
* Stores the id attribute given in the {@link Gtk.Builder} UI definition.
|
|
6516
6552
|
* {@link Gtk.Widget} stores the name as object data. Implement this method if your
|
|
6517
|
-
* object has some notion of
|
|
6553
|
+
* object has some notion of “ID” and it makes sense to map the XML id
|
|
6518
6554
|
* attribute to it.
|
|
6519
6555
|
* @param id
|
|
6520
6556
|
* @virtual
|
|
@@ -10707,7 +10743,7 @@ export namespace GtkSource {
|
|
|
10707
10743
|
* Usually this function is used when the widget is located (or will be
|
|
10708
10744
|
* located) within the hierarchy of a {@link Gtk.ApplicationWindow}.
|
|
10709
10745
|
*
|
|
10710
|
-
* Names are of the form
|
|
10746
|
+
* Names are of the form “win.save” or “app.quit” for actions on the
|
|
10711
10747
|
* containing {@link ApplicationWindow} or its associated {@link Application},
|
|
10712
10748
|
* respectively. This is the same form used for actions in the {@link Gio.Menu}
|
|
10713
10749
|
* associated with the window.
|
|
@@ -10723,14 +10759,14 @@ export namespace GtkSource {
|
|
|
10723
10759
|
* The target value has two purposes. First, it is used as the parameter
|
|
10724
10760
|
* to activation of the action associated with the {@link Gtk.Actionable} widget.
|
|
10725
10761
|
* Second, it is used to determine if the widget should be rendered as
|
|
10726
|
-
*
|
|
10762
|
+
* “active” — the widget is active if the state is equal to the given target.
|
|
10727
10763
|
*
|
|
10728
10764
|
* Consider the example of associating a set of buttons with a {@link Gio.Action}
|
|
10729
|
-
* with string state in a typical
|
|
10765
|
+
* with string state in a typical “radio button” situation. Each button
|
|
10730
10766
|
* will be associated with the same action, but with a different target
|
|
10731
10767
|
* value for that action. Clicking on a particular button will activate
|
|
10732
10768
|
* the action with the target of that button, which will typically cause
|
|
10733
|
-
* the action
|
|
10769
|
+
* the action’s state to change to that value. Since the action’s state
|
|
10734
10770
|
* is now equal to the target value of the button, the button will now
|
|
10735
10771
|
* be rendered as active (and the other buttons, with different targets,
|
|
10736
10772
|
* rendered inactive).
|
|
@@ -10770,7 +10806,7 @@ export namespace GtkSource {
|
|
|
10770
10806
|
* Usually this function is used when the widget is located (or will be
|
|
10771
10807
|
* located) within the hierarchy of a {@link Gtk.ApplicationWindow}.
|
|
10772
10808
|
*
|
|
10773
|
-
* Names are of the form
|
|
10809
|
+
* Names are of the form “win.save” or “app.quit” for actions on the
|
|
10774
10810
|
* containing {@link ApplicationWindow} or its associated {@link Application},
|
|
10775
10811
|
* respectively. This is the same form used for actions in the {@link Gio.Menu}
|
|
10776
10812
|
* associated with the window.
|
|
@@ -10787,14 +10823,14 @@ export namespace GtkSource {
|
|
|
10787
10823
|
* The target value has two purposes. First, it is used as the parameter
|
|
10788
10824
|
* to activation of the action associated with the {@link Gtk.Actionable} widget.
|
|
10789
10825
|
* Second, it is used to determine if the widget should be rendered as
|
|
10790
|
-
*
|
|
10826
|
+
* “active” — the widget is active if the state is equal to the given target.
|
|
10791
10827
|
*
|
|
10792
10828
|
* Consider the example of associating a set of buttons with a {@link Gio.Action}
|
|
10793
|
-
* with string state in a typical
|
|
10829
|
+
* with string state in a typical “radio button” situation. Each button
|
|
10794
10830
|
* will be associated with the same action, but with a different target
|
|
10795
10831
|
* value for that action. Clicking on a particular button will activate
|
|
10796
10832
|
* the action with the target of that button, which will typically cause
|
|
10797
|
-
* the action
|
|
10833
|
+
* the action’s state to change to that value. Since the action’s state
|
|
10798
10834
|
* is now equal to the target value of the button, the button will now
|
|
10799
10835
|
* be rendered as active (and the other buttons, with different targets,
|
|
10800
10836
|
* rendered inactive).
|
|
@@ -11277,7 +11313,7 @@ export namespace GtkSource {
|
|
|
11277
11313
|
/**
|
|
11278
11314
|
* Stores the id attribute given in the {@link Gtk.Builder} UI definition.
|
|
11279
11315
|
* {@link Gtk.Widget} stores the name as object data. Implement this method if your
|
|
11280
|
-
* object has some notion of
|
|
11316
|
+
* object has some notion of “ID” and it makes sense to map the XML id
|
|
11281
11317
|
* attribute to it.
|
|
11282
11318
|
* @param id
|
|
11283
11319
|
* @virtual
|
|
@@ -11873,7 +11909,7 @@ export namespace GtkSource {
|
|
|
11873
11909
|
* Usually this function is used when the widget is located (or will be
|
|
11874
11910
|
* located) within the hierarchy of a {@link Gtk.ApplicationWindow}.
|
|
11875
11911
|
*
|
|
11876
|
-
* Names are of the form
|
|
11912
|
+
* Names are of the form “win.save” or “app.quit” for actions on the
|
|
11877
11913
|
* containing {@link ApplicationWindow} or its associated {@link Application},
|
|
11878
11914
|
* respectively. This is the same form used for actions in the {@link Gio.Menu}
|
|
11879
11915
|
* associated with the window.
|
|
@@ -11889,14 +11925,14 @@ export namespace GtkSource {
|
|
|
11889
11925
|
* The target value has two purposes. First, it is used as the parameter
|
|
11890
11926
|
* to activation of the action associated with the {@link Gtk.Actionable} widget.
|
|
11891
11927
|
* Second, it is used to determine if the widget should be rendered as
|
|
11892
|
-
*
|
|
11928
|
+
* “active” — the widget is active if the state is equal to the given target.
|
|
11893
11929
|
*
|
|
11894
11930
|
* Consider the example of associating a set of buttons with a {@link Gio.Action}
|
|
11895
|
-
* with string state in a typical
|
|
11931
|
+
* with string state in a typical “radio button” situation. Each button
|
|
11896
11932
|
* will be associated with the same action, but with a different target
|
|
11897
11933
|
* value for that action. Clicking on a particular button will activate
|
|
11898
11934
|
* the action with the target of that button, which will typically cause
|
|
11899
|
-
* the action
|
|
11935
|
+
* the action’s state to change to that value. Since the action’s state
|
|
11900
11936
|
* is now equal to the target value of the button, the button will now
|
|
11901
11937
|
* be rendered as active (and the other buttons, with different targets,
|
|
11902
11938
|
* rendered inactive).
|
|
@@ -11936,7 +11972,7 @@ export namespace GtkSource {
|
|
|
11936
11972
|
* Usually this function is used when the widget is located (or will be
|
|
11937
11973
|
* located) within the hierarchy of a {@link Gtk.ApplicationWindow}.
|
|
11938
11974
|
*
|
|
11939
|
-
* Names are of the form
|
|
11975
|
+
* Names are of the form “win.save” or “app.quit” for actions on the
|
|
11940
11976
|
* containing {@link ApplicationWindow} or its associated {@link Application},
|
|
11941
11977
|
* respectively. This is the same form used for actions in the {@link Gio.Menu}
|
|
11942
11978
|
* associated with the window.
|
|
@@ -11953,14 +11989,14 @@ export namespace GtkSource {
|
|
|
11953
11989
|
* The target value has two purposes. First, it is used as the parameter
|
|
11954
11990
|
* to activation of the action associated with the {@link Gtk.Actionable} widget.
|
|
11955
11991
|
* Second, it is used to determine if the widget should be rendered as
|
|
11956
|
-
*
|
|
11992
|
+
* “active” — the widget is active if the state is equal to the given target.
|
|
11957
11993
|
*
|
|
11958
11994
|
* Consider the example of associating a set of buttons with a {@link Gio.Action}
|
|
11959
|
-
* with string state in a typical
|
|
11995
|
+
* with string state in a typical “radio button” situation. Each button
|
|
11960
11996
|
* will be associated with the same action, but with a different target
|
|
11961
11997
|
* value for that action. Clicking on a particular button will activate
|
|
11962
11998
|
* the action with the target of that button, which will typically cause
|
|
11963
|
-
* the action
|
|
11999
|
+
* the action’s state to change to that value. Since the action’s state
|
|
11964
12000
|
* is now equal to the target value of the button, the button will now
|
|
11965
12001
|
* be rendered as active (and the other buttons, with different targets,
|
|
11966
12002
|
* rendered inactive).
|
|
@@ -12060,7 +12096,7 @@ export namespace GtkSource {
|
|
|
12060
12096
|
/**
|
|
12061
12097
|
* Stores the id attribute given in the {@link Gtk.Builder} UI definition.
|
|
12062
12098
|
* {@link Gtk.Widget} stores the name as object data. Implement this method if your
|
|
12063
|
-
* object has some notion of
|
|
12099
|
+
* object has some notion of “ID” and it makes sense to map the XML id
|
|
12064
12100
|
* attribute to it.
|
|
12065
12101
|
* @param id
|
|
12066
12102
|
* @virtual
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/gtksource-5",
|
|
3
|
-
"version": "4.
|
|
4
|
-
"libraryVersion": "5.
|
|
5
|
-
"description": "GJS TypeScript type definitions for GtkSource-5, generated from library version 5.
|
|
3
|
+
"version": "4.3.0",
|
|
4
|
+
"libraryVersion": "5.21.0",
|
|
5
|
+
"description": "GJS TypeScript type definitions for GtkSource-5, generated from library version 5.21.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"module": "gtksource-5.js",
|
|
8
8
|
"main": "gtksource-5.js",
|
|
@@ -37,21 +37,21 @@
|
|
|
37
37
|
"test": "tsc --project tsconfig.json"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@girs/gjs": "^4.
|
|
41
|
-
"@girs/gtk-4.0": "^4.
|
|
42
|
-
"@girs/gsk-4.0": "^4.
|
|
43
|
-
"@girs/graphene-1.0": "^4.
|
|
44
|
-
"@girs/gobject-2.0": "^4.
|
|
45
|
-
"@girs/glib-2.0": "^4.
|
|
46
|
-
"@girs/gdk-4.0": "^4.
|
|
47
|
-
"@girs/cairo-1.0": "^4.
|
|
48
|
-
"@girs/pangocairo-1.0": "^4.
|
|
49
|
-
"@girs/pango-1.0": "^4.
|
|
50
|
-
"@girs/harfbuzz-0.0": "^4.
|
|
51
|
-
"@girs/freetype2-2.0": "^4.
|
|
52
|
-
"@girs/gio-2.0": "^4.
|
|
53
|
-
"@girs/gmodule-2.0": "^4.
|
|
54
|
-
"@girs/gdkpixbuf-2.0": "^4.
|
|
40
|
+
"@girs/gjs": "^4.3.0",
|
|
41
|
+
"@girs/gtk-4.0": "^4.3.0",
|
|
42
|
+
"@girs/gsk-4.0": "^4.3.0",
|
|
43
|
+
"@girs/graphene-1.0": "^4.3.0",
|
|
44
|
+
"@girs/gobject-2.0": "^4.3.0",
|
|
45
|
+
"@girs/glib-2.0": "^4.3.0",
|
|
46
|
+
"@girs/gdk-4.0": "^4.3.0",
|
|
47
|
+
"@girs/cairo-1.0": "^4.3.0",
|
|
48
|
+
"@girs/pangocairo-1.0": "^4.3.0",
|
|
49
|
+
"@girs/pango-1.0": "^4.3.0",
|
|
50
|
+
"@girs/harfbuzz-0.0": "^4.3.0",
|
|
51
|
+
"@girs/freetype2-2.0": "^4.3.0",
|
|
52
|
+
"@girs/gio-2.0": "^4.3.0",
|
|
53
|
+
"@girs/gmodule-2.0": "^4.3.0",
|
|
54
|
+
"@girs/gdkpixbuf-2.0": "^4.3.0" },
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"typescript": "*"
|
|
57
57
|
},
|