Skip to content

Commit

Permalink
chore: regenerate types with @ts-for-gir/[email protected]
Browse files Browse the repository at this point in the history
  • Loading branch information
vixalien committed Sep 3, 2024
1 parent 0abe6f2 commit a8c2ca9
Show file tree
Hide file tree
Showing 16 changed files with 473 additions and 301 deletions.
4 changes: 2 additions & 2 deletions README.typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ export PATH=/usr/lib/sdk/typescript/bin:$PATH
YARN_GLOBAL_DIR=/tmp/yarn-global
export PATH="$YARN_GLOBAL_DIR/node_modules/.bin:$PATH"

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

### Generate modules

```bash
ts-for-gir generate -g workbench-girs/ -g /usr/share/gir-1.0/ -o workbench-girs/ --ignoreVersionConflicts
ts-for-gir generate -g workbench-girs/ -g /usr/share/gir-1.0/ -o workbench-types/ --ignoreVersionConflicts
```
17 changes: 11 additions & 6 deletions workbench-types/adw-1.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9951,7 +9951,7 @@ declare module 'gi://Adw?version=1' {
*
* `AdwAlertDialog` supports adding responses in UI definitions by via the
* `<responses>` element that may contain multiple `<response>` elements, each
* respresenting a response.
* representing a response.
*
* Each of the `<response>` elements must have the `id` attribute specifying the
* response ID. The contents of the element are used as the response label.
Expand Down Expand Up @@ -51659,7 +51659,7 @@ declare module 'gi://Adw?version=1' {
* ## Dialog Integration
*
* When placed inside an [class`Dialog]`, `AdwHeaderBar` will display the dialog
* title intead of window title. It will also adjust the decoration layout to
* title instead of window title. It will also adjust the decoration layout to
* ensure it always has a close button and nothing else. Set
* [property`HeaderBar:`show-start-title-buttons] and
* [property`HeaderBar:`show-end-title-buttons] to `FALSE` to remove it if it's
Expand Down Expand Up @@ -53287,6 +53287,9 @@ declare module 'gi://Adw?version=1' {
/**
* A child slot within [class`Layout]`.
*
* While it contains a layout child, the [property`Gtk`.Widget:visible] property
* of the slot is updated to match that of the layout child.
*
* See [class`MultiLayoutView]`.
*/
class LayoutSlot extends Gtk.Widget implements Gtk.Accessible, Gtk.Buildable, Gtk.ConstraintTarget {
Expand Down Expand Up @@ -57968,7 +57971,7 @@ declare module 'gi://Adw?version=1' {
*
* `AdwMessageDialog` supports adding responses in UI definitions by via the
* `<responses>` element that may contain multiple `<response>` elements, each
* respresenting a response.
* representing a response.
*
* Each of the `<response>` elements must have the `id` attribute specifying the
* response ID. The contents of the element are used as the response label.
Expand Down Expand Up @@ -61211,7 +61214,9 @@ declare module 'gi://Adw?version=1' {
*
* `AdwMultiLayoutView` contains layouts and children. Each child has
* an ID, each layout has slots inside it, each slot also has an ID. When
* switching layouts, children are inserted into slots with matching IDs.
* switching layouts, children are inserted into slots with matching IDs. The
* [property`Gtk`.Widget:visible] property of each slot is updated to match
* that of the inserted child.
*
* This can be useful for rearranging children when it's difficult to do so
* otherwise, for example to move a child from a sidebar to a bottom bar.
Expand Down Expand Up @@ -104864,7 +104869,7 @@ declare module 'gi://Adw?version=1' {
* Removes `shortcuts` from `self`.
*
* See [property`TabView:`shortcuts] for details.
* @param shortcuts the shortcuts to reomve
* @param shortcuts the shortcuts to remove
*/
remove_shortcuts(shortcuts: TabViewShortcuts): void;
/**
Expand Down Expand Up @@ -107550,7 +107555,7 @@ declare module 'gi://Adw?version=1' {
*/
get_bottom_bar_height(): number;
/**
* Gets appearance of the botom bars for `self`.
* Gets appearance of the bottom bars for `self`.
* @returns bottom bar style
*/
get_bottom_bar_style(): ToolbarStyle;
Expand Down
3 changes: 2 additions & 1 deletion workbench-types/atk-1.0.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ declare module 'gi://Atk?version=1.0' {
/**
* An object the user can manipulate to tell the application to do something
*/
PUSH_BUTTON,
BUTTON,
/**
* A specialized check box that will cause other radio buttons in the same group to become unchecked when this one is checked
*/
Expand Down Expand Up @@ -899,6 +899,7 @@ declare module 'gi://Atk?version=1.0' {
* not a valid role, used for finding end of the enumeration
*/
LAST_DEFINED,
PUSH_BUTTON,
}
/**
* Specifies where an object should be placed on the screen when using scroll_to.
Expand Down
3 changes: 2 additions & 1 deletion workbench-types/atspi-2.0.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,7 @@ declare module 'gi://Atspi?version=2.0' {
* An object the user can manipulate to tell the
* application to do something.
*/
PUSH_BUTTON,
BUTTON,
/**
* A specialized check box that will cause other
* radio buttons in the same group to become unchecked when this one is
Expand Down Expand Up @@ -1445,6 +1445,7 @@ declare module 'gi://Atspi?version=2.0' {
* enumeration.
*/
LAST_DEFINED,
PUSH_BUTTON,
}
/**
* Enumeration used by interface #AtspiAccessible to specify where an
Expand Down
17 changes: 10 additions & 7 deletions workbench-types/gdk-4.0.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ declare module 'gi://Gdk?version=4.0' {
* The values use the range of 16-235 (for Y) and 16-240 for u and v.
*/
NARROW,
/**
* The values use the full range.
*/
FULL,
}
/**
Expand Down Expand Up @@ -4555,7 +4558,7 @@ declare module 'gi://Gdk?version=4.0' {
*/
LEFT_RESIZABLE,
/**
* the surface is not visible to the user
* The surface is not visible to the user.
*/
SUSPENDED,
}
Expand Down Expand Up @@ -4776,7 +4779,6 @@ declare module 'gi://Gdk?version=4.0' {
* - 5: PAL
* - 6,7: BT.601 / NTSC
* - 9: BT.2020
* - 10: CIE XYZ
* - 12: Display P3
*/
get color_primaries(): number;
Expand All @@ -4791,7 +4793,6 @@ declare module 'gi://Gdk?version=4.0' {
* - 5: PAL
* - 6,7: BT.601 / NTSC
* - 9: BT.2020
* - 10: CIE XYZ
* - 12: Display P3
*/
get colorPrimaries(): number;
Expand Down Expand Up @@ -9452,9 +9453,13 @@ declare module 'gi://Gdk?version=4.0' {
* according to platform conventions.
*
* The right mouse button typically triggers context menus.
* On macOS, Control+left mouse button also triggers.
*
* This function should always be used instead of simply checking for
* event->button == %GDK_BUTTON_SECONDARY.
*
* ```c
* event->button == GDK_BUTTON_SECONDARY
* ```
* @returns %TRUE if the event should trigger a context menu.
*/
triggers_context_menu(): boolean;
Expand Down Expand Up @@ -14470,9 +14475,7 @@ declare module 'gi://Gdk?version=4.0' {
* Crucially, GTK knows how to convert colors from one color
* state to another.
*
* `GdkColorState objects are immutable and therefore threadsafe.
*
* Since 4.16
* `GdkColorState` objects are immutable and therefore threadsafe.
*/
abstract class ColorState {
static $gtype: GObject.GType<ColorState>;
Expand Down
64 changes: 50 additions & 14 deletions workbench-types/gio-2.0.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -706,8 +706,8 @@ declare module 'gi://Gio?version=2.0' {
MULTIDISK,
/**
* The start/stop methods will
* unlock/lock the disk (for example using the ATA <quote>SECURITY
* UNLOCK DEVICE</quote> command)
* unlock/lock the disk (for example using the ATA `SECURITY UNLOCK
* DEVICE` command)
*/
PASSWORD,
}
Expand Down Expand Up @@ -5388,6 +5388,21 @@ declare module 'gi://Gio?version=2.0' {
* @returns a #GList of the UNIX mountpoints.
*/
function unix_mount_points_get(): [UnixMountPoint[], number];
/**
* Gets an array of [struct`Gio`.UnixMountPoint]s containing the Unix mount
* points listed in `table_path`.
*
* This is a generalized version of g_unix_mount_points_get(), mainly intended
* for internal testing use. Note that g_unix_mount_points_get() may parse
* multiple hierarchical table files, so this function is not a direct superset
* of its functionality.
*
* If there is an error reading or parsing the file, `NULL` will be returned
* and both out parameters will be set to `0`.
* @param table_path path to the mount points table file (for example `/etc/fstab`)
* @returns mount points, or `NULL` if there was an error loading them
*/
function unix_mount_points_get_from_file(table_path: string): [UnixMountPoint[] | null, number];
/**
* Checks if the unix mounts have changed since a given unix time.
* @param time guint64 to contain a timestamp.
Expand All @@ -5402,6 +5417,21 @@ declare module 'gi://Gio?version=2.0' {
* @returns a #GList of the UNIX mounts.
*/
function unix_mounts_get(): [UnixMountEntry[], number];
/**
* Gets an array of [struct`Gio`.UnixMountEntry]s containing the Unix mounts
* listed in `table_path`.
*
* This is a generalized version of g_unix_mounts_get(), mainly intended for
* internal testing use. Note that g_unix_mounts_get() may parse multiple
* hierarchical table files, so this function is not a direct superset of its
* functionality.
*
* If there is an error reading or parsing the file, `NULL` will be returned
* and both out parameters will be set to `0`.
* @param table_path path to the mounts table file (for example `/proc/self/mountinfo`)
* @returns mount entries, or `NULL` if there was an error loading them
*/
function unix_mounts_get_from_file(table_path: string): [UnixMountEntry[] | null, number];
interface AsyncReadyCallback<A = GObject.Object> {
(source_object: A | null, res: AsyncResult, data?: any | null): void;
}
Expand Down Expand Up @@ -7036,10 +7066,12 @@ declare module 'gi://Gio?version=2.0' {
* [freedesktop.org Startup Notification Protocol](http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt).
*
* Support for the XDG Activation Protocol was added in GLib 2.76.
* Since GLib 2.82 `info` and `files` can be `NULL`. If that’s not supported by the backend,
* the returned token will be `NULL`.
* @param info the app info
* @param files list of [[email protected]] objects
* @param files a list of [[email protected]] objects
*/
vfunc_get_startup_notify_id(info: AppInfo, files: File[]): string | null;
vfunc_get_startup_notify_id(info?: AppInfo | null, files?: File[] | null): string | null;
/**
* Called when an application has failed to launch, so that it can cancel
* the application startup notification started in
Expand Down Expand Up @@ -7083,11 +7115,13 @@ declare module 'gi://Gio?version=2.0' {
* [freedesktop.org Startup Notification Protocol](http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt).
*
* Support for the XDG Activation Protocol was added in GLib 2.76.
* Since GLib 2.82 `info` and `files` can be `NULL`. If that’s not supported by the backend,
* the returned token will be `NULL`.
* @param info the app info
* @param files list of [[email protected]] objects
* @param files a list of [[email protected]] objects
* @returns a startup notification ID for the application, or `NULL` if not supported.
*/
get_startup_notify_id(info: AppInfo, files: File[]): string | null;
get_startup_notify_id(info?: AppInfo | null, files?: File[] | null): string | null;
/**
* Called when an application has failed to launch, so that it can cancel
* the application startup notification started in
Expand Down Expand Up @@ -37372,6 +37406,8 @@ declare module 'gi://Gio?version=2.0' {
*
* ![](menu-example.png)
*
* While this kind of deeply nested menu is no longer considered good UI
* practice, it serves as a good example of the concepts in `GMenuModel`.
* There are 8 ‘menus’ visible in the screenshot: one menubar, two
* submenus and 5 sections:
*
Expand Down Expand Up @@ -46744,7 +46780,7 @@ declare module 'gi://Gio?version=2.0' {
* Looks into the system proxy configuration to determine what proxy,
* if any, to use to connect to `uri`. The returned proxy URIs are of
* the form `<protocol>://[user[:password]`]`host[:port]` or
* `direct://`, where <protocol> could be http, rtsp, socks
* `direct://`, where `<protocol>` could be http, rtsp, socks
* or other proxying protocol.
*
* If you don't know what network protocol is being used on the
Expand Down Expand Up @@ -46791,7 +46827,7 @@ declare module 'gi://Gio?version=2.0' {
* Looks into the system proxy configuration to determine what proxy,
* if any, to use to connect to `uri`. The returned proxy URIs are of
* the form `<protocol>://[user[:password]`]`host[:port]` or
* `direct://`, where <protocol> could be http, rtsp, socks
* `direct://`, where `<protocol>` could be http, rtsp, socks
* or other proxying protocol.
*
* If you don't know what network protocol is being used on the
Expand Down Expand Up @@ -47718,7 +47754,7 @@ declare module 'gi://Gio?version=2.0' {
* getsockopt(). (If you need to fetch a non-integer-valued option,
* you will need to call getsockopt() directly.)
*
* The [<gio/gnetworking.h>][gio-gnetworking.h]
* The [`<gio/gnetworking.h>`](networking.html)
* header pulls in system headers that will define most of the
* standard/portable socket options. For unusual socket protocols or
* platform-dependent options, you may need to include additional
Expand Down Expand Up @@ -48328,7 +48364,7 @@ declare module 'gi://Gio?version=2.0' {
* setsockopt(). (If you need to set a non-integer-valued option,
* you will need to call setsockopt() directly.)
*
* The [<gio/gnetworking.h>][gio-gnetworking.h]
* The [`<gio/gnetworking.h>`](networking.html)
* header pulls in system headers that will define most of the
* standard/portable socket options. For unusual socket protocols or
* platform-dependent options, you may need to include additional
Expand Down Expand Up @@ -64157,7 +64193,7 @@ declare module 'gi://Gio?version=2.0' {
}

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

type UnixMountMonitorClass = typeof UnixMountMonitor;
/**
* Defines a Unix mount point (e.g. <filename>/dev</filename>).
* Defines a Unix mount point (e.g. `/dev`).
* This corresponds roughly to a fstab entry.
*/
abstract class UnixMountPoint {
Expand Down Expand Up @@ -73808,7 +73844,7 @@ declare module 'gi://Gio?version=2.0' {
* Looks into the system proxy configuration to determine what proxy,
* if any, to use to connect to `uri`. The returned proxy URIs are of
* the form `<protocol>://[user[:password]`]`host[:port]` or
* `direct://`, where <protocol> could be http, rtsp, socks
* `direct://`, where `<protocol>` could be http, rtsp, socks
* or other proxying protocol.
*
* If you don't know what network protocol is being used on the
Expand Down Expand Up @@ -73858,7 +73894,7 @@ declare module 'gi://Gio?version=2.0' {
* Looks into the system proxy configuration to determine what proxy,
* if any, to use to connect to `uri`. The returned proxy URIs are of
* the form `<protocol>://[user[:password]`]`host[:port]` or
* `direct://`, where <protocol> could be http, rtsp, socks
* `direct://`, where `<protocol>` could be http, rtsp, socks
* or other proxying protocol.
*
* If you don't know what network protocol is being used on the
Expand Down
Loading

0 comments on commit a8c2ca9

Please sign in to comment.