Skip to content

Commit a8c2ca9

Browse files
committed
chore: regenerate types with @ts-for-gir/[email protected]
1 parent 0abe6f2 commit a8c2ca9

16 files changed

+473
-301
lines changed

README.typescript.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ export PATH=/usr/lib/sdk/typescript/bin:$PATH
3636
YARN_GLOBAL_DIR=/tmp/yarn-global
3737
export PATH="$YARN_GLOBAL_DIR/node_modules/.bin:$PATH"
3838

39-
yarn --global-folder $YARN_GLOBAL_DIR global add @ts-for-gir/[email protected].14
39+
yarn --global-folder $YARN_GLOBAL_DIR global add @ts-for-gir/[email protected].15
4040
```
4141

4242
### Generate modules
4343

4444
```bash
45-
ts-for-gir generate -g workbench-girs/ -g /usr/share/gir-1.0/ -o workbench-girs/ --ignoreVersionConflicts
45+
ts-for-gir generate -g workbench-girs/ -g /usr/share/gir-1.0/ -o workbench-types/ --ignoreVersionConflicts
4646
```

workbench-types/adw-1.d.ts

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9951,7 +9951,7 @@ declare module 'gi://Adw?version=1' {
99519951
*
99529952
* `AdwAlertDialog` supports adding responses in UI definitions by via the
99539953
* `<responses>` element that may contain multiple `<response>` elements, each
9954-
* respresenting a response.
9954+
* representing a response.
99559955
*
99569956
* Each of the `<response>` elements must have the `id` attribute specifying the
99579957
* response ID. The contents of the element are used as the response label.
@@ -51659,7 +51659,7 @@ declare module 'gi://Adw?version=1' {
5165951659
* ## Dialog Integration
5166051660
*
5166151661
* When placed inside an [class`Dialog]`, `AdwHeaderBar` will display the dialog
51662-
* title intead of window title. It will also adjust the decoration layout to
51662+
* title instead of window title. It will also adjust the decoration layout to
5166351663
* ensure it always has a close button and nothing else. Set
5166451664
* [property`HeaderBar:`show-start-title-buttons] and
5166551665
* [property`HeaderBar:`show-end-title-buttons] to `FALSE` to remove it if it's
@@ -53287,6 +53287,9 @@ declare module 'gi://Adw?version=1' {
5328753287
/**
5328853288
* A child slot within [class`Layout]`.
5328953289
*
53290+
* While it contains a layout child, the [property`Gtk`.Widget:visible] property
53291+
* of the slot is updated to match that of the layout child.
53292+
*
5329053293
* See [class`MultiLayoutView]`.
5329153294
*/
5329253295
class LayoutSlot extends Gtk.Widget implements Gtk.Accessible, Gtk.Buildable, Gtk.ConstraintTarget {
@@ -57968,7 +57971,7 @@ declare module 'gi://Adw?version=1' {
5796857971
*
5796957972
* `AdwMessageDialog` supports adding responses in UI definitions by via the
5797057973
* `<responses>` element that may contain multiple `<response>` elements, each
57971-
* respresenting a response.
57974+
* representing a response.
5797257975
*
5797357976
* Each of the `<response>` elements must have the `id` attribute specifying the
5797457977
* response ID. The contents of the element are used as the response label.
@@ -61211,7 +61214,9 @@ declare module 'gi://Adw?version=1' {
6121161214
*
6121261215
* `AdwMultiLayoutView` contains layouts and children. Each child has
6121361216
* an ID, each layout has slots inside it, each slot also has an ID. When
61214-
* switching layouts, children are inserted into slots with matching IDs.
61217+
* switching layouts, children are inserted into slots with matching IDs. The
61218+
* [property`Gtk`.Widget:visible] property of each slot is updated to match
61219+
* that of the inserted child.
6121561220
*
6121661221
* This can be useful for rearranging children when it's difficult to do so
6121761222
* otherwise, for example to move a child from a sidebar to a bottom bar.
@@ -104864,7 +104869,7 @@ declare module 'gi://Adw?version=1' {
104864104869
* Removes `shortcuts` from `self`.
104865104870
*
104866104871
* See [property`TabView:`shortcuts] for details.
104867-
* @param shortcuts the shortcuts to reomve
104872+
* @param shortcuts the shortcuts to remove
104868104873
*/
104869104874
remove_shortcuts(shortcuts: TabViewShortcuts): void;
104870104875
/**
@@ -107550,7 +107555,7 @@ declare module 'gi://Adw?version=1' {
107550107555
*/
107551107556
get_bottom_bar_height(): number;
107552107557
/**
107553-
* Gets appearance of the botom bars for `self`.
107558+
* Gets appearance of the bottom bars for `self`.
107554107559
* @returns bottom bar style
107555107560
*/
107556107561
get_bottom_bar_style(): ToolbarStyle;

workbench-types/atk-1.0.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ declare module 'gi://Atk?version=1.0' {
479479
/**
480480
* An object the user can manipulate to tell the application to do something
481481
*/
482-
PUSH_BUTTON,
482+
BUTTON,
483483
/**
484484
* A specialized check box that will cause other radio buttons in the same group to become unchecked when this one is checked
485485
*/
@@ -899,6 +899,7 @@ declare module 'gi://Atk?version=1.0' {
899899
* not a valid role, used for finding end of the enumeration
900900
*/
901901
LAST_DEFINED,
902+
PUSH_BUTTON,
902903
}
903904
/**
904905
* Specifies where an object should be placed on the screen when using scroll_to.

workbench-types/atspi-2.0.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ declare module 'gi://Atspi?version=2.0' {
924924
* An object the user can manipulate to tell the
925925
* application to do something.
926926
*/
927-
PUSH_BUTTON,
927+
BUTTON,
928928
/**
929929
* A specialized check box that will cause other
930930
* radio buttons in the same group to become unchecked when this one is
@@ -1445,6 +1445,7 @@ declare module 'gi://Atspi?version=2.0' {
14451445
* enumeration.
14461446
*/
14471447
LAST_DEFINED,
1448+
PUSH_BUTTON,
14481449
}
14491450
/**
14501451
* Enumeration used by interface #AtspiAccessible to specify where an

workbench-types/gdk-4.0.d.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,9 @@ declare module 'gi://Gdk?version=4.0' {
135135
* The values use the range of 16-235 (for Y) and 16-240 for u and v.
136136
*/
137137
NARROW,
138+
/**
139+
* The values use the full range.
140+
*/
138141
FULL,
139142
}
140143
/**
@@ -4555,7 +4558,7 @@ declare module 'gi://Gdk?version=4.0' {
45554558
*/
45564559
LEFT_RESIZABLE,
45574560
/**
4558-
* the surface is not visible to the user
4561+
* The surface is not visible to the user.
45594562
*/
45604563
SUSPENDED,
45614564
}
@@ -4776,7 +4779,6 @@ declare module 'gi://Gdk?version=4.0' {
47764779
* - 5: PAL
47774780
* - 6,7: BT.601 / NTSC
47784781
* - 9: BT.2020
4779-
* - 10: CIE XYZ
47804782
* - 12: Display P3
47814783
*/
47824784
get color_primaries(): number;
@@ -4791,7 +4793,6 @@ declare module 'gi://Gdk?version=4.0' {
47914793
* - 5: PAL
47924794
* - 6,7: BT.601 / NTSC
47934795
* - 9: BT.2020
4794-
* - 10: CIE XYZ
47954796
* - 12: Display P3
47964797
*/
47974798
get colorPrimaries(): number;
@@ -9452,9 +9453,13 @@ declare module 'gi://Gdk?version=4.0' {
94529453
* according to platform conventions.
94539454
*
94549455
* The right mouse button typically triggers context menus.
9456+
* On macOS, Control+left mouse button also triggers.
94559457
*
94569458
* This function should always be used instead of simply checking for
9457-
* event->button == %GDK_BUTTON_SECONDARY.
9459+
*
9460+
* ```c
9461+
* event->button == GDK_BUTTON_SECONDARY
9462+
* ```
94589463
* @returns %TRUE if the event should trigger a context menu.
94599464
*/
94609465
triggers_context_menu(): boolean;
@@ -14470,9 +14475,7 @@ declare module 'gi://Gdk?version=4.0' {
1447014475
* Crucially, GTK knows how to convert colors from one color
1447114476
* state to another.
1447214477
*
14473-
* `GdkColorState objects are immutable and therefore threadsafe.
14474-
*
14475-
* Since 4.16
14478+
* `GdkColorState` objects are immutable and therefore threadsafe.
1447614479
*/
1447714480
abstract class ColorState {
1447814481
static $gtype: GObject.GType<ColorState>;

workbench-types/gio-2.0.d.ts

Lines changed: 50 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -706,8 +706,8 @@ declare module 'gi://Gio?version=2.0' {
706706
MULTIDISK,
707707
/**
708708
* The start/stop methods will
709-
* unlock/lock the disk (for example using the ATA <quote>SECURITY
710-
* UNLOCK DEVICE</quote> command)
709+
* unlock/lock the disk (for example using the ATA `SECURITY UNLOCK
710+
* DEVICE` command)
711711
*/
712712
PASSWORD,
713713
}
@@ -5388,6 +5388,21 @@ declare module 'gi://Gio?version=2.0' {
53885388
* @returns a #GList of the UNIX mountpoints.
53895389
*/
53905390
function unix_mount_points_get(): [UnixMountPoint[], number];
5391+
/**
5392+
* Gets an array of [struct`Gio`.UnixMountPoint]s containing the Unix mount
5393+
* points listed in `table_path`.
5394+
*
5395+
* This is a generalized version of g_unix_mount_points_get(), mainly intended
5396+
* for internal testing use. Note that g_unix_mount_points_get() may parse
5397+
* multiple hierarchical table files, so this function is not a direct superset
5398+
* of its functionality.
5399+
*
5400+
* If there is an error reading or parsing the file, `NULL` will be returned
5401+
* and both out parameters will be set to `0`.
5402+
* @param table_path path to the mount points table file (for example `/etc/fstab`)
5403+
* @returns mount points, or `NULL` if there was an error loading them
5404+
*/
5405+
function unix_mount_points_get_from_file(table_path: string): [UnixMountPoint[] | null, number];
53915406
/**
53925407
* Checks if the unix mounts have changed since a given unix time.
53935408
* @param time guint64 to contain a timestamp.
@@ -5402,6 +5417,21 @@ declare module 'gi://Gio?version=2.0' {
54025417
* @returns a #GList of the UNIX mounts.
54035418
*/
54045419
function unix_mounts_get(): [UnixMountEntry[], number];
5420+
/**
5421+
* Gets an array of [struct`Gio`.UnixMountEntry]s containing the Unix mounts
5422+
* listed in `table_path`.
5423+
*
5424+
* This is a generalized version of g_unix_mounts_get(), mainly intended for
5425+
* internal testing use. Note that g_unix_mounts_get() may parse multiple
5426+
* hierarchical table files, so this function is not a direct superset of its
5427+
* functionality.
5428+
*
5429+
* If there is an error reading or parsing the file, `NULL` will be returned
5430+
* and both out parameters will be set to `0`.
5431+
* @param table_path path to the mounts table file (for example `/proc/self/mountinfo`)
5432+
* @returns mount entries, or `NULL` if there was an error loading them
5433+
*/
5434+
function unix_mounts_get_from_file(table_path: string): [UnixMountEntry[] | null, number];
54055435
interface AsyncReadyCallback<A = GObject.Object> {
54065436
(source_object: A | null, res: AsyncResult, data?: any | null): void;
54075437
}
@@ -7036,10 +7066,12 @@ declare module 'gi://Gio?version=2.0' {
70367066
* [freedesktop.org Startup Notification Protocol](http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt).
70377067
*
70387068
* Support for the XDG Activation Protocol was added in GLib 2.76.
7069+
* Since GLib 2.82 `info` and `files` can be `NULL`. If that’s not supported by the backend,
7070+
* the returned token will be `NULL`.
70397071
* @param info the app info
7040-
* @param files list of [[email protected]] objects
7072+
* @param files a list of [[email protected]] objects
70417073
*/
7042-
vfunc_get_startup_notify_id(info: AppInfo, files: File[]): string | null;
7074+
vfunc_get_startup_notify_id(info?: AppInfo | null, files?: File[] | null): string | null;
70437075
/**
70447076
* Called when an application has failed to launch, so that it can cancel
70457077
* the application startup notification started in
@@ -7083,11 +7115,13 @@ declare module 'gi://Gio?version=2.0' {
70837115
* [freedesktop.org Startup Notification Protocol](http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt).
70847116
*
70857117
* Support for the XDG Activation Protocol was added in GLib 2.76.
7118+
* Since GLib 2.82 `info` and `files` can be `NULL`. If that’s not supported by the backend,
7119+
* the returned token will be `NULL`.
70867120
* @param info the app info
7087-
* @param files list of [[email protected]] objects
7121+
* @param files a list of [[email protected]] objects
70887122
* @returns a startup notification ID for the application, or `NULL` if not supported.
70897123
*/
7090-
get_startup_notify_id(info: AppInfo, files: File[]): string | null;
7124+
get_startup_notify_id(info?: AppInfo | null, files?: File[] | null): string | null;
70917125
/**
70927126
* Called when an application has failed to launch, so that it can cancel
70937127
* the application startup notification started in
@@ -37372,6 +37406,8 @@ declare module 'gi://Gio?version=2.0' {
3737237406
*
3737337407
* ![](menu-example.png)
3737437408
*
37409+
* While this kind of deeply nested menu is no longer considered good UI
37410+
* practice, it serves as a good example of the concepts in `GMenuModel`.
3737537411
* There are 8 ‘menus’ visible in the screenshot: one menubar, two
3737637412
* submenus and 5 sections:
3737737413
*
@@ -46744,7 +46780,7 @@ declare module 'gi://Gio?version=2.0' {
4674446780
* Looks into the system proxy configuration to determine what proxy,
4674546781
* if any, to use to connect to `uri`. The returned proxy URIs are of
4674646782
* the form `<protocol>://[user[:password]`]`host[:port]` or
46747-
* `direct://`, where <protocol> could be http, rtsp, socks
46783+
* `direct://`, where `<protocol>` could be http, rtsp, socks
4674846784
* or other proxying protocol.
4674946785
*
4675046786
* If you don't know what network protocol is being used on the
@@ -46791,7 +46827,7 @@ declare module 'gi://Gio?version=2.0' {
4679146827
* Looks into the system proxy configuration to determine what proxy,
4679246828
* if any, to use to connect to `uri`. The returned proxy URIs are of
4679346829
* the form `<protocol>://[user[:password]`]`host[:port]` or
46794-
* `direct://`, where <protocol> could be http, rtsp, socks
46830+
* `direct://`, where `<protocol>` could be http, rtsp, socks
4679546831
* or other proxying protocol.
4679646832
*
4679746833
* If you don't know what network protocol is being used on the
@@ -47718,7 +47754,7 @@ declare module 'gi://Gio?version=2.0' {
4771847754
* getsockopt(). (If you need to fetch a non-integer-valued option,
4771947755
* you will need to call getsockopt() directly.)
4772047756
*
47721-
* The [<gio/gnetworking.h>][gio-gnetworking.h]
47757+
* The [`<gio/gnetworking.h>`](networking.html)
4772247758
* header pulls in system headers that will define most of the
4772347759
* standard/portable socket options. For unusual socket protocols or
4772447760
* platform-dependent options, you may need to include additional
@@ -48328,7 +48364,7 @@ declare module 'gi://Gio?version=2.0' {
4832848364
* setsockopt(). (If you need to set a non-integer-valued option,
4832948365
* you will need to call setsockopt() directly.)
4833048366
*
48331-
* The [<gio/gnetworking.h>][gio-gnetworking.h]
48367+
* The [`<gio/gnetworking.h>`](networking.html)
4833248368
* header pulls in system headers that will define most of the
4833348369
* standard/portable socket options. For unusual socket protocols or
4833448370
* platform-dependent options, you may need to include additional
@@ -64157,7 +64193,7 @@ declare module 'gi://Gio?version=2.0' {
6415764193
}
6415864194

6415964195
/**
64160-
* Defines a Unix mount entry (e.g. <filename>/media/cdrom</filename>).
64196+
* Defines a Unix mount entry (e.g. `/media/cdrom`).
6416164197
* This corresponds roughly to a mtab entry.
6416264198
*/
6416364199
abstract class UnixMountEntry {
@@ -64170,7 +64206,7 @@ declare module 'gi://Gio?version=2.0' {
6417064206

6417164207
type UnixMountMonitorClass = typeof UnixMountMonitor;
6417264208
/**
64173-
* Defines a Unix mount point (e.g. <filename>/dev</filename>).
64209+
* Defines a Unix mount point (e.g. `/dev`).
6417464210
* This corresponds roughly to a fstab entry.
6417564211
*/
6417664212
abstract class UnixMountPoint {
@@ -73808,7 +73844,7 @@ declare module 'gi://Gio?version=2.0' {
7380873844
* Looks into the system proxy configuration to determine what proxy,
7380973845
* if any, to use to connect to `uri`. The returned proxy URIs are of
7381073846
* the form `<protocol>://[user[:password]`]`host[:port]` or
73811-
* `direct://`, where <protocol> could be http, rtsp, socks
73847+
* `direct://`, where `<protocol>` could be http, rtsp, socks
7381273848
* or other proxying protocol.
7381373849
*
7381473850
* If you don't know what network protocol is being used on the
@@ -73858,7 +73894,7 @@ declare module 'gi://Gio?version=2.0' {
7385873894
* Looks into the system proxy configuration to determine what proxy,
7385973895
* if any, to use to connect to `uri`. The returned proxy URIs are of
7386073896
* the form `<protocol>://[user[:password]`]`host[:port]` or
73861-
* `direct://`, where <protocol> could be http, rtsp, socks
73897+
* `direct://`, where `<protocol>` could be http, rtsp, socks
7386273898
* or other proxying protocol.
7386373899
*
7386473900
* If you don't know what network protocol is being used on the

0 commit comments

Comments
 (0)