Skip to content

Commit

Permalink
Merge pull request #31 from gjsify/v4
Browse files Browse the repository at this point in the history
Upgrade gir dependencies to v4
  • Loading branch information
JumpLink authored Apr 9, 2024
2 parents bd72333 + 3412f7e commit c8c0798
Show file tree
Hide file tree
Showing 30 changed files with 741 additions and 701 deletions.
Binary file added .github/gjsify-gnome-shell-open-graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions examples/hello-world/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gjsify/gnome-shell-hello-world-example",
"version": "46.0.0-beta6",
"version": "46.0.0-4.0.0-beta.2",
"description": "Simple Gnome Shell Hello World Extension example",
"type": "module",
"main": "dist/extension.js",
Expand All @@ -17,12 +17,12 @@
"@tsconfig/strictest": "^2.0.5",
"adm-zip": "^0.5.12",
"esbuild": "^0.20.2",
"typescript": "5.4.3"
"typescript": "5.4.4"
},
"dependencies": {
"@girs/gjs": "^3.3.0",
"@girs/gnome-shell": "workspace:^",
"@girs/gobject-2.0": "^2.78.0-3.3.0",
"@girs/st-14": "^14.0.0-3.3.0"
"@girs/st-14": "^14.0.0-4.0.0-beta.2"
}
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gnome-shell",
"version": "46.0.0-beta6",
"version": "46.0.0-4.0.0-beta.2",
"description": "GJS TypeScript type definitions for GNOME Shell Extensions",
"main": "src/index.js",
"type": "module",
Expand Down Expand Up @@ -55,6 +55,6 @@
"packageManager": "yarn@4.1.1",
"devDependencies": {
"prettier": "^3.2.5",
"typescript": "5.4.3"
"typescript": "5.4.4"
}
}
52 changes: 26 additions & 26 deletions packages/gnome-shell/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@girs/gnome-shell",
"version": "46.0.0-beta6",
"version": "46.0.0-4.0.0-beta.2",
"description": "GJS TypeScript type definitions for GNOME Shell Extensions",
"type": "module",
"main": "./dist/index.js",
Expand Down Expand Up @@ -917,34 +917,34 @@
"generate:types": "node ./scripts/generate-types.js"
},
"dependencies": {
"@girs/accountsservice-1.0": "^1.0.0-3.3.0",
"@girs/adw-1": "^1.4.3-3.3.0",
"@girs/atk-1.0": "^2.50.1-3.3.0",
"@girs/cally-14": "^14.0.0-3.3.0",
"@girs/clutter-14": "^14.0.0-3.3.0",
"@girs/cogl-2.0": "^2.0.0-3.3.0",
"@girs/gcr-4": "^4.1.0-3.3.0",
"@girs/gdm-1.0": "^1.0.0-3.3.0",
"@girs/gio-2.0": "^2.78.0-3.3.0",
"@girs/gjs": "^3.3.0",
"@girs/glib-2.0": "^2.78.0-3.3.0",
"@girs/gnomebg-4.0": "^4.0.0-3.3.0",
"@girs/gnomebluetooth-3.0": "^3.0.0-3.3.0",
"@girs/gnomedesktop-4.0": "^4.0.0-3.3.0",
"@girs/gobject-2.0": "^2.78.0-3.3.0",
"@girs/gtk-4.0": "^4.12.5-3.3.0",
"@girs/gvc-1.0": "^1.0.0-3.3.0",
"@girs/meta-14": "^14.0.0-3.3.0",
"@girs/mtk-14": "^14.0.0-3.3.0",
"@girs/polkit-1.0": "^1.0.0-3.3.0",
"@girs/shell-14": "^14.0.0-3.3.0",
"@girs/shew-0": "^0.0.0-3.3.0",
"@girs/st-14": "^14.0.0-3.3.0",
"@girs/upowerglib-1.0": "^0.99.1-3.3.0"
"@girs/accountsservice-1.0": "^1.0.0-4.0.0-beta.2",
"@girs/adw-1": "^1.5.0-4.0.0-beta.2",
"@girs/atk-1.0": "2.52.0-4.0.0-beta.2",
"@girs/cally-14": "^14.0.0-4.0.0-beta.2",
"@girs/clutter-14": "^14.0.0-4.0.0-beta.2",
"@girs/cogl-2.0": "^2.0.0-4.0.0-beta.2",
"@girs/gcr-4": "^4.2.1-4.0.0-beta.2",
"@girs/gdm-1.0": "^1.0.0-4.0.0-beta.2",
"@girs/gio-2.0": "^2.80.0-4.0.0-beta.2",
"@girs/gjs": "^4.0.0-beta.2",
"@girs/glib-2.0": "^2.80.0-4.0.0-beta.2",
"@girs/gnomebg-4.0": "^4.0.0-4.0.0-beta.2",
"@girs/gnomebluetooth-3.0": "^3.0.0-4.0.0-beta.2",
"@girs/gnomedesktop-4.0": "^4.0.0-4.0.0-beta.2",
"@girs/gobject-2.0": "^2.80.0-4.0.0-beta.2",
"@girs/gtk-4.0": "^4.14.1-4.0.0-beta.2",
"@girs/gvc-1.0": "^1.0.0-4.0.0-beta.2",
"@girs/meta-14": "^14.0.0-4.0.0-beta.2",
"@girs/mtk-14": "^14.0.0-4.0.0-beta.2",
"@girs/polkit-1.0": "^1.0.0-4.0.0-beta.2",
"@girs/shell-14": "^14.0.0-4.0.0-beta.2",
"@girs/shew-0": "^0.0.0-4.0.0-beta.2",
"@girs/st-14": "^14.0.0-4.0.0-beta.2",
"@girs/upowerglib-1.0": "^0.99.1-4.0.0-beta.2"
},
"devDependencies": {
"@tsconfig/strictest": "^2.0.5",
"typescript": "5.4.3"
"typescript": "5.4.4"
},
"keywords": [
"Gir",
Expand Down
6 changes: 3 additions & 3 deletions packages/gnome-shell/src/ui/animation.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export class Animation extends St.Bin {
constructor(file: Gio.File, width: number, height: number, speed: number);

/** @hidden */
public _init(props?: St.Bin.ConstructorProperties): void;
public _init(props?: St.Bin.ConstructorProps): void;
public _init(file: Gio.File, width: number, height: number, speed: number): void;

public play(): void;
Expand All @@ -25,7 +25,7 @@ export class Animation extends St.Bin {
export class AnimatedIcon extends Animation {
constructor(file: Gio.File, size: number);
/** @hidden */
public _init(props?: St.Bin.ConstructorProperties): void;
public _init(props?: St.Bin.ConstructorProps): void;
/** @hidden */
public _init(file: Gio.File, width: number, height: number, speed: number): void;
public _init(file: Gio.File, size: number): void;
Expand All @@ -34,7 +34,7 @@ export class AnimatedIcon extends Animation {
export class Spinner extends AnimatedIcon {
constructor(size: number, params: { animate: boolean; hideOnStop: boolean });
/** @hidden */
public _init(props?: St.Bin.ConstructorProperties): void;
public _init(props?: St.Bin.ConstructorProps): void;
/** @hidden */
public _init(file: Gio.File, width: number, height: number, speed: number): void;
/** @hidden */
Expand Down
20 changes: 10 additions & 10 deletions packages/gnome-shell/src/ui/appDisplay.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ export class AppGrid extends IconGrid {
public indicatorsPadding: number;

/** @hidden */
public _init(params?: St.Viewport.ConstructorProperties): void;
public _init(layoutParams?: IconGrid.ConstructorProperties): void;
public _init(params?: St.Viewport.ConstructorProps): void;
public _init(layoutParams?: IconGrid.ConstructorProps): void;

protected _updatePadding(): void;
}

export abstract class BaseAppView extends St.Widget {
// TODO: 'view-loaded' signal
constructor(params?: St.Widget.ConstructorProperties);
public _init(params?: St.Widget.ConstructorProperties): void;
constructor(params?: St.Widget.ConstructorProps);
public _init(params?: St.Widget.ConstructorProps): void;

protected _onDestroy(): void;
protected _createGrid(): AppGrid;
Expand Down Expand Up @@ -111,8 +111,8 @@ export class AppViewItem extends St.Button {
readonly id: string;
readonly app: any;

constructor(params?: St.Button.ConstructorProperties);
public _init(params?: St.Button.ConstructorProperties, isDraggable?: boolean, expandTitleOnHover?: boolean): void;
constructor(params?: St.Button.ConstructorProps);
public _init(params?: St.Button.ConstructorProps, isDraggable?: boolean, expandTitleOnHover?: boolean): void;

protected _onDestroy(): void;
protected _updateMultiline(): void;
Expand All @@ -135,7 +135,7 @@ export class AppViewItem extends St.Button {
}

export namespace AppIcon {
export interface ConstructorProperties extends BaseIcon.ConstructorProperties {
export interface ConstructorProps extends BaseIcon.ConstructorProps {
isDraggable?: boolean;
expandTitleOnHover?: boolean;
}
Expand All @@ -150,11 +150,11 @@ export class AppIcon extends AppViewItem {
protected _iconContainer: St.Widget;
protected _folderPreviewId: number;

constructor(app: any, iconParams?: AppIcon.ConstructorProperties);
constructor(app: any, iconParams?: AppIcon.ConstructorProps);

/** @hidden */
public _init(params?: St.Button.ConstructorProperties, isDraggable?: boolean, expandTitleOnHover?: boolean): void;
public _init(app: any, iconParams?: AppIcon.ConstructorProperties): void;
public _init(params?: St.Button.ConstructorProps, isDraggable?: boolean, expandTitleOnHover?: boolean): void;
public _init(app: any, iconParams?: AppIcon.ConstructorProps): void;

protected _onDestroy(): void;
protected _createIcon(iconSize: number): St.Widget;
Expand Down
4 changes: 2 additions & 2 deletions packages/gnome-shell/src/ui/audioDeviceSelection.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ declare class AudioDeviceSelectionDialog extends ModalDialog {
constructor(devices: number);

/** @hidden */
public _init(params?: St.Widget.ConstructorProperties): void;
public _init(params?: St.Widget.ConstructorProps): void;
/** @hidden */
public _init(props?: ModalDialog.ConstructorProperties): void;
public _init(props?: ModalDialog.ConstructorProps): void;
public _init(devices: number): void;

protected _buildLayout(): void;
Expand Down
6 changes: 3 additions & 3 deletions packages/gnome-shell/src/ui/background.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ declare class Background extends Meta.Background {
constructor(params?: { monitorIndex?: number; layoutManager: LayoutManager; settings?: Gio.Settings | null; file: Gio.File | null; style: string | null });

/** @hidden */
public _init(params?: Meta.Background.ConstructorProperties): void;
public _init(params?: Meta.Background.ConstructorProps): void;
public _init(params?: { monitorIndex?: number; layoutManager: LayoutManager; settings?: Gio.Settings | null; file: Gio.File | null; style: string | null }): void;

public destroy(): void;
Expand All @@ -165,7 +165,7 @@ export class SystemBackground extends Meta.BackgroundActor {
constructor();

/** @hidden */
public _init(params?: Meta.BackgroundActor.ConstructorProperties): void;
public _init(params?: Meta.BackgroundActor.ConstructorProps): void;
public _init(): void;
}

Expand Down Expand Up @@ -195,7 +195,7 @@ declare class BackgroundSource {
* wrapper for GnomeBG.BGSlideShow
*/
declare class Animation extends GnomeBG.BGSlideShow {
public _init(params?: GnomeBG.BGSlideShow.ConstructorProperties): void;
public _init(params?: GnomeBG.BGSlideShow.ConstructorProps): void;

/** @hidden */
load_async(cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void;
Expand Down
9 changes: 3 additions & 6 deletions packages/gnome-shell/src/ui/barLevel.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ import type St from '@girs/st-14';
import type Atk from '@girs/atk-1.0';

export namespace BarLevel {
export interface ConstructorProperties extends St.DrawingArea.ConstructorProperties {
style_class?: string | null;
accessible_role?: Atk.Role;
}
export interface ConstructorProps extends St.DrawingArea.ConstructorProps {}
}

export class BarLevel extends St.DrawingArea {
Expand All @@ -20,8 +17,8 @@ export class BarLevel extends St.DrawingArea {
public maximumValue: number;
public overdriveStart: number;

constructor(params?: BarLevel.ConstructorProperties);
public _init(params?: BarLevel.ConstructorProperties): void;
constructor(params?: BarLevel.ConstructorProps);
public _init(params?: BarLevel.ConstructorProps): void;

public vfunc_repaint(): void;

Expand Down
6 changes: 3 additions & 3 deletions packages/gnome-shell/src/ui/boxpointer.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@ export class BoxPointer extends St.Widget {
* @param arrowSide side to draw the arrow on
* @param binProperties Properties to set on contained bin
*/
constructor(arrowSide: St.Side, binProperties?: St.Bin.ConstructorProperties);
constructor(arrowSide: St.Side, binProperties?: St.Bin.ConstructorProps);

/** @hidden */
public _init(params?: St.Widget.ConstructorProperties): void;
public _init(params?: St.Widget.ConstructorProps): void;

/**
* @param arrowSide side to draw the arrow on
* @param binProperties Properties to set on contained bin
*/
public _init(arrowSide: St.Side, binProperties?: St.Bin.ConstructorProperties): void;
public _init(arrowSide: St.Side, binProperties?: St.Bin.ConstructorProps): void;

public vfunc_captured_event(event: Clutter.Event): boolean;

Expand Down
16 changes: 8 additions & 8 deletions packages/gnome-shell/src/ui/calendar.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export class Calendar extends St.Widget {

constructor();
/** @hidden */
public _init(params?: St.Widget.ConstructorProperties): void;
public _init(params?: St.Widget.ConstructorProps): void;
public _init(): void;

public setEventSource(eventSource: EventSourceBase): void;
Expand All @@ -164,7 +164,7 @@ export class Calendar extends St.Widget {

export class NotificationMessage extends Message {
/** @hidden */
override _init(params?: St.Button.ConstructorProperties): void;
override _init(params?: St.Button.ConstructorProps): void;
/** @hidden */
override _init(title: string, body: string): void;
public _init(notification: Notification): void;
Expand All @@ -180,7 +180,7 @@ declare class TimeLabel extends St.Label {
_datetime: Date;

/** @hidden */
public _init(params?: St.Label.ConstructorProperties): void;
public _init(params?: St.Label.ConstructorProps): void;
public _init(datetime: Date): void;

public vfunc_map(): void;
Expand All @@ -190,7 +190,7 @@ declare class NotificationSection extends MessageListSection {
public readonly allowed: boolean;

/** @hidden */
public _init(params?: St.BoxLayout.ConstructorProperties): void;
public _init(params?: St.BoxLayout.ConstructorProps): void;
public _init(): void;

public vfunc_map(): void;
Expand All @@ -205,7 +205,7 @@ declare class Placeholder extends St.BoxLayout {
protected _label: St.Label;

/** @hidden */
override _init(params?: St.BoxLayout.ConstructorProperties): void;
override _init(params?: St.BoxLayout.ConstructorProps): void;
public _init(): void;
}

Expand All @@ -214,7 +214,7 @@ declare class DoNotDisturbSwitch extends Switch {

constructor();
/** @hidden */
override _init(config?: St.Bin.ConstructorProperties): void;
override _init(config?: St.Bin.ConstructorProps): void;
/** @hidden */
override _init(state: boolean): void;
public _init(): void;
Expand All @@ -230,10 +230,10 @@ export class CalendarMessageList extends St.Widget {
_mediaSection: MediaSection;
_notificationSection: NotificationSection;

visible: boolean;
// visible: boolean;

/** @hidden */
override _init(config?: St.Widget.ConstructorProperties): void;
override _init(config?: St.Widget.ConstructorProps): void;
public _init(): void;

protected _addSection(section: MessageListSection): void;
Expand Down
2 changes: 1 addition & 1 deletion packages/gnome-shell/src/ui/checkBox.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export class CheckBox extends St.Button {

constructor(label?: string);
/** @hidden */
public _init(params?: St.Button.ConstructorProperties): void;
public _init(params?: St.Button.ConstructorProps): void;
public _init(label?: string): void;

public setLabel(label: string): void;
Expand Down
12 changes: 6 additions & 6 deletions packages/gnome-shell/src/ui/dialog.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class Dialog extends St.Widget {
* @version 46
*/
export namespace MessageDialogContent {
export interface ConstructorProperties extends St.BoxLayout.ConstructorProperties {
export interface ConstructorProps extends St.BoxLayout.ConstructorProps {
title?: string;
description?: string;
}
Expand All @@ -50,14 +50,14 @@ export class MessageDialogContent extends St.BoxLayout {
public title: string;
public description: string;

constructor(params: MessageDialogContent.ConstructorProperties);
public _init(params: MessageDialogContent.ConstructorProperties): void;
constructor(params: MessageDialogContent.ConstructorProps);
public _init(params: MessageDialogContent.ConstructorProps): void;

protected _onDestroy(): void;
protected _updateTitleStyle(): void | false;
}

export interface ListSectionProps extends St.BoxLayout.ConstructorProperties {
export interface ListSectionProps extends St.BoxLayout.ConstructorProps {
title?: string;
}

Expand All @@ -70,13 +70,13 @@ export class ListSection extends St.BoxLayout {

public list: St.BoxLayout;
public title: string;
public label_actor: St.Label;
// public label_actor: St.Label;

constructor(params: ListSectionProps);
public _init(params: ListSectionProps): void;
}

export interface ListSectionItemProps extends St.BoxLayout.ConstructorProperties {
export interface ListSectionItemProps extends St.BoxLayout.ConstructorProps {
title?: string;
description?: string;
// note: iconActor hasn't: GObject.ParamFlags.CONSTRUCT, but might work anyways?
Expand Down
Loading

0 comments on commit c8c0798

Please sign in to comment.