From 79260b3bfdb9f2cda98f52791a0144b76fc33b99 Mon Sep 17 00:00:00 2001 From: Harshad <30668911+harshadgavali@users.noreply.github.com> Date: Sat, 7 Aug 2021 00:55:44 +0530 Subject: [PATCH 001/155] README: correction installation from git --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 635a64f..2d6aff1 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,9 @@ This extension adds or modifies existing touchpad gestures on GNOME. ### From git repo. * Install extension. ``` -git clone https://gitlab.gnome.org/harshadgavali/gnome-gestures.git/ -cd gnome-gestures -# git checkout origin/dev +git clone https://github.com/harshadgavali/gnome-gesture-improvements.git/ +cd gnome-gesture-improvements +npm install npm run update ``` * Log out and log back in OR just restart. From 1eb80e35ddbcf7d0b98f84de52c06e84c35d59a4 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sat, 7 Aug 2021 03:10:53 +0530 Subject: [PATCH 002/155] Update version --- extension_page.md | 4 ++-- metadata.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extension_page.md b/extension_page.md index d855d55..e3caf9a 100644 --- a/extension_page.md +++ b/extension_page.md @@ -16,5 +16,5 @@ For X11, you need to install https://github.com/harshadgavali/gnome-x11-gesture- This also adds option to configure speed of gestures. (1.0 is default) -# Bugs -Report bugs on github. +# Bugs/Requests +Report bugs/requests on github. diff --git a/metadata.json b/metadata.json index e29b14c..1ec5d0b 100644 --- a/metadata.json +++ b/metadata.json @@ -7,5 +7,5 @@ "settings-schema": "org.gnome.shell.extensions.gestureImprovements", "url": "https://github.com/harshadgavali/gnome-gesture-improvements", "uuid": "gestureImprovements@gestures", - "version": 13.1 + "version": 14.1 } \ No newline at end of file From 9b9c3e158d2541423b783bcc960e0990e982dab4 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sat, 7 Aug 2021 03:15:43 +0530 Subject: [PATCH 003/155] String correction --- extension/ui/prefs.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension/ui/prefs.ui b/extension/ui/prefs.ui index b709f49..1235cf7 100644 --- a/extension/ui/prefs.ui +++ b/extension/ui/prefs.ui @@ -174,7 +174,7 @@ end True 0 - Uses 3 finger horizontal swipe to switch workspace on desktop and 4 finger windows + Uses 3 finger horizontal swipe to switch workspace on desktop and 4 finger to switch windows From 834ee4697a74be0bc6b450299ce8c01e2d242217 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sat, 7 Aug 2021 03:20:00 +0530 Subject: [PATCH 004/155] prefs: change window size --- extension/ui/prefs.ui | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extension/ui/prefs.ui b/extension/ui/prefs.ui index 1235cf7..99dce75 100644 --- a/extension/ui/prefs.ui +++ b/extension/ui/prefs.ui @@ -23,7 +23,8 @@ vertical - 650 + 700 + 400 1 never From 573d4c789a6801e6606040d22f16cf8c3d0b1ac8 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sat, 7 Aug 2021 03:28:17 +0530 Subject: [PATCH 005/155] gestures: Don't disable old swipeTracker entirely, keep touchgestures enabled --- extension/src/gestures.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/extension/src/gestures.ts b/extension/src/gestures.ts index 94afc8f..d1c65bf 100644 --- a/extension/src/gestures.ts +++ b/extension/src/gestures.ts @@ -79,7 +79,6 @@ class WorkspaceAnimationModifier extends SwipeTrackerEndPointsModifer { } apply(): void { - this._workspaceAnimation._swipeTracker.enabled = false; if (this._workspaceAnimation._swipeTracker._touchpadGesture) { global.stage.disconnect(this._workspaceAnimation._swipeTracker._touchpadGesture._stageCaptureEvent); this._workspaceAnimation._swipeTracker._touchpadGesture._stageCaptureEvent = 0; @@ -113,7 +112,6 @@ class WorkspaceAnimationModifier extends SwipeTrackerEndPointsModifer { super.destroy(); this._swipeTracker.destroy(); const swipeTracker = this._workspaceAnimation._swipeTracker; - swipeTracker.enabled = true; if (swipeTracker._touchpadGesture) { swipeTracker._touchpadGesture._stageCaptureEvent = global.stage.connect( 'captured-event::touchpad', From e53b69802ff07ae21d98b2db35352330165e1eb1 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sat, 7 Aug 2021 10:30:06 +0530 Subject: [PATCH 006/155] snapWindow: fix window can be null --- extension/src/snapWindow.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extension/src/snapWindow.ts b/extension/src/snapWindow.ts index f7251ac..17c6afd 100644 --- a/extension/src/snapWindow.ts +++ b/extension/src/snapWindow.ts @@ -305,10 +305,10 @@ export class SnapWindowExtension implements ISubExtension { this._directionChangeId = 0; } const window = global.display.get_focus_window(); - if (window.get_monitor() !== monitor) { + if (!window || window.is_fullscreen() || !window.can_maximize()) { return; } - if (!window || window.is_fullscreen() || !window.can_maximize()) { + if (window.get_monitor() !== monitor) { return; } From 7b5f4c81078365c5ee8dc6f261d479a9d95335a8 Mon Sep 17 00:00:00 2001 From: Jackson Goode <54308792+jacksongoode@users.noreply.github.com> Date: Fri, 13 Aug 2021 09:22:15 -0700 Subject: [PATCH 007/155] Clean and standardize language, typos, formatting (#4) --- README.md | 43 ++++++++++--------- ...extensions.gestureImprovements.gschema.xml | 4 +- extension/ui/prefs.ui | 16 +++---- extension_page.md | 27 +++++------- metadata.json | 4 +- package.json | 2 +- 6 files changed, 47 insertions(+), 49 deletions(-) diff --git a/README.md b/README.md index 2d6aff1..c87cef7 100644 --- a/README.md +++ b/README.md @@ -1,49 +1,52 @@ -This extension adds or modifies existing touchpad gestures on GNOME. +# Touchpad Gesture Improvements + +This extension modifies and extends existing touchpad gestures on GNOME. + +## Installation ### Supported Versions * GNOME Shell 40 +### GNOME Extensions +From [extension#4245](https://extensions.gnome.org/extension/4245/gesture-improvements/). -## Installation -### From GNOME extensions website -[extension#4245](https://extensions.gnome.org/extension/4245/gesture-improvements/). -### From git repo. -* Install extension. +### GitHub +1. Install extension ``` git clone https://github.com/harshadgavali/gnome-gesture-improvements.git/ cd gnome-gesture-improvements npm install npm run update ``` -* Log out and log back in OR just restart. -* Enable extension via extensions app or via command line +2. Log out and log in **or** just restart session (X11) +3. Enable extension via extensions app or via command line ``` gnome-extensions enable gestureImprovements@gestures ``` -## Gestures available (including built-in ones) +## Gestures (including built-in ones) | Gesture | Modes | Fingers | Direction | | :------------------------------------------ | :------- | :------ | :-------------- | | Switch windows | Desktop | 3 | Horizontal | | Switch workspaces | Overview | 2/3 | Horizontal | | Switch app pages | AppGrid | 2/3 | Horizontal | | Switch workspaces | * | 4 | Horizontal | -| Desktop-Overview-AppGrid-Desktop navigation | * | 4 | Vertical | -| Maximize/Unmaximize a window | Desktop | 3 | Vertical | -| Snap/Half-Tile a window | Desktop | 3 | Explained below | +| Desktop/Overview/AppGrid navigation | * | 4 | Vertical | +| Maximize/unmaximize a window | Desktop | 3 | Vertical | +| Snap/half-tile a window | Desktop | 3 | Explained below | #### For activating tiling gesture -1. Do 3-finger vertical gesture on a unmaximized window -2. Wait for few milliseconds -3. Do 3-finger horizontal gesture to tile a window +1. Do a 3-finger vertical downward gesture on a unmaximized window +2. Wait a few milliseconds +3. Do a 3-finger horizontal gesture to tile a window to either side ## Customization -* For switching to windows from all workspaces using 3-fingers swipe, run +* To switch to windows from *all* workspaces using 3-fingers swipes, run ``` gsettings set org.gnome.shell.window-switcher current-workspace-only false ``` -* Add delay to alt-tab gesture, to ensure second windows get's selected, when fast swipe is done. -* Add sensitivity of swipe (touchpad swipe speed) -* Option to 3 fingers to switch workspace on desktop, (4 fingers to switch windows) -* Option to 3 fingers for overview navigation, (4 fingers to maximize/unmaximize/tile) +* Add delay to alt-tab gesture, to ensure second windows gets selected when a fast swipe is done +* Change sensitivity of swipe (touchpad swipe speed) +* Revert to 3-finger swipes to switch workspace on desktop (4-fingers to switch windows) +* Revert to 3-finger swipes for overview navigation (4-fingers to maximize/unmaximize/tile) diff --git a/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml b/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml index dc4d513..671581f 100644 --- a/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml +++ b/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml @@ -10,11 +10,11 @@ false - If true, use 3 finger to switch workspace, 4 for windows + If true, use 3-fingers to switch workspace, 4 for windows false - If true, use 3 finger for overview gesture, 4 for snapping/tiling + If true, use 3-fingers for overview gesture, 4 for snapping/tiling \ No newline at end of file diff --git a/extension/ui/prefs.ui b/extension/ui/prefs.ui index 99dce75..fe19962 100644 --- a/extension/ui/prefs.ui +++ b/extension/ui/prefs.ui @@ -75,7 +75,7 @@ center 1 0 - Touchpad Swipe Speed + Touchpad swipe speed @@ -130,7 +130,7 @@ center 1 0 - Window-switching popup delay(in ms) + Window-switching popup delay (ms) @@ -145,7 +145,7 @@ - + 12 @@ -165,7 +165,7 @@ start 1 0 - Use 3 finger gesture on desktop for switching workspace + Enable 3-finger gestures for switching workspaces @@ -175,7 +175,7 @@ end True 0 - Uses 3 finger horizontal swipe to switch workspace on desktop and 4 finger to switch windows + Uses 3-finger horizontal swipes to switch workspaces on desktop and 4-finger swipes to switch windows @@ -195,7 +195,7 @@ - + 12 @@ -215,7 +215,7 @@ start 1 0 - Use 3 finger gesture for overview navigation + Enable 3-finger gestures for overview navigation @@ -225,7 +225,7 @@ end True 0 - Uses 3 finger vertical swipe to navigate between desktop, overview, appgrid and 4 finger to maximize/unmaximize/tile a window + Uses 3-finger vertical swipes to navigate between Desktop, Overview, AppGrid and 4-finger swipes to maximize/unmaximize/tile a window diff --git a/extension_page.md b/extension_page.md index e3caf9a..02dd7cc 100644 --- a/extension_page.md +++ b/extension_page.md @@ -1,20 +1,15 @@ -Touchpad Gesture improvements for Wayland/X11 +Gesture Improvements for Wayland/X11 -This extension adds following gestures. +This extension adds following features: -1. Switch windows from current workspace using 3-finger horizontal swipe. -2. Cyclic gestures between Desktop-Overview-AppGrid using 4 vertical swipe. -3. Override 3-finger gesture with 4-finger for switching workspace. -4. Switch app-pages using 3-finger swipe gesture on AppGrid. -5. Maximize/Unmaximize/Half-Tile using 3 finger vertical+horizontal gesture -6. Support for X11 +• Switch windows from current workspace using 3-finger horizontal swipe +• Cyclic gestures between Desktop/Overview/AppGrid using 4 vertical swipe +• Switch app-pages using 3-finger swipe gesture on AppGrid +• Maximize/unmaximize/half-tiling using 3-finger vertical & horizontal gesture +• Override 3-finger gesture with 4-finger for switching workspace +• Configure speed of gestures +• Support for X11 -For wayland no need for additional package. -For X11, you need to install https://github.com/harshadgavali/gnome-x11-gesture-daemon. +On X11, you need to install https://github.com/harshadgavali/gnome-x11-gesture-daemon - -This also adds option to configure speed of gestures. (1.0 is default) - - -# Bugs/Requests -Report bugs/requests on github. +Report any bugs/requests on GitHub (link directly below) diff --git a/metadata.json b/metadata.json index 1ec5d0b..7413620 100644 --- a/metadata.json +++ b/metadata.json @@ -1,6 +1,6 @@ { - "description": "Touchpad Gesture improvements", - "name": "Gesture improvements", + "description": "Touchpad gesture improvements for Wayland/X11", + "name": "Gesture Improvements", "shell-version": [ "40" ], diff --git a/package.json b/package.json index 5b761bb..3e6e22f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "gnome-gestures", "version": "1.0.0", - "description": "Touchpad Gesture improvements", + "description": "Touchpad Gesture Improvements", "main": "extension.js", "type": "module", "scripts": { From 48d5253618eab8fa359821d98a27f6315bbfe5d0 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Fri, 13 Aug 2021 00:06:42 +0530 Subject: [PATCH 008/155] eslint: added new rules --- .eslintrc.json | 16 ++++++++++++++++ extension/src/altTab.ts | 3 ++- extension/src/gestures.ts | 14 ++++++++++---- extension/src/snapWindow.ts | 3 ++- extension/src/swipeTracker.ts | 26 +++++++++++++++++++------- extension/src/utils/dbus.ts | 10 ++++++++-- scripts/transpile.ts | 21 ++++++++++++++------- 7 files changed, 71 insertions(+), 22 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index ac167e1..b4c594a 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -31,6 +31,7 @@ "warn", "always" ], + "no-var": "error", "no-unused-expressions": "error", "no-unused-labels": "error", "no-unused-vars": "off", @@ -63,6 +64,20 @@ "max": 2, "maxEOF": 0 } + ], + "object-curly-newline": [ + "error", + { + "multiline": true + } + ], + "function-call-argument-newline": [ + "error", + "consistent" + ], + "function-paren-newline": [ + "error", + "multiline-arguments" ] }, "overrides": [ @@ -80,6 +95,7 @@ }, "rules": { "no-console": "off", + "no-var": "off", "@typescript-eslint/no-unused-vars": "off", "@typescript-eslint/explicit-module-boundary-types": "off", "no-unused-expressions": "off", diff --git a/extension/src/altTab.ts b/extension/src/altTab.ts index e560142..af7c69e 100644 --- a/extension/src/altTab.ts +++ b/extension/src/altTab.ts @@ -49,7 +49,8 @@ export class AltTabGestureExtension implements ISubExtension { Shell.ActionMode.ALL, Clutter.Orientation.HORIZONTAL, false, - this._checkAllowedGesture.bind(this)); + this._checkAllowedGesture.bind(this), + ); this._adjustment = new St.Adjustment({ value: 0, diff --git a/extension/src/gestures.ts b/extension/src/gestures.ts index d1c65bf..25ea334 100644 --- a/extension/src/gestures.ts +++ b/extension/src/gestures.ts @@ -186,7 +186,8 @@ export class GestureExtension implements ISubExtension { swipeTracker.orientation, followNaturalScroll, checkAllowedGesture, - gestureSpeed); + gestureSpeed, + ); this._attachGestureToTracker(swipeTracker, touchpadGesture, disableOldGesture); }); @@ -213,7 +214,8 @@ export class GestureExtension implements ISubExtension { _attachGestureToTracker( swipeTracker: SwipeTrackerT, touchpadSwipeGesture: typeof TouchpadSwipeGesture.prototype | __shell_private_types.TouchpadGesture, - disablePrevious: boolean): void { + disablePrevious: boolean, + ): void { if (swipeTracker._touchpadGesture) { if (disablePrevious && swipeTracker._touchpadGesture._stageCaptureEvent) { global.stage.disconnect(swipeTracker._touchpadGesture._stageCaptureEvent); @@ -227,7 +229,11 @@ export class GestureExtension implements ISubExtension { swipeTracker._touchpadGesture.connect('update', swipeTracker._updateGesture.bind(swipeTracker)); swipeTracker._touchpadGesture.connect('end', swipeTracker._endTouchpadGesture.bind(swipeTracker)); swipeTracker.bind_property('enabled', swipeTracker._touchpadGesture, 'enabled', 0); - swipeTracker.bind_property('orientation', swipeTracker._touchpadGesture, 'orientation', - GObject.BindingFlags.SYNC_CREATE); + swipeTracker.bind_property( + 'orientation', + swipeTracker._touchpadGesture, + 'orientation', + GObject.BindingFlags.SYNC_CREATE, + ); } } \ No newline at end of file diff --git a/extension/src/snapWindow.ts b/extension/src/snapWindow.ts index 17c6afd..9e7472b 100644 --- a/extension/src/snapWindow.ts +++ b/extension/src/snapWindow.ts @@ -328,7 +328,8 @@ export class SnapWindowExtension implements ISubExtension { monitorGeo.height, snapPoints, progress, - progress); + progress, + ); } } diff --git a/extension/src/swipeTracker.ts b/extension/src/swipeTracker.ts index e4992bf..58d82b3 100644 --- a/extension/src/swipeTracker.ts +++ b/extension/src/swipeTracker.ts @@ -20,13 +20,20 @@ enum TouchpadState { export const TouchpadSwipeGesture = GObject.registerClass({ Properties: { 'enabled': GObject.ParamSpec.boolean( - 'enabled', 'enabled', 'enabled', + 'enabled', + 'enabled', + 'enabled', GObject.ParamFlags.READWRITE, - true), + true, + ), 'orientation': GObject.ParamSpec.enum( - 'orientation', 'orientation', 'orientation', + 'orientation', + 'orientation', + 'orientation', GObject.ParamFlags.READWRITE, - Clutter.Orientation, Clutter.Orientation.HORIZONTAL), + Clutter.Orientation, + Clutter.Orientation.HORIZONTAL, + ), }, Signals: { 'begin': { param_types: [GObject.TYPE_UINT, GObject.TYPE_DOUBLE, GObject.TYPE_DOUBLE] }, @@ -227,12 +234,17 @@ export function createSwipeTracker( swipeTracker.orientation, true, undefined, - gestureSpeed); + gestureSpeed, + ); swipeTracker._touchpadGesture.connect('begin', swipeTracker._beginGesture.bind(swipeTracker)); swipeTracker._touchpadGesture.connect('update', swipeTracker._updateGesture.bind(swipeTracker)); swipeTracker._touchpadGesture.connect('end', swipeTracker._endTouchpadGesture.bind(swipeTracker)); swipeTracker.bind_property('enabled', swipeTracker._touchpadGesture, 'enabled', 0); - swipeTracker.bind_property('orientation', swipeTracker._touchpadGesture, 'orientation', - GObject.BindingFlags.SYNC_CREATE); + swipeTracker.bind_property( + 'orientation', + swipeTracker._touchpadGesture, + 'orientation', + GObject.BindingFlags.SYNC_CREATE, + ); return swipeTracker; } \ No newline at end of file diff --git a/extension/src/utils/dbus.ts b/extension/src/utils/dbus.ts index 45af61c..f2eb78e 100644 --- a/extension/src/utils/dbus.ts +++ b/extension/src/utils/dbus.ts @@ -76,8 +76,14 @@ export function subscribe(callback: (actor: never | undefined, event: CustomEven } connectedSignalIds.push( - proxy.connect('TouchpadSwipe', (_proxy: never, sphase: string, - fingers: number, dx: number, dy: number, time: number) => { + proxy.connect('TouchpadSwipe', ( + _proxy: never, + sphase: string, + fingers: number, + dx: number, + dy: number, + time: number, + ) => { const event: CustomEventType = { type: () => Clutter.EventType.TOUCHPAD_SWIPE, get_gesture_phase: () => { diff --git a/scripts/transpile.ts b/scripts/transpile.ts index a4c35d2..b1572d4 100644 --- a/scripts/transpile.ts +++ b/scripts/transpile.ts @@ -147,7 +147,8 @@ const transformExports: ts.TransformerFactory = context => { variables.push(node.name?.text || ''); return moveComments( - createVariableStatement(context, + createVariableStatement( + context, node.name?.text || '', context.factory.createClassExpression( node.decorators, @@ -169,7 +170,8 @@ const transformExports: ts.TransformerFactory = context => { } return moveComments( - context.factory.createVariableStatement([], + context.factory.createVariableStatement( + [], node.declarationList.declarations.map(d => { if (d.name.kind == ts.SyntaxKind.Identifier) { variables.push((d.name as ts.Identifier).text); @@ -265,7 +267,8 @@ const transformImports: ts.TransformerFactory = context => { if (node.importClause?.name) { /* import whole module 'St' in 'import St from ...' or 'Gtk' in 'import Gtk, {} from ...' */ - statements.push(createVariableStatement(context, + statements.push(createVariableStatement( + context, node.importClause.name.text, replacement.module, ts.NodeFlags.Const, @@ -280,7 +283,8 @@ const transformImports: ts.TransformerFactory = context => { return; } const bindingId = binding as ts.Identifier; - statements.push(createVariableStatement(context, + statements.push(createVariableStatement( + context, bindingId.text, replacement.module, ts.NodeFlags.Const, @@ -308,7 +312,8 @@ const transformImports: ts.TransformerFactory = context => { }), ); /* replacing named imports with 'const { a, b } = ...' */ - statements.push(createVariableStatement(context, + statements.push(createVariableStatement( + context, bindingName, replacement.module, ts.NodeFlags.Const, @@ -340,11 +345,13 @@ const transformImports: ts.TransformerFactory = context => { if (!addedMeStatement && ISEXTENSION) { addedMeStatement = true; //const Me = imports.misc.extensionUtils.getCurrentExtension(); - statement = createVariableStatement(context, + statement = createVariableStatement( + context, 'Me', context.factory.createCallExpression( createAccessExpressionFor(context, 'imports.misc.extensionUtils.getCurrentExtension'), - [], [], + [], + [], ), ts.NodeFlags.Const, ); From 5c2570dba035d0046f517d6cdf84bc1338203fa2 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Fri, 13 Aug 2021 22:24:44 +0530 Subject: [PATCH 009/155] Comments: Add comment for enum definition --- extension/src/snapWindow.ts | 2 ++ extension/src/swipeTracker.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/extension/src/snapWindow.ts b/extension/src/snapWindow.ts index 9e7472b..e662d34 100644 --- a/extension/src/snapWindow.ts +++ b/extension/src/snapWindow.ts @@ -33,11 +33,13 @@ function easeActor(actor: any, value: any, params: EaseParamsType) { actor.ease(params); } +// define enum enum GestureMaxUnMaxState { UNMAXIMIZE = 0, MAXIMIZE = 1, } +// define enum enum GestureTileState { RIGHT_TILE = -1, NORMAL = GestureMaxUnMaxState.UNMAXIMIZE, diff --git a/extension/src/swipeTracker.ts b/extension/src/swipeTracker.ts index 58d82b3..eec51a8 100644 --- a/extension/src/swipeTracker.ts +++ b/extension/src/swipeTracker.ts @@ -10,6 +10,7 @@ const { SwipeTracker } = imports.ui.swipeTracker; import * as DBusUtils from './utils/dbus'; import { TouchpadConstants } from '../constants'; +// define enum enum TouchpadState { NONE = 0, PENDING = 1, From b56d7dc5eb5c910da0ece90b007e111f952171da Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Fri, 13 Aug 2021 22:31:07 +0530 Subject: [PATCH 010/155] README: add contributors and thanks --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index c87cef7..0c0dc6b 100644 --- a/README.md +++ b/README.md @@ -50,3 +50,9 @@ gsettings set org.gnome.shell.window-switcher current-workspace-only false * Change sensitivity of swipe (touchpad swipe speed) * Revert to 3-finger swipes to switch workspace on desktop (4-fingers to switch windows) * Revert to 3-finger swipes for overview navigation (4-fingers to maximize/unmaximize/tile) + +# Contributors +[@jacksongoode](https://github.com/jacksongoode) + +# Thanks +[@ewlsh](https://gitlab.gnome.org/ewlsh) for [Typescript definitions](https://www.npmjs.com/package/@gi-types/glib) for GLib, GObject, ... \ No newline at end of file From 3ec158821863f58c1e4df21312536ae737a440d8 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Fri, 13 Aug 2021 22:48:01 +0530 Subject: [PATCH 011/155] snapWindow: Assume Main panel height zero, is panel is hidden This doesn't affect fullscreen mode, as in fullscreen mode panel is visible, but panel's parent is hidden. Fixes https://github.com/harshadgavali/gnome-gesture-improvements/issues/5 --- extension/src/snapWindow.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/extension/src/snapWindow.ts b/extension/src/snapWindow.ts index e662d34..dd69cbc 100644 --- a/extension/src/snapWindow.ts +++ b/extension/src/snapWindow.ts @@ -102,25 +102,27 @@ const TilePreview = GObject.registerClass( height: frame_rect.height - height * 2, }); + const panelHeight = Main.panel.visible && window.is_on_primary_monitor() ? Main.panel.height : 0; + this._maximizeBox = new Meta.Rectangle({ x: monitorGeometry.x, - y: monitorGeometry.y + (window.is_on_primary_monitor() ? Main.panel.height : 0), + y: monitorGeometry.y + panelHeight, width: monitorGeometry.width, - height: monitorGeometry.height - (window.is_on_primary_monitor() ? Main.panel.height : 0), + height: monitorGeometry.height - panelHeight, }); this._leftSnapBox = new Meta.Rectangle({ x: monitorGeometry.x, - y: monitorGeometry.y + (this._window.is_on_primary_monitor() ? Main.panel.height : 0), + y: monitorGeometry.y + panelHeight, width: monitorGeometry.width / 2, - height: monitorGeometry.height - (this._window.is_on_primary_monitor() ? Main.panel.height : 0), + height: monitorGeometry.height - panelHeight, }); this._rightSnapBox = new Meta.Rectangle({ x: monitorGeometry.x + monitorGeometry.width / 2, - y: monitorGeometry.y + (this._window.is_on_primary_monitor() ? Main.panel.height : 0), + y: monitorGeometry.y + panelHeight, width: monitorGeometry.width / 2, - height: monitorGeometry.height - (this._window.is_on_primary_monitor() ? Main.panel.height : 0), + height: monitorGeometry.height - panelHeight, }); this._direction = Clutter.Orientation.VERTICAL; From 9d2572f38e1082663be842aa1271a76f50d53448 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Fri, 13 Aug 2021 23:30:01 +0530 Subject: [PATCH 012/155] snapWindow: Consider panelBox's y position to calculate net panel height Related to https://github.com/harshadgavali/gnome-gesture-improvements/issues/5 --- extension/src/snapWindow.ts | 11 ++++++++++- gnome-shell/index.d.ts | 15 +++++++++++++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/extension/src/snapWindow.ts b/extension/src/snapWindow.ts index dd69cbc..d8e2fcc 100644 --- a/extension/src/snapWindow.ts +++ b/extension/src/snapWindow.ts @@ -102,7 +102,16 @@ const TilePreview = GObject.registerClass( height: frame_rect.height - height * 2, }); - const panelHeight = Main.panel.visible && window.is_on_primary_monitor() ? Main.panel.height : 0; + const panelBoxRely = Main.layoutManager.panelBox.y - Main.layoutManager.primaryMonitor.y; + const panelHeight = Main.panel.visible && + window.is_on_primary_monitor() && + panelBoxRely <= 0 ? + Math.clamp( + panelBoxRely + Main.panel.height, + 0, + Main.panel.height, + ) : + 0; this._maximizeBox = new Meta.Rectangle({ x: monitorGeometry.x, diff --git a/gnome-shell/index.d.ts b/gnome-shell/index.d.ts index 25fe89b..35e43bb 100644 --- a/gnome-shell/index.d.ts +++ b/gnome-shell/index.d.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ import Clutter from '@gi-types/clutter'; import St from '@gi-types/st'; import Gio from '@gi-types/gio'; @@ -24,12 +25,19 @@ declare interface ExtensionUtilsMeta { } namespace __shell_private_types { - // eslint-disable-next-line @typescript-eslint/no-unused-vars declare class TouchpadGesture extends GObject.Object { _stageCaptureEvent: number; destroy(): void; _handleEvent(actor: Clutter.Actor | undefined, event: CustomEventType): boolean; } + + declare interface IMonitorState { + x: number, + y: number, + width: number, + height: number, + geometry_scale: number, + } } declare namespace imports { @@ -75,7 +83,10 @@ declare namespace imports { }; const layoutManager: { - uiGroup: Clutter.Actor + uiGroup: Clutter.Actor, + panelBox: St.BoxLayout, + primaryMonitor: __shell_private_types.IMonitorState, + currentMonitor: __shell_private_types.IMonitorState, }; const wm: { From dfd1dfa568e1433cbd1197a6cba6f732eb535360 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sun, 15 Aug 2021 18:21:55 +0530 Subject: [PATCH 013/155] eslint: Add whitespace rule for switch-case --- .eslintrc.json | 7 +++++-- extension/src/swipeTracker.ts | 28 ++++++++++++++-------------- extension/src/utils/dbus.ts | 12 ++++++------ scripts/transpile.ts | 16 ++++++++-------- 4 files changed, 33 insertions(+), 30 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index b4c594a..d19e3d6 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -17,7 +17,10 @@ "rules": { "indent": [ "error", - "tab" + "tab", + { + "SwitchCase": 1 + } ], "linebreak-style": [ "error", @@ -101,7 +104,7 @@ "no-unused-expressions": "off", "no-mixed-spaces-and-tabs": "off", "comma-dangle": "off", - "lines-between-class-members":"off" + "lines-between-class-members": "off" } }, { diff --git a/extension/src/swipeTracker.ts b/extension/src/swipeTracker.ts index eec51a8..b34b46d 100644 --- a/extension/src/swipeTracker.ts +++ b/extension/src/swipeTracker.ts @@ -168,20 +168,20 @@ export const TouchpadSwipeGesture = GObject.registerClass({ const distance = vertical ? this.TOUCHPAD_BASE_HEIGHT : this.TOUCHPAD_BASE_WIDTH; switch (gesturePhase) { - case Clutter.TouchpadGesturePhase.BEGIN: - case Clutter.TouchpadGesturePhase.UPDATE: - if (this._followNaturalScroll) - delta = -delta; - - this.emit('update', time, delta, distance); - break; - - case Clutter.TouchpadGesturePhase.END: - case Clutter.TouchpadGesturePhase.CANCEL: - this.emit('end', time, distance); - this._state = TouchpadState.NONE; - this._toggledDirection = false; - break; + case Clutter.TouchpadGesturePhase.BEGIN: + case Clutter.TouchpadGesturePhase.UPDATE: + if (this._followNaturalScroll) + delta = -delta; + + this.emit('update', time, delta, distance); + break; + + case Clutter.TouchpadGesturePhase.END: + case Clutter.TouchpadGesturePhase.CANCEL: + this.emit('end', time, distance); + this._state = TouchpadState.NONE; + this._toggledDirection = false; + break; } return this._state === TouchpadState.HANDLING diff --git a/extension/src/utils/dbus.ts b/extension/src/utils/dbus.ts index f2eb78e..df14973 100644 --- a/extension/src/utils/dbus.ts +++ b/extension/src/utils/dbus.ts @@ -88,12 +88,12 @@ export function subscribe(callback: (actor: never | undefined, event: CustomEven type: () => Clutter.EventType.TOUCHPAD_SWIPE, get_gesture_phase: () => { switch (sphase) { - case 'Begin': - return Clutter.TouchpadGesturePhase.BEGIN; - case 'Update': - return Clutter.TouchpadGesturePhase.UPDATE; - default: - return Clutter.TouchpadGesturePhase.END; + case 'Begin': + return Clutter.TouchpadGesturePhase.BEGIN; + case 'Update': + return Clutter.TouchpadGesturePhase.UPDATE; + default: + return Clutter.TouchpadGesturePhase.END; } }, get_touchpad_gesture_finger_count: () => fingers, diff --git a/scripts/transpile.ts b/scripts/transpile.ts index b1572d4..45c790e 100644 --- a/scripts/transpile.ts +++ b/scripts/transpile.ts @@ -188,14 +188,14 @@ const transformExports: ts.TransformerFactory = context => { const variables: string[] = []; const visitor = (node: ts.Node): ts.Node => { switch (node.kind) { - case ts.SyntaxKind.ClassDeclaration: - return transformClass(node as ts.ClassDeclaration, variables); - case ts.SyntaxKind.FunctionDeclaration: - return tranformFunction(node as ts.FunctionDeclaration, variables); - case ts.SyntaxKind.VariableStatement: - return tranformVariable(node as ts.VariableStatement, variables); - default: - return node; + case ts.SyntaxKind.ClassDeclaration: + return transformClass(node as ts.ClassDeclaration, variables); + case ts.SyntaxKind.FunctionDeclaration: + return tranformFunction(node as ts.FunctionDeclaration, variables); + case ts.SyntaxKind.VariableStatement: + return tranformVariable(node as ts.VariableStatement, variables); + default: + return node; } }; const modifiedSourceFile = ts.visitEachChild(sourceFile, visitor, context); From 96893ffcf2c9bb637563802a91d6a7f6be7c0068 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sun, 15 Aug 2021 18:39:37 +0530 Subject: [PATCH 014/155] snapWindow: Put Tilepreview above any child during animation This avoids glitch where widget containing window's content is shown above Tilepreview for very short duration, without any animation --- extension/src/patches/windowManager.js | 67 ++++++++++++++++++++++++++ extension/src/snapWindow.ts | 36 ++++++++++++-- extension/src/utils/gobjectSignal.ts | 13 +++++ gnome-shell/index.d.ts | 6 ++- 4 files changed, 116 insertions(+), 6 deletions(-) create mode 100644 extension/src/patches/windowManager.js create mode 100644 extension/src/utils/gobjectSignal.ts diff --git a/extension/src/patches/windowManager.js b/extension/src/patches/windowManager.js new file mode 100644 index 0000000..7194f13 --- /dev/null +++ b/extension/src/patches/windowManager.js @@ -0,0 +1,67 @@ + +const Clutter = imports.gi.Clutter; +const Main = imports.ui.main; + +const WINDOW_ANIMATION_TIME = 250; + +export function WMsizeChangedWindow(shellwm, actor, topActor) { + if (!actor.__animationInfo) + return; + if (this._resizing.has(actor)) + return; + + let actorClone = actor.__animationInfo.clone; + let targetRect = actor.meta_window.get_frame_rect(); + let sourceRect = actor.__animationInfo.oldRect; + + let scaleX = targetRect.width / sourceRect.width; + let scaleY = targetRect.height / sourceRect.height; + + this._resizePending.delete(actor); + this._resizing.add(actor); + + actorClone.visible = false; + Main.uiGroup.add_child(actorClone); + // set tilepreview above content clone + Main.layoutManager.uiGroup.set_child_above_sibling(topActor, null); + actorClone.visible = true; + + // Now scale and fade out the clone + actorClone.ease({ + x: targetRect.x, + y: targetRect.y, + scale_x: scaleX, + scale_y: scaleY, + opacity: 0, + duration: WINDOW_ANIMATION_TIME, + mode: Clutter.AnimationMode.EASE_OUT_QUAD, + }); + + actor.translation_x = -targetRect.x + sourceRect.x; + actor.translation_y = -targetRect.y + sourceRect.y; + + // Now set scale the actor to size it as the clone. + actor.scale_x = 1 / scaleX; + actor.scale_y = 1 / scaleY; + + // Scale it to its actual new size + actor.ease({ + scale_x: 1, + scale_y: 1, + translation_x: 0, + translation_y: 0, + duration: WINDOW_ANIMATION_TIME, + mode: Clutter.AnimationMode.EASE_OUT_QUAD, + onStopped: () => this._sizeChangeWindowDone(shellwm, actor), + }); + + // ease didn't animate and cleared the info, we are done + if (!actor.__animationInfo) + return; + + // Now unfreeze actor updates, to get it to the new size. + // It's important that we don't wait until the animation is completed to + // do this, otherwise our scale will be applied to the old texture size. + actor.thaw(); + actor.__animationInfo.frozen = false; +} \ No newline at end of file diff --git a/extension/src/snapWindow.ts b/extension/src/snapWindow.ts index d8e2fcc..d683e84 100644 --- a/extension/src/snapWindow.ts +++ b/extension/src/snapWindow.ts @@ -12,9 +12,16 @@ const Utils = imports.misc.util; import { createSwipeTracker, TouchpadSwipeGesture } from './swipeTracker'; import { ExtSettings } from '../constants'; +import { WMsizeChangedWindow } from './patches/windowManager'; +import { block_signal_by_name } from './utils/gobjectSignal'; const { SwipeTracker } = imports.ui.swipeTracker; +const WINDOW_ANIMATION_TIME = 250; +const UPDATED_WINDOW_ANIMATION_TIME = 150; +const SNAPCHANGE_ANIMATION_TIME = 100; +const TRIGGER_GESTURE_DELAY = 150; + declare interface EaseParamsType { duration: number, mode: Clutter.AnimationMode, @@ -158,7 +165,7 @@ const TilePreview = GObject.registerClass( const stSettings = St.Settings.get(); // speedup animations const prevSlowdown = stSettings.slow_down_factor; - stSettings.slow_down_factor = 1 / 1.5; + stSettings.slow_down_factor = UPDATED_WINDOW_ANIMATION_TIME / WINDOW_ANIMATION_TIME; if (state === GestureMaxUnMaxState.MAXIMIZE) { this._window.maximize(Meta.MaximizeFlags.BOTH); } else { @@ -243,7 +250,7 @@ const TilePreview = GObject.registerClass( toValue = -18 / Math.max(18, this._maximizeBox.width - this._normalBox.width); } easeActor(this._adjustment, toValue, { - duration: 100, + duration: SNAPCHANGE_ANIMATION_TIME, repeatCount: 1, autoReverse: true, mode: Clutter.AnimationMode.EASE_IN_OUT_BACK, @@ -256,7 +263,7 @@ const TilePreview = GObject.registerClass( easeOpacity(value: number, callback?: () => void) { easeActor(this, undefined, { opacity: value, - duration: 100, + duration: UPDATED_WINDOW_ANIMATION_TIME, mode: Clutter.AnimationMode.EASE_OUT_QUAD, onStopped: () => { if (callback) @@ -279,6 +286,8 @@ export class SnapWindowExtension implements ISubExtension { private _directionChangeId = 0; private _toggledDirection = false; private _allowChangeDirection = false; + private _wmBlockedSignalId = 0; + private _wmSizeChangedId = 0; constructor() { this._swipeTracker = createSwipeTracker( @@ -291,6 +300,15 @@ export class SnapWindowExtension implements ISubExtension { this._touchpadSwipeGesture = this._swipeTracker._touchpadGesture as typeof TouchpadSwipeGesture.prototype; this._tilePreview = new TilePreview(); Main.layoutManager.uiGroup.add_child(this._tilePreview); + this._patchWMSizeChanged(); + } + + private _patchWMSizeChanged() { + this._wmBlockedSignalId = block_signal_by_name(global.windowManager, 'size-changed'); + + this._wmSizeChangedId = global.windowManager.connect('size-changed', (shellwm, actor) => { + return WMsizeChangedWindow.call(Main.wm, shellwm, actor, this._tilePreview); + }); } apply(): void { @@ -301,6 +319,16 @@ export class SnapWindowExtension implements ISubExtension { } destroy(): void { + if (this._wmSizeChangedId) { + global.windowManager.disconnect(this._wmSizeChangedId); + this._wmSizeChangedId = 0; + } + + if (this._wmBlockedSignalId) { + global.windowManager.unblock_signal_handler(this._wmBlockedSignalId); + this._wmBlockedSignalId = 0; + } + if (this._directionChangeId) { GLib.source_remove(this._directionChangeId); this._directionChangeId = 0; @@ -365,7 +393,7 @@ export class SnapWindowExtension implements ISubExtension { if (!this._directionChangeId) { this._directionChangeId = GLib.timeout_add( GLib.PRIORITY_DEFAULT, - 150, + TRIGGER_GESTURE_DELAY, () => { this._toggledDirection = true; this._touchpadSwipeGesture.switchDirectionTo(Clutter.Orientation.HORIZONTAL); diff --git a/extension/src/utils/gobjectSignal.ts b/extension/src/utils/gobjectSignal.ts new file mode 100644 index 0000000..b4f5842 --- /dev/null +++ b/extension/src/utils/gobjectSignal.ts @@ -0,0 +1,13 @@ +import GObject from '@gi-types/gobject'; + +export function block_signal_by_name(actor: GObject.Object, signal_name: string): number { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const [found, id, detail] = GObject.signal_parse_name(signal_name, actor as any, true); + if (!found) + return 0; + const signalHandlerId = GObject.signal_handler_find(actor, GObject.SignalMatchType.ID, id, detail, null, null, null); + if (!signalHandlerId) + return 0; + actor.block_signal_handler(signalHandlerId); + return signalHandlerId; +} \ No newline at end of file diff --git a/gnome-shell/index.d.ts b/gnome-shell/index.d.ts index 35e43bb..1fbb4a7 100644 --- a/gnome-shell/index.d.ts +++ b/gnome-shell/index.d.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-unused-vars */ import Clutter from '@gi-types/clutter'; import St from '@gi-types/st'; import Gio from '@gi-types/gio'; @@ -19,12 +18,13 @@ declare interface ExtensionUtilsMeta { getCurrentExtension(): { metadata: ExtensionMeta, dir: Gio.FilePrototype, + // eslint-disable-next-line @typescript-eslint/no-explicit-any imports: any, }; initTranslations(domain?: string): void; } -namespace __shell_private_types { +declare namespace __shell_private_types { declare class TouchpadGesture extends GObject.Object { _stageCaptureEvent: number; destroy(): void; @@ -37,6 +37,8 @@ namespace __shell_private_types { width: number, height: number, geometry_scale: number, + index: number, + inFullscreen: () => boolean, } } From 520211e0fe245e40e2ad3ae8401f167c7de8e577 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Mon, 16 Aug 2021 13:13:13 +0530 Subject: [PATCH 015/155] snapWindow: Better approach to put Tilepreview above any actor --- extension/src/patches/windowManager.js | 67 -------------------------- extension/src/snapWindow.ts | 27 +++-------- extension/src/utils/gobjectSignal.ts | 13 ----- metadata.json | 2 +- 4 files changed, 8 insertions(+), 101 deletions(-) delete mode 100644 extension/src/patches/windowManager.js delete mode 100644 extension/src/utils/gobjectSignal.ts diff --git a/extension/src/patches/windowManager.js b/extension/src/patches/windowManager.js deleted file mode 100644 index 7194f13..0000000 --- a/extension/src/patches/windowManager.js +++ /dev/null @@ -1,67 +0,0 @@ - -const Clutter = imports.gi.Clutter; -const Main = imports.ui.main; - -const WINDOW_ANIMATION_TIME = 250; - -export function WMsizeChangedWindow(shellwm, actor, topActor) { - if (!actor.__animationInfo) - return; - if (this._resizing.has(actor)) - return; - - let actorClone = actor.__animationInfo.clone; - let targetRect = actor.meta_window.get_frame_rect(); - let sourceRect = actor.__animationInfo.oldRect; - - let scaleX = targetRect.width / sourceRect.width; - let scaleY = targetRect.height / sourceRect.height; - - this._resizePending.delete(actor); - this._resizing.add(actor); - - actorClone.visible = false; - Main.uiGroup.add_child(actorClone); - // set tilepreview above content clone - Main.layoutManager.uiGroup.set_child_above_sibling(topActor, null); - actorClone.visible = true; - - // Now scale and fade out the clone - actorClone.ease({ - x: targetRect.x, - y: targetRect.y, - scale_x: scaleX, - scale_y: scaleY, - opacity: 0, - duration: WINDOW_ANIMATION_TIME, - mode: Clutter.AnimationMode.EASE_OUT_QUAD, - }); - - actor.translation_x = -targetRect.x + sourceRect.x; - actor.translation_y = -targetRect.y + sourceRect.y; - - // Now set scale the actor to size it as the clone. - actor.scale_x = 1 / scaleX; - actor.scale_y = 1 / scaleY; - - // Scale it to its actual new size - actor.ease({ - scale_x: 1, - scale_y: 1, - translation_x: 0, - translation_y: 0, - duration: WINDOW_ANIMATION_TIME, - mode: Clutter.AnimationMode.EASE_OUT_QUAD, - onStopped: () => this._sizeChangeWindowDone(shellwm, actor), - }); - - // ease didn't animate and cleared the info, we are done - if (!actor.__animationInfo) - return; - - // Now unfreeze actor updates, to get it to the new size. - // It's important that we don't wait until the animation is completed to - // do this, otherwise our scale will be applied to the old texture size. - actor.thaw(); - actor.__animationInfo.frozen = false; -} \ No newline at end of file diff --git a/extension/src/snapWindow.ts b/extension/src/snapWindow.ts index d683e84..a091b4c 100644 --- a/extension/src/snapWindow.ts +++ b/extension/src/snapWindow.ts @@ -12,8 +12,6 @@ const Utils = imports.misc.util; import { createSwipeTracker, TouchpadSwipeGesture } from './swipeTracker'; import { ExtSettings } from '../constants'; -import { WMsizeChangedWindow } from './patches/windowManager'; -import { block_signal_by_name } from './utils/gobjectSignal'; const { SwipeTracker } = imports.ui.swipeTracker; @@ -286,8 +284,7 @@ export class SnapWindowExtension implements ISubExtension { private _directionChangeId = 0; private _toggledDirection = false; private _allowChangeDirection = false; - private _wmBlockedSignalId = 0; - private _wmSizeChangedId = 0; + private _uiGroupAddedActorId: number; constructor() { this._swipeTracker = createSwipeTracker( @@ -300,15 +297,10 @@ export class SnapWindowExtension implements ISubExtension { this._touchpadSwipeGesture = this._swipeTracker._touchpadGesture as typeof TouchpadSwipeGesture.prototype; this._tilePreview = new TilePreview(); Main.layoutManager.uiGroup.add_child(this._tilePreview); - this._patchWMSizeChanged(); - } - - private _patchWMSizeChanged() { - this._wmBlockedSignalId = block_signal_by_name(global.windowManager, 'size-changed'); - - this._wmSizeChangedId = global.windowManager.connect('size-changed', (shellwm, actor) => { - return WMsizeChangedWindow.call(Main.wm, shellwm, actor, this._tilePreview); + this._uiGroupAddedActorId = Main.layoutManager.uiGroup.connect('actor-added', () => { + Main.layoutManager.uiGroup.set_child_above_sibling(this._tilePreview, null); }); + Main.layoutManager.uiGroup.set_child_above_sibling(this._tilePreview, null); } apply(): void { @@ -319,14 +311,9 @@ export class SnapWindowExtension implements ISubExtension { } destroy(): void { - if (this._wmSizeChangedId) { - global.windowManager.disconnect(this._wmSizeChangedId); - this._wmSizeChangedId = 0; - } - - if (this._wmBlockedSignalId) { - global.windowManager.unblock_signal_handler(this._wmBlockedSignalId); - this._wmBlockedSignalId = 0; + if (this._uiGroupAddedActorId) { + Main.layoutManager.uiGroup.disconnect(this._uiGroupAddedActorId); + this._uiGroupAddedActorId = 0; } if (this._directionChangeId) { diff --git a/extension/src/utils/gobjectSignal.ts b/extension/src/utils/gobjectSignal.ts deleted file mode 100644 index b4f5842..0000000 --- a/extension/src/utils/gobjectSignal.ts +++ /dev/null @@ -1,13 +0,0 @@ -import GObject from '@gi-types/gobject'; - -export function block_signal_by_name(actor: GObject.Object, signal_name: string): number { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const [found, id, detail] = GObject.signal_parse_name(signal_name, actor as any, true); - if (!found) - return 0; - const signalHandlerId = GObject.signal_handler_find(actor, GObject.SignalMatchType.ID, id, detail, null, null, null); - if (!signalHandlerId) - return 0; - actor.block_signal_handler(signalHandlerId); - return signalHandlerId; -} \ No newline at end of file diff --git a/metadata.json b/metadata.json index 7413620..b10afc2 100644 --- a/metadata.json +++ b/metadata.json @@ -7,5 +7,5 @@ "settings-schema": "org.gnome.shell.extensions.gestureImprovements", "url": "https://github.com/harshadgavali/gnome-gesture-improvements", "uuid": "gestureImprovements@gestures", - "version": 14.1 + "version": 15.1 } \ No newline at end of file From 6c5aad7d80910469b2040c48889329d050aa5f85 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Tue, 17 Aug 2021 20:30:15 +0530 Subject: [PATCH 016/155] snapWindow: disable touch gestures --- extension/src/snapWindow.ts | 3 +++ extension/src/swipeTracker.ts | 38 ++++++++++++++++++++++++++--------- gnome-shell/index.d.ts | 1 + 3 files changed, 32 insertions(+), 10 deletions(-) diff --git a/extension/src/snapWindow.ts b/extension/src/snapWindow.ts index a091b4c..3e4e35d 100644 --- a/extension/src/snapWindow.ts +++ b/extension/src/snapWindow.ts @@ -292,7 +292,10 @@ export class SnapWindowExtension implements ISubExtension { (ExtSettings.DEFAULT_OVERVIEW_GESTURE ? [4] : [3]), Shell.ActionMode.NORMAL, Clutter.Orientation.VERTICAL, + 1, + { allowTouch: false }, ); + this._swipeTracker.allowLongSwipes = true; this._touchpadSwipeGesture = this._swipeTracker._touchpadGesture as typeof TouchpadSwipeGesture.prototype; this._tilePreview = new TilePreview(); diff --git a/extension/src/swipeTracker.ts b/extension/src/swipeTracker.ts index b34b46d..0ce8619 100644 --- a/extension/src/swipeTracker.ts +++ b/extension/src/swipeTracker.ts @@ -14,25 +14,25 @@ import { TouchpadConstants } from '../constants'; enum TouchpadState { NONE = 0, PENDING = 1, - HANDLING = 2, + HANDLING = 2, IGNORED = 3, } export const TouchpadSwipeGesture = GObject.registerClass({ Properties: { 'enabled': GObject.ParamSpec.boolean( - 'enabled', - 'enabled', + 'enabled', + 'enabled', 'enabled', GObject.ParamFlags.READWRITE, true, ), 'orientation': GObject.ParamSpec.enum( - 'orientation', - 'orientation', + 'orientation', + 'orientation', 'orientation', GObject.ParamFlags.READWRITE, - Clutter.Orientation, + Clutter.Orientation, Clutter.Orientation.HORIZONTAL, ), }, @@ -205,6 +205,11 @@ export const TouchpadSwipeGesture = GObject.registerClass({ } }); +declare type _SwipeTrackerOptionalParams = { + allowTouch?: boolean, + allowDrag?: boolean, + allowScroll?: boolean, +} export function createSwipeTracker( actor: Clutter.Actor, @@ -212,16 +217,29 @@ export function createSwipeTracker( allowedModes: Shell.ActionMode, orientation: Clutter.Orientation, gestureSpeed = 1, + params?: _SwipeTrackerOptionalParams, ): typeof SwipeTracker.prototype { + + params = params ?? {}; + params.allowDrag = params.allowDrag ?? false; + params.allowScroll = params.allowScroll ?? false; + const allowTouch = params.allowTouch ?? true; + delete params.allowTouch; + // create swipeTracker const swipeTracker = new SwipeTracker( actor, orientation, allowedModes, - { allowDrag: false, allowScroll: false }, - + params, ); + // remove touch gestures + if (!allowTouch && swipeTracker._touchGesture) { + global.stage.remove_action(swipeTracker._touchGesture); + delete swipeTracker._touchGesture; + } + // remove old touchpad gesture from swipeTracker if (swipeTracker._touchpadGesture) { swipeTracker._touchpadGesture.destroy(); @@ -242,8 +260,8 @@ export function createSwipeTracker( swipeTracker._touchpadGesture.connect('end', swipeTracker._endTouchpadGesture.bind(swipeTracker)); swipeTracker.bind_property('enabled', swipeTracker._touchpadGesture, 'enabled', 0); swipeTracker.bind_property( - 'orientation', - swipeTracker._touchpadGesture, + 'orientation', + swipeTracker._touchpadGesture, 'orientation', GObject.BindingFlags.SYNC_CREATE, ); diff --git a/gnome-shell/index.d.ts b/gnome-shell/index.d.ts index 1fbb4a7..22182a5 100644 --- a/gnome-shell/index.d.ts +++ b/gnome-shell/index.d.ts @@ -147,6 +147,7 @@ declare namespace imports { confirmSwipe(distance: number, snapPoints: number[], currentProgress: number, cancelProgress: number): void; destroy(): void; + _touchGesture?: Clutter.GestureAction; _touchpadGesture?: __shell_private_types.TouchpadGesture; // custom __oldTouchpadGesture?: __shell_private_types.TouchpadGesture; From 149f6474ab830f501064a3829e0de1e8f8df7e54 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Tue, 17 Aug 2021 20:40:21 +0530 Subject: [PATCH 017/155] extension_page: Update README --- extension_page.md | 2 +- metadata.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extension_page.md b/extension_page.md index 02dd7cc..b2f3017 100644 --- a/extension_page.md +++ b/extension_page.md @@ -1,4 +1,4 @@ -Gesture Improvements for Wayland/X11 +Improve touchpad gestures for Wayland/X11 This extension adds following features: diff --git a/metadata.json b/metadata.json index b10afc2..60d68bb 100644 --- a/metadata.json +++ b/metadata.json @@ -1,5 +1,5 @@ { - "description": "Touchpad gesture improvements for Wayland/X11", + "description": "Improve touchpad gestures for Wayland/X11", "name": "Gesture Improvements", "shell-version": [ "40" From 57f664082127c501775d3b564d10a8ecb199895f Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Tue, 17 Aug 2021 20:41:57 +0530 Subject: [PATCH 018/155] Remove empty file --- gnome-shell/mod.d.ts | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 gnome-shell/mod.d.ts diff --git a/gnome-shell/mod.d.ts b/gnome-shell/mod.d.ts deleted file mode 100644 index e69de29..0000000 From 8b716dd333361d26ab345a4d05c591a425f5ca0c Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Tue, 17 Aug 2021 20:51:58 +0530 Subject: [PATCH 019/155] gestures: Disable touchscreen gesture for workspace overlay shoot This change makes touchscreen gesture behave as default --- extension/src/gestures.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/extension/src/gestures.ts b/extension/src/gestures.ts index 25ea334..bda9b74 100644 --- a/extension/src/gestures.ts +++ b/extension/src/gestures.ts @@ -75,6 +75,7 @@ class WorkspaceAnimationModifier extends SwipeTrackerEndPointsModifer { Shell.ActionMode.NORMAL, Clutter.Orientation.HORIZONTAL, 1 / 1.5, + { allowTouch: false }, ); } From ae86bfd62944c5c79aeaf58ab86e5511ec14eca9 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Wed, 18 Aug 2021 01:26:31 +0530 Subject: [PATCH 020/155] snapWindow: Fix tilepreview position when panel is on bottom --- extension/src/snapWindow.ts | 61 ++++++++++--------------------------- gnome-shell/index.d.ts | 1 + 2 files changed, 17 insertions(+), 45 deletions(-) diff --git a/extension/src/snapWindow.ts b/extension/src/snapWindow.ts index 3e4e35d..292fd1b 100644 --- a/extension/src/snapWindow.ts +++ b/extension/src/snapWindow.ts @@ -89,55 +89,26 @@ const TilePreview = GObject.registerClass( return false; } - const currentMonitor = window.get_monitor(); - const monitorGeometry = global.display.get_monitor_geometry(currentMonitor); - - const frame_rect = window.get_frame_rect(); - - let [width, height] = [0, 0]; + this._window = window; + this._normalBox = window.get_frame_rect(); if (currentProgress === GestureMaxUnMaxState.MAXIMIZE) { - [width, height] = [frame_rect.width * 0.05, frame_rect.height * 0.05]; + const [width, height] = [ + this._normalBox.width * 0.05, + this._normalBox.height * 0.05, + ]; + this._normalBox.x += width; + this._normalBox.width -= 2 * width; + this._normalBox.y += height; + this._normalBox.height -= 2 * height; } - this._window = window; - this._normalBox = new Meta.Rectangle({ - x: frame_rect.x + width, - y: frame_rect.y + height, - width: frame_rect.width - width * 2, - height: frame_rect.height - height * 2, - }); - - const panelBoxRely = Main.layoutManager.panelBox.y - Main.layoutManager.primaryMonitor.y; - const panelHeight = Main.panel.visible && - window.is_on_primary_monitor() && - panelBoxRely <= 0 ? - Math.clamp( - panelBoxRely + Main.panel.height, - 0, - Main.panel.height, - ) : - 0; - - this._maximizeBox = new Meta.Rectangle({ - x: monitorGeometry.x, - y: monitorGeometry.y + panelHeight, - width: monitorGeometry.width, - height: monitorGeometry.height - panelHeight, - }); + this._maximizeBox = Main.layoutManager.getWorkAreaForMonitor(window.get_monitor()); + this._leftSnapBox = this._maximizeBox.copy(); + this._rightSnapBox = this._maximizeBox.copy(); - this._leftSnapBox = new Meta.Rectangle({ - x: monitorGeometry.x, - y: monitorGeometry.y + panelHeight, - width: monitorGeometry.width / 2, - height: monitorGeometry.height - panelHeight, - }); - - this._rightSnapBox = new Meta.Rectangle({ - x: monitorGeometry.x + monitorGeometry.width / 2, - y: monitorGeometry.y + panelHeight, - width: monitorGeometry.width / 2, - height: monitorGeometry.height - panelHeight, - }); + this._leftSnapBox.width /= 2; + this._rightSnapBox.width /= 2; + this._rightSnapBox.x += this._rightSnapBox.width; this._direction = Clutter.Orientation.VERTICAL; this._adjustment.value = currentProgress; diff --git a/gnome-shell/index.d.ts b/gnome-shell/index.d.ts index 22182a5..72189d2 100644 --- a/gnome-shell/index.d.ts +++ b/gnome-shell/index.d.ts @@ -89,6 +89,7 @@ declare namespace imports { panelBox: St.BoxLayout, primaryMonitor: __shell_private_types.IMonitorState, currentMonitor: __shell_private_types.IMonitorState, + getWorkAreaForMonitor: (index: number) => Meta.Rectangle, }; const wm: { From f90e6b3fb76758d1676da18381436aa85bfbcc07 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Wed, 18 Aug 2021 02:38:01 +0530 Subject: [PATCH 021/155] code-cleanup: Code cleanup for snapWindow --- extension/src/snapWindow.ts | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/extension/src/snapWindow.ts b/extension/src/snapWindow.ts index 292fd1b..6019d3e 100644 --- a/extension/src/snapWindow.ts +++ b/extension/src/snapWindow.ts @@ -65,6 +65,8 @@ const TilePreview = GObject.registerClass( constructor() { super({ + can_focus: false, + offscreen_redirect: Clutter.OffscreenRedirect.ALWAYS, reactive: false, style_class: 'tile-preview', style: 'border-radius: 8px', @@ -91,10 +93,10 @@ const TilePreview = GObject.registerClass( this._window = window; this._normalBox = window.get_frame_rect(); - if (currentProgress === GestureMaxUnMaxState.MAXIMIZE) { + if (window.get_maximized() === Meta.MaximizeFlags.BOTH) { const [width, height] = [ - this._normalBox.width * 0.05, - this._normalBox.height * 0.05, + Math.round(this._normalBox.width * 0.05), + Math.round(this._normalBox.height * 0.05), ]; this._normalBox.x += width; this._normalBox.width -= 2 * width; @@ -111,11 +113,11 @@ const TilePreview = GObject.registerClass( this._rightSnapBox.x += this._rightSnapBox.width; this._direction = Clutter.Orientation.VERTICAL; + this.opacity = 0; this._adjustment.value = currentProgress; this._valueChanged(); - this.opacity = 0; - this.easeOpacity(255); this.visible = true; + this.easeOpacity(255); return true; } @@ -128,7 +130,6 @@ const TilePreview = GObject.registerClass( this.easeOpacity(0, () => this.visible = false); if (this._window) { // maximize-unmaximize - this._window.raise(); if (this._direction === Clutter.Orientation.VERTICAL) { // Main.wm.skipNextEffect(this._window.get_compositor_private() as Meta.WindowActor); const stSettings = St.Settings.get(); @@ -163,14 +164,13 @@ const TilePreview = GObject.registerClass( easeActor(this._adjustment, state, { duration: duration, - mode: Clutter.AnimationMode.EASE_OUT_CIRC, + mode: Clutter.AnimationMode.EASE_OUT_QUAD, onStopped: callback, }); } _valueChanged(): void { let progress = this._adjustment.value; - // log(`progress: ${progress}`); let startBox, endBox; if (this._direction === Clutter.Orientation.VERTICAL) { @@ -203,8 +203,6 @@ const TilePreview = GObject.registerClass( this.set_position(x, y); this.set_size(width, height); - // this.opacity = Math.round(25 + 230 * progress); - // log(`value changed: ${this.get_position()}, ${this.get_size()}`); } _onDestroy(): void { From ca7120ed3c6d5b88ec33a604b2f74097f71b1882 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Mon, 30 Aug 2021 21:14:38 +0530 Subject: [PATCH 022/155] snapWindow: Remove delay for activating snap left/right gesture Related to https://github.com/harshadgavali/gnome-gesture-improvements/issues/10 --- extension/src/snapWindow.ts | 63 ++++++------------------------------- 1 file changed, 10 insertions(+), 53 deletions(-) diff --git a/extension/src/snapWindow.ts b/extension/src/snapWindow.ts index 6019d3e..b5a0737 100644 --- a/extension/src/snapWindow.ts +++ b/extension/src/snapWindow.ts @@ -2,7 +2,6 @@ import Shell from '@gi-types/shell'; import Meta from '@gi-types/meta'; import St from '@gi-types/st'; import GObject from '@gi-types/gobject'; -import GLib from '@gi-types/glib'; import Clutter from '@gi-types/clutter'; import { imports, global } from 'gnome-shell'; @@ -17,8 +16,7 @@ const { SwipeTracker } = imports.ui.swipeTracker; const WINDOW_ANIMATION_TIME = 250; const UPDATED_WINDOW_ANIMATION_TIME = 150; -const SNAPCHANGE_ANIMATION_TIME = 100; -const TRIGGER_GESTURE_DELAY = 150; +const TRIGGER_THRESHOLD = 0.1; declare interface EaseParamsType { duration: number, @@ -209,22 +207,10 @@ const TilePreview = GObject.registerClass( this._adjustment.run_dispose(); } - switchToSnapping(): void { + switchToSnapping(value: GestureTileState): void { this._adjustment.remove_transition('value'); - this._adjustment.value = 0; - let toValue = -0.05; - if (this._maximizeBox && this._normalBox) { - toValue = -18 / Math.max(18, this._maximizeBox.width - this._normalBox.width); - } - easeActor(this._adjustment, toValue, { - duration: SNAPCHANGE_ANIMATION_TIME, - repeatCount: 1, - autoReverse: true, - mode: Clutter.AnimationMode.EASE_IN_OUT_BACK, - onStopped: () => { - this._direction = Clutter.Orientation.HORIZONTAL; - }, - }); + this._adjustment.value = value; + this._direction = Clutter.Orientation.HORIZONTAL; } easeOpacity(value: number, callback?: () => void) { @@ -250,7 +236,6 @@ export class SnapWindowExtension implements ISubExtension { private _connectors: number[] = []; private _tilePreview: typeof TilePreview.prototype; private _touchpadSwipeGesture: typeof TouchpadSwipeGesture.prototype; - private _directionChangeId = 0; private _toggledDirection = false; private _allowChangeDirection = false; private _uiGroupAddedActorId: number; @@ -288,11 +273,6 @@ export class SnapWindowExtension implements ISubExtension { this._uiGroupAddedActorId = 0; } - if (this._directionChangeId) { - GLib.source_remove(this._directionChangeId); - this._directionChangeId = 0; - } - this._connectors.forEach(connector => this._swipeTracker.disconnect(connector)); Main.layoutManager.uiGroup.remove_child(this._tilePreview); this._swipeTracker.destroy(); @@ -300,10 +280,6 @@ export class SnapWindowExtension implements ISubExtension { } _gestureBegin(tracker: typeof SwipeTracker.prototype, monitor: number): void { - if (this._directionChangeId) { - GLib.source_remove(this._directionChangeId); - this._directionChangeId = 0; - } const window = global.display.get_focus_window(); if (!window || window.is_fullscreen() || !window.can_maximize()) { return; @@ -341,38 +317,19 @@ export class SnapWindowExtension implements ISubExtension { } if (progress >= GestureMaxUnMaxState.UNMAXIMIZE) { - if (this._directionChangeId) { - GLib.source_remove(this._directionChangeId); - this._directionChangeId = 0; - } this._tilePreview.adjustment.value = progress; } // switch to horizontal - else if (this._allowChangeDirection && progress <= 0.05) { - if (!this._directionChangeId) { - this._directionChangeId = GLib.timeout_add( - GLib.PRIORITY_DEFAULT, - TRIGGER_GESTURE_DELAY, - () => { - this._toggledDirection = true; - this._touchpadSwipeGesture.switchDirectionTo(Clutter.Orientation.HORIZONTAL); - this._swipeTracker._progress = GestureTileState.NORMAL; - this._swipeTracker._history.reset(); - this._tilePreview.switchToSnapping(); - - this._directionChangeId = 0; - return GLib.SOURCE_REMOVE; - }, - ); - } + else if (this._allowChangeDirection && progress <= TRIGGER_THRESHOLD) { + this._toggledDirection = true; + this._touchpadSwipeGesture.switchDirectionTo(Clutter.Orientation.HORIZONTAL); + this._swipeTracker._progress = GestureTileState.NORMAL; + this._swipeTracker._history.reset(); + this._tilePreview.switchToSnapping(GestureTileState.NORMAL); } } _gestureEnd(_tracker: never, duration: number, progress: number): void { - if (this._directionChangeId) { - GLib.source_remove(this._directionChangeId); - this._directionChangeId = 0; - } if (!this._toggledDirection) { progress = Math.clamp(progress, GestureMaxUnMaxState.UNMAXIMIZE, GestureMaxUnMaxState.MAXIMIZE); } From ee01c25d484c040c9613245e741b97e2bc7c550b Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Mon, 30 Aug 2021 22:05:51 +0530 Subject: [PATCH 023/155] snapWindow: correct trigger threshold --- extension/src/snapWindow.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension/src/snapWindow.ts b/extension/src/snapWindow.ts index b5a0737..5749e0a 100644 --- a/extension/src/snapWindow.ts +++ b/extension/src/snapWindow.ts @@ -320,7 +320,7 @@ export class SnapWindowExtension implements ISubExtension { this._tilePreview.adjustment.value = progress; } // switch to horizontal - else if (this._allowChangeDirection && progress <= TRIGGER_THRESHOLD) { + else if (this._allowChangeDirection && progress <= GestureMaxUnMaxState.UNMAXIMIZE - TRIGGER_THRESHOLD) { this._toggledDirection = true; this._touchpadSwipeGesture.switchDirectionTo(Clutter.Orientation.HORIZONTAL); this._swipeTracker._progress = GestureTileState.NORMAL; From 880ead31bc17b5fc193d0e5b6400d60d1ba50ee5 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Fri, 24 Sep 2021 23:43:36 +0530 Subject: [PATCH 024/155] Shell 41 support --- extension/src/snapWindow.ts | 2 -- metadata.json | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/extension/src/snapWindow.ts b/extension/src/snapWindow.ts index 5749e0a..155c007 100644 --- a/extension/src/snapWindow.ts +++ b/extension/src/snapWindow.ts @@ -63,8 +63,6 @@ const TilePreview = GObject.registerClass( constructor() { super({ - can_focus: false, - offscreen_redirect: Clutter.OffscreenRedirect.ALWAYS, reactive: false, style_class: 'tile-preview', style: 'border-radius: 8px', diff --git a/metadata.json b/metadata.json index 60d68bb..d6ab252 100644 --- a/metadata.json +++ b/metadata.json @@ -2,7 +2,8 @@ "description": "Improve touchpad gestures for Wayland/X11", "name": "Gesture Improvements", "shell-version": [ - "40" + "40", + "41" ], "settings-schema": "org.gnome.shell.extensions.gestureImprovements", "url": "https://github.com/harshadgavali/gnome-gesture-improvements", From 21272fb9d4c67671f37326b8e074ed91262ab19f Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sat, 25 Sep 2021 00:20:54 +0530 Subject: [PATCH 025/155] get-it-on-ego --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 0c0dc6b..6114022 100644 --- a/README.md +++ b/README.md @@ -3,12 +3,12 @@ This extension modifies and extends existing touchpad gestures on GNOME. ## Installation -### Supported Versions -* GNOME Shell 40 -### GNOME Extensions -From [extension#4245](https://extensions.gnome.org/extension/4245/gesture-improvements/). +### From GNOME Extensions Website + +Get it on EGO + -### GitHub +### Manually 1. Install extension ``` git clone https://github.com/harshadgavali/gnome-gesture-improvements.git/ From 77b4c7164f61800abec29f1ee32710202fdf2117 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Fri, 15 Oct 2021 05:03:06 +0530 Subject: [PATCH 026/155] Update version --- metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata.json b/metadata.json index d6ab252..f6b3246 100644 --- a/metadata.json +++ b/metadata.json @@ -8,5 +8,5 @@ "settings-schema": "org.gnome.shell.extensions.gestureImprovements", "url": "https://github.com/harshadgavali/gnome-gesture-improvements", "uuid": "gestureImprovements@gestures", - "version": 15.1 + "version": 16.1 } \ No newline at end of file From b1807020beee1881e3369e07a8573c1a1f5e9e1e Mon Sep 17 00:00:00 2001 From: kyte Date: Tue, 19 Oct 2021 00:53:02 +0530 Subject: [PATCH 027/155] feature: gesture to minimize a single window using 4/3 fingers --- extension/constants.ts | 1 + extension/extension.ts | 2 + ...extensions.gestureImprovements.gschema.xml | 4 ++ extension/src/snapWindow.ts | 54 ++++++++++++++----- 4 files changed, 47 insertions(+), 14 deletions(-) diff --git a/extension/constants.ts b/extension/constants.ts index 596ee0f..2c3ddd3 100644 --- a/extension/constants.ts +++ b/extension/constants.ts @@ -29,6 +29,7 @@ export const OverviewControlsState = { export const ExtSettings = { DEFAULT_SESSION_WORKSPACE_GESTURE: false, DEFAULT_OVERVIEW_GESTURE: false, + ALLOW_MINIMIZE_WINDOW: false, }; export const RELOAD_DELAY = 150; // reload extension delay in ms \ No newline at end of file diff --git a/extension/extension.ts b/extension/extension.ts index 78144a6..6e06b21 100644 --- a/extension/extension.ts +++ b/extension/extension.ts @@ -23,6 +23,7 @@ class Extension { this._noReloadDelayFor = [ 'default-session-workspace', 'default-overview', + 'allow-minimize-window', ]; } @@ -85,6 +86,7 @@ class Extension { if (this.settings) { Constants.ExtSettings.DEFAULT_SESSION_WORKSPACE_GESTURE = this.settings.get_boolean('default-session-workspace'); Constants.ExtSettings.DEFAULT_OVERVIEW_GESTURE = this.settings.get_boolean('default-overview'); + Constants.ExtSettings.ALLOW_MINIMIZE_WINDOW = this.settings.get_boolean('allow-minimize-window'); Constants.TouchpadConstants.SWIPE_MULTIPLIER = Constants.TouchpadConstants.DEFAULT_SWIPE_MULTIPLIER * this.settings.get_double('touchpad-speed-scale'); Constants.AltTabConstants.DELAY_DURATION = this.settings.get_int('alttab-delay'); } diff --git a/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml b/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml index 671581f..0c805e2 100644 --- a/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml +++ b/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml @@ -16,5 +16,9 @@ false If true, use 3-fingers for overview gesture, 4 for snapping/tiling + + false + If true, when swipe down on non-maximized window minimizes it + \ No newline at end of file diff --git a/extension/src/snapWindow.ts b/extension/src/snapWindow.ts index 155c007..ff1671f 100644 --- a/extension/src/snapWindow.ts +++ b/extension/src/snapWindow.ts @@ -38,13 +38,14 @@ function easeActor(actor: any, value: any, params: EaseParamsType) { // define enum enum GestureMaxUnMaxState { + MINIMIZE = -1, UNMAXIMIZE = 0, MAXIMIZE = 1, } // define enum enum GestureTileState { - RIGHT_TILE = -1, + RIGHT_TILE = GestureMaxUnMaxState.MINIMIZE, NORMAL = GestureMaxUnMaxState.UNMAXIMIZE, LEFT_TILE = GestureMaxUnMaxState.MAXIMIZE, } @@ -57,6 +58,7 @@ const TilePreview = GObject.registerClass( private _direction = Clutter.Orientation.VERTICAL; private _normalBox?: Meta.Rectangle; private _maximizeBox?: Meta.Rectangle; + private _minimizeBox?: Meta.Rectangle; private _leftSnapBox?: Meta.Rectangle; private _rightSnapBox?: Meta.Rectangle; private _virtualDevice: Clutter.VirtualInputDevice; @@ -103,6 +105,7 @@ const TilePreview = GObject.registerClass( this._maximizeBox = Main.layoutManager.getWorkAreaForMonitor(window.get_monitor()); this._leftSnapBox = this._maximizeBox.copy(); this._rightSnapBox = this._maximizeBox.copy(); + this._minimizeBox = this.getMinimizedBox(this._window, this._maximizeBox); this._leftSnapBox.width /= 2; this._rightSnapBox.width /= 2; @@ -134,8 +137,10 @@ const TilePreview = GObject.registerClass( stSettings.slow_down_factor = UPDATED_WINDOW_ANIMATION_TIME / WINDOW_ANIMATION_TIME; if (state === GestureMaxUnMaxState.MAXIMIZE) { this._window.maximize(Meta.MaximizeFlags.BOTH); - } else { + } else if (state === GestureMaxUnMaxState.UNMAXIMIZE) { this._window.unmaximize(Meta.MaximizeFlags.BOTH); + } else { + this._window.minimize(); } stSettings.slow_down_factor = prevSlowdown; } @@ -153,6 +158,7 @@ const TilePreview = GObject.registerClass( this._window = undefined; this._normalBox = undefined; this._maximizeBox = undefined; + this._minimizeBox = undefined; this._leftSnapBox = undefined; this._rightSnapBox = undefined; this._direction = Clutter.Orientation.VERTICAL; @@ -171,7 +177,12 @@ const TilePreview = GObject.registerClass( if (this._direction === Clutter.Orientation.VERTICAL) { startBox = this._normalBox; - endBox = this._maximizeBox; + if (progress >= GestureMaxUnMaxState.UNMAXIMIZE) { + endBox = this._maximizeBox; + } else { + endBox = this._minimizeBox; + progress = -progress; + } } else { startBox = this._normalBox; @@ -226,6 +237,17 @@ const TilePreview = GObject.registerClass( get adjustment(): St.Adjustment { return this._adjustment; } + + private getMinimizedBox(window: Meta.Window, monitorWorkArea: Meta.Rectangle) { + const [has_icon, icon_geometry] = window.get_icon_geometry(); + if (has_icon) + return icon_geometry; + + const rect = monitorWorkArea.copy(); + rect.width = 0; + rect.height = 0; + return rect; + } }, ); @@ -289,15 +311,22 @@ export class SnapWindowExtension implements ISubExtension { const currentMonitor = window.get_monitor(); const monitorGeo = global.display.get_monitor_geometry(currentMonitor); - const progress = window.get_maximized() === Meta.MaximizeFlags.BOTH ? 1 : 0; + const progress = window.get_maximized() === Meta.MaximizeFlags.BOTH ? GestureMaxUnMaxState.MAXIMIZE : GestureMaxUnMaxState.UNMAXIMIZE; this._toggledDirection = false; - this._allowChangeDirection = progress === 0; + // allow tiling gesture, when window is unmaximized and minimized gesture is not enabled + this._allowChangeDirection = progress === GestureMaxUnMaxState.UNMAXIMIZE && !ExtSettings.ALLOW_MINIMIZE_WINDOW; - const snapPoints = progress === 1 ? - [GestureMaxUnMaxState.UNMAXIMIZE, GestureMaxUnMaxState.MAXIMIZE] : - [GestureTileState.RIGHT_TILE, GestureTileState.NORMAL, GestureTileState.LEFT_TILE]; + const snapPoints: number[] = []; + if (this._allowChangeDirection) { + snapPoints.push(GestureTileState.RIGHT_TILE, GestureTileState.NORMAL, GestureTileState.LEFT_TILE); + } + else { + if (progress === GestureMaxUnMaxState.UNMAXIMIZE) + snapPoints.push(GestureMaxUnMaxState.MINIMIZE); + snapPoints.push(GestureMaxUnMaxState.UNMAXIMIZE, GestureMaxUnMaxState.MAXIMIZE); + } - if (this._tilePreview.open(window, progress ? GestureMaxUnMaxState.MAXIMIZE : GestureMaxUnMaxState.UNMAXIMIZE)) { + if (this._tilePreview.open(window, progress)) { tracker.confirmSwipe( monitorGeo.height, snapPoints, @@ -314,7 +343,8 @@ export class SnapWindowExtension implements ISubExtension { return; } - if (progress >= GestureMaxUnMaxState.UNMAXIMIZE) { + // if tiling gesture is not allowed or progress is above unmaximized state + if (progress >= GestureMaxUnMaxState.UNMAXIMIZE || !this._allowChangeDirection) { this._tilePreview.adjustment.value = progress; } // switch to horizontal @@ -328,10 +358,6 @@ export class SnapWindowExtension implements ISubExtension { } _gestureEnd(_tracker: never, duration: number, progress: number): void { - if (!this._toggledDirection) { - progress = Math.clamp(progress, GestureMaxUnMaxState.UNMAXIMIZE, GestureMaxUnMaxState.MAXIMIZE); - } - this._tilePreview.finish(duration, progress); } } \ No newline at end of file From ee562abc3a944632bf50d39116b37a7702acb63e Mon Sep 17 00:00:00 2001 From: Harshad <30668911+harshadgavali@users.noreply.github.com> Date: Tue, 19 Oct 2021 23:34:30 +0530 Subject: [PATCH 028/155] Create ci.yml --- .github/workflows/ci.yml | 41 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..40dbfb2 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,41 @@ +name: Extension CI + +on: + push: + branches: [ '*' ] + pull_request: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [12.x, 14.x, 16.x] + + steps: + - uses: actions/checkout@v2 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + + - name: Install dependencies + run: | + npm install + + - name: Build + run: | + npm run build + + - name: Create Zip + run: | + make pack + + - name: Upload archive artifact + uses: "actions/upload-artifact@v2" + with: + name: "gestureImprovements@gestures.shell-extension.zip" + path: "${{ github.workspace }}/build/gestureImprovements@gestures.shell-extension.zip" From 7f193cd03c111d69acfe7b8b0e4c0fb3d4fbc894 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Tue, 19 Oct 2021 23:39:20 +0530 Subject: [PATCH 029/155] Update makefile to work without `gnome-extensions` command --- .github/workflows/ci.yml | 56 ++++++++++++++++++++-------------------- Makefile | 17 +++++++----- 2 files changed, 39 insertions(+), 34 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 40dbfb2..b5dfa3e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,9 +2,9 @@ name: Extension CI on: push: - branches: [ '*' ] + branches: ["*"] pull_request: - branches: [ main ] + branches: [main] jobs: build: @@ -12,30 +12,30 @@ jobs: strategy: matrix: - node-version: [12.x, 14.x, 16.x] - + node-version: [16.x] + steps: - - uses: actions/checkout@v2 - - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - - name: Install dependencies - run: | - npm install - - - name: Build - run: | - npm run build - - - name: Create Zip - run: | - make pack - - - name: Upload archive artifact - uses: "actions/upload-artifact@v2" - with: - name: "gestureImprovements@gestures.shell-extension.zip" - path: "${{ github.workspace }}/build/gestureImprovements@gestures.shell-extension.zip" + - uses: actions/checkout@v2 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + + - name: Install dependencies + run: | + npm install + + - name: Build + run: | + npm run build + + - name: Create Zip + run: | + make pack + + - name: Upload archive artifact + uses: "actions/upload-artifact@v2" + with: + name: "gestureImprovements@gestures.shell-extension.zip" + path: "${{ github.workspace }}/build/gestureImprovements@gestures.shell-extension.zip" diff --git a/Makefile b/Makefile index 95a7849..d25ddb4 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,19 @@ +UUID=gestureImprovements@gestures EXTENSIONDIR=build/extension -BUILDIR=build/ +BUILDIR=build +ZIPPATH="${PWD}/${BUILDIR}/${UUID}.shell-extension.zip" +UPDATE_CMD = gnome-extensions install -f ${ZIPPATH} +ifdef FLATPAK_ID + UPDATE_CMD = flatpak-spawn --host gnome-extensions install -f ${ZIPPATH} +endif pack: cp metadata.json $(EXTENSIONDIR) cp -r extension/ui extension/schemas $(EXTENSIONDIR) - gnome-extensions pack --force \ - --out-dir $(BUILDIR) $(EXTENSIONDIR) \ - --extra-source=constants.js \ - --extra-source=src --extra-source=ui --extra-source=schemas + glib-compile-schemas ${EXTENSIONDIR}/schemas + rm -f ${ZIPPATH} + cd ${EXTENSIONDIR} && zip -r ${ZIPPATH} . update: - gnome-extensions install -f build/*.shell-extension.zip \ No newline at end of file + ${UPDATE_CMD} From 7bdbe9fadf6a13132775cb86a6254ffcdd5d76b1 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Tue, 19 Oct 2021 23:46:05 +0530 Subject: [PATCH 030/155] ci: Split build step --- .github/workflows/ci.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b5dfa3e..b5d007f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,11 +26,21 @@ jobs: run: | npm install + - name: Lint Source + run: | + npm run clean + npm run lint:extension + - name: Build run: | - npm run build + tsc + node build/scripts/transpile.js + + - name: Lint package + run: | + npm run lint:package - - name: Create Zip + - name: Create archive artifact run: | make pack From 087240aacdfc05e3e26e3a75ceda97c85a2d4696 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Fri, 15 Oct 2021 05:04:18 +0530 Subject: [PATCH 031/155] Add preference to not follow natural scroll Changing preference affects workspace gesture and appgrid gesture --- extension/constants.ts | 1 + extension/extension.ts | 2 ++ ...rg.gnome.shell.extensions.gestureImprovements.gschema.xml | 3 +++ extension/src/gestures.ts | 5 +++-- extension/src/snapWindow.ts | 1 + extension/src/swipeTracker.ts | 3 ++- 6 files changed, 12 insertions(+), 3 deletions(-) diff --git a/extension/constants.ts b/extension/constants.ts index 596ee0f..f2e10a2 100644 --- a/extension/constants.ts +++ b/extension/constants.ts @@ -29,6 +29,7 @@ export const OverviewControlsState = { export const ExtSettings = { DEFAULT_SESSION_WORKSPACE_GESTURE: false, DEFAULT_OVERVIEW_GESTURE: false, + FOLLOW_NATURAL_SCROLL: true, }; export const RELOAD_DELAY = 150; // reload extension delay in ms \ No newline at end of file diff --git a/extension/extension.ts b/extension/extension.ts index 78144a6..50dc9f9 100644 --- a/extension/extension.ts +++ b/extension/extension.ts @@ -23,6 +23,7 @@ class Extension { this._noReloadDelayFor = [ 'default-session-workspace', 'default-overview', + 'follow-natural-scroll', ]; } @@ -85,6 +86,7 @@ class Extension { if (this.settings) { Constants.ExtSettings.DEFAULT_SESSION_WORKSPACE_GESTURE = this.settings.get_boolean('default-session-workspace'); Constants.ExtSettings.DEFAULT_OVERVIEW_GESTURE = this.settings.get_boolean('default-overview'); + Constants.ExtSettings.FOLLOW_NATURAL_SCROLL = this.settings.get_boolean('follow-natural-scroll'); Constants.TouchpadConstants.SWIPE_MULTIPLIER = Constants.TouchpadConstants.DEFAULT_SWIPE_MULTIPLIER * this.settings.get_double('touchpad-speed-scale'); Constants.AltTabConstants.DELAY_DURATION = this.settings.get_int('alttab-delay'); } diff --git a/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml b/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml index 671581f..b008d61 100644 --- a/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml +++ b/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml @@ -16,5 +16,8 @@ false If true, use 3-fingers for overview gesture, 4 for snapping/tiling + + true + \ No newline at end of file diff --git a/extension/src/gestures.ts b/extension/src/gestures.ts index bda9b74..f155e44 100644 --- a/extension/src/gestures.ts +++ b/extension/src/gestures.ts @@ -74,6 +74,7 @@ class WorkspaceAnimationModifier extends SwipeTrackerEndPointsModifer { (ExtSettings.DEFAULT_SESSION_WORKSPACE_GESTURE ? [3] : [4]), Shell.ActionMode.NORMAL, Clutter.Orientation.HORIZONTAL, + ExtSettings.FOLLOW_NATURAL_SCROLL, 1 / 1.5, { allowTouch: false }, ); @@ -136,7 +137,7 @@ export class GestureExtension implements ISubExtension { swipeTracker: Main.overview._overview._controls._workspacesDisplay._swipeTracker, nfingers: [3, 4], disableOldGesture: true, - followNaturalScroll: true, + followNaturalScroll: ExtSettings.FOLLOW_NATURAL_SCROLL, modes: Shell.ActionMode.OVERVIEW, gestureSpeed: 1 / 1.5, checkAllowedGesture: (event: CustomEventType) => { @@ -154,7 +155,7 @@ export class GestureExtension implements ISubExtension { swipeTracker: Main.overview._overview._controls._appDisplay._swipeTracker, nfingers: [3], disableOldGesture: true, - followNaturalScroll: true, + followNaturalScroll: ExtSettings.FOLLOW_NATURAL_SCROLL, modes: Shell.ActionMode.OVERVIEW, checkAllowedGesture: () => { if (Main.overview._overview._controls._searchController.searchActive) { diff --git a/extension/src/snapWindow.ts b/extension/src/snapWindow.ts index 155c007..8c5a3c5 100644 --- a/extension/src/snapWindow.ts +++ b/extension/src/snapWindow.ts @@ -244,6 +244,7 @@ export class SnapWindowExtension implements ISubExtension { (ExtSettings.DEFAULT_OVERVIEW_GESTURE ? [4] : [3]), Shell.ActionMode.NORMAL, Clutter.Orientation.VERTICAL, + true, 1, { allowTouch: false }, ); diff --git a/extension/src/swipeTracker.ts b/extension/src/swipeTracker.ts index 0ce8619..6bcab3d 100644 --- a/extension/src/swipeTracker.ts +++ b/extension/src/swipeTracker.ts @@ -216,6 +216,7 @@ export function createSwipeTracker( nfingers: number[], allowedModes: Shell.ActionMode, orientation: Clutter.Orientation, + followNaturalScroll = true, gestureSpeed = 1, params?: _SwipeTrackerOptionalParams, ): typeof SwipeTracker.prototype { @@ -251,7 +252,7 @@ export function createSwipeTracker( nfingers, swipeTracker._allowedModes, swipeTracker.orientation, - true, + followNaturalScroll, undefined, gestureSpeed, ); From 1e71c8756545735e24f5a6d012cb55968331c44f Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sat, 23 Oct 2021 05:55:52 +0530 Subject: [PATCH 032/155] eslint: Add rule 'eqeqeq' --- .eslintrc.json | 3 ++- extension/src/altTab.ts | 2 +- scripts/transpile.ts | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index d19e3d6..b5cefed 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -81,7 +81,8 @@ "function-paren-newline": [ "error", "multiline-arguments" - ] + ], + "eqeqeq": "error" }, "overrides": [ { diff --git a/extension/src/altTab.ts b/extension/src/altTab.ts index af7c69e..adacc88 100644 --- a/extension/src/altTab.ts +++ b/extension/src/altTab.ts @@ -168,7 +168,7 @@ export class AltTabGestureExtension implements ISubExtension { if (this._extState === AltTabExtState.ALTTAB || this._extState === AltTabExtState.ALTTABDELAY) { this._extState = AltTabExtState.DEFAULT; - if (this._altTabTimeoutId != 0) { + if (this._altTabTimeoutId) { GLib.source_remove(this._altTabTimeoutId); this._altTabTimeoutId = 0; } diff --git a/scripts/transpile.ts b/scripts/transpile.ts index 45c790e..7645234 100644 --- a/scripts/transpile.ts +++ b/scripts/transpile.ts @@ -173,7 +173,7 @@ const transformExports: ts.TransformerFactory = context => { context.factory.createVariableStatement( [], node.declarationList.declarations.map(d => { - if (d.name.kind == ts.SyntaxKind.Identifier) { + if (d.name.kind === ts.SyntaxKind.Identifier) { variables.push((d.name as ts.Identifier).text); } return moveComments(createVariableDeclaration(context, d.name, d.initializer), d); From 1036b013c3fc7dde19af665973a001cb047bf1f0 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sat, 23 Oct 2021 05:58:49 +0530 Subject: [PATCH 033/155] Add environment file for shell related changes --- extension/src/utils/environment.ts | 21 +++++++++++++++++++++ gnome-shell/global.d.ts | 5 ++++- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 extension/src/utils/environment.ts diff --git a/extension/src/utils/environment.ts b/extension/src/utils/environment.ts new file mode 100644 index 0000000..24f6f29 --- /dev/null +++ b/extension/src/utils/environment.ts @@ -0,0 +1,21 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ + +import GObject from '@gi-types/gobject'; +import { Actor, AnimationMode } from '@gi-types/clutter'; +import { Adjustment } from '@gi-types/st'; + +declare type EaseParamsType = { + duration: number; + mode: AnimationMode; + repeatCount?: number; + autoReverse?: boolean; + onStopped?: (isFinished?: boolean) => void; +} & { [P in KeysOfType]?: number }; + +export function easeActor(actor: T, params: EaseParamsType): void { + (actor as any).ease(params); +} + +export function easeAdjustment(actor: Adjustment, value: number, params: EaseParamsType): void { + (actor as any).ease(value, params); +} \ No newline at end of file diff --git a/gnome-shell/global.d.ts b/gnome-shell/global.d.ts index d8b882c..d14af5a 100644 --- a/gnome-shell/global.d.ts +++ b/gnome-shell/global.d.ts @@ -13,4 +13,7 @@ declare interface ISubExtension { declare interface Math { clamp(num: number, min: number, max: number): number; -} \ No newline at end of file +} + +// types +declare type KeysOfType = { [P in keyof T]: T[P] extends U ? P : never; }[keyof T]; \ No newline at end of file From 493f6e7b8aafb3de17adceab2154689a91ebaf12 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sat, 23 Oct 2021 06:33:18 +0530 Subject: [PATCH 034/155] gobject: Add registerClass method to give modified returned type --- extension/src/utils/gobject.ts | 89 ++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 extension/src/utils/gobject.ts diff --git a/extension/src/utils/gobject.ts b/extension/src/utils/gobject.ts new file mode 100644 index 0000000..8cf2be2 --- /dev/null +++ b/extension/src/utils/gobject.ts @@ -0,0 +1,89 @@ +/** + * @file This file provides {@link registerClass} function similar to {@link GObject.registerClass} + * Modification provided by {@link registerClass} + * - Add `connect(signal_name, ....)` function to prototype returned + * - Use parameters of constructor of class , instead of `_init` function of class for new method of prototype returned + * - Make `Properties` parameter mandatory @{link https://gitlab.gnome.org/ewlsh/gi.ts/-/issues/6} + */ + +/* eslint-disable @typescript-eslint/ban-types */ +/* eslint-disable @typescript-eslint/no-explicit-any */ + +import GObject from '@gi-types/gobject'; +const OGRegisterClass = GObject.registerClass; + +type ConstructorType = new (...args: any[]) => any; + +type IFaces }[]> = { + [key in keyof Interfaces]: Interfaces[key] extends { $gtype: GObject.GType } ? I : never; +}; + +type _TupleOf = R['length'] extends N ? R : _TupleOf; +/** Tuple of Type T, and of length N */ +type Tuple = _TupleOf; + +type GObjectSignalDefinition = { + param_types?: Partial>; + [key: string]: any; +}; + +/** Get typescript type for {@link GObjectSignalDefinition.param_types} */ +type CallBackTypeTuple = T extends any[] ? { [P in keyof T]: T[P] extends GObject.GType ? R : never } : []; + +export type RegisteredPrototype< + P extends {}, + Props extends { [key: string]: GObject.ParamSpec }, + Interfaces extends any[], + Sigs extends { [key: string]: GObjectSignalDefinition } + > = { + /// This is one of modification done by this file + connect( + key: K, + callback: ( + _source: RegisteredPrototype, + ...args: CallBackTypeTuple + ) => void, + ): number, + } & GObject.RegisteredPrototype; + +export type RegisteredClass< + T extends ConstructorType, + Props extends { [key: string]: GObject.ParamSpec }, + Interfaces extends { $gtype: GObject.GType }[], + Sigs extends { [key: string]: GObjectSignalDefinition } + > = T extends { prototype: infer P } + ? { + $gtype: GObject.GType, Sigs>>; + prototype: RegisteredPrototype, Sigs>; + /// use constructor parameter instead of '_init' parameters + new(...args: ConstructorParameters): RegisteredPrototype, Sigs>; + } + : never; + +export function registerClass(klass: T): RegisteredClass; +export function registerClass< + T extends ConstructorType, + Props extends { [key: string]: GObject.ParamSpec }, + Interfaces extends { $gtype: GObject.GType }[], + Sigs extends { [key: string]: GObjectSignalDefinition } +>( + options: { + GTypeName?: string; + GTypeFlags?: GObject.TypeFlags; + /// Make properties mandatory + Properties: Props; + Signals?: Sigs; + Implements?: Interfaces; + CssName?: string; + Template?: string; + Children?: string[]; + InternalChildren?: string[]; + }, + klass: T +): RegisteredClass; + +export function registerClass(...args: any[]): any { + if (args.length === 2) + return OGRegisterClass(args[0], args[1]); + return OGRegisterClass(args[0]); +} \ No newline at end of file From 2c5057e078b8bdc82799edcf367f5670b8789bc0 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sat, 23 Oct 2021 06:34:43 +0530 Subject: [PATCH 035/155] clutter: Add 'TOUCHPAD_HOLD' event type --- extension/src/utils/clutter.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 extension/src/utils/clutter.ts diff --git a/extension/src/utils/clutter.ts b/extension/src/utils/clutter.ts new file mode 100644 index 0000000..bab5c11 --- /dev/null +++ b/extension/src/utils/clutter.ts @@ -0,0 +1,13 @@ +import { EventType, TouchpadGesturePhase } from '@gi-types/clutter'; + +export const ClutterEventType = { ...EventType, TOUCHPAD_HOLD: 1234 }; + +export interface CustomEventType { + type(): number, + get_gesture_phase(): TouchpadGesturePhase, + get_touchpad_gesture_finger_count(): number, + get_time(): number, + get_coords(): [number, number], + get_gesture_motion_delta_unaccelerated(): [number, number], + get_is_cancelled(): boolean, +} \ No newline at end of file From 8d94ae19dd49d4de79291d2a93e6183357320ac7 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sat, 23 Oct 2021 06:35:48 +0530 Subject: [PATCH 036/155] snapWindow: Use environment file --- extension/src/snapWindow.ts | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/extension/src/snapWindow.ts b/extension/src/snapWindow.ts index 8c5a3c5..0f50eae 100644 --- a/extension/src/snapWindow.ts +++ b/extension/src/snapWindow.ts @@ -1,7 +1,6 @@ import Shell from '@gi-types/shell'; import Meta from '@gi-types/meta'; import St from '@gi-types/st'; -import GObject from '@gi-types/gobject'; import Clutter from '@gi-types/clutter'; import { imports, global } from 'gnome-shell'; @@ -11,6 +10,8 @@ const Utils = imports.misc.util; import { createSwipeTracker, TouchpadSwipeGesture } from './swipeTracker'; import { ExtSettings } from '../constants'; +import { registerClass } from './utils/gobject'; +import { easeActor, easeAdjustment } from './utils/environment'; const { SwipeTracker } = imports.ui.swipeTracker; @@ -18,24 +19,6 @@ const WINDOW_ANIMATION_TIME = 250; const UPDATED_WINDOW_ANIMATION_TIME = 150; const TRIGGER_THRESHOLD = 0.1; -declare interface EaseParamsType { - duration: number, - mode: Clutter.AnimationMode, - repeatCount?: number, - autoReverse?: boolean, - onStopped?: (isFinished?: boolean) => void, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - [key: string]: any -} - -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function easeActor(actor: any, value: any, params: EaseParamsType) { - if (value !== undefined) - actor.ease(value, params); - else - actor.ease(params); -} - // define enum enum GestureMaxUnMaxState { UNMAXIMIZE = 0, @@ -49,7 +32,7 @@ enum GestureTileState { LEFT_TILE = GestureMaxUnMaxState.MAXIMIZE, } -const TilePreview = GObject.registerClass( +const TilePreview = registerClass( class TilePreview extends St.Widget { private _adjustment: St.Adjustment; @@ -158,7 +141,7 @@ const TilePreview = GObject.registerClass( this._direction = Clutter.Orientation.VERTICAL; }; - easeActor(this._adjustment, state, { + easeAdjustment(this._adjustment, state, { duration: duration, mode: Clutter.AnimationMode.EASE_OUT_QUAD, onStopped: callback, @@ -212,7 +195,7 @@ const TilePreview = GObject.registerClass( } easeOpacity(value: number, callback?: () => void) { - easeActor(this, undefined, { + easeActor(this as St.Widget, { opacity: value, duration: UPDATED_WINDOW_ANIMATION_TIME, mode: Clutter.AnimationMode.EASE_OUT_QUAD, From afef4cff5bc2eb8d6ba24cc50577aa81d52209d9 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sat, 23 Oct 2021 06:37:13 +0530 Subject: [PATCH 037/155] swipeTracker: Read 'TOUCHPAD_HOLD' gesture --- extension/src/swipeTracker.ts | 41 ++++++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/extension/src/swipeTracker.ts b/extension/src/swipeTracker.ts index 6bcab3d..bc7339c 100644 --- a/extension/src/swipeTracker.ts +++ b/extension/src/swipeTracker.ts @@ -2,13 +2,15 @@ import Clutter from '@gi-types/clutter'; import GObject from '@gi-types/gobject'; import Shell from '@gi-types/shell'; import Meta from '@gi-types/meta'; -import { imports, global, CustomEventType } from 'gnome-shell'; +import { imports, global } from 'gnome-shell'; const Main = imports.ui.main; const { SwipeTracker } = imports.ui.swipeTracker; import * as DBusUtils from './utils/dbus'; import { TouchpadConstants } from '../constants'; +import { registerClass } from './utils/gobject'; +import { ClutterEventType, CustomEventType } from './utils/clutter'; // define enum enum TouchpadState { @@ -18,7 +20,7 @@ enum TouchpadState { IGNORED = 3, } -export const TouchpadSwipeGesture = GObject.registerClass({ +export const TouchpadSwipeGesture = registerClass({ Properties: { 'enabled': GObject.ParamSpec.boolean( 'enabled', @@ -57,13 +59,17 @@ export const TouchpadSwipeGesture = GObject.registerClass({ TOUCHPAD_BASE_WIDTH = TouchpadConstants.TOUCHPAD_BASE_WIDTH; DRAG_THRESHOLD_DISTANCE = TouchpadConstants.DRAG_THRESHOLD_DISTANCE; enabled = true; + private _lastHoldCancelledTime = 0; + private _hadHoldGesture = false; + private HOLD_TIME = 100; // ms + private _time = 0; constructor( nfingers: number[], allowedModes: Shell.ActionMode, orientation: Clutter.Orientation, followNaturalScroll = true, - checkAllowedGesture = undefined, + checkAllowedGesture?: (event: CustomEventType) => boolean, gestureSpeed = 1.0, ) { super(); @@ -82,7 +88,17 @@ export const TouchpadSwipeGesture = GObject.registerClass({ this.SWIPE_MULTIPLIER = TouchpadConstants.SWIPE_MULTIPLIER * (typeof (gestureSpeed) !== 'number' ? 1.0 : gestureSpeed); } + _handleHold(event: CustomEventType): void { + if (event.get_gesture_phase() === Clutter.TouchpadGesturePhase.END && event.get_is_cancelled()) + this._lastHoldCancelledTime = event.get_time(); + } + _handleEvent(_actor: undefined | Clutter.Actor, event: CustomEventType): boolean { + if (event.type() === ClutterEventType.TOUCHPAD_HOLD) { + this._handleHold(event); + return Clutter.EVENT_PROPAGATE; + } + if (event.type() !== Clutter.EventType.TOUCHPAD_SWIPE) return Clutter.EVENT_PROPAGATE; @@ -90,6 +106,8 @@ export const TouchpadSwipeGesture = GObject.registerClass({ if (gesturePhase === Clutter.TouchpadGesturePhase.BEGIN) { this._state = TouchpadState.NONE; this._toggledDirection = false; + + this._hadHoldGesture = event.get_time() - this._lastHoldCancelledTime <= this.HOLD_TIME; } if (this._state === TouchpadState.IGNORED) @@ -126,6 +144,7 @@ export const TouchpadSwipeGesture = GObject.registerClass({ const [x, y] = event.get_coords(); const [dx, dy] = event.get_gesture_motion_delta_unaccelerated(); + this._time = time; if (this._state === TouchpadState.NONE) { if (dx === 0 && dy === 0) return Clutter.EVENT_PROPAGATE; @@ -203,6 +222,22 @@ export const TouchpadSwipeGesture = GObject.registerClass({ this._stageCaptureEvent = 0; } } + + get hadHoldGesture(): boolean { + return this._hadHoldGesture; + } + + get time(): number { + return this._time; + } + + get followNaturalScroll(): boolean { + return this._followNaturalScroll; + } + + set followNaturalScroll(follow: boolean) { + this._followNaturalScroll = follow; + } }); declare type _SwipeTrackerOptionalParams = { From 9e52f2db9b434b0cbb328141e2c4ad15e8af4840 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sat, 23 Oct 2021 06:38:51 +0530 Subject: [PATCH 038/155] dbus: Read 'TouchpadHold' signal from daemon --- extension/src/utils/dbus.ts | 93 ++++++++++++++++++++++++------------- 1 file changed, 61 insertions(+), 32 deletions(-) diff --git a/extension/src/utils/dbus.ts b/extension/src/utils/dbus.ts index df14973..b0d7c1e 100644 --- a/extension/src/utils/dbus.ts +++ b/extension/src/utils/dbus.ts @@ -1,21 +1,26 @@ -import { CustomEventType, imports, global } from 'gnome-shell'; +import { imports, global } from 'gnome-shell'; import Clutter from '@gi-types/clutter'; import Gio from '@gi-types/gio'; import Meta from '@gi-types/meta'; import GObject from '@gi-types/gobject'; +import { registerClass } from './gobject'; +import { ClutterEventType, CustomEventType } from './clutter'; const Util = imports.misc.util; const X11GestureDaemonXml = ` - + + + + `; -const DBusWrapperGIExtension = GObject.registerClass({ +const DBusWrapperGIExtension = registerClass({ Signals: { 'TouchpadSwipe': { param_types: [ @@ -28,11 +33,23 @@ const DBusWrapperGIExtension = GObject.registerClass({ accumulator: GObject.AccumulatorType.TRUE_HANDLED, return_type: GObject.TYPE_BOOLEAN, }, + 'TouchpadHold': { + param_types: [ + GObject.TYPE_STRING, // phase + GObject.TYPE_INT, // fingers + GObject.TYPE_UINT, // time + GObject.TYPE_BOOLEAN, // is_cancelled + ], + flags: GObject.SignalFlags.RUN_LAST, + accumulator: GObject.AccumulatorType.TRUE_HANDLED, + return_type: GObject.TYPE_BOOLEAN, + }, }, + Properties: {}, }, class DBusWrapperGIExtension extends GObject.Object { // eslint-disable-next-line @typescript-eslint/no-explicit-any private _proxy?: any; - private _proxyConnectSignalId = 0; + private _proxyConnectSignalIds: number[] = []; constructor() { super(); @@ -44,25 +61,53 @@ const DBusWrapperGIExtension = GObject.registerClass({ '/org/gestureImprovements/gestures', ); - this._proxyConnectSignalId = this._proxy.connectSignal('TouchpadSwipe', this._handleDbusSignal.bind(this)); + this._proxyConnectSignalIds.push(this._proxy.connectSignal('TouchpadSwipe', this._handleDbusSwipeSignal.bind(this))); + this._proxyConnectSignalIds.push(this._proxy.connectSignal('TouchpadHold', this._handleDbusHoldSignal.bind(this))); } } dropProxy() { if (this._proxy) { - this._proxy.disconnectSignal(this._proxyConnectSignalId); + this._proxyConnectSignalIds.forEach(id => this._proxy.disconnectSignal(id)); this._proxy.run_dispose(); this._proxy = undefined; } } // eslint-disable-next-line @typescript-eslint/no-explicit-any - _handleDbusSignal(_proxy: never, _sender: never, params: [any]): void { + _handleDbusSwipeSignal(_proxy: never, _sender: never, params: [any]): void { const [sphase, fingers, dx, dy, time] = params[0]; this.emit('TouchpadSwipe', sphase, fingers, dx, dy, time); } + + // eslint-disable-next-line @typescript-eslint/no-explicit-any + _handleDbusHoldSignal(_proxy: never, _sender: never, params: [any]): void { + const [sphase, fingers, time, is_cancelled] = params[0]; + this.emit('TouchpadHold', sphase, fingers, time, is_cancelled); + } }); +function GenerateEvent(type: number, sphase: string, fingers: number, time: number, dx?: number, dy?: number, is_cancelled?: boolean): CustomEventType { + return { + type: () => type, + get_gesture_phase: () => { + switch (sphase) { + case 'Begin': + return Clutter.TouchpadGesturePhase.BEGIN; + case 'Update': + return Clutter.TouchpadGesturePhase.UPDATE; + default: + return Clutter.TouchpadGesturePhase.END; + } + }, + get_touchpad_gesture_finger_count: () => fingers, + get_coords: () => global.get_pointer().slice(0, 2) as [number, number], + get_gesture_motion_delta_unaccelerated: () => [dx ?? 0, dy ?? 0], + get_time: () => time, + get_is_cancelled: () => is_cancelled ?? false, + }; +} + let proxy: typeof DBusWrapperGIExtension.prototype | undefined; let connectedSignalIds: number[] = []; @@ -76,31 +121,15 @@ export function subscribe(callback: (actor: never | undefined, event: CustomEven } connectedSignalIds.push( - proxy.connect('TouchpadSwipe', ( - _proxy: never, - sphase: string, - fingers: number, - dx: number, - dy: number, - time: number, - ) => { - const event: CustomEventType = { - type: () => Clutter.EventType.TOUCHPAD_SWIPE, - get_gesture_phase: () => { - switch (sphase) { - case 'Begin': - return Clutter.TouchpadGesturePhase.BEGIN; - case 'Update': - return Clutter.TouchpadGesturePhase.UPDATE; - default: - return Clutter.TouchpadGesturePhase.END; - } - }, - get_touchpad_gesture_finger_count: () => fingers, - get_coords: () => global.get_pointer().slice(0, 2) as [number, number], - get_gesture_motion_delta_unaccelerated: () => [dx, dy], - get_time: () => time, - }; + proxy.connect('TouchpadSwipe', (_source, sphase, fingers, dx, dy, time) => { + const event = GenerateEvent(ClutterEventType.TOUCHPAD_SWIPE, sphase, fingers, time, dx, dy); + return callback(undefined, event); + }), + ); + + connectedSignalIds.push( + proxy.connect('TouchpadHold', (_source, sphase, fingers, time, is_cancelled) => { + const event = GenerateEvent(ClutterEventType.TOUCHPAD_HOLD, sphase, fingers, time, undefined, undefined, is_cancelled); return callback(undefined, event); }), ); From aae55eb10fb341bfe103b79f1f5d423dc59e23d0 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sat, 23 Oct 2021 06:41:11 +0530 Subject: [PATCH 039/155] gnome-shell: Update index.d.ts --- gnome-shell/index.d.ts | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/gnome-shell/index.d.ts b/gnome-shell/index.d.ts index 72189d2..ec8554b 100644 --- a/gnome-shell/index.d.ts +++ b/gnome-shell/index.d.ts @@ -29,6 +29,11 @@ declare namespace __shell_private_types { _stageCaptureEvent: number; destroy(): void; _handleEvent(actor: Clutter.Actor | undefined, event: CustomEventType): boolean; + + /** This values are provided by Modified TouchpadGesture */ + hadHoldGesture?: boolean; + time?: number; + followNaturalScroll?: boolean; } declare interface IMonitorState { @@ -190,6 +195,14 @@ declare namespace imports { _switchWorkspaceUpdate(tracker: swipeTracker.SwipeTracker, progress: number); _switchWorkspaceEnd(tracker: swipeTracker.SwipeTracker, duration: number, progress: number); + + movingWindow: Meta.Window; + } + } + + namespace layout { + declare class MonitorConstraint extends Clutter.Constraint { + constructor(params: Partial<{ primary: boolean }>); } } } @@ -228,15 +241,4 @@ declare namespace imports { } } } -} - -/// custom types - -declare interface CustomEventType { - type(): Clutter.EventType, - get_gesture_phase(): Clutter.TouchpadGesturePhase, - get_touchpad_gesture_finger_count(): number, - get_time(): number, - get_coords(): [number, number], - get_gesture_motion_delta_unaccelerated(): [number, number], } \ No newline at end of file From 10381a2ebf7fd12a8bfc169e362c00d99719212b Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sat, 23 Oct 2021 06:48:18 +0530 Subject: [PATCH 040/155] Gesture: Add gesture to move window to different workspace This uses 'TOUCHPAD_HOLD' gesture to trigger this gesture This also adds option to animate top-panel, which gives visual feedback that window is moving to different workspace when window is maximized. --- extension/constants.ts | 9 ++ extension/src/gestures.ts | 263 ++++++++++++++++++++++++++++++++++++-- 2 files changed, 259 insertions(+), 13 deletions(-) diff --git a/extension/constants.ts b/extension/constants.ts index f2e10a2..449af8b 100644 --- a/extension/constants.ts +++ b/extension/constants.ts @@ -26,10 +26,19 @@ export const OverviewControlsState = { HIDDEN_N: 3, }; +// define enum +export enum AnimatePanel { + None = 0, + MoveWindow = 1, + SwitchWorkspace = 2, + MoveWindowAndSwitchWorkspace = 3, +} + export const ExtSettings = { DEFAULT_SESSION_WORKSPACE_GESTURE: false, DEFAULT_OVERVIEW_GESTURE: false, FOLLOW_NATURAL_SCROLL: true, + ANIMATE_PANEL: AnimatePanel.MoveWindow, }; export const RELOAD_DELAY = 150; // reload extension delay in ms \ No newline at end of file diff --git a/extension/src/gestures.ts b/extension/src/gestures.ts index f155e44..65cbc95 100644 --- a/extension/src/gestures.ts +++ b/extension/src/gestures.ts @@ -1,12 +1,19 @@ import GObject from '@gi-types/gobject'; import Shell from '@gi-types/shell'; +import Meta from '@gi-types/meta'; import Clutter from '@gi-types/clutter'; -import { CustomEventType, imports, global, __shell_private_types } from 'gnome-shell'; +import St from '@gi-types/st'; +import { imports, global, __shell_private_types } from 'gnome-shell'; const Main = imports.ui.main; +const { lerp } = imports.misc.util; +const { MonitorConstraint } = imports.ui.layout; import { createSwipeTracker, TouchpadSwipeGesture } from './swipeTracker'; -import { OverviewControlsState, ExtSettings } from '../constants'; +import { OverviewControlsState, ExtSettings, AnimatePanel } from '../constants'; +import { CustomEventType } from './utils/clutter'; +import { registerClass } from './utils/gobject'; +import { easeActor } from './utils/environment'; declare interface ShallowSwipeTrackerT { @@ -62,9 +69,97 @@ abstract class SwipeTrackerEndPointsModifer { } } +/** + * GObject Class to animate top panel in circular animation + * Without displaying it on any other monitors + */ +const DummyCyclicPanel = registerClass( + class extends Clutter.Actor { + panelBox: St.BoxLayout>; + private PADDING_WIDTH; + private _container: Clutter.Actor; + + constructor() { + super({ visible: false }); + + this.PADDING_WIDTH = 100 * Main.layoutManager.primaryMonitor.geometry_scale; + + this.panelBox = Main.layoutManager.panelBox; + + this._container = new Clutter.Actor({ layoutManager: new Clutter.BoxLayout({ orientation: Clutter.Orientation.HORIZONTAL, spacing: this.PADDING_WIDTH }) }); + this.add_child(this._container); + + this._container.add_child(new Clutter.Clone({ source: this.panelBox })); + this._container.add_child(new Clutter.Clone({ source: this.panelBox })); + + this.add_constraint(new MonitorConstraint({ primary: true })); + this.set_clip_to_allocation(true); + Main.layoutManager.uiGroup.add_child(this); + } + + vfunc_get_preferred_height(for_width: number) { + return this.panelBox.get_preferred_height(for_width); + } + + vfunc_get_preferred_width(for_height: number) { + return this.panelBox.get_preferred_width(for_height); + } + + beginGesture() { + // hide main panel + Main.layoutManager.panelBox.opacity = 0; + this.visible = true; + Main.layoutManager.uiGroup.set_child_above_sibling(this, null); + } + + updateGesture(progress: number) { + this._container.translation_x = this._getTranslationFor(progress); + } + + endGesture(endProgress: number, duration: number) { + // gesture returns accelerated end value, hence need to do this + const current_workspace = global.workspace_manager.get_active_workspace_index(); + const translation_x = ( + endProgress > current_workspace || + (endProgress === current_workspace && this._container.translation_x <= this.min_cyclic_translation / 2) + ) ? this.min_cyclic_translation : 0; + + easeActor(this._container, { + translation_x, + duration, + mode: Clutter.AnimationMode.EASE_OUT_CUBIC, + onStopped: () => { + this.visible = false; + Main.layoutManager.panelBox.opacity = 255; + }, + }); + } + + private _getTranslationFor(progress: number) { + const begin = Math.floor(progress); + const end = Math.ceil(progress); + progress = begin === end ? 0 : (progress - begin) / (end - begin); + + return lerp(0, this.min_cyclic_translation, progress); + } + + /** returns maximium negative value because translation is always negative */ + get min_cyclic_translation(): number { + return -(this.width + this.PADDING_WIDTH); + } + }, +); + class WorkspaceAnimationModifier extends SwipeTrackerEndPointsModifer { private _workspaceAnimation: imports.ui.workspaceAnimation.WorkspaceAnimationController; protected _swipeTracker: SwipeTrackerT; + private _window?: Meta.Window; + private _highlight?: St.Widget; + + private GESTURE_DELAY = 100; + private _workspaceChangedId = 0; + private _animatePanel = false; + private _dummyCyclicPanel?: typeof DummyCyclicPanel.prototype; constructor(wm: typeof imports.ui.main.wm) { super(); @@ -78,6 +173,9 @@ class WorkspaceAnimationModifier extends SwipeTrackerEndPointsModifer { 1 / 1.5, { allowTouch: false }, ); + + if (ExtSettings.ANIMATE_PANEL !== AnimatePanel.None) + this._dummyCyclicPanel = new DummyCyclicPanel(); } apply(): void { @@ -88,11 +186,55 @@ class WorkspaceAnimationModifier extends SwipeTrackerEndPointsModifer { super.apply(); } - protected _gestureBegin(tracker: SwipeTrackerT, monitor: never): void { - super._modifySnapPoints(tracker, (shallowTracker) => { - this._workspaceAnimation._switchWorkspaceBegin(shallowTracker, monitor); - tracker.orientation = shallowTracker.orientation; - }); + private _getWindowToMove(monitor: number) { + const window = global.display.get_focus_window() as Meta.Window | null; + if (this._swipeTracker._touchpadGesture?.hadHoldGesture && + window && + !window.is_always_on_all_workspaces() && + window.get_monitor() === monitor && + (!Meta.prefs_get_workspaces_only_on_primary() || monitor === Main.layoutManager.primaryMonitor.index) + ) + return window; + return undefined; + } + + protected _gestureBegin(tracker: SwipeTrackerT, monitor: number): void { + this._highlight?.destroy(); + + let panelAnimation = AnimatePanel.None; + + this._window = this._getWindowToMove(monitor); + if (this._window) { + panelAnimation = AnimatePanel.MoveWindow; + this._workspaceAnimation.movingWindow = this._window; + this._highlight = this._getWindowHighlight(); + this._animateHighLight(() => { + if (this._swipeTracker._touchpadGesture?.followNaturalScroll !== undefined) + this._swipeTracker._touchpadGesture.followNaturalScroll = false; + + super._modifySnapPoints(tracker, (shallowTracker) => { + this._workspaceAnimation._switchWorkspaceBegin(shallowTracker, monitor as never); + tracker.orientation = shallowTracker.orientation; + }); + }); + } + else { + panelAnimation = AnimatePanel.SwitchWorkspace; + if (this._swipeTracker._touchpadGesture?.followNaturalScroll !== undefined) + this._swipeTracker._touchpadGesture.followNaturalScroll = ExtSettings.FOLLOW_NATURAL_SCROLL; + + super._modifySnapPoints(tracker, (shallowTracker) => { + this._workspaceAnimation._switchWorkspaceBegin(shallowTracker, monitor as never); + tracker.orientation = shallowTracker.orientation; + }); + } + + if (ExtSettings.ANIMATE_PANEL & panelAnimation) { + this._animatePanel = true; + this._dummyCyclicPanel?.beginGesture(); + } else { + this._animatePanel = false; + } } protected _gestureUpdate(tracker: SwipeTrackerT, progress: number): void { @@ -103,16 +245,109 @@ class WorkspaceAnimationModifier extends SwipeTrackerEndPointsModifer { progress = this._lastVal + (progress - this._lastVal) * 0.05; } this._workspaceAnimation._switchWorkspaceUpdate(tracker, progress); + + if (this._animatePanel) + this._dummyCyclicPanel?.updateGesture(progress); + } + + protected _gestureEnd(tracker: SwipeTrackerT, duration: number, endProgress: number): void { + endProgress = Math.clamp(endProgress, this._firstVal, this._lastVal); + + this._workspaceAnimation._switchWorkspaceEnd(tracker, duration, endProgress); + + if (this._highlight) { + easeActor(this._highlight, { + opacity: 0, + mode: Clutter.AnimationMode.EASE_OUT_QUAD, + duration: duration, + onStopped: () => { + this._highlight?.destroy(); + this._highlight = undefined; + }, + }); + } + + const workspace = global.workspaceManager.get_workspace_by_index(endProgress) as Meta.Workspace; + if (!workspace.active && this._window) { + this._workspaceChangedId = global.workspaceManager.connect('active-workspace-changed', () => { + if (workspace.active && this._window) { + this._window.change_workspace(workspace); + workspace.activate_with_focus(this._window, global.get_current_time()); + this._window = undefined; + } + + global.workspaceManager.disconnect(this._workspaceChangedId); + this._workspaceChangedId = 0; + }); + } + + if (this._animatePanel) + this._dummyCyclicPanel?.endGesture(endProgress, duration); } - protected _gestureEnd(tracker: SwipeTrackerT, duration: number, progress: number): void { - progress = Math.clamp(progress, this._firstVal, this._lastVal); - this._workspaceAnimation._switchWorkspaceEnd(tracker, duration, progress); + private _getWindowHighlight() { + if (this._window === undefined) + return undefined; + + const rect = this._window.get_frame_rect(); + + const highlight = new St.Widget({ + style_class: 'cycler-highlight', + x: rect.x, + y: rect.y, + width: rect.width, + height: rect.height, + style: 'border-radius: 6px;', + opacity: 0, + visible: true, + }); + Main.layoutManager.uiGroup.add_child(highlight); + return highlight; + } + + private _easeActor(actor: T, props: { [P in KeysOfType]?: number }): void { + easeActor(actor, { + ...props, + duration: this.GESTURE_DELAY, + mode: Clutter.AnimationMode.EASE_OUT_QUAD, + autoReverse: true, + repeatCount: 1, + }); + } + + private _animateHighLight(callback: () => void) { + if (this._highlight === undefined || this._window === undefined) { + callback(); + return; + } + + const windowActor = this._window.get_compositor_private() as Meta.WindowActor; + + [windowActor, this._highlight].forEach(actor => { + actor.set_pivot_point(0.5, 0.5); + this._easeActor(actor, { scale_x: 0.95 }); + this._easeActor(actor, { scale_y: 0.95 }); + }); + + easeActor(this._highlight, { + opacity: 255, + mode: Clutter.AnimationMode.EASE_OUT_QUAD, + duration: 2 * this.GESTURE_DELAY, + onStopped: () => { + windowActor.set_pivot_point(0, 0); + this._highlight?.set_pivot_point(0, 0); + callback(); + }, + }); } destroy(): void { - super.destroy(); + this._dummyCyclicPanel?.destroy(); this._swipeTracker.destroy(); + + if (this._workspaceChangedId) + global.workspaceManager.disconnect(this._workspaceChangedId); + const swipeTracker = this._workspaceAnimation._swipeTracker; if (swipeTracker._touchpadGesture) { swipeTracker._touchpadGesture._stageCaptureEvent = global.stage.connect( @@ -122,6 +357,8 @@ class WorkspaceAnimationModifier extends SwipeTrackerEndPointsModifer { ), ); } + + super.destroy(); } } @@ -232,8 +469,8 @@ export class GestureExtension implements ISubExtension { swipeTracker._touchpadGesture.connect('end', swipeTracker._endTouchpadGesture.bind(swipeTracker)); swipeTracker.bind_property('enabled', swipeTracker._touchpadGesture, 'enabled', 0); swipeTracker.bind_property( - 'orientation', - swipeTracker._touchpadGesture, + 'orientation', + swipeTracker._touchpadGesture, 'orientation', GObject.BindingFlags.SYNC_CREATE, ); From cb2e548a0c8879917df77e9f16be3ef583bc9368 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sat, 23 Oct 2021 07:42:26 +0530 Subject: [PATCH 041/155] github-ci: change artifact name --- .github/workflows/ci.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b5d007f..8302467 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,8 +44,12 @@ jobs: run: | make pack + - name: Create ZipFile Name + id: zipName + run: echo "::set-output name=filename::'gestureImprovements.$(date --iso-8601).$(git rev-parse --short HEAD)@gestures.shell-extension.zip'" + - name: Upload archive artifact uses: "actions/upload-artifact@v2" with: - name: "gestureImprovements@gestures.shell-extension.zip" - path: "${{ github.workspace }}/build/gestureImprovements@gestures.shell-extension.zip" + name: ${{ steps.zipName.outputs.filename }} + path: ${{ github.workspace }}/build/gestureImprovements@gestures.shell-extension.zip From 61ea72b5f4eb39062a6ff9abb2c0e1dcb79f53ec Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Fri, 15 Oct 2021 05:04:18 +0530 Subject: [PATCH 042/155] Add preference to not follow natural scroll Changing preference affects workspace gesture and appgrid gesture --- extension/constants.ts | 1 + extension/extension.ts | 2 ++ ...rg.gnome.shell.extensions.gestureImprovements.gschema.xml | 3 +++ extension/src/gestures.ts | 5 +++-- extension/src/snapWindow.ts | 1 + extension/src/swipeTracker.ts | 3 ++- 6 files changed, 12 insertions(+), 3 deletions(-) diff --git a/extension/constants.ts b/extension/constants.ts index 596ee0f..f2e10a2 100644 --- a/extension/constants.ts +++ b/extension/constants.ts @@ -29,6 +29,7 @@ export const OverviewControlsState = { export const ExtSettings = { DEFAULT_SESSION_WORKSPACE_GESTURE: false, DEFAULT_OVERVIEW_GESTURE: false, + FOLLOW_NATURAL_SCROLL: true, }; export const RELOAD_DELAY = 150; // reload extension delay in ms \ No newline at end of file diff --git a/extension/extension.ts b/extension/extension.ts index 78144a6..50dc9f9 100644 --- a/extension/extension.ts +++ b/extension/extension.ts @@ -23,6 +23,7 @@ class Extension { this._noReloadDelayFor = [ 'default-session-workspace', 'default-overview', + 'follow-natural-scroll', ]; } @@ -85,6 +86,7 @@ class Extension { if (this.settings) { Constants.ExtSettings.DEFAULT_SESSION_WORKSPACE_GESTURE = this.settings.get_boolean('default-session-workspace'); Constants.ExtSettings.DEFAULT_OVERVIEW_GESTURE = this.settings.get_boolean('default-overview'); + Constants.ExtSettings.FOLLOW_NATURAL_SCROLL = this.settings.get_boolean('follow-natural-scroll'); Constants.TouchpadConstants.SWIPE_MULTIPLIER = Constants.TouchpadConstants.DEFAULT_SWIPE_MULTIPLIER * this.settings.get_double('touchpad-speed-scale'); Constants.AltTabConstants.DELAY_DURATION = this.settings.get_int('alttab-delay'); } diff --git a/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml b/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml index 671581f..b008d61 100644 --- a/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml +++ b/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml @@ -16,5 +16,8 @@ false If true, use 3-fingers for overview gesture, 4 for snapping/tiling + + true + \ No newline at end of file diff --git a/extension/src/gestures.ts b/extension/src/gestures.ts index bda9b74..f155e44 100644 --- a/extension/src/gestures.ts +++ b/extension/src/gestures.ts @@ -74,6 +74,7 @@ class WorkspaceAnimationModifier extends SwipeTrackerEndPointsModifer { (ExtSettings.DEFAULT_SESSION_WORKSPACE_GESTURE ? [3] : [4]), Shell.ActionMode.NORMAL, Clutter.Orientation.HORIZONTAL, + ExtSettings.FOLLOW_NATURAL_SCROLL, 1 / 1.5, { allowTouch: false }, ); @@ -136,7 +137,7 @@ export class GestureExtension implements ISubExtension { swipeTracker: Main.overview._overview._controls._workspacesDisplay._swipeTracker, nfingers: [3, 4], disableOldGesture: true, - followNaturalScroll: true, + followNaturalScroll: ExtSettings.FOLLOW_NATURAL_SCROLL, modes: Shell.ActionMode.OVERVIEW, gestureSpeed: 1 / 1.5, checkAllowedGesture: (event: CustomEventType) => { @@ -154,7 +155,7 @@ export class GestureExtension implements ISubExtension { swipeTracker: Main.overview._overview._controls._appDisplay._swipeTracker, nfingers: [3], disableOldGesture: true, - followNaturalScroll: true, + followNaturalScroll: ExtSettings.FOLLOW_NATURAL_SCROLL, modes: Shell.ActionMode.OVERVIEW, checkAllowedGesture: () => { if (Main.overview._overview._controls._searchController.searchActive) { diff --git a/extension/src/snapWindow.ts b/extension/src/snapWindow.ts index 155c007..8c5a3c5 100644 --- a/extension/src/snapWindow.ts +++ b/extension/src/snapWindow.ts @@ -244,6 +244,7 @@ export class SnapWindowExtension implements ISubExtension { (ExtSettings.DEFAULT_OVERVIEW_GESTURE ? [4] : [3]), Shell.ActionMode.NORMAL, Clutter.Orientation.VERTICAL, + true, 1, { allowTouch: false }, ); diff --git a/extension/src/swipeTracker.ts b/extension/src/swipeTracker.ts index 0ce8619..6bcab3d 100644 --- a/extension/src/swipeTracker.ts +++ b/extension/src/swipeTracker.ts @@ -216,6 +216,7 @@ export function createSwipeTracker( nfingers: number[], allowedModes: Shell.ActionMode, orientation: Clutter.Orientation, + followNaturalScroll = true, gestureSpeed = 1, params?: _SwipeTrackerOptionalParams, ): typeof SwipeTracker.prototype { @@ -251,7 +252,7 @@ export function createSwipeTracker( nfingers, swipeTracker._allowedModes, swipeTracker.orientation, - true, + followNaturalScroll, undefined, gestureSpeed, ); From 547be74bf499b583422a320fdd1c04adb991dce9 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sat, 23 Oct 2021 12:36:44 +0530 Subject: [PATCH 043/155] types: refactor types --- gnome-shell/global.d.ts | 7 +++++++ gnome-shell/index.d.ts | 7 ------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/gnome-shell/global.d.ts b/gnome-shell/global.d.ts index d8b882c..b0f6b12 100644 --- a/gnome-shell/global.d.ts +++ b/gnome-shell/global.d.ts @@ -1,6 +1,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ declare function log(message: any): void; +declare function logError(err: Error, message?: string): void; declare interface IExtension { enable(): void, disable(): void; @@ -13,4 +14,10 @@ declare interface ISubExtension { declare interface Math { clamp(num: number, min: number, max: number): number; +} + +declare interface ExtensionMeta { + uuid: string, + 'settings-schema'?: string, + 'gettext-domain'?: string } \ No newline at end of file diff --git a/gnome-shell/index.d.ts b/gnome-shell/index.d.ts index 72189d2..bb4c1b3 100644 --- a/gnome-shell/index.d.ts +++ b/gnome-shell/index.d.ts @@ -6,13 +6,6 @@ import Meta from '@gi-types/meta'; import GObject from '@gi-types/gobject'; declare const global: import('@gi-types/shell').Global; - -declare interface ExtensionMeta { - uuid: string, - 'settings-schema': string, - 'gettext-domain': string -} - declare interface ExtensionUtilsMeta { getSettings(schema?: string): Gio.Settings; getCurrentExtension(): { From a8d191ae0809174ceb8330a27243567fff8e4277 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sat, 23 Oct 2021 12:48:30 +0530 Subject: [PATCH 044/155] transpile: Read code directory and type from arguments --- package.json | 6 +++- scripts/transpile.ts | 65 +++++++++++++++++++++++++++++++++++++------- 2 files changed, 60 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 3e6e22f..574d0d7 100644 --- a/package.json +++ b/package.json @@ -30,12 +30,16 @@ "@gi-types/st": "^1.0.6", "@types/glob": "^7.1.3", "@types/node": "^16.0.0", + "@types/yargs": "^17.0.4", "@typescript-eslint/eslint-plugin": "^4.28.1", "@typescript-eslint/parser": "^4.28.1", "eslint": "^7.30.0", "fs": "0.0.1-security", "glob": "^7.1.7", "path": "^0.12.7", - "typescript": "^4.3.5" + "typescript": "^4.4.4" + }, + "dependencies": { + "yargs": "^17.2.1" } } diff --git a/scripts/transpile.ts b/scripts/transpile.ts index 45c790e..90a7d3a 100644 --- a/scripts/transpile.ts +++ b/scripts/transpile.ts @@ -3,8 +3,8 @@ import glob from 'glob'; import path from 'path'; import ts from 'typescript'; -const BASEDIR = 'build/extension'; -const ISEXTENSION = true; // is your code for extension? +import yargs from 'yargs'; +import { hideBin } from 'yargs/helpers'; // list of gi modules and their name in imports.gi const GIReplacements: Record = { @@ -521,12 +521,57 @@ const transformGObjectClasses: ts.TransformerFactory = context => }; }; -const matches = new glob.GlobSync(`${BASEDIR}/**/*.js`); -matches.found.forEach(file => { - console.log(`transpiling file: ${file}`); +enum ProgramType { + App = 'app', + Extension = 'extension', +} + +interface ProgramOptions { + dir: string, + type: ProgramType | string, +} + +async function readCommandLineOptions(): Promise { + const options = await yargs(hideBin(process.argv)) + .option('dir', { + alias: 'd', + description: 'Directory of *javascript* files, which will be overwritten', + type: 'string', + default: 'build/extension', + }) + .option('type', { + alias: 't', + choices: Object.values(ProgramType), + description: 'Is your code gjs-app or extension?', + default: 'extension', + }) + .help() + .alias('h', 'help') + .parse(); + + return options; +} + +function transpileFiles() { + const matches = new glob.GlobSync(`${BASEDIR}/**/*.js`); + matches.found.forEach(file => { + console.log(`transpiling file: ${file}`); + + const text = fs.readFileSync(file).toString(); + let sourceFile = ts.createSourceFile(file, text, ts.ScriptTarget.ES2018, true, ts.ScriptKind.JS); + sourceFile = ts.transform(sourceFile, [transformExports, transformImports, transformGObjectClasses]).transformed[0]; + fs.writeFileSync(file, printer.printFile(sourceFile)); + }); +} + +let BASEDIR = 'build/extension'; +let ISEXTENSION = true; // is your code for extension? + +async function main() { + const options = await readCommandLineOptions(); + BASEDIR = options.dir; + ISEXTENSION = options.type === ProgramType.Extension; + transpileFiles(); +} - const text = fs.readFileSync(file).toString(); - let sourceFile = ts.createSourceFile(file, text, ts.ScriptTarget.ES2018, true, ts.ScriptKind.JS); - sourceFile = ts.transform(sourceFile, [transformExports, transformImports, transformGObjectClasses]).transformed[0]; - fs.writeFileSync(file, printer.printFile(sourceFile)); -}); \ No newline at end of file +main(); \ No newline at end of file From 4ba25b67b9c0b59bb6addd6d55608f596941c468 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sat, 23 Oct 2021 13:04:49 +0530 Subject: [PATCH 045/155] Update dependencies --- package.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 574d0d7..0b5ee4a 100644 --- a/package.json +++ b/package.json @@ -28,18 +28,18 @@ "@gi-types/meta": "^3.38.5", "@gi-types/shell": "^0.1.6", "@gi-types/st": "^1.0.6", - "@types/glob": "^7.1.3", - "@types/node": "^16.0.0", + "@types/glob": "^7.2.0", + "@types/node": "^16.11.4", "@types/yargs": "^17.0.4", - "@typescript-eslint/eslint-plugin": "^4.28.1", - "@typescript-eslint/parser": "^4.28.1", - "eslint": "^7.30.0", - "fs": "0.0.1-security", - "glob": "^7.1.7", - "path": "^0.12.7", - "typescript": "^4.4.4" + "@typescript-eslint/eslint-plugin": "^5.1.0", + "@typescript-eslint/parser": "^5.1.0", + "eslint": "^8.1.0" }, "dependencies": { + "fs": "0.0.1-security", + "glob": "^7.2.0", + "path": "^0.12.7", + "typescript": "^4.4.4", "yargs": "^17.2.1" } } From 37eeef66f6f1920c78fd11631195d3319a9952e9 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sat, 23 Oct 2021 13:10:46 +0530 Subject: [PATCH 046/155] Add @gi-types/gjs-environment package --- package.json | 1 + tsconfig.json | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 0b5ee4a..fe64b13 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "devDependencies": { "@gi-types/clutter": "^7.0.6", "@gi-types/gio": "^2.66.9", + "@gi-types/gjs-environment": "^1.0.0", "@gi-types/gobject": "^2.66.9", "@gi-types/gtk": "^4.0.9", "@gi-types/meta": "^3.38.5", diff --git a/tsconfig.json b/tsconfig.json index 3481f2e..4597dc0 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -62,13 +62,22 @@ "skipLibCheck": true, /* Skip type checking of declaration files. */ "forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */ "paths": { - "gnome-shell": ["./gnome-shell"] - } + "gnome-shell": [ + "./gnome-shell" + ] + }, + "typeRoots": [ + "./node_modules/@gi-types" + ], + "types": [ + "gjs-environment", + ], }, "include": [ "extension/**/*.ts", "extension/**/*.js", "scripts/**/*.ts", "gnome-shell/*.d.ts", + "tests/**/*.ts" ] } \ No newline at end of file From 2b4403a75221b238a5d750c77f3ee2da83c256e9 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sat, 23 Oct 2021 13:33:05 +0530 Subject: [PATCH 047/155] Add gjs app to test ui changes --- Makefile | 14 ++- extension/common/prefs.ts | 57 ++++++++++ extension/prefs.ts | 37 +------ extension/ui/prefs.ui | 220 ++++++++++++++++++++++++++------------ package.json | 6 +- tests/common | 1 + tests/prefs.ts | 97 +++++++++++++++++ 7 files changed, 328 insertions(+), 104 deletions(-) create mode 100644 extension/common/prefs.ts create mode 120000 tests/common create mode 100644 tests/prefs.ts diff --git a/Makefile b/Makefile index d25ddb4..3650926 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,8 @@ UUID=gestureImprovements@gestures EXTENSIONDIR=build/extension BUILDIR=build -ZIPPATH="${PWD}/${BUILDIR}/${UUID}.shell-extension.zip" +ZIPPATH=${PWD}/${BUILDIR}/${UUID}.shell-extension.zip +DESTDIR=${HOME}/.local/share/gnome-shell/extensions/${UUID} UPDATE_CMD = gnome-extensions install -f ${ZIPPATH} ifdef FLATPAK_ID UPDATE_CMD = flatpak-spawn --host gnome-extensions install -f ${ZIPPATH} @@ -17,3 +18,14 @@ pack: update: ${UPDATE_CMD} + +build-tests: build/tests/prefs.js + node ${BUILDIR}/scripts/transpile.js --dir ${BUILDIR}/tests --type app + @npx eslint build/tests --fix + +compile-schemas: extension/schemas/*.xml + @cp -r extension/schemas ${DESTDIR}/schemas + glib-compile-schemas ${DESTDIR}/schemas + +test-ui: build-tests compile-schemas + gjs build/tests/prefs.js diff --git a/extension/common/prefs.ts b/extension/common/prefs.ts new file mode 100644 index 0000000..a5532d3 --- /dev/null +++ b/extension/common/prefs.ts @@ -0,0 +1,57 @@ +import Gio from '@gi-types/gio'; +import Gtk from '@gi-types/gtk'; +import GObject from '@gi-types/gobject'; + +/** + * Bind value of settings to {@link Gtk.SpinButton} + * @param key key of settings and id of {@link Gtk.SpinButton} object in builder + */ +function bind_int_value(key: string, settings: Gio.Settings, builder: Gtk.Builder) { + const button: Gtk.SpinButton = builder.get_object(key); + button.set_value(settings.get_int(key)); + settings.bind(key, button, 'value', Gio.SettingsBindFlags.DEFAULT); +} + +/** + * Bind value of settings to {@link Gtk.Swich} + * @param key key of settings and id of {@link Gtk.Switch} object in builder + */ +function bind_boolean_value(key: string, settings: Gio.Settings, builder: Gtk.Builder) { + const button: Gtk.Switch = builder.get_object(key); + button.set_active(settings.get_boolean(key)); + settings.bind(key, button, 'active', Gio.SettingsBindFlags.DEFAULT); +} + +/** + * Display value of `key` in log scale. + * @param key key of settings and id of {@link Gtk.Scale} object in builder + */ +function display_in_log_scale(key: string, label_key: string, settings: Gio.Settings, builder: Gtk.Builder) { + const scale: Gtk.Scale = builder.get_object(key); + const label: Gtk.Label = builder.get_object(label_key); + + // display value in log scale + scale.connect('value-changed', () => { + const labelValue = Math.exp(scale.adjustment.value / Math.LOG2E).toFixed(2); + label.set_text(labelValue); + settings.set_double(key, parseFloat(labelValue)); + }); + + const initialValue = Math.log2(settings.get_double(key)); + scale.set_value(initialValue); +} + +export function getPrefsWidget(settings: Gio.Settings, uiPath: string): T { + const builder = new Gtk.Builder(); + builder.add_from_file(uiPath); + + display_in_log_scale('touchpad-speed-scale', 'touchpadspeed_speed_display_value', settings, builder); + + bind_int_value('alttab-delay', settings, builder); + + bind_boolean_value('default-session-workspace', settings, builder); + bind_boolean_value('default-overview', settings, builder); + bind_boolean_value('follow-natural-scroll', settings, builder); + + return builder.get_object('main_prefs'); +} \ No newline at end of file diff --git a/extension/prefs.ts b/extension/prefs.ts index c4d19b7..539c0f3 100644 --- a/extension/prefs.ts +++ b/extension/prefs.ts @@ -1,44 +1,15 @@ import Gtk from '@gi-types/gtk'; -import Gio from '@gi-types/gio'; import { imports } from 'gnome-shell'; +import { getPrefsWidget } from './common/prefs'; const ExtensionUtils = imports.misc.extensionUtils; -const Me = ExtensionUtils.getCurrentExtension(); +const ExtMe = ExtensionUtils.getCurrentExtension(); // eslint-disable-next-line @typescript-eslint/no-empty-function export function init(): void { } export function buildPrefsWidget(): Gtk.Widget { - const builder = new Gtk.Builder(); - - const UIFilePath = Me.dir.get_child('ui').get_path() + '/prefs.ui'; - builder.add_from_file(UIFilePath); - + const UIFilePath = ExtMe.dir.get_child('ui').get_path() + '/prefs.ui'; const settings = ExtensionUtils.getSettings(); - - const touchpad_speed: Gtk.Scale = builder.get_object('touchpad-speed-scale'); - const touchpad_display_label: Gtk.Label = builder.get_object('touchpadspeed_speed_display_value'); - - touchpad_speed.connect('value-changed', () => { - const labelValue = Math.exp(touchpad_speed.adjustment.value / Math.LOG2E).toFixed(2); - touchpad_display_label.set_text(labelValue); - settings.set_double('touchpad-speed-scale', parseFloat(labelValue)); - }); - - const initialValue = Math.log2(settings.get_double('touchpad-speed-scale')); - touchpad_speed.set_value(initialValue); - - const alttab_delay: Gtk.SpinButton = builder.get_object('alttab-delay'); - alttab_delay.set_value(settings.get_int('alttab-delay')); - settings.bind('alttab-delay', alttab_delay.adjustment, 'value', Gio.SettingsBindFlags.DEFAULT); - - const default_sesssion_workspace: Gtk.Switch = builder.get_object('default-session-workspace'); - default_sesssion_workspace.set_active(settings.get_boolean('default-session-workspace')); - settings.bind('default-session-workspace', default_sesssion_workspace, 'active', Gio.SettingsBindFlags.DEFAULT); - - const default_overview: Gtk.Switch = builder.get_object('default-overview'); - default_overview.set_active(settings.get_boolean('default-overview')); - settings.bind('default-overview', default_overview, 'active', Gio.SettingsBindFlags.DEFAULT); - - return builder.get_object('main_prefs'); + return getPrefsWidget(settings, UIFilePath); } \ No newline at end of file diff --git a/extension/ui/prefs.ui b/extension/ui/prefs.ui index fe19962..66c08b6 100644 --- a/extension/ui/prefs.ui +++ b/extension/ui/prefs.ui @@ -22,27 +22,158 @@ vertical - + 700 - 400 + 600 1 never - + - + 36 36 36 36 vertical + + + + + 12 + vertical + + + start + center + Gestures + + + + + + + + + + + 36 + + + none + + + + + 12 + 12 + 12 + 12 + + + 32 + + + vertical + start + + + start + start + 1 + 0 + Enable 3-finger gestures for switching workspaces + + + + + + start + end + True + 0 + Uses 3-finger horizontal swipes to switch workspaces on desktop and 4-finger swipes to switch windows + + + + + + + + end + True + center + + + + + + + + + + + 12 + 12 + 12 + 12 + + + 32 + + + vertical + start + + + start + start + 1 + 0 + Enable 3-finger gestures for overview navigation + + + + + + start + end + True + 0 + Uses 3-finger vertical swipes to navigate between Desktop, Overview, AppGrid and 4-finger swipes to maximize/unmaximize/tile a window + + + + + + + + end + True + center + + + + + + + + + + + + - + 12 vertical - + start center Customization @@ -55,22 +186,23 @@ - + + 36 - + none - + 12 12 12 12 - + 32 - + start center 1 @@ -116,16 +248,16 @@ - + 12 12 12 12 - + 32 - + start center 1 @@ -145,57 +277,7 @@ - - - - 12 - 12 - 12 - 12 - - - 32 - - - vertical - start - - - start - start - 1 - 0 - Enable 3-finger gestures for switching workspaces - - - - - - start - end - True - 0 - Uses 3-finger horizontal swipes to switch workspaces on desktop and 4-finger swipes to switch windows - - - - - - - - end - True - center - - - - - - - - + 12 @@ -215,7 +297,7 @@ start 1 0 - Enable 3-finger gestures for overview navigation + Follow natural swipe @@ -225,7 +307,7 @@ end True 0 - Uses 3-finger vertical swipes to navigate between Desktop, Overview, AppGrid and 4-finger swipes to maximize/unmaximize/tile a window + Similar to natural scrolling. Swipe moves the content, not the view @@ -234,7 +316,7 @@ - + end True center @@ -244,10 +326,12 @@ + + diff --git a/package.json b/package.json index fe64b13..355c638 100644 --- a/package.json +++ b/package.json @@ -7,9 +7,11 @@ "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "build:transpile": "tsc scripts/transpile.ts --outDir build --allowSyntheticDefaultImports --sourceMap --target esnext --module esnext --moduleResolution node", - "lint:extension": "eslint extension scripts", + "lint:extension": "eslint extension scripts tests", "lint:package": "eslint build --fix", - "build": "npm run clean && npm run lint:extension && tsc && node build/scripts/transpile.js && npm run lint:package", + "transpile:watch": "tsc --watch", + "transpile": "npm run lint:extension && tsc", + "build": "npm run clean && npm run transpile && node build/scripts/transpile.js && npm run lint:package", "clean": "rm -rf build && mkdir build", "pack": "npm run build && make pack", "update": "npm run pack && make update" diff --git a/tests/common b/tests/common new file mode 120000 index 0000000..75d809a --- /dev/null +++ b/tests/common @@ -0,0 +1 @@ +../extension/common/ \ No newline at end of file diff --git a/tests/prefs.ts b/tests/prefs.ts new file mode 100644 index 0000000..0ee6f54 --- /dev/null +++ b/tests/prefs.ts @@ -0,0 +1,97 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ + +declare const ARGV: string[]; +imports.gi.versions['Gtk'] = '4.0'; + +import Gtk from '@gi-types/gtk'; +import Gio from '@gi-types/gio'; +import GLib from '@gi-types/glib'; + +/** Add parent directory of file in searchPath to be able to import files */ +function InsertIntoImportsPath() { + const dirname = Gio.file_new_for_path(imports.system.programPath ?? imports.system.programInvocationName).get_parent()?.get_path(); + if (dirname) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (imports as any).searchPath.unshift(dirname); + } +} +InsertIntoImportsPath(); + +/** Read metadata of extension file */ +function GetExtensionObj(): ExtensionMeta { + const [_, buffer] = Gio.file_new_for_path('./metadata.json').load_contents(null); + const metadata = imports.byteArray.toString(buffer); + return JSON.parse(metadata); +} + +/** Using this function to get all global options into single object */ +function GetProgramOptions() { + const extension = GetExtensionObj(); + const currentDir = GLib.get_current_dir(); + const extensionId = extension['uuid']; + let schema: string; + if (extension['settings-schema'] === undefined) { + throw new Error('Schema not provided in metadata'); + } + else + schema = extension['settings-schema']; + return { + extensionId, + /** updated ui file */ + uiPath: `${currentDir}/extension/ui/prefs.ui`, + /** using same schema used by extension to ensure, we can test preference */ + schemaDir: Gio.file_new_for_path(`${GLib.get_home_dir()}/.local/share/gnome-shell/extensions/${extensionId}/schemas`), + schema, + }; +} + +import { registerClass } from '@gi-types/gobject'; +import { getPrefsWidget } from './common/prefs'; + +const programOptions = GetProgramOptions(); + +/** Get extension settings */ +function getSettings() { + const GioSSS = Gio.SettingsSchemaSource; + + /// let it crash,... + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + let schemaSource = GioSSS.get_default()!; + if (programOptions.schemaDir.query_exists(null)) { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + schemaSource = GioSSS.new_from_directory(programOptions.schemaDir.get_path()!, schemaSource, false); + } else { + throw new Error(`Schema Directory '${programOptions.schemaDir.get_path()}' could not be found. Please check your installation`); + } + + const schemaObj = schemaSource.lookup(programOptions.schema, true); + if (!schemaObj) + throw new Error(`Schema ${programOptions.schema} could not be found for extension ${programOptions.extensionId}. Please check your installation`); + + return new Gio.Settings({ settings_schema: schemaObj }); +} + +const ExampleApp = registerClass( + class ExampleApp extends Gtk.Application { + appWindow!: Gtk.ApplicationWindow; + settings!: Gio.Settings; + + vfunc_startup() { + super.vfunc_startup(); + this.appWindow = new Gtk.ApplicationWindow({ application: this }); + this.settings = getSettings(); + const box = getPrefsWidget(this.settings, programOptions.uiPath); + box.connect('destroy', () => log('Box destroyed')); + this.appWindow.set_child(box); + } + + vfunc_activate() { + super.vfunc_activate(); + this.appWindow.present(); + } + }, +); + +const app = new ExampleApp(); +app.run([]); +log('App quit'); \ No newline at end of file From 646cf5248d5959b8509d12cc36bf9f6c793c0f6b Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sat, 23 Oct 2021 07:42:26 +0530 Subject: [PATCH 048/155] github-ci: change artifact name --- .github/workflows/ci.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b5d007f..8302467 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,8 +44,12 @@ jobs: run: | make pack + - name: Create ZipFile Name + id: zipName + run: echo "::set-output name=filename::'gestureImprovements.$(date --iso-8601).$(git rev-parse --short HEAD)@gestures.shell-extension.zip'" + - name: Upload archive artifact uses: "actions/upload-artifact@v2" with: - name: "gestureImprovements@gestures.shell-extension.zip" - path: "${{ github.workspace }}/build/gestureImprovements@gestures.shell-extension.zip" + name: ${{ steps.zipName.outputs.filename }} + path: ${{ github.workspace }}/build/gestureImprovements@gestures.shell-extension.zip From ce15cf2cbbf591925d4e7839135c2411a4229e91 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sat, 23 Oct 2021 13:44:18 +0530 Subject: [PATCH 049/155] Remove quotes from artifacts name --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8302467..2342139 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,7 +46,7 @@ jobs: - name: Create ZipFile Name id: zipName - run: echo "::set-output name=filename::'gestureImprovements.$(date --iso-8601).$(git rev-parse --short HEAD)@gestures.shell-extension.zip'" + run: echo "::set-output name=filename::gestureImprovements.$(date --iso-8601).$(git rev-parse --short HEAD)@gestures.shell-extension.zip" - name: Upload archive artifact uses: "actions/upload-artifact@v2" From 2fd3602f5174e8f4b01f580b019b502f89d74d6a Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sat, 23 Oct 2021 14:33:08 +0530 Subject: [PATCH 050/155] prefs: Add preference to enable window minimize gesture preference will be visible on extension which can minimize window to bottom is enabled --- Makefile | 6 +--- extension/common/prefs.ts | 12 ++++++++ extension/common/utils/prefs.ts | 17 +++++++++++ extension/ui/prefs.ui | 54 +++++++++++++++++++++++++++++++-- 4 files changed, 82 insertions(+), 7 deletions(-) create mode 100644 extension/common/utils/prefs.ts diff --git a/Makefile b/Makefile index 3650926..377f429 100644 --- a/Makefile +++ b/Makefile @@ -22,10 +22,6 @@ update: build-tests: build/tests/prefs.js node ${BUILDIR}/scripts/transpile.js --dir ${BUILDIR}/tests --type app @npx eslint build/tests --fix - -compile-schemas: extension/schemas/*.xml - @cp -r extension/schemas ${DESTDIR}/schemas - glib-compile-schemas ${DESTDIR}/schemas -test-ui: build-tests compile-schemas +test-ui: build-tests gjs build/tests/prefs.js diff --git a/extension/common/prefs.ts b/extension/common/prefs.ts index a5532d3..7aae57d 100644 --- a/extension/common/prefs.ts +++ b/extension/common/prefs.ts @@ -1,6 +1,7 @@ import Gio from '@gi-types/gio'; import Gtk from '@gi-types/gtk'; import GObject from '@gi-types/gobject'; +import { CanEnableMinimizeGesture } from './utils/prefs'; /** * Bind value of settings to {@link Gtk.SpinButton} @@ -41,6 +42,15 @@ function display_in_log_scale(key: string, label_key: string, settings: Gio.Sett scale.set_value(initialValue); } +/** Show button to enable minimize gesture, returns whether button was shown */ +function showEnableMinimizeButton(key: string, settings: Gio.Settings, builder: Gtk.Builder) { + const row = builder.get_object(`${key}_box-row`); + row.visible = settings.get_boolean(key) || CanEnableMinimizeGesture(); + if (row.visible) + bind_boolean_value(key, settings, builder); + return row.visible; +} + export function getPrefsWidget(settings: Gio.Settings, uiPath: string): T { const builder = new Gtk.Builder(); builder.add_from_file(uiPath); @@ -53,5 +63,7 @@ export function getPrefsWidget(settings: Gio.Settings, uiPat bind_boolean_value('default-overview', settings, builder); bind_boolean_value('follow-natural-scroll', settings, builder); + showEnableMinimizeButton('allow-minimize-window', settings, builder); + return builder.get_object('main_prefs'); } \ No newline at end of file diff --git a/extension/common/utils/prefs.ts b/extension/common/utils/prefs.ts new file mode 100644 index 0000000..8d2b552 --- /dev/null +++ b/extension/common/utils/prefs.ts @@ -0,0 +1,17 @@ +import Gio from '@gi-types/gio'; + +function getShellSettings() { + return new Gio.Settings({schema_id: 'org.gnome.shell'}); +} + +export function CanEnableMinimizeGesture() { + const extensionsWhichCanMinimizeToBottom = [ + 'dash-to-dock@micxgx.gmail.com', + 'dash-to-panel@jderose9.github.com', + 'window-list@gnome-shell-extensions.gcampax.github.com', + ]; + + const shellSettings = getShellSettings(); + const enabledExtensionsIds = shellSettings.get_strv('enabled-extensions'); + return enabledExtensionsIds.some(extensionId => extensionsWhichCanMinimizeToBottom.includes(extensionId)); +} \ No newline at end of file diff --git a/extension/ui/prefs.ui b/extension/ui/prefs.ui index 66c08b6..45f6b11 100644 --- a/extension/ui/prefs.ui +++ b/extension/ui/prefs.ui @@ -161,7 +161,57 @@ - + + + + + 12 + 12 + 12 + 12 + + + 32 + + + vertical + start + + + start + start + 1 + 0 + Enable minimize window gesture + + + + + + start + end + True + 0 + This will disable tiling gesture + + + + + + + + end + True + center + + + + + + + @@ -326,7 +376,7 @@ - + From 63f5d6deff6b15440db2d8497974119eb8bfe055 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Tue, 19 Oct 2021 01:34:52 +0530 Subject: [PATCH 051/155] Add maximized <-> fullscreen gesture This will work only when there is some kinda of dock/panel And that's not set to autohide --- extension/src/snapWindow.ts | 86 +++++++++++++++++++++++++++---------- 1 file changed, 64 insertions(+), 22 deletions(-) diff --git a/extension/src/snapWindow.ts b/extension/src/snapWindow.ts index 5928ece..ef679fd 100644 --- a/extension/src/snapWindow.ts +++ b/extension/src/snapWindow.ts @@ -41,6 +41,7 @@ enum GestureMaxUnMaxState { MINIMIZE = -1, UNMAXIMIZE = 0, MAXIMIZE = 1, + FULLSCREEN = 2, } // define enum @@ -62,6 +63,7 @@ const TilePreview = GObject.registerClass( private _leftSnapBox?: Meta.Rectangle; private _rightSnapBox?: Meta.Rectangle; private _virtualDevice: Clutter.VirtualInputDevice; + private _fullscreenBox?: Meta.Rectangle; constructor() { super({ @@ -76,7 +78,7 @@ const TilePreview = GObject.registerClass( actor: this, value: 0, lower: -1, - upper: 1, + upper: 2, }); this._adjustment.connect('notify::value', this._valueChanged.bind(this)); @@ -102,6 +104,7 @@ const TilePreview = GObject.registerClass( this._normalBox.height -= 2 * height; } + this._fullscreenBox = global.display.get_monitor_geometry(window.get_monitor()); this._maximizeBox = Main.layoutManager.getWorkAreaForMonitor(window.get_monitor()); this._leftSnapBox = this._maximizeBox.copy(); this._rightSnapBox = this._maximizeBox.copy(); @@ -135,13 +138,26 @@ const TilePreview = GObject.registerClass( // speedup animations const prevSlowdown = stSettings.slow_down_factor; stSettings.slow_down_factor = UPDATED_WINDOW_ANIMATION_TIME / WINDOW_ANIMATION_TIME; - if (state === GestureMaxUnMaxState.MAXIMIZE) { - this._window.maximize(Meta.MaximizeFlags.BOTH); - } else if (state === GestureMaxUnMaxState.UNMAXIMIZE) { - this._window.unmaximize(Meta.MaximizeFlags.BOTH); - } else { - this._window.minimize(); + + switch (state) { + case GestureMaxUnMaxState.MINIMIZE: + this._window.minimize(); + break; + case GestureMaxUnMaxState.UNMAXIMIZE: + if (this._window.is_fullscreen()) + this._window.unmake_fullscreen(); + this._window.unmaximize(Meta.MaximizeFlags.BOTH); + break; + case GestureMaxUnMaxState.MAXIMIZE: + if (this._window.is_fullscreen()) + this._window.unmake_fullscreen(); + this._window.maximize(Meta.MaximizeFlags.BOTH); + break; + case GestureMaxUnMaxState.FULLSCREEN: + this._window.make_fullscreen(); + break; } + stSettings.slow_down_factor = prevSlowdown; } // snap-left,normal,snap-right @@ -176,12 +192,20 @@ const TilePreview = GObject.registerClass( let startBox, endBox; if (this._direction === Clutter.Orientation.VERTICAL) { - startBox = this._normalBox; - if (progress >= GestureMaxUnMaxState.UNMAXIMIZE) { + if (progress < GestureMaxUnMaxState.UNMAXIMIZE) { + startBox = this._minimizeBox; + endBox = this._normalBox; + progress -= GestureMaxUnMaxState.MINIMIZE; + } + else if (progress <= GestureMaxUnMaxState.MAXIMIZE) { + // no particular reason for equality here + startBox = this._normalBox; endBox = this._maximizeBox; + progress -= GestureMaxUnMaxState.UNMAXIMIZE; } else { - endBox = this._minimizeBox; - progress = -progress; + startBox = this._maximizeBox; + endBox = this._fullscreenBox; + progress -= GestureMaxUnMaxState.MAXIMIZE; } } else { @@ -302,9 +326,13 @@ export class SnapWindowExtension implements ISubExtension { _gestureBegin(tracker: typeof SwipeTracker.prototype, monitor: number): void { const window = global.display.get_focus_window(); - if (!window || window.is_fullscreen() || !window.can_maximize()) { + + // if window can't be maximized and window is not fullscreen + // fullscreen window's can't be maximized :O + if (!window || !(window.can_maximize() || window.is_fullscreen())) { return; } + // window is on different monitor if (window.get_monitor() !== monitor) { return; } @@ -312,19 +340,33 @@ export class SnapWindowExtension implements ISubExtension { const currentMonitor = window.get_monitor(); const monitorGeo = global.display.get_monitor_geometry(currentMonitor); - const progress = window.get_maximized() === Meta.MaximizeFlags.BOTH ? GestureMaxUnMaxState.MAXIMIZE : GestureMaxUnMaxState.UNMAXIMIZE; + // if window is fullscreen and workArea of workspace is same as monitor + if (window.is_fullscreen() && monitorGeo.equal(Main.layoutManager.getWorkAreaForMonitor(currentMonitor))) { + return; + } + + const progress = window.is_fullscreen() ? GestureMaxUnMaxState.FULLSCREEN + : window.get_maximized() === Meta.MaximizeFlags.BOTH ? GestureMaxUnMaxState.MAXIMIZE : GestureMaxUnMaxState.UNMAXIMIZE; + this._toggledDirection = false; - // allow tiling gesture, when window is unmaximized and minimized gesture is not enabled - this._allowChangeDirection = progress === GestureMaxUnMaxState.UNMAXIMIZE && !ExtSettings.ALLOW_MINIMIZE_WINDOW; + this._allowChangeDirection = false; + const snapPoints: number[] = []; - if (this._allowChangeDirection) { - snapPoints.push(GestureTileState.RIGHT_TILE, GestureTileState.NORMAL, GestureTileState.LEFT_TILE); - } - else { - if (progress === GestureMaxUnMaxState.UNMAXIMIZE) - snapPoints.push(GestureMaxUnMaxState.MINIMIZE); - snapPoints.push(GestureMaxUnMaxState.UNMAXIMIZE, GestureMaxUnMaxState.MAXIMIZE); + switch (progress) { + case GestureMaxUnMaxState.UNMAXIMIZE: + snapPoints.push(GestureTileState.RIGHT_TILE, GestureTileState.NORMAL, GestureTileState.LEFT_TILE); + // allow tiling gesture, when window is unmaximized and minimized gesture is not enabled + this._allowChangeDirection = !ExtSettings.ALLOW_MINIMIZE_WINDOW; + break; + case GestureMaxUnMaxState.MAXIMIZE: + snapPoints.push(GestureMaxUnMaxState.UNMAXIMIZE, GestureMaxUnMaxState.MAXIMIZE); + if (!window.is_monitor_sized() && !monitorGeo.equal(window.get_buffer_rect())) + snapPoints.push(GestureMaxUnMaxState.FULLSCREEN); + break; + case GestureMaxUnMaxState.FULLSCREEN: + snapPoints.push(GestureMaxUnMaxState.MAXIMIZE, GestureMaxUnMaxState.FULLSCREEN); + break; } if (this._tilePreview.open(window, progress)) { From a25725e88e316b3ae2fb1a511521f0e584b0461c Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sat, 23 Oct 2021 15:52:27 +0530 Subject: [PATCH 052/155] snapWindow: Approximate maximized window size when window is fullscreen When window is fullscreen, we're not able to determine what will be window's size when it's maximized So this is workaround --- extension/src/snapWindow.ts | 59 ++++++++++++++++++++++--------------- 1 file changed, 35 insertions(+), 24 deletions(-) diff --git a/extension/src/snapWindow.ts b/extension/src/snapWindow.ts index ef679fd..81dcd7d 100644 --- a/extension/src/snapWindow.ts +++ b/extension/src/snapWindow.ts @@ -92,20 +92,9 @@ const TilePreview = GObject.registerClass( } this._window = window; - this._normalBox = window.get_frame_rect(); - if (window.get_maximized() === Meta.MaximizeFlags.BOTH) { - const [width, height] = [ - Math.round(this._normalBox.width * 0.05), - Math.round(this._normalBox.height * 0.05), - ]; - this._normalBox.x += width; - this._normalBox.width -= 2 * width; - this._normalBox.y += height; - this._normalBox.height -= 2 * height; - } - this._fullscreenBox = global.display.get_monitor_geometry(window.get_monitor()); - this._maximizeBox = Main.layoutManager.getWorkAreaForMonitor(window.get_monitor()); + this._maximizeBox = this.getMaximizedBox(window); + this._normalBox = this.getNormalBox(window); this._leftSnapBox = this._maximizeBox.copy(); this._rightSnapBox = this._maximizeBox.copy(); this._minimizeBox = this.getMinimizedBox(this._window, this._maximizeBox); @@ -272,6 +261,34 @@ const TilePreview = GObject.registerClass( rect.height = 0; return rect; } + + private getNormalBox(window: Meta.Window) { + const normalBox = window.get_frame_rect(); + if (window.get_maximized() !== Meta.MaximizeFlags.BOTH) + return normalBox; + + const [width, height] = [ + Math.round(normalBox.width * 0.05), + Math.round(normalBox.height * 0.05), + ]; + normalBox.x += width; + normalBox.width -= 2 * width; + normalBox.y += height; + normalBox.height -= 2 * height; + return normalBox; + } + + private getMaximizedBox(window: Meta.Window) { + const monitor = window.get_monitor(); + const maximizedBox = Main.layoutManager.getWorkAreaForMonitor(monitor); + if (!window.is_fullscreen()) + return maximizedBox; + + const height = Math.round(maximizedBox.height * 0.025); + maximizedBox.y += height; + maximizedBox.height -= 2 * height; + return maximizedBox; + } }, ); @@ -325,7 +342,7 @@ export class SnapWindowExtension implements ISubExtension { } _gestureBegin(tracker: typeof SwipeTracker.prototype, monitor: number): void { - const window = global.display.get_focus_window(); + const window = global.display.get_focus_window() as Meta.Window | null; // if window can't be maximized and window is not fullscreen // fullscreen window's can't be maximized :O @@ -338,12 +355,7 @@ export class SnapWindowExtension implements ISubExtension { } const currentMonitor = window.get_monitor(); - const monitorGeo = global.display.get_monitor_geometry(currentMonitor); - - // if window is fullscreen and workArea of workspace is same as monitor - if (window.is_fullscreen() && monitorGeo.equal(Main.layoutManager.getWorkAreaForMonitor(currentMonitor))) { - return; - } + const monitorArea = global.display.get_monitor_geometry(currentMonitor); const progress = window.is_fullscreen() ? GestureMaxUnMaxState.FULLSCREEN : window.get_maximized() === Meta.MaximizeFlags.BOTH ? GestureMaxUnMaxState.MAXIMIZE : GestureMaxUnMaxState.UNMAXIMIZE; @@ -351,7 +363,6 @@ export class SnapWindowExtension implements ISubExtension { this._toggledDirection = false; this._allowChangeDirection = false; - const snapPoints: number[] = []; switch (progress) { case GestureMaxUnMaxState.UNMAXIMIZE: @@ -361,7 +372,7 @@ export class SnapWindowExtension implements ISubExtension { break; case GestureMaxUnMaxState.MAXIMIZE: snapPoints.push(GestureMaxUnMaxState.UNMAXIMIZE, GestureMaxUnMaxState.MAXIMIZE); - if (!window.is_monitor_sized() && !monitorGeo.equal(window.get_buffer_rect())) + if (!window.is_monitor_sized() && !monitorArea.equal(window.get_buffer_rect())) snapPoints.push(GestureMaxUnMaxState.FULLSCREEN); break; case GestureMaxUnMaxState.FULLSCREEN: @@ -371,7 +382,7 @@ export class SnapWindowExtension implements ISubExtension { if (this._tilePreview.open(window, progress)) { tracker.confirmSwipe( - monitorGeo.height, + monitorArea.height, snapPoints, progress, progress, @@ -387,7 +398,7 @@ export class SnapWindowExtension implements ISubExtension { } // if tiling gesture is not allowed or progress is above unmaximized state - if (progress >= GestureMaxUnMaxState.UNMAXIMIZE || !this._allowChangeDirection) { + if (!this._allowChangeDirection || progress >= GestureMaxUnMaxState.UNMAXIMIZE) { this._tilePreview.adjustment.value = progress; } // switch to horizontal From 6be30e435929f9e89d2bcfda735373518a724ed8 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sat, 23 Oct 2021 21:37:55 +0530 Subject: [PATCH 053/155] dependencies: Update @gi-types to new versioning scheme --- extension/common/prefs.ts | 6 +++--- extension/common/utils/prefs.ts | 2 +- extension/extension.ts | 4 ++-- extension/prefs.ts | 2 +- extension/src/altTab.ts | 8 ++++---- extension/src/gestures.ts | 10 +++++----- extension/src/overviewRoundTrip.ts | 4 ++-- extension/src/snapWindow.ts | 8 ++++---- extension/src/swipeTracker.ts | 12 ++++++------ extension/src/utils/clutter.ts | 19 ++++++++---------- extension/src/utils/dbus.ts | 11 +++++------ extension/src/utils/environment.ts | 6 +++--- extension/src/utils/gobject.ts | 2 +- gnome-shell/index.d.ts | 16 +++++++-------- package.json | 17 ++++++++-------- scripts/transpile.ts | 31 +++++++++++++++--------------- tests/prefs.ts | 8 ++++---- 17 files changed, 82 insertions(+), 84 deletions(-) diff --git a/extension/common/prefs.ts b/extension/common/prefs.ts index 7aae57d..af869fd 100644 --- a/extension/common/prefs.ts +++ b/extension/common/prefs.ts @@ -1,6 +1,6 @@ -import Gio from '@gi-types/gio'; -import Gtk from '@gi-types/gtk'; -import GObject from '@gi-types/gobject'; +import Gio from '@gi-types/gio2'; +import Gtk from '@gi-types/gtk4'; +import GObject from '@gi-types/gobject2'; import { CanEnableMinimizeGesture } from './utils/prefs'; /** diff --git a/extension/common/utils/prefs.ts b/extension/common/utils/prefs.ts index 8d2b552..18663fe 100644 --- a/extension/common/utils/prefs.ts +++ b/extension/common/utils/prefs.ts @@ -1,4 +1,4 @@ -import Gio from '@gi-types/gio'; +import Gio from '@gi-types/gio2'; function getShellSettings() { return new Gio.Settings({schema_id: 'org.gnome.shell'}); diff --git a/extension/extension.ts b/extension/extension.ts index 7caffc8..904d234 100644 --- a/extension/extension.ts +++ b/extension/extension.ts @@ -1,5 +1,5 @@ -import GLib from '@gi-types/glib'; -import Gio from '@gi-types/gio'; +import GLib from '@gi-types/glib2'; +import Gio from '@gi-types/gio2'; import * as Constants from './constants'; import { GestureExtension } from './src/gestures'; diff --git a/extension/prefs.ts b/extension/prefs.ts index 539c0f3..1c773c6 100644 --- a/extension/prefs.ts +++ b/extension/prefs.ts @@ -1,4 +1,4 @@ -import Gtk from '@gi-types/gtk'; +import Gtk from '@gi-types/gtk4'; import { imports } from 'gnome-shell'; import { getPrefsWidget } from './common/prefs'; diff --git a/extension/src/altTab.ts b/extension/src/altTab.ts index adacc88..6ce8369 100644 --- a/extension/src/altTab.ts +++ b/extension/src/altTab.ts @@ -1,7 +1,7 @@ -import Clutter from '@gi-types/clutter'; -import GLib from '@gi-types/glib'; -import Shell from '@gi-types/shell'; -import St from '@gi-types/st'; +import Clutter from '@gi-types/clutter8'; +import GLib from '@gi-types/glib2'; +import Shell from '@gi-types/shell0'; +import St from '@gi-types/st1'; import { imports } from 'gnome-shell'; const Main = imports.ui.main; diff --git a/extension/src/gestures.ts b/extension/src/gestures.ts index 65cbc95..71c27e2 100644 --- a/extension/src/gestures.ts +++ b/extension/src/gestures.ts @@ -1,8 +1,8 @@ -import GObject from '@gi-types/gobject'; -import Shell from '@gi-types/shell'; -import Meta from '@gi-types/meta'; -import Clutter from '@gi-types/clutter'; -import St from '@gi-types/st'; +import GObject from '@gi-types/gobject2'; +import Shell from '@gi-types/shell0'; +import Meta from '@gi-types/meta8'; +import Clutter from '@gi-types/clutter8'; +import St from '@gi-types/st1'; import { imports, global, __shell_private_types } from 'gnome-shell'; const Main = imports.ui.main; diff --git a/extension/src/overviewRoundTrip.ts b/extension/src/overviewRoundTrip.ts index cfaa861..efd8956 100644 --- a/extension/src/overviewRoundTrip.ts +++ b/extension/src/overviewRoundTrip.ts @@ -1,5 +1,5 @@ -import Clutter from '@gi-types/clutter'; -import Shell from '@gi-types/shell'; +import Clutter from '@gi-types/clutter8'; +import Shell from '@gi-types/shell0'; import { imports, global } from 'gnome-shell'; const Main = imports.ui.main; diff --git a/extension/src/snapWindow.ts b/extension/src/snapWindow.ts index 995f015..08ca18a 100644 --- a/extension/src/snapWindow.ts +++ b/extension/src/snapWindow.ts @@ -1,7 +1,7 @@ -import Shell from '@gi-types/shell'; -import Meta from '@gi-types/meta'; -import St from '@gi-types/st'; -import Clutter from '@gi-types/clutter'; +import Shell from '@gi-types/shell0'; +import Meta from '@gi-types/meta8'; +import St from '@gi-types/st1'; +import Clutter from '@gi-types/clutter8'; import { imports, global } from 'gnome-shell'; diff --git a/extension/src/swipeTracker.ts b/extension/src/swipeTracker.ts index bc7339c..1719d98 100644 --- a/extension/src/swipeTracker.ts +++ b/extension/src/swipeTracker.ts @@ -1,7 +1,7 @@ -import Clutter from '@gi-types/clutter'; -import GObject from '@gi-types/gobject'; -import Shell from '@gi-types/shell'; -import Meta from '@gi-types/meta'; +import Clutter from '@gi-types/clutter8'; +import GObject from '@gi-types/gobject2'; +import Shell from '@gi-types/shell0'; +import Meta from '@gi-types/meta8'; import { imports, global } from 'gnome-shell'; const Main = imports.ui.main; @@ -89,7 +89,7 @@ export const TouchpadSwipeGesture = registerClass({ } _handleHold(event: CustomEventType): void { - if (event.get_gesture_phase() === Clutter.TouchpadGesturePhase.END && event.get_is_cancelled()) + if (event.get_gesture_phase() === Clutter.TouchpadGesturePhase.CANCEL) this._lastHoldCancelledTime = event.get_time(); } @@ -142,7 +142,7 @@ export const TouchpadSwipeGesture = registerClass({ const time = event.get_time(); const [x, y] = event.get_coords(); - const [dx, dy] = event.get_gesture_motion_delta_unaccelerated(); + const [dx, dy] = event.get_gesture_motion_delta_unaccelerated() as [number, number]; this._time = time; if (this._state === TouchpadState.NONE) { diff --git a/extension/src/utils/clutter.ts b/extension/src/utils/clutter.ts index bab5c11..b7ae627 100644 --- a/extension/src/utils/clutter.ts +++ b/extension/src/utils/clutter.ts @@ -1,13 +1,10 @@ -import { EventType, TouchpadGesturePhase } from '@gi-types/clutter'; +import { EventType, Event } from '@gi-types/clutter8'; -export const ClutterEventType = { ...EventType, TOUCHPAD_HOLD: 1234 }; +export const ClutterEventType = { TOUCHPAD_HOLD: 1234, ...EventType }; -export interface CustomEventType { - type(): number, - get_gesture_phase(): TouchpadGesturePhase, - get_touchpad_gesture_finger_count(): number, - get_time(): number, - get_coords(): [number, number], - get_gesture_motion_delta_unaccelerated(): [number, number], - get_is_cancelled(): boolean, -} \ No newline at end of file +export type CustomEventType = Pick< + Event, + 'type' | 'get_gesture_phase' | + 'get_touchpad_gesture_finger_count' | 'get_time' | + 'get_coords' | 'get_gesture_motion_delta_unaccelerated' +>; \ No newline at end of file diff --git a/extension/src/utils/dbus.ts b/extension/src/utils/dbus.ts index b0d7c1e..d56ef7f 100644 --- a/extension/src/utils/dbus.ts +++ b/extension/src/utils/dbus.ts @@ -1,9 +1,9 @@ import { imports, global } from 'gnome-shell'; -import Clutter from '@gi-types/clutter'; -import Gio from '@gi-types/gio'; -import Meta from '@gi-types/meta'; -import GObject from '@gi-types/gobject'; +import Clutter from '@gi-types/clutter8'; +import Gio from '@gi-types/gio2'; +import Meta from '@gi-types/meta8'; +import GObject from '@gi-types/gobject2'; import { registerClass } from './gobject'; import { ClutterEventType, CustomEventType } from './clutter'; @@ -97,14 +97,13 @@ function GenerateEvent(type: number, sphase: string, fingers: number, time: numb case 'Update': return Clutter.TouchpadGesturePhase.UPDATE; default: - return Clutter.TouchpadGesturePhase.END; + return is_cancelled ? Clutter.TouchpadGesturePhase.CANCEL : Clutter.TouchpadGesturePhase.END; } }, get_touchpad_gesture_finger_count: () => fingers, get_coords: () => global.get_pointer().slice(0, 2) as [number, number], get_gesture_motion_delta_unaccelerated: () => [dx ?? 0, dy ?? 0], get_time: () => time, - get_is_cancelled: () => is_cancelled ?? false, }; } diff --git a/extension/src/utils/environment.ts b/extension/src/utils/environment.ts index 24f6f29..95f664c 100644 --- a/extension/src/utils/environment.ts +++ b/extension/src/utils/environment.ts @@ -1,8 +1,8 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import GObject from '@gi-types/gobject'; -import { Actor, AnimationMode } from '@gi-types/clutter'; -import { Adjustment } from '@gi-types/st'; +import GObject from '@gi-types/gobject2'; +import { Actor, AnimationMode } from '@gi-types/clutter8'; +import { Adjustment } from '@gi-types/st1'; declare type EaseParamsType = { duration: number; diff --git a/extension/src/utils/gobject.ts b/extension/src/utils/gobject.ts index 8cf2be2..f7343fc 100644 --- a/extension/src/utils/gobject.ts +++ b/extension/src/utils/gobject.ts @@ -9,7 +9,7 @@ /* eslint-disable @typescript-eslint/ban-types */ /* eslint-disable @typescript-eslint/no-explicit-any */ -import GObject from '@gi-types/gobject'; +import GObject from '@gi-types/gobject2'; const OGRegisterClass = GObject.registerClass; type ConstructorType = new (...args: any[]) => any; diff --git a/gnome-shell/index.d.ts b/gnome-shell/index.d.ts index 67af2dd..9a1e546 100644 --- a/gnome-shell/index.d.ts +++ b/gnome-shell/index.d.ts @@ -1,11 +1,11 @@ -import Clutter from '@gi-types/clutter'; -import St from '@gi-types/st'; -import Gio from '@gi-types/gio'; -import Shell from '@gi-types/shell'; -import Meta from '@gi-types/meta'; -import GObject from '@gi-types/gobject'; - -declare const global: import('@gi-types/shell').Global; +import Clutter from '@gi-types/clutter8'; +import St from '@gi-types/st1'; +import Gio from '@gi-types/gio2'; +import Shell from '@gi-types/shell0'; +import Meta from '@gi-types/meta8'; +import GObject from '@gi-types/gobject2'; + +declare const global: import('@gi-types/shell0').Global; declare interface ExtensionUtilsMeta { getSettings(schema?: string): Gio.Settings; getCurrentExtension(): { diff --git a/package.json b/package.json index 355c638..f59487c 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "lint:package": "eslint build --fix", "transpile:watch": "tsc --watch", "transpile": "npm run lint:extension && tsc", - "build": "npm run clean && npm run transpile && node build/scripts/transpile.js && npm run lint:package", + "build": "npm run clean && npm run transpile && node --unhandled-rejections=strict build/scripts/transpile.js && npm run lint:package", "clean": "rm -rf build && mkdir build", "pack": "npm run build && make pack", "update": "npm run pack && make update" @@ -23,14 +23,15 @@ "author": "", "license": "ISC", "devDependencies": { - "@gi-types/clutter": "^7.0.6", - "@gi-types/gio": "^2.66.9", + "@gi-types/clutter8": "^8.0.0", + "@gi-types/gio2": "^2.68.0", "@gi-types/gjs-environment": "^1.0.0", - "@gi-types/gobject": "^2.66.9", - "@gi-types/gtk": "^4.0.9", - "@gi-types/meta": "^3.38.5", - "@gi-types/shell": "^0.1.6", - "@gi-types/st": "^1.0.6", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0", + "@gi-types/gtk4": "^4.2.0", + "@gi-types/meta8": "^8.0.0", + "@gi-types/shell0": "^0.1.0", + "@gi-types/st1": "^1.0.0", "@types/glob": "^7.2.0", "@types/node": "^16.11.4", "@types/yargs": "^17.0.4", diff --git a/scripts/transpile.ts b/scripts/transpile.ts index 45b6a73..35c7762 100644 --- a/scripts/transpile.ts +++ b/scripts/transpile.ts @@ -6,16 +6,16 @@ import ts from 'typescript'; import yargs from 'yargs'; import { hideBin } from 'yargs/helpers'; -// list of gi modules and their name in imports.gi +// list of gi modules (regex) and their name in imports.gi const GIReplacements: Record = { - '@gi-types/gtk': 'Gtk', - '@gi-types/st': 'St', - '@gi-types/clutter': 'Clutter', - '@gi-types/gobject': 'GObject', - '@gi-types/glib': 'GLib', - '@gi-types/gio': 'Gio', - '@gi-types/shell': 'Shell', - '@gi-types/meta': 'Meta', + '^@gi-types/gtk(\\d+)?$': 'Gtk', + '^@gi-types/st(\\d+)?$': 'St', + '^@gi-types/clutter(\\d+)?$': 'Clutter', + '^@gi-types/gobject(\\d+)?$': 'GObject', + '^@gi-types/glib(\\d+)?$': 'GLib', + '^@gi-types/gio(\\d+)?$': 'Gio', + '^@gi-types/shell(\\d+)?$': 'Shell', + '^@gi-types/meta(\\d+)?$': 'Meta', }; /** @@ -220,7 +220,7 @@ const transformExports: ts.TransformerFactory = context => { * * transformation function * 1. replaces @gi-types/* modules into imports.gi - * e.g., "import St from '@gi-types/st';" => "const St = imports.gi.St;" + * e.g., "import St from '@gi-types/st1';" => "const St = imports.gi.St;" * 2. Removes "import ... from 'gnome-shell'" statement. * 3. replaces local imports with statement compatible with extensions * e.g., in extension.js (top level) @@ -234,8 +234,8 @@ const transformImports: ts.TransformerFactory = context => { * Actual transformation function * @param node ImportDeclaration node * @param getModuleReplacement function which returns object with module expression and "const Me ...." statement is necessary - * e.g., getModuleReplacement('@gi-types/clutter') => {statement: undefined, module: Expression('imports.gi.Clutter')} - * e.g., getModuleReplacement('@gi-types/gobject') => {statement: Expression('const Me = ...'), module: Expression('imports.gi.GObject')} + * e.g., getModuleReplacement('@gi-types/clutter8') => {statement: undefined, module: Expression('imports.gi.Clutter')} + * e.g., getModuleReplacement('@gi-types/gobject2') => {statement: Expression('const Me = ...'), module: Expression('imports.gi.GObject')} * @returns returns either throws when import declaration doesn't fit into above categories * or returns list of variable statements or empty statement */ @@ -256,7 +256,7 @@ const transformImports: ts.TransformerFactory = context => { const replacement = getModuleReplacement(module.text); /* unknown import statement */ if (!replacement) { - throw new Error(`Unknown import statement '${node}'`); + throw new Error(`Unknown import statement '${node.getFullText()}'`); } const statements: ts.VariableStatement[] = []; @@ -335,9 +335,10 @@ const transformImports: ts.TransformerFactory = context => { /* function which returns object with module expression and "const Me ...." statement is necessary */ const getModuleReplacement = (module: string): { statement?: ts.VariableStatement, module: ts.Expression } | null => { - if (GIReplacements[module]) { + const giModule = Object.keys(GIReplacements).find(key => module.match(new RegExp(key))); + if (giModule) { /* GI import */ - return { module: createAccessExpressionFor(context, `imports.gi.${GIReplacements[module]}`) }; + return { module: createAccessExpressionFor(context, `imports.gi.${GIReplacements[giModule]}`) }; } if (module.startsWith('.')) { /* local import */ diff --git a/tests/prefs.ts b/tests/prefs.ts index 0ee6f54..ea6cf4e 100644 --- a/tests/prefs.ts +++ b/tests/prefs.ts @@ -3,9 +3,9 @@ declare const ARGV: string[]; imports.gi.versions['Gtk'] = '4.0'; -import Gtk from '@gi-types/gtk'; -import Gio from '@gi-types/gio'; -import GLib from '@gi-types/glib'; +import Gtk from '@gi-types/gtk4'; +import Gio from '@gi-types/gio2'; +import GLib from '@gi-types/glib2'; /** Add parent directory of file in searchPath to be able to import files */ function InsertIntoImportsPath() { @@ -45,7 +45,7 @@ function GetProgramOptions() { }; } -import { registerClass } from '@gi-types/gobject'; +import { registerClass } from '@gi-types/gobject2'; import { getPrefsWidget } from './common/prefs'; const programOptions = GetProgramOptions(); From 5cb11fe6a47b87ed2190e175332bf01c3faa25cd Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sat, 23 Oct 2021 21:42:48 +0530 Subject: [PATCH 054/155] refactor: move some utils to common utils --- extension/common/prefs.ts | 2 +- extension/{src => common}/utils/clutter.ts | 0 extension/{src => common}/utils/gobject.ts | 0 extension/common/utils/{prefs.ts => prefUtils.ts} | 0 extension/src/gestures.ts | 4 ++-- extension/src/snapWindow.ts | 2 +- extension/src/swipeTracker.ts | 4 ++-- extension/src/utils/dbus.ts | 4 ++-- 8 files changed, 8 insertions(+), 8 deletions(-) rename extension/{src => common}/utils/clutter.ts (100%) rename extension/{src => common}/utils/gobject.ts (100%) rename extension/common/utils/{prefs.ts => prefUtils.ts} (100%) diff --git a/extension/common/prefs.ts b/extension/common/prefs.ts index af869fd..7e481d2 100644 --- a/extension/common/prefs.ts +++ b/extension/common/prefs.ts @@ -1,7 +1,7 @@ import Gio from '@gi-types/gio2'; import Gtk from '@gi-types/gtk4'; import GObject from '@gi-types/gobject2'; -import { CanEnableMinimizeGesture } from './utils/prefs'; +import { CanEnableMinimizeGesture } from './utils/prefUtils'; /** * Bind value of settings to {@link Gtk.SpinButton} diff --git a/extension/src/utils/clutter.ts b/extension/common/utils/clutter.ts similarity index 100% rename from extension/src/utils/clutter.ts rename to extension/common/utils/clutter.ts diff --git a/extension/src/utils/gobject.ts b/extension/common/utils/gobject.ts similarity index 100% rename from extension/src/utils/gobject.ts rename to extension/common/utils/gobject.ts diff --git a/extension/common/utils/prefs.ts b/extension/common/utils/prefUtils.ts similarity index 100% rename from extension/common/utils/prefs.ts rename to extension/common/utils/prefUtils.ts diff --git a/extension/src/gestures.ts b/extension/src/gestures.ts index 71c27e2..b218493 100644 --- a/extension/src/gestures.ts +++ b/extension/src/gestures.ts @@ -11,8 +11,8 @@ const { MonitorConstraint } = imports.ui.layout; import { createSwipeTracker, TouchpadSwipeGesture } from './swipeTracker'; import { OverviewControlsState, ExtSettings, AnimatePanel } from '../constants'; -import { CustomEventType } from './utils/clutter'; -import { registerClass } from './utils/gobject'; +import { CustomEventType } from '../common/utils/clutter'; +import { registerClass } from '../common/utils/gobject'; import { easeActor } from './utils/environment'; diff --git a/extension/src/snapWindow.ts b/extension/src/snapWindow.ts index 08ca18a..893ce18 100644 --- a/extension/src/snapWindow.ts +++ b/extension/src/snapWindow.ts @@ -10,7 +10,7 @@ const Utils = imports.misc.util; import { createSwipeTracker, TouchpadSwipeGesture } from './swipeTracker'; import { ExtSettings } from '../constants'; -import { registerClass } from './utils/gobject'; +import { registerClass } from '../common/utils/gobject'; import { easeActor, easeAdjustment } from './utils/environment'; const { SwipeTracker } = imports.ui.swipeTracker; diff --git a/extension/src/swipeTracker.ts b/extension/src/swipeTracker.ts index 1719d98..ae81645 100644 --- a/extension/src/swipeTracker.ts +++ b/extension/src/swipeTracker.ts @@ -9,8 +9,8 @@ const { SwipeTracker } = imports.ui.swipeTracker; import * as DBusUtils from './utils/dbus'; import { TouchpadConstants } from '../constants'; -import { registerClass } from './utils/gobject'; -import { ClutterEventType, CustomEventType } from './utils/clutter'; +import { registerClass } from '../common/utils/gobject'; +import { ClutterEventType, CustomEventType } from '../common/utils/clutter'; // define enum enum TouchpadState { diff --git a/extension/src/utils/dbus.ts b/extension/src/utils/dbus.ts index d56ef7f..c2fe7ce 100644 --- a/extension/src/utils/dbus.ts +++ b/extension/src/utils/dbus.ts @@ -4,8 +4,8 @@ import Clutter from '@gi-types/clutter8'; import Gio from '@gi-types/gio2'; import Meta from '@gi-types/meta8'; import GObject from '@gi-types/gobject2'; -import { registerClass } from './gobject'; -import { ClutterEventType, CustomEventType } from './clutter'; +import { registerClass } from '../../common/utils/gobject'; +import { ClutterEventType, CustomEventType } from '../../common/utils/clutter'; const Util = imports.misc.util; From b8d4e4e9ed946c297238cf75e7d2347f4cfeb9d0 Mon Sep 17 00:00:00 2001 From: Harshad <30668911+harshadgavali@users.noreply.github.com> Date: Sat, 23 Oct 2021 23:51:30 +0530 Subject: [PATCH 055/155] Update Contributors --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6114022..1b8653c 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,7 @@ gsettings set org.gnome.shell.window-switcher current-workspace-only false # Contributors [@jacksongoode](https://github.com/jacksongoode) +[@kyteinsky](https://github.com/kyteinsky) # Thanks -[@ewlsh](https://gitlab.gnome.org/ewlsh) for [Typescript definitions](https://www.npmjs.com/package/@gi-types/glib) for GLib, GObject, ... \ No newline at end of file +[@ewlsh](https://gitlab.gnome.org/ewlsh) for [Typescript definitions](https://www.npmjs.com/package/@gi-types/glib) for GLib, GObject, ... From a217463179b9d965a341dc3136571bcbbc9c041f Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Mon, 25 Oct 2021 09:31:13 +0530 Subject: [PATCH 056/155] preferences: Add toggle to disable gestures This adds toggle to disable - altab gesture - window manipulation gesture --- extension/common/prefs.ts | 93 +++++++-- .../common/utils/{prefs.ts => prefsUtils.ts} | 0 extension/extension.ts | 18 +- ...extensions.gestureImprovements.gschema.xml | 9 + extension/ui/prefs.ui | 190 ++++++++++++------ 5 files changed, 226 insertions(+), 84 deletions(-) rename extension/common/utils/{prefs.ts => prefsUtils.ts} (100%) diff --git a/extension/common/prefs.ts b/extension/common/prefs.ts index 7aae57d..935f064 100644 --- a/extension/common/prefs.ts +++ b/extension/common/prefs.ts @@ -1,15 +1,55 @@ import Gio from '@gi-types/gio'; import Gtk from '@gi-types/gtk'; import GObject from '@gi-types/gobject'; -import { CanEnableMinimizeGesture } from './utils/prefs'; +import { CanEnableMinimizeGesture } from './utils/prefsUtils'; + +type BooleanSettingsKeys = + 'default-session-workspace' | + 'default-overview' | + 'allow-minimize-window' | + 'follow-natural-scroll' | + 'enable-alttab-gesture' | + 'enable-window-manipulation-gesture'; + +type IntegerSettingsKeys = + 'alttab-delay' + ; +type DoubleSettingsKeys = + 'touchpad-speed-scale' + ; + +type AllSettingsKeys = + BooleanSettingsKeys | + IntegerSettingsKeys | + DoubleSettingsKeys + ; + +type AllUIObjectKeys = + AllSettingsKeys | + 'touchpadspeed_speed_display_value' | + 'allow-minimize-window_box-row' | + 'alttab-delay_box-row' + ; + +type FilterGetterFunctionsKeys = T extends `get_${infer _R}` ? T : never; +type GetterFunctionsKeys = FilterGetterFunctionsKeys; + +export type GioSettings = Omit> & { + get_boolean(key: BooleanSettingsKeys): boolean; + get_int(key: IntegerSettingsKeys): number; + get_double(key: DoubleSettingsKeys): number; +} + +type GtkBuilder = Omit & { + get_object(name: AllUIObjectKeys): T; +} /** * Bind value of settings to {@link Gtk.SpinButton} * @param key key of settings and id of {@link Gtk.SpinButton} object in builder */ -function bind_int_value(key: string, settings: Gio.Settings, builder: Gtk.Builder) { - const button: Gtk.SpinButton = builder.get_object(key); - button.set_value(settings.get_int(key)); +function bind_int_value(key: IntegerSettingsKeys, settings: GioSettings, builder: GtkBuilder) { + const button = builder.get_object(key); settings.bind(key, button, 'value', Gio.SettingsBindFlags.DEFAULT); } @@ -17,19 +57,18 @@ function bind_int_value(key: string, settings: Gio.Settings, builder: Gtk.Builde * Bind value of settings to {@link Gtk.Swich} * @param key key of settings and id of {@link Gtk.Switch} object in builder */ -function bind_boolean_value(key: string, settings: Gio.Settings, builder: Gtk.Builder) { - const button: Gtk.Switch = builder.get_object(key); - button.set_active(settings.get_boolean(key)); - settings.bind(key, button, 'active', Gio.SettingsBindFlags.DEFAULT); +function bind_boolean_value(key: BooleanSettingsKeys, settings: GioSettings, builder: GtkBuilder, flags = Gio.SettingsBindFlags.DEFAULT) { + const button = builder.get_object(key); + settings.bind(key, button, 'active', flags); } /** * Display value of `key` in log scale. * @param key key of settings and id of {@link Gtk.Scale} object in builder */ -function display_in_log_scale(key: string, label_key: string, settings: Gio.Settings, builder: Gtk.Builder) { - const scale: Gtk.Scale = builder.get_object(key); - const label: Gtk.Label = builder.get_object(label_key); +function display_in_log_scale(key: DoubleSettingsKeys, label_key: AllUIObjectKeys, settings: GioSettings, builder: GtkBuilder) { + const scale = builder.get_object(key); + const label = builder.get_object(label_key); // display value in log scale scale.connect('value-changed', () => { @@ -43,14 +82,34 @@ function display_in_log_scale(key: string, label_key: string, settings: Gio.Sett } /** Show button to enable minimize gesture, returns whether button was shown */ -function showEnableMinimizeButton(key: string, settings: Gio.Settings, builder: Gtk.Builder) { - const row = builder.get_object(`${key}_box-row`); +function showEnableMinimizeButton(key: BooleanSettingsKeys, row_key: AllUIObjectKeys, settings: GioSettings, builder: GtkBuilder) { + const row = builder.get_object(row_key); row.visible = settings.get_boolean(key) || CanEnableMinimizeGesture(); if (row.visible) bind_boolean_value(key, settings, builder); return row.visible; } +function addToggleToDisableAltTabGesture(key: BooleanSettingsKeys, settings: GioSettings, builder: GtkBuilder) { + bind_boolean_value(key, settings, builder); + + const button = builder.get_object(key); + const delayButtonRow = builder.get_object('alttab-delay_box-row'); + button.bind_property('active', delayButtonRow, 'sensitive', GObject.BindingFlags.SYNC_CREATE); +} + +function addToggleToDisableWindowManipulationGesture(key: BooleanSettingsKeys, settings: GioSettings, builder: GtkBuilder) { + const button = builder.get_object(key); + const minimizeButtonRow = builder.get_object('allow-minimize-window_box-row'); + button.bind_property('active', minimizeButtonRow, 'sensitive', GObject.BindingFlags.SYNC_CREATE); + bind_boolean_value(key, settings, builder); +} + +function addToggleToDisableGestures(settings: GioSettings, builder: GtkBuilder) { + addToggleToDisableAltTabGesture('enable-alttab-gesture', settings, builder); + addToggleToDisableWindowManipulationGesture('enable-window-manipulation-gesture', settings, builder); +} + export function getPrefsWidget(settings: Gio.Settings, uiPath: string): T { const builder = new Gtk.Builder(); builder.add_from_file(uiPath); @@ -59,11 +118,13 @@ export function getPrefsWidget(settings: Gio.Settings, uiPat bind_int_value('alttab-delay', settings, builder); - bind_boolean_value('default-session-workspace', settings, builder); - bind_boolean_value('default-overview', settings, builder); + bind_boolean_value('default-session-workspace', settings, builder, Gio.SettingsBindFlags.INVERT_BOOLEAN); + bind_boolean_value('default-overview', settings, builder, Gio.SettingsBindFlags.INVERT_BOOLEAN); bind_boolean_value('follow-natural-scroll', settings, builder); - showEnableMinimizeButton('allow-minimize-window', settings, builder); + showEnableMinimizeButton('allow-minimize-window', 'allow-minimize-window_box-row', settings, builder); + + addToggleToDisableGestures(settings, builder); return builder.get_object('main_prefs'); } \ No newline at end of file diff --git a/extension/common/utils/prefs.ts b/extension/common/utils/prefsUtils.ts similarity index 100% rename from extension/common/utils/prefs.ts rename to extension/common/utils/prefsUtils.ts diff --git a/extension/extension.ts b/extension/extension.ts index 7caffc8..6c79067 100644 --- a/extension/extension.ts +++ b/extension/extension.ts @@ -1,5 +1,4 @@ import GLib from '@gi-types/glib'; -import Gio from '@gi-types/gio'; import * as Constants from './constants'; import { GestureExtension } from './src/gestures'; @@ -8,12 +7,13 @@ import { OverviewRoundTripGestureExtension } from './src/overviewRoundTrip'; import { SnapWindowExtension } from './src/snapWindow'; import * as DBusUtils from './src/utils/dbus'; import { imports } from 'gnome-shell'; +import { GioSettings } from './common/prefs'; const ExtensionUtils = imports.misc.extensionUtils; class Extension { private _extensions: ISubExtension[]; - settings?: Gio.Settings; + settings?: GioSettings; private _settingChangedId = 0; private _reloadWaitId = 0; private _noReloadDelayFor: string[]; @@ -68,12 +68,18 @@ class Extension { _enable() { this._initializeSettings(); - this._extensions = [ - new AltTabGestureExtension(), + this._extensions = []; + if (this.settings?.get_boolean('enable-alttab-gesture')) + this._extensions.push(new AltTabGestureExtension()); + + this._extensions.push( new OverviewRoundTripGestureExtension(), new GestureExtension(), - new SnapWindowExtension(), - ]; + ); + + if (this.settings?.get_boolean('enable-window-manipulation-gesture')) + this._extensions.push(new SnapWindowExtension()); + this._extensions.forEach(extension => extension.apply()); } diff --git a/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml b/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml index 45dcf4b..d56f495 100644 --- a/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml +++ b/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml @@ -22,6 +22,15 @@ true + Whether to follow natural scroll for swipe + + + true + Enable alttab gesture + + + true + Enable Window manipulation gesture \ No newline at end of file diff --git a/extension/ui/prefs.ui b/extension/ui/prefs.ui index 45f6b11..81712a3 100644 --- a/extension/ui/prefs.ui +++ b/extension/ui/prefs.ui @@ -62,15 +62,15 @@ none - + - 12 - 12 - 12 - 12 + 12 + 12 + 12 + 12 32 @@ -82,17 +82,17 @@ start 1 0 - Enable 3-finger gestures for switching workspaces + 4-finger gestures for overview navigation - start end True 0 - Uses 3-finger horizontal swipes to switch workspaces on desktop and 4-finger swipes to switch windows + 6 + For navigating between desktop, activities and appgrid @@ -100,6 +100,37 @@ + + + end + True + center + + + + + + + + + + + + + 12 + 12 + 12 + 12 + 32 + + + start + center + 1 + 0 + 4-finger gestures for workspace switching + + end @@ -112,15 +143,46 @@ - + + + + + + 12 + 12 + 12 + 12 + 32 + + + start + center + 1 + 0 + Window switching + + + + + end + True + center + + + + + + + + - 12 - 12 - 12 - 12 + 12 + 12 + 12 + 12 32 @@ -132,17 +194,17 @@ start 1 0 - Enable 3-finger gestures for overview navigation + Window manipulation - start end True 0 - Uses 3-finger vertical swipes to navigate between Desktop, Overview, AppGrid and 4-finger swipes to maximize/unmaximize/tile a window + 6 + Tile, unmaximize, maximize or fullscreen a window @@ -151,7 +213,7 @@ - + end True center @@ -162,15 +224,15 @@ - + - 12 - 12 - 12 - 12 + 12 + 12 + 12 + 12 32 @@ -182,7 +244,7 @@ start 1 0 - Enable minimize window gesture + Minimize window @@ -192,6 +254,7 @@ end True 0 + 6 This will disable tiling gesture + + end @@ -107,6 +146,7 @@ center + @@ -122,6 +162,7 @@ 12 12 32 + start @@ -131,6 +172,7 @@ 4-finger gestures for workspace switching + end @@ -138,6 +180,7 @@ center + @@ -153,6 +196,7 @@ 12 12 32 + start @@ -162,6 +206,7 @@ Window switching + end @@ -169,6 +214,7 @@ center + @@ -184,10 +230,12 @@ 12 12 32 + vertical start + start @@ -197,6 +245,7 @@ Window manipulation + start @@ -210,8 +259,10 @@ + + end @@ -219,6 +270,7 @@ center + @@ -234,10 +286,12 @@ 12 12 32 + vertical start + start @@ -261,8 +315,10 @@ + + end @@ -270,6 +326,7 @@ center + @@ -305,7 +362,6 @@ none - @@ -316,6 +372,7 @@ 12 12 32 + start @@ -325,11 +382,13 @@ Touchpad swipe speed + horizontal end 1 + 300 @@ -344,6 +403,7 @@ + center @@ -354,6 +414,7 @@ 1.00 + @@ -371,10 +432,12 @@ 12 12 32 + vertical start + start @@ -398,8 +461,10 @@ + + end @@ -407,6 +472,7 @@ center + @@ -422,15 +488,17 @@ 12 12 32 + start center 1 0 - Window-switching popup delay (ms) + Window switcher popup delay (ms) + end @@ -438,6 +506,7 @@ + @@ -454,6 +523,5 @@ - \ No newline at end of file From ff33206b26e5b9dd44099dad9dacd564caa6b7bf Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Mon, 25 Oct 2021 21:07:41 +0530 Subject: [PATCH 058/155] comments: add comment for 'fullscreen window's can't be maximized' --- extension/src/snapWindow.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension/src/snapWindow.ts b/extension/src/snapWindow.ts index 81dcd7d..9352919 100644 --- a/extension/src/snapWindow.ts +++ b/extension/src/snapWindow.ts @@ -344,8 +344,8 @@ export class SnapWindowExtension implements ISubExtension { _gestureBegin(tracker: typeof SwipeTracker.prototype, monitor: number): void { const window = global.display.get_focus_window() as Meta.Window | null; - // if window can't be maximized and window is not fullscreen // fullscreen window's can't be maximized :O + // if window can't be maximized and window is not fullscreen, return if (!window || !(window.can_maximize() || window.is_fullscreen())) { return; } From 19afe00e5ce220856dec8c717d9f32291526a807 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Tue, 26 Oct 2021 07:54:39 +0530 Subject: [PATCH 059/155] should have option to enable minimize gesture on ubuntu dock --- extension/common/utils/prefsUtils.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/extension/common/utils/prefsUtils.ts b/extension/common/utils/prefsUtils.ts index 8d2b552..afbbcfc 100644 --- a/extension/common/utils/prefsUtils.ts +++ b/extension/common/utils/prefsUtils.ts @@ -9,6 +9,7 @@ export function CanEnableMinimizeGesture() { 'dash-to-dock@micxgx.gmail.com', 'dash-to-panel@jderose9.github.com', 'window-list@gnome-shell-extensions.gcampax.github.com', + 'ubuntu-dock@ubuntu.com', ]; const shellSettings = getShellSettings(); From 31bff2109727eaea07dbdd75d1cc928bbef2b053 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Wed, 27 Oct 2021 07:07:43 +0530 Subject: [PATCH 060/155] Update README --- README.md | 10 +++++++++- extension_page.md | 3 ++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1b8653c..2803ffe 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,9 @@ npm run update gnome-extensions enable gestureImprovements@gestures ``` +### Additional app X11 +On X11, you also need to install [gnome-x11-gesture-daemon](https://github.com/harshadgavali/gnome-x11-gesture-daemon) + ## Gestures (including built-in ones) | Gesture | Modes | Fingers | Direction | | :------------------------------------------ | :------- | :------ | :-------------- | @@ -30,11 +33,15 @@ gnome-extensions enable gestureImprovements@gestures | Switch app pages | AppGrid | 2/3 | Horizontal | | Switch workspaces | * | 4 | Horizontal | | Desktop/Overview/AppGrid navigation | * | 4 | Vertical | -| Maximize/unmaximize a window | Desktop | 3 | Vertical | +| Unmaximize/maximize/fullscreen a window | Desktop | 3 | Vertical | +| Minimize a window | Desktop | 3 | Vertical | | Snap/half-tile a window | Desktop | 3 | Explained below | +#### Notes +* Minimize gesture is available if you have dash-to-dock/panel or similar extension enabled. #### For activating tiling gesture +0. This can't be activated if you enable minimize gesture 1. Do a 3-finger vertical downward gesture on a unmaximized window 2. Wait a few milliseconds 3. Do a 3-finger horizontal gesture to tile a window to either side @@ -48,6 +55,7 @@ gsettings set org.gnome.shell.window-switcher current-workspace-only false * Add delay to alt-tab gesture, to ensure second windows gets selected when a fast swipe is done * Change sensitivity of swipe (touchpad swipe speed) +* Option to follow natural scrolling (seperate from option in GNOME settings) * Revert to 3-finger swipes to switch workspace on desktop (4-fingers to switch windows) * Revert to 3-finger swipes for overview navigation (4-fingers to maximize/unmaximize/tile) diff --git a/extension_page.md b/extension_page.md index b2f3017..fabd1c7 100644 --- a/extension_page.md +++ b/extension_page.md @@ -5,7 +5,8 @@ This extension adds following features: • Switch windows from current workspace using 3-finger horizontal swipe • Cyclic gestures between Desktop/Overview/AppGrid using 4 vertical swipe • Switch app-pages using 3-finger swipe gesture on AppGrid -• Maximize/unmaximize/half-tiling using 3-finger vertical & horizontal gesture +• Unmaximize/maximize/fullscreen/half-tiling using 3-finger vertical & horizontal gesture +• Optional minimize a window gesture • Override 3-finger gesture with 4-finger for switching workspace • Configure speed of gestures • Support for X11 From 6b16a3b9cc32731f3a66ca0bdcf33eedee1e854f Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Wed, 27 Oct 2021 07:08:03 +0530 Subject: [PATCH 061/155] Update version --- metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata.json b/metadata.json index f6b3246..89f42aa 100644 --- a/metadata.json +++ b/metadata.json @@ -8,5 +8,5 @@ "settings-schema": "org.gnome.shell.extensions.gestureImprovements", "url": "https://github.com/harshadgavali/gnome-gesture-improvements", "uuid": "gestureImprovements@gestures", - "version": 16.1 + "version": 17.1 } \ No newline at end of file From 94c62faa096dd9b2718a6ae2127edfb6e8700a36 Mon Sep 17 00:00:00 2001 From: Harshad <30668911+harshadgavali@users.noreply.github.com> Date: Sun, 31 Oct 2021 04:00:20 +0530 Subject: [PATCH 062/155] Create LICENSE --- LICENSE | 674 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 674 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. From 9d63899323eff07b1546a9959b95b830acd4a1f4 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sat, 6 Nov 2021 22:16:29 +0530 Subject: [PATCH 063/155] workflows: Don't create release for PR --- .github/workflows/ci.yml | 2 -- .github/workflows/pr.yml | 30 ++++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/pr.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2342139..7c4d5a2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,8 +3,6 @@ name: Extension CI on: push: branches: ["*"] - pull_request: - branches: [main] jobs: build: diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..2bd184e --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,30 @@ +name: Extension CI + +on: + pull_request: + branches: [main] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [16.x] + + steps: + - uses: actions/checkout@v2 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + + - name: Install dependencies + run: | + npm install + + - name: Lint Source + run: | + npm run clean + npm run lint:extension From d81a91a8b3b22937b6aadea724759d5076fdce56 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sun, 31 Oct 2021 00:41:03 +0530 Subject: [PATCH 064/155] Add show desktop gesture --- Makefile | 2 +- extension/common/utils/logging.ts | 9 + extension/constants.ts | 11 +- extension/src/gestures.ts | 168 +++++------- extension/src/holdGestures/animatePanel.ts | 112 ++++++++ extension/src/holdGestures/showDesktop.ts | 304 +++++++++++++++++++++ extension/src/overviewRoundTrip.ts | 55 +++- extension/src/swipeTracker.ts | 30 +- extension/styleclass.css | 1 + gnome-shell/index.d.ts | 2 +- metadata.json | 2 +- 11 files changed, 573 insertions(+), 123 deletions(-) create mode 100644 extension/common/utils/logging.ts create mode 100644 extension/src/holdGestures/animatePanel.ts create mode 100644 extension/src/holdGestures/showDesktop.ts create mode 100644 extension/styleclass.css diff --git a/Makefile b/Makefile index 377f429..fcbebb4 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ endif pack: cp metadata.json $(EXTENSIONDIR) - cp -r extension/ui extension/schemas $(EXTENSIONDIR) + cp -r extension/styleclass.css extension/ui extension/schemas $(EXTENSIONDIR) glib-compile-schemas ${EXTENSIONDIR}/schemas rm -f ${ZIPPATH} cd ${EXTENSIONDIR} && zip -r ${ZIPPATH} . diff --git a/extension/common/utils/logging.ts b/extension/common/utils/logging.ts new file mode 100644 index 0000000..74c5692 --- /dev/null +++ b/extension/common/utils/logging.ts @@ -0,0 +1,9 @@ +declare function log(message: any): void; + +export function printStack() { + const stack = new Error().stack; + if (stack) { + const lines = stack.split('\n')[1].split('@'); + log(`[DEBUG]:: in function ${lines[0]} at ${lines[2]}`); + } +} diff --git a/extension/constants.ts b/extension/constants.ts index 87131a5..78a86d3 100644 --- a/extension/constants.ts +++ b/extension/constants.ts @@ -28,10 +28,10 @@ export const OverviewControlsState = { // define enum export enum AnimatePanel { - None = 0, - MoveWindow = 1, - SwitchWorkspace = 2, - MoveWindowAndSwitchWorkspace = 3, + NONE = 0, + SWITCH_WORKSPACE = 1, + MOVE_WINDOW = 2, + SWITCH_WORKSPACE_AND_MOVE_WINDOW = 3, } export const ExtSettings = { @@ -39,7 +39,8 @@ export const ExtSettings = { DEFAULT_OVERVIEW_GESTURE: false, ALLOW_MINIMIZE_WINDOW: false, FOLLOW_NATURAL_SCROLL: true, - ANIMATE_PANEL: AnimatePanel.MoveWindow, + ENABLE_SHOW_DESKTOP: true, + ANIMATE_PANEL: AnimatePanel.MOVE_WINDOW, }; export const RELOAD_DELAY = 150; // reload extension delay in ms \ No newline at end of file diff --git a/extension/src/gestures.ts b/extension/src/gestures.ts index b218493..449be69 100644 --- a/extension/src/gestures.ts +++ b/extension/src/gestures.ts @@ -6,15 +6,12 @@ import St from '@gi-types/st1'; import { imports, global, __shell_private_types } from 'gnome-shell'; const Main = imports.ui.main; -const { lerp } = imports.misc.util; -const { MonitorConstraint } = imports.ui.layout; import { createSwipeTracker, TouchpadSwipeGesture } from './swipeTracker'; import { OverviewControlsState, ExtSettings, AnimatePanel } from '../constants'; import { CustomEventType } from '../common/utils/clutter'; -import { registerClass } from '../common/utils/gobject'; import { easeActor } from './utils/environment'; - +import { DummyCyclicPanel } from './holdGestures/animatePanel'; declare interface ShallowSwipeTrackerT { orientation: Clutter.Orientation, @@ -69,86 +66,16 @@ abstract class SwipeTrackerEndPointsModifer { } } -/** - * GObject Class to animate top panel in circular animation - * Without displaying it on any other monitors - */ -const DummyCyclicPanel = registerClass( - class extends Clutter.Actor { - panelBox: St.BoxLayout>; - private PADDING_WIDTH; - private _container: Clutter.Actor; - - constructor() { - super({ visible: false }); - - this.PADDING_WIDTH = 100 * Main.layoutManager.primaryMonitor.geometry_scale; - - this.panelBox = Main.layoutManager.panelBox; - - this._container = new Clutter.Actor({ layoutManager: new Clutter.BoxLayout({ orientation: Clutter.Orientation.HORIZONTAL, spacing: this.PADDING_WIDTH }) }); - this.add_child(this._container); - - this._container.add_child(new Clutter.Clone({ source: this.panelBox })); - this._container.add_child(new Clutter.Clone({ source: this.panelBox })); - - this.add_constraint(new MonitorConstraint({ primary: true })); - this.set_clip_to_allocation(true); - Main.layoutManager.uiGroup.add_child(this); - } - - vfunc_get_preferred_height(for_width: number) { - return this.panelBox.get_preferred_height(for_width); - } - - vfunc_get_preferred_width(for_height: number) { - return this.panelBox.get_preferred_width(for_height); - } - - beginGesture() { - // hide main panel - Main.layoutManager.panelBox.opacity = 0; - this.visible = true; - Main.layoutManager.uiGroup.set_child_above_sibling(this, null); - } - - updateGesture(progress: number) { - this._container.translation_x = this._getTranslationFor(progress); - } - - endGesture(endProgress: number, duration: number) { - // gesture returns accelerated end value, hence need to do this - const current_workspace = global.workspace_manager.get_active_workspace_index(); - const translation_x = ( - endProgress > current_workspace || - (endProgress === current_workspace && this._container.translation_x <= this.min_cyclic_translation / 2) - ) ? this.min_cyclic_translation : 0; - - easeActor(this._container, { - translation_x, - duration, - mode: Clutter.AnimationMode.EASE_OUT_CUBIC, - onStopped: () => { - this.visible = false; - Main.layoutManager.panelBox.opacity = 255; - }, - }); - } - - private _getTranslationFor(progress: number) { - const begin = Math.floor(progress); - const end = Math.ceil(progress); - progress = begin === end ? 0 : (progress - begin) / (end - begin); - - return lerp(0, this.min_cyclic_translation, progress); - } - - /** returns maximium negative value because translation is always negative */ - get min_cyclic_translation(): number { - return -(this.width + this.PADDING_WIDTH); - } - }, -); +// declare enum +enum ExtensionState { + DEFAULT = 0, + SWITCH_WORKSPACE = AnimatePanel.SWITCH_WORKSPACE, + MOVE_WINDOW = AnimatePanel.MOVE_WINDOW, + /** flag: whether to animate panel */ + ANIMATE_PANEL = 4, + /** flag: whether update/end signal was received from tracker */ + UPDATE_RECEIVED = 8, +} class WorkspaceAnimationModifier extends SwipeTrackerEndPointsModifer { private _workspaceAnimation: imports.ui.workspaceAnimation.WorkspaceAnimationController; @@ -156,9 +83,9 @@ class WorkspaceAnimationModifier extends SwipeTrackerEndPointsModifer { private _window?: Meta.Window; private _highlight?: St.Widget; - private GESTURE_DELAY = 100; + private GESTURE_DELAY = 75; private _workspaceChangedId = 0; - private _animatePanel = false; + private _extensionState = ExtensionState.DEFAULT; private _dummyCyclicPanel?: typeof DummyCyclicPanel.prototype; constructor(wm: typeof imports.ui.main.wm) { @@ -174,7 +101,7 @@ class WorkspaceAnimationModifier extends SwipeTrackerEndPointsModifer { { allowTouch: false }, ); - if (ExtSettings.ANIMATE_PANEL !== AnimatePanel.None) + if (ExtSettings.ANIMATE_PANEL !== AnimatePanel.NONE) this._dummyCyclicPanel = new DummyCyclicPanel(); } @@ -190,6 +117,7 @@ class WorkspaceAnimationModifier extends SwipeTrackerEndPointsModifer { const window = global.display.get_focus_window() as Meta.Window | null; if (this._swipeTracker._touchpadGesture?.hadHoldGesture && window && + !window.skip_taskbar && !window.is_always_on_all_workspaces() && window.get_monitor() === monitor && (!Meta.prefs_get_workspaces_only_on_primary() || monitor === Main.layoutManager.primaryMonitor.index) @@ -199,14 +127,14 @@ class WorkspaceAnimationModifier extends SwipeTrackerEndPointsModifer { } protected _gestureBegin(tracker: SwipeTrackerT, monitor: number): void { + this.reset(); this._highlight?.destroy(); - - let panelAnimation = AnimatePanel.None; + this._extensionState = ExtensionState.DEFAULT; this._window = this._getWindowToMove(monitor); + this._workspaceAnimation.movingWindow = this._window; if (this._window) { - panelAnimation = AnimatePanel.MoveWindow; - this._workspaceAnimation.movingWindow = this._window; + this._extensionState = ExtensionState.MOVE_WINDOW; this._highlight = this._getWindowHighlight(); this._animateHighLight(() => { if (this._swipeTracker._touchpadGesture?.followNaturalScroll !== undefined) @@ -219,7 +147,7 @@ class WorkspaceAnimationModifier extends SwipeTrackerEndPointsModifer { }); } else { - panelAnimation = AnimatePanel.SwitchWorkspace; + this._extensionState = ExtensionState.SWITCH_WORKSPACE; if (this._swipeTracker._touchpadGesture?.followNaturalScroll !== undefined) this._swipeTracker._touchpadGesture.followNaturalScroll = ExtSettings.FOLLOW_NATURAL_SCROLL; @@ -229,15 +157,16 @@ class WorkspaceAnimationModifier extends SwipeTrackerEndPointsModifer { }); } - if (ExtSettings.ANIMATE_PANEL & panelAnimation) { - this._animatePanel = true; + if (ExtSettings.ANIMATE_PANEL & this._extensionState) { + this._extensionState |= ExtensionState.ANIMATE_PANEL; this._dummyCyclicPanel?.beginGesture(); - } else { - this._animatePanel = false; } } protected _gestureUpdate(tracker: SwipeTrackerT, progress: number): void { + if (this._extensionState === ExtensionState.DEFAULT) + return; + this._extensionState |= ExtensionState.UPDATE_RECEIVED; if (progress < this._firstVal) { progress = this._firstVal - (this._firstVal - progress) * 0.05; } @@ -246,11 +175,14 @@ class WorkspaceAnimationModifier extends SwipeTrackerEndPointsModifer { } this._workspaceAnimation._switchWorkspaceUpdate(tracker, progress); - if (this._animatePanel) + if (this._extensionState & ExtensionState.ANIMATE_PANEL) this._dummyCyclicPanel?.updateGesture(progress); } protected _gestureEnd(tracker: SwipeTrackerT, duration: number, endProgress: number): void { + if (this._extensionState === ExtensionState.DEFAULT) + return; + this._extensionState |= ExtensionState.UPDATE_RECEIVED; endProgress = Math.clamp(endProgress, this._firstVal, this._lastVal); this._workspaceAnimation._switchWorkspaceEnd(tracker, duration, endProgress); @@ -281,7 +213,7 @@ class WorkspaceAnimationModifier extends SwipeTrackerEndPointsModifer { }); } - if (this._animatePanel) + if (this._extensionState & ExtensionState.ANIMATE_PANEL) this._dummyCyclicPanel?.endGesture(endProgress, duration); } @@ -329,18 +261,54 @@ class WorkspaceAnimationModifier extends SwipeTrackerEndPointsModifer { this._easeActor(actor, { scale_y: 0.95 }); }); + easeActor(this._highlight, { + opacity: 200, + mode: Clutter.AnimationMode.EASE_OUT_QUAD, + duration: 2 * this.GESTURE_DELAY, + onStopped: () => { + callback(); + this._animateHighLightWaitForGestureUpdate(windowActor); + }, + }); + } + + private _animateHighLightWaitForGestureUpdate(actor: Meta.WindowActor) { + if (!this._highlight) { + actor.set_pivot_point(0, 0); + return; + } easeActor(this._highlight, { opacity: 255, mode: Clutter.AnimationMode.EASE_OUT_QUAD, duration: 2 * this.GESTURE_DELAY, onStopped: () => { - windowActor.set_pivot_point(0, 0); + log('animate highlight complete'); + actor.set_pivot_point(0, 0); this._highlight?.set_pivot_point(0, 0); - callback(); + // no update received on highlight showing + if ((this._extensionState & ExtensionState.UPDATE_RECEIVED) === 0) + this.reset(); }, }); } + private reset() { + this._highlight?.destroy(); + this._highlight = undefined; + + const active_workspace = global.workspace_manager.get_active_workspace_index(); + + if ((this._extensionState & ExtensionState.SWITCH_WORKSPACE) || (this._extensionState & ExtensionState.MOVE_WINDOW)) + this._workspaceAnimation._switchWorkspaceEnd(this._swipeTracker, 0, active_workspace); + + if (this._extensionState & ExtensionState.ANIMATE_PANEL) + this._dummyCyclicPanel?.endGesture(global.workspace_manager.get_active_workspace_index(), 0); + + this._extensionState = ExtensionState.DEFAULT; + this._window = undefined; + this._workspaceAnimation.movingWindow = undefined; + } + destroy(): void { this._dummyCyclicPanel?.destroy(); this._swipeTracker.destroy(); diff --git a/extension/src/holdGestures/animatePanel.ts b/extension/src/holdGestures/animatePanel.ts new file mode 100644 index 0000000..ab127e8 --- /dev/null +++ b/extension/src/holdGestures/animatePanel.ts @@ -0,0 +1,112 @@ +import { registerClass } from '../../common/utils/gobject'; +import Clutter from '@gi-types/clutter8'; +import St from '@gi-types/st1'; + +import { global, imports } from 'gnome-shell'; +import { easeActor } from '../utils/environment'; + +const Main = imports.ui.main; +const { lerp } = imports.misc.util; + +/** + * GObject Class to animate top panel in circular animation + * Without displaying it on any other monitors + */ +export const DummyCyclicPanel = registerClass( + class extends Clutter.Actor { + panelBox: St.BoxLayout>; + private PADDING_WIDTH; + private _container: Clutter.Actor; + + constructor() { + super({ visible: false }); + + this.PADDING_WIDTH = 100 * Main.layoutManager.primaryMonitor.geometry_scale; + + this.panelBox = Main.layoutManager.panelBox; + + this._container = new Clutter.Actor({ layoutManager: new Clutter.BoxLayout({ orientation: Clutter.Orientation.HORIZONTAL, spacing: this.PADDING_WIDTH }) }); + this.add_child(this._container); + + this._container.add_child(new Clutter.Clone({ source: this.panelBox })); + this._container.add_child(new Clutter.Clone({ source: this.panelBox })); + + // this.add_constraint(new MonitorConstraint({ primary: true })); + this.set_clip_to_allocation(true); + Main.layoutManager.uiGroup.add_child(this); + } + + vfunc_get_preferred_height(for_width: number) { + return this.panelBox.get_preferred_height(for_width); + } + + vfunc_get_preferred_width(for_height: number) { + return this.panelBox.get_preferred_width(for_height); + } + + beginGesture() { + // hide main panel + Main.layoutManager.panelBox.opacity = 0; + + Main.layoutManager.panelBox.set_style_class_name('no-panel-corner'); + + let x, y; + + // dash-to-panel + if (this.panelBox.get_parent() !== Main.layoutManager.uiGroup) + [x, y] = this.panelBox.get_parent().get_position(); + else + [x, y] = Main.layoutManager.panelBox.get_position(); + + if (x === null || y === null) { + const { x, y } = Main.layoutManager.primaryMonitor; + this.set_position(x, y); + } + else + this.set_position(x, y); + + this.visible = true; + Main.layoutManager.uiGroup.set_child_above_sibling(this, null); + } + + updateGesture(progress: number) { + // log('setting position to: ' + this.get_position()); + this._container.translation_x = this._getTranslationFor(progress); + } + + endGesture(endProgress: number, duration: number) { + // gesture returns accelerated end value, hence need to do this + const current_workspace = global.workspace_manager.get_active_workspace_index(); + const translation_x = ( + endProgress > current_workspace || + (endProgress === current_workspace && this._container.translation_x <= this.min_cyclic_translation / 2) + ) ? this.min_cyclic_translation : 0; + + easeActor(this._container, { + translation_x, + duration, + mode: Clutter.AnimationMode.EASE_OUT_CUBIC, + onStopped: () => { + this.visible = false; + + // add corners + Main.layoutManager.panelBox.remove_style_class_name('no-panel-corner'); + Main.layoutManager.panelBox.opacity = 255; + }, + }); + } + + private _getTranslationFor(progress: number) { + const begin = Math.floor(progress); + const end = Math.ceil(progress); + progress = begin === end ? 0 : (progress - begin) / (end - begin); + + return lerp(0, this.min_cyclic_translation, progress); + } + + /** returns maximium negative value because translation is always negative */ + get min_cyclic_translation(): number { + return -(this.width + this.PADDING_WIDTH); + } + }, +); \ No newline at end of file diff --git a/extension/src/holdGestures/showDesktop.ts b/extension/src/holdGestures/showDesktop.ts new file mode 100644 index 0000000..4ce07a6 --- /dev/null +++ b/extension/src/holdGestures/showDesktop.ts @@ -0,0 +1,304 @@ +import Clutter from '@gi-types/clutter8'; +import Meta from '@gi-types/meta8'; +import Shell from '@gi-types/shell0'; +import { global, imports } from 'gnome-shell'; + +const Main = imports.ui.main; +const { lerp } = imports.misc.util; + +import { printStack } from '../../common/utils/logging'; + +// declare enum +enum WorkspaceManagerState { + SHOW_DESKTOP = -1, + DEFAULT = 0, +} + +// declare enum +enum ExtensionState { + DEFAULT, + ANIMATING, +} + +declare type SwipeTrackerT = typeof imports.ui.swipeTracker.SwipeTracker.prototype; + +export class ShowDesktopExtension implements ISubExtension { + private _windows = new Map>(); + + private _workspace?: Meta.Workspace; + private _workspaceChangedId = 0; + private _windowAddedId = 0; + private _windowRemovedId = 0; + private _windowUnMinimizedId = 0; + private _extensionState = ExtensionState.DEFAULT; + + private _minimizingWindows: Meta.Window[] = []; + private _workspaceManagerState = WorkspaceManagerState.DEFAULT; + + apply(): void { + this._workspaceChangedId = global.workspace_manager.connect('active-workspace-changed', this._workspaceChanged.bind(this)); + this._workspaceChanged(); + + this._windowUnMinimizedId = global.window_manager.connect('unminimize', this._windowUnMinimized.bind(this)); + } + + destroy(): void { + if (this._windowAddedId) + this._workspace?.disconnect(this._windowAddedId); + + if (this._windowRemovedId) + this._workspace?.disconnect(this._windowRemovedId); + + if (this._workspaceChangedId) + global.workspace_manager.disconnect(this._workspaceChangedId); + + if (this._windowUnMinimizedId) + global.window_manager.disconnect(this._windowUnMinimizedId); + } + + private _isDesktopIconExtensionWindow(window: Meta.Window) { + return window.skip_taskbar && + window.gtk_application_id === 'com.rastersoft.ding' && + window.gtk_application_object_path === '/com/rastersoft/ding'; + } + + private _easeOpacityDesktopWindows(_opacity: number, _duration: number) { + // if (this._minimizingWindows.length === 0) + // return; + + const windowActors = (global.window_group + .get_children() + .filter(w => w instanceof Meta.WindowActor) as Meta.WindowActor[]) + .filter(w => w.meta_window.is_always_on_all_workspaces() || w.meta_window.get_workspace().index === this._workspace?.index); + + const topActor = this._minimizingWindows + .map(w => w.get_compositor_private() as Meta.WindowActor) + .filter(actor => windowActors.includes(actor)) + // top actors will be at the end + .sort((a, b) => windowActors.indexOf(a) - windowActors.indexOf(b))[0] as Meta.WindowActor | undefined; + + if (topActor) { + Array.from(this._windows.keys()) + .map(w => w.get_compositor_private() as Meta.WindowActor) + .filter(actor => windowActors.includes(actor) && this._isDesktopIconExtensionWindow(actor.meta_window)) + // top actors will be at the end + .sort((a, b) => windowActors.indexOf(a) - windowActors.indexOf(b)) + .forEach(actor => global.window_group.set_child_below_sibling(actor, topActor)); + } + } + + private _getMinimizableWindows() { + if (this._workspaceManagerState === WorkspaceManagerState.DEFAULT) { + this._minimizingWindows = Array.from(this._windows.keys()) + .filter(win => win.can_minimize() && !win.minimized && !win.skip_taskbar); + } + + this._minimizingWindows.forEach(win => { + const value = this._windows.get(win); + if (value === undefined) + return; + value.actor = win.get_compositor_private() as Meta.WindowActor; + value.actor.show(); + value.start = win.get_buffer_rect(); + value.end = this._getMinimizedRect(win); + value.actor.set_pivot_point(0, 0); + }); + + return this._minimizingWindows; + } + + gestureBegin(tracker: SwipeTrackerT) { + printStack(); + log(JSON.stringify({ _workspaceManagerState: this._workspaceManagerState })); + this._extensionState = ExtensionState.ANIMATING; + this._minimizingWindows = this._getMinimizableWindows(); + this._easeOpacityDesktopWindows(0, this._workspaceManagerState === WorkspaceManagerState.DEFAULT ? 0 : 100); + + log(JSON.stringify( + { + _workspaceManagerState: this._workspaceManagerState, + windows: this._minimizingWindows.map(win => win.title), + }, + undefined, + 2, + )); + + tracker.confirmSwipe( + global.screen_height, + [WorkspaceManagerState.SHOW_DESKTOP, WorkspaceManagerState.DEFAULT], + this._workspaceManagerState, + this._workspaceManagerState, + ); + } + + gestureUpdate(_tracker: unknown, progress: number) { + // progress 0 -> NORMAL state, - 1 -> SHOW Desktop + // printStack(); + this._minimizingWindows.forEach(win => { + const value = this._windows.get(win); + if (value === undefined) + return; + // winActor.x = lerp(value.start.x, value.end.x, -progress); + // winActor.y = lerp(value.start.y, value.end.y, -progress); + + if (value.actor === undefined || value.end === undefined || value.start === undefined) + return; + + value.actor.translation_x = lerp(0, value.end.x - value.start.x, -progress); + value.actor.translation_y = lerp(0, value.end.y - value.start.y, -progress); + + value.actor.scale_x = lerp(1, value.end.width / value.start.width, -progress); + value.actor.scale_y = lerp(1, value.end.height / value.start.height, -progress); + }); + } + + gestureEnd(_tracker: unknown, duration: number, endProgress: number) { + // endProgress 0 -> NORMAL state, 1 -> SHOW Desktop + // throw new Error('Method not implemented.'); + printStack(); + let has_actor = false; + let workspace_activated = false; + this._minimizingWindows.forEach(win => { + const value = this._windows.get(win); + if (value === undefined) + return; + if (value.actor === undefined || value.end === undefined || value.start === undefined) + return; + + has_actor = true; + (value.actor as any).ease({ + scale_x: lerp(1, value.end.width / value.start.width, -endProgress), + scale_y: lerp(1, value.end.height / value.start.height, -endProgress), + translation_x: lerp(0, value.end.x - value.start.x, -endProgress), + translation_y: lerp(0, value.end.y - value.start.y, -endProgress), + duration, + mode: Clutter.AnimationMode.EASE_OUT_QUAD, + onStopped: () => { + if (value.actor === undefined) + return; + Main.wm.skipNextEffect(value.actor); + if (endProgress === WorkspaceManagerState.DEFAULT) { + value.actor.meta_window.unminimize(); + this._minimizingWindows = []; + } + else { + value.actor.meta_window.minimize(); + value.actor.hide(); + } + + this._easeOpacityDesktopWindows(255, duration); + + value.actor.scale_x = 1; + value.actor.scale_y = 1; + value.actor.translation_x = 0; + value.actor.translation_y = 0; + + if (!workspace_activated) { + workspace_activated = true; + this._workspace?.activate(global.get_current_time()); + } + }, + }); + }); + + if (!has_actor) + this._easeOpacityDesktopWindows(255, duration); + + this._extensionState = ExtensionState.DEFAULT; + this._workspaceManagerState = endProgress; + } + + private _resetState(animate = false) { + // reset state, aka. undo show desktop + this._minimizingWindows.forEach(win => { + log(`resetting state: ${win.title}`); + if (!this._windows.has(win)) + return; + const onStopped = (isFinished: boolean) => { + log('animate complete: ' + isFinished); + Main.wm.skipNextEffect(win.get_compositor_private()); + win.unminimize(); + }; + const actor = win.get_compositor_private() as Meta.WindowActor; + if (animate && actor) { + log('animatine + ' + win.title); + actor.show(); + actor.opacity = 0; + (actor as any).ease({ + opacity: 255, + duration: 500, + mode: Clutter.AnimationMode.EASE_OUT_QUAD, + onStopped, + }); + } + else + onStopped(false); + // log(`state reset: ${win.title}`); + }); + + this._minimizingWindows = []; + this._workspaceManagerState = WorkspaceManagerState.DEFAULT; + } + + private _workspaceChanged() { + if (this._windowAddedId) + this._workspace?.disconnect(this._windowAddedId); + + if (this._windowRemovedId) + this._workspace?.disconnect(this._windowRemovedId); + + this._resetState(false); + this._windows.clear(); + this._workspace = global.workspace_manager.get_active_workspace(); + + this._windowAddedId = this._workspace.connect('window-added', this._windowAdded.bind(this)); + this._windowRemovedId = this._workspace.connect('window-removed', this._windowRemoved.bind(this)); + this._workspace.list_windows().forEach(win => this._windowAdded(this._workspace, win)); + } + + private _windowAdded(_workspace: unknown, window: Meta.Window) { + log(`window adding: ${window.title}, size: ${this._windows.size}, skipbar: ${window.skip_taskbar}, id: ${window.gtk_application_id}, path: ${window.gtk_application_object_path}`); + if (this._windows.has(window)) + return; + + if (!window.skip_taskbar && this._extensionState === ExtensionState.DEFAULT) + this._resetState(true); + this._windows.set(window, {}); + // log(`window added: ${window.title}, size: ${this._windows.size} `); + } + + private _windowRemoved(_workspace: unknown, window: Meta.Window) { + log(`window removing: ${window.title}, size: ${this._windows.size} `); + if (!this._windows.has(window)) + return; + this._windows.delete(window); + // log(`window removed: ${window.title}, size: ${this._windows.size} `); + } + + private _windowUnMinimized(_wm: Shell.WM, actor: Meta.WindowActor) { + if (actor.meta_window.get_workspace().index !== this._workspace?.index) + return; + + this._minimizingWindows = []; + this._workspaceManagerState = WorkspaceManagerState.DEFAULT; + } + + private _getMinimizedRect(win: Meta.Window): Meta.Rectangle { + const [has_icon, rect] = win.get_icon_geometry(); + if (has_icon) + return rect; + const box = Main.layoutManager.getWorkAreaForMonitor(win.get_monitor()); + return new Meta.Rectangle({ + x: box.x, + y: box.y, + width: 0, + height: 0, + }); + } +} \ No newline at end of file diff --git a/extension/src/overviewRoundTrip.ts b/extension/src/overviewRoundTrip.ts index efd8956..36eff26 100644 --- a/extension/src/overviewRoundTrip.ts +++ b/extension/src/overviewRoundTrip.ts @@ -4,22 +4,34 @@ import { imports, global } from 'gnome-shell'; const Main = imports.ui.main; const { SwipeTracker } = imports.ui.swipeTracker; -import { createSwipeTracker } from './swipeTracker'; +import { createSwipeTracker, TouchpadSwipeGesture } from './swipeTracker'; import { OverviewControlsState, ExtSettings } from '../constants'; - -const ExtensionState = { - DISABLED: 0, - DEFAULT: 1, - CUSTOM: 2, -}; +import { ShowDesktopExtension } from './holdGestures/showDesktop'; + +// declare enum +enum ExtensionState { + // DISABLED = 0, + DEFAULT = 1, + CUSTOM = 2, +} + +// declare enum +enum GestureState { + // DEFAULT, + OVERVIEW, + SHOW_DESKTOP, +} export class OverviewRoundTripGestureExtension implements ISubExtension { private _overviewControls: imports.ui.overviewControls.OverviewControlsManager; private _stateAdjustment: imports.ui.overviewControls.OverviewAdjustment; private _oldGetStateTransitionParams: typeof imports.ui.overviewControls.OverviewAdjustment.prototype.getStateTransitionParams; private _swipeTracker?: typeof SwipeTracker.prototype; + private _touchpadGesture?: typeof TouchpadSwipeGesture.prototype; + private _showDesktopAnimation?: ShowDesktopExtension; private _progress = 0; - private _extensionState = ExtensionState.DISABLED; + private _extensionState = ExtensionState.DEFAULT; + private _gestureState = GestureState.OVERVIEW; private _connectors: number[]; private _shownEventId = 0; private _hiddenEventId = 0; @@ -62,6 +74,13 @@ export class OverviewRoundTripGestureExtension implements ISubExtension { Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW, Clutter.Orientation.VERTICAL, ); + this._touchpadGesture = this._swipeTracker._touchpadGesture as typeof TouchpadSwipeGesture.prototype; + + if (ExtSettings.ENABLE_SHOW_DESKTOP) { + this._showDesktopAnimation = new ShowDesktopExtension(); + this._showDesktopAnimation.apply(); + } + this._swipeTracker.orientation = Clutter.Orientation.VERTICAL; this._connectors.push(this._swipeTracker.connect('begin', this._gestureBegin.bind(this))); this._connectors.push(this._swipeTracker.connect('update', this._gestureUpdate.bind(this))); @@ -80,7 +99,6 @@ export class OverviewRoundTripGestureExtension implements ISubExtension { } destroy(): void { - this._extensionState = ExtensionState.DISABLED; if (this._swipeTracker) { this._connectors.forEach(connector => this._swipeTracker?.disconnect(connector)); this._swipeTracker.destroy(); @@ -92,9 +110,18 @@ export class OverviewRoundTripGestureExtension implements ISubExtension { this._stateAdjustment.getStateTransitionParams = this._oldGetStateTransitionParams.bind(this._stateAdjustment); Main.overview.disconnect(this._shownEventId); Main.overview.disconnect(this._hiddenEventId); + + this._showDesktopAnimation?.destroy(); } _gestureBegin(tracker: typeof SwipeTracker.prototype): void { + this._gestureState = GestureState.OVERVIEW; + if (this._touchpadGesture?.hadHoldGesture && this._showDesktopAnimation && Main.actionMode === Shell.ActionMode.NORMAL) { + this._gestureState = GestureState.SHOW_DESKTOP; + this._showDesktopAnimation.gestureBegin(tracker); + return; + } + const _tracker = { confirmSwipe: (distance: number, snapPoints: number[], currentProgress: number, cancelProgress: number) => { snapPoints.unshift(OverviewControlsState.APP_GRID_P); @@ -114,6 +141,11 @@ export class OverviewRoundTripGestureExtension implements ISubExtension { } _gestureUpdate(tracker: typeof SwipeTracker.prototype, progress: number): void { + if (this._gestureState === GestureState.SHOW_DESKTOP) { + this._showDesktopAnimation?.gestureUpdate(tracker, progress); + return; + } + if (progress < OverviewControlsState.HIDDEN || progress > OverviewControlsState.APP_GRID) { this._extensionState = ExtensionState.CUSTOM; @@ -128,6 +160,11 @@ export class OverviewRoundTripGestureExtension implements ISubExtension { } _gestureEnd(tracker: typeof SwipeTracker.prototype, duration: number, endProgress: number): void { + if (this._gestureState === GestureState.SHOW_DESKTOP) { + this._showDesktopAnimation?.gestureEnd(tracker, duration, endProgress); + return; + } + if (this._progress < OverviewControlsState.HIDDEN) { this._extensionState = ExtensionState.CUSTOM; endProgress = endProgress >= OverviewControlsState.HIDDEN ? diff --git a/extension/src/swipeTracker.ts b/extension/src/swipeTracker.ts index ae81645..724e636 100644 --- a/extension/src/swipeTracker.ts +++ b/extension/src/swipeTracker.ts @@ -59,9 +59,13 @@ export const TouchpadSwipeGesture = registerClass({ TOUCHPAD_BASE_WIDTH = TouchpadConstants.TOUCHPAD_BASE_WIDTH; DRAG_THRESHOLD_DISTANCE = TouchpadConstants.DRAG_THRESHOLD_DISTANCE; enabled = true; - private _lastHoldCancelledTime = 0; - private _hadHoldGesture = false; + + private DELAY_BETWEEN_HOLD = 150; // ms private HOLD_TIME = 100; // ms + private _lastHoldBeginTime = - this.DELAY_BETWEEN_HOLD; + private _lastHoldCancelledTime = 0; + private _beginTime = this.HOLD_TIME; + // private _hadHoldGesture = false; private _time = 0; constructor( @@ -89,8 +93,18 @@ export const TouchpadSwipeGesture = registerClass({ } _handleHold(event: CustomEventType): void { - if (event.get_gesture_phase() === Clutter.TouchpadGesturePhase.CANCEL) - this._lastHoldCancelledTime = event.get_time(); + switch (event.get_gesture_phase()) { + case Clutter.TouchpadGesturePhase.BEGIN: + this._lastHoldBeginTime = event.get_time(); + break; + case Clutter.TouchpadGesturePhase.CANCEL: + this._lastHoldCancelledTime = event.get_time(); + break; + default: + this._lastHoldBeginTime = - this.DELAY_BETWEEN_HOLD; + this._lastHoldCancelledTime = 0; + } + } _handleEvent(_actor: undefined | Clutter.Actor, event: CustomEventType): boolean { @@ -107,7 +121,7 @@ export const TouchpadSwipeGesture = registerClass({ this._state = TouchpadState.NONE; this._toggledDirection = false; - this._hadHoldGesture = event.get_time() - this._lastHoldCancelledTime <= this.HOLD_TIME; + this._beginTime = event.get_time(); } if (this._state === TouchpadState.IGNORED) @@ -200,6 +214,9 @@ export const TouchpadSwipeGesture = registerClass({ this.emit('end', time, distance); this._state = TouchpadState.NONE; this._toggledDirection = false; + this._lastHoldCancelledTime = 0; + this._lastHoldBeginTime = - this.DELAY_BETWEEN_HOLD; + this._beginTime = this.HOLD_TIME; break; } @@ -224,7 +241,8 @@ export const TouchpadSwipeGesture = registerClass({ } get hadHoldGesture(): boolean { - return this._hadHoldGesture; + return (this._beginTime - this._lastHoldCancelledTime) < this.HOLD_TIME && + (this._lastHoldCancelledTime - this._lastHoldBeginTime) > this.DELAY_BETWEEN_HOLD; } get time(): number { diff --git a/extension/styleclass.css b/extension/styleclass.css new file mode 100644 index 0000000..0bb99ed --- /dev/null +++ b/extension/styleclass.css @@ -0,0 +1 @@ +.no-panel-corner #panel .panel-corner { -panel-corner-radius: 0px; } \ No newline at end of file diff --git a/gnome-shell/index.d.ts b/gnome-shell/index.d.ts index 9a1e546..936524b 100644 --- a/gnome-shell/index.d.ts +++ b/gnome-shell/index.d.ts @@ -189,7 +189,7 @@ declare namespace imports { _switchWorkspaceUpdate(tracker: swipeTracker.SwipeTracker, progress: number); _switchWorkspaceEnd(tracker: swipeTracker.SwipeTracker, duration: number, progress: number); - movingWindow: Meta.Window; + movingWindow: Meta.Window | undefined; } } diff --git a/metadata.json b/metadata.json index f6b3246..89f42aa 100644 --- a/metadata.json +++ b/metadata.json @@ -8,5 +8,5 @@ "settings-schema": "org.gnome.shell.extensions.gestureImprovements", "url": "https://github.com/harshadgavali/gnome-gesture-improvements", "uuid": "gestureImprovements@gestures", - "version": 16.1 + "version": 17.1 } \ No newline at end of file From 17b6d69364cdab1977cf089204f3297f31ae1d06 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sun, 31 Oct 2021 00:45:59 +0530 Subject: [PATCH 065/155] Merge origin/main --- README.md | 13 +- extension/common/prefs.ts | 109 ++++++-- extension/common/utils/prefUtils.ts | 1 + extension/extension.ts | 18 +- ...extensions.gestureImprovements.gschema.xml | 9 + extension/src/snapWindow.ts | 2 +- extension/ui/prefs.ui | 256 +++++++++++++----- extension_page.md | 3 +- 8 files changed, 319 insertions(+), 92 deletions(-) diff --git a/README.md b/README.md index 6114022..2803ffe 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,9 @@ npm run update gnome-extensions enable gestureImprovements@gestures ``` +### Additional app X11 +On X11, you also need to install [gnome-x11-gesture-daemon](https://github.com/harshadgavali/gnome-x11-gesture-daemon) + ## Gestures (including built-in ones) | Gesture | Modes | Fingers | Direction | | :------------------------------------------ | :------- | :------ | :-------------- | @@ -30,11 +33,15 @@ gnome-extensions enable gestureImprovements@gestures | Switch app pages | AppGrid | 2/3 | Horizontal | | Switch workspaces | * | 4 | Horizontal | | Desktop/Overview/AppGrid navigation | * | 4 | Vertical | -| Maximize/unmaximize a window | Desktop | 3 | Vertical | +| Unmaximize/maximize/fullscreen a window | Desktop | 3 | Vertical | +| Minimize a window | Desktop | 3 | Vertical | | Snap/half-tile a window | Desktop | 3 | Explained below | +#### Notes +* Minimize gesture is available if you have dash-to-dock/panel or similar extension enabled. #### For activating tiling gesture +0. This can't be activated if you enable minimize gesture 1. Do a 3-finger vertical downward gesture on a unmaximized window 2. Wait a few milliseconds 3. Do a 3-finger horizontal gesture to tile a window to either side @@ -48,11 +55,13 @@ gsettings set org.gnome.shell.window-switcher current-workspace-only false * Add delay to alt-tab gesture, to ensure second windows gets selected when a fast swipe is done * Change sensitivity of swipe (touchpad swipe speed) +* Option to follow natural scrolling (seperate from option in GNOME settings) * Revert to 3-finger swipes to switch workspace on desktop (4-fingers to switch windows) * Revert to 3-finger swipes for overview navigation (4-fingers to maximize/unmaximize/tile) # Contributors [@jacksongoode](https://github.com/jacksongoode) +[@kyteinsky](https://github.com/kyteinsky) # Thanks -[@ewlsh](https://gitlab.gnome.org/ewlsh) for [Typescript definitions](https://www.npmjs.com/package/@gi-types/glib) for GLib, GObject, ... \ No newline at end of file +[@ewlsh](https://gitlab.gnome.org/ewlsh) for [Typescript definitions](https://www.npmjs.com/package/@gi-types/glib) for GLib, GObject, ... diff --git a/extension/common/prefs.ts b/extension/common/prefs.ts index 7e481d2..55212a8 100644 --- a/extension/common/prefs.ts +++ b/extension/common/prefs.ts @@ -3,33 +3,81 @@ import Gtk from '@gi-types/gtk4'; import GObject from '@gi-types/gobject2'; import { CanEnableMinimizeGesture } from './utils/prefUtils'; +type BooleanSettingsKeys = + 'default-session-workspace' | + 'default-overview' | + 'allow-minimize-window' | + 'follow-natural-scroll' | + 'enable-alttab-gesture' | + 'enable-window-manipulation-gesture'; + +type IntegerSettingsKeys = + 'alttab-delay' + ; +type DoubleSettingsKeys = + 'touchpad-speed-scale' + ; + +type AllSettingsKeys = + BooleanSettingsKeys | + IntegerSettingsKeys | + DoubleSettingsKeys + ; + +type AllUIObjectKeys = + AllSettingsKeys | + 'touchpadspeed_speed_display_value' | + 'allow-minimize-window_box-row' | + 'alttab-delay_box-row' + ; + +type KeysThatStartsWith = K extends `${U}${infer _R}` ? K : never; +export type GioSettings = Omit> & { + get_boolean(key: BooleanSettingsKeys): boolean; + get_int(key: IntegerSettingsKeys): number; + get_double(key: DoubleSettingsKeys): number; +} + +type GtkBuilder = Omit & { + get_object(name: AllUIObjectKeys): T; +} + /** - * Bind value of settings to {@link Gtk.SpinButton} - * @param key key of settings and id of {@link Gtk.SpinButton} object in builder + * Bind value of setting to {@link Gtk.SpinButton} + * @param key key of setting and id of {@link Gtk.SpinButton} object in builder */ -function bind_int_value(key: string, settings: Gio.Settings, builder: Gtk.Builder) { - const button: Gtk.SpinButton = builder.get_object(key); - button.set_value(settings.get_int(key)); +function bind_int_value(key: IntegerSettingsKeys, settings: GioSettings, builder: GtkBuilder) { + const button = builder.get_object(key); settings.bind(key, button, 'value', Gio.SettingsBindFlags.DEFAULT); } +interface BindBooleanParams { + /** flag used when binding setting's key to switch's {@link Gtk.Switch.active} status */ + flags?: Gio.SettingsBindFlags, + /** list of key of {@link Gtk.Box} object in builder, setting's key is binded to {@link Gtk.Box.sensitive} */ + sensitiveRowKeys?: AllUIObjectKeys[], +} + /** * Bind value of settings to {@link Gtk.Swich} - * @param key key of settings and id of {@link Gtk.Switch} object in builder + * @param key key of setting and id of {@link Gtk.Switch} object in builder */ -function bind_boolean_value(key: string, settings: Gio.Settings, builder: Gtk.Builder) { - const button: Gtk.Switch = builder.get_object(key); - button.set_active(settings.get_boolean(key)); - settings.bind(key, button, 'active', Gio.SettingsBindFlags.DEFAULT); +function bind_boolean_value(key: BooleanSettingsKeys, settings: GioSettings, builder: GtkBuilder, params?: BindBooleanParams) { + const button = builder.get_object(key); + settings.bind(key, button, 'active', params?.flags ?? Gio.SettingsBindFlags.DEFAULT); + params?.sensitiveRowKeys?.forEach(row_key => { + const row = builder.get_object(row_key); + button.bind_property('active', row, 'sensitive', GObject.BindingFlags.SYNC_CREATE); + }); } /** * Display value of `key` in log scale. - * @param key key of settings and id of {@link Gtk.Scale} object in builder + * @param key key of setting and id of {@link Gtk.Scale} object in builder */ -function display_in_log_scale(key: string, label_key: string, settings: Gio.Settings, builder: Gtk.Builder) { - const scale: Gtk.Scale = builder.get_object(key); - const label: Gtk.Label = builder.get_object(label_key); +function display_in_log_scale(key: DoubleSettingsKeys, label_key: AllUIObjectKeys, settings: GioSettings, builder: GtkBuilder) { + const scale = builder.get_object(key); + const label = builder.get_object(label_key); // display value in log scale scale.connect('value-changed', () => { @@ -43,15 +91,21 @@ function display_in_log_scale(key: string, label_key: string, settings: Gio.Sett } /** Show button to enable minimize gesture, returns whether button was shown */ -function showEnableMinimizeButton(key: string, settings: Gio.Settings, builder: Gtk.Builder) { - const row = builder.get_object(`${key}_box-row`); +function showEnableMinimizeButton(key: BooleanSettingsKeys, row_key: AllUIObjectKeys, settings: GioSettings, builder: GtkBuilder) { + const row = builder.get_object(row_key); row.visible = settings.get_boolean(key) || CanEnableMinimizeGesture(); if (row.visible) bind_boolean_value(key, settings, builder); return row.visible; } -export function getPrefsWidget(settings: Gio.Settings, uiPath: string): T { +/** + * Binds preference widgets and settings keys + * @param settings setting object of extension + * @param uiPath path of ui file + * @returns Get preference widget of type {@link T} + */ +export function getPrefsWidget(settings: Gio.Settings, uiPath: string): T { const builder = new Gtk.Builder(); builder.add_from_file(uiPath); @@ -59,11 +113,24 @@ export function getPrefsWidget(settings: Gio.Settings, uiPat bind_int_value('alttab-delay', settings, builder); - bind_boolean_value('default-session-workspace', settings, builder); - bind_boolean_value('default-overview', settings, builder); + bind_boolean_value('default-session-workspace', settings, builder, { flags: Gio.SettingsBindFlags.INVERT_BOOLEAN }); + bind_boolean_value('default-overview', settings, builder, { flags: Gio.SettingsBindFlags.INVERT_BOOLEAN }); bind_boolean_value('follow-natural-scroll', settings, builder); - showEnableMinimizeButton('allow-minimize-window', settings, builder); + bind_boolean_value('enable-alttab-gesture', settings, builder, { sensitiveRowKeys: ['alttab-delay_box-row'] }); + bind_boolean_value('enable-window-manipulation-gesture', settings, builder, { sensitiveRowKeys: ['allow-minimize-window_box-row'] }); + + showEnableMinimizeButton('allow-minimize-window', 'allow-minimize-window_box-row', settings, builder); + + const main_prefs = builder.get_object('main_prefs'); + const header_bar = builder.get_object('header_bar'); + + main_prefs.connect('realize', () => { + const window = main_prefs.get_root(); + + if (window && window instanceof Gtk.Window) + window.set_titlebar(header_bar); + }); - return builder.get_object('main_prefs'); + return main_prefs; } \ No newline at end of file diff --git a/extension/common/utils/prefUtils.ts b/extension/common/utils/prefUtils.ts index 18663fe..55781cf 100644 --- a/extension/common/utils/prefUtils.ts +++ b/extension/common/utils/prefUtils.ts @@ -9,6 +9,7 @@ export function CanEnableMinimizeGesture() { 'dash-to-dock@micxgx.gmail.com', 'dash-to-panel@jderose9.github.com', 'window-list@gnome-shell-extensions.gcampax.github.com', + 'ubuntu-dock@ubuntu.com', ]; const shellSettings = getShellSettings(); diff --git a/extension/extension.ts b/extension/extension.ts index 904d234..eaa732f 100644 --- a/extension/extension.ts +++ b/extension/extension.ts @@ -1,5 +1,4 @@ import GLib from '@gi-types/glib2'; -import Gio from '@gi-types/gio2'; import * as Constants from './constants'; import { GestureExtension } from './src/gestures'; @@ -8,12 +7,13 @@ import { OverviewRoundTripGestureExtension } from './src/overviewRoundTrip'; import { SnapWindowExtension } from './src/snapWindow'; import * as DBusUtils from './src/utils/dbus'; import { imports } from 'gnome-shell'; +import { GioSettings } from './common/prefs'; const ExtensionUtils = imports.misc.extensionUtils; class Extension { private _extensions: ISubExtension[]; - settings?: Gio.Settings; + settings?: GioSettings; private _settingChangedId = 0; private _reloadWaitId = 0; private _noReloadDelayFor: string[]; @@ -68,12 +68,18 @@ class Extension { _enable() { this._initializeSettings(); - this._extensions = [ - new AltTabGestureExtension(), + this._extensions = []; + if (this.settings?.get_boolean('enable-alttab-gesture')) + this._extensions.push(new AltTabGestureExtension()); + + this._extensions.push( new OverviewRoundTripGestureExtension(), new GestureExtension(), - new SnapWindowExtension(), - ]; + ); + + if (this.settings?.get_boolean('enable-window-manipulation-gesture')) + this._extensions.push(new SnapWindowExtension()); + this._extensions.forEach(extension => extension.apply()); } diff --git a/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml b/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml index 45dcf4b..d56f495 100644 --- a/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml +++ b/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml @@ -22,6 +22,15 @@ true + Whether to follow natural scroll for swipe + + + true + Enable alttab gesture + + + true + Enable Window manipulation gesture \ No newline at end of file diff --git a/extension/src/snapWindow.ts b/extension/src/snapWindow.ts index 893ce18..79ecfcf 100644 --- a/extension/src/snapWindow.ts +++ b/extension/src/snapWindow.ts @@ -327,8 +327,8 @@ export class SnapWindowExtension implements ISubExtension { _gestureBegin(tracker: typeof SwipeTracker.prototype, monitor: number): void { const window = global.display.get_focus_window() as Meta.Window | null; - // if window can't be maximized and window is not fullscreen // fullscreen window's can't be maximized :O + // if window can't be maximized and window is not fullscreen, return if (!window || !(window.can_maximize() || window.is_fullscreen())) { return; } diff --git a/extension/ui/prefs.ui b/extension/ui/prefs.ui index 45f6b11..97dadef 100644 --- a/extension/ui/prefs.ui +++ b/extension/ui/prefs.ui @@ -19,6 +19,41 @@ + + + + + + start + start + center + dialog-information-symbolic + + + start + + + +Some gestures are related to others +- Vertical gestures : Overview nagivation and window manipulation +- Horizontal gestures : Workspace switching and window switching + +If you enable 4-finger gesture for overview navigation or workspace switching, +other gesture, if enabled, will be activated using 3-finger gesture. + +If you disable 4-finger gesture for overview navigation or workspace switching, +these gesture will be activated using 3-finger gesture and +other gesture, if enabled, will be activated using 4-finger gesture. + + + + + + + + + + vertical @@ -41,7 +76,6 @@ 12 - vertical start @@ -62,27 +96,29 @@ none - + - 12 - 12 - 12 - 12 + 12 + 12 + 12 + 12 32 + vertical start + start start 1 0 - Enable 3-finger gestures for switching workspaces + 4-finger gestures for overview navigation @@ -92,14 +128,51 @@ end True 0 - Uses 3-finger horizontal swipes to switch workspaces on desktop and 4-finger swipes to switch windows + 6 + For navigating between desktop, activities and appgrid + + + + + + + end + True + center + + + + + + + + + + + + + + 12 + 12 + 12 + 12 + 32 + + + + start + center + 1 + 0 + 4-finger gestures for workspace switching + end @@ -107,32 +180,69 @@ center + - + - 12 - 12 - 12 - 12 + 12 + 12 + 12 + 12 32 + + + + start + center + 1 + 0 + Window switching + + + + + + end + True + center + + + + + + + + + + + + + + 12 + 12 + 12 + 12 + 32 + vertical start + start start 1 0 - Enable 3-finger gestures for overview navigation + Window manipulation @@ -142,47 +252,53 @@ end True 0 - Uses 3-finger vertical swipes to navigate between Desktop, Overview, AppGrid and 4-finger swipes to maximize/unmaximize/tile a window + 6 + Tile, unmaximize, maximize or fullscreen a window + + - + end True center + - + - 12 - 12 - 12 - 12 + 12 + 12 + 12 + 12 32 + vertical start + start start 1 0 - Enable minimize window gesture + Minimize window @@ -192,14 +308,17 @@ end True 0 + 6 This will disable tiling gesture + + end @@ -207,6 +326,7 @@ center + @@ -241,16 +361,18 @@ none + - 12 - 12 - 12 - 12 + 12 + 12 + 12 + 12 32 + start @@ -260,11 +382,13 @@ Touchpad swipe speed + horizontal end 1 + 300 @@ -279,6 +403,7 @@ + center @@ -289,37 +414,7 @@ 1.00 - - - - - - - - - - 12 - 12 - 12 - 12 - - - 32 - - - start - center - 1 - 0 - Window-switching popup delay (ms) - - - - - end - alttab_delay_adjustment - @@ -330,17 +425,19 @@ - 12 - 12 - 12 - 12 + 12 + 12 + 12 + 12 32 + vertical start + start @@ -357,14 +454,17 @@ end True 0 + 6 Similar to natural scrolling. Swipe moves the content, not the view + + end @@ -372,6 +472,41 @@ center + + + + + + + + + + + + 12 + 12 + 12 + 12 + 32 + + + + start + center + 1 + 0 + Window switcher popup delay (ms) + + + + + + end + alttab_delay_adjustment + + + + @@ -388,6 +523,5 @@ - \ No newline at end of file diff --git a/extension_page.md b/extension_page.md index b2f3017..fabd1c7 100644 --- a/extension_page.md +++ b/extension_page.md @@ -5,7 +5,8 @@ This extension adds following features: • Switch windows from current workspace using 3-finger horizontal swipe • Cyclic gestures between Desktop/Overview/AppGrid using 4 vertical swipe • Switch app-pages using 3-finger swipe gesture on AppGrid -• Maximize/unmaximize/half-tiling using 3-finger vertical & horizontal gesture +• Unmaximize/maximize/fullscreen/half-tiling using 3-finger vertical & horizontal gesture +• Optional minimize a window gesture • Override 3-finger gesture with 4-finger for switching workspace • Configure speed of gestures • Support for X11 From 18010c86ff075744a8cae5a6c4f0c3ec3c125595 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sun, 31 Oct 2021 01:33:19 +0530 Subject: [PATCH 066/155] preferences: Add preference for show desktop and move window gesture --- extension/common/prefs.ts | 38 ++++++- extension/constants.ts | 12 +- extension/extension.ts | 34 +++--- ...extensions.gestureImprovements.gschema.xml | 17 +++ extension/src/gestures.ts | 6 +- extension/ui/prefs.ui | 106 +++++++++++++++++- 6 files changed, 182 insertions(+), 31 deletions(-) diff --git a/extension/common/prefs.ts b/extension/common/prefs.ts index 55212a8..1df6b8b 100644 --- a/extension/common/prefs.ts +++ b/extension/common/prefs.ts @@ -3,13 +3,24 @@ import Gtk from '@gi-types/gtk4'; import GObject from '@gi-types/gobject2'; import { CanEnableMinimizeGesture } from './utils/prefUtils'; +// define enum +export enum AnimatePanel { + NONE = 0, + SWITCH_WORKSPACE = 1, + MOVE_WINDOW = 2, + SWITCH_WORKSPACE_AND_MOVE_WINDOW = 3, +} + type BooleanSettingsKeys = 'default-session-workspace' | 'default-overview' | 'allow-minimize-window' | 'follow-natural-scroll' | 'enable-alttab-gesture' | - 'enable-window-manipulation-gesture'; + 'enable-window-manipulation-gesture' | + 'enable-move-window-to-workspace' | + 'enable-show-desktop' + ; type IntegerSettingsKeys = 'alttab-delay' @@ -18,24 +29,29 @@ type DoubleSettingsKeys = 'touchpad-speed-scale' ; -type AllSettingsKeys = +export type AllSettingsKeys = BooleanSettingsKeys | IntegerSettingsKeys | - DoubleSettingsKeys + DoubleSettingsKeys | + 'animate-panel' ; type AllUIObjectKeys = AllSettingsKeys | 'touchpadspeed_speed_display_value' | 'allow-minimize-window_box-row' | - 'alttab-delay_box-row' + 'alttab-delay_box-row' | + 'animate-panel_box-row' ; type KeysThatStartsWith = K extends `${U}${infer _R}` ? K : never; -export type GioSettings = Omit> & { +export type GioSettings = Omit> & { get_boolean(key: BooleanSettingsKeys): boolean; get_int(key: IntegerSettingsKeys): number; get_double(key: DoubleSettingsKeys): number; + set_double(key: DoubleSettingsKeys, value: number): void; + get_enum(key: 'animate-panel'): AnimatePanel; + set_enum(key: 'animate-panel', value: AnimatePanel): void; } type GtkBuilder = Omit & { @@ -71,6 +87,14 @@ function bind_boolean_value(key: BooleanSettingsKeys, settings: GioSettings, bui }); } +function bind_combo_box(key: 'animate-panel', settings: GioSettings, builder: GtkBuilder) { + const comboBox = builder.get_object(key); + comboBox.set_active_id(settings.get_enum(key).toString()); + comboBox.connect('changed', () => { + settings.set_enum(key, parseInt(comboBox.active_id)); + }); +} + /** * Display value of `key` in log scale. * @param key key of setting and id of {@link Gtk.Scale} object in builder @@ -122,6 +146,10 @@ export function getPrefsWidget(settings: Gio.Settin showEnableMinimizeButton('allow-minimize-window', 'allow-minimize-window_box-row', settings, builder); + bind_boolean_value('enable-show-desktop', settings, builder); + bind_boolean_value('enable-move-window-to-workspace', settings, builder, {sensitiveRowKeys: ['animate-panel_box-row']}); + bind_combo_box('animate-panel', settings, builder); + const main_prefs = builder.get_object('main_prefs'); const header_bar = builder.get_object('header_bar'); diff --git a/extension/constants.ts b/extension/constants.ts index 78a86d3..4e9b268 100644 --- a/extension/constants.ts +++ b/extension/constants.ts @@ -1,3 +1,6 @@ + +import { AnimatePanel } from './common/prefs'; + // FIXME: ideally these values matches physical touchpad size. We can get the // correct values for gnome-shell specifically, since mutter uses libinput // directly, but GTK apps cannot get it, so use an arbitrary value so that @@ -26,20 +29,13 @@ export const OverviewControlsState = { HIDDEN_N: 3, }; -// define enum -export enum AnimatePanel { - NONE = 0, - SWITCH_WORKSPACE = 1, - MOVE_WINDOW = 2, - SWITCH_WORKSPACE_AND_MOVE_WINDOW = 3, -} - export const ExtSettings = { DEFAULT_SESSION_WORKSPACE_GESTURE: false, DEFAULT_OVERVIEW_GESTURE: false, ALLOW_MINIMIZE_WINDOW: false, FOLLOW_NATURAL_SCROLL: true, ENABLE_SHOW_DESKTOP: true, + ENABLE_MOVE_WINDOW_TO_WORKSPACE: true, ANIMATE_PANEL: AnimatePanel.MOVE_WINDOW, }; diff --git a/extension/extension.ts b/extension/extension.ts index eaa732f..902ca34 100644 --- a/extension/extension.ts +++ b/extension/extension.ts @@ -7,7 +7,8 @@ import { OverviewRoundTripGestureExtension } from './src/overviewRoundTrip'; import { SnapWindowExtension } from './src/snapWindow'; import * as DBusUtils from './src/utils/dbus'; import { imports } from 'gnome-shell'; -import { GioSettings } from './common/prefs'; +import { AllSettingsKeys, GioSettings } from './common/prefs'; +import { AltTabConstants, ExtSettings, TouchpadConstants } from './constants'; const ExtensionUtils = imports.misc.extensionUtils; @@ -16,15 +17,13 @@ class Extension { settings?: GioSettings; private _settingChangedId = 0; private _reloadWaitId = 0; - private _noReloadDelayFor: string[]; + private _addReloadDelayFor: AllSettingsKeys[]; constructor() { this._extensions = []; - this._noReloadDelayFor = [ - 'default-session-workspace', - 'default-overview', - 'allow-minimize-window', - 'follow-natural-scroll', + this._addReloadDelayFor = [ + 'touchpad-speed-scale', + 'alttab-delay', ]; } @@ -48,7 +47,7 @@ class Extension { DBusUtils.drop_proxy(); } - reload(_settings: never, key: string) { + reload(_settings: never, key: AllSettingsKeys) { if (this._reloadWaitId !== 0) { GLib.source_remove(this._reloadWaitId); this._reloadWaitId = 0; @@ -56,7 +55,7 @@ class Extension { this._reloadWaitId = GLib.timeout_add( GLib.PRIORITY_DEFAULT, - (this._noReloadDelayFor.includes(key) ? 0 : Constants.RELOAD_DELAY), + (this._addReloadDelayFor.includes(key) ? Constants.RELOAD_DELAY : 0), () => { this._disable(); this._enable(); @@ -91,12 +90,17 @@ class Extension { _initializeSettings() { if (this.settings) { - Constants.ExtSettings.DEFAULT_SESSION_WORKSPACE_GESTURE = this.settings.get_boolean('default-session-workspace'); - Constants.ExtSettings.DEFAULT_OVERVIEW_GESTURE = this.settings.get_boolean('default-overview'); - Constants.ExtSettings.ALLOW_MINIMIZE_WINDOW = this.settings.get_boolean('allow-minimize-window'); - Constants.ExtSettings.FOLLOW_NATURAL_SCROLL = this.settings.get_boolean('follow-natural-scroll'); - Constants.TouchpadConstants.SWIPE_MULTIPLIER = Constants.TouchpadConstants.DEFAULT_SWIPE_MULTIPLIER * this.settings.get_double('touchpad-speed-scale'); - Constants.AltTabConstants.DELAY_DURATION = this.settings.get_int('alttab-delay'); + ExtSettings.DEFAULT_SESSION_WORKSPACE_GESTURE = this.settings.get_boolean('default-session-workspace'); + ExtSettings.DEFAULT_OVERVIEW_GESTURE = this.settings.get_boolean('default-overview'); + ExtSettings.ALLOW_MINIMIZE_WINDOW = this.settings.get_boolean('allow-minimize-window'); + ExtSettings.FOLLOW_NATURAL_SCROLL = this.settings.get_boolean('follow-natural-scroll'); + ExtSettings.ENABLE_SHOW_DESKTOP = this.settings.get_boolean('enable-show-desktop'); + ExtSettings.ENABLE_MOVE_WINDOW_TO_WORKSPACE = this.settings.get_boolean('enable-move-window-to-workspace'); + + ExtSettings.ANIMATE_PANEL = this.settings.get_enum('animate-panel'); + + TouchpadConstants.SWIPE_MULTIPLIER = Constants.TouchpadConstants.DEFAULT_SWIPE_MULTIPLIER * this.settings.get_double('touchpad-speed-scale'); + AltTabConstants.DELAY_DURATION = this.settings.get_int('alttab-delay'); } } } diff --git a/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml b/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml index d56f495..938e8a7 100644 --- a/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml +++ b/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml @@ -1,5 +1,10 @@ + + + + + @@ -32,5 +37,17 @@ true Enable Window manipulation gesture + + true + Enable move window to workspace gesture + + + true + Enable show desktop gesture + + + 'MOVE_WINDOW' + When to animate panel + \ No newline at end of file diff --git a/extension/src/gestures.ts b/extension/src/gestures.ts index 449be69..c6e3f24 100644 --- a/extension/src/gestures.ts +++ b/extension/src/gestures.ts @@ -8,10 +8,11 @@ import { imports, global, __shell_private_types } from 'gnome-shell'; const Main = imports.ui.main; import { createSwipeTracker, TouchpadSwipeGesture } from './swipeTracker'; -import { OverviewControlsState, ExtSettings, AnimatePanel } from '../constants'; +import { OverviewControlsState, ExtSettings } from '../constants'; import { CustomEventType } from '../common/utils/clutter'; import { easeActor } from './utils/environment'; import { DummyCyclicPanel } from './holdGestures/animatePanel'; +import { AnimatePanel } from '../common/prefs'; declare interface ShallowSwipeTrackerT { orientation: Clutter.Orientation, @@ -115,7 +116,8 @@ class WorkspaceAnimationModifier extends SwipeTrackerEndPointsModifer { private _getWindowToMove(monitor: number) { const window = global.display.get_focus_window() as Meta.Window | null; - if (this._swipeTracker._touchpadGesture?.hadHoldGesture && + if (ExtSettings.ENABLE_MOVE_WINDOW_TO_WORKSPACE && + this._swipeTracker._touchpadGesture?.hadHoldGesture && window && !window.skip_taskbar && !window.is_always_on_all_workspaces() && diff --git a/extension/ui/prefs.ui b/extension/ui/prefs.ui index 97dadef..6162b4d 100644 --- a/extension/ui/prefs.ui +++ b/extension/ui/prefs.ui @@ -24,7 +24,7 @@ - start + true start center dialog-information-symbolic @@ -152,6 +152,40 @@ other gesture, if enabled, will be activated using 4-finger gesture. + + + + + + 12 + 12 + 12 + 12 + 32 + + + + start + center + 1 + 0 + Show Desktop + + + + + + end + True + center + + + + + + + + @@ -186,6 +220,40 @@ other gesture, if enabled, will be activated using 4-finger gesture. + + + + + + 12 + 12 + 12 + 12 + 32 + + + + start + center + 1 + 0 + Move window to previous/next workspace + + + + + + end + True + center + + + + + + + + @@ -478,6 +546,42 @@ other gesture, if enabled, will be activated using 4-finger gesture. + + + + + + 12 + 12 + 12 + 12 + 32 + + + + start + center + 1 + 0 + Animate panel + + + + + + + No animation + When moving a window + When moving a window or switching workspace + + + + + + + + + From dda5d187af8298cf4463cea97e1ff3ebc78cb88f Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sun, 31 Oct 2021 01:50:08 +0530 Subject: [PATCH 067/155] move skip_taskbar windows as well --- extension/src/gestures.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/extension/src/gestures.ts b/extension/src/gestures.ts index c6e3f24..a86470e 100644 --- a/extension/src/gestures.ts +++ b/extension/src/gestures.ts @@ -119,9 +119,8 @@ class WorkspaceAnimationModifier extends SwipeTrackerEndPointsModifer { if (ExtSettings.ENABLE_MOVE_WINDOW_TO_WORKSPACE && this._swipeTracker._touchpadGesture?.hadHoldGesture && window && - !window.skip_taskbar && - !window.is_always_on_all_workspaces() && window.get_monitor() === monitor && + !window.is_always_on_all_workspaces() && (!Meta.prefs_get_workspaces_only_on_primary() || monitor === Main.layoutManager.primaryMonitor.index) ) return window; From 490ca578c2c346efce57a337c13fc16cd8984a89 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sun, 31 Oct 2021 02:10:04 +0530 Subject: [PATCH 068/155] animate transient windows with show desktop gesture --- extension/src/holdGestures/showDesktop.ts | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/extension/src/holdGestures/showDesktop.ts b/extension/src/holdGestures/showDesktop.ts index 4ce07a6..5584a0a 100644 --- a/extension/src/holdGestures/showDesktop.ts +++ b/extension/src/holdGestures/showDesktop.ts @@ -94,9 +94,14 @@ export class ShowDesktopExtension implements ISubExtension { } private _getMinimizableWindows() { + const types = [Meta.WindowType.MODAL_DIALOG, Meta.WindowType.NORMAL, Meta.WindowType.DIALOG]; + if (this._workspaceManagerState === WorkspaceManagerState.DEFAULT) { this._minimizingWindows = Array.from(this._windows.keys()) - .filter(win => win.can_minimize() && !win.minimized && !win.skip_taskbar); + .filter(win => + !win.minimized && + types.includes(win.get_window_type()) && + !this._isDesktopIconExtensionWindow(win)); } this._minimizingWindows.forEach(win => { @@ -163,7 +168,6 @@ export class ShowDesktopExtension implements ISubExtension { // throw new Error('Method not implemented.'); printStack(); let has_actor = false; - let workspace_activated = false; this._minimizingWindows.forEach(win => { const value = this._windows.get(win); if (value === undefined) @@ -198,16 +202,11 @@ export class ShowDesktopExtension implements ISubExtension { value.actor.scale_y = 1; value.actor.translation_x = 0; value.actor.translation_y = 0; - - if (!workspace_activated) { - workspace_activated = true; - this._workspace?.activate(global.get_current_time()); - } }, }); }); - if (!has_actor) + if (!has_actor) this._easeOpacityDesktopWindows(255, duration); this._extensionState = ExtensionState.DEFAULT; @@ -293,6 +292,9 @@ export class ShowDesktopExtension implements ISubExtension { const [has_icon, rect] = win.get_icon_geometry(); if (has_icon) return rect; + const parent = win.get_transient_for() as Meta.Window | null; + if (parent) + return this._getMinimizedRect(parent); const box = Main.layoutManager.getWorkAreaForMonitor(win.get_monitor()); return new Meta.Rectangle({ x: box.x, From 18aa8a949cd1dd8c29fa7944ffd9fa3f3d3f7f45 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sun, 31 Oct 2021 02:13:17 +0530 Subject: [PATCH 069/155] showDesktop: Don't call minimize for transient windows --- extension/src/holdGestures/showDesktop.ts | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/extension/src/holdGestures/showDesktop.ts b/extension/src/holdGestures/showDesktop.ts index 5584a0a..51d0592 100644 --- a/extension/src/holdGestures/showDesktop.ts +++ b/extension/src/holdGestures/showDesktop.ts @@ -186,14 +186,14 @@ export class ShowDesktopExtension implements ISubExtension { onStopped: () => { if (value.actor === undefined) return; - Main.wm.skipNextEffect(value.actor); - if (endProgress === WorkspaceManagerState.DEFAULT) { - value.actor.meta_window.unminimize(); - this._minimizingWindows = []; - } - else { - value.actor.meta_window.minimize(); - value.actor.hide(); + if (win.can_minimize()) { + Main.wm.skipNextEffect(value.actor); + if (endProgress === WorkspaceManagerState.DEFAULT) + value.actor.meta_window.unminimize(); + else { + value.actor.meta_window.minimize(); + value.actor.hide(); + } } this._easeOpacityDesktopWindows(255, duration); @@ -209,6 +209,9 @@ export class ShowDesktopExtension implements ISubExtension { if (!has_actor) this._easeOpacityDesktopWindows(255, duration); + if (endProgress === WorkspaceManagerState.DEFAULT) + this._minimizingWindows = []; + this._extensionState = ExtensionState.DEFAULT; this._workspaceManagerState = endProgress; } From d07bd66db2c0d0fbefa3fd883699a674299f2404 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sun, 31 Oct 2021 03:21:06 +0530 Subject: [PATCH 070/155] make some speed adjustments --- extension/extension.ts | 7 +++++-- extension/src/gestures.ts | 8 ++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/extension/extension.ts b/extension/extension.ts index 902ca34..99934fe 100644 --- a/extension/extension.ts +++ b/extension/extension.ts @@ -7,7 +7,7 @@ import { OverviewRoundTripGestureExtension } from './src/overviewRoundTrip'; import { SnapWindowExtension } from './src/snapWindow'; import * as DBusUtils from './src/utils/dbus'; import { imports } from 'gnome-shell'; -import { AllSettingsKeys, GioSettings } from './common/prefs'; +import { AllSettingsKeys, AnimatePanel, GioSettings } from './common/prefs'; import { AltTabConstants, ExtSettings, TouchpadConstants } from './constants'; const ExtensionUtils = imports.misc.extensionUtils; @@ -97,7 +97,10 @@ class Extension { ExtSettings.ENABLE_SHOW_DESKTOP = this.settings.get_boolean('enable-show-desktop'); ExtSettings.ENABLE_MOVE_WINDOW_TO_WORKSPACE = this.settings.get_boolean('enable-move-window-to-workspace'); - ExtSettings.ANIMATE_PANEL = this.settings.get_enum('animate-panel'); + if (ExtSettings.ENABLE_MOVE_WINDOW_TO_WORKSPACE) + ExtSettings.ANIMATE_PANEL = this.settings.get_enum('animate-panel'); + else + ExtSettings.ANIMATE_PANEL = AnimatePanel.NONE; TouchpadConstants.SWIPE_MULTIPLIER = Constants.TouchpadConstants.DEFAULT_SWIPE_MULTIPLIER * this.settings.get_double('touchpad-speed-scale'); AltTabConstants.DELAY_DURATION = this.settings.get_int('alttab-delay'); diff --git a/extension/src/gestures.ts b/extension/src/gestures.ts index a86470e..03b620b 100644 --- a/extension/src/gestures.ts +++ b/extension/src/gestures.ts @@ -98,10 +98,12 @@ class WorkspaceAnimationModifier extends SwipeTrackerEndPointsModifer { Shell.ActionMode.NORMAL, Clutter.Orientation.HORIZONTAL, ExtSettings.FOLLOW_NATURAL_SCROLL, - 1 / 1.5, + 1, { allowTouch: false }, ); + this._swipeTracker.allowLongSwipes = false; + if (ExtSettings.ANIMATE_PANEL !== AnimatePanel.NONE) this._dummyCyclicPanel = new DummyCyclicPanel(); } @@ -135,6 +137,7 @@ class WorkspaceAnimationModifier extends SwipeTrackerEndPointsModifer { this._window = this._getWindowToMove(monitor); this._workspaceAnimation.movingWindow = this._window; if (this._window) { + this._swipeTracker.allowLongSwipes = true; this._extensionState = ExtensionState.MOVE_WINDOW; this._highlight = this._getWindowHighlight(); this._animateHighLight(() => { @@ -148,6 +151,7 @@ class WorkspaceAnimationModifier extends SwipeTrackerEndPointsModifer { }); } else { + this._swipeTracker.allowLongSwipes = false; this._extensionState = ExtensionState.SWITCH_WORKSPACE; if (this._swipeTracker._touchpadGesture?.followNaturalScroll !== undefined) this._swipeTracker._touchpadGesture.followNaturalScroll = ExtSettings.FOLLOW_NATURAL_SCROLL; @@ -345,7 +349,7 @@ export class GestureExtension implements ISubExtension { disableOldGesture: true, followNaturalScroll: ExtSettings.FOLLOW_NATURAL_SCROLL, modes: Shell.ActionMode.OVERVIEW, - gestureSpeed: 1 / 1.5, + gestureSpeed: 1, checkAllowedGesture: (event: CustomEventType) => { if (Main.overview._overview._controls._searchController.searchActive) { return false; From 80d75ca69880bfa17d79df0652452a626576f3d1 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sun, 31 Oct 2021 03:25:11 +0530 Subject: [PATCH 071/155] use easeActor function --- extension/common/utils/logging.ts | 2 -- extension/src/holdGestures/showDesktop.ts | 9 ++++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/extension/common/utils/logging.ts b/extension/common/utils/logging.ts index 74c5692..e681fb6 100644 --- a/extension/common/utils/logging.ts +++ b/extension/common/utils/logging.ts @@ -1,5 +1,3 @@ -declare function log(message: any): void; - export function printStack() { const stack = new Error().stack; if (stack) { diff --git a/extension/src/holdGestures/showDesktop.ts b/extension/src/holdGestures/showDesktop.ts index 51d0592..994dfb5 100644 --- a/extension/src/holdGestures/showDesktop.ts +++ b/extension/src/holdGestures/showDesktop.ts @@ -7,6 +7,7 @@ const Main = imports.ui.main; const { lerp } = imports.misc.util; import { printStack } from '../../common/utils/logging'; +import { easeActor } from '../utils/environment'; // declare enum enum WorkspaceManagerState { @@ -27,8 +28,6 @@ export class ShowDesktopExtension implements ISubExtension { start: Meta.Rectangle, end: Meta.Rectangle, actor: Meta.WindowActor, - // connectorIds: number[], - // unmaximizeId: number, }>>(); private _workspace?: Meta.Workspace; @@ -176,7 +175,7 @@ export class ShowDesktopExtension implements ISubExtension { return; has_actor = true; - (value.actor as any).ease({ + easeActor(value.actor, { scale_x: lerp(1, value.end.width / value.start.width, -endProgress), scale_y: lerp(1, value.end.height / value.start.height, -endProgress), translation_x: lerp(0, value.end.x - value.start.x, -endProgress), @@ -222,7 +221,7 @@ export class ShowDesktopExtension implements ISubExtension { log(`resetting state: ${win.title}`); if (!this._windows.has(win)) return; - const onStopped = (isFinished: boolean) => { + const onStopped = (isFinished?: boolean) => { log('animate complete: ' + isFinished); Main.wm.skipNextEffect(win.get_compositor_private()); win.unminimize(); @@ -232,7 +231,7 @@ export class ShowDesktopExtension implements ISubExtension { log('animatine + ' + win.title); actor.show(); actor.opacity = 0; - (actor as any).ease({ + easeActor(actor, { opacity: 255, duration: 500, mode: Clutter.AnimationMode.EASE_OUT_QUAD, From 368d7ad4c1ea2858919299d78025f5eebc398e5a Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sun, 31 Oct 2021 03:36:14 +0530 Subject: [PATCH 072/155] workspace-gestures: reset state early on end this is to ensure all quick swipes in succession recognised properly --- extension/src/gestures.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/extension/src/gestures.ts b/extension/src/gestures.ts index 03b620b..455480c 100644 --- a/extension/src/gestures.ts +++ b/extension/src/gestures.ts @@ -220,6 +220,8 @@ class WorkspaceAnimationModifier extends SwipeTrackerEndPointsModifer { if (this._extensionState & ExtensionState.ANIMATE_PANEL) this._dummyCyclicPanel?.endGesture(endProgress, duration); + + this._extensionState = ExtensionState.DEFAULT; } private _getWindowHighlight() { From 00b0dc12fd9a9b84f3b2d05c60e7b9d591356e65 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sun, 31 Oct 2021 18:35:14 +0530 Subject: [PATCH 073/155] move-window: hack to ignore desktop icon's windows --- extension/src/gestures.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/extension/src/gestures.ts b/extension/src/gestures.ts index 455480c..79ea41b 100644 --- a/extension/src/gestures.ts +++ b/extension/src/gestures.ts @@ -117,10 +117,15 @@ class WorkspaceAnimationModifier extends SwipeTrackerEndPointsModifer { } private _getWindowToMove(monitor: number) { + const types = [Meta.WindowType.MODAL_DIALOG, Meta.WindowType.NORMAL, Meta.WindowType.DIALOG]; + const window = global.display.get_focus_window() as Meta.Window | null; if (ExtSettings.ENABLE_MOVE_WINDOW_TO_WORKSPACE && this._swipeTracker._touchpadGesture?.hadHoldGesture && window && + types.includes(window.get_window_type()) && + // ignore window is it's skipbar and type is normal + (!window.skip_taskbar || window.get_window_type() !== Meta.WindowType.NORMAL) && window.get_monitor() === monitor && !window.is_always_on_all_workspaces() && (!Meta.prefs_get_workspaces_only_on_primary() || monitor === Main.layoutManager.primaryMonitor.index) From 12a70f6737bf3b8314373202192eaf99549177a0 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Mon, 1 Nov 2021 12:05:56 +0530 Subject: [PATCH 074/155] overview-gestures: disable allow long swipes This is to make easier to animate panel on endgesture --- extension/src/gestures.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/extension/src/gestures.ts b/extension/src/gestures.ts index 79ea41b..a2cad43 100644 --- a/extension/src/gestures.ts +++ b/extension/src/gestures.ts @@ -102,8 +102,6 @@ class WorkspaceAnimationModifier extends SwipeTrackerEndPointsModifer { { allowTouch: false }, ); - this._swipeTracker.allowLongSwipes = false; - if (ExtSettings.ANIMATE_PANEL !== AnimatePanel.NONE) this._dummyCyclicPanel = new DummyCyclicPanel(); } @@ -142,7 +140,6 @@ class WorkspaceAnimationModifier extends SwipeTrackerEndPointsModifer { this._window = this._getWindowToMove(monitor); this._workspaceAnimation.movingWindow = this._window; if (this._window) { - this._swipeTracker.allowLongSwipes = true; this._extensionState = ExtensionState.MOVE_WINDOW; this._highlight = this._getWindowHighlight(); this._animateHighLight(() => { @@ -156,7 +153,6 @@ class WorkspaceAnimationModifier extends SwipeTrackerEndPointsModifer { }); } else { - this._swipeTracker.allowLongSwipes = false; this._extensionState = ExtensionState.SWITCH_WORKSPACE; if (this._swipeTracker._touchpadGesture?.followNaturalScroll !== undefined) this._swipeTracker._touchpadGesture.followNaturalScroll = ExtSettings.FOLLOW_NATURAL_SCROLL; From 696cfca7cf4e0d63a37708efe3010dfb09953d48 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sun, 7 Nov 2021 19:09:28 +0530 Subject: [PATCH 075/155] move-window: don't move fullscreen window --- extension/src/gestures.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/extension/src/gestures.ts b/extension/src/gestures.ts index a2cad43..a4905f0 100644 --- a/extension/src/gestures.ts +++ b/extension/src/gestures.ts @@ -121,6 +121,7 @@ class WorkspaceAnimationModifier extends SwipeTrackerEndPointsModifer { if (ExtSettings.ENABLE_MOVE_WINDOW_TO_WORKSPACE && this._swipeTracker._touchpadGesture?.hadHoldGesture && window && + !window.is_fullscreen() && types.includes(window.get_window_type()) && // ignore window is it's skipbar and type is normal (!window.skip_taskbar || window.get_window_type() !== Meta.WindowType.NORMAL) && From 0780f19bc4a02830ab660b1aa4f339ec7144cf01 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Wed, 10 Nov 2021 05:20:07 +0530 Subject: [PATCH 076/155] Add package-lock.json file --- .gitignore | 3 +- package-lock.json | 3709 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 3710 insertions(+), 2 deletions(-) create mode 100644 package-lock.json diff --git a/.gitignore b/.gitignore index 85191cc..16d8d68 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ build/ -node_modules/ -package-lock.json \ No newline at end of file +node_modules/ \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..c3da252 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,3709 @@ +{ + "name": "gnome-gestures", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "gnome-gestures", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "fs": "0.0.1-security", + "glob": "^7.2.0", + "path": "^0.12.7", + "typescript": "^4.4.4", + "yargs": "^17.2.1" + }, + "devDependencies": { + "@gi-types/clutter8": "^8.0.0", + "@gi-types/gio2": "^2.68.0", + "@gi-types/gjs-environment": "^1.0.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0", + "@gi-types/gtk4": "^4.2.0", + "@gi-types/meta8": "^8.0.0", + "@gi-types/shell0": "^0.1.0", + "@gi-types/st1": "^1.0.0", + "@types/glob": "^7.2.0", + "@types/node": "^16.11.4", + "@types/yargs": "^17.0.4", + "@typescript-eslint/eslint-plugin": "^5.1.0", + "@typescript-eslint/parser": "^5.1.0", + "eslint": "^8.1.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.3.tgz", + "integrity": "sha512-DHI1wDPoKCBPoLZA3qDR91+3te/wDSc1YhKg3jR8NxKKRJq2hwHwcWv31cSwSYvIBrmbENoYMWcenW8uproQqg==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.0.0", + "globals": "^13.9.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/@eslint/eslintrc/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@gi-types/atk1": { + "version": "2.36.0", + "resolved": "https://registry.npmjs.org/@gi-types/atk1/-/atk1-2.36.0.tgz", + "integrity": "sha512-lCuoaJwqFDV+V+sf4mOcciLCJitiUsGNg/W2Q5Y+21FycPZqlsjgXb0pimo7gLdq11d1lEfHffh3AkY80+7SHw==", + "dev": true, + "dependencies": { + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0" + } + }, + "node_modules/@gi-types/cairo1": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/cairo1/-/cairo1-1.0.0.tgz", + "integrity": "sha512-EURdj33wnPbspWDOyHc2yNmzqnUaDJ+ix6paIooffuPyOKLer+M/+eBFcou6X3j8o6CZvH4D/dguoi3gNzsTQw==", + "dev": true, + "dependencies": { + "@gi-types/gobject2": "^2.68.0" + } + }, + "node_modules/@gi-types/cally8": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/cally8/-/cally8-8.0.0.tgz", + "integrity": "sha512-HRopQhj9JJtNdNepyVa+UfXgVj6MqJC/4Gl3AbVfPUJtoWegi6G7mUGL8LJO9897+tLaJkgtQ7+LKUwsgNOjaw==", + "dev": true, + "dependencies": { + "@gi-types/atk1": "^2.36.0", + "@gi-types/clutter8": "^8.0.0", + "@gi-types/gobject2": "^2.68.0" + } + }, + "node_modules/@gi-types/clutter8": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/clutter8/-/clutter8-8.0.0.tgz", + "integrity": "sha512-hKTNjn1j5gxc/iNkiIPbsh0uE9COC6qPIpG7yzAsr7/khSil8hIJKYvBtNOu1BAnSe7D8gTCKjqgXBqyoFSHkw==", + "dev": true, + "dependencies": { + "@gi-types/atk1": "^2.36.0", + "@gi-types/cairo1": "^1.0.0", + "@gi-types/cogl8": "^8.0.0", + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0", + "@gi-types/graphene1": "^1.0.0", + "@gi-types/json1": "^1.6.0", + "@gi-types/pango1": "^1.0.0" + } + }, + "node_modules/@gi-types/cogl8": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/cogl8/-/cogl8-8.0.0.tgz", + "integrity": "sha512-MsKbP3DjRhbbY+jLCbjd7B8wycMwGkNbopStVkIW9EVkJouy2VdIShLFD44WW51GugdE4+JAeW3iQ2H9rtp5WQ==", + "dev": true, + "dependencies": { + "@gi-types/cairo1": "^1.0.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0", + "@gi-types/graphene1": "^1.0.0" + } + }, + "node_modules/@gi-types/gck1": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/gck1/-/gck1-1.0.0.tgz", + "integrity": "sha512-MZOJt+9AFiMCAcvi4aIwLCJxqpUrVQTjnLfncK5+52q6Tap6Pw5nMj5RVg5ks6BGL9F2I4BO4689m/TqYlJ8QA==", + "dev": true, + "dependencies": { + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0" + } + }, + "node_modules/@gi-types/gcr3": { + "version": "3.40.0", + "resolved": "https://registry.npmjs.org/@gi-types/gcr3/-/gcr3-3.40.0.tgz", + "integrity": "sha512-bgEq++sDcq+8VHFcURCX983/8ifANy9T5LawOiXrN5VVgul7UtO9E+17D1ffiVgQvl2vk13yedN3oboouVG7lg==", + "dev": true, + "dependencies": { + "@gi-types/gck1": "^1.0.0", + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0" + } + }, + "node_modules/@gi-types/gdesktopenums3": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/gdesktopenums3/-/gdesktopenums3-3.0.0.tgz", + "integrity": "sha512-++nr84oT0UU5SQTBGkAkJO+SKGOYkav2p87J3zKM3Ksr1Obrt6C1lMOgnCBv9LaxA8KQKQyH1a8diZV8eYssYQ==", + "dev": true, + "dependencies": { + "@gi-types/gobject2": "^2.68.0" + } + }, + "node_modules/@gi-types/gdk3": { + "version": "3.24.0", + "resolved": "https://registry.npmjs.org/@gi-types/gdk3/-/gdk3-3.24.0.tgz", + "integrity": "sha512-Cp15QJwepyn9xRtzZDDmyF89VpXdxePTa9GeSE5C1iPH9QFQXxHMs37RCCAjgq3pgGbc3v6AkjLsleYGv0LYwg==", + "dev": true, + "dependencies": { + "@gi-types/cairo1": "^1.0.0", + "@gi-types/gdkpixbuf2": "^2.0.0", + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0", + "@gi-types/pango1": "^1.0.0" + } + }, + "node_modules/@gi-types/gdk4": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/gdk4/-/gdk4-4.0.0.tgz", + "integrity": "sha512-rlBQByuGyszxPcjzUE945+8b+psrlAtnG25EaBZsthNG6ZPZ0AI2Gflezg/Lzfz3HVJadr/faZnGrQhk1JtxQw==", + "dev": true, + "dependencies": { + "@gi-types/cairo1": "^1.0.0", + "@gi-types/gdkpixbuf2": "^2.0.0", + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0", + "@gi-types/pango1": "^1.0.0" + } + }, + "node_modules/@gi-types/gdkpixbuf2": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/gdkpixbuf2/-/gdkpixbuf2-2.0.0.tgz", + "integrity": "sha512-8oSX5p09U1JwoNvo8s+OPTsUn6n4K7lkKVa8LC12VxL1z9csI63zmQ4LVHmL54+PQDkVjZGM/zNnV0aHerO2Tw==", + "dev": true, + "dependencies": { + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gmodule2": "^2.0.0", + "@gi-types/gobject2": "^2.68.0" + } + }, + "node_modules/@gi-types/gio2": { + "version": "2.68.0", + "resolved": "https://registry.npmjs.org/@gi-types/gio2/-/gio2-2.68.0.tgz", + "integrity": "sha512-VEjaLR96r9HOqf9YfVN4tAVeCAIqccoOz2KUJyqj3Ha/GABBilEucJUr7VK7t2Vogtlp7VyqdSa2AilORqPg1A==", + "dev": true, + "dependencies": { + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0" + } + }, + "node_modules/@gi-types/gjs-environment": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/gjs-environment/-/gjs-environment-1.0.0.tgz", + "integrity": "sha512-UD4cGWT5rgYormf+P5cd/Wqk3VsAKNuclCPtXXSuglpGkwKdJp0hcxz3Ohpwe0+9rOG0xs6sNAJgtpR/uwk4NA==", + "dev": true, + "dependencies": { + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0" + } + }, + "node_modules/@gi-types/glib2": { + "version": "2.68.0", + "resolved": "https://registry.npmjs.org/@gi-types/glib2/-/glib2-2.68.0.tgz", + "integrity": "sha512-xm0VaFsL3YbjmwgiWFMX/yX/nxKu1xXsSY7pnHL7T5bQcb28oNCfWBH1Rhlx6wjL7DR2mQjX5owbaA5ZXUFLHQ==", + "dev": true, + "dependencies": { + "@gi-types/gobject2": "^2.68.0" + } + }, + "node_modules/@gi-types/gmodule2": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/gmodule2/-/gmodule2-2.0.0.tgz", + "integrity": "sha512-Wnn3CImVWdJbAU2dqeCa7ieFEtxhcCyZVR2d6QHOrFngKBZqDnUqw35mv9mUjp48D5B3kS1QuCszvUZ8VSeHcA==", + "dev": true, + "dependencies": { + "@gi-types/gobject2": "^2.68.0" + } + }, + "node_modules/@gi-types/gobject2": { + "version": "2.68.0", + "resolved": "https://registry.npmjs.org/@gi-types/gobject2/-/gobject2-2.68.0.tgz", + "integrity": "sha512-Ka/vZnb+VLg68eNJ6rnkU6qjqupnpPjq8JFmJsdUsMyZPV9WTG7YOKiAZBQ3BfSO5LsiDdAyVWfU7OHu//So0Q==", + "dev": true, + "dependencies": { + "@gi-types/glib2": "^2.68.0" + } + }, + "node_modules/@gi-types/graphene1": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/graphene1/-/graphene1-1.0.0.tgz", + "integrity": "sha512-C3vM6xLBc/P4yMCVYQDtW04OaLrbesXDR+TN5XQuwWXOchDJIky3cSCOdBw8ZdWHFELz8WRc0yEAIQTqCKVEnQ==", + "dev": true, + "dependencies": { + "@gi-types/gobject2": "^2.68.0" + } + }, + "node_modules/@gi-types/gsk4": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/gsk4/-/gsk4-4.0.0.tgz", + "integrity": "sha512-fO6YCSU5ck05PNqB6zSUNjGev++4iziujZmeAaMqqSFt3eNoZNy38hGdljnB2+Y1691fOQgsVY35J0yZzZyNGg==", + "dev": true, + "dependencies": { + "@gi-types/cairo1": "^1.0.0", + "@gi-types/gdk4": "^4.0.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0", + "@gi-types/graphene1": "^1.0.0", + "@gi-types/pango1": "^1.0.0" + } + }, + "node_modules/@gi-types/gtk3": { + "version": "3.24.0", + "resolved": "https://registry.npmjs.org/@gi-types/gtk3/-/gtk3-3.24.0.tgz", + "integrity": "sha512-D3EKqE+hcltQAGrFGry2X4zaLUYwCMr/7mym6oq78mF5hM2DSoUnDA9qfTYLImqQ//8fs9rBe4HPSXeYcHoNLg==", + "dev": true, + "dependencies": { + "@gi-types/atk1": "^2.36.0", + "@gi-types/cairo1": "^1.0.0", + "@gi-types/gdk3": "^3.24.0", + "@gi-types/gdkpixbuf2": "^2.0.0", + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0", + "@gi-types/pango1": "^1.0.0", + "@gi-types/xlib2": "^2.0.0" + } + }, + "node_modules/@gi-types/gtk4": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@gi-types/gtk4/-/gtk4-4.2.0.tgz", + "integrity": "sha512-YYwzQLRZXOYL6wXy7l3YjLBR2mUVyLAz5gXUBjdSgMtERLKPWpPepZdJ2zoztmdSO8Sfn2CG1rTZhuF73cQtsQ==", + "dev": true, + "dependencies": { + "@gi-types/cairo1": "^1.0.0", + "@gi-types/gdk4": "^4.0.0", + "@gi-types/gdkpixbuf2": "^2.0.0", + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0", + "@gi-types/graphene1": "^1.0.0", + "@gi-types/gsk4": "^4.0.0", + "@gi-types/pango1": "^1.0.0" + } + }, + "node_modules/@gi-types/harfbuzz2": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/@gi-types/harfbuzz2/-/harfbuzz2-2.8.1.tgz", + "integrity": "sha512-XeobP2BuLuF5xyxCd2WqxlnUSqhwFED3mJQ7JTcWvKd59BR0tWK1Qd+v7OOcYHdUFYS2Y1+EibfhR7hOH7TZCA==", + "dev": true, + "dependencies": { + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0" + } + }, + "node_modules/@gi-types/json1": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@gi-types/json1/-/json1-1.6.0.tgz", + "integrity": "sha512-qqnqOb+lAkVs0BGAFolAd8SP2NBu0gnaSzECjzWxsjK5VLxd5uYDv6ChDjTW8bhgLWJ9vtG3HQAvsd0O6kU4XQ==", + "dev": true, + "dependencies": { + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0" + } + }, + "node_modules/@gi-types/meta8": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/meta8/-/meta8-8.0.0.tgz", + "integrity": "sha512-YNqE3BXmpG4N/yQMAt7z2W7mODiDG3dgki0MeGBCVh65uTpYS2E6hVwqlAk9K8B0zSSxy4IiSG9bAu5znkJ60A==", + "dev": true, + "dependencies": { + "@gi-types/atk1": "^2.36.0", + "@gi-types/cairo1": "^1.0.0", + "@gi-types/clutter8": "^8.0.0", + "@gi-types/cogl8": "^8.0.0", + "@gi-types/gdesktopenums3": "^3.0.0", + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0", + "@gi-types/graphene1": "^1.0.0", + "@gi-types/gtk3": "^3.24.0", + "@gi-types/json1": "^1.6.0", + "@gi-types/pango1": "^1.0.0", + "@gi-types/xfixes4": "^4.0.0", + "@gi-types/xlib2": "^2.0.0" + } + }, + "node_modules/@gi-types/nm1": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/@gi-types/nm1/-/nm1-1.32.0.tgz", + "integrity": "sha512-TPF9iVP2eZR+z0hw1vFvl7ae7hmPE04mpLaoEYfpH65wW/3ldZ8G72AryKu86zMQ99BEwGU7aplA3gCfPFGI0w==", + "dev": true, + "dependencies": { + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0" + } + }, + "node_modules/@gi-types/pango1": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/pango1/-/pango1-1.0.0.tgz", + "integrity": "sha512-ZDYC0tW+SNUjrjxGSEIJo8oPLlpz+WwvwRH2d0mTTX3p2SuQNV7rkYjdR0L2uAuD15NBe7mM6wvLcxJ2WZurGg==", + "dev": true, + "dependencies": { + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0", + "@gi-types/harfbuzz2": "^2.8.1" + } + }, + "node_modules/@gi-types/polkit1": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/polkit1/-/polkit1-1.0.0.tgz", + "integrity": "sha512-2yQ0btuZXU6ajMgUccIrEQSkE9SUNyL3EbbQ0FkpkJIGMl+c531iXlppVXbNVfovNw6lrVuOHQCaPMH7UJoBpA==", + "dev": true, + "dependencies": { + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0" + } + }, + "node_modules/@gi-types/polkitagent1": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/polkitagent1/-/polkitagent1-1.0.0.tgz", + "integrity": "sha512-7dT5BqG9cJk9SEuTnq7BKxa36U20RqFY7udA5OrLuPudrHxIG/fkRAY5+DgVKjVGtp+DO5T2IlYBGDqyQyk3Cg==", + "dev": true, + "dependencies": { + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0", + "@gi-types/polkit1": "^1.0.0" + } + }, + "node_modules/@gi-types/shell0": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@gi-types/shell0/-/shell0-0.1.0.tgz", + "integrity": "sha512-YoAWAN+Icja2sbR+2jJivofvo9zyRQTHijAZMaFX+neZfCokA5X7f0U3iXH3nFBmMYLJcasRiaOMMOU1k1sX7A==", + "dev": true, + "dependencies": { + "@gi-types/atk1": "^2.36.0", + "@gi-types/cairo1": "^1.0.0", + "@gi-types/clutter8": "^8.0.0", + "@gi-types/cogl8": "^8.0.0", + "@gi-types/gcr3": "^3.40.0", + "@gi-types/gdkpixbuf2": "^2.0.0", + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0", + "@gi-types/gtk3": "^3.24.0", + "@gi-types/meta8": "^8.0.0", + "@gi-types/nm1": "^1.32.0", + "@gi-types/polkitagent1": "^1.0.0", + "@gi-types/st1": "^1.0.0" + } + }, + "node_modules/@gi-types/st1": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/st1/-/st1-1.0.0.tgz", + "integrity": "sha512-/61lxOuLfLWVSpjFI6mRNGFfNKf5SbTDIOo1z67e5d7yyUGeqrYlPrFaPm8e0usaA3JolucmPnR6RyXvn2Txlw==", + "dev": true, + "dependencies": { + "@gi-types/atk1": "^2.36.0", + "@gi-types/cairo1": "^1.0.0", + "@gi-types/cally8": "^8.0.0", + "@gi-types/clutter8": "^8.0.0", + "@gi-types/cogl8": "^8.0.0", + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0", + "@gi-types/json1": "^1.6.0", + "@gi-types/pango1": "^1.0.0" + } + }, + "node_modules/@gi-types/xfixes4": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/xfixes4/-/xfixes4-4.0.0.tgz", + "integrity": "sha512-NYIHJ8fP2rawTN7Yhf5HJ1RQBBeiYHJcYXH7GNTkHwChJIThbt1CsEfW8s9x7PzgXm0FIPoEdaRRdWEhhwBWtg==", + "dev": true, + "dependencies": { + "@gi-types/gobject2": "^2.68.0" + } + }, + "node_modules/@gi-types/xlib2": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/xlib2/-/xlib2-2.0.0.tgz", + "integrity": "sha512-wFeKKC104EUj6h3HsAIBMUSCZYgphZgNARy4NUWfbjLF0Mx+N84PgzAcUgrWsbrxXKappsZ3mqZfPvdtea948A==", + "dev": true, + "dependencies": { + "@gi-types/gobject2": "^2.68.0" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.6.0.tgz", + "integrity": "sha512-JQlEKbcgEUjBFhLIF4iqM7u/9lwgHRBcpHrmUNCALK0Q3amXN6lxdoXLnF0sm11E9VqTmBALR87IlUg1bZ8A9A==", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^1.2.0", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.0.tgz", + "integrity": "sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w==", + "dev": true + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@types/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==", + "dev": true, + "dependencies": { + "@types/minimatch": "*", + "@types/node": "*" + } + }, + "node_modules/@types/json-schema": { + "version": "7.0.9", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", + "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", + "dev": true + }, + "node_modules/@types/minimatch": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz", + "integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==", + "dev": true + }, + "node_modules/@types/node": { + "version": "16.11.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.4.tgz", + "integrity": "sha512-TMgXmy0v2xWyuCSCJM6NCna2snndD8yvQF67J29ipdzMcsPa9u+o0tjF5+EQNdhcuZplYuouYqpc4zcd5I6amQ==", + "dev": true + }, + "node_modules/@types/yargs": { + "version": "17.0.4", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.4.tgz", + "integrity": "sha512-D/wihO9WFYqwsmJI0e0qS+U09wIQtYRSBJlXWjTFGjouEuOCy0BU4N/ZK5utb00S5lW/9LO7vOpvGDd8M06NvQ==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "20.2.1", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-20.2.1.tgz", + "integrity": "sha512-7tFImggNeNBVMsn0vLrpn1H1uPrUBdnARPTpZoitY37ZrdJREzf7I16tMrlK3hen349gr1NYh8CmZQa7CTG6Aw==", + "dev": true + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.1.0.tgz", + "integrity": "sha512-bekODL3Tqf36Yz8u+ilha4zGxL9mdB6LIsIoMAvvC5FAuWo4NpZYXtCbv7B2CeR1LhI/lLtLk+q4tbtxuoVuCg==", + "dev": true, + "dependencies": { + "@typescript-eslint/experimental-utils": "5.1.0", + "@typescript-eslint/scope-manager": "5.1.0", + "debug": "^4.3.2", + "functional-red-black-tree": "^1.0.1", + "ignore": "^5.1.8", + "regexpp": "^3.2.0", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^5.0.0", + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "5.1.8", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", + "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/@typescript-eslint/experimental-utils": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.1.0.tgz", + "integrity": "sha512-ovE9qUiZMOMgxQAESZsdBT+EXIfx/YUYAbwGUI6V03amFdOOxI9c6kitkgRvLkJaLusgMZ2xBhss+tQ0Y1HWxA==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.9", + "@typescript-eslint/scope-manager": "5.1.0", + "@typescript-eslint/types": "5.1.0", + "@typescript-eslint/typescript-estree": "5.1.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "*" + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.1.0.tgz", + "integrity": "sha512-vx1P+mhCtYw3+bRHmbalq/VKP2Y3gnzNgxGxfEWc6OFpuEL7iQdAeq11Ke3Rhy8NjgB+AHsIWEwni3e+Y7djKA==", + "dev": true, + "dependencies": { + "@typescript-eslint/scope-manager": "5.1.0", + "@typescript-eslint/types": "5.1.0", + "@typescript-eslint/typescript-estree": "5.1.0", + "debug": "^4.3.2" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.1.0.tgz", + "integrity": "sha512-yYlyVjvn5lvwCL37i4hPsa1s0ORsjkauhTqbb8MnpvUs7xykmcjGqwlNZ2Q5QpoqkJ1odlM2bqHqJwa28qV6Tw==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.1.0", + "@typescript-eslint/visitor-keys": "5.1.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.1.0.tgz", + "integrity": "sha512-sEwNINVxcB4ZgC6Fe6rUyMlvsB2jvVdgxjZEjQUQVlaSPMNamDOwO6/TB98kFt4sYYfNhdhTPBEQqNQZjMMswA==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.1.0.tgz", + "integrity": "sha512-SSz+l9YrIIsW4s0ZqaEfnjl156XQ4VRmJsbA0ZE1XkXrD3cRpzuZSVCyqeCMR3EBjF27IisWakbBDGhGNIOvfQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.1.0", + "@typescript-eslint/visitor-keys": "5.1.0", + "debug": "^4.3.2", + "globby": "^11.0.4", + "is-glob": "^4.0.3", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.1.0.tgz", + "integrity": "sha512-uqNXepKBg81JVwjuqAxYrXa1Ql/YDzM+8g/pS+TCPxba0wZttl8m5DkrasbfnmJGHs4lQ2jTbcZ5azGhI7kK+w==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.1.0", + "eslint-visitor-keys": "^3.0.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/acorn": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.5.0.tgz", + "integrity": "sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dev": true, + "dependencies": { + "ansi-colors": "^4.1.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.1.0.tgz", + "integrity": "sha512-JZvNneArGSUsluHWJ8g8MMs3CfIEzwaLx9KyH4tZ2i+R2/rPWzL8c0zg3rHdwYVpN/1sB9gqnjHwz9HoeJpGHw==", + "dev": true, + "dependencies": { + "@eslint/eslintrc": "^1.0.3", + "@humanwhocodes/config-array": "^0.6.0", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "enquirer": "^2.3.5", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^6.0.0", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.0.0", + "espree": "^9.0.0", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^6.0.1", + "globals": "^13.6.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "progress": "^2.0.0", + "regexpp": "^3.2.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^2.0.0" + }, + "engines": { + "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=5" + } + }, + "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.0.0.tgz", + "integrity": "sha512-mJOZa35trBTb3IyRmo8xmKBZlxf+N7OnUl4+ZhJHs/r+0770Wh/LEACE2pqMGMe27G/4y8P2bYGk4J70IC5k1Q==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/eslint/node_modules/eslint-scope": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-6.0.0.tgz", + "integrity": "sha512-uRDL9MWmQCkaFus8RF5K9/L/2fn+80yoW3jkD53l4shjCh26fCtvJGasxjUqP5OT87SYTxCVA3BwTUzuELx9kA==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/eslint/node_modules/estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/espree": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.0.0.tgz", + "integrity": "sha512-r5EQJcYZ2oaGbeR0jR0fFVijGOcwai07/690YRXLINuhmVeRY4UKSAsQPe/0BNuDgwP7Ophoc1PRsr2E3tkbdQ==", + "dev": true, + "dependencies": { + "acorn": "^8.5.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^3.0.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esquery": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esquery/node_modules/estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse/node_modules/estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-glob": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.7.tgz", + "integrity": "sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "node_modules/fastq": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "dependencies": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.2.tgz", + "integrity": "sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA==", + "dev": true + }, + "node_modules/fs": { + "version": "0.0.1-security", + "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", + "integrity": "sha1-invTcYa23d84E/I4WLV+yq9eQdQ=" + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "node_modules/functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "13.11.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.11.0.tgz", + "integrity": "sha512-08/xrJ7wQjK9kkkRoI3OFUBbLx4f+6x3SGwcPvQ0QH6goFDrOU2oyAWrmh3dJezu65buo+HBMzAMQy6rovVC3g==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globby": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz", + "integrity": "sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==", + "dev": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.1.1", + "ignore": "^5.1.4", + "merge2": "^1.3.0", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globby/node_modules/ignore": { + "version": "5.1.8", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", + "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "dev": true, + "dependencies": { + "braces": "^3.0.1", + "picomatch": "^2.2.3" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/path": { + "version": "0.12.7", + "resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz", + "integrity": "sha1-1NwqUGxM4hl+tIHr/NWzbAFAsQ8=", + "dependencies": { + "process": "^0.11.1", + "util": "^0.10.3" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/picomatch": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/regexpp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "dependencies": { + "tslib": "^1.8.1" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typescript": { + "version": "4.4.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.4.tgz", + "integrity": "sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA==", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/util": { + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", + "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", + "dependencies": { + "inherits": "2.0.3" + } + }, + "node_modules/util/node_modules/inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "node_modules/v8-compile-cache": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", + "dev": true + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/yargs": { + "version": "17.2.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.2.1.tgz", + "integrity": "sha512-XfR8du6ua4K6uLGm5S6fA+FIJom/MdJcFNVY8geLlp2v8GYbOXD4EB1tPNZsRn4vBzKGMgb5DRZMeWuFc2GO8Q==", + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "engines": { + "node": ">=10" + } + } + }, + "dependencies": { + "@eslint/eslintrc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.3.tgz", + "integrity": "sha512-DHI1wDPoKCBPoLZA3qDR91+3te/wDSc1YhKg3jR8NxKKRJq2hwHwcWv31cSwSYvIBrmbENoYMWcenW8uproQqg==", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.0.0", + "globals": "^13.9.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + } + } + }, + "@gi-types/atk1": { + "version": "2.36.0", + "resolved": "https://registry.npmjs.org/@gi-types/atk1/-/atk1-2.36.0.tgz", + "integrity": "sha512-lCuoaJwqFDV+V+sf4mOcciLCJitiUsGNg/W2Q5Y+21FycPZqlsjgXb0pimo7gLdq11d1lEfHffh3AkY80+7SHw==", + "dev": true, + "requires": { + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0" + } + }, + "@gi-types/cairo1": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/cairo1/-/cairo1-1.0.0.tgz", + "integrity": "sha512-EURdj33wnPbspWDOyHc2yNmzqnUaDJ+ix6paIooffuPyOKLer+M/+eBFcou6X3j8o6CZvH4D/dguoi3gNzsTQw==", + "dev": true, + "requires": { + "@gi-types/gobject2": "^2.68.0" + } + }, + "@gi-types/cally8": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/cally8/-/cally8-8.0.0.tgz", + "integrity": "sha512-HRopQhj9JJtNdNepyVa+UfXgVj6MqJC/4Gl3AbVfPUJtoWegi6G7mUGL8LJO9897+tLaJkgtQ7+LKUwsgNOjaw==", + "dev": true, + "requires": { + "@gi-types/atk1": "^2.36.0", + "@gi-types/clutter8": "^8.0.0", + "@gi-types/gobject2": "^2.68.0" + } + }, + "@gi-types/clutter8": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/clutter8/-/clutter8-8.0.0.tgz", + "integrity": "sha512-hKTNjn1j5gxc/iNkiIPbsh0uE9COC6qPIpG7yzAsr7/khSil8hIJKYvBtNOu1BAnSe7D8gTCKjqgXBqyoFSHkw==", + "dev": true, + "requires": { + "@gi-types/atk1": "^2.36.0", + "@gi-types/cairo1": "^1.0.0", + "@gi-types/cogl8": "^8.0.0", + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0", + "@gi-types/graphene1": "^1.0.0", + "@gi-types/json1": "^1.6.0", + "@gi-types/pango1": "^1.0.0" + } + }, + "@gi-types/cogl8": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/cogl8/-/cogl8-8.0.0.tgz", + "integrity": "sha512-MsKbP3DjRhbbY+jLCbjd7B8wycMwGkNbopStVkIW9EVkJouy2VdIShLFD44WW51GugdE4+JAeW3iQ2H9rtp5WQ==", + "dev": true, + "requires": { + "@gi-types/cairo1": "^1.0.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0", + "@gi-types/graphene1": "^1.0.0" + } + }, + "@gi-types/gck1": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/gck1/-/gck1-1.0.0.tgz", + "integrity": "sha512-MZOJt+9AFiMCAcvi4aIwLCJxqpUrVQTjnLfncK5+52q6Tap6Pw5nMj5RVg5ks6BGL9F2I4BO4689m/TqYlJ8QA==", + "dev": true, + "requires": { + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0" + } + }, + "@gi-types/gcr3": { + "version": "3.40.0", + "resolved": "https://registry.npmjs.org/@gi-types/gcr3/-/gcr3-3.40.0.tgz", + "integrity": "sha512-bgEq++sDcq+8VHFcURCX983/8ifANy9T5LawOiXrN5VVgul7UtO9E+17D1ffiVgQvl2vk13yedN3oboouVG7lg==", + "dev": true, + "requires": { + "@gi-types/gck1": "^1.0.0", + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0" + } + }, + "@gi-types/gdesktopenums3": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/gdesktopenums3/-/gdesktopenums3-3.0.0.tgz", + "integrity": "sha512-++nr84oT0UU5SQTBGkAkJO+SKGOYkav2p87J3zKM3Ksr1Obrt6C1lMOgnCBv9LaxA8KQKQyH1a8diZV8eYssYQ==", + "dev": true, + "requires": { + "@gi-types/gobject2": "^2.68.0" + } + }, + "@gi-types/gdk3": { + "version": "3.24.0", + "resolved": "https://registry.npmjs.org/@gi-types/gdk3/-/gdk3-3.24.0.tgz", + "integrity": "sha512-Cp15QJwepyn9xRtzZDDmyF89VpXdxePTa9GeSE5C1iPH9QFQXxHMs37RCCAjgq3pgGbc3v6AkjLsleYGv0LYwg==", + "dev": true, + "requires": { + "@gi-types/cairo1": "^1.0.0", + "@gi-types/gdkpixbuf2": "^2.0.0", + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0", + "@gi-types/pango1": "^1.0.0" + } + }, + "@gi-types/gdk4": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/gdk4/-/gdk4-4.0.0.tgz", + "integrity": "sha512-rlBQByuGyszxPcjzUE945+8b+psrlAtnG25EaBZsthNG6ZPZ0AI2Gflezg/Lzfz3HVJadr/faZnGrQhk1JtxQw==", + "dev": true, + "requires": { + "@gi-types/cairo1": "^1.0.0", + "@gi-types/gdkpixbuf2": "^2.0.0", + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0", + "@gi-types/pango1": "^1.0.0" + } + }, + "@gi-types/gdkpixbuf2": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/gdkpixbuf2/-/gdkpixbuf2-2.0.0.tgz", + "integrity": "sha512-8oSX5p09U1JwoNvo8s+OPTsUn6n4K7lkKVa8LC12VxL1z9csI63zmQ4LVHmL54+PQDkVjZGM/zNnV0aHerO2Tw==", + "dev": true, + "requires": { + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gmodule2": "^2.0.0", + "@gi-types/gobject2": "^2.68.0" + } + }, + "@gi-types/gio2": { + "version": "2.68.0", + "resolved": "https://registry.npmjs.org/@gi-types/gio2/-/gio2-2.68.0.tgz", + "integrity": "sha512-VEjaLR96r9HOqf9YfVN4tAVeCAIqccoOz2KUJyqj3Ha/GABBilEucJUr7VK7t2Vogtlp7VyqdSa2AilORqPg1A==", + "dev": true, + "requires": { + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0" + } + }, + "@gi-types/gjs-environment": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/gjs-environment/-/gjs-environment-1.0.0.tgz", + "integrity": "sha512-UD4cGWT5rgYormf+P5cd/Wqk3VsAKNuclCPtXXSuglpGkwKdJp0hcxz3Ohpwe0+9rOG0xs6sNAJgtpR/uwk4NA==", + "dev": true, + "requires": { + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0" + } + }, + "@gi-types/glib2": { + "version": "2.68.0", + "resolved": "https://registry.npmjs.org/@gi-types/glib2/-/glib2-2.68.0.tgz", + "integrity": "sha512-xm0VaFsL3YbjmwgiWFMX/yX/nxKu1xXsSY7pnHL7T5bQcb28oNCfWBH1Rhlx6wjL7DR2mQjX5owbaA5ZXUFLHQ==", + "dev": true, + "requires": { + "@gi-types/gobject2": "^2.68.0" + } + }, + "@gi-types/gmodule2": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/gmodule2/-/gmodule2-2.0.0.tgz", + "integrity": "sha512-Wnn3CImVWdJbAU2dqeCa7ieFEtxhcCyZVR2d6QHOrFngKBZqDnUqw35mv9mUjp48D5B3kS1QuCszvUZ8VSeHcA==", + "dev": true, + "requires": { + "@gi-types/gobject2": "^2.68.0" + } + }, + "@gi-types/gobject2": { + "version": "2.68.0", + "resolved": "https://registry.npmjs.org/@gi-types/gobject2/-/gobject2-2.68.0.tgz", + "integrity": "sha512-Ka/vZnb+VLg68eNJ6rnkU6qjqupnpPjq8JFmJsdUsMyZPV9WTG7YOKiAZBQ3BfSO5LsiDdAyVWfU7OHu//So0Q==", + "dev": true, + "requires": { + "@gi-types/glib2": "^2.68.0" + } + }, + "@gi-types/graphene1": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/graphene1/-/graphene1-1.0.0.tgz", + "integrity": "sha512-C3vM6xLBc/P4yMCVYQDtW04OaLrbesXDR+TN5XQuwWXOchDJIky3cSCOdBw8ZdWHFELz8WRc0yEAIQTqCKVEnQ==", + "dev": true, + "requires": { + "@gi-types/gobject2": "^2.68.0" + } + }, + "@gi-types/gsk4": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/gsk4/-/gsk4-4.0.0.tgz", + "integrity": "sha512-fO6YCSU5ck05PNqB6zSUNjGev++4iziujZmeAaMqqSFt3eNoZNy38hGdljnB2+Y1691fOQgsVY35J0yZzZyNGg==", + "dev": true, + "requires": { + "@gi-types/cairo1": "^1.0.0", + "@gi-types/gdk4": "^4.0.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0", + "@gi-types/graphene1": "^1.0.0", + "@gi-types/pango1": "^1.0.0" + } + }, + "@gi-types/gtk3": { + "version": "3.24.0", + "resolved": "https://registry.npmjs.org/@gi-types/gtk3/-/gtk3-3.24.0.tgz", + "integrity": "sha512-D3EKqE+hcltQAGrFGry2X4zaLUYwCMr/7mym6oq78mF5hM2DSoUnDA9qfTYLImqQ//8fs9rBe4HPSXeYcHoNLg==", + "dev": true, + "requires": { + "@gi-types/atk1": "^2.36.0", + "@gi-types/cairo1": "^1.0.0", + "@gi-types/gdk3": "^3.24.0", + "@gi-types/gdkpixbuf2": "^2.0.0", + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0", + "@gi-types/pango1": "^1.0.0", + "@gi-types/xlib2": "^2.0.0" + } + }, + "@gi-types/gtk4": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@gi-types/gtk4/-/gtk4-4.2.0.tgz", + "integrity": "sha512-YYwzQLRZXOYL6wXy7l3YjLBR2mUVyLAz5gXUBjdSgMtERLKPWpPepZdJ2zoztmdSO8Sfn2CG1rTZhuF73cQtsQ==", + "dev": true, + "requires": { + "@gi-types/cairo1": "^1.0.0", + "@gi-types/gdk4": "^4.0.0", + "@gi-types/gdkpixbuf2": "^2.0.0", + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0", + "@gi-types/graphene1": "^1.0.0", + "@gi-types/gsk4": "^4.0.0", + "@gi-types/pango1": "^1.0.0" + } + }, + "@gi-types/harfbuzz2": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/@gi-types/harfbuzz2/-/harfbuzz2-2.8.1.tgz", + "integrity": "sha512-XeobP2BuLuF5xyxCd2WqxlnUSqhwFED3mJQ7JTcWvKd59BR0tWK1Qd+v7OOcYHdUFYS2Y1+EibfhR7hOH7TZCA==", + "dev": true, + "requires": { + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0" + } + }, + "@gi-types/json1": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@gi-types/json1/-/json1-1.6.0.tgz", + "integrity": "sha512-qqnqOb+lAkVs0BGAFolAd8SP2NBu0gnaSzECjzWxsjK5VLxd5uYDv6ChDjTW8bhgLWJ9vtG3HQAvsd0O6kU4XQ==", + "dev": true, + "requires": { + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0" + } + }, + "@gi-types/meta8": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/meta8/-/meta8-8.0.0.tgz", + "integrity": "sha512-YNqE3BXmpG4N/yQMAt7z2W7mODiDG3dgki0MeGBCVh65uTpYS2E6hVwqlAk9K8B0zSSxy4IiSG9bAu5znkJ60A==", + "dev": true, + "requires": { + "@gi-types/atk1": "^2.36.0", + "@gi-types/cairo1": "^1.0.0", + "@gi-types/clutter8": "^8.0.0", + "@gi-types/cogl8": "^8.0.0", + "@gi-types/gdesktopenums3": "^3.0.0", + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0", + "@gi-types/graphene1": "^1.0.0", + "@gi-types/gtk3": "^3.24.0", + "@gi-types/json1": "^1.6.0", + "@gi-types/pango1": "^1.0.0", + "@gi-types/xfixes4": "^4.0.0", + "@gi-types/xlib2": "^2.0.0" + } + }, + "@gi-types/nm1": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/@gi-types/nm1/-/nm1-1.32.0.tgz", + "integrity": "sha512-TPF9iVP2eZR+z0hw1vFvl7ae7hmPE04mpLaoEYfpH65wW/3ldZ8G72AryKu86zMQ99BEwGU7aplA3gCfPFGI0w==", + "dev": true, + "requires": { + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0" + } + }, + "@gi-types/pango1": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/pango1/-/pango1-1.0.0.tgz", + "integrity": "sha512-ZDYC0tW+SNUjrjxGSEIJo8oPLlpz+WwvwRH2d0mTTX3p2SuQNV7rkYjdR0L2uAuD15NBe7mM6wvLcxJ2WZurGg==", + "dev": true, + "requires": { + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0", + "@gi-types/harfbuzz2": "^2.8.1" + } + }, + "@gi-types/polkit1": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/polkit1/-/polkit1-1.0.0.tgz", + "integrity": "sha512-2yQ0btuZXU6ajMgUccIrEQSkE9SUNyL3EbbQ0FkpkJIGMl+c531iXlppVXbNVfovNw6lrVuOHQCaPMH7UJoBpA==", + "dev": true, + "requires": { + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0" + } + }, + "@gi-types/polkitagent1": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/polkitagent1/-/polkitagent1-1.0.0.tgz", + "integrity": "sha512-7dT5BqG9cJk9SEuTnq7BKxa36U20RqFY7udA5OrLuPudrHxIG/fkRAY5+DgVKjVGtp+DO5T2IlYBGDqyQyk3Cg==", + "dev": true, + "requires": { + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0", + "@gi-types/polkit1": "^1.0.0" + } + }, + "@gi-types/shell0": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@gi-types/shell0/-/shell0-0.1.0.tgz", + "integrity": "sha512-YoAWAN+Icja2sbR+2jJivofvo9zyRQTHijAZMaFX+neZfCokA5X7f0U3iXH3nFBmMYLJcasRiaOMMOU1k1sX7A==", + "dev": true, + "requires": { + "@gi-types/atk1": "^2.36.0", + "@gi-types/cairo1": "^1.0.0", + "@gi-types/clutter8": "^8.0.0", + "@gi-types/cogl8": "^8.0.0", + "@gi-types/gcr3": "^3.40.0", + "@gi-types/gdkpixbuf2": "^2.0.0", + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0", + "@gi-types/gtk3": "^3.24.0", + "@gi-types/meta8": "^8.0.0", + "@gi-types/nm1": "^1.32.0", + "@gi-types/polkitagent1": "^1.0.0", + "@gi-types/st1": "^1.0.0" + } + }, + "@gi-types/st1": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/st1/-/st1-1.0.0.tgz", + "integrity": "sha512-/61lxOuLfLWVSpjFI6mRNGFfNKf5SbTDIOo1z67e5d7yyUGeqrYlPrFaPm8e0usaA3JolucmPnR6RyXvn2Txlw==", + "dev": true, + "requires": { + "@gi-types/atk1": "^2.36.0", + "@gi-types/cairo1": "^1.0.0", + "@gi-types/cally8": "^8.0.0", + "@gi-types/clutter8": "^8.0.0", + "@gi-types/cogl8": "^8.0.0", + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0", + "@gi-types/json1": "^1.6.0", + "@gi-types/pango1": "^1.0.0" + } + }, + "@gi-types/xfixes4": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/xfixes4/-/xfixes4-4.0.0.tgz", + "integrity": "sha512-NYIHJ8fP2rawTN7Yhf5HJ1RQBBeiYHJcYXH7GNTkHwChJIThbt1CsEfW8s9x7PzgXm0FIPoEdaRRdWEhhwBWtg==", + "dev": true, + "requires": { + "@gi-types/gobject2": "^2.68.0" + } + }, + "@gi-types/xlib2": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/xlib2/-/xlib2-2.0.0.tgz", + "integrity": "sha512-wFeKKC104EUj6h3HsAIBMUSCZYgphZgNARy4NUWfbjLF0Mx+N84PgzAcUgrWsbrxXKappsZ3mqZfPvdtea948A==", + "dev": true, + "requires": { + "@gi-types/gobject2": "^2.68.0" + } + }, + "@humanwhocodes/config-array": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.6.0.tgz", + "integrity": "sha512-JQlEKbcgEUjBFhLIF4iqM7u/9lwgHRBcpHrmUNCALK0Q3amXN6lxdoXLnF0sm11E9VqTmBALR87IlUg1bZ8A9A==", + "dev": true, + "requires": { + "@humanwhocodes/object-schema": "^1.2.0", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + } + }, + "@humanwhocodes/object-schema": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.0.tgz", + "integrity": "sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w==", + "dev": true + }, + "@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true + }, + "@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "requires": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + } + }, + "@types/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==", + "dev": true, + "requires": { + "@types/minimatch": "*", + "@types/node": "*" + } + }, + "@types/json-schema": { + "version": "7.0.9", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", + "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", + "dev": true + }, + "@types/minimatch": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz", + "integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==", + "dev": true + }, + "@types/node": { + "version": "16.11.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.4.tgz", + "integrity": "sha512-TMgXmy0v2xWyuCSCJM6NCna2snndD8yvQF67J29ipdzMcsPa9u+o0tjF5+EQNdhcuZplYuouYqpc4zcd5I6amQ==", + "dev": true + }, + "@types/yargs": { + "version": "17.0.4", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.4.tgz", + "integrity": "sha512-D/wihO9WFYqwsmJI0e0qS+U09wIQtYRSBJlXWjTFGjouEuOCy0BU4N/ZK5utb00S5lW/9LO7vOpvGDd8M06NvQ==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "@types/yargs-parser": { + "version": "20.2.1", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-20.2.1.tgz", + "integrity": "sha512-7tFImggNeNBVMsn0vLrpn1H1uPrUBdnARPTpZoitY37ZrdJREzf7I16tMrlK3hen349gr1NYh8CmZQa7CTG6Aw==", + "dev": true + }, + "@typescript-eslint/eslint-plugin": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.1.0.tgz", + "integrity": "sha512-bekODL3Tqf36Yz8u+ilha4zGxL9mdB6LIsIoMAvvC5FAuWo4NpZYXtCbv7B2CeR1LhI/lLtLk+q4tbtxuoVuCg==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "5.1.0", + "@typescript-eslint/scope-manager": "5.1.0", + "debug": "^4.3.2", + "functional-red-black-tree": "^1.0.1", + "ignore": "^5.1.8", + "regexpp": "^3.2.0", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + }, + "dependencies": { + "ignore": { + "version": "5.1.8", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", + "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", + "dev": true + } + } + }, + "@typescript-eslint/experimental-utils": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.1.0.tgz", + "integrity": "sha512-ovE9qUiZMOMgxQAESZsdBT+EXIfx/YUYAbwGUI6V03amFdOOxI9c6kitkgRvLkJaLusgMZ2xBhss+tQ0Y1HWxA==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.9", + "@typescript-eslint/scope-manager": "5.1.0", + "@typescript-eslint/types": "5.1.0", + "@typescript-eslint/typescript-estree": "5.1.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + } + }, + "@typescript-eslint/parser": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.1.0.tgz", + "integrity": "sha512-vx1P+mhCtYw3+bRHmbalq/VKP2Y3gnzNgxGxfEWc6OFpuEL7iQdAeq11Ke3Rhy8NjgB+AHsIWEwni3e+Y7djKA==", + "dev": true, + "requires": { + "@typescript-eslint/scope-manager": "5.1.0", + "@typescript-eslint/types": "5.1.0", + "@typescript-eslint/typescript-estree": "5.1.0", + "debug": "^4.3.2" + } + }, + "@typescript-eslint/scope-manager": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.1.0.tgz", + "integrity": "sha512-yYlyVjvn5lvwCL37i4hPsa1s0ORsjkauhTqbb8MnpvUs7xykmcjGqwlNZ2Q5QpoqkJ1odlM2bqHqJwa28qV6Tw==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.1.0", + "@typescript-eslint/visitor-keys": "5.1.0" + } + }, + "@typescript-eslint/types": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.1.0.tgz", + "integrity": "sha512-sEwNINVxcB4ZgC6Fe6rUyMlvsB2jvVdgxjZEjQUQVlaSPMNamDOwO6/TB98kFt4sYYfNhdhTPBEQqNQZjMMswA==", + "dev": true + }, + "@typescript-eslint/typescript-estree": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.1.0.tgz", + "integrity": "sha512-SSz+l9YrIIsW4s0ZqaEfnjl156XQ4VRmJsbA0ZE1XkXrD3cRpzuZSVCyqeCMR3EBjF27IisWakbBDGhGNIOvfQ==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.1.0", + "@typescript-eslint/visitor-keys": "5.1.0", + "debug": "^4.3.2", + "globby": "^11.0.4", + "is-glob": "^4.0.3", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/visitor-keys": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.1.0.tgz", + "integrity": "sha512-uqNXepKBg81JVwjuqAxYrXa1Ql/YDzM+8g/pS+TCPxba0wZttl8m5DkrasbfnmJGHs4lQ2jTbcZ5azGhI7kK+w==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.1.0", + "eslint-visitor-keys": "^3.0.0" + } + }, + "acorn": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.5.0.tgz", + "integrity": "sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q==", + "dev": true + }, + "acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "requires": {} + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true + }, + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "debug": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, + "dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "requires": { + "path-type": "^4.0.0" + } + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dev": true, + "requires": { + "ansi-colors": "^4.1.1" + } + }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" + }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true + }, + "eslint": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.1.0.tgz", + "integrity": "sha512-JZvNneArGSUsluHWJ8g8MMs3CfIEzwaLx9KyH4tZ2i+R2/rPWzL8c0zg3rHdwYVpN/1sB9gqnjHwz9HoeJpGHw==", + "dev": true, + "requires": { + "@eslint/eslintrc": "^1.0.3", + "@humanwhocodes/config-array": "^0.6.0", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "enquirer": "^2.3.5", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^6.0.0", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.0.0", + "espree": "^9.0.0", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^6.0.1", + "globals": "^13.6.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "progress": "^2.0.0", + "regexpp": "^3.2.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "dependencies": { + "eslint-scope": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-6.0.0.tgz", + "integrity": "sha512-uRDL9MWmQCkaFus8RF5K9/L/2fn+80yoW3jkD53l4shjCh26fCtvJGasxjUqP5OT87SYTxCVA3BwTUzuELx9kA==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + } + }, + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + } + } + }, + "eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^2.0.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true + } + } + }, + "eslint-visitor-keys": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.0.0.tgz", + "integrity": "sha512-mJOZa35trBTb3IyRmo8xmKBZlxf+N7OnUl4+ZhJHs/r+0770Wh/LEACE2pqMGMe27G/4y8P2bYGk4J70IC5k1Q==", + "dev": true + }, + "espree": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.0.0.tgz", + "integrity": "sha512-r5EQJcYZ2oaGbeR0jR0fFVijGOcwai07/690YRXLINuhmVeRY4UKSAsQPe/0BNuDgwP7Ophoc1PRsr2E3tkbdQ==", + "dev": true, + "requires": { + "acorn": "^8.5.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^3.0.0" + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "esquery": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "dev": true, + "requires": { + "estraverse": "^5.1.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + } + } + }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "requires": { + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + } + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "fast-glob": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.7.tgz", + "integrity": "sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "dependencies": { + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + } + } + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "fastq": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "dev": true, + "requires": { + "reusify": "^1.0.4" + } + }, + "file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "requires": { + "flat-cache": "^3.0.4" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "requires": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + } + }, + "flatted": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.2.tgz", + "integrity": "sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA==", + "dev": true + }, + "fs": { + "version": "0.0.1-security", + "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", + "integrity": "sha1-invTcYa23d84E/I4WLV+yq9eQdQ=" + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" + }, + "glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "requires": { + "is-glob": "^4.0.3" + } + }, + "globals": { + "version": "13.11.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.11.0.tgz", + "integrity": "sha512-08/xrJ7wQjK9kkkRoI3OFUBbLx4f+6x3SGwcPvQ0QH6goFDrOU2oyAWrmh3dJezu65buo+HBMzAMQy6rovVC3g==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + } + }, + "globby": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz", + "integrity": "sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==", + "dev": true, + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.1.1", + "ignore": "^5.1.4", + "merge2": "^1.3.0", + "slash": "^3.0.0" + }, + "dependencies": { + "ignore": { + "version": "5.1.8", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", + "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", + "dev": true + } + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "requires": { + "argparse": "^2.0.1" + } + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + } + }, + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true + }, + "micromatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "dev": true, + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.2.3" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, + "requires": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + } + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, + "path": { + "version": "0.12.7", + "resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz", + "integrity": "sha1-1NwqUGxM4hl+tIHr/NWzbAFAsQ8=", + "requires": { + "process": "^0.11.1", + "util": "^0.10.3" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true + }, + "picomatch": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", + "dev": true + }, + "prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true + }, + "regexpp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", + "dev": true + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "requires": { + "queue-microtask": "^1.2.2" + } + }, + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + }, + "type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1" + } + }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true + }, + "typescript": { + "version": "4.4.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.4.tgz", + "integrity": "sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA==" + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "util": { + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", + "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", + "requires": { + "inherits": "2.0.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + } + } + }, + "v8-compile-cache": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", + "dev": true + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==" + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "yargs": { + "version": "17.2.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.2.1.tgz", + "integrity": "sha512-XfR8du6ua4K6uLGm5S6fA+FIJom/MdJcFNVY8geLlp2v8GYbOXD4EB1tPNZsRn4vBzKGMgb5DRZMeWuFc2GO8Q==", + "requires": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + } + }, + "yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==" + } + } +} From c97c984473535386a68a68db851dda09730bb3fb Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sat, 20 Nov 2021 08:12:12 +0530 Subject: [PATCH 077/155] pinch: Add pinch gesture show desktop --- extension/common/prefs.ts | 11 +- extension/common/utils/clutter.ts | 3 +- extension/constants.ts | 3 +- extension/extension.ts | 7 +- ...extensions.gestureImprovements.gschema.xml | 3 + extension/src/holdGestures/showDesktop.ts | 308 ------------- extension/src/overviewRoundTrip.ts | 38 +- extension/src/pinchGestures/showDesktop.ts | 421 ++++++++++++++++++ extension/src/trackers/pinchTracker.ts | 315 +++++++++++++ extension/src/utils/dbus.ts | 78 +++- extension/src/utils/pointsArithmetic.ts | 79 ++++ extension/ui/prefs.ui | 275 ++++++++---- gnome-shell/index.d.ts | 3 +- 13 files changed, 1094 insertions(+), 450 deletions(-) delete mode 100644 extension/src/holdGestures/showDesktop.ts create mode 100644 extension/src/pinchGestures/showDesktop.ts create mode 100644 extension/src/trackers/pinchTracker.ts create mode 100644 extension/src/utils/pointsArithmetic.ts diff --git a/extension/common/prefs.ts b/extension/common/prefs.ts index 1df6b8b..9b2740a 100644 --- a/extension/common/prefs.ts +++ b/extension/common/prefs.ts @@ -26,7 +26,8 @@ type IntegerSettingsKeys = 'alttab-delay' ; type DoubleSettingsKeys = - 'touchpad-speed-scale' + 'touchpad-speed-scale' | + 'touchpad-pinch-speed' ; export type AllSettingsKeys = @@ -38,7 +39,8 @@ export type AllSettingsKeys = type AllUIObjectKeys = AllSettingsKeys | - 'touchpadspeed_speed_display_value' | + 'touchpad-speed_scale_display-value' | + 'touchpad-pinch-speed_display-value' | 'allow-minimize-window_box-row' | 'alttab-delay_box-row' | 'animate-panel_box-row' @@ -133,7 +135,8 @@ export function getPrefsWidget(settings: Gio.Settin const builder = new Gtk.Builder(); builder.add_from_file(uiPath); - display_in_log_scale('touchpad-speed-scale', 'touchpadspeed_speed_display_value', settings, builder); + display_in_log_scale('touchpad-speed-scale', 'touchpad-speed_scale_display-value', settings, builder); + display_in_log_scale('touchpad-pinch-speed', 'touchpad-pinch-speed_display-value', settings, builder); bind_int_value('alttab-delay', settings, builder); @@ -147,7 +150,7 @@ export function getPrefsWidget(settings: Gio.Settin showEnableMinimizeButton('allow-minimize-window', 'allow-minimize-window_box-row', settings, builder); bind_boolean_value('enable-show-desktop', settings, builder); - bind_boolean_value('enable-move-window-to-workspace', settings, builder, {sensitiveRowKeys: ['animate-panel_box-row']}); + bind_boolean_value('enable-move-window-to-workspace', settings, builder, { sensitiveRowKeys: ['animate-panel_box-row'] }); bind_combo_box('animate-panel', settings, builder); const main_prefs = builder.get_object('main_prefs'); diff --git a/extension/common/utils/clutter.ts b/extension/common/utils/clutter.ts index b7ae627..0fd19a1 100644 --- a/extension/common/utils/clutter.ts +++ b/extension/common/utils/clutter.ts @@ -6,5 +6,6 @@ export type CustomEventType = Pick< Event, 'type' | 'get_gesture_phase' | 'get_touchpad_gesture_finger_count' | 'get_time' | - 'get_coords' | 'get_gesture_motion_delta_unaccelerated' + 'get_coords' | 'get_gesture_motion_delta_unaccelerated' | + 'get_gesture_pinch_scale' | 'get_gesture_pinch_angle_delta' >; \ No newline at end of file diff --git a/extension/constants.ts b/extension/constants.ts index 4e9b268..b469091 100644 --- a/extension/constants.ts +++ b/extension/constants.ts @@ -8,6 +8,8 @@ import { AnimatePanel } from './common/prefs'; export const TouchpadConstants = { DEFAULT_SWIPE_MULTIPLIER: 1, SWIPE_MULTIPLIER: 1, + DEFAULT_PINCH_MULTIPLIER: 1, + PINCH_MULTIPLIER: 1, DRAG_THRESHOLD_DISTANCE: 16, TOUCHPAD_BASE_HEIGHT: 300, TOUCHPAD_BASE_WIDTH: 400, @@ -34,7 +36,6 @@ export const ExtSettings = { DEFAULT_OVERVIEW_GESTURE: false, ALLOW_MINIMIZE_WINDOW: false, FOLLOW_NATURAL_SCROLL: true, - ENABLE_SHOW_DESKTOP: true, ENABLE_MOVE_WINDOW_TO_WORKSPACE: true, ANIMATE_PANEL: AnimatePanel.MOVE_WINDOW, }; diff --git a/extension/extension.ts b/extension/extension.ts index 99934fe..0a2625f 100644 --- a/extension/extension.ts +++ b/extension/extension.ts @@ -9,6 +9,7 @@ import * as DBusUtils from './src/utils/dbus'; import { imports } from 'gnome-shell'; import { AllSettingsKeys, AnimatePanel, GioSettings } from './common/prefs'; import { AltTabConstants, ExtSettings, TouchpadConstants } from './constants'; +import { ShowDesktopExtension } from './src/pinchGestures/showDesktop'; const ExtensionUtils = imports.misc.extensionUtils; @@ -24,6 +25,7 @@ class Extension { this._addReloadDelayFor = [ 'touchpad-speed-scale', 'alttab-delay', + 'touchpad-pinch-speed', ]; } @@ -79,6 +81,9 @@ class Extension { if (this.settings?.get_boolean('enable-window-manipulation-gesture')) this._extensions.push(new SnapWindowExtension()); + if (this.settings?.get_boolean('enable-show-desktop')) + this._extensions.push(new ShowDesktopExtension()); + this._extensions.forEach(extension => extension.apply()); } @@ -94,7 +99,6 @@ class Extension { ExtSettings.DEFAULT_OVERVIEW_GESTURE = this.settings.get_boolean('default-overview'); ExtSettings.ALLOW_MINIMIZE_WINDOW = this.settings.get_boolean('allow-minimize-window'); ExtSettings.FOLLOW_NATURAL_SCROLL = this.settings.get_boolean('follow-natural-scroll'); - ExtSettings.ENABLE_SHOW_DESKTOP = this.settings.get_boolean('enable-show-desktop'); ExtSettings.ENABLE_MOVE_WINDOW_TO_WORKSPACE = this.settings.get_boolean('enable-move-window-to-workspace'); if (ExtSettings.ENABLE_MOVE_WINDOW_TO_WORKSPACE) @@ -103,6 +107,7 @@ class Extension { ExtSettings.ANIMATE_PANEL = AnimatePanel.NONE; TouchpadConstants.SWIPE_MULTIPLIER = Constants.TouchpadConstants.DEFAULT_SWIPE_MULTIPLIER * this.settings.get_double('touchpad-speed-scale'); + TouchpadConstants.PINCH_MULTIPLIER = Constants.TouchpadConstants.DEFAULT_PINCH_MULTIPLIER * this.settings.get_double('touchpad-pinch-speed'); AltTabConstants.DELAY_DURATION = this.settings.get_int('alttab-delay'); } } diff --git a/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml b/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml index 938e8a7..5bb44c6 100644 --- a/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml +++ b/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml @@ -10,6 +10,9 @@ 1.0 + + 1.0 + 150 diff --git a/extension/src/holdGestures/showDesktop.ts b/extension/src/holdGestures/showDesktop.ts deleted file mode 100644 index 994dfb5..0000000 --- a/extension/src/holdGestures/showDesktop.ts +++ /dev/null @@ -1,308 +0,0 @@ -import Clutter from '@gi-types/clutter8'; -import Meta from '@gi-types/meta8'; -import Shell from '@gi-types/shell0'; -import { global, imports } from 'gnome-shell'; - -const Main = imports.ui.main; -const { lerp } = imports.misc.util; - -import { printStack } from '../../common/utils/logging'; -import { easeActor } from '../utils/environment'; - -// declare enum -enum WorkspaceManagerState { - SHOW_DESKTOP = -1, - DEFAULT = 0, -} - -// declare enum -enum ExtensionState { - DEFAULT, - ANIMATING, -} - -declare type SwipeTrackerT = typeof imports.ui.swipeTracker.SwipeTracker.prototype; - -export class ShowDesktopExtension implements ISubExtension { - private _windows = new Map>(); - - private _workspace?: Meta.Workspace; - private _workspaceChangedId = 0; - private _windowAddedId = 0; - private _windowRemovedId = 0; - private _windowUnMinimizedId = 0; - private _extensionState = ExtensionState.DEFAULT; - - private _minimizingWindows: Meta.Window[] = []; - private _workspaceManagerState = WorkspaceManagerState.DEFAULT; - - apply(): void { - this._workspaceChangedId = global.workspace_manager.connect('active-workspace-changed', this._workspaceChanged.bind(this)); - this._workspaceChanged(); - - this._windowUnMinimizedId = global.window_manager.connect('unminimize', this._windowUnMinimized.bind(this)); - } - - destroy(): void { - if (this._windowAddedId) - this._workspace?.disconnect(this._windowAddedId); - - if (this._windowRemovedId) - this._workspace?.disconnect(this._windowRemovedId); - - if (this._workspaceChangedId) - global.workspace_manager.disconnect(this._workspaceChangedId); - - if (this._windowUnMinimizedId) - global.window_manager.disconnect(this._windowUnMinimizedId); - } - - private _isDesktopIconExtensionWindow(window: Meta.Window) { - return window.skip_taskbar && - window.gtk_application_id === 'com.rastersoft.ding' && - window.gtk_application_object_path === '/com/rastersoft/ding'; - } - - private _easeOpacityDesktopWindows(_opacity: number, _duration: number) { - // if (this._minimizingWindows.length === 0) - // return; - - const windowActors = (global.window_group - .get_children() - .filter(w => w instanceof Meta.WindowActor) as Meta.WindowActor[]) - .filter(w => w.meta_window.is_always_on_all_workspaces() || w.meta_window.get_workspace().index === this._workspace?.index); - - const topActor = this._minimizingWindows - .map(w => w.get_compositor_private() as Meta.WindowActor) - .filter(actor => windowActors.includes(actor)) - // top actors will be at the end - .sort((a, b) => windowActors.indexOf(a) - windowActors.indexOf(b))[0] as Meta.WindowActor | undefined; - - if (topActor) { - Array.from(this._windows.keys()) - .map(w => w.get_compositor_private() as Meta.WindowActor) - .filter(actor => windowActors.includes(actor) && this._isDesktopIconExtensionWindow(actor.meta_window)) - // top actors will be at the end - .sort((a, b) => windowActors.indexOf(a) - windowActors.indexOf(b)) - .forEach(actor => global.window_group.set_child_below_sibling(actor, topActor)); - } - } - - private _getMinimizableWindows() { - const types = [Meta.WindowType.MODAL_DIALOG, Meta.WindowType.NORMAL, Meta.WindowType.DIALOG]; - - if (this._workspaceManagerState === WorkspaceManagerState.DEFAULT) { - this._minimizingWindows = Array.from(this._windows.keys()) - .filter(win => - !win.minimized && - types.includes(win.get_window_type()) && - !this._isDesktopIconExtensionWindow(win)); - } - - this._minimizingWindows.forEach(win => { - const value = this._windows.get(win); - if (value === undefined) - return; - value.actor = win.get_compositor_private() as Meta.WindowActor; - value.actor.show(); - value.start = win.get_buffer_rect(); - value.end = this._getMinimizedRect(win); - value.actor.set_pivot_point(0, 0); - }); - - return this._minimizingWindows; - } - - gestureBegin(tracker: SwipeTrackerT) { - printStack(); - log(JSON.stringify({ _workspaceManagerState: this._workspaceManagerState })); - this._extensionState = ExtensionState.ANIMATING; - this._minimizingWindows = this._getMinimizableWindows(); - this._easeOpacityDesktopWindows(0, this._workspaceManagerState === WorkspaceManagerState.DEFAULT ? 0 : 100); - - log(JSON.stringify( - { - _workspaceManagerState: this._workspaceManagerState, - windows: this._minimizingWindows.map(win => win.title), - }, - undefined, - 2, - )); - - tracker.confirmSwipe( - global.screen_height, - [WorkspaceManagerState.SHOW_DESKTOP, WorkspaceManagerState.DEFAULT], - this._workspaceManagerState, - this._workspaceManagerState, - ); - } - - gestureUpdate(_tracker: unknown, progress: number) { - // progress 0 -> NORMAL state, - 1 -> SHOW Desktop - // printStack(); - this._minimizingWindows.forEach(win => { - const value = this._windows.get(win); - if (value === undefined) - return; - // winActor.x = lerp(value.start.x, value.end.x, -progress); - // winActor.y = lerp(value.start.y, value.end.y, -progress); - - if (value.actor === undefined || value.end === undefined || value.start === undefined) - return; - - value.actor.translation_x = lerp(0, value.end.x - value.start.x, -progress); - value.actor.translation_y = lerp(0, value.end.y - value.start.y, -progress); - - value.actor.scale_x = lerp(1, value.end.width / value.start.width, -progress); - value.actor.scale_y = lerp(1, value.end.height / value.start.height, -progress); - }); - } - - gestureEnd(_tracker: unknown, duration: number, endProgress: number) { - // endProgress 0 -> NORMAL state, 1 -> SHOW Desktop - // throw new Error('Method not implemented.'); - printStack(); - let has_actor = false; - this._minimizingWindows.forEach(win => { - const value = this._windows.get(win); - if (value === undefined) - return; - if (value.actor === undefined || value.end === undefined || value.start === undefined) - return; - - has_actor = true; - easeActor(value.actor, { - scale_x: lerp(1, value.end.width / value.start.width, -endProgress), - scale_y: lerp(1, value.end.height / value.start.height, -endProgress), - translation_x: lerp(0, value.end.x - value.start.x, -endProgress), - translation_y: lerp(0, value.end.y - value.start.y, -endProgress), - duration, - mode: Clutter.AnimationMode.EASE_OUT_QUAD, - onStopped: () => { - if (value.actor === undefined) - return; - if (win.can_minimize()) { - Main.wm.skipNextEffect(value.actor); - if (endProgress === WorkspaceManagerState.DEFAULT) - value.actor.meta_window.unminimize(); - else { - value.actor.meta_window.minimize(); - value.actor.hide(); - } - } - - this._easeOpacityDesktopWindows(255, duration); - - value.actor.scale_x = 1; - value.actor.scale_y = 1; - value.actor.translation_x = 0; - value.actor.translation_y = 0; - }, - }); - }); - - if (!has_actor) - this._easeOpacityDesktopWindows(255, duration); - - if (endProgress === WorkspaceManagerState.DEFAULT) - this._minimizingWindows = []; - - this._extensionState = ExtensionState.DEFAULT; - this._workspaceManagerState = endProgress; - } - - private _resetState(animate = false) { - // reset state, aka. undo show desktop - this._minimizingWindows.forEach(win => { - log(`resetting state: ${win.title}`); - if (!this._windows.has(win)) - return; - const onStopped = (isFinished?: boolean) => { - log('animate complete: ' + isFinished); - Main.wm.skipNextEffect(win.get_compositor_private()); - win.unminimize(); - }; - const actor = win.get_compositor_private() as Meta.WindowActor; - if (animate && actor) { - log('animatine + ' + win.title); - actor.show(); - actor.opacity = 0; - easeActor(actor, { - opacity: 255, - duration: 500, - mode: Clutter.AnimationMode.EASE_OUT_QUAD, - onStopped, - }); - } - else - onStopped(false); - // log(`state reset: ${win.title}`); - }); - - this._minimizingWindows = []; - this._workspaceManagerState = WorkspaceManagerState.DEFAULT; - } - - private _workspaceChanged() { - if (this._windowAddedId) - this._workspace?.disconnect(this._windowAddedId); - - if (this._windowRemovedId) - this._workspace?.disconnect(this._windowRemovedId); - - this._resetState(false); - this._windows.clear(); - this._workspace = global.workspace_manager.get_active_workspace(); - - this._windowAddedId = this._workspace.connect('window-added', this._windowAdded.bind(this)); - this._windowRemovedId = this._workspace.connect('window-removed', this._windowRemoved.bind(this)); - this._workspace.list_windows().forEach(win => this._windowAdded(this._workspace, win)); - } - - private _windowAdded(_workspace: unknown, window: Meta.Window) { - log(`window adding: ${window.title}, size: ${this._windows.size}, skipbar: ${window.skip_taskbar}, id: ${window.gtk_application_id}, path: ${window.gtk_application_object_path}`); - if (this._windows.has(window)) - return; - - if (!window.skip_taskbar && this._extensionState === ExtensionState.DEFAULT) - this._resetState(true); - this._windows.set(window, {}); - // log(`window added: ${window.title}, size: ${this._windows.size} `); - } - - private _windowRemoved(_workspace: unknown, window: Meta.Window) { - log(`window removing: ${window.title}, size: ${this._windows.size} `); - if (!this._windows.has(window)) - return; - this._windows.delete(window); - // log(`window removed: ${window.title}, size: ${this._windows.size} `); - } - - private _windowUnMinimized(_wm: Shell.WM, actor: Meta.WindowActor) { - if (actor.meta_window.get_workspace().index !== this._workspace?.index) - return; - - this._minimizingWindows = []; - this._workspaceManagerState = WorkspaceManagerState.DEFAULT; - } - - private _getMinimizedRect(win: Meta.Window): Meta.Rectangle { - const [has_icon, rect] = win.get_icon_geometry(); - if (has_icon) - return rect; - const parent = win.get_transient_for() as Meta.Window | null; - if (parent) - return this._getMinimizedRect(parent); - const box = Main.layoutManager.getWorkAreaForMonitor(win.get_monitor()); - return new Meta.Rectangle({ - x: box.x, - y: box.y, - width: 0, - height: 0, - }); - } -} \ No newline at end of file diff --git a/extension/src/overviewRoundTrip.ts b/extension/src/overviewRoundTrip.ts index 36eff26..d5268a0 100644 --- a/extension/src/overviewRoundTrip.ts +++ b/extension/src/overviewRoundTrip.ts @@ -4,9 +4,8 @@ import { imports, global } from 'gnome-shell'; const Main = imports.ui.main; const { SwipeTracker } = imports.ui.swipeTracker; -import { createSwipeTracker, TouchpadSwipeGesture } from './swipeTracker'; +import { createSwipeTracker } from './swipeTracker'; import { OverviewControlsState, ExtSettings } from '../constants'; -import { ShowDesktopExtension } from './holdGestures/showDesktop'; // declare enum enum ExtensionState { @@ -15,23 +14,13 @@ enum ExtensionState { CUSTOM = 2, } -// declare enum -enum GestureState { - // DEFAULT, - OVERVIEW, - SHOW_DESKTOP, -} - export class OverviewRoundTripGestureExtension implements ISubExtension { private _overviewControls: imports.ui.overviewControls.OverviewControlsManager; private _stateAdjustment: imports.ui.overviewControls.OverviewAdjustment; private _oldGetStateTransitionParams: typeof imports.ui.overviewControls.OverviewAdjustment.prototype.getStateTransitionParams; private _swipeTracker?: typeof SwipeTracker.prototype; - private _touchpadGesture?: typeof TouchpadSwipeGesture.prototype; - private _showDesktopAnimation?: ShowDesktopExtension; private _progress = 0; private _extensionState = ExtensionState.DEFAULT; - private _gestureState = GestureState.OVERVIEW; private _connectors: number[]; private _shownEventId = 0; private _hiddenEventId = 0; @@ -74,12 +63,6 @@ export class OverviewRoundTripGestureExtension implements ISubExtension { Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW, Clutter.Orientation.VERTICAL, ); - this._touchpadGesture = this._swipeTracker._touchpadGesture as typeof TouchpadSwipeGesture.prototype; - - if (ExtSettings.ENABLE_SHOW_DESKTOP) { - this._showDesktopAnimation = new ShowDesktopExtension(); - this._showDesktopAnimation.apply(); - } this._swipeTracker.orientation = Clutter.Orientation.VERTICAL; this._connectors.push(this._swipeTracker.connect('begin', this._gestureBegin.bind(this))); @@ -110,18 +93,9 @@ export class OverviewRoundTripGestureExtension implements ISubExtension { this._stateAdjustment.getStateTransitionParams = this._oldGetStateTransitionParams.bind(this._stateAdjustment); Main.overview.disconnect(this._shownEventId); Main.overview.disconnect(this._hiddenEventId); - - this._showDesktopAnimation?.destroy(); } _gestureBegin(tracker: typeof SwipeTracker.prototype): void { - this._gestureState = GestureState.OVERVIEW; - if (this._touchpadGesture?.hadHoldGesture && this._showDesktopAnimation && Main.actionMode === Shell.ActionMode.NORMAL) { - this._gestureState = GestureState.SHOW_DESKTOP; - this._showDesktopAnimation.gestureBegin(tracker); - return; - } - const _tracker = { confirmSwipe: (distance: number, snapPoints: number[], currentProgress: number, cancelProgress: number) => { snapPoints.unshift(OverviewControlsState.APP_GRID_P); @@ -141,11 +115,6 @@ export class OverviewRoundTripGestureExtension implements ISubExtension { } _gestureUpdate(tracker: typeof SwipeTracker.prototype, progress: number): void { - if (this._gestureState === GestureState.SHOW_DESKTOP) { - this._showDesktopAnimation?.gestureUpdate(tracker, progress); - return; - } - if (progress < OverviewControlsState.HIDDEN || progress > OverviewControlsState.APP_GRID) { this._extensionState = ExtensionState.CUSTOM; @@ -160,11 +129,6 @@ export class OverviewRoundTripGestureExtension implements ISubExtension { } _gestureEnd(tracker: typeof SwipeTracker.prototype, duration: number, endProgress: number): void { - if (this._gestureState === GestureState.SHOW_DESKTOP) { - this._showDesktopAnimation?.gestureEnd(tracker, duration, endProgress); - return; - } - if (this._progress < OverviewControlsState.HIDDEN) { this._extensionState = ExtensionState.CUSTOM; endProgress = endProgress >= OverviewControlsState.HIDDEN ? diff --git a/extension/src/pinchGestures/showDesktop.ts b/extension/src/pinchGestures/showDesktop.ts new file mode 100644 index 0000000..57c888b --- /dev/null +++ b/extension/src/pinchGestures/showDesktop.ts @@ -0,0 +1,421 @@ +import Clutter from '@gi-types/clutter8'; +import Meta from '@gi-types/meta8'; +import Shell from '@gi-types/shell0'; +import GObject from '@gi-types/gobject2'; +import { global, imports, __shell_private_types } from 'gnome-shell'; + +const Main = imports.ui.main; +const Layout = imports.ui.layout; +const { lerp } = imports.misc.util; + +import { printStack } from '../../common/utils/logging'; +import { TouchpadPinchGesture } from '../trackers/pinchTracker'; +import { easeActor } from '../utils/environment'; +import { findCentroid, findCornerForWindow, Point } from '../utils/pointsArithmetic'; + +// declare enum +enum WorkspaceManagerState { + SHOW_DESKTOP = -1, + DEFAULT = 0, +} + +// declare enum +enum ExtensionState { + DEFAULT, + ANIMATING, +} + +declare type Type_TouchpadPinchGesture = typeof TouchpadPinchGesture.prototype; + +declare type CornerPositions = + | 'top-left' | 'top-mid' | 'top-right' + | 'bottom-left' | 'bottom-mid' | 'bottom-right' + ; + +declare type Corner = Point & { + position: CornerPositions; +} + +declare type WindowActorClone = { + windowActor: Meta.WindowActor, + clone: Clutter.Clone, + translation?: { + start: Point, + end: Point, + }, +}; + +class MonitorGroup { + public monitor: __shell_private_types.IMonitorState; + private _container: Clutter.Actor; + private _windowActorClones: WindowActorClone[] = []; + private _corners: Corner[]; + private _bottomMidCorner: Corner; + + constructor(monitor: __shell_private_types.IMonitorState) { + this.monitor = monitor; + + this._container = new Clutter.Actor({ visible: false }); + const constraint = new Layout.MonitorConstraint({ index: monitor.index }); + this._container.add_constraint(constraint); + + this._bottomMidCorner = { x: this.monitor.width / 2, y: this.monitor.height, position: 'bottom-mid' }; + this._corners = [ + { x: 0, y: 0, position: 'top-left' }, + // { x: this.monitor.width / 2, y: 0, position: 'top-mid' }, + { x: this.monitor.width, y: 0, position: 'top-right' }, + { x: this.monitor.width, y: this.monitor.height, position: 'bottom-right' }, + // { x: this.monitor.width / 2, y: this.monitor.height, position: 'bottom-mid' }, + { x: 0, y: this.monitor.height, position: 'bottom-left' }, + ]; + + this._container.set_clip_to_allocation(true); + Main.layoutManager.uiGroup.add_child(this._container); + } + + _addWindowActor(windowActor: Meta.WindowActor) { + const clone = new Clutter.Clone({ + source: windowActor, + x: windowActor.x - this.monitor.x, + y: windowActor.y - this.monitor.y, + }); + + // windowActor.opacity = 0; + windowActor.hide(); + + this._windowActorClones.push({ clone, windowActor }); + this._container.insert_child_below(clone, null); + } + + private _getCloneCentroid(windowActorsClones: WindowActorClone[]) { + const point = findCentroid( + windowActorsClones.map(actorClone => { + return { + x: actorClone.clone.x + actorClone.clone.width / 2, + y: actorClone.clone.y + actorClone.clone.height / 2, + }; + }), + ); + if (point) { + point.x = Math.round(point.x); + point.y = Math.round(point.y); + } + return point; + } + + private _getDestPoint(clone: Clutter.Clone, destCorner: Corner): Point { + const destY = destCorner.y; + const cloneRelXCenter = Math.round(clone.width / 2); + switch (destCorner.position) { + case 'top-left': + return { x: destCorner.x - clone.width, y: destY - clone.height }; + case 'top-mid': + return { x: destCorner.x - cloneRelXCenter, y: destY - clone.height }; + case 'top-right': + return { x: destCorner.x, y: destY - clone.height }; + case 'bottom-right': + return { x: destCorner.x, y: destY }; + case 'bottom-mid': + return { x: destCorner.x - cloneRelXCenter, y: destY }; + case 'bottom-left': + return { x: destCorner.x - clone.width, y: destY }; + } + } + + private _fillCloneDestPosition(windowActorsClones: WindowActorClone[]) { + const centroid = this._getCloneCentroid(windowActorsClones); + + windowActorsClones.map(actorClone => { + const { clone } = actorClone; + log(JSON.stringify({ + title: actorClone.windowActor.meta_window.title, + start: { x: clone.x, y: clone.y }, + })); + const cloneCenter: Point = { + x: clone.x + Math.round(clone.width / 2), + y: clone.y + Math.round(clone.height / 2), + }; + + let destCorner = centroid ? findCornerForWindow(cloneCenter, centroid, this._corners) : undefined; + destCorner = destCorner ?? this._bottomMidCorner; + + const destPoint = this._getDestPoint(clone, destCorner); + actorClone.translation = { + start: { x: clone.x, y: clone.y }, + end: { x: destPoint.x, y: destPoint.y }, + }; + + log(JSON.stringify({ + start: { x: clone.x, y: clone.y }, + end: destPoint, + position: destCorner.position, + })); + log(JSON.stringify({ cloneCenter, centroid, destCorner })); + log(''); + }); + } + + gestureBegin(windowActors: Meta.WindowActor[]) { + windowActors.forEach(this._addWindowActor.bind(this)); + this._fillCloneDestPosition(this._windowActorClones); + this._container.visible = true; + } + + gestureUpdate(progress: number) { + + this._windowActorClones.forEach(actorClone => { + const { clone, translation } = actorClone; + if (translation === undefined) + return; + clone.x = lerp(translation.start.x, translation.end.x, -progress); + clone.y = lerp(translation.start.y, translation.end.y, -progress); + clone.opacity = lerp(255, 128, -progress); + // if (!value.actor.visible) + // value.actor.show(); + }); + } + + gestureEnd(progress: WorkspaceManagerState, duration: number) { + this._windowActorClones.forEach(actorClone => { + const { clone, translation, windowActor } = actorClone; + if (translation === undefined) + return; + + easeActor(clone, { + x: lerp(translation.start.x, translation.end.x, -progress), + y: lerp(translation.start.y, translation.end.y, -progress), + opacity: lerp(255, 128, -progress), + mode: Clutter.AnimationMode.EASE_OUT_QUAD, + duration, + onStopped: () => { + const window = windowActor.meta_window as Meta.Window | null; + if (window?.can_minimize()) { + Main.wm.skipNextEffect(windowActor); + if (progress === WorkspaceManagerState.DEFAULT) { + window.unminimize(); + windowActor.show(); + } + else { + window.minimize(); + windowActor.hide(); + } + } else { + windowActor.show(); + } + + this._container.visible = false; + clone.destroy(); + }, + }); + }); + + this._windowActorClones = []; + } + + destroy() { + this._container.destroy(); + } +} + +export class ShowDesktopExtension implements ISubExtension { + private _windows = new Set(); + + private _workspace?: Meta.Workspace; + private _workspaceChangedId = 0; + private _windowAddedId = 0; + private _windowRemovedId = 0; + private _windowUnMinimizedId = 0; + private _extensionState = ExtensionState.DEFAULT; + + private _minimizingWindows: Meta.Window[] = []; + private _workspaceManagerState = WorkspaceManagerState.DEFAULT; + private _monitorGroups: MonitorGroup[] = []; + private _pinchTracker?: Type_TouchpadPinchGesture; + + apply(): void { + this._pinchTracker = new TouchpadPinchGesture({ + nfingers: [3], + allowedModes: Shell.ActionMode.NORMAL, + }); + + this._pinchTracker.connect('begin', this.gestureBegin.bind(this)); + this._pinchTracker.connect('update', this.gestureUpdate.bind(this)); + this._pinchTracker.connect('end', this.gestureEnd.bind(this)); + + for (const monitor of Main.layoutManager.monitors) + this._monitorGroups.push(new MonitorGroup(monitor)); + + this._workspaceChangedId = global.workspace_manager.connect('active-workspace-changed', this._workspaceChanged.bind(this)); + this._workspaceChanged(); + this._windowUnMinimizedId = global.window_manager.connect('unminimize', this._windowUnMinimized.bind(this)); + } + + destroy(): void { + this._pinchTracker?.destroy(); + + if (this._windowAddedId) + this._workspace?.disconnect(this._windowAddedId); + + if (this._windowRemovedId) + this._workspace?.disconnect(this._windowRemovedId); + + if (this._workspaceChangedId) + global.workspace_manager.disconnect(this._workspaceChangedId); + + if (this._windowUnMinimizedId) + global.window_manager.disconnect(this._windowUnMinimizedId); + + this._resetState(); + + for (const monitor of this._monitorGroups) + monitor.destroy(); + this._monitorGroups = []; + } + + private _isDesktopIconExtensionWindow(window: Meta.Window) { + return window.skip_taskbar && + window.gtk_application_id === 'com.rastersoft.ding' && + window.gtk_application_object_path === '/com/rastersoft/ding'; + } + + private _getMinimizableWindows() { + const types = [Meta.WindowType.MODAL_DIALOG, Meta.WindowType.NORMAL, Meta.WindowType.DIALOG]; + + if (this._workspaceManagerState === WorkspaceManagerState.DEFAULT) { + const windowActors = global.window_group + .get_children() + .filter((w): w is Meta.WindowActor => w instanceof Meta.WindowActor) + .filter(w => w.meta_window.is_always_on_all_workspaces() || w.meta_window.get_workspace().index === this._workspace?.index); + + this._minimizingWindows = Array.from(this._windows) + .map(win => win.get_compositor_private() as Meta.WindowActor) + .filter(actor => windowActors.includes(actor)) + // top actors will be at the start + .sort((a, b) => windowActors.indexOf(b) - windowActors.indexOf(a)) + .map(actor => actor.meta_window) + .filter(win => + !win.minimized && + types.includes(win.get_window_type()) && + !this._isDesktopIconExtensionWindow(win)); + } + + return this._minimizingWindows; + } + + gestureBegin(tracker: Type_TouchpadPinchGesture) { + printStack(); + log(JSON.stringify({ _workspaceManagerState: this._workspaceManagerState })); + this._extensionState = ExtensionState.ANIMATING; + + Meta.disable_unredirect_for_display(global.display); + + this._minimizingWindows = this._getMinimizableWindows(); + // this._setDesktopWindowsBelow(); + + for (const monitor of this._monitorGroups) { + const windowActors = this._minimizingWindows + .map(win => win.get_compositor_private()) + .filter((actor: GObject.Object): actor is Meta.WindowActor => { + return actor instanceof Meta.WindowActor && actor.meta_window.get_monitor() === monitor.monitor.index; + }); + monitor.gestureBegin(windowActors); + } + + tracker.confirmPinch( + 1, + [WorkspaceManagerState.SHOW_DESKTOP, WorkspaceManagerState.DEFAULT], + this._workspaceManagerState, + ); + + } + + gestureUpdate(_tracker: unknown, progress: number) { + // progress 0 -> NORMAL state, - 1 -> SHOW Desktop + // printStack(); + for (const monitor of this._monitorGroups) + monitor.gestureUpdate(progress); + } + + gestureEnd(_tracker: unknown, duration: number, endProgress: number) { + // endProgress 0 -> NORMAL state, 1 -> SHOW Desktop + printStack(); + for (const monitor of this._monitorGroups) + monitor.gestureEnd(endProgress, duration); + + if (endProgress === WorkspaceManagerState.DEFAULT) + this._minimizingWindows = []; + + this._extensionState = ExtensionState.DEFAULT; + this._workspaceManagerState = endProgress; + + Meta.enable_unredirect_for_display(global.display); + } + + private _resetState(animate = false) { + // reset state, aka. undo show desktop + this._minimizingWindows.forEach(win => { + log(`resetting state: ${win.title}`); + if (!this._windows.has(win)) + return; + const onStopped = () => { + Main.wm.skipNextEffect(win.get_compositor_private()); + win.unminimize(); + }; + const actor = win.get_compositor_private() as Meta.WindowActor; + if (animate && actor) { + actor.show(); + actor.opacity = 0; + easeActor(actor, { + opacity: 255, + duration: 500, + mode: Clutter.AnimationMode.EASE_OUT_QUAD, + onStopped, + }); + } + else + onStopped(); + }); + + this._minimizingWindows = []; + this._workspaceManagerState = WorkspaceManagerState.DEFAULT; + } + + private _workspaceChanged() { + if (this._windowAddedId) + this._workspace?.disconnect(this._windowAddedId); + + if (this._windowRemovedId) + this._workspace?.disconnect(this._windowRemovedId); + + this._resetState(false); + this._windows.clear(); + this._workspace = global.workspace_manager.get_active_workspace(); + + this._windowAddedId = this._workspace.connect('window-added', this._windowAdded.bind(this)); + this._windowRemovedId = this._workspace.connect('window-removed', this._windowRemoved.bind(this)); + this._workspace.list_windows().forEach(win => this._windowAdded(this._workspace, win)); + } + + private _windowAdded(_workspace: unknown, window: Meta.Window) { + if (this._windows.has(window)) + return; + + if (!window.skip_taskbar && this._extensionState === ExtensionState.DEFAULT) + this._resetState(true); + this._windows.add(window); + } + + private _windowRemoved(_workspace: unknown, window: Meta.Window) { + if (!this._windows.has(window)) + return; + this._windows.delete(window); + } + + private _windowUnMinimized(_wm: Shell.WM, actor: Meta.WindowActor) { + if (actor.meta_window.get_workspace().index !== this._workspace?.index) + return; + + this._minimizingWindows = []; + this._workspaceManagerState = WorkspaceManagerState.DEFAULT; + } +} \ No newline at end of file diff --git a/extension/src/trackers/pinchTracker.ts b/extension/src/trackers/pinchTracker.ts new file mode 100644 index 0000000..e947d5f --- /dev/null +++ b/extension/src/trackers/pinchTracker.ts @@ -0,0 +1,315 @@ +import Clutter from '@gi-types/clutter8'; +import GObject from '@gi-types/gobject2'; +import Shell from '@gi-types/shell0'; +import Meta from '@gi-types/meta8'; +import { global, imports } from 'gnome-shell'; + +const Main = imports.ui.main; + +import * as DBusUtils from '../utils/dbus'; +import { registerClass } from '../../common/utils/gobject'; +import { CustomEventType } from '../../common/utils/clutter'; +import { TouchpadConstants } from '../../constants'; + +const MIN_ANIMATION_DURATION = 100; +const MAX_ANIMATION_DURATION = 400; + +// Derivative of easeOutCubic at t=0 +const DURATION_MULTIPLIER = 3; +const ANIMATION_BASE_VELOCITY = 0.002; + +const EVENT_HISTORY_THRESHOLD_MS = 150; +const DECELERATION_TOUCHPAD = 0.997; +const VELOCITY_CURVE_THRESHOLD = 2; +const DECELERATION_PARABOLA_MULTIPLIER = 0.35; + +declare type HisotyEvent = { time: number, delta: number }; + +class EventHistoryTracker { + private _data: HisotyEvent[] = []; + + reset() { + this._data = []; + } + + trim(time: number) { + const thresholdTime = time - EVENT_HISTORY_THRESHOLD_MS; + const index = this._data.findIndex(r => r.time >= thresholdTime); + this._data.splice(0, index); + } + + append(time: number, delta: number) { + this.trim(time); + this._data.push({ time, delta }); + } + + calculateVelocity() { + if (this._data.length < 2) + return 0; + + const firstTime = this._data[0].time; + const lastTime = this._data[this._data.length - 1].time; + + if (firstTime === lastTime) + return 0; + + const totalDelta = this._data.slice(1).map(a => a.delta).reduce((a, b) => a + b); + const period = lastTime - firstTime; + + return totalDelta / period; + } +} + + +// define enum +enum TouchpadState { + NONE = 0, + HANDLING = 1, + IGNORED = 2, +} + +enum GestureACKState { + NONE = 0, + PENDING_ACK = 1, + ACKED = 2, +} + +export const TouchpadPinchGesture = registerClass({ + Properties: {}, + Signals: { + 'begin': { param_types: [] }, + 'update': { param_types: [GObject.TYPE_DOUBLE] }, + 'end': { param_types: [GObject.TYPE_DOUBLE, GObject.TYPE_DOUBLE] }, + }, +}, class TouchpadPinchGesture extends GObject.Object { + private _nfingers: number[]; + private _allowedModes: Shell.ActionMode; + private _state = TouchpadState.NONE; + private _ackState = GestureACKState.NONE; + private _checkAllowedGesture?: (event: CustomEventType) => boolean; + private _stageCaptureEvent?: number; + private _historyTracker: EventHistoryTracker; + private _progress_scale = 1.0; + private _snapPoints = [0, 1, 2]; + + public enabled = true; + private _initialProgress = 0; + + PINCH_MULTIPLIER: number; + + constructor(params: { + nfingers: number[], + allowedModes: Shell.ActionMode, + checkAllowedGesture?: (event: CustomEventType) => boolean, + pinchSpeed?: number, + }) { + super(); + this._nfingers = params.nfingers; + this._allowedModes = params.allowedModes; + this._checkAllowedGesture = params.checkAllowedGesture; + if (Meta.is_wayland_compositor()) { + this._stageCaptureEvent = global.stage.connect('captured-event::touchpad', this._handleEvent.bind(this)); + } else { + DBusUtils.subscribe(this._handleEvent.bind(this)); + } + + this._historyTracker = new EventHistoryTracker(); + this.PINCH_MULTIPLIER = TouchpadConstants.PINCH_MULTIPLIER * (params.pinchSpeed ?? 1.0); + + } + + _handleEvent(_actor: undefined | Clutter.Actor, event: CustomEventType): boolean { + if (event.type() !== Clutter.EventType.TOUCHPAD_PINCH) + return Clutter.EVENT_PROPAGATE; + + const gesturePhase = event.get_gesture_phase(); + if (gesturePhase === Clutter.TouchpadGesturePhase.BEGIN) { + this._state = TouchpadState.NONE; + this._historyTracker.reset(); + } + + if (this._state === TouchpadState.IGNORED || !this.enabled) + return Clutter.EVENT_PROPAGATE; + + if ((this._allowedModes !== Shell.ActionMode.ALL) && ((this._allowedModes & Main.actionMode) === 0)) { + this._state = TouchpadState.IGNORED; + return Clutter.EVENT_PROPAGATE; + } + + if (!this._nfingers.includes(event.get_touchpad_gesture_finger_count())) { + this._state = TouchpadState.IGNORED; + return Clutter.EVENT_PROPAGATE; + } + + if (gesturePhase === Clutter.TouchpadGesturePhase.BEGIN && this._checkAllowedGesture !== undefined) { + try { + if (this._checkAllowedGesture(event) !== true) { + this._state = TouchpadState.IGNORED; + return Clutter.EVENT_PROPAGATE; + } + } + catch (ex) { + this._state = TouchpadState.IGNORED; + return Clutter.EVENT_PROPAGATE; + } + } + + this._state = TouchpadState.HANDLING; + const time = event.get_time(); + const pinch_scale = event.get_gesture_pinch_scale(); + + switch (gesturePhase) { + case Clutter.TouchpadGesturePhase.BEGIN: + // this._previous_scale = 1.0; + this._emitBegin(); + break; + case Clutter.TouchpadGesturePhase.UPDATE: + this._emitUpdate(time, pinch_scale); + break; + + case Clutter.TouchpadGesturePhase.END: + case Clutter.TouchpadGesturePhase.CANCEL: + this._emitEnd(time); + this._state = TouchpadState.NONE; + this._historyTracker.reset(); + break; + } + + return Clutter.EVENT_STOP; + } + + private _getBounds(): [number, number] { + return [this._snapPoints[0], this._snapPoints[this._snapPoints.length - 1]]; + } + + /** + * @param currentProgress should be between [0, 2] + */ + public confirmPinch(_distance: number, snapPoints: number[], currentProgress: number) { + if (this._ackState !== GestureACKState.PENDING_ACK) + return; + + this._snapPoints = snapPoints; + this._initialProgress = currentProgress; + this._progress_scale = Math.clamp(currentProgress, ...this._getBounds()); + this._ackState = GestureACKState.ACKED; + } + + _reset() { + this._historyTracker.reset(); + + this._snapPoints = []; + this._initialProgress = 0; + } + + private _emitBegin() { + this._historyTracker.reset(); + if (this._ackState === GestureACKState.NONE) { + this._ackState = GestureACKState.PENDING_ACK; + this._progress_scale = 1.0; + this.emit('begin'); + } + } + + private _emitUpdate(time: number, pinch_scale: number) { + if (this._ackState !== GestureACKState.ACKED) + return; + + // this._historyTracker.append(time, delta); + // delta /= this._pinchDistance; + const new_progress = -Math.log2(pinch_scale) * this.PINCH_MULTIPLIER + this._initialProgress; + const delta = new_progress - this._progress_scale; + this._historyTracker.append(time, delta); + this._progress_scale = Math.clamp(new_progress, ...this._getBounds()); + // log(JSON.stringify({ pinch_scale, new_progress, delta })); + this.emit('update', this._progress_scale); + } + + private _emitEnd(time: number) { + if (this._ackState !== GestureACKState.ACKED) + return; + + this._historyTracker.trim(time); + + let velocity = this._historyTracker.calculateVelocity(); + const endProgress = this._getEndProgress(velocity); + + if ((endProgress - this._progress_scale) * velocity <= 0) + velocity = ANIMATION_BASE_VELOCITY; + + let duration = Math.abs((this._progress_scale - endProgress) / velocity * DURATION_MULTIPLIER); + duration = Math.clamp(duration, MIN_ANIMATION_DURATION, MAX_ANIMATION_DURATION); + + this._reset(); + this._ackState = GestureACKState.NONE; + this.emit('end', duration, endProgress); + } + + private _findEndPoints() { + const current = this._progress_scale; + return { + current, + next: Math.clamp(Math.ceil(current), ...this._getBounds()), + previous: Math.clamp(Math.floor(current), ...this._getBounds()), + }; + } + + private _findClosestPoint(pos: number) { + const distances = this._snapPoints.map(x => Math.abs(x - pos)); + const min = Math.min(...distances); + return distances.indexOf(min); + } + + private _findNextPoint(pos: number) { + return this._snapPoints.findIndex(p => p >= pos); + } + + private _findPreviousPoint(pos: number) { + const reversedIndex = this._snapPoints.slice().reverse().findIndex(p => p <= pos); + return this._snapPoints.length - 1 - reversedIndex; + } + + private _findPointForProjection(pos: number, velocity: number) { + const initial = this._findClosestPoint(this._initialProgress); + const prev = this._findPreviousPoint(pos); + const next = this._findNextPoint(pos); + + if ((velocity > 0 ? prev : next) === initial) + return velocity > 0 ? next : prev; + + return this._findClosestPoint(pos); + } + + private _getEndProgress(velocity: number) { + // if (Math.abs(velocity) < VELOCITY_THRESHOLD_TOUCHPAD) + // return this._snapPoints[this._findClosestPoint(this._progress)]; + + const slope = DECELERATION_TOUCHPAD / (1.0 - DECELERATION_TOUCHPAD) / 1000.0; + + let pos; + if (Math.abs(velocity) > VELOCITY_CURVE_THRESHOLD) { + const c = slope / 2 / DECELERATION_PARABOLA_MULTIPLIER; + const x = Math.abs(velocity) - VELOCITY_CURVE_THRESHOLD + c; + + pos = slope * VELOCITY_CURVE_THRESHOLD + + DECELERATION_PARABOLA_MULTIPLIER * x * x - + DECELERATION_PARABOLA_MULTIPLIER * c * c; + } else { + pos = Math.abs(velocity) * slope; + } + + pos = pos * Math.sign(velocity) + this._progress_scale; + pos = Math.clamp(pos, ...this._getBounds()); + + const index = this._findPointForProjection(pos, velocity); + + return this._snapPoints[index]; + } + + destroy() { + if (this._stageCaptureEvent) { + global.stage.disconnect(this._stageCaptureEvent); + this._stageCaptureEvent = 0; + } + } +}); \ No newline at end of file diff --git a/extension/src/utils/dbus.ts b/extension/src/utils/dbus.ts index c2fe7ce..ef7a86b 100644 --- a/extension/src/utils/dbus.ts +++ b/extension/src/utils/dbus.ts @@ -2,7 +2,6 @@ import { imports, global } from 'gnome-shell'; import Clutter from '@gi-types/clutter8'; import Gio from '@gi-types/gio2'; -import Meta from '@gi-types/meta8'; import GObject from '@gi-types/gobject2'; import { registerClass } from '../../common/utils/gobject'; import { ClutterEventType, CustomEventType } from '../../common/utils/clutter'; @@ -17,6 +16,9 @@ const X11GestureDaemonXml = ` + + + `; @@ -44,6 +46,17 @@ const DBusWrapperGIExtension = registerClass({ accumulator: GObject.AccumulatorType.TRUE_HANDLED, return_type: GObject.TYPE_BOOLEAN, }, + 'TouchpadPinch': { + param_types: [ + GObject.TYPE_STRING, // phase + GObject.TYPE_INT, // fingers + GObject.TYPE_DOUBLE, // angle_delta + GObject.TYPE_DOUBLE, // scale + GObject.TYPE_UINT], // time + flags: GObject.SignalFlags.RUN_LAST, + accumulator: GObject.AccumulatorType.TRUE_HANDLED, + return_type: GObject.TYPE_BOOLEAN, + }, }, Properties: {}, }, class DBusWrapperGIExtension extends GObject.Object { @@ -53,17 +66,16 @@ const DBusWrapperGIExtension = registerClass({ constructor() { super(); - if (!Meta.is_wayland_compositor()) { - const ProxyClass = Gio.DBusProxy.makeProxyWrapper(X11GestureDaemonXml); - this._proxy = new ProxyClass( - Gio.DBus.session, - 'org.gestureImprovements.gestures', - '/org/gestureImprovements/gestures', - ); + const ProxyClass = Gio.DBusProxy.makeProxyWrapper(X11GestureDaemonXml); + this._proxy = new ProxyClass( + Gio.DBus.session, + 'org.gestureImprovements.gestures', + '/org/gestureImprovements/gestures', + ); - this._proxyConnectSignalIds.push(this._proxy.connectSignal('TouchpadSwipe', this._handleDbusSwipeSignal.bind(this))); - this._proxyConnectSignalIds.push(this._proxy.connectSignal('TouchpadHold', this._handleDbusHoldSignal.bind(this))); - } + this._proxyConnectSignalIds.push(this._proxy.connectSignal('TouchpadSwipe', this._handleDbusSwipeSignal.bind(this))); + this._proxyConnectSignalIds.push(this._proxy.connectSignal('TouchpadHold', this._handleDbusHoldSignal.bind(this))); + this._proxyConnectSignalIds.push(this._proxy.connectSignal('TouchpadPinch', this._handleDbusPinchSignal.bind(this))); } dropProxy() { @@ -76,18 +88,35 @@ const DBusWrapperGIExtension = registerClass({ // eslint-disable-next-line @typescript-eslint/no-explicit-any _handleDbusSwipeSignal(_proxy: never, _sender: never, params: [any]): void { + // (siddu) const [sphase, fingers, dx, dy, time] = params[0]; this.emit('TouchpadSwipe', sphase, fingers, dx, dy, time); } // eslint-disable-next-line @typescript-eslint/no-explicit-any _handleDbusHoldSignal(_proxy: never, _sender: never, params: [any]): void { + // (siub) const [sphase, fingers, time, is_cancelled] = params[0]; this.emit('TouchpadHold', sphase, fingers, time, is_cancelled); } + + // eslint-disable-next-line @typescript-eslint/no-explicit-any + _handleDbusPinchSignal(_proxy: never, _sender: never, params: [any]): void { + // (siddu) + const [sphase, fingers, angle_delta, scale, time] = params[0]; + this.emit('TouchpadPinch', sphase, fingers, angle_delta, scale, time); + } }); -function GenerateEvent(type: number, sphase: string, fingers: number, time: number, dx?: number, dy?: number, is_cancelled?: boolean): CustomEventType { +type EventOptionalParams = Partial<{ + dx: number, + dy: number, + pinch_scale: number, + pinch_angle_delta: number, + is_cancelled: boolean, +}>; + +function GenerateEvent(type: number, sphase: string, fingers: number, time: number, params: EventOptionalParams): CustomEventType { return { type: () => type, get_gesture_phase: () => { @@ -97,13 +126,15 @@ function GenerateEvent(type: number, sphase: string, fingers: number, time: numb case 'Update': return Clutter.TouchpadGesturePhase.UPDATE; default: - return is_cancelled ? Clutter.TouchpadGesturePhase.CANCEL : Clutter.TouchpadGesturePhase.END; + return params.is_cancelled ? Clutter.TouchpadGesturePhase.CANCEL : Clutter.TouchpadGesturePhase.END; } }, get_touchpad_gesture_finger_count: () => fingers, get_coords: () => global.get_pointer().slice(0, 2) as [number, number], - get_gesture_motion_delta_unaccelerated: () => [dx ?? 0, dy ?? 0], + get_gesture_motion_delta_unaccelerated: () => [params.dx ?? 0, params.dy ?? 0], get_time: () => time, + get_gesture_pinch_scale: () => params.pinch_scale ?? 1.0, + get_gesture_pinch_angle_delta: () => params.pinch_angle_delta ?? 0, }; } @@ -112,23 +143,28 @@ let connectedSignalIds: number[] = []; export function subscribe(callback: (actor: never | undefined, event: CustomEventType) => boolean): void { if (!proxy) { - if (!Meta.is_wayland_compositor()) { - Util.spawn(['systemctl', '--user', 'start', 'gesture_improvements_gesture_daemon.service']); - } + Util.spawn(['systemctl', '--user', 'start', 'gesture_improvements_gesture_daemon.service']); connectedSignalIds = []; proxy = new DBusWrapperGIExtension(); } connectedSignalIds.push( proxy.connect('TouchpadSwipe', (_source, sphase, fingers, dx, dy, time) => { - const event = GenerateEvent(ClutterEventType.TOUCHPAD_SWIPE, sphase, fingers, time, dx, dy); + const event = GenerateEvent(ClutterEventType.TOUCHPAD_SWIPE, sphase, fingers, time, { dx, dy }); return callback(undefined, event); }), ); connectedSignalIds.push( proxy.connect('TouchpadHold', (_source, sphase, fingers, time, is_cancelled) => { - const event = GenerateEvent(ClutterEventType.TOUCHPAD_HOLD, sphase, fingers, time, undefined, undefined, is_cancelled); + const event = GenerateEvent(ClutterEventType.TOUCHPAD_HOLD, sphase, fingers, time, { is_cancelled }); + return callback(undefined, event); + }), + ); + + connectedSignalIds.push( + proxy.connect('TouchpadPinch', (_source, sphase, fingers, pinch_angle_delta, pinch_scale, time) => { + const event = GenerateEvent(ClutterEventType.TOUCHPAD_PINCH, sphase, fingers, time, { pinch_angle_delta, pinch_scale }); return callback(undefined, event); }), ); @@ -147,8 +183,6 @@ export function drop_proxy(): void { proxy.dropProxy(); proxy.run_dispose(); proxy = undefined; - if (!Meta.is_wayland_compositor()) { - Util.spawn(['systemctl', '--user', 'stop', 'gesture_improvements_gesture_daemon.service']); - } + Util.spawn(['systemctl', '--user', 'stop', 'gesture_improvements_gesture_daemon.service']); } } \ No newline at end of file diff --git a/extension/src/utils/pointsArithmetic.ts b/extension/src/utils/pointsArithmetic.ts new file mode 100644 index 0000000..d566cc4 --- /dev/null +++ b/extension/src/utils/pointsArithmetic.ts @@ -0,0 +1,79 @@ +export interface Point { + x: number, + y: number, +} + +interface TransformationMatrix { + 0: [number, number], + 1: [number, number], + delta: number, +} + +function sqaure_distance(p1: Point, p2: Point): number { + return (p1.x - p2.x) * (p1.x - p2.x) + + (p1.y - p2.y) * (p1.y - p2.y); +} + +function transform_point(matrix: TransformationMatrix, p: Point): Point { + return { + x: (matrix[0][0] * p.x + matrix[0][1] * p.y) / matrix.delta, + y: (matrix[1][0] * p.x + matrix[1][1] * p.y) / matrix.delta, + }; +} + +/** + * @param windows + * @returns centroid of points or undefined if array is empty + */ +export function findCentroid(points: Point[]): Point | undefined { + if (points.length === 0) + return undefined; + + return { + x: points.map(p => p.x).reduce((res, x) => res + x, 0) / points.length, + y: points.map(p => p.y).reduce((res, y) => res + y, 0) / points.length, + }; +} + +/** + * first convert points so that win and centroid point are on horizontal line + * and win is at origin and centroid point is on negative x axis + * then filter out points which on negative x area + * then distance between win and corner is equal to distance between win and point on x axis + * on parabola passing through corner, with vertex at win and focus at centroid + * @param win Center of window + * @param centroid centroid point of center of all windows + * @returns corner which is closest(according to algorithm) to window + * or undefined if win and centroid point are same or all corners are in opposite direction + */ +export function findCornerForWindow(win: Point, centroid: Point, corners: T[]): undefined | T { + const dist_w_m = Math.sqrt(sqaure_distance(win, centroid)); + if (dist_w_m === 0 || corners.length === 0) + return undefined; + + const transform_matrix: TransformationMatrix = { + 0: [win.x - centroid.x, win.y - centroid.y], + 1: [-win.y + centroid.y, win.x - centroid.x], + delta: dist_w_m, + }; + + log('mapped points'); + win = transform_point(transform_matrix, win); + log(`\twin: +${JSON.stringify(win)}`); + log(`\tcentroid: +${JSON.stringify(transform_point(transform_matrix, centroid))}`); + let mapped_corners = corners.map(c => { + const point = transform_point(transform_matrix, c); + point.x -= win.x; + point.y -= win.y; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + log(`\tposition<${(c as any)['position']}>: ${JSON.stringify(point)}`); + return { ...point, corner: c }; + }); + log('\n'); + + // ignore points which are on negative x axis (opposite direction to centroid->win array); + mapped_corners = mapped_corners.filter(c => c.x >= 0); + const corner_dists = mapped_corners.map(c => c.x + (c.y * c.y) / (2 * dist_w_m)); + const minIndex = corner_dists.indexOf(Math.min(...corner_dists)); + return mapped_corners[minIndex]?.corner; +} diff --git a/extension/ui/prefs.ui b/extension/ui/prefs.ui index 6162b4d..095b825 100644 --- a/extension/ui/prefs.ui +++ b/extension/ui/prefs.ui @@ -65,14 +65,14 @@ other gesture, if enabled, will be activated using 4-finger gesture. - + 36 36 36 36 vertical - + 12 @@ -80,7 +80,7 @@ other gesture, if enabled, will be activated using 4-finger gesture. start center - Gestures + Swipe Gestures @@ -152,40 +152,6 @@ other gesture, if enabled, will be activated using 4-finger gesture. - - - - - - 12 - 12 - 12 - 12 - 32 - - - - start - center - 1 - 0 - Show Desktop - - - - - - end - True - center - - - - - - - - @@ -220,40 +186,6 @@ other gesture, if enabled, will be activated using 4-finger gesture. - - - - - - 12 - 12 - 12 - 12 - 32 - - - - start - center - 1 - 0 - Move window to previous/next workspace - - - - - - end - True - center - - - - - - - - @@ -405,6 +337,132 @@ other gesture, if enabled, will be activated using 4-finger gesture. + + + + 12 + + + start + center + Pinch Gestures + + + + + + + + + + + 36 + + + none + + + + + + + 12 + 12 + 12 + 12 + 32 + + + + start + center + 1 + 0 + Show Desktop + + + + + + end + True + center + + + + + + + + + + + + + + + + + 12 + + + start + center + Hold & Swipe Gestures + + + + + + + + + + + 36 + + + none + + + + + + + 12 + 12 + 12 + 12 + 32 + + + + start + center + 1 + 0 + Move window to previous/next workspace + + + + + + end + True + center + + + + + + + + + + + + + @@ -465,15 +523,15 @@ other gesture, if enabled, will be activated using 4-finger gesture. False touchpad_scale_adjustment - 0.5 - 1 - 2 + + + - + center end 5 @@ -616,6 +674,73 @@ other gesture, if enabled, will be activated using 4-finger gesture. + + + + + + 12 + 12 + 12 + 12 + 32 + + + + start + center + 1 + 0 + Touchpad pinch speed + + + + + + horizontal + end + 1 + + + + 300 + start + end + False + + + 0.00 + -3.3219280948873626 + 3.3219280948873626 + 0.01 + + + + + + + + + + + + + center + end + 5 + False + False + 1.00 + + + + + + + + + + diff --git a/gnome-shell/index.d.ts b/gnome-shell/index.d.ts index 936524b..86f1383 100644 --- a/gnome-shell/index.d.ts +++ b/gnome-shell/index.d.ts @@ -85,6 +85,7 @@ declare namespace imports { const layoutManager: { uiGroup: Clutter.Actor, panelBox: St.BoxLayout, + monitors: __shell_private_types.IMonitorState[] primaryMonitor: __shell_private_types.IMonitorState, currentMonitor: __shell_private_types.IMonitorState, getWorkAreaForMonitor: (index: number) => Meta.Rectangle, @@ -195,7 +196,7 @@ declare namespace imports { namespace layout { declare class MonitorConstraint extends Clutter.Constraint { - constructor(params: Partial<{ primary: boolean }>); + constructor(params: Partial<{ primary: boolean, index: number }>); } } } From d698e03b7510aed2fd05de19d83f1d609d80f3a5 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sat, 20 Nov 2021 08:41:34 +0530 Subject: [PATCH 078/155] cleanup: create settings.ts --- extension/common/prefs.ts | 54 +--------------------- extension/common/settings.ts | 53 +++++++++++++++++++++ extension/common/utils/logging.ts | 4 +- extension/common/utils/prefsUtils.ts | 18 -------- extension/constants.ts | 2 +- extension/extension.ts | 2 +- extension/src/gestures.ts | 2 +- extension/src/pinchGestures/showDesktop.ts | 3 -- extension/src/utils/dbus.ts | 2 + gnome-shell/global.d.ts | 1 + 10 files changed, 63 insertions(+), 78 deletions(-) create mode 100644 extension/common/settings.ts delete mode 100644 extension/common/utils/prefsUtils.ts diff --git a/extension/common/prefs.ts b/extension/common/prefs.ts index 9b2740a..055f671 100644 --- a/extension/common/prefs.ts +++ b/extension/common/prefs.ts @@ -2,59 +2,7 @@ import Gio from '@gi-types/gio2'; import Gtk from '@gi-types/gtk4'; import GObject from '@gi-types/gobject2'; import { CanEnableMinimizeGesture } from './utils/prefUtils'; - -// define enum -export enum AnimatePanel { - NONE = 0, - SWITCH_WORKSPACE = 1, - MOVE_WINDOW = 2, - SWITCH_WORKSPACE_AND_MOVE_WINDOW = 3, -} - -type BooleanSettingsKeys = - 'default-session-workspace' | - 'default-overview' | - 'allow-minimize-window' | - 'follow-natural-scroll' | - 'enable-alttab-gesture' | - 'enable-window-manipulation-gesture' | - 'enable-move-window-to-workspace' | - 'enable-show-desktop' - ; - -type IntegerSettingsKeys = - 'alttab-delay' - ; -type DoubleSettingsKeys = - 'touchpad-speed-scale' | - 'touchpad-pinch-speed' - ; - -export type AllSettingsKeys = - BooleanSettingsKeys | - IntegerSettingsKeys | - DoubleSettingsKeys | - 'animate-panel' - ; - -type AllUIObjectKeys = - AllSettingsKeys | - 'touchpad-speed_scale_display-value' | - 'touchpad-pinch-speed_display-value' | - 'allow-minimize-window_box-row' | - 'alttab-delay_box-row' | - 'animate-panel_box-row' - ; - -type KeysThatStartsWith = K extends `${U}${infer _R}` ? K : never; -export type GioSettings = Omit> & { - get_boolean(key: BooleanSettingsKeys): boolean; - get_int(key: IntegerSettingsKeys): number; - get_double(key: DoubleSettingsKeys): number; - set_double(key: DoubleSettingsKeys, value: number): void; - get_enum(key: 'animate-panel'): AnimatePanel; - set_enum(key: 'animate-panel', value: AnimatePanel): void; -} +import { AllUIObjectKeys, BooleanSettingsKeys, DoubleSettingsKeys, GioSettings, IntegerSettingsKeys } from './settings'; type GtkBuilder = Omit & { get_object(name: AllUIObjectKeys): T; diff --git a/extension/common/settings.ts b/extension/common/settings.ts new file mode 100644 index 0000000..abcaaa1 --- /dev/null +++ b/extension/common/settings.ts @@ -0,0 +1,53 @@ +import Gio from '@gi-types/gio2'; + +// define enum +export enum AnimatePanel { + NONE = 0, + SWITCH_WORKSPACE = 1, + MOVE_WINDOW = 2, + SWITCH_WORKSPACE_AND_MOVE_WINDOW = 3, +} + +export type BooleanSettingsKeys = + 'default-session-workspace' | + 'default-overview' | + 'allow-minimize-window' | + 'follow-natural-scroll' | + 'enable-alttab-gesture' | + 'enable-window-manipulation-gesture' | + 'enable-move-window-to-workspace' | + 'enable-show-desktop' + ; + +export type IntegerSettingsKeys = + 'alttab-delay' + ; +export type DoubleSettingsKeys = + 'touchpad-speed-scale' | + 'touchpad-pinch-speed' + ; + +export type AllSettingsKeys = + BooleanSettingsKeys | + IntegerSettingsKeys | + DoubleSettingsKeys | + 'animate-panel' + ; + +export type AllUIObjectKeys = + AllSettingsKeys | + 'touchpad-speed_scale_display-value' | + 'touchpad-pinch-speed_display-value' | + 'allow-minimize-window_box-row' | + 'alttab-delay_box-row' | + 'animate-panel_box-row' + ; + +export type GioSettings = Omit> & { + get_boolean(key: BooleanSettingsKeys): boolean; + get_int(key: IntegerSettingsKeys): number; + get_double(key: DoubleSettingsKeys): number; + set_double(key: DoubleSettingsKeys, value: number): void; + get_enum(key: 'animate-panel'): AnimatePanel; + set_enum(key: 'animate-panel', value: AnimatePanel): void; +} diff --git a/extension/common/utils/logging.ts b/extension/common/utils/logging.ts index e681fb6..896c5e4 100644 --- a/extension/common/utils/logging.ts +++ b/extension/common/utils/logging.ts @@ -1,7 +1,9 @@ -export function printStack() { +export function printStack(message: string) { const stack = new Error().stack; if (stack) { const lines = stack.split('\n')[1].split('@'); log(`[DEBUG]:: in function ${lines[0]} at ${lines[2]}`); } + else + log(`${message}`); } diff --git a/extension/common/utils/prefsUtils.ts b/extension/common/utils/prefsUtils.ts deleted file mode 100644 index 55781cf..0000000 --- a/extension/common/utils/prefsUtils.ts +++ /dev/null @@ -1,18 +0,0 @@ -import Gio from '@gi-types/gio2'; - -function getShellSettings() { - return new Gio.Settings({schema_id: 'org.gnome.shell'}); -} - -export function CanEnableMinimizeGesture() { - const extensionsWhichCanMinimizeToBottom = [ - 'dash-to-dock@micxgx.gmail.com', - 'dash-to-panel@jderose9.github.com', - 'window-list@gnome-shell-extensions.gcampax.github.com', - 'ubuntu-dock@ubuntu.com', - ]; - - const shellSettings = getShellSettings(); - const enabledExtensionsIds = shellSettings.get_strv('enabled-extensions'); - return enabledExtensionsIds.some(extensionId => extensionsWhichCanMinimizeToBottom.includes(extensionId)); -} \ No newline at end of file diff --git a/extension/constants.ts b/extension/constants.ts index b469091..bae3e03 100644 --- a/extension/constants.ts +++ b/extension/constants.ts @@ -1,5 +1,5 @@ -import { AnimatePanel } from './common/prefs'; +import { AnimatePanel } from './common/settings'; // FIXME: ideally these values matches physical touchpad size. We can get the // correct values for gnome-shell specifically, since mutter uses libinput diff --git a/extension/extension.ts b/extension/extension.ts index 0a2625f..ef200a8 100644 --- a/extension/extension.ts +++ b/extension/extension.ts @@ -7,7 +7,7 @@ import { OverviewRoundTripGestureExtension } from './src/overviewRoundTrip'; import { SnapWindowExtension } from './src/snapWindow'; import * as DBusUtils from './src/utils/dbus'; import { imports } from 'gnome-shell'; -import { AllSettingsKeys, AnimatePanel, GioSettings } from './common/prefs'; +import { AllSettingsKeys, AnimatePanel, GioSettings } from './common/settings'; import { AltTabConstants, ExtSettings, TouchpadConstants } from './constants'; import { ShowDesktopExtension } from './src/pinchGestures/showDesktop'; diff --git a/extension/src/gestures.ts b/extension/src/gestures.ts index a4905f0..82f2fc3 100644 --- a/extension/src/gestures.ts +++ b/extension/src/gestures.ts @@ -12,7 +12,7 @@ import { OverviewControlsState, ExtSettings } from '../constants'; import { CustomEventType } from '../common/utils/clutter'; import { easeActor } from './utils/environment'; import { DummyCyclicPanel } from './holdGestures/animatePanel'; -import { AnimatePanel } from '../common/prefs'; +import { AnimatePanel } from '../common/settings'; declare interface ShallowSwipeTrackerT { orientation: Clutter.Orientation, diff --git a/extension/src/pinchGestures/showDesktop.ts b/extension/src/pinchGestures/showDesktop.ts index 57c888b..623be74 100644 --- a/extension/src/pinchGestures/showDesktop.ts +++ b/extension/src/pinchGestures/showDesktop.ts @@ -8,7 +8,6 @@ const Main = imports.ui.main; const Layout = imports.ui.layout; const { lerp } = imports.misc.util; -import { printStack } from '../../common/utils/logging'; import { TouchpadPinchGesture } from '../trackers/pinchTracker'; import { easeActor } from '../utils/environment'; import { findCentroid, findCornerForWindow, Point } from '../utils/pointsArithmetic'; @@ -303,7 +302,6 @@ export class ShowDesktopExtension implements ISubExtension { } gestureBegin(tracker: Type_TouchpadPinchGesture) { - printStack(); log(JSON.stringify({ _workspaceManagerState: this._workspaceManagerState })); this._extensionState = ExtensionState.ANIMATING; @@ -338,7 +336,6 @@ export class ShowDesktopExtension implements ISubExtension { gestureEnd(_tracker: unknown, duration: number, endProgress: number) { // endProgress 0 -> NORMAL state, 1 -> SHOW Desktop - printStack(); for (const monitor of this._monitorGroups) monitor.gestureEnd(endProgress, duration); diff --git a/extension/src/utils/dbus.ts b/extension/src/utils/dbus.ts index ef7a86b..930cc3f 100644 --- a/extension/src/utils/dbus.ts +++ b/extension/src/utils/dbus.ts @@ -5,6 +5,7 @@ import Gio from '@gi-types/gio2'; import GObject from '@gi-types/gobject2'; import { registerClass } from '../../common/utils/gobject'; import { ClutterEventType, CustomEventType } from '../../common/utils/clutter'; +import { printStack } from '../../common/utils/logging'; const Util = imports.misc.util; @@ -143,6 +144,7 @@ let connectedSignalIds: number[] = []; export function subscribe(callback: (actor: never | undefined, event: CustomEventType) => boolean): void { if (!proxy) { + printStack('starting dbus service via spawn'); Util.spawn(['systemctl', '--user', 'start', 'gesture_improvements_gesture_daemon.service']); connectedSignalIds = []; proxy = new DBusWrapperGIExtension(); diff --git a/gnome-shell/global.d.ts b/gnome-shell/global.d.ts index 4c9012a..9e633bd 100644 --- a/gnome-shell/global.d.ts +++ b/gnome-shell/global.d.ts @@ -18,6 +18,7 @@ declare interface Math { // types declare type KeysOfType = { [P in keyof T]: T[P] extends U ? P : never; }[keyof T]; +declare type KeysThatStartsWith = K extends `${U}${infer _R}` ? K : never; declare interface ExtensionMeta { uuid: string, From af570164be6d559a020768ed9d08df2ee98b1ace Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sat, 20 Nov 2021 19:28:33 +0530 Subject: [PATCH 079/155] showDesktop: Set container above window group This is to set container below dash and panel --- extension/common/utils/clutter.ts | 10 +++++----- extension/src/pinchGestures/showDesktop.ts | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/extension/common/utils/clutter.ts b/extension/common/utils/clutter.ts index 0fd19a1..99a77fe 100644 --- a/extension/common/utils/clutter.ts +++ b/extension/common/utils/clutter.ts @@ -3,9 +3,9 @@ import { EventType, Event } from '@gi-types/clutter8'; export const ClutterEventType = { TOUCHPAD_HOLD: 1234, ...EventType }; export type CustomEventType = Pick< - Event, - 'type' | 'get_gesture_phase' | - 'get_touchpad_gesture_finger_count' | 'get_time' | - 'get_coords' | 'get_gesture_motion_delta_unaccelerated' | - 'get_gesture_pinch_scale' | 'get_gesture_pinch_angle_delta' + Event, + 'type' | 'get_gesture_phase' | + 'get_touchpad_gesture_finger_count' | 'get_time' | + 'get_coords' | 'get_gesture_motion_delta_unaccelerated' | + 'get_gesture_pinch_scale' | 'get_gesture_pinch_angle_delta' >; \ No newline at end of file diff --git a/extension/src/pinchGestures/showDesktop.ts b/extension/src/pinchGestures/showDesktop.ts index 623be74..f83ba73 100644 --- a/extension/src/pinchGestures/showDesktop.ts +++ b/extension/src/pinchGestures/showDesktop.ts @@ -69,7 +69,7 @@ class MonitorGroup { ]; this._container.set_clip_to_allocation(true); - Main.layoutManager.uiGroup.add_child(this._container); + Main.layoutManager.uiGroup.insert_child_above(this._container, global.window_group); } _addWindowActor(windowActor: Meta.WindowActor) { From 0d1c2ff5cf05f527051da0c3600c590404757991 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sat, 20 Nov 2021 20:05:22 +0530 Subject: [PATCH 080/155] showDesktop: use get_window_actors to get window actors --- extension/src/pinchGestures/showDesktop.ts | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/extension/src/pinchGestures/showDesktop.ts b/extension/src/pinchGestures/showDesktop.ts index f83ba73..e9475c8 100644 --- a/extension/src/pinchGestures/showDesktop.ts +++ b/extension/src/pinchGestures/showDesktop.ts @@ -169,16 +169,16 @@ class MonitorGroup { clone.x = lerp(translation.start.x, translation.end.x, -progress); clone.y = lerp(translation.start.y, translation.end.y, -progress); clone.opacity = lerp(255, 128, -progress); - // if (!value.actor.visible) - // value.actor.show(); }); } gestureEnd(progress: WorkspaceManagerState, duration: number) { this._windowActorClones.forEach(actorClone => { const { clone, translation, windowActor } = actorClone; - if (translation === undefined) + if (translation === undefined) { + clone.destroy(); return; + } easeActor(clone, { x: lerp(translation.start.x, translation.end.x, -progress), @@ -281,18 +281,14 @@ export class ShowDesktopExtension implements ISubExtension { const types = [Meta.WindowType.MODAL_DIALOG, Meta.WindowType.NORMAL, Meta.WindowType.DIALOG]; if (this._workspaceManagerState === WorkspaceManagerState.DEFAULT) { - const windowActors = global.window_group - .get_children() - .filter((w): w is Meta.WindowActor => w instanceof Meta.WindowActor) - .filter(w => w.meta_window.is_always_on_all_workspaces() || w.meta_window.get_workspace().index === this._workspace?.index); - - this._minimizingWindows = Array.from(this._windows) - .map(win => win.get_compositor_private() as Meta.WindowActor) - .filter(actor => windowActors.includes(actor)) - // top actors will be at the start - .sort((a, b) => windowActors.indexOf(b) - windowActors.indexOf(a)) + this._minimizingWindows = global + .get_window_actors() + // top actors should be at the beginning + .reverse() .map(actor => actor.meta_window) .filter(win => + this._windows.has(win) && + (win.is_always_on_all_workspaces() || win.get_workspace().index === this._workspace?.index) && !win.minimized && types.includes(win.get_window_type()) && !this._isDesktopIconExtensionWindow(win)); From 4e552f8242f3a5bd402602741c5737ee8a3572c0 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sat, 20 Nov 2021 21:12:36 +0530 Subject: [PATCH 081/155] prefs: Add preference for pinch gestures --- extension/common/prefs.ts | 14 ++++-- extension/common/settings.ts | 44 ++++++++++++++---- extension/common/utils/prefUtils.ts | 2 +- extension/extension.ts | 19 ++++++-- ...extensions.gestureImprovements.gschema.xml | 16 +++++-- extension/src/pinchGestures/showDesktop.ts | 8 ++-- extension/ui/prefs.ui | 46 +++++++++++++++++-- 7 files changed, 116 insertions(+), 33 deletions(-) diff --git a/extension/common/prefs.ts b/extension/common/prefs.ts index 055f671..17f8a5f 100644 --- a/extension/common/prefs.ts +++ b/extension/common/prefs.ts @@ -2,7 +2,7 @@ import Gio from '@gi-types/gio2'; import Gtk from '@gi-types/gtk4'; import GObject from '@gi-types/gobject2'; import { CanEnableMinimizeGesture } from './utils/prefUtils'; -import { AllUIObjectKeys, BooleanSettingsKeys, DoubleSettingsKeys, GioSettings, IntegerSettingsKeys } from './settings'; +import { AllUIObjectKeys, BooleanSettingsKeys, DoubleSettingsKeys, EnumSettingsKeys, GioSettings, IntegerSettingsKeys } from './settings'; type GtkBuilder = Omit & { get_object(name: AllUIObjectKeys): T; @@ -37,11 +37,14 @@ function bind_boolean_value(key: BooleanSettingsKeys, settings: GioSettings, bui }); } -function bind_combo_box(key: 'animate-panel', settings: GioSettings, builder: GtkBuilder) { +function bind_combo_box(key: EnumSettingsKeys, settings: GioSettings, builder: GtkBuilder) { const comboBox = builder.get_object(key); - comboBox.set_active_id(settings.get_enum(key).toString()); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const enumKey = key as any; + comboBox.set_active_id(settings.get_enum(enumKey).toString()); + comboBox.connect('changed', () => { - settings.set_enum(key, parseInt(comboBox.active_id)); + settings.set_enum(enumKey, parseInt(comboBox.active_id)); }); } @@ -97,9 +100,10 @@ export function getPrefsWidget(settings: Gio.Settin showEnableMinimizeButton('allow-minimize-window', 'allow-minimize-window_box-row', settings, builder); - bind_boolean_value('enable-show-desktop', settings, builder); bind_boolean_value('enable-move-window-to-workspace', settings, builder, { sensitiveRowKeys: ['animate-panel_box-row'] }); bind_combo_box('animate-panel', settings, builder); + bind_combo_box('pinch-3-finger-gesture', settings, builder); + bind_combo_box('pinch-4-finger-gesture', settings, builder); const main_prefs = builder.get_object('main_prefs'); const header_bar = builder.get_object('header_bar'); diff --git a/extension/common/settings.ts b/extension/common/settings.ts index abcaaa1..7ab800e 100644 --- a/extension/common/settings.ts +++ b/extension/common/settings.ts @@ -8,6 +8,12 @@ export enum AnimatePanel { SWITCH_WORKSPACE_AND_MOVE_WINDOW = 3, } +// define enum +export enum PinchGestureType { + NONE = 0, + SHOW_DESKTOP = 1, +} + export type BooleanSettingsKeys = 'default-session-workspace' | 'default-overview' | @@ -15,8 +21,7 @@ export type BooleanSettingsKeys = 'follow-natural-scroll' | 'enable-alttab-gesture' | 'enable-window-manipulation-gesture' | - 'enable-move-window-to-workspace' | - 'enable-show-desktop' + 'enable-move-window-to-workspace' ; export type IntegerSettingsKeys = @@ -27,11 +32,18 @@ export type DoubleSettingsKeys = 'touchpad-pinch-speed' ; +export type EnumSettingsKeys = + 'animate-panel' | + 'pinch-3-finger-gesture' | + 'pinch-4-finger-gesture' + ; + + export type AllSettingsKeys = BooleanSettingsKeys | IntegerSettingsKeys | DoubleSettingsKeys | - 'animate-panel' + EnumSettingsKeys ; export type AllUIObjectKeys = @@ -43,11 +55,23 @@ export type AllUIObjectKeys = 'animate-panel_box-row' ; -export type GioSettings = Omit> & { - get_boolean(key: BooleanSettingsKeys): boolean; - get_int(key: IntegerSettingsKeys): number; - get_double(key: DoubleSettingsKeys): number; - set_double(key: DoubleSettingsKeys, value: number): void; - get_enum(key: 'animate-panel'): AnimatePanel; - set_enum(key: 'animate-panel', value: AnimatePanel): void; +type Enum_Functions = { + get_enum(key: K): T; + set_enum(key: K, value: T): void; } + +type SettingsEnumFunctions = + Enum_Functions<'animate-panel', AnimatePanel> & + Enum_Functions<'pinch-3-finger-gesture' | 'pinch-4-finger-gesture', PinchGestureType> + ; + +export type GioSettings = + Omit> & + { + get_boolean(key: BooleanSettingsKeys): boolean; + get_int(key: IntegerSettingsKeys): number; + get_double(key: DoubleSettingsKeys): number; + set_double(key: DoubleSettingsKeys, value: number): void; + } & + SettingsEnumFunctions + ; diff --git a/extension/common/utils/prefUtils.ts b/extension/common/utils/prefUtils.ts index 55781cf..9352cca 100644 --- a/extension/common/utils/prefUtils.ts +++ b/extension/common/utils/prefUtils.ts @@ -1,7 +1,7 @@ import Gio from '@gi-types/gio2'; function getShellSettings() { - return new Gio.Settings({schema_id: 'org.gnome.shell'}); + return new Gio.Settings({ schema_id: 'org.gnome.shell' }); } export function CanEnableMinimizeGesture() { diff --git a/extension/extension.ts b/extension/extension.ts index ef200a8..547ccc8 100644 --- a/extension/extension.ts +++ b/extension/extension.ts @@ -7,7 +7,7 @@ import { OverviewRoundTripGestureExtension } from './src/overviewRoundTrip'; import { SnapWindowExtension } from './src/snapWindow'; import * as DBusUtils from './src/utils/dbus'; import { imports } from 'gnome-shell'; -import { AllSettingsKeys, AnimatePanel, GioSettings } from './common/settings'; +import { AllSettingsKeys, AnimatePanel, GioSettings, PinchGestureType } from './common/settings'; import { AltTabConstants, ExtSettings, TouchpadConstants } from './constants'; import { ShowDesktopExtension } from './src/pinchGestures/showDesktop'; @@ -70,7 +70,10 @@ class Extension { _enable() { this._initializeSettings(); this._extensions = []; - if (this.settings?.get_boolean('enable-alttab-gesture')) + if (this.settings === undefined) + return; + + if (this.settings.get_boolean('enable-alttab-gesture')) this._extensions.push(new AltTabGestureExtension()); this._extensions.push( @@ -78,11 +81,17 @@ class Extension { new GestureExtension(), ); - if (this.settings?.get_boolean('enable-window-manipulation-gesture')) + if (this.settings.get_boolean('enable-window-manipulation-gesture')) this._extensions.push(new SnapWindowExtension()); - if (this.settings?.get_boolean('enable-show-desktop')) - this._extensions.push(new ShowDesktopExtension()); + // pinch to show desktop + const showDesktopFingers = [ + this.settings.get_enum('pinch-3-finger-gesture') === PinchGestureType.SHOW_DESKTOP ? 3 : undefined, + this.settings.get_enum('pinch-4-finger-gesture') === PinchGestureType.SHOW_DESKTOP ? 4 : undefined, + ].filter((f): f is number => typeof f === 'number'); + + if (showDesktopFingers.length) + this._extensions.push(new ShowDesktopExtension(showDesktopFingers)); this._extensions.forEach(extension => extension.apply()); } diff --git a/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml b/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml index 5bb44c6..358afde 100644 --- a/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml +++ b/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml @@ -5,6 +5,10 @@ + + + + @@ -44,13 +48,17 @@ true Enable move window to workspace gesture - - true - Enable show desktop gesture - 'MOVE_WINDOW' When to animate panel + + 'SHOW_DESKTOP' + Gesture for 3 finger pinch + + + 'NONE' + Gesture for 4 finger pinch + \ No newline at end of file diff --git a/extension/src/pinchGestures/showDesktop.ts b/extension/src/pinchGestures/showDesktop.ts index e9475c8..00c112b 100644 --- a/extension/src/pinchGestures/showDesktop.ts +++ b/extension/src/pinchGestures/showDesktop.ts @@ -229,14 +229,16 @@ export class ShowDesktopExtension implements ISubExtension { private _minimizingWindows: Meta.Window[] = []; private _workspaceManagerState = WorkspaceManagerState.DEFAULT; private _monitorGroups: MonitorGroup[] = []; - private _pinchTracker?: Type_TouchpadPinchGesture; + private _pinchTracker: Type_TouchpadPinchGesture; - apply(): void { + constructor(nfingers: number[]) { this._pinchTracker = new TouchpadPinchGesture({ - nfingers: [3], + nfingers: nfingers, allowedModes: Shell.ActionMode.NORMAL, }); + } + apply(): void { this._pinchTracker.connect('begin', this.gestureBegin.bind(this)); this._pinchTracker.connect('update', this.gestureUpdate.bind(this)); this._pinchTracker.connect('end', this.gestureEnd.bind(this)); diff --git a/extension/ui/prefs.ui b/extension/ui/prefs.ui index 095b825..db96601 100644 --- a/extension/ui/prefs.ui +++ b/extension/ui/prefs.ui @@ -361,7 +361,7 @@ other gesture, if enabled, will be activated using 4-finger gesture. none - + @@ -378,15 +378,51 @@ other gesture, if enabled, will be activated using 4-finger gesture. center 1 0 - Show Desktop + 3 finger pinch - - end - True + + + None + Show Desktop + + + + + + + + + + + + + + + 12 + 12 + 12 + 12 + 32 + + + + start center + 1 + 0 + 4 finger pinch + + + + + + + None + Show Desktop + From a12ae2616a6708d87efa958ce4cb4f198c22f91b Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sun, 21 Nov 2021 08:55:22 +0530 Subject: [PATCH 082/155] logging: JSONify message --- extension/common/utils/logging.ts | 8 +++++--- extension/src/utils/dbus.ts | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/extension/common/utils/logging.ts b/extension/common/utils/logging.ts index 896c5e4..c773b52 100644 --- a/extension/common/utils/logging.ts +++ b/extension/common/utils/logging.ts @@ -1,9 +1,11 @@ -export function printStack(message: string) { +export function printStack(message?: unknown) { const stack = new Error().stack; + let prefix = ''; if (stack) { const lines = stack.split('\n')[1].split('@'); log(`[DEBUG]:: in function ${lines[0]} at ${lines[2]}`); + prefix = '\t'; } - else - log(`${message}`); + if (message !== undefined) + log(`${prefix}${JSON.stringify(message)}`); } diff --git a/extension/src/utils/dbus.ts b/extension/src/utils/dbus.ts index 930cc3f..a257320 100644 --- a/extension/src/utils/dbus.ts +++ b/extension/src/utils/dbus.ts @@ -144,7 +144,7 @@ let connectedSignalIds: number[] = []; export function subscribe(callback: (actor: never | undefined, event: CustomEventType) => boolean): void { if (!proxy) { - printStack('starting dbus service via spawn'); + printStack('starting dbus service \'gesture_improvements_gesture_daemon.service\' via spawn'); Util.spawn(['systemctl', '--user', 'start', 'gesture_improvements_gesture_daemon.service']); connectedSignalIds = []; proxy = new DBusWrapperGIExtension(); From 79b161ee30cfa4dd0f5f36c159c2f28b240ad4d7 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sun, 21 Nov 2021 09:22:09 +0530 Subject: [PATCH 083/155] cleanup: Remove hold gesture to make seperate PR --- extension/common/prefs.ts | 2 - extension/common/settings.ts | 16 +- extension/common/utils/clutter.ts | 4 +- extension/constants.ts | 5 - extension/extension.ts | 8 +- ...extensions.gestureImprovements.gschema.xml | 8 - extension/src/gestures.ts | 227 +----------------- extension/src/holdGestures/animatePanel.ts | 112 --------- extension/src/swipeTracker.ts | 53 +--- extension/src/utils/dbus.ts | 34 +-- extension/ui/prefs.ui | 99 -------- gnome-shell/index.d.ts | 21 +- 12 files changed, 24 insertions(+), 565 deletions(-) delete mode 100644 extension/src/holdGestures/animatePanel.ts diff --git a/extension/common/prefs.ts b/extension/common/prefs.ts index 17f8a5f..4c52623 100644 --- a/extension/common/prefs.ts +++ b/extension/common/prefs.ts @@ -100,8 +100,6 @@ export function getPrefsWidget(settings: Gio.Settin showEnableMinimizeButton('allow-minimize-window', 'allow-minimize-window_box-row', settings, builder); - bind_boolean_value('enable-move-window-to-workspace', settings, builder, { sensitiveRowKeys: ['animate-panel_box-row'] }); - bind_combo_box('animate-panel', settings, builder); bind_combo_box('pinch-3-finger-gesture', settings, builder); bind_combo_box('pinch-4-finger-gesture', settings, builder); diff --git a/extension/common/settings.ts b/extension/common/settings.ts index 7ab800e..b893f89 100644 --- a/extension/common/settings.ts +++ b/extension/common/settings.ts @@ -1,13 +1,5 @@ import Gio from '@gi-types/gio2'; -// define enum -export enum AnimatePanel { - NONE = 0, - SWITCH_WORKSPACE = 1, - MOVE_WINDOW = 2, - SWITCH_WORKSPACE_AND_MOVE_WINDOW = 3, -} - // define enum export enum PinchGestureType { NONE = 0, @@ -20,8 +12,7 @@ export type BooleanSettingsKeys = 'allow-minimize-window' | 'follow-natural-scroll' | 'enable-alttab-gesture' | - 'enable-window-manipulation-gesture' | - 'enable-move-window-to-workspace' + 'enable-window-manipulation-gesture' ; export type IntegerSettingsKeys = @@ -33,7 +24,6 @@ export type DoubleSettingsKeys = ; export type EnumSettingsKeys = - 'animate-panel' | 'pinch-3-finger-gesture' | 'pinch-4-finger-gesture' ; @@ -51,8 +41,7 @@ export type AllUIObjectKeys = 'touchpad-speed_scale_display-value' | 'touchpad-pinch-speed_display-value' | 'allow-minimize-window_box-row' | - 'alttab-delay_box-row' | - 'animate-panel_box-row' + 'alttab-delay_box-row' ; type Enum_Functions = { @@ -61,7 +50,6 @@ type Enum_Functions = { } type SettingsEnumFunctions = - Enum_Functions<'animate-panel', AnimatePanel> & Enum_Functions<'pinch-3-finger-gesture' | 'pinch-4-finger-gesture', PinchGestureType> ; diff --git a/extension/common/utils/clutter.ts b/extension/common/utils/clutter.ts index 99a77fe..dff3316 100644 --- a/extension/common/utils/clutter.ts +++ b/extension/common/utils/clutter.ts @@ -1,6 +1,4 @@ -import { EventType, Event } from '@gi-types/clutter8'; - -export const ClutterEventType = { TOUCHPAD_HOLD: 1234, ...EventType }; +import { Event } from '@gi-types/clutter8'; export type CustomEventType = Pick< Event, diff --git a/extension/constants.ts b/extension/constants.ts index bae3e03..f93a9d5 100644 --- a/extension/constants.ts +++ b/extension/constants.ts @@ -1,6 +1,3 @@ - -import { AnimatePanel } from './common/settings'; - // FIXME: ideally these values matches physical touchpad size. We can get the // correct values for gnome-shell specifically, since mutter uses libinput // directly, but GTK apps cannot get it, so use an arbitrary value so that @@ -36,8 +33,6 @@ export const ExtSettings = { DEFAULT_OVERVIEW_GESTURE: false, ALLOW_MINIMIZE_WINDOW: false, FOLLOW_NATURAL_SCROLL: true, - ENABLE_MOVE_WINDOW_TO_WORKSPACE: true, - ANIMATE_PANEL: AnimatePanel.MOVE_WINDOW, }; export const RELOAD_DELAY = 150; // reload extension delay in ms \ No newline at end of file diff --git a/extension/extension.ts b/extension/extension.ts index 547ccc8..88e7a13 100644 --- a/extension/extension.ts +++ b/extension/extension.ts @@ -7,7 +7,7 @@ import { OverviewRoundTripGestureExtension } from './src/overviewRoundTrip'; import { SnapWindowExtension } from './src/snapWindow'; import * as DBusUtils from './src/utils/dbus'; import { imports } from 'gnome-shell'; -import { AllSettingsKeys, AnimatePanel, GioSettings, PinchGestureType } from './common/settings'; +import { AllSettingsKeys, GioSettings, PinchGestureType } from './common/settings'; import { AltTabConstants, ExtSettings, TouchpadConstants } from './constants'; import { ShowDesktopExtension } from './src/pinchGestures/showDesktop'; @@ -108,12 +108,6 @@ class Extension { ExtSettings.DEFAULT_OVERVIEW_GESTURE = this.settings.get_boolean('default-overview'); ExtSettings.ALLOW_MINIMIZE_WINDOW = this.settings.get_boolean('allow-minimize-window'); ExtSettings.FOLLOW_NATURAL_SCROLL = this.settings.get_boolean('follow-natural-scroll'); - ExtSettings.ENABLE_MOVE_WINDOW_TO_WORKSPACE = this.settings.get_boolean('enable-move-window-to-workspace'); - - if (ExtSettings.ENABLE_MOVE_WINDOW_TO_WORKSPACE) - ExtSettings.ANIMATE_PANEL = this.settings.get_enum('animate-panel'); - else - ExtSettings.ANIMATE_PANEL = AnimatePanel.NONE; TouchpadConstants.SWIPE_MULTIPLIER = Constants.TouchpadConstants.DEFAULT_SWIPE_MULTIPLIER * this.settings.get_double('touchpad-speed-scale'); TouchpadConstants.PINCH_MULTIPLIER = Constants.TouchpadConstants.DEFAULT_PINCH_MULTIPLIER * this.settings.get_double('touchpad-pinch-speed'); diff --git a/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml b/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml index 358afde..c29b04b 100644 --- a/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml +++ b/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml @@ -44,14 +44,6 @@ true Enable Window manipulation gesture - - true - Enable move window to workspace gesture - - - 'MOVE_WINDOW' - When to animate panel - 'SHOW_DESKTOP' Gesture for 3 finger pinch diff --git a/extension/src/gestures.ts b/extension/src/gestures.ts index 82f2fc3..e7b556d 100644 --- a/extension/src/gestures.ts +++ b/extension/src/gestures.ts @@ -1,8 +1,6 @@ import GObject from '@gi-types/gobject2'; import Shell from '@gi-types/shell0'; -import Meta from '@gi-types/meta8'; import Clutter from '@gi-types/clutter8'; -import St from '@gi-types/st1'; import { imports, global, __shell_private_types } from 'gnome-shell'; const Main = imports.ui.main; @@ -10,9 +8,6 @@ const Main = imports.ui.main; import { createSwipeTracker, TouchpadSwipeGesture } from './swipeTracker'; import { OverviewControlsState, ExtSettings } from '../constants'; import { CustomEventType } from '../common/utils/clutter'; -import { easeActor } from './utils/environment'; -import { DummyCyclicPanel } from './holdGestures/animatePanel'; -import { AnimatePanel } from '../common/settings'; declare interface ShallowSwipeTrackerT { orientation: Clutter.Orientation, @@ -67,27 +62,9 @@ abstract class SwipeTrackerEndPointsModifer { } } -// declare enum -enum ExtensionState { - DEFAULT = 0, - SWITCH_WORKSPACE = AnimatePanel.SWITCH_WORKSPACE, - MOVE_WINDOW = AnimatePanel.MOVE_WINDOW, - /** flag: whether to animate panel */ - ANIMATE_PANEL = 4, - /** flag: whether update/end signal was received from tracker */ - UPDATE_RECEIVED = 8, -} - class WorkspaceAnimationModifier extends SwipeTrackerEndPointsModifer { private _workspaceAnimation: imports.ui.workspaceAnimation.WorkspaceAnimationController; protected _swipeTracker: SwipeTrackerT; - private _window?: Meta.Window; - private _highlight?: St.Widget; - - private GESTURE_DELAY = 75; - private _workspaceChangedId = 0; - private _extensionState = ExtensionState.DEFAULT; - private _dummyCyclicPanel?: typeof DummyCyclicPanel.prototype; constructor(wm: typeof imports.ui.main.wm) { super(); @@ -101,9 +78,6 @@ class WorkspaceAnimationModifier extends SwipeTrackerEndPointsModifer { 1, { allowTouch: false }, ); - - if (ExtSettings.ANIMATE_PANEL !== AnimatePanel.NONE) - this._dummyCyclicPanel = new DummyCyclicPanel(); } apply(): void { @@ -114,66 +88,14 @@ class WorkspaceAnimationModifier extends SwipeTrackerEndPointsModifer { super.apply(); } - private _getWindowToMove(monitor: number) { - const types = [Meta.WindowType.MODAL_DIALOG, Meta.WindowType.NORMAL, Meta.WindowType.DIALOG]; - - const window = global.display.get_focus_window() as Meta.Window | null; - if (ExtSettings.ENABLE_MOVE_WINDOW_TO_WORKSPACE && - this._swipeTracker._touchpadGesture?.hadHoldGesture && - window && - !window.is_fullscreen() && - types.includes(window.get_window_type()) && - // ignore window is it's skipbar and type is normal - (!window.skip_taskbar || window.get_window_type() !== Meta.WindowType.NORMAL) && - window.get_monitor() === monitor && - !window.is_always_on_all_workspaces() && - (!Meta.prefs_get_workspaces_only_on_primary() || monitor === Main.layoutManager.primaryMonitor.index) - ) - return window; - return undefined; - } - protected _gestureBegin(tracker: SwipeTrackerT, monitor: number): void { - this.reset(); - this._highlight?.destroy(); - this._extensionState = ExtensionState.DEFAULT; - - this._window = this._getWindowToMove(monitor); - this._workspaceAnimation.movingWindow = this._window; - if (this._window) { - this._extensionState = ExtensionState.MOVE_WINDOW; - this._highlight = this._getWindowHighlight(); - this._animateHighLight(() => { - if (this._swipeTracker._touchpadGesture?.followNaturalScroll !== undefined) - this._swipeTracker._touchpadGesture.followNaturalScroll = false; - - super._modifySnapPoints(tracker, (shallowTracker) => { - this._workspaceAnimation._switchWorkspaceBegin(shallowTracker, monitor as never); - tracker.orientation = shallowTracker.orientation; - }); - }); - } - else { - this._extensionState = ExtensionState.SWITCH_WORKSPACE; - if (this._swipeTracker._touchpadGesture?.followNaturalScroll !== undefined) - this._swipeTracker._touchpadGesture.followNaturalScroll = ExtSettings.FOLLOW_NATURAL_SCROLL; - - super._modifySnapPoints(tracker, (shallowTracker) => { - this._workspaceAnimation._switchWorkspaceBegin(shallowTracker, monitor as never); - tracker.orientation = shallowTracker.orientation; - }); - } - - if (ExtSettings.ANIMATE_PANEL & this._extensionState) { - this._extensionState |= ExtensionState.ANIMATE_PANEL; - this._dummyCyclicPanel?.beginGesture(); - } + super._modifySnapPoints(tracker, (shallowTracker) => { + this._workspaceAnimation._switchWorkspaceBegin(shallowTracker, monitor); + tracker.orientation = shallowTracker.orientation; + }); } protected _gestureUpdate(tracker: SwipeTrackerT, progress: number): void { - if (this._extensionState === ExtensionState.DEFAULT) - return; - this._extensionState |= ExtensionState.UPDATE_RECEIVED; if (progress < this._firstVal) { progress = this._firstVal - (this._firstVal - progress) * 0.05; } @@ -181,150 +103,15 @@ class WorkspaceAnimationModifier extends SwipeTrackerEndPointsModifer { progress = this._lastVal + (progress - this._lastVal) * 0.05; } this._workspaceAnimation._switchWorkspaceUpdate(tracker, progress); - - if (this._extensionState & ExtensionState.ANIMATE_PANEL) - this._dummyCyclicPanel?.updateGesture(progress); } - protected _gestureEnd(tracker: SwipeTrackerT, duration: number, endProgress: number): void { - if (this._extensionState === ExtensionState.DEFAULT) - return; - this._extensionState |= ExtensionState.UPDATE_RECEIVED; - endProgress = Math.clamp(endProgress, this._firstVal, this._lastVal); - - this._workspaceAnimation._switchWorkspaceEnd(tracker, duration, endProgress); - - if (this._highlight) { - easeActor(this._highlight, { - opacity: 0, - mode: Clutter.AnimationMode.EASE_OUT_QUAD, - duration: duration, - onStopped: () => { - this._highlight?.destroy(); - this._highlight = undefined; - }, - }); - } - - const workspace = global.workspaceManager.get_workspace_by_index(endProgress) as Meta.Workspace; - if (!workspace.active && this._window) { - this._workspaceChangedId = global.workspaceManager.connect('active-workspace-changed', () => { - if (workspace.active && this._window) { - this._window.change_workspace(workspace); - workspace.activate_with_focus(this._window, global.get_current_time()); - this._window = undefined; - } - - global.workspaceManager.disconnect(this._workspaceChangedId); - this._workspaceChangedId = 0; - }); - } - - if (this._extensionState & ExtensionState.ANIMATE_PANEL) - this._dummyCyclicPanel?.endGesture(endProgress, duration); - - this._extensionState = ExtensionState.DEFAULT; - } - - private _getWindowHighlight() { - if (this._window === undefined) - return undefined; - - const rect = this._window.get_frame_rect(); - - const highlight = new St.Widget({ - style_class: 'cycler-highlight', - x: rect.x, - y: rect.y, - width: rect.width, - height: rect.height, - style: 'border-radius: 6px;', - opacity: 0, - visible: true, - }); - Main.layoutManager.uiGroup.add_child(highlight); - return highlight; - } - - private _easeActor(actor: T, props: { [P in KeysOfType]?: number }): void { - easeActor(actor, { - ...props, - duration: this.GESTURE_DELAY, - mode: Clutter.AnimationMode.EASE_OUT_QUAD, - autoReverse: true, - repeatCount: 1, - }); - } - - private _animateHighLight(callback: () => void) { - if (this._highlight === undefined || this._window === undefined) { - callback(); - return; - } - - const windowActor = this._window.get_compositor_private() as Meta.WindowActor; - - [windowActor, this._highlight].forEach(actor => { - actor.set_pivot_point(0.5, 0.5); - this._easeActor(actor, { scale_x: 0.95 }); - this._easeActor(actor, { scale_y: 0.95 }); - }); - - easeActor(this._highlight, { - opacity: 200, - mode: Clutter.AnimationMode.EASE_OUT_QUAD, - duration: 2 * this.GESTURE_DELAY, - onStopped: () => { - callback(); - this._animateHighLightWaitForGestureUpdate(windowActor); - }, - }); - } - - private _animateHighLightWaitForGestureUpdate(actor: Meta.WindowActor) { - if (!this._highlight) { - actor.set_pivot_point(0, 0); - return; - } - easeActor(this._highlight, { - opacity: 255, - mode: Clutter.AnimationMode.EASE_OUT_QUAD, - duration: 2 * this.GESTURE_DELAY, - onStopped: () => { - log('animate highlight complete'); - actor.set_pivot_point(0, 0); - this._highlight?.set_pivot_point(0, 0); - // no update received on highlight showing - if ((this._extensionState & ExtensionState.UPDATE_RECEIVED) === 0) - this.reset(); - }, - }); - } - - private reset() { - this._highlight?.destroy(); - this._highlight = undefined; - - const active_workspace = global.workspace_manager.get_active_workspace_index(); - - if ((this._extensionState & ExtensionState.SWITCH_WORKSPACE) || (this._extensionState & ExtensionState.MOVE_WINDOW)) - this._workspaceAnimation._switchWorkspaceEnd(this._swipeTracker, 0, active_workspace); - - if (this._extensionState & ExtensionState.ANIMATE_PANEL) - this._dummyCyclicPanel?.endGesture(global.workspace_manager.get_active_workspace_index(), 0); - - this._extensionState = ExtensionState.DEFAULT; - this._window = undefined; - this._workspaceAnimation.movingWindow = undefined; + protected _gestureEnd(tracker: SwipeTrackerT, duration: number, progress: number): void { + progress = Math.clamp(progress, this._firstVal, this._lastVal); + this._workspaceAnimation._switchWorkspaceEnd(tracker, duration, progress); } destroy(): void { - this._dummyCyclicPanel?.destroy(); this._swipeTracker.destroy(); - - if (this._workspaceChangedId) - global.workspaceManager.disconnect(this._workspaceChangedId); - const swipeTracker = this._workspaceAnimation._swipeTracker; if (swipeTracker._touchpadGesture) { swipeTracker._touchpadGesture._stageCaptureEvent = global.stage.connect( diff --git a/extension/src/holdGestures/animatePanel.ts b/extension/src/holdGestures/animatePanel.ts deleted file mode 100644 index ab127e8..0000000 --- a/extension/src/holdGestures/animatePanel.ts +++ /dev/null @@ -1,112 +0,0 @@ -import { registerClass } from '../../common/utils/gobject'; -import Clutter from '@gi-types/clutter8'; -import St from '@gi-types/st1'; - -import { global, imports } from 'gnome-shell'; -import { easeActor } from '../utils/environment'; - -const Main = imports.ui.main; -const { lerp } = imports.misc.util; - -/** - * GObject Class to animate top panel in circular animation - * Without displaying it on any other monitors - */ -export const DummyCyclicPanel = registerClass( - class extends Clutter.Actor { - panelBox: St.BoxLayout>; - private PADDING_WIDTH; - private _container: Clutter.Actor; - - constructor() { - super({ visible: false }); - - this.PADDING_WIDTH = 100 * Main.layoutManager.primaryMonitor.geometry_scale; - - this.panelBox = Main.layoutManager.panelBox; - - this._container = new Clutter.Actor({ layoutManager: new Clutter.BoxLayout({ orientation: Clutter.Orientation.HORIZONTAL, spacing: this.PADDING_WIDTH }) }); - this.add_child(this._container); - - this._container.add_child(new Clutter.Clone({ source: this.panelBox })); - this._container.add_child(new Clutter.Clone({ source: this.panelBox })); - - // this.add_constraint(new MonitorConstraint({ primary: true })); - this.set_clip_to_allocation(true); - Main.layoutManager.uiGroup.add_child(this); - } - - vfunc_get_preferred_height(for_width: number) { - return this.panelBox.get_preferred_height(for_width); - } - - vfunc_get_preferred_width(for_height: number) { - return this.panelBox.get_preferred_width(for_height); - } - - beginGesture() { - // hide main panel - Main.layoutManager.panelBox.opacity = 0; - - Main.layoutManager.panelBox.set_style_class_name('no-panel-corner'); - - let x, y; - - // dash-to-panel - if (this.panelBox.get_parent() !== Main.layoutManager.uiGroup) - [x, y] = this.panelBox.get_parent().get_position(); - else - [x, y] = Main.layoutManager.panelBox.get_position(); - - if (x === null || y === null) { - const { x, y } = Main.layoutManager.primaryMonitor; - this.set_position(x, y); - } - else - this.set_position(x, y); - - this.visible = true; - Main.layoutManager.uiGroup.set_child_above_sibling(this, null); - } - - updateGesture(progress: number) { - // log('setting position to: ' + this.get_position()); - this._container.translation_x = this._getTranslationFor(progress); - } - - endGesture(endProgress: number, duration: number) { - // gesture returns accelerated end value, hence need to do this - const current_workspace = global.workspace_manager.get_active_workspace_index(); - const translation_x = ( - endProgress > current_workspace || - (endProgress === current_workspace && this._container.translation_x <= this.min_cyclic_translation / 2) - ) ? this.min_cyclic_translation : 0; - - easeActor(this._container, { - translation_x, - duration, - mode: Clutter.AnimationMode.EASE_OUT_CUBIC, - onStopped: () => { - this.visible = false; - - // add corners - Main.layoutManager.panelBox.remove_style_class_name('no-panel-corner'); - Main.layoutManager.panelBox.opacity = 255; - }, - }); - } - - private _getTranslationFor(progress: number) { - const begin = Math.floor(progress); - const end = Math.ceil(progress); - progress = begin === end ? 0 : (progress - begin) / (end - begin); - - return lerp(0, this.min_cyclic_translation, progress); - } - - /** returns maximium negative value because translation is always negative */ - get min_cyclic_translation(): number { - return -(this.width + this.PADDING_WIDTH); - } - }, -); \ No newline at end of file diff --git a/extension/src/swipeTracker.ts b/extension/src/swipeTracker.ts index 724e636..ac6f6be 100644 --- a/extension/src/swipeTracker.ts +++ b/extension/src/swipeTracker.ts @@ -10,7 +10,7 @@ const { SwipeTracker } = imports.ui.swipeTracker; import * as DBusUtils from './utils/dbus'; import { TouchpadConstants } from '../constants'; import { registerClass } from '../common/utils/gobject'; -import { ClutterEventType, CustomEventType } from '../common/utils/clutter'; +import { CustomEventType } from '../common/utils/clutter'; // define enum enum TouchpadState { @@ -60,14 +60,6 @@ export const TouchpadSwipeGesture = registerClass({ DRAG_THRESHOLD_DISTANCE = TouchpadConstants.DRAG_THRESHOLD_DISTANCE; enabled = true; - private DELAY_BETWEEN_HOLD = 150; // ms - private HOLD_TIME = 100; // ms - private _lastHoldBeginTime = - this.DELAY_BETWEEN_HOLD; - private _lastHoldCancelledTime = 0; - private _beginTime = this.HOLD_TIME; - // private _hadHoldGesture = false; - private _time = 0; - constructor( nfingers: number[], allowedModes: Shell.ActionMode, @@ -92,27 +84,7 @@ export const TouchpadSwipeGesture = registerClass({ this.SWIPE_MULTIPLIER = TouchpadConstants.SWIPE_MULTIPLIER * (typeof (gestureSpeed) !== 'number' ? 1.0 : gestureSpeed); } - _handleHold(event: CustomEventType): void { - switch (event.get_gesture_phase()) { - case Clutter.TouchpadGesturePhase.BEGIN: - this._lastHoldBeginTime = event.get_time(); - break; - case Clutter.TouchpadGesturePhase.CANCEL: - this._lastHoldCancelledTime = event.get_time(); - break; - default: - this._lastHoldBeginTime = - this.DELAY_BETWEEN_HOLD; - this._lastHoldCancelledTime = 0; - } - - } - _handleEvent(_actor: undefined | Clutter.Actor, event: CustomEventType): boolean { - if (event.type() === ClutterEventType.TOUCHPAD_HOLD) { - this._handleHold(event); - return Clutter.EVENT_PROPAGATE; - } - if (event.type() !== Clutter.EventType.TOUCHPAD_SWIPE) return Clutter.EVENT_PROPAGATE; @@ -120,8 +92,6 @@ export const TouchpadSwipeGesture = registerClass({ if (gesturePhase === Clutter.TouchpadGesturePhase.BEGIN) { this._state = TouchpadState.NONE; this._toggledDirection = false; - - this._beginTime = event.get_time(); } if (this._state === TouchpadState.IGNORED) @@ -158,7 +128,6 @@ export const TouchpadSwipeGesture = registerClass({ const [x, y] = event.get_coords(); const [dx, dy] = event.get_gesture_motion_delta_unaccelerated() as [number, number]; - this._time = time; if (this._state === TouchpadState.NONE) { if (dx === 0 && dy === 0) return Clutter.EVENT_PROPAGATE; @@ -214,9 +183,6 @@ export const TouchpadSwipeGesture = registerClass({ this.emit('end', time, distance); this._state = TouchpadState.NONE; this._toggledDirection = false; - this._lastHoldCancelledTime = 0; - this._lastHoldBeginTime = - this.DELAY_BETWEEN_HOLD; - this._beginTime = this.HOLD_TIME; break; } @@ -239,23 +205,6 @@ export const TouchpadSwipeGesture = registerClass({ this._stageCaptureEvent = 0; } } - - get hadHoldGesture(): boolean { - return (this._beginTime - this._lastHoldCancelledTime) < this.HOLD_TIME && - (this._lastHoldCancelledTime - this._lastHoldBeginTime) > this.DELAY_BETWEEN_HOLD; - } - - get time(): number { - return this._time; - } - - get followNaturalScroll(): boolean { - return this._followNaturalScroll; - } - - set followNaturalScroll(follow: boolean) { - this._followNaturalScroll = follow; - } }); declare type _SwipeTrackerOptionalParams = { diff --git a/extension/src/utils/dbus.ts b/extension/src/utils/dbus.ts index a257320..a9e8d02 100644 --- a/extension/src/utils/dbus.ts +++ b/extension/src/utils/dbus.ts @@ -4,7 +4,7 @@ import Clutter from '@gi-types/clutter8'; import Gio from '@gi-types/gio2'; import GObject from '@gi-types/gobject2'; import { registerClass } from '../../common/utils/gobject'; -import { ClutterEventType, CustomEventType } from '../../common/utils/clutter'; +import { CustomEventType } from '../../common/utils/clutter'; import { printStack } from '../../common/utils/logging'; const Util = imports.misc.util; @@ -36,17 +36,6 @@ const DBusWrapperGIExtension = registerClass({ accumulator: GObject.AccumulatorType.TRUE_HANDLED, return_type: GObject.TYPE_BOOLEAN, }, - 'TouchpadHold': { - param_types: [ - GObject.TYPE_STRING, // phase - GObject.TYPE_INT, // fingers - GObject.TYPE_UINT, // time - GObject.TYPE_BOOLEAN, // is_cancelled - ], - flags: GObject.SignalFlags.RUN_LAST, - accumulator: GObject.AccumulatorType.TRUE_HANDLED, - return_type: GObject.TYPE_BOOLEAN, - }, 'TouchpadPinch': { param_types: [ GObject.TYPE_STRING, // phase @@ -75,7 +64,6 @@ const DBusWrapperGIExtension = registerClass({ ); this._proxyConnectSignalIds.push(this._proxy.connectSignal('TouchpadSwipe', this._handleDbusSwipeSignal.bind(this))); - this._proxyConnectSignalIds.push(this._proxy.connectSignal('TouchpadHold', this._handleDbusHoldSignal.bind(this))); this._proxyConnectSignalIds.push(this._proxy.connectSignal('TouchpadPinch', this._handleDbusPinchSignal.bind(this))); } @@ -94,13 +82,6 @@ const DBusWrapperGIExtension = registerClass({ this.emit('TouchpadSwipe', sphase, fingers, dx, dy, time); } - // eslint-disable-next-line @typescript-eslint/no-explicit-any - _handleDbusHoldSignal(_proxy: never, _sender: never, params: [any]): void { - // (siub) - const [sphase, fingers, time, is_cancelled] = params[0]; - this.emit('TouchpadHold', sphase, fingers, time, is_cancelled); - } - // eslint-disable-next-line @typescript-eslint/no-explicit-any _handleDbusPinchSignal(_proxy: never, _sender: never, params: [any]): void { // (siddu) @@ -117,7 +98,7 @@ type EventOptionalParams = Partial<{ is_cancelled: boolean, }>; -function GenerateEvent(type: number, sphase: string, fingers: number, time: number, params: EventOptionalParams): CustomEventType { +function GenerateEvent(type: Clutter.EventType, sphase: string, fingers: number, time: number, params: EventOptionalParams): CustomEventType { return { type: () => type, get_gesture_phase: () => { @@ -152,21 +133,14 @@ export function subscribe(callback: (actor: never | undefined, event: CustomEven connectedSignalIds.push( proxy.connect('TouchpadSwipe', (_source, sphase, fingers, dx, dy, time) => { - const event = GenerateEvent(ClutterEventType.TOUCHPAD_SWIPE, sphase, fingers, time, { dx, dy }); - return callback(undefined, event); - }), - ); - - connectedSignalIds.push( - proxy.connect('TouchpadHold', (_source, sphase, fingers, time, is_cancelled) => { - const event = GenerateEvent(ClutterEventType.TOUCHPAD_HOLD, sphase, fingers, time, { is_cancelled }); + const event = GenerateEvent(Clutter.EventType.TOUCHPAD_SWIPE, sphase, fingers, time, { dx, dy }); return callback(undefined, event); }), ); connectedSignalIds.push( proxy.connect('TouchpadPinch', (_source, sphase, fingers, pinch_angle_delta, pinch_scale, time) => { - const event = GenerateEvent(ClutterEventType.TOUCHPAD_PINCH, sphase, fingers, time, { pinch_angle_delta, pinch_scale }); + const event = GenerateEvent(Clutter.EventType.TOUCHPAD_PINCH, sphase, fingers, time, { pinch_angle_delta, pinch_scale }); return callback(undefined, event); }), ); diff --git a/extension/ui/prefs.ui b/extension/ui/prefs.ui index db96601..4bd5dd5 100644 --- a/extension/ui/prefs.ui +++ b/extension/ui/prefs.ui @@ -436,69 +436,6 @@ other gesture, if enabled, will be activated using 4-finger gesture. - - - - 12 - - - start - center - Hold & Swipe Gestures - - - - - - - - - - - 36 - - - none - - - - - - - 12 - 12 - 12 - 12 - 32 - - - - start - center - 1 - 0 - Move window to previous/next workspace - - - - - - end - True - center - - - - - - - - - - - - - @@ -640,42 +577,6 @@ other gesture, if enabled, will be activated using 4-finger gesture. - - - - - - 12 - 12 - 12 - 12 - 32 - - - - start - center - 1 - 0 - Animate panel - - - - - - - No animation - When moving a window - When moving a window or switching workspace - - - - - - - - - diff --git a/gnome-shell/index.d.ts b/gnome-shell/index.d.ts index 86f1383..021a37f 100644 --- a/gnome-shell/index.d.ts +++ b/gnome-shell/index.d.ts @@ -22,11 +22,6 @@ declare namespace __shell_private_types { _stageCaptureEvent: number; destroy(): void; _handleEvent(actor: Clutter.Actor | undefined, event: CustomEventType): boolean; - - /** This values are provided by Modified TouchpadGesture */ - hadHoldGesture?: boolean; - time?: number; - followNaturalScroll?: boolean; } declare interface IMonitorState { @@ -85,7 +80,7 @@ declare namespace imports { const layoutManager: { uiGroup: Clutter.Actor, panelBox: St.BoxLayout, - monitors: __shell_private_types.IMonitorState[] + monitors: __shell_private_types.IMonitorState[], primaryMonitor: __shell_private_types.IMonitorState, currentMonitor: __shell_private_types.IMonitorState, getWorkAreaForMonitor: (index: number) => Meta.Rectangle, @@ -121,21 +116,21 @@ declare namespace imports { _stateAdjustment: OverviewAdjustment; layoutManager: Clutter.BoxLayout & { _searchEntry: St.Bin - } + }; _toggleAppsPage(): void _workspacesDisplay: { _swipeTracker: swipeTracker.SwipeTracker - } + }; _appDisplay: { _swipeTracker: swipeTracker.SwipeTracker - } + }; _searchController: { searchActive: boolean - } + }; } } @@ -160,7 +155,7 @@ declare namespace imports { _endTouchpadGesture(): void; _history: { reset(): void; - } + }; } } @@ -185,7 +180,7 @@ declare namespace imports { _switchWorkspaceBegin(tracker: { orientation: Clutter.Orientation, confirmSwipe: typeof swipeTracker.SwipeTracker.prototype.confirmSwipe - }, monitor: never); + }, monitor: number); _switchWorkspaceUpdate(tracker: swipeTracker.SwipeTracker, progress: number); _switchWorkspaceEnd(tracker: swipeTracker.SwipeTracker, duration: number, progress: number); @@ -224,7 +219,7 @@ declare namespace imports { adjustment: St.Adjustment } } - } + }; _resetNoModsTimeout(): void; _noModsTimeoutId: number; From 1707997650b8c336858796a1b2499d1eba885b1e Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sun, 21 Nov 2021 09:23:19 +0530 Subject: [PATCH 084/155] debug: remove debug logs --- extension/src/pinchGestures/showDesktop.ts | 14 -------------- extension/src/utils/pointsArithmetic.ts | 6 ------ 2 files changed, 20 deletions(-) diff --git a/extension/src/pinchGestures/showDesktop.ts b/extension/src/pinchGestures/showDesktop.ts index 00c112b..d286aa0 100644 --- a/extension/src/pinchGestures/showDesktop.ts +++ b/extension/src/pinchGestures/showDesktop.ts @@ -126,10 +126,6 @@ class MonitorGroup { windowActorsClones.map(actorClone => { const { clone } = actorClone; - log(JSON.stringify({ - title: actorClone.windowActor.meta_window.title, - start: { x: clone.x, y: clone.y }, - })); const cloneCenter: Point = { x: clone.x + Math.round(clone.width / 2), y: clone.y + Math.round(clone.height / 2), @@ -143,14 +139,6 @@ class MonitorGroup { start: { x: clone.x, y: clone.y }, end: { x: destPoint.x, y: destPoint.y }, }; - - log(JSON.stringify({ - start: { x: clone.x, y: clone.y }, - end: destPoint, - position: destCorner.position, - })); - log(JSON.stringify({ cloneCenter, centroid, destCorner })); - log(''); }); } @@ -300,7 +288,6 @@ export class ShowDesktopExtension implements ISubExtension { } gestureBegin(tracker: Type_TouchpadPinchGesture) { - log(JSON.stringify({ _workspaceManagerState: this._workspaceManagerState })); this._extensionState = ExtensionState.ANIMATING; Meta.disable_unredirect_for_display(global.display); @@ -349,7 +336,6 @@ export class ShowDesktopExtension implements ISubExtension { private _resetState(animate = false) { // reset state, aka. undo show desktop this._minimizingWindows.forEach(win => { - log(`resetting state: ${win.title}`); if (!this._windows.has(win)) return; const onStopped = () => { diff --git a/extension/src/utils/pointsArithmetic.ts b/extension/src/utils/pointsArithmetic.ts index d566cc4..1b1c883 100644 --- a/extension/src/utils/pointsArithmetic.ts +++ b/extension/src/utils/pointsArithmetic.ts @@ -57,19 +57,13 @@ export function findCornerForWindow(win: Point, centroid: Point delta: dist_w_m, }; - log('mapped points'); win = transform_point(transform_matrix, win); - log(`\twin: +${JSON.stringify(win)}`); - log(`\tcentroid: +${JSON.stringify(transform_point(transform_matrix, centroid))}`); let mapped_corners = corners.map(c => { const point = transform_point(transform_matrix, c); point.x -= win.x; point.y -= win.y; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - log(`\tposition<${(c as any)['position']}>: ${JSON.stringify(point)}`); return { ...point, corner: c }; }); - log('\n'); // ignore points which are on negative x axis (opposite direction to centroid->win array); mapped_corners = mapped_corners.filter(c => c.x >= 0); From 5bc0698a29e8f342da8e42c35185f9df3e2664a8 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sun, 21 Nov 2021 09:32:24 +0530 Subject: [PATCH 085/155] cleanup: Move custom clutter type to gnome-shell --- extension/common/utils/clutter.ts | 9 --------- extension/src/gestures.ts | 3 +-- extension/src/swipeTracker.ts | 3 +-- extension/src/trackers/pinchTracker.ts | 3 +-- extension/src/utils/dbus.ts | 3 +-- gnome-shell/index.d.ts | 11 ++++++++++- 6 files changed, 14 insertions(+), 18 deletions(-) delete mode 100644 extension/common/utils/clutter.ts diff --git a/extension/common/utils/clutter.ts b/extension/common/utils/clutter.ts deleted file mode 100644 index dff3316..0000000 --- a/extension/common/utils/clutter.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Event } from '@gi-types/clutter8'; - -export type CustomEventType = Pick< - Event, - 'type' | 'get_gesture_phase' | - 'get_touchpad_gesture_finger_count' | 'get_time' | - 'get_coords' | 'get_gesture_motion_delta_unaccelerated' | - 'get_gesture_pinch_scale' | 'get_gesture_pinch_angle_delta' ->; \ No newline at end of file diff --git a/extension/src/gestures.ts b/extension/src/gestures.ts index e7b556d..481902d 100644 --- a/extension/src/gestures.ts +++ b/extension/src/gestures.ts @@ -1,13 +1,12 @@ import GObject from '@gi-types/gobject2'; import Shell from '@gi-types/shell0'; import Clutter from '@gi-types/clutter8'; -import { imports, global, __shell_private_types } from 'gnome-shell'; +import { imports, global, __shell_private_types, CustomEventType } from 'gnome-shell'; const Main = imports.ui.main; import { createSwipeTracker, TouchpadSwipeGesture } from './swipeTracker'; import { OverviewControlsState, ExtSettings } from '../constants'; -import { CustomEventType } from '../common/utils/clutter'; declare interface ShallowSwipeTrackerT { orientation: Clutter.Orientation, diff --git a/extension/src/swipeTracker.ts b/extension/src/swipeTracker.ts index ac6f6be..09955cf 100644 --- a/extension/src/swipeTracker.ts +++ b/extension/src/swipeTracker.ts @@ -2,7 +2,7 @@ import Clutter from '@gi-types/clutter8'; import GObject from '@gi-types/gobject2'; import Shell from '@gi-types/shell0'; import Meta from '@gi-types/meta8'; -import { imports, global } from 'gnome-shell'; +import { imports, global, CustomEventType } from 'gnome-shell'; const Main = imports.ui.main; const { SwipeTracker } = imports.ui.swipeTracker; @@ -10,7 +10,6 @@ const { SwipeTracker } = imports.ui.swipeTracker; import * as DBusUtils from './utils/dbus'; import { TouchpadConstants } from '../constants'; import { registerClass } from '../common/utils/gobject'; -import { CustomEventType } from '../common/utils/clutter'; // define enum enum TouchpadState { diff --git a/extension/src/trackers/pinchTracker.ts b/extension/src/trackers/pinchTracker.ts index e947d5f..db0a10a 100644 --- a/extension/src/trackers/pinchTracker.ts +++ b/extension/src/trackers/pinchTracker.ts @@ -2,13 +2,12 @@ import Clutter from '@gi-types/clutter8'; import GObject from '@gi-types/gobject2'; import Shell from '@gi-types/shell0'; import Meta from '@gi-types/meta8'; -import { global, imports } from 'gnome-shell'; +import { CustomEventType, global, imports } from 'gnome-shell'; const Main = imports.ui.main; import * as DBusUtils from '../utils/dbus'; import { registerClass } from '../../common/utils/gobject'; -import { CustomEventType } from '../../common/utils/clutter'; import { TouchpadConstants } from '../../constants'; const MIN_ANIMATION_DURATION = 100; diff --git a/extension/src/utils/dbus.ts b/extension/src/utils/dbus.ts index a9e8d02..7241446 100644 --- a/extension/src/utils/dbus.ts +++ b/extension/src/utils/dbus.ts @@ -1,10 +1,9 @@ -import { imports, global } from 'gnome-shell'; +import { imports, global, CustomEventType } from 'gnome-shell'; import Clutter from '@gi-types/clutter8'; import Gio from '@gi-types/gio2'; import GObject from '@gi-types/gobject2'; import { registerClass } from '../../common/utils/gobject'; -import { CustomEventType } from '../../common/utils/clutter'; import { printStack } from '../../common/utils/logging'; const Util = imports.misc.util; diff --git a/gnome-shell/index.d.ts b/gnome-shell/index.d.ts index 021a37f..50d23b5 100644 --- a/gnome-shell/index.d.ts +++ b/gnome-shell/index.d.ts @@ -230,4 +230,13 @@ declare namespace imports { } } } -} \ No newline at end of file +} + +// types +export type CustomEventType = Pick< + import('@gi-types/clutter8').Event, + 'type' | 'get_gesture_phase' | + 'get_touchpad_gesture_finger_count' | 'get_time' | + 'get_coords' | 'get_gesture_motion_delta_unaccelerated' | + 'get_gesture_pinch_scale' | 'get_gesture_pinch_angle_delta' +>; \ No newline at end of file From 7532c93278bb3dce33cadc4d64851d5edf2be446 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sun, 21 Nov 2021 09:46:33 +0530 Subject: [PATCH 086/155] cleanup: Remove residual schema code --- extension/common/utils/gobject.ts | 92 +++++++++---------- ...extensions.gestureImprovements.gschema.xml | 5 - extension/src/altTab.ts | 2 +- 3 files changed, 47 insertions(+), 52 deletions(-) diff --git a/extension/common/utils/gobject.ts b/extension/common/utils/gobject.ts index f7343fc..e288a4a 100644 --- a/extension/common/utils/gobject.ts +++ b/extension/common/utils/gobject.ts @@ -15,7 +15,7 @@ const OGRegisterClass = GObject.registerClass; type ConstructorType = new (...args: any[]) => any; type IFaces }[]> = { - [key in keyof Interfaces]: Interfaces[key] extends { $gtype: GObject.GType } ? I : never; + [key in keyof Interfaces]: Interfaces[key] extends { $gtype: GObject.GType } ? I : never; }; type _TupleOf = R['length'] extends N ? R : _TupleOf; @@ -23,63 +23,63 @@ type _TupleOf = R['length'] extends N ? R : type Tuple = _TupleOf; type GObjectSignalDefinition = { - param_types?: Partial>; - [key: string]: any; + param_types?: Partial>; + [key: string]: any; }; /** Get typescript type for {@link GObjectSignalDefinition.param_types} */ type CallBackTypeTuple = T extends any[] ? { [P in keyof T]: T[P] extends GObject.GType ? R : never } : []; export type RegisteredPrototype< - P extends {}, - Props extends { [key: string]: GObject.ParamSpec }, - Interfaces extends any[], - Sigs extends { [key: string]: GObjectSignalDefinition } - > = { - /// This is one of modification done by this file - connect( - key: K, - callback: ( - _source: RegisteredPrototype, - ...args: CallBackTypeTuple - ) => void, - ): number, - } & GObject.RegisteredPrototype; + P extends {}, + Props extends { [key: string]: GObject.ParamSpec }, + Interfaces extends any[], + Sigs extends { [key: string]: GObjectSignalDefinition } + > = { + /// This is one of modification done by this file + connect( + key: K, + callback: ( + _source: RegisteredPrototype, + ...args: CallBackTypeTuple + ) => void, + ): number, + } & GObject.RegisteredPrototype; export type RegisteredClass< - T extends ConstructorType, - Props extends { [key: string]: GObject.ParamSpec }, - Interfaces extends { $gtype: GObject.GType }[], - Sigs extends { [key: string]: GObjectSignalDefinition } - > = T extends { prototype: infer P } - ? { - $gtype: GObject.GType, Sigs>>; - prototype: RegisteredPrototype, Sigs>; - /// use constructor parameter instead of '_init' parameters - new(...args: ConstructorParameters): RegisteredPrototype, Sigs>; - } - : never; + T extends ConstructorType, + Props extends { [key: string]: GObject.ParamSpec }, + Interfaces extends { $gtype: GObject.GType }[], + Sigs extends { [key: string]: GObjectSignalDefinition } + > = T extends { prototype: infer P } + ? { + $gtype: GObject.GType, Sigs>>; + prototype: RegisteredPrototype, Sigs>; + /// use constructor parameter instead of '_init' parameters + new(...args: ConstructorParameters): RegisteredPrototype, Sigs>; + } + : never; export function registerClass(klass: T): RegisteredClass; export function registerClass< - T extends ConstructorType, - Props extends { [key: string]: GObject.ParamSpec }, - Interfaces extends { $gtype: GObject.GType }[], - Sigs extends { [key: string]: GObjectSignalDefinition } + T extends ConstructorType, + Props extends { [key: string]: GObject.ParamSpec }, + Interfaces extends { $gtype: GObject.GType }[], + Sigs extends { [key: string]: GObjectSignalDefinition } >( - options: { - GTypeName?: string; - GTypeFlags?: GObject.TypeFlags; - /// Make properties mandatory - Properties: Props; - Signals?: Sigs; - Implements?: Interfaces; - CssName?: string; - Template?: string; - Children?: string[]; - InternalChildren?: string[]; - }, - klass: T + options: { + GTypeName?: string; + GTypeFlags?: GObject.TypeFlags; + /// Make properties mandatory + Properties: Props; + Signals?: Sigs; + Implements?: Interfaces; + CssName?: string; + Template?: string; + Children?: string[]; + InternalChildren?: string[]; + }, + klass: T ): RegisteredClass; export function registerClass(...args: any[]): any { diff --git a/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml b/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml index c29b04b..623f79e 100644 --- a/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml +++ b/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml @@ -1,10 +1,5 @@ - - - - - diff --git a/extension/src/altTab.ts b/extension/src/altTab.ts index 6ce8369..b41858c 100644 --- a/extension/src/altTab.ts +++ b/extension/src/altTab.ts @@ -106,7 +106,7 @@ export class AltTabGestureExtension implements ISubExtension { if (this._extState === AltTabExtState.DEFAULT) { this._switcher = new WindowSwitcherPopup(); // remove timeout entirely - this._switcher._resetNoModsTimeout = function() { + this._switcher._resetNoModsTimeout = function () { if (this._noModsTimeoutId) { GLib.source_remove(this._noModsTimeoutId); this._noModsTimeoutId = 0; From 9e4fd7c5f962d28ab95f0001b304e91e7b920036 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sun, 21 Nov 2021 10:17:14 +0530 Subject: [PATCH 087/155] showDesktop: reset monitor groups when monitor layout changes --- extension/src/pinchGestures/showDesktop.ts | 11 +++++++++++ gnome-shell/index.d.ts | 4 +++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/extension/src/pinchGestures/showDesktop.ts b/extension/src/pinchGestures/showDesktop.ts index d286aa0..754f447 100644 --- a/extension/src/pinchGestures/showDesktop.ts +++ b/extension/src/pinchGestures/showDesktop.ts @@ -212,6 +212,7 @@ export class ShowDesktopExtension implements ISubExtension { private _windowAddedId = 0; private _windowRemovedId = 0; private _windowUnMinimizedId = 0; + private _monitorChangedId = 0; private _extensionState = ExtensionState.DEFAULT; private _minimizingWindows: Meta.Window[] = []; @@ -237,11 +238,21 @@ export class ShowDesktopExtension implements ISubExtension { this._workspaceChangedId = global.workspace_manager.connect('active-workspace-changed', this._workspaceChanged.bind(this)); this._workspaceChanged(); this._windowUnMinimizedId = global.window_manager.connect('unminimize', this._windowUnMinimized.bind(this)); + + this._monitorChangedId = Main.layoutManager.connect('monitors-changed', () => { + this._monitorGroups.forEach(m => m.destroy); + this._monitorGroups = []; + for (const monitor of Main.layoutManager.monitors) + this._monitorGroups.push(new MonitorGroup(monitor)); + }); } destroy(): void { this._pinchTracker?.destroy(); + if (this._monitorChangedId) + Main.layoutManager.disconnect(this._monitorChangedId); + if (this._windowAddedId) this._workspace?.disconnect(this._windowAddedId); diff --git a/gnome-shell/index.d.ts b/gnome-shell/index.d.ts index 50d23b5..491fca8 100644 --- a/gnome-shell/index.d.ts +++ b/gnome-shell/index.d.ts @@ -77,13 +77,15 @@ declare namespace imports { _swipeTracker: swipeTracker.SwipeTracker; }; - const layoutManager: { + const layoutManager: GObject.Object & { uiGroup: Clutter.Actor, panelBox: St.BoxLayout, monitors: __shell_private_types.IMonitorState[], primaryMonitor: __shell_private_types.IMonitorState, currentMonitor: __shell_private_types.IMonitorState, getWorkAreaForMonitor: (index: number) => Meta.Rectangle, + + connect(id: 'monitors-changed', callback: () => void); }; const wm: { From 994498acdf4e751c63476e1fa6626851fc55f6d0 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sun, 21 Nov 2021 12:40:25 +0530 Subject: [PATCH 088/155] pinchTracker: Add inturrupt action --- extension/src/pinchGestures/showDesktop.ts | 8 ++++++-- extension/src/trackers/pinchTracker.ts | 10 ++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/extension/src/pinchGestures/showDesktop.ts b/extension/src/pinchGestures/showDesktop.ts index 754f447..e75b465 100644 --- a/extension/src/pinchGestures/showDesktop.ts +++ b/extension/src/pinchGestures/showDesktop.ts @@ -145,7 +145,7 @@ class MonitorGroup { gestureBegin(windowActors: Meta.WindowActor[]) { windowActors.forEach(this._addWindowActor.bind(this)); this._fillCloneDestPosition(this._windowActorClones); - this._container.visible = true; + this._container.show(); } gestureUpdate(progress: number) { @@ -175,6 +175,8 @@ class MonitorGroup { mode: Clutter.AnimationMode.EASE_OUT_QUAD, duration, onStopped: () => { + this._container.hide(); + const window = windowActor.meta_window as Meta.Window | null; if (window?.can_minimize()) { Main.wm.skipNextEffect(windowActor); @@ -190,12 +192,14 @@ class MonitorGroup { windowActor.show(); } - this._container.visible = false; clone.destroy(); }, }); }); + if (this._windowActorClones.length ===0) + this._container.hide(); + this._windowActorClones = []; } diff --git a/extension/src/trackers/pinchTracker.ts b/extension/src/trackers/pinchTracker.ts index db0a10a..73d84a5 100644 --- a/extension/src/trackers/pinchTracker.ts +++ b/extension/src/trackers/pinchTracker.ts @@ -131,6 +131,7 @@ export const TouchpadPinchGesture = registerClass({ return Clutter.EVENT_PROPAGATE; if ((this._allowedModes !== Shell.ActionMode.ALL) && ((this._allowedModes & Main.actionMode) === 0)) { + this._interrupt(); this._state = TouchpadState.IGNORED; return Clutter.EVENT_PROPAGATE; } @@ -201,6 +202,15 @@ export const TouchpadPinchGesture = registerClass({ this._initialProgress = 0; } + _interrupt() { + if (this._ackState !== GestureACKState.ACKED) + return; + + this._reset(); + this._ackState = GestureACKState.NONE; + this.emit('end', 0, this._initialProgress); + } + private _emitBegin() { this._historyTracker.reset(); if (this._ackState === GestureACKState.NONE) { From f5431b51bfbafe977448e48ab7d6c70d67f7b4ff Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sun, 21 Nov 2021 12:41:43 +0530 Subject: [PATCH 089/155] cleanup: Organize imports --- extension/common/prefs.ts | 4 ++-- extension/extension.ts | 11 +++++------ extension/src/altTab.ts | 5 ++--- extension/src/gestures.ts | 9 ++++----- extension/src/overviewRoundTrip.ts | 6 +++--- extension/src/pinchGestures/showDesktop.ts | 11 +++++------ extension/src/snapWindow.ts | 15 +++++++-------- extension/src/swipeTracker.ts | 11 +++++------ extension/src/trackers/pinchTracker.ts | 11 +++++------ extension/src/utils/dbus.ts | 3 +-- extension/src/utils/environment.ts | 2 +- gnome-shell/index.d.ts | 6 +++--- tests/prefs.ts | 6 +++--- 13 files changed, 46 insertions(+), 54 deletions(-) diff --git a/extension/common/prefs.ts b/extension/common/prefs.ts index 4c52623..8863589 100644 --- a/extension/common/prefs.ts +++ b/extension/common/prefs.ts @@ -1,8 +1,8 @@ import Gio from '@gi-types/gio2'; -import Gtk from '@gi-types/gtk4'; import GObject from '@gi-types/gobject2'; -import { CanEnableMinimizeGesture } from './utils/prefUtils'; +import Gtk from '@gi-types/gtk4'; import { AllUIObjectKeys, BooleanSettingsKeys, DoubleSettingsKeys, EnumSettingsKeys, GioSettings, IntegerSettingsKeys } from './settings'; +import { CanEnableMinimizeGesture } from './utils/prefUtils'; type GtkBuilder = Omit & { get_object(name: AllUIObjectKeys): T; diff --git a/extension/extension.ts b/extension/extension.ts index 88e7a13..df566a8 100644 --- a/extension/extension.ts +++ b/extension/extension.ts @@ -1,15 +1,14 @@ import GLib from '@gi-types/glib2'; - +import { imports } from 'gnome-shell'; +import { AllSettingsKeys, GioSettings, PinchGestureType } from './common/settings'; import * as Constants from './constants'; -import { GestureExtension } from './src/gestures'; +import { AltTabConstants, ExtSettings, TouchpadConstants } from './constants'; import { AltTabGestureExtension } from './src/altTab'; +import { GestureExtension } from './src/gestures'; import { OverviewRoundTripGestureExtension } from './src/overviewRoundTrip'; +import { ShowDesktopExtension } from './src/pinchGestures/showDesktop'; import { SnapWindowExtension } from './src/snapWindow'; import * as DBusUtils from './src/utils/dbus'; -import { imports } from 'gnome-shell'; -import { AllSettingsKeys, GioSettings, PinchGestureType } from './common/settings'; -import { AltTabConstants, ExtSettings, TouchpadConstants } from './constants'; -import { ShowDesktopExtension } from './src/pinchGestures/showDesktop'; const ExtensionUtils = imports.misc.extensionUtils; diff --git a/extension/src/altTab.ts b/extension/src/altTab.ts index b41858c..11c59f5 100644 --- a/extension/src/altTab.ts +++ b/extension/src/altTab.ts @@ -3,13 +3,12 @@ import GLib from '@gi-types/glib2'; import Shell from '@gi-types/shell0'; import St from '@gi-types/st1'; import { imports } from 'gnome-shell'; +import { AltTabConstants, ExtSettings } from '../constants'; +import { TouchpadSwipeGesture } from './swipeTracker'; const Main = imports.ui.main; const { WindowSwitcherPopup } = imports.ui.altTab; -import { TouchpadSwipeGesture } from './swipeTracker'; -import { AltTabConstants, ExtSettings } from '../constants'; - let dummyWinCount = AltTabConstants.DUMMY_WIN_COUNT; function getIndexForProgress(progress: number, nelement: number): number { diff --git a/extension/src/gestures.ts b/extension/src/gestures.ts index 481902d..bc1f6f2 100644 --- a/extension/src/gestures.ts +++ b/extension/src/gestures.ts @@ -1,13 +1,12 @@ +import Clutter from '@gi-types/clutter8'; import GObject from '@gi-types/gobject2'; import Shell from '@gi-types/shell0'; -import Clutter from '@gi-types/clutter8'; -import { imports, global, __shell_private_types, CustomEventType } from 'gnome-shell'; +import { CustomEventType, global, imports, __shell_private_types } from 'gnome-shell'; +import { ExtSettings, OverviewControlsState } from '../constants'; +import { createSwipeTracker, TouchpadSwipeGesture } from './swipeTracker'; const Main = imports.ui.main; -import { createSwipeTracker, TouchpadSwipeGesture } from './swipeTracker'; -import { OverviewControlsState, ExtSettings } from '../constants'; - declare interface ShallowSwipeTrackerT { orientation: Clutter.Orientation, confirmSwipe(distance: number, snapPoints: number[], currentProgress: number, cancelProgress: number): void; diff --git a/extension/src/overviewRoundTrip.ts b/extension/src/overviewRoundTrip.ts index d5268a0..7b12749 100644 --- a/extension/src/overviewRoundTrip.ts +++ b/extension/src/overviewRoundTrip.ts @@ -1,11 +1,11 @@ import Clutter from '@gi-types/clutter8'; import Shell from '@gi-types/shell0'; -import { imports, global } from 'gnome-shell'; +import { global, imports } from 'gnome-shell'; +import { ExtSettings, OverviewControlsState } from '../constants'; +import { createSwipeTracker } from './swipeTracker'; const Main = imports.ui.main; const { SwipeTracker } = imports.ui.swipeTracker; -import { createSwipeTracker } from './swipeTracker'; -import { OverviewControlsState, ExtSettings } from '../constants'; // declare enum enum ExtensionState { diff --git a/extension/src/pinchGestures/showDesktop.ts b/extension/src/pinchGestures/showDesktop.ts index e75b465..3f61937 100644 --- a/extension/src/pinchGestures/showDesktop.ts +++ b/extension/src/pinchGestures/showDesktop.ts @@ -1,17 +1,16 @@ import Clutter from '@gi-types/clutter8'; +import GObject from '@gi-types/gobject2'; import Meta from '@gi-types/meta8'; import Shell from '@gi-types/shell0'; -import GObject from '@gi-types/gobject2'; import { global, imports, __shell_private_types } from 'gnome-shell'; +import { TouchpadPinchGesture } from '../trackers/pinchTracker'; +import { easeActor } from '../utils/environment'; +import { findCentroid, findCornerForWindow, Point } from '../utils/pointsArithmetic'; const Main = imports.ui.main; const Layout = imports.ui.layout; const { lerp } = imports.misc.util; -import { TouchpadPinchGesture } from '../trackers/pinchTracker'; -import { easeActor } from '../utils/environment'; -import { findCentroid, findCornerForWindow, Point } from '../utils/pointsArithmetic'; - // declare enum enum WorkspaceManagerState { SHOW_DESKTOP = -1, @@ -197,7 +196,7 @@ class MonitorGroup { }); }); - if (this._windowActorClones.length ===0) + if (this._windowActorClones.length === 0) this._container.hide(); this._windowActorClones = []; diff --git a/extension/src/snapWindow.ts b/extension/src/snapWindow.ts index 79ecfcf..342ae5c 100644 --- a/extension/src/snapWindow.ts +++ b/extension/src/snapWindow.ts @@ -1,18 +1,17 @@ -import Shell from '@gi-types/shell0'; +import Clutter from '@gi-types/clutter8'; import Meta from '@gi-types/meta8'; +import Shell from '@gi-types/shell0'; import St from '@gi-types/st1'; -import Clutter from '@gi-types/clutter8'; +import { global, imports } from 'gnome-shell'; +import { registerClass } from '../common/utils/gobject'; +import { ExtSettings } from '../constants'; +import { createSwipeTracker, TouchpadSwipeGesture } from './swipeTracker'; +import { easeActor, easeAdjustment } from './utils/environment'; -import { imports, global } from 'gnome-shell'; const Main = imports.ui.main; const Utils = imports.misc.util; -import { createSwipeTracker, TouchpadSwipeGesture } from './swipeTracker'; -import { ExtSettings } from '../constants'; -import { registerClass } from '../common/utils/gobject'; -import { easeActor, easeAdjustment } from './utils/environment'; - const { SwipeTracker } = imports.ui.swipeTracker; const WINDOW_ANIMATION_TIME = 250; diff --git a/extension/src/swipeTracker.ts b/extension/src/swipeTracker.ts index 09955cf..cc4e566 100644 --- a/extension/src/swipeTracker.ts +++ b/extension/src/swipeTracker.ts @@ -1,16 +1,15 @@ import Clutter from '@gi-types/clutter8'; import GObject from '@gi-types/gobject2'; -import Shell from '@gi-types/shell0'; import Meta from '@gi-types/meta8'; -import { imports, global, CustomEventType } from 'gnome-shell'; +import Shell from '@gi-types/shell0'; +import { CustomEventType, global, imports } from 'gnome-shell'; +import { registerClass } from '../common/utils/gobject'; +import { TouchpadConstants } from '../constants'; +import * as DBusUtils from './utils/dbus'; const Main = imports.ui.main; const { SwipeTracker } = imports.ui.swipeTracker; -import * as DBusUtils from './utils/dbus'; -import { TouchpadConstants } from '../constants'; -import { registerClass } from '../common/utils/gobject'; - // define enum enum TouchpadState { NONE = 0, diff --git a/extension/src/trackers/pinchTracker.ts b/extension/src/trackers/pinchTracker.ts index 73d84a5..8dd7814 100644 --- a/extension/src/trackers/pinchTracker.ts +++ b/extension/src/trackers/pinchTracker.ts @@ -1,14 +1,13 @@ import Clutter from '@gi-types/clutter8'; import GObject from '@gi-types/gobject2'; -import Shell from '@gi-types/shell0'; import Meta from '@gi-types/meta8'; +import Shell from '@gi-types/shell0'; import { CustomEventType, global, imports } from 'gnome-shell'; - -const Main = imports.ui.main; - -import * as DBusUtils from '../utils/dbus'; import { registerClass } from '../../common/utils/gobject'; import { TouchpadConstants } from '../../constants'; +import * as DBusUtils from '../utils/dbus'; + +const Main = imports.ui.main; const MIN_ANIMATION_DURATION = 100; const MAX_ANIMATION_DURATION = 400; @@ -202,7 +201,7 @@ export const TouchpadPinchGesture = registerClass({ this._initialProgress = 0; } - _interrupt() { + private _interrupt() { if (this._ackState !== GestureACKState.ACKED) return; diff --git a/extension/src/utils/dbus.ts b/extension/src/utils/dbus.ts index 7241446..d1cde68 100644 --- a/extension/src/utils/dbus.ts +++ b/extension/src/utils/dbus.ts @@ -1,8 +1,7 @@ -import { imports, global, CustomEventType } from 'gnome-shell'; - import Clutter from '@gi-types/clutter8'; import Gio from '@gi-types/gio2'; import GObject from '@gi-types/gobject2'; +import { CustomEventType, global, imports } from 'gnome-shell'; import { registerClass } from '../../common/utils/gobject'; import { printStack } from '../../common/utils/logging'; diff --git a/extension/src/utils/environment.ts b/extension/src/utils/environment.ts index 95f664c..c7e3137 100644 --- a/extension/src/utils/environment.ts +++ b/extension/src/utils/environment.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import GObject from '@gi-types/gobject2'; import { Actor, AnimationMode } from '@gi-types/clutter8'; +import GObject from '@gi-types/gobject2'; import { Adjustment } from '@gi-types/st1'; declare type EaseParamsType = { diff --git a/gnome-shell/index.d.ts b/gnome-shell/index.d.ts index 491fca8..0a0d2b3 100644 --- a/gnome-shell/index.d.ts +++ b/gnome-shell/index.d.ts @@ -1,9 +1,9 @@ import Clutter from '@gi-types/clutter8'; -import St from '@gi-types/st1'; import Gio from '@gi-types/gio2'; -import Shell from '@gi-types/shell0'; -import Meta from '@gi-types/meta8'; import GObject from '@gi-types/gobject2'; +import Meta from '@gi-types/meta8'; +import Shell from '@gi-types/shell0'; +import St from '@gi-types/st1'; declare const global: import('@gi-types/shell0').Global; declare interface ExtensionUtilsMeta { diff --git a/tests/prefs.ts b/tests/prefs.ts index ea6cf4e..a5c8045 100644 --- a/tests/prefs.ts +++ b/tests/prefs.ts @@ -3,9 +3,11 @@ declare const ARGV: string[]; imports.gi.versions['Gtk'] = '4.0'; -import Gtk from '@gi-types/gtk4'; import Gio from '@gi-types/gio2'; import GLib from '@gi-types/glib2'; +import { registerClass } from '@gi-types/gobject2'; +import Gtk from '@gi-types/gtk4'; +import { getPrefsWidget } from './common/prefs'; /** Add parent directory of file in searchPath to be able to import files */ function InsertIntoImportsPath() { @@ -45,8 +47,6 @@ function GetProgramOptions() { }; } -import { registerClass } from '@gi-types/gobject2'; -import { getPrefsWidget } from './common/prefs'; const programOptions = GetProgramOptions(); From 2cc8453ad81a20f2bd8ce5f2b32e8113f761b34c Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sun, 21 Nov 2021 13:55:35 +0530 Subject: [PATCH 090/155] showDesktop: Simplify identifying minimizable windows --- extension/src/pinchGestures/showDesktop.ts | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/extension/src/pinchGestures/showDesktop.ts b/extension/src/pinchGestures/showDesktop.ts index 3f61937..3be9a4a 100644 --- a/extension/src/pinchGestures/showDesktop.ts +++ b/extension/src/pinchGestures/showDesktop.ts @@ -275,27 +275,18 @@ export class ShowDesktopExtension implements ISubExtension { this._monitorGroups = []; } - private _isDesktopIconExtensionWindow(window: Meta.Window) { - return window.skip_taskbar && - window.gtk_application_id === 'com.rastersoft.ding' && - window.gtk_application_object_path === '/com/rastersoft/ding'; - } - private _getMinimizableWindows() { - const types = [Meta.WindowType.MODAL_DIALOG, Meta.WindowType.NORMAL, Meta.WindowType.DIALOG]; - if (this._workspaceManagerState === WorkspaceManagerState.DEFAULT) { this._minimizingWindows = global .get_window_actors() + .filter(a => a.visible) // top actors should be at the beginning .reverse() .map(actor => actor.meta_window) .filter(win => this._windows.has(win) && (win.is_always_on_all_workspaces() || win.get_workspace().index === this._workspace?.index) && - !win.minimized && - types.includes(win.get_window_type()) && - !this._isDesktopIconExtensionWindow(win)); + !win.minimized); } return this._minimizingWindows; From 1c0f4d5b34e403ce8d8edc7a7ed52aa17b039518 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sun, 21 Nov 2021 14:46:19 +0530 Subject: [PATCH 091/155] pinchTracker: Revert unnecessary sign change of scale --- extension/src/pinchGestures/showDesktop.ts | 18 +++++++++--------- extension/src/trackers/pinchTracker.ts | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/extension/src/pinchGestures/showDesktop.ts b/extension/src/pinchGestures/showDesktop.ts index 3be9a4a..2a71085 100644 --- a/extension/src/pinchGestures/showDesktop.ts +++ b/extension/src/pinchGestures/showDesktop.ts @@ -13,8 +13,8 @@ const { lerp } = imports.misc.util; // declare enum enum WorkspaceManagerState { - SHOW_DESKTOP = -1, DEFAULT = 0, + SHOW_DESKTOP = 1, } // declare enum @@ -153,9 +153,9 @@ class MonitorGroup { const { clone, translation } = actorClone; if (translation === undefined) return; - clone.x = lerp(translation.start.x, translation.end.x, -progress); - clone.y = lerp(translation.start.y, translation.end.y, -progress); - clone.opacity = lerp(255, 128, -progress); + clone.x = lerp(translation.start.x, translation.end.x, progress); + clone.y = lerp(translation.start.y, translation.end.y, progress); + clone.opacity = lerp(255, 128, progress); }); } @@ -168,9 +168,9 @@ class MonitorGroup { } easeActor(clone, { - x: lerp(translation.start.x, translation.end.x, -progress), - y: lerp(translation.start.y, translation.end.y, -progress), - opacity: lerp(255, 128, -progress), + x: lerp(translation.start.x, translation.end.x, progress), + y: lerp(translation.start.y, translation.end.y, progress), + opacity: lerp(255, 128, progress), mode: Clutter.AnimationMode.EASE_OUT_QUAD, duration, onStopped: () => { @@ -311,14 +311,14 @@ export class ShowDesktopExtension implements ISubExtension { tracker.confirmPinch( 1, - [WorkspaceManagerState.SHOW_DESKTOP, WorkspaceManagerState.DEFAULT], + [WorkspaceManagerState.DEFAULT, WorkspaceManagerState.SHOW_DESKTOP], this._workspaceManagerState, ); } gestureUpdate(_tracker: unknown, progress: number) { - // progress 0 -> NORMAL state, - 1 -> SHOW Desktop + // progress 0 -> NORMAL state, 1 -> SHOW Desktop // printStack(); for (const monitor of this._monitorGroups) monitor.gestureUpdate(progress); diff --git a/extension/src/trackers/pinchTracker.ts b/extension/src/trackers/pinchTracker.ts index 8dd7814..c4610ee 100644 --- a/extension/src/trackers/pinchTracker.ts +++ b/extension/src/trackers/pinchTracker.ts @@ -182,7 +182,7 @@ export const TouchpadPinchGesture = registerClass({ } /** - * @param currentProgress should be between [0, 2] + * @param currentProgress must be in increasing order */ public confirmPinch(_distance: number, snapPoints: number[], currentProgress: number) { if (this._ackState !== GestureACKState.PENDING_ACK) @@ -225,7 +225,7 @@ export const TouchpadPinchGesture = registerClass({ // this._historyTracker.append(time, delta); // delta /= this._pinchDistance; - const new_progress = -Math.log2(pinch_scale) * this.PINCH_MULTIPLIER + this._initialProgress; + const new_progress = Math.log2(pinch_scale) * this.PINCH_MULTIPLIER + this._initialProgress; const delta = new_progress - this._progress_scale; this._historyTracker.append(time, delta); this._progress_scale = Math.clamp(new_progress, ...this._getBounds()); From 04ce3fdcde77237ed7a6da0cc23e5b14442cd179 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sun, 21 Nov 2021 14:52:58 +0530 Subject: [PATCH 092/155] fix: call the destroy function --- extension/src/pinchGestures/showDesktop.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension/src/pinchGestures/showDesktop.ts b/extension/src/pinchGestures/showDesktop.ts index 2a71085..e15ff54 100644 --- a/extension/src/pinchGestures/showDesktop.ts +++ b/extension/src/pinchGestures/showDesktop.ts @@ -243,7 +243,7 @@ export class ShowDesktopExtension implements ISubExtension { this._windowUnMinimizedId = global.window_manager.connect('unminimize', this._windowUnMinimized.bind(this)); this._monitorChangedId = Main.layoutManager.connect('monitors-changed', () => { - this._monitorGroups.forEach(m => m.destroy); + this._monitorGroups.forEach(m => m.destroy()); this._monitorGroups = []; for (const monitor of Main.layoutManager.monitors) this._monitorGroups.push(new MonitorGroup(monitor)); From 96d6a2b3e53d3011f6bbe7c1de6dbc7e69b00459 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sun, 21 Nov 2021 15:49:29 +0530 Subject: [PATCH 093/155] Update README --- README.md | 24 ++++++++++++++---------- extension_page.md | 1 + 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 2803ffe..53ac2ce 100644 --- a/README.md +++ b/README.md @@ -26,16 +26,20 @@ gnome-extensions enable gestureImprovements@gestures On X11, you also need to install [gnome-x11-gesture-daemon](https://github.com/harshadgavali/gnome-x11-gesture-daemon) ## Gestures (including built-in ones) -| Gesture | Modes | Fingers | Direction | -| :------------------------------------------ | :------- | :------ | :-------------- | -| Switch windows | Desktop | 3 | Horizontal | -| Switch workspaces | Overview | 2/3 | Horizontal | -| Switch app pages | AppGrid | 2/3 | Horizontal | -| Switch workspaces | * | 4 | Horizontal | -| Desktop/Overview/AppGrid navigation | * | 4 | Vertical | -| Unmaximize/maximize/fullscreen a window | Desktop | 3 | Vertical | -| Minimize a window | Desktop | 3 | Vertical | -| Snap/half-tile a window | Desktop | 3 | Explained below | +| Swipe Gesture | Modes | Fingers | Direction | +| :-------------------------------------- | :------- | :------ | :-------------- | +| Switch windows | Desktop | 3 | Horizontal | +| Switch workspaces | Overview | 2/3 | Horizontal | +| Switch app pages | AppGrid | 2/3 | Horizontal | +| Switch workspaces | * | 4 | Horizontal | +| Desktop/Overview/AppGrid navigation | * | 4 | Vertical | +| Unmaximize/maximize/fullscreen a window | Desktop | 3 | Vertical | +| Minimize a window | Desktop | 3 | Vertical | +| Snap/half-tile a window | Desktop | 3 | Explained below | + +| Pinch Gesture | Modes | Fingers | +| :------------ | :------ | :------ | +| Show Desktop | Desktop | 3/4 | #### Notes * Minimize gesture is available if you have dash-to-dock/panel or similar extension enabled. diff --git a/extension_page.md b/extension_page.md index fabd1c7..0b28182 100644 --- a/extension_page.md +++ b/extension_page.md @@ -8,6 +8,7 @@ This extension adds following features: • Unmaximize/maximize/fullscreen/half-tiling using 3-finger vertical & horizontal gesture • Optional minimize a window gesture • Override 3-finger gesture with 4-finger for switching workspace +* Pinch to show desktop • Configure speed of gestures • Support for X11 From 472a71e9e709109d9e190385411035d5d6b3b143 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sun, 21 Nov 2021 15:49:55 +0530 Subject: [PATCH 094/155] Update version --- metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata.json b/metadata.json index 89f42aa..39bc7ad 100644 --- a/metadata.json +++ b/metadata.json @@ -8,5 +8,5 @@ "settings-schema": "org.gnome.shell.extensions.gestureImprovements", "url": "https://github.com/harshadgavali/gnome-gesture-improvements", "uuid": "gestureImprovements@gestures", - "version": 17.1 + "version": 18 } \ No newline at end of file From d47a65c98e48ca1ef372a8f8f603134d1bac4094 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Mon, 22 Nov 2021 22:14:45 +0530 Subject: [PATCH 095/155] showDesktop: don't hide desktop windows :) This is fix for desktop icons window being animated on pinch on X11 --- extension/src/pinchGestures/showDesktop.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/extension/src/pinchGestures/showDesktop.ts b/extension/src/pinchGestures/showDesktop.ts index e15ff54..a02f069 100644 --- a/extension/src/pinchGestures/showDesktop.ts +++ b/extension/src/pinchGestures/showDesktop.ts @@ -284,6 +284,7 @@ export class ShowDesktopExtension implements ISubExtension { .reverse() .map(actor => actor.meta_window) .filter(win => + win.get_window_type() !== Meta.WindowType.DESKTOP && this._windows.has(win) && (win.is_always_on_all_workspaces() || win.get_workspace().index === this._workspace?.index) && !win.minimized); From f0bbc971cdbeb560637573fc01bda05b7c2bd462 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Mon, 22 Nov 2021 01:04:50 +0530 Subject: [PATCH 096/155] altTab: Reset gesture state when switcher is destroyed switcher get's destroyed on key/mouse prese event --- extension/src/altTab.ts | 42 +++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/extension/src/altTab.ts b/extension/src/altTab.ts index 11c59f5..90ba646 100644 --- a/extension/src/altTab.ts +++ b/extension/src/altTab.ts @@ -24,12 +24,13 @@ function getAvgProgressForIndex(index: number, nelement: number): number { return progress; } -const AltTabExtState = { - DISABLED: 0, - DEFAULT: 1, - ALTTABDELAY: 2, - ALTTAB: 3, -}; +// declare enum +enum AltTabExtState { + DISABLED = 0, + DEFAULT = 1, + ALTTABDELAY = 2, + ALTTAB = 3, +} export class AltTabGestureExtension implements ISubExtension { private _connectHandlers: number[]; @@ -104,6 +105,11 @@ export class AltTabGestureExtension implements ISubExtension { this._progress = 0; if (this._extState === AltTabExtState.DEFAULT) { this._switcher = new WindowSwitcherPopup(); + this._switcher.connect('destroy', () => { + this._switcher = undefined; + this._reset(); + }); + // remove timeout entirely this._switcher._resetNoModsTimeout = function () { if (this._noModsTimeoutId) { @@ -164,27 +170,27 @@ export class AltTabGestureExtension implements ISubExtension { } _gestureEnd(): void { - if (this._extState === AltTabExtState.ALTTAB || - this._extState === AltTabExtState.ALTTABDELAY) { + if (this._switcher) { + const win = this._switcher._items[this._switcher._selectedIndex].window; + Main.activateWindow(win); + this._switcher.destroy(); + this._switcher = undefined; + } + + this._reset(); + } + + private _reset() { + if (this._extState > AltTabExtState.DEFAULT) { this._extState = AltTabExtState.DEFAULT; if (this._altTabTimeoutId) { GLib.source_remove(this._altTabTimeoutId); this._altTabTimeoutId = 0; } - if (this._switcher) { - const win = this._switcher._items[this._switcher._selectedIndex].window; - Main.activateWindow(win); - this._switcher.destroy(); - this._switcher = undefined; - } this._progress = 0; this._adjustment.value = 0; } this._extState = AltTabExtState.DEFAULT; } - - get state(): number { - return this._extState; - } } \ No newline at end of file From 23f7c165ac6fce437d18709b840d2c101c85d5f2 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Mon, 22 Nov 2021 22:47:04 +0530 Subject: [PATCH 097/155] Update version --- extension_page.md | 2 +- metadata.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extension_page.md b/extension_page.md index 0b28182..de2a1f1 100644 --- a/extension_page.md +++ b/extension_page.md @@ -8,7 +8,7 @@ This extension adds following features: • Unmaximize/maximize/fullscreen/half-tiling using 3-finger vertical & horizontal gesture • Optional minimize a window gesture • Override 3-finger gesture with 4-finger for switching workspace -* Pinch to show desktop +• Pinch to show desktop • Configure speed of gestures • Support for X11 diff --git a/metadata.json b/metadata.json index 39bc7ad..481c9fc 100644 --- a/metadata.json +++ b/metadata.json @@ -8,5 +8,5 @@ "settings-schema": "org.gnome.shell.extensions.gestureImprovements", "url": "https://github.com/harshadgavali/gnome-gesture-improvements", "uuid": "gestureImprovements@gestures", - "version": 18 + "version": 19 } \ No newline at end of file From e25834682008b15a47f0eb39a7054e2d3b3f2ca0 Mon Sep 17 00:00:00 2001 From: Harshad <30668911+harshadgavali@users.noreply.github.com> Date: Thu, 13 Jan 2022 10:19:50 +0530 Subject: [PATCH 098/155] Create dependabot.yml --- .github/dependabot.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..8abca40 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "npm" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "daily" From 8cf7c7405e1713cc77573bd36235295832466062 Mon Sep 17 00:00:00 2001 From: Harshad <30668911+harshadgavali@users.noreply.github.com> Date: Thu, 13 Jan 2022 10:25:21 +0530 Subject: [PATCH 099/155] Update dependabot.yml --- .github/dependabot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 8abca40..e574638 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -8,4 +8,4 @@ updates: - package-ecosystem: "npm" # See documentation for possible values directory: "/" # Location of package manifests schedule: - interval: "daily" + interval: "weekly" From 1c617ff14e57dcb7d64aa9d39ad73a05693bd563 Mon Sep 17 00:00:00 2001 From: Harshad <30668911+harshadgavali@users.noreply.github.com> Date: Mon, 17 Jan 2022 09:05:25 +0530 Subject: [PATCH 100/155] Update dependabot.yml --- .github/dependabot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index e574638..fe250eb 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -8,4 +8,4 @@ updates: - package-ecosystem: "npm" # See documentation for possible values directory: "/" # Location of package manifests schedule: - interval: "weekly" + interval: "monthly" From 324a3491e6aa12d3701560e5528001563fb5c90a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 22 Jan 2022 16:48:15 +0530 Subject: [PATCH 101/155] build(deps-dev): bump @typescript-eslint/parser from 5.1.0 to 5.9.1 (#48) Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.1.0 to 5.9.1. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.9.1/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/parser" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 143 +++++++++++++++++++++++++++++++++++++++++----- package.json | 2 +- 2 files changed, 131 insertions(+), 14 deletions(-) diff --git a/package-lock.json b/package-lock.json index c3da252..e99f052 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,7 +29,7 @@ "@types/node": "^16.11.4", "@types/yargs": "^17.0.4", "@typescript-eslint/eslint-plugin": "^5.1.0", - "@typescript-eslint/parser": "^5.1.0", + "@typescript-eslint/parser": "^5.9.1", "eslint": "^8.1.0" } }, @@ -621,14 +621,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.1.0.tgz", - "integrity": "sha512-vx1P+mhCtYw3+bRHmbalq/VKP2Y3gnzNgxGxfEWc6OFpuEL7iQdAeq11Ke3Rhy8NjgB+AHsIWEwni3e+Y7djKA==", + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.9.1.tgz", + "integrity": "sha512-PLYO0AmwD6s6n0ZQB5kqPgfvh73p0+VqopQQLuNfi7Lm0EpfKyDalchpVwkE+81k5HeiRrTV/9w1aNHzjD7C4g==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.1.0", - "@typescript-eslint/types": "5.1.0", - "@typescript-eslint/typescript-estree": "5.1.0", + "@typescript-eslint/scope-manager": "5.9.1", + "@typescript-eslint/types": "5.9.1", + "@typescript-eslint/typescript-estree": "5.9.1", "debug": "^4.3.2" }, "engines": { @@ -647,6 +647,80 @@ } } }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": { + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.9.1.tgz", + "integrity": "sha512-8BwvWkho3B/UOtzRyW07ffJXPaLSUKFBjpq8aqsRvu6HdEuzCY57+ffT7QoV4QXJXWSU1+7g3wE4AlgImmQ9pQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.9.1", + "@typescript-eslint/visitor-keys": "5.9.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": { + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.9.1.tgz", + "integrity": "sha512-SsWegWudWpkZCwwYcKoDwuAjoZXnM1y2EbEerTHho19Hmm+bQ56QG4L4jrtCu0bI5STaRTvRTZmjprWlTw/5NQ==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": { + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.9.1.tgz", + "integrity": "sha512-gL1sP6A/KG0HwrahVXI9fZyeVTxEYV//6PmcOn1tD0rw8VhUWYeZeuWHwwhnewnvEMcHjhnJLOBhA9rK4vmb8A==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.9.1", + "@typescript-eslint/visitor-keys": "5.9.1", + "debug": "^4.3.2", + "globby": "^11.0.4", + "is-glob": "^4.0.3", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": { + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.9.1.tgz", + "integrity": "sha512-Xh37pNz9e9ryW4TVdwiFzmr4hloty8cFj8GTWMXh3Z8swGwyQWeCcNgF0hm6t09iZd6eiZmIf4zHedQVP6TVtg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.9.1", + "eslint-visitor-keys": "^3.0.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/@typescript-eslint/scope-manager": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.1.0.tgz", @@ -2644,15 +2718,58 @@ } }, "@typescript-eslint/parser": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.1.0.tgz", - "integrity": "sha512-vx1P+mhCtYw3+bRHmbalq/VKP2Y3gnzNgxGxfEWc6OFpuEL7iQdAeq11Ke3Rhy8NjgB+AHsIWEwni3e+Y7djKA==", + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.9.1.tgz", + "integrity": "sha512-PLYO0AmwD6s6n0ZQB5kqPgfvh73p0+VqopQQLuNfi7Lm0EpfKyDalchpVwkE+81k5HeiRrTV/9w1aNHzjD7C4g==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.1.0", - "@typescript-eslint/types": "5.1.0", - "@typescript-eslint/typescript-estree": "5.1.0", + "@typescript-eslint/scope-manager": "5.9.1", + "@typescript-eslint/types": "5.9.1", + "@typescript-eslint/typescript-estree": "5.9.1", "debug": "^4.3.2" + }, + "dependencies": { + "@typescript-eslint/scope-manager": { + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.9.1.tgz", + "integrity": "sha512-8BwvWkho3B/UOtzRyW07ffJXPaLSUKFBjpq8aqsRvu6HdEuzCY57+ffT7QoV4QXJXWSU1+7g3wE4AlgImmQ9pQ==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.9.1", + "@typescript-eslint/visitor-keys": "5.9.1" + } + }, + "@typescript-eslint/types": { + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.9.1.tgz", + "integrity": "sha512-SsWegWudWpkZCwwYcKoDwuAjoZXnM1y2EbEerTHho19Hmm+bQ56QG4L4jrtCu0bI5STaRTvRTZmjprWlTw/5NQ==", + "dev": true + }, + "@typescript-eslint/typescript-estree": { + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.9.1.tgz", + "integrity": "sha512-gL1sP6A/KG0HwrahVXI9fZyeVTxEYV//6PmcOn1tD0rw8VhUWYeZeuWHwwhnewnvEMcHjhnJLOBhA9rK4vmb8A==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.9.1", + "@typescript-eslint/visitor-keys": "5.9.1", + "debug": "^4.3.2", + "globby": "^11.0.4", + "is-glob": "^4.0.3", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/visitor-keys": { + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.9.1.tgz", + "integrity": "sha512-Xh37pNz9e9ryW4TVdwiFzmr4hloty8cFj8GTWMXh3Z8swGwyQWeCcNgF0hm6t09iZd6eiZmIf4zHedQVP6TVtg==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.9.1", + "eslint-visitor-keys": "^3.0.0" + } + } } }, "@typescript-eslint/scope-manager": { diff --git a/package.json b/package.json index f59487c..659d134 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "@types/node": "^16.11.4", "@types/yargs": "^17.0.4", "@typescript-eslint/eslint-plugin": "^5.1.0", - "@typescript-eslint/parser": "^5.1.0", + "@typescript-eslint/parser": "^5.9.1", "eslint": "^8.1.0" }, "dependencies": { From 877dd6d43f8e7da23005c785fce713df845dc91d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 22 Jan 2022 16:49:41 +0530 Subject: [PATCH 102/155] build(deps): bump yargs from 17.2.1 to 17.3.1 (#45) Bumps [yargs](https://github.com/yargs/yargs) from 17.2.1 to 17.3.1. - [Release notes](https://github.com/yargs/yargs/releases) - [Changelog](https://github.com/yargs/yargs/blob/main/CHANGELOG.md) - [Commits](https://github.com/yargs/yargs/compare/v17.2.1...v17.3.1) --- updated-dependencies: - dependency-name: yargs dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 36 ++++++++++++++++++------------------ package.json | 2 +- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/package-lock.json b/package-lock.json index e99f052..76b8ba6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "glob": "^7.2.0", "path": "^0.12.7", "typescript": "^4.4.4", - "yargs": "^17.2.1" + "yargs": "^17.3.1" }, "devDependencies": { "@gi-types/clutter8": "^8.0.0", @@ -2147,28 +2147,28 @@ "dev": true }, "node_modules/yargs": { - "version": "17.2.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.2.1.tgz", - "integrity": "sha512-XfR8du6ua4K6uLGm5S6fA+FIJom/MdJcFNVY8geLlp2v8GYbOXD4EB1tPNZsRn4vBzKGMgb5DRZMeWuFc2GO8Q==", + "version": "17.3.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.3.1.tgz", + "integrity": "sha512-WUANQeVgjLbNsEmGk20f+nlHgOqzRFpiGWVaBrYGYIGANIIu3lWjoyi0fNlFmJkvfhCZ6BXINe7/W2O2bV4iaA==", "dependencies": { "cliui": "^7.0.2", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", - "string-width": "^4.2.0", + "string-width": "^4.2.3", "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" + "yargs-parser": "^21.0.0" }, "engines": { "node": ">=12" } }, "node_modules/yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "version": "21.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.0.tgz", + "integrity": "sha512-z9kApYUOCwoeZ78rfRYYWdiU/iNL6mwwYlkkZfJoyMR1xps+NEBX5X7XmRpxkZHhXJ6+Ey00IwKxBBSW9FIjyA==", "engines": { - "node": ">=10" + "node": ">=12" } } }, @@ -3804,23 +3804,23 @@ "dev": true }, "yargs": { - "version": "17.2.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.2.1.tgz", - "integrity": "sha512-XfR8du6ua4K6uLGm5S6fA+FIJom/MdJcFNVY8geLlp2v8GYbOXD4EB1tPNZsRn4vBzKGMgb5DRZMeWuFc2GO8Q==", + "version": "17.3.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.3.1.tgz", + "integrity": "sha512-WUANQeVgjLbNsEmGk20f+nlHgOqzRFpiGWVaBrYGYIGANIIu3lWjoyi0fNlFmJkvfhCZ6BXINe7/W2O2bV4iaA==", "requires": { "cliui": "^7.0.2", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", - "string-width": "^4.2.0", + "string-width": "^4.2.3", "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" + "yargs-parser": "^21.0.0" } }, "yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==" + "version": "21.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.0.tgz", + "integrity": "sha512-z9kApYUOCwoeZ78rfRYYWdiU/iNL6mwwYlkkZfJoyMR1xps+NEBX5X7XmRpxkZHhXJ6+Ey00IwKxBBSW9FIjyA==" } } } diff --git a/package.json b/package.json index 659d134..5dd4c99 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,6 @@ "glob": "^7.2.0", "path": "^0.12.7", "typescript": "^4.4.4", - "yargs": "^17.2.1" + "yargs": "^17.3.1" } } From d98fbbb5af5ca16ddb0902fddd8a9af6cacfa3b7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 22 Jan 2022 16:50:02 +0530 Subject: [PATCH 103/155] build(deps-dev): bump @typescript-eslint/eslint-plugin (#51) Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.1.0 to 5.10.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.10.0/packages/eslint-plugin) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 205 +++++++++++++++++++++++++++------------------- package.json | 2 +- 2 files changed, 123 insertions(+), 84 deletions(-) diff --git a/package-lock.json b/package-lock.json index 76b8ba6..4e5ad43 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,7 +28,7 @@ "@types/glob": "^7.2.0", "@types/node": "^16.11.4", "@types/yargs": "^17.0.4", - "@typescript-eslint/eslint-plugin": "^5.1.0", + "@typescript-eslint/eslint-plugin": "^5.10.0", "@typescript-eslint/parser": "^5.9.1", "eslint": "^8.1.0" } @@ -556,13 +556,14 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.1.0.tgz", - "integrity": "sha512-bekODL3Tqf36Yz8u+ilha4zGxL9mdB6LIsIoMAvvC5FAuWo4NpZYXtCbv7B2CeR1LhI/lLtLk+q4tbtxuoVuCg==", + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.10.0.tgz", + "integrity": "sha512-XXVKnMsq2fuu9K2KsIxPUGqb6xAImz8MEChClbXmE3VbveFtBUU5bzM6IPVWqzyADIgdkS2Ws/6Xo7W2TeZWjQ==", "dev": true, "dependencies": { - "@typescript-eslint/experimental-utils": "5.1.0", - "@typescript-eslint/scope-manager": "5.1.0", + "@typescript-eslint/scope-manager": "5.10.0", + "@typescript-eslint/type-utils": "5.10.0", + "@typescript-eslint/utils": "5.10.0", "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", @@ -596,30 +597,6 @@ "node": ">= 4" } }, - "node_modules/@typescript-eslint/experimental-utils": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.1.0.tgz", - "integrity": "sha512-ovE9qUiZMOMgxQAESZsdBT+EXIfx/YUYAbwGUI6V03amFdOOxI9c6kitkgRvLkJaLusgMZ2xBhss+tQ0Y1HWxA==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.1.0", - "@typescript-eslint/types": "5.1.0", - "@typescript-eslint/typescript-estree": "5.1.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "*" - } - }, "node_modules/@typescript-eslint/parser": { "version": "5.9.1", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.9.1.tgz", @@ -722,13 +699,31 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.1.0.tgz", - "integrity": "sha512-yYlyVjvn5lvwCL37i4hPsa1s0ORsjkauhTqbb8MnpvUs7xykmcjGqwlNZ2Q5QpoqkJ1odlM2bqHqJwa28qV6Tw==", + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.10.0.tgz", + "integrity": "sha512-tgNgUgb4MhqK6DoKn3RBhyZ9aJga7EQrw+2/OiDk5hKf3pTVZWyqBi7ukP+Z0iEEDMF5FDa64LqODzlfE4O/Dg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.10.0", + "@typescript-eslint/visitor-keys": "5.10.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.10.0.tgz", + "integrity": "sha512-TzlyTmufJO5V886N+hTJBGIfnjQDQ32rJYxPaeiyWKdjsv2Ld5l8cbS7pxim4DeNs62fKzRSt8Q14Evs4JnZyQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.1.0", - "@typescript-eslint/visitor-keys": "5.1.0" + "@typescript-eslint/utils": "5.10.0", + "debug": "^4.3.2", + "tsutils": "^3.21.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -736,12 +731,20 @@ "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, "node_modules/@typescript-eslint/types": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.1.0.tgz", - "integrity": "sha512-sEwNINVxcB4ZgC6Fe6rUyMlvsB2jvVdgxjZEjQUQVlaSPMNamDOwO6/TB98kFt4sYYfNhdhTPBEQqNQZjMMswA==", + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.10.0.tgz", + "integrity": "sha512-wUljCgkqHsMZbw60IbOqT/puLfyqqD5PquGiBo1u1IS3PLxdi3RDGlyf032IJyh+eQoGhz9kzhtZa+VC4eWTlQ==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -752,13 +755,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.1.0.tgz", - "integrity": "sha512-SSz+l9YrIIsW4s0ZqaEfnjl156XQ4VRmJsbA0ZE1XkXrD3cRpzuZSVCyqeCMR3EBjF27IisWakbBDGhGNIOvfQ==", + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.10.0.tgz", + "integrity": "sha512-x+7e5IqfwLwsxTdliHRtlIYkgdtYXzE0CkFeV6ytAqq431ZyxCFzNMNR5sr3WOlIG/ihVZr9K/y71VHTF/DUQA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.1.0", - "@typescript-eslint/visitor-keys": "5.1.0", + "@typescript-eslint/types": "5.10.0", + "@typescript-eslint/visitor-keys": "5.10.0", "debug": "^4.3.2", "globby": "^11.0.4", "is-glob": "^4.0.3", @@ -778,13 +781,37 @@ } } }, + "node_modules/@typescript-eslint/utils": { + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.10.0.tgz", + "integrity": "sha512-IGYwlt1CVcFoE2ueW4/ioEwybR60RAdGeiJX/iDAw0t5w0wK3S7QncDwpmsM70nKgGTuVchEWB8lwZwHqPAWRg==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.9", + "@typescript-eslint/scope-manager": "5.10.0", + "@typescript-eslint/types": "5.10.0", + "@typescript-eslint/typescript-estree": "5.10.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.1.0.tgz", - "integrity": "sha512-uqNXepKBg81JVwjuqAxYrXa1Ql/YDzM+8g/pS+TCPxba0wZttl8m5DkrasbfnmJGHs4lQ2jTbcZ5azGhI7kK+w==", + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.10.0.tgz", + "integrity": "sha512-GMxj0K1uyrFLPKASLmZzCuSddmjZVbVj3Ouy5QVuIGKZopxvOr24JsS7gruz6C3GExE01mublZ3mIBOaon9zuQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.1.0", + "@typescript-eslint/types": "5.10.0", "eslint-visitor-keys": "^3.0.0" }, "engines": { @@ -2680,13 +2707,14 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.1.0.tgz", - "integrity": "sha512-bekODL3Tqf36Yz8u+ilha4zGxL9mdB6LIsIoMAvvC5FAuWo4NpZYXtCbv7B2CeR1LhI/lLtLk+q4tbtxuoVuCg==", + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.10.0.tgz", + "integrity": "sha512-XXVKnMsq2fuu9K2KsIxPUGqb6xAImz8MEChClbXmE3VbveFtBUU5bzM6IPVWqzyADIgdkS2Ws/6Xo7W2TeZWjQ==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "5.1.0", - "@typescript-eslint/scope-manager": "5.1.0", + "@typescript-eslint/scope-manager": "5.10.0", + "@typescript-eslint/type-utils": "5.10.0", + "@typescript-eslint/utils": "5.10.0", "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", @@ -2703,20 +2731,6 @@ } } }, - "@typescript-eslint/experimental-utils": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.1.0.tgz", - "integrity": "sha512-ovE9qUiZMOMgxQAESZsdBT+EXIfx/YUYAbwGUI6V03amFdOOxI9c6kitkgRvLkJaLusgMZ2xBhss+tQ0Y1HWxA==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.1.0", - "@typescript-eslint/types": "5.1.0", - "@typescript-eslint/typescript-estree": "5.1.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" - } - }, "@typescript-eslint/parser": { "version": "5.9.1", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.9.1.tgz", @@ -2773,29 +2787,40 @@ } }, "@typescript-eslint/scope-manager": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.1.0.tgz", - "integrity": "sha512-yYlyVjvn5lvwCL37i4hPsa1s0ORsjkauhTqbb8MnpvUs7xykmcjGqwlNZ2Q5QpoqkJ1odlM2bqHqJwa28qV6Tw==", + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.10.0.tgz", + "integrity": "sha512-tgNgUgb4MhqK6DoKn3RBhyZ9aJga7EQrw+2/OiDk5hKf3pTVZWyqBi7ukP+Z0iEEDMF5FDa64LqODzlfE4O/Dg==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.10.0", + "@typescript-eslint/visitor-keys": "5.10.0" + } + }, + "@typescript-eslint/type-utils": { + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.10.0.tgz", + "integrity": "sha512-TzlyTmufJO5V886N+hTJBGIfnjQDQ32rJYxPaeiyWKdjsv2Ld5l8cbS7pxim4DeNs62fKzRSt8Q14Evs4JnZyQ==", "dev": true, "requires": { - "@typescript-eslint/types": "5.1.0", - "@typescript-eslint/visitor-keys": "5.1.0" + "@typescript-eslint/utils": "5.10.0", + "debug": "^4.3.2", + "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.1.0.tgz", - "integrity": "sha512-sEwNINVxcB4ZgC6Fe6rUyMlvsB2jvVdgxjZEjQUQVlaSPMNamDOwO6/TB98kFt4sYYfNhdhTPBEQqNQZjMMswA==", + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.10.0.tgz", + "integrity": "sha512-wUljCgkqHsMZbw60IbOqT/puLfyqqD5PquGiBo1u1IS3PLxdi3RDGlyf032IJyh+eQoGhz9kzhtZa+VC4eWTlQ==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.1.0.tgz", - "integrity": "sha512-SSz+l9YrIIsW4s0ZqaEfnjl156XQ4VRmJsbA0ZE1XkXrD3cRpzuZSVCyqeCMR3EBjF27IisWakbBDGhGNIOvfQ==", + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.10.0.tgz", + "integrity": "sha512-x+7e5IqfwLwsxTdliHRtlIYkgdtYXzE0CkFeV6ytAqq431ZyxCFzNMNR5sr3WOlIG/ihVZr9K/y71VHTF/DUQA==", "dev": true, "requires": { - "@typescript-eslint/types": "5.1.0", - "@typescript-eslint/visitor-keys": "5.1.0", + "@typescript-eslint/types": "5.10.0", + "@typescript-eslint/visitor-keys": "5.10.0", "debug": "^4.3.2", "globby": "^11.0.4", "is-glob": "^4.0.3", @@ -2803,13 +2828,27 @@ "tsutils": "^3.21.0" } }, + "@typescript-eslint/utils": { + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.10.0.tgz", + "integrity": "sha512-IGYwlt1CVcFoE2ueW4/ioEwybR60RAdGeiJX/iDAw0t5w0wK3S7QncDwpmsM70nKgGTuVchEWB8lwZwHqPAWRg==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.9", + "@typescript-eslint/scope-manager": "5.10.0", + "@typescript-eslint/types": "5.10.0", + "@typescript-eslint/typescript-estree": "5.10.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + } + }, "@typescript-eslint/visitor-keys": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.1.0.tgz", - "integrity": "sha512-uqNXepKBg81JVwjuqAxYrXa1Ql/YDzM+8g/pS+TCPxba0wZttl8m5DkrasbfnmJGHs4lQ2jTbcZ5azGhI7kK+w==", + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.10.0.tgz", + "integrity": "sha512-GMxj0K1uyrFLPKASLmZzCuSddmjZVbVj3Ouy5QVuIGKZopxvOr24JsS7gruz6C3GExE01mublZ3mIBOaon9zuQ==", "dev": true, "requires": { - "@typescript-eslint/types": "5.1.0", + "@typescript-eslint/types": "5.10.0", "eslint-visitor-keys": "^3.0.0" } }, diff --git a/package.json b/package.json index 5dd4c99..d6e6b2d 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "@types/glob": "^7.2.0", "@types/node": "^16.11.4", "@types/yargs": "^17.0.4", - "@typescript-eslint/eslint-plugin": "^5.1.0", + "@typescript-eslint/eslint-plugin": "^5.10.0", "@typescript-eslint/parser": "^5.9.1", "eslint": "^8.1.0" }, From b0b48deabbb64e167f3a04e37d7f32c3358e603a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 22 Jan 2022 16:50:58 +0530 Subject: [PATCH 104/155] build(deps): bump typescript from 4.4.4 to 4.5.5 (#49) Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.4.4 to 4.5.5. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Commits](https://github.com/Microsoft/TypeScript/compare/v4.4.4...v4.5.5) --- updated-dependencies: - dependency-name: typescript dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4e5ad43..6774aca 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "fs": "0.0.1-security", "glob": "^7.2.0", "path": "^0.12.7", - "typescript": "^4.4.4", + "typescript": "^4.5.5", "yargs": "^17.3.1" }, "devDependencies": { @@ -2075,9 +2075,9 @@ } }, "node_modules/typescript": { - "version": "4.4.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.4.tgz", - "integrity": "sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA==", + "version": "4.5.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", + "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -3767,9 +3767,9 @@ "dev": true }, "typescript": { - "version": "4.4.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.4.tgz", - "integrity": "sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA==" + "version": "4.5.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", + "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==" }, "uri-js": { "version": "4.4.1", diff --git a/package.json b/package.json index d6e6b2d..4e6e6de 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "fs": "0.0.1-security", "glob": "^7.2.0", "path": "^0.12.7", - "typescript": "^4.4.4", + "typescript": "^4.5.5", "yargs": "^17.3.1" } } From 293052b79c763303b81392084c211758c525b0d2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 22 Jan 2022 16:51:12 +0530 Subject: [PATCH 105/155] build(deps-dev): bump @types/yargs from 17.0.4 to 17.0.8 (#44) Bumps [@types/yargs](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/yargs) from 17.0.4 to 17.0.8. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/yargs) --- updated-dependencies: - dependency-name: "@types/yargs" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6774aca..2374660 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,7 +27,7 @@ "@gi-types/st1": "^1.0.0", "@types/glob": "^7.2.0", "@types/node": "^16.11.4", - "@types/yargs": "^17.0.4", + "@types/yargs": "^17.0.8", "@typescript-eslint/eslint-plugin": "^5.10.0", "@typescript-eslint/parser": "^5.9.1", "eslint": "^8.1.0" @@ -541,9 +541,9 @@ "dev": true }, "node_modules/@types/yargs": { - "version": "17.0.4", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.4.tgz", - "integrity": "sha512-D/wihO9WFYqwsmJI0e0qS+U09wIQtYRSBJlXWjTFGjouEuOCy0BU4N/ZK5utb00S5lW/9LO7vOpvGDd8M06NvQ==", + "version": "17.0.8", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.8.tgz", + "integrity": "sha512-wDeUwiUmem9FzsyysEwRukaEdDNcwbROvQ9QGRKaLI6t+IltNzbn4/i4asmB10auvZGQCzSQ6t0GSczEThlUXw==", "dev": true, "dependencies": { "@types/yargs-parser": "*" @@ -2692,9 +2692,9 @@ "dev": true }, "@types/yargs": { - "version": "17.0.4", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.4.tgz", - "integrity": "sha512-D/wihO9WFYqwsmJI0e0qS+U09wIQtYRSBJlXWjTFGjouEuOCy0BU4N/ZK5utb00S5lW/9LO7vOpvGDd8M06NvQ==", + "version": "17.0.8", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.8.tgz", + "integrity": "sha512-wDeUwiUmem9FzsyysEwRukaEdDNcwbROvQ9QGRKaLI6t+IltNzbn4/i4asmB10auvZGQCzSQ6t0GSczEThlUXw==", "dev": true, "requires": { "@types/yargs-parser": "*" diff --git a/package.json b/package.json index 4e6e6de..5525f01 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "@gi-types/st1": "^1.0.0", "@types/glob": "^7.2.0", "@types/node": "^16.11.4", - "@types/yargs": "^17.0.4", + "@types/yargs": "^17.0.8", "@typescript-eslint/eslint-plugin": "^5.10.0", "@typescript-eslint/parser": "^5.9.1", "eslint": "^8.1.0" From c4234e59d089aff6adada9a7e80c355525977630 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 22 Jan 2022 16:52:15 +0530 Subject: [PATCH 106/155] build(deps-dev): bump @types/node from 16.11.4 to 17.0.10 (#50) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 16.11.4 to 17.0.10. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2374660..2cb91b4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,7 +26,7 @@ "@gi-types/shell0": "^0.1.0", "@gi-types/st1": "^1.0.0", "@types/glob": "^7.2.0", - "@types/node": "^16.11.4", + "@types/node": "^17.0.10", "@types/yargs": "^17.0.8", "@typescript-eslint/eslint-plugin": "^5.10.0", "@typescript-eslint/parser": "^5.9.1", @@ -535,9 +535,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "16.11.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.4.tgz", - "integrity": "sha512-TMgXmy0v2xWyuCSCJM6NCna2snndD8yvQF67J29ipdzMcsPa9u+o0tjF5+EQNdhcuZplYuouYqpc4zcd5I6amQ==", + "version": "17.0.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.10.tgz", + "integrity": "sha512-S/3xB4KzyFxYGCppyDt68yzBU9ysL88lSdIah4D6cptdcltc4NCPCAMc0+PCpg/lLIyC7IPvj2Z52OJWeIUkog==", "dev": true }, "node_modules/@types/yargs": { @@ -2686,9 +2686,9 @@ "dev": true }, "@types/node": { - "version": "16.11.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.4.tgz", - "integrity": "sha512-TMgXmy0v2xWyuCSCJM6NCna2snndD8yvQF67J29ipdzMcsPa9u+o0tjF5+EQNdhcuZplYuouYqpc4zcd5I6amQ==", + "version": "17.0.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.10.tgz", + "integrity": "sha512-S/3xB4KzyFxYGCppyDt68yzBU9ysL88lSdIah4D6cptdcltc4NCPCAMc0+PCpg/lLIyC7IPvj2Z52OJWeIUkog==", "dev": true }, "@types/yargs": { diff --git a/package.json b/package.json index 5525f01..c9626f4 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "@gi-types/shell0": "^0.1.0", "@gi-types/st1": "^1.0.0", "@types/glob": "^7.2.0", - "@types/node": "^16.11.4", + "@types/node": "^17.0.10", "@types/yargs": "^17.0.8", "@typescript-eslint/eslint-plugin": "^5.10.0", "@typescript-eslint/parser": "^5.9.1", From 10e2624c0d8ee0de01c267184b410a86e61f7dfe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 22 Jan 2022 16:52:28 +0530 Subject: [PATCH 107/155] build(deps-dev): bump @types/node from 16.11.4 to 17.0.10 (#50) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 16.11.4 to 17.0.10. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> From 828ac26d2d2c222a53bc9ca968eaad40fc11bb7a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 22 Jan 2022 16:52:49 +0530 Subject: [PATCH 108/155] build(deps-dev): bump @typescript-eslint/parser from 5.9.1 to 5.10.0 (#52) Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.9.1 to 5.10.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.10.0/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/parser" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 143 +++++----------------------------------------- package.json | 2 +- 2 files changed, 14 insertions(+), 131 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2cb91b4..ca5c6ae 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,7 +29,7 @@ "@types/node": "^17.0.10", "@types/yargs": "^17.0.8", "@typescript-eslint/eslint-plugin": "^5.10.0", - "@typescript-eslint/parser": "^5.9.1", + "@typescript-eslint/parser": "^5.10.0", "eslint": "^8.1.0" } }, @@ -598,14 +598,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.9.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.9.1.tgz", - "integrity": "sha512-PLYO0AmwD6s6n0ZQB5kqPgfvh73p0+VqopQQLuNfi7Lm0EpfKyDalchpVwkE+81k5HeiRrTV/9w1aNHzjD7C4g==", + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.10.0.tgz", + "integrity": "sha512-pJB2CCeHWtwOAeIxv8CHVGJhI5FNyJAIpx5Pt72YkK3QfEzt6qAlXZuyaBmyfOdM62qU0rbxJzNToPTVeJGrQw==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.9.1", - "@typescript-eslint/types": "5.9.1", - "@typescript-eslint/typescript-estree": "5.9.1", + "@typescript-eslint/scope-manager": "5.10.0", + "@typescript-eslint/types": "5.10.0", + "@typescript-eslint/typescript-estree": "5.10.0", "debug": "^4.3.2" }, "engines": { @@ -624,80 +624,6 @@ } } }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": { - "version": "5.9.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.9.1.tgz", - "integrity": "sha512-8BwvWkho3B/UOtzRyW07ffJXPaLSUKFBjpq8aqsRvu6HdEuzCY57+ffT7QoV4QXJXWSU1+7g3wE4AlgImmQ9pQ==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.9.1", - "@typescript-eslint/visitor-keys": "5.9.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": { - "version": "5.9.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.9.1.tgz", - "integrity": "sha512-SsWegWudWpkZCwwYcKoDwuAjoZXnM1y2EbEerTHho19Hmm+bQ56QG4L4jrtCu0bI5STaRTvRTZmjprWlTw/5NQ==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.9.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.9.1.tgz", - "integrity": "sha512-gL1sP6A/KG0HwrahVXI9fZyeVTxEYV//6PmcOn1tD0rw8VhUWYeZeuWHwwhnewnvEMcHjhnJLOBhA9rK4vmb8A==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.9.1", - "@typescript-eslint/visitor-keys": "5.9.1", - "debug": "^4.3.2", - "globby": "^11.0.4", - "is-glob": "^4.0.3", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.9.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.9.1.tgz", - "integrity": "sha512-Xh37pNz9e9ryW4TVdwiFzmr4hloty8cFj8GTWMXh3Z8swGwyQWeCcNgF0hm6t09iZd6eiZmIf4zHedQVP6TVtg==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.9.1", - "eslint-visitor-keys": "^3.0.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, "node_modules/@typescript-eslint/scope-manager": { "version": "5.10.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.10.0.tgz", @@ -2732,58 +2658,15 @@ } }, "@typescript-eslint/parser": { - "version": "5.9.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.9.1.tgz", - "integrity": "sha512-PLYO0AmwD6s6n0ZQB5kqPgfvh73p0+VqopQQLuNfi7Lm0EpfKyDalchpVwkE+81k5HeiRrTV/9w1aNHzjD7C4g==", + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.10.0.tgz", + "integrity": "sha512-pJB2CCeHWtwOAeIxv8CHVGJhI5FNyJAIpx5Pt72YkK3QfEzt6qAlXZuyaBmyfOdM62qU0rbxJzNToPTVeJGrQw==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.9.1", - "@typescript-eslint/types": "5.9.1", - "@typescript-eslint/typescript-estree": "5.9.1", + "@typescript-eslint/scope-manager": "5.10.0", + "@typescript-eslint/types": "5.10.0", + "@typescript-eslint/typescript-estree": "5.10.0", "debug": "^4.3.2" - }, - "dependencies": { - "@typescript-eslint/scope-manager": { - "version": "5.9.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.9.1.tgz", - "integrity": "sha512-8BwvWkho3B/UOtzRyW07ffJXPaLSUKFBjpq8aqsRvu6HdEuzCY57+ffT7QoV4QXJXWSU1+7g3wE4AlgImmQ9pQ==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.9.1", - "@typescript-eslint/visitor-keys": "5.9.1" - } - }, - "@typescript-eslint/types": { - "version": "5.9.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.9.1.tgz", - "integrity": "sha512-SsWegWudWpkZCwwYcKoDwuAjoZXnM1y2EbEerTHho19Hmm+bQ56QG4L4jrtCu0bI5STaRTvRTZmjprWlTw/5NQ==", - "dev": true - }, - "@typescript-eslint/typescript-estree": { - "version": "5.9.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.9.1.tgz", - "integrity": "sha512-gL1sP6A/KG0HwrahVXI9fZyeVTxEYV//6PmcOn1tD0rw8VhUWYeZeuWHwwhnewnvEMcHjhnJLOBhA9rK4vmb8A==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.9.1", - "@typescript-eslint/visitor-keys": "5.9.1", - "debug": "^4.3.2", - "globby": "^11.0.4", - "is-glob": "^4.0.3", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/visitor-keys": { - "version": "5.9.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.9.1.tgz", - "integrity": "sha512-Xh37pNz9e9ryW4TVdwiFzmr4hloty8cFj8GTWMXh3Z8swGwyQWeCcNgF0hm6t09iZd6eiZmIf4zHedQVP6TVtg==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.9.1", - "eslint-visitor-keys": "^3.0.0" - } - } } }, "@typescript-eslint/scope-manager": { diff --git a/package.json b/package.json index c9626f4..1183fe0 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "@types/node": "^17.0.10", "@types/yargs": "^17.0.8", "@typescript-eslint/eslint-plugin": "^5.10.0", - "@typescript-eslint/parser": "^5.9.1", + "@typescript-eslint/parser": "^5.10.0", "eslint": "^8.1.0" }, "dependencies": { From 5f87a3503cf35f3127694e1d4a864eb3994866bc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 22 Jan 2022 16:53:54 +0530 Subject: [PATCH 109/155] build(deps-dev): bump eslint from 8.1.0 to 8.7.0 (#53) Bumps [eslint](https://github.com/eslint/eslint) from 8.1.0 to 8.7.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v8.1.0...v8.7.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 352 ++++++++++++++-------------------------------- package.json | 2 +- 2 files changed, 103 insertions(+), 251 deletions(-) diff --git a/package-lock.json b/package-lock.json index ca5c6ae..d31a0f8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,22 +30,22 @@ "@types/yargs": "^17.0.8", "@typescript-eslint/eslint-plugin": "^5.10.0", "@typescript-eslint/parser": "^5.10.0", - "eslint": "^8.1.0" + "eslint": "^8.7.0" } }, "node_modules/@eslint/eslintrc": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.3.tgz", - "integrity": "sha512-DHI1wDPoKCBPoLZA3qDR91+3te/wDSc1YhKg3jR8NxKKRJq2hwHwcWv31cSwSYvIBrmbENoYMWcenW8uproQqg==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.5.tgz", + "integrity": "sha512-BLxsnmK3KyPunz5wmCCpqy0YelEoxxGmH73Is+Z74oOTMtExcjkr3dDR6quwrjh1YspA8DH9gnX1o069KiS9AQ==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.0.0", + "espree": "^9.2.0", "globals": "^13.9.0", "ignore": "^4.0.6", "import-fresh": "^3.2.1", - "js-yaml": "^3.13.1", + "js-yaml": "^4.1.0", "minimatch": "^3.0.4", "strip-json-comments": "^3.1.1" }, @@ -53,26 +53,13 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/@eslint/eslintrc/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/@eslint/eslintrc/node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "node_modules/@eslint/eslintrc/node_modules/ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "dev": true, - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "engines": { + "node": ">= 4" } }, "node_modules/@gi-types/atk1": { @@ -458,12 +445,12 @@ } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.6.0.tgz", - "integrity": "sha512-JQlEKbcgEUjBFhLIF4iqM7u/9lwgHRBcpHrmUNCALK0Q3amXN6lxdoXLnF0sm11E9VqTmBALR87IlUg1bZ8A9A==", + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.2.tgz", + "integrity": "sha512-UXOuFCGcwciWckOpmfKDq/GyhlTf9pN/BzG//x8p8zTOFEcGuA68ANXheFS0AGvy3qgZqLBUkMs7hqzqCKOVwA==", "dev": true, "dependencies": { - "@humanwhocodes/object-schema": "^1.2.0", + "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", "minimatch": "^3.0.4" }, @@ -472,9 +459,9 @@ } }, "node_modules/@humanwhocodes/object-schema": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.0.tgz", - "integrity": "sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true }, "node_modules/@nodelib/fs.scandir": { @@ -588,15 +575,6 @@ } } }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { - "version": "5.1.8", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", - "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, "node_modules/@typescript-eslint/parser": { "version": "5.10.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.10.0.tgz", @@ -749,9 +727,9 @@ } }, "node_modules/acorn": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.5.0.tgz", - "integrity": "sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q==", + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", + "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -785,15 +763,6 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -979,18 +948,6 @@ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, - "node_modules/enquirer": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", - "dev": true, - "dependencies": { - "ansi-colors": "^4.1.1" - }, - "engines": { - "node": ">=8.6" - } - }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -1012,24 +969,23 @@ } }, "node_modules/eslint": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.1.0.tgz", - "integrity": "sha512-JZvNneArGSUsluHWJ8g8MMs3CfIEzwaLx9KyH4tZ2i+R2/rPWzL8c0zg3rHdwYVpN/1sB9gqnjHwz9HoeJpGHw==", + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.7.0.tgz", + "integrity": "sha512-ifHYzkBGrzS2iDU7KjhCAVMGCvF6M3Xfs8X8b37cgrUlDt6bWRTpRh6T/gtSXv1HJ/BUGgmjvNvOEGu85Iif7w==", "dev": true, "dependencies": { - "@eslint/eslintrc": "^1.0.3", - "@humanwhocodes/config-array": "^0.6.0", + "@eslint/eslintrc": "^1.0.5", + "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.3.2", "doctrine": "^3.0.0", - "enquirer": "^2.3.5", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^6.0.0", + "eslint-scope": "^7.1.0", "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.0.0", - "espree": "^9.0.0", + "eslint-visitor-keys": "^3.2.0", + "espree": "^9.3.0", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -1037,7 +993,7 @@ "functional-red-black-tree": "^1.0.1", "glob-parent": "^6.0.1", "globals": "^13.6.0", - "ignore": "^4.0.6", + "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", @@ -1048,10 +1004,8 @@ "minimatch": "^3.0.4", "natural-compare": "^1.4.0", "optionator": "^0.9.1", - "progress": "^2.0.0", "regexpp": "^3.2.0", - "semver": "^7.2.1", - "strip-ansi": "^6.0.0", + "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" @@ -1107,18 +1061,18 @@ } }, "node_modules/eslint-visitor-keys": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.0.0.tgz", - "integrity": "sha512-mJOZa35trBTb3IyRmo8xmKBZlxf+N7OnUl4+ZhJHs/r+0770Wh/LEACE2pqMGMe27G/4y8P2bYGk4J70IC5k1Q==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz", + "integrity": "sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/eslint/node_modules/eslint-scope": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-6.0.0.tgz", - "integrity": "sha512-uRDL9MWmQCkaFus8RF5K9/L/2fn+80yoW3jkD53l4shjCh26fCtvJGasxjUqP5OT87SYTxCVA3BwTUzuELx9kA==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.0.tgz", + "integrity": "sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg==", "dev": true, "dependencies": { "esrecurse": "^4.3.0", @@ -1129,41 +1083,28 @@ } }, "node_modules/eslint/node_modules/estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, "engines": { "node": ">=4.0" } }, "node_modules/espree": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.0.0.tgz", - "integrity": "sha512-r5EQJcYZ2oaGbeR0jR0fFVijGOcwai07/690YRXLINuhmVeRY4UKSAsQPe/0BNuDgwP7Ophoc1PRsr2E3tkbdQ==", + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.0.tgz", + "integrity": "sha512-d/5nCsb0JcqsSEeQzFZ8DH1RmxPcglRWh24EFTlUEmCKoehXGdpsx0RkHDubqUI8LSAIKMQp4r9SzQ3n+sm4HQ==", "dev": true, "dependencies": { - "acorn": "^8.5.0", + "acorn": "^8.7.0", "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^3.0.0" + "eslint-visitor-keys": "^3.1.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/esquery": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", @@ -1378,9 +1319,9 @@ } }, "node_modules/globals": { - "version": "13.11.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.11.0.tgz", - "integrity": "sha512-08/xrJ7wQjK9kkkRoI3OFUBbLx4f+6x3SGwcPvQ0QH6goFDrOU2oyAWrmh3dJezu65buo+HBMzAMQy6rovVC3g==", + "version": "13.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.0.tgz", + "integrity": "sha512-uS8X6lSKN2JumVoXrbUz+uG4BYG+eiawqm3qFcT7ammfbUHeCBoJMlHcec/S3krSk73/AE/f0szYFmgAA3kYZg==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -1412,15 +1353,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/globby/node_modules/ignore": { - "version": "5.1.8", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", - "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -1431,9 +1363,9 @@ } }, "node_modules/ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", "dev": true, "engines": { "node": ">= 4" @@ -1723,15 +1655,6 @@ "node": ">= 0.6.0" } }, - "node_modules/progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", @@ -1883,12 +1806,6 @@ "node": ">=8" } }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -2127,40 +2044,27 @@ }, "dependencies": { "@eslint/eslintrc": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.3.tgz", - "integrity": "sha512-DHI1wDPoKCBPoLZA3qDR91+3te/wDSc1YhKg3jR8NxKKRJq2hwHwcWv31cSwSYvIBrmbENoYMWcenW8uproQqg==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.5.tgz", + "integrity": "sha512-BLxsnmK3KyPunz5wmCCpqy0YelEoxxGmH73Is+Z74oOTMtExcjkr3dDR6quwrjh1YspA8DH9gnX1o069KiS9AQ==", "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.0.0", + "espree": "^9.2.0", "globals": "^13.9.0", "ignore": "^4.0.6", "import-fresh": "^3.2.1", - "js-yaml": "^3.13.1", + "js-yaml": "^4.1.0", "minimatch": "^3.0.4", "strip-json-comments": "^3.1.1" }, "dependencies": { - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true } } }, @@ -2547,20 +2451,20 @@ } }, "@humanwhocodes/config-array": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.6.0.tgz", - "integrity": "sha512-JQlEKbcgEUjBFhLIF4iqM7u/9lwgHRBcpHrmUNCALK0Q3amXN6lxdoXLnF0sm11E9VqTmBALR87IlUg1bZ8A9A==", + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.2.tgz", + "integrity": "sha512-UXOuFCGcwciWckOpmfKDq/GyhlTf9pN/BzG//x8p8zTOFEcGuA68ANXheFS0AGvy3qgZqLBUkMs7hqzqCKOVwA==", "dev": true, "requires": { - "@humanwhocodes/object-schema": "^1.2.0", + "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", "minimatch": "^3.0.4" } }, "@humanwhocodes/object-schema": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.0.tgz", - "integrity": "sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true }, "@nodelib/fs.scandir": { @@ -2647,14 +2551,6 @@ "regexpp": "^3.2.0", "semver": "^7.3.5", "tsutils": "^3.21.0" - }, - "dependencies": { - "ignore": { - "version": "5.1.8", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", - "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", - "dev": true - } } }, "@typescript-eslint/parser": { @@ -2736,9 +2632,9 @@ } }, "acorn": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.5.0.tgz", - "integrity": "sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q==", + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", + "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", "dev": true }, "acorn-jsx": { @@ -2760,12 +2656,6 @@ "uri-js": "^4.2.2" } }, - "ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true - }, "ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -2907,15 +2797,6 @@ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, - "enquirer": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", - "dev": true, - "requires": { - "ansi-colors": "^4.1.1" - } - }, "escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -2928,24 +2809,23 @@ "dev": true }, "eslint": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.1.0.tgz", - "integrity": "sha512-JZvNneArGSUsluHWJ8g8MMs3CfIEzwaLx9KyH4tZ2i+R2/rPWzL8c0zg3rHdwYVpN/1sB9gqnjHwz9HoeJpGHw==", + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.7.0.tgz", + "integrity": "sha512-ifHYzkBGrzS2iDU7KjhCAVMGCvF6M3Xfs8X8b37cgrUlDt6bWRTpRh6T/gtSXv1HJ/BUGgmjvNvOEGu85Iif7w==", "dev": true, "requires": { - "@eslint/eslintrc": "^1.0.3", - "@humanwhocodes/config-array": "^0.6.0", + "@eslint/eslintrc": "^1.0.5", + "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.3.2", "doctrine": "^3.0.0", - "enquirer": "^2.3.5", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^6.0.0", + "eslint-scope": "^7.1.0", "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.0.0", - "espree": "^9.0.0", + "eslint-visitor-keys": "^3.2.0", + "espree": "^9.3.0", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -2953,7 +2833,7 @@ "functional-red-black-tree": "^1.0.1", "glob-parent": "^6.0.1", "globals": "^13.6.0", - "ignore": "^4.0.6", + "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", @@ -2964,19 +2844,17 @@ "minimatch": "^3.0.4", "natural-compare": "^1.4.0", "optionator": "^0.9.1", - "progress": "^2.0.0", "regexpp": "^3.2.0", - "semver": "^7.2.1", - "strip-ansi": "^6.0.0", + "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" }, "dependencies": { "eslint-scope": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-6.0.0.tgz", - "integrity": "sha512-uRDL9MWmQCkaFus8RF5K9/L/2fn+80yoW3jkD53l4shjCh26fCtvJGasxjUqP5OT87SYTxCVA3BwTUzuELx9kA==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.0.tgz", + "integrity": "sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg==", "dev": true, "requires": { "esrecurse": "^4.3.0", @@ -2984,9 +2862,9 @@ } }, "estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true } } @@ -3019,28 +2897,22 @@ } }, "eslint-visitor-keys": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.0.0.tgz", - "integrity": "sha512-mJOZa35trBTb3IyRmo8xmKBZlxf+N7OnUl4+ZhJHs/r+0770Wh/LEACE2pqMGMe27G/4y8P2bYGk4J70IC5k1Q==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz", + "integrity": "sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ==", "dev": true }, "espree": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.0.0.tgz", - "integrity": "sha512-r5EQJcYZ2oaGbeR0jR0fFVijGOcwai07/690YRXLINuhmVeRY4UKSAsQPe/0BNuDgwP7Ophoc1PRsr2E3tkbdQ==", + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.0.tgz", + "integrity": "sha512-d/5nCsb0JcqsSEeQzFZ8DH1RmxPcglRWh24EFTlUEmCKoehXGdpsx0RkHDubqUI8LSAIKMQp4r9SzQ3n+sm4HQ==", "dev": true, "requires": { - "acorn": "^8.5.0", + "acorn": "^8.7.0", "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^3.0.0" + "eslint-visitor-keys": "^3.1.0" } }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, "esquery": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", @@ -3216,9 +3088,9 @@ } }, "globals": { - "version": "13.11.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.11.0.tgz", - "integrity": "sha512-08/xrJ7wQjK9kkkRoI3OFUBbLx4f+6x3SGwcPvQ0QH6goFDrOU2oyAWrmh3dJezu65buo+HBMzAMQy6rovVC3g==", + "version": "13.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.0.tgz", + "integrity": "sha512-uS8X6lSKN2JumVoXrbUz+uG4BYG+eiawqm3qFcT7ammfbUHeCBoJMlHcec/S3krSk73/AE/f0szYFmgAA3kYZg==", "dev": true, "requires": { "type-fest": "^0.20.2" @@ -3236,14 +3108,6 @@ "ignore": "^5.1.4", "merge2": "^1.3.0", "slash": "^3.0.0" - }, - "dependencies": { - "ignore": { - "version": "5.1.8", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", - "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", - "dev": true - } } }, "has-flag": { @@ -3253,9 +3117,9 @@ "dev": true }, "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", "dev": true }, "import-fresh": { @@ -3476,12 +3340,6 @@ "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" }, - "progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true - }, "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", @@ -3565,12 +3423,6 @@ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, "string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", diff --git a/package.json b/package.json index 1183fe0..9b7a509 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "@types/yargs": "^17.0.8", "@typescript-eslint/eslint-plugin": "^5.10.0", "@typescript-eslint/parser": "^5.10.0", - "eslint": "^8.1.0" + "eslint": "^8.7.0" }, "dependencies": { "fs": "0.0.1-security", From 8cb5fe99a2b089b449f3fd43c683214c389e4bdc Mon Sep 17 00:00:00 2001 From: Harshad <30668911+harshadgavali@users.noreply.github.com> Date: Sun, 23 Jan 2022 03:50:33 +0530 Subject: [PATCH 110/155] Create codeql-analysis.yml --- .github/workflows/codeql-analysis.yml | 70 +++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 .github/workflows/codeql-analysis.yml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 0000000..1e07610 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,70 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: [ main ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ main ] + schedule: + - cron: '22 8 * * 1' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'javascript' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] + # Learn more about CodeQL language support at https://git.io/codeql-language-support + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v1 + + # ℹ️ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl + + # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 From 429f5ca5475e43fc58b9c992a2118755f6f89bd1 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Wed, 16 Mar 2022 15:28:35 +0530 Subject: [PATCH 111/155] Add support for GNOME 42 --- Makefile | 2 +- extension/common/prefs.ts | 8 - ...extensions.gestureImprovements.gschema.xml | 4 +- extension/src/altTab.ts | 3 + extension/src/gestures.ts | 38 +- extension/styleclass.css | 1 - extension/stylesheet.css | 5 + extension/ui/prefs.ui | 1104 ++++++++--------- gnome-shell/index.d.ts | 11 +- metadata.json | 7 +- tests/prefs.ts | 3 +- 11 files changed, 571 insertions(+), 615 deletions(-) delete mode 100644 extension/styleclass.css create mode 100644 extension/stylesheet.css diff --git a/Makefile b/Makefile index fcbebb4..198903b 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ endif pack: cp metadata.json $(EXTENSIONDIR) - cp -r extension/styleclass.css extension/ui extension/schemas $(EXTENSIONDIR) + cp -r extension/stylesheet.css extension/ui extension/schemas $(EXTENSIONDIR) glib-compile-schemas ${EXTENSIONDIR}/schemas rm -f ${ZIPPATH} cd ${EXTENSIONDIR} && zip -r ${ZIPPATH} . diff --git a/extension/common/prefs.ts b/extension/common/prefs.ts index 8863589..8af54fb 100644 --- a/extension/common/prefs.ts +++ b/extension/common/prefs.ts @@ -104,14 +104,6 @@ export function getPrefsWidget(settings: Gio.Settin bind_combo_box('pinch-4-finger-gesture', settings, builder); const main_prefs = builder.get_object('main_prefs'); - const header_bar = builder.get_object('header_bar'); - - main_prefs.connect('realize', () => { - const window = main_prefs.get_root(); - - if (window && window instanceof Gtk.Window) - window.set_titlebar(header_bar); - }); return main_prefs; } \ No newline at end of file diff --git a/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml b/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml index 623f79e..cf982df 100644 --- a/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml +++ b/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml @@ -40,11 +40,11 @@ Enable Window manipulation gesture - 'SHOW_DESKTOP' + 'NONE' Gesture for 3 finger pinch - 'NONE' + 'SHOW_DESKTOP' Gesture for 4 finger pinch diff --git a/extension/src/altTab.ts b/extension/src/altTab.ts index 90ba646..9d6e63e 100644 --- a/extension/src/altTab.ts +++ b/extension/src/altTab.ts @@ -105,6 +105,7 @@ export class AltTabGestureExtension implements ISubExtension { this._progress = 0; if (this._extState === AltTabExtState.DEFAULT) { this._switcher = new WindowSwitcherPopup(); + this._switcher._switcherList.add_style_class_name('gie-alttab-quick-transition'); this._switcher.connect('destroy', () => { this._switcher = undefined; this._reset(); @@ -120,6 +121,8 @@ export class AltTabGestureExtension implements ISubExtension { const nelement = this._switcher._items.length; if (nelement > 0) { this._switcher.show(false, 'switch-windows', 0); + this._switcher._popModal(); + if (this._switcher._initialDelayTimeoutId !== 0) { GLib.source_remove(this._switcher._initialDelayTimeoutId); this._switcher._initialDelayTimeoutId = 0; diff --git a/extension/src/gestures.ts b/extension/src/gestures.ts index bc1f6f2..8000290 100644 --- a/extension/src/gestures.ts +++ b/extension/src/gestures.ts @@ -13,6 +13,7 @@ declare interface ShallowSwipeTrackerT { } declare type SwipeTrackerT = imports.ui.swipeTracker.SwipeTracker; +declare type TouchPadSwipeTrackerT = Required['_touchpadGesture']; declare interface ShellSwipeTracker { swipeTracker: SwipeTrackerT, nfingers: number[], @@ -23,6 +24,20 @@ declare interface ShellSwipeTracker { checkAllowedGesture?: (event: CustomEventType) => boolean } +function connectTouchpadEventToTracker(tracker: TouchPadSwipeTrackerT) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (global.stage as any).connectObject( + 'captured-event::touchpad', + tracker._handleEvent.bind(tracker), + tracker, + ); +} + +function disconnectTouchpadEventFromTracker(tracker: TouchPadSwipeTrackerT) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (global.stage as any).disconnectObject(tracker); +} + abstract class SwipeTrackerEndPointsModifer { protected _firstVal = 0; protected _lastVal = 0; @@ -80,8 +95,7 @@ class WorkspaceAnimationModifier extends SwipeTrackerEndPointsModifer { apply(): void { if (this._workspaceAnimation._swipeTracker._touchpadGesture) { - global.stage.disconnect(this._workspaceAnimation._swipeTracker._touchpadGesture._stageCaptureEvent); - this._workspaceAnimation._swipeTracker._touchpadGesture._stageCaptureEvent = 0; + disconnectTouchpadEventFromTracker(this._workspaceAnimation._swipeTracker._touchpadGesture); } super.apply(); } @@ -112,12 +126,7 @@ class WorkspaceAnimationModifier extends SwipeTrackerEndPointsModifer { this._swipeTracker.destroy(); const swipeTracker = this._workspaceAnimation._swipeTracker; if (swipeTracker._touchpadGesture) { - swipeTracker._touchpadGesture._stageCaptureEvent = global.stage.connect( - 'captured-event::touchpad', - swipeTracker._touchpadGesture._handleEvent.bind( - swipeTracker._touchpadGesture, - ), - ); + connectTouchpadEventToTracker(swipeTracker._touchpadGesture); } super.destroy(); @@ -201,11 +210,7 @@ export class GestureExtension implements ISubExtension { swipeTracker._touchpadGesture = swipeTracker.__oldTouchpadGesture; swipeTracker.__oldTouchpadGesture = undefined; if (swipeTracker._touchpadGesture && disableOldGesture) { - swipeTracker._touchpadGesture._stageCaptureEvent = - global.stage.connect( - 'captured-event::touchpad', - swipeTracker._touchpadGesture._handleEvent.bind(swipeTracker._touchpadGesture), - ); + connectTouchpadEventToTracker(swipeTracker._touchpadGesture); } }); @@ -217,11 +222,8 @@ export class GestureExtension implements ISubExtension { touchpadSwipeGesture: typeof TouchpadSwipeGesture.prototype | __shell_private_types.TouchpadGesture, disablePrevious: boolean, ): void { - if (swipeTracker._touchpadGesture) { - if (disablePrevious && swipeTracker._touchpadGesture._stageCaptureEvent) { - global.stage.disconnect(swipeTracker._touchpadGesture._stageCaptureEvent); - swipeTracker._touchpadGesture._stageCaptureEvent = 0; - } + if (swipeTracker._touchpadGesture && disablePrevious) { + disconnectTouchpadEventFromTracker(swipeTracker._touchpadGesture); swipeTracker.__oldTouchpadGesture = swipeTracker._touchpadGesture; } diff --git a/extension/styleclass.css b/extension/styleclass.css deleted file mode 100644 index 0bb99ed..0000000 --- a/extension/styleclass.css +++ /dev/null @@ -1 +0,0 @@ -.no-panel-corner #panel .panel-corner { -panel-corner-radius: 0px; } \ No newline at end of file diff --git a/extension/stylesheet.css b/extension/stylesheet.css new file mode 100644 index 0000000..423d7d9 --- /dev/null +++ b/extension/stylesheet.css @@ -0,0 +1,5 @@ +.gie-alttab-quick-transition .switcher-popup, +.gie-alttab-quick-transition .switcher-list, +.gie-alttab-quick-transition .item-box { + transition-duration: 0ms; +} \ No newline at end of file diff --git a/extension/ui/prefs.ui b/extension/ui/prefs.ui index 4bd5dd5..8ff05aa 100644 --- a/extension/ui/prefs.ui +++ b/extension/ui/prefs.ui @@ -19,675 +19,627 @@ - - - + + + vertical + 600 + 700 + 36 + 36 + 36 + 36 + vertical + + - - true - start - center - dialog-information-symbolic - - + + 12 + + start - - - -Some gestures are related to others -- Vertical gestures : Overview nagivation and window manipulation -- Horizontal gestures : Workspace switching and window switching - -If you enable 4-finger gesture for overview navigation or workspace switching, -other gesture, if enabled, will be activated using 3-finger gesture. - -If you disable 4-finger gesture for overview navigation or workspace switching, -these gesture will be activated using 3-finger gesture and -other gesture, if enabled, will be activated using 4-finger gesture. - - - + center + Swipe Gestures + + + - + - - - - vertical - - 700 - 600 - 1 - never + + 36 - - - - 36 - 36 - 36 - 36 - vertical - - - + + none + + + + + + + 12 + 12 + 12 + 12 + 32 + + + + vertical + start + + + + start + start + 1 + 0 + 4-finger gestures for overview navigation + + + + + + start + end + True + 0 + 6 + For navigating between desktop, activities and appgrid + + + + + + + + + + end + True + center + + + + + + + + + + + + + 12 + 12 + 12 12 + 32 + start center - Swipe Gestures - - - + 1 + 0 + 4-finger gestures for workspace switching + + + + + + end + True + center + - + + + - - - 36 - - - none + + + + + + 12 + 12 + 12 + 12 + 32 - - - - - - 12 - 12 - 12 - 12 - 32 - - - - vertical - start - - - - start - start - 1 - 0 - 4-finger gestures for overview navigation - - - - - - start - end - True - 0 - 6 - For navigating between desktop, activities and appgrid - - - - - - - - - - end - True - center - - + + + start + center + 1 + 0 + Window switching + + - - - - + + + end + True + center + + - - - - - - 12 - 12 - 12 - 12 - 32 - - - - start - center - 1 - 0 - 4-finger gestures for workspace switching - - - - - - end - True - center - - + + + + - - + + + + + + 12 + 12 + 12 + 12 + 32 + + + + vertical + start + + + + start + start + 1 + 0 + Window manipulation - - - - - 12 - 12 - 12 - 12 - 32 - - - - start - center - 1 - 0 - Window switching - - - - - - end - True - center - - - - - + + start + end + True + 0 + 6 + Tile, unmaximize, maximize or fullscreen a window + - - - - - - 12 - 12 - 12 - 12 - 32 - - - - vertical - start - - - - start - start - 1 - 0 - Window manipulation - - - - - - start - end - True - 0 - 6 - Tile, unmaximize, maximize or fullscreen a window - - - - - - - - - - end - True - center - - + + - - + + + end + True + center + + + + + + + + + + + + + + 12 + 12 + 12 + 12 + 32 + + + + vertical + start + + + + start + start + 1 + 0 + Minimize window - - - - - 12 - 12 - 12 - 12 - 32 - - - - vertical - start - - - - start - start - 1 - 0 - Minimize window - - - - - - start - end - True - 0 - 6 - This will disable tiling gesture - - - - - - - - - - end - True - center - - - - - + + start + end + True + 0 + 6 + This will disable tiling gesture + - + + + + + end + True + center + + + + + + + + + + + + + + + + + 12 + + + start + center + Pinch Gestures + + + + + + + + + + + 36 + + + none + + + + + + + 12 + 12 + 12 + 12 + 32 + + + + start + center + 1 + 0 + 3 finger pinch + + + + + + + None + Show Desktop + + + + - + + + - - + + + + + 12 + 12 + 12 12 + 32 + start center - Pinch Gestures - - - + 1 + 0 + 4 finger pinch + + + + + None + Show Desktop + + + + - + + + - - - 36 - - - none + + + + + + + + + 12 + vertical + + + start + center + Customization + + + + + + + + + + + 36 + + + none + + + + + + + 12 + 12 + 12 + 12 + 32 + + + + start + center + 1 + 0 + Touchpad swipe speed + + + + + + horizontal + end + 1 - - - - - 12 - 12 - 12 - 12 - 32 - - - - start - center - 1 - 0 - 3 finger pinch - - - - - - - None - Show Desktop - - - + + 300 + start + end + False + touchpad_scale_adjustment + + + + + + + - - + + + center + end + 5 + False + False + 1.00 - + + + + + + + + + + + + + 12 + 12 + 12 + 12 + 32 + + + + vertical + start + - - - - 12 - 12 - 12 - 12 - 32 - - - - start - center - 1 - 0 - 4 finger pinch - - - - - - - None - Show Desktop - - - + + start + start + 1 + 0 + Follow natural swipe + + - - + + + start + end + True + 0 + 6 + Similar to natural scrolling. Swipe moves the content, not the view + - + + + + + end + True + center + + + - + + + - - + + + + + 12 + 12 + 12 12 - vertical + 32 + start center - Customization - - - + 1 + 0 + Window switcher popup delay (ms) - - - - - 36 - - - none + + + end + alttab_delay_adjustment + + + - - - - - - 12 - 12 - 12 - 12 - 32 - - - - start - center - 1 - 0 - Touchpad swipe speed - - - - - - horizontal - end - 1 - - - - 300 - start - end - False - touchpad_scale_adjustment - - - - - - - - - - - center - end - 5 - False - False - 1.00 - - - - - - - - - + + + + - - - - - - 12 - 12 - 12 - 12 - 32 - - - - vertical - start - - - - start - start - 1 - 0 - Follow natural swipe - - - - - - start - end - True - 0 - 6 - Similar to natural scrolling. Swipe moves the content, not the view - - - - - - - - - - end - True - center - - + + + + + + 12 + 12 + 12 + 12 + 32 - - - - + + + start + center + 1 + 0 + Touchpad pinch speed + + - - - - - - 12 - 12 - 12 - 12 - 32 - - - - start - center - 1 - 0 - Window switcher popup delay (ms) - - - - - - end - alttab_delay_adjustment - - - + + + horizontal + end + 1 + + + 300 + start + end + False + + + 0.00 + -3.3219280948873626 + 3.3219280948873626 + 0.01 + + + + + - - - - - 12 - 12 - 12 - 12 - 32 - - - - start - center - 1 - 0 - Touchpad pinch speed - - - - - - horizontal - end - 1 - - - - 300 - start - end - False - - - 0.00 - -3.3219280948873626 - 3.3219280948873626 - 0.01 - - - - - - - - - - - - - center - end - 5 - False - False - 1.00 - - - - - - - + + center + end + 5 + False + False + 1.00 - + - - + - + + + \ No newline at end of file diff --git a/gnome-shell/index.d.ts b/gnome-shell/index.d.ts index 0a0d2b3..ec490fd 100644 --- a/gnome-shell/index.d.ts +++ b/gnome-shell/index.d.ts @@ -19,7 +19,6 @@ declare interface ExtensionUtilsMeta { declare namespace __shell_private_types { declare class TouchpadGesture extends GObject.Object { - _stageCaptureEvent: number; destroy(): void; _handleEvent(actor: Clutter.Actor | undefined, event: CustomEventType): boolean; } @@ -78,7 +77,7 @@ declare namespace imports { }; const layoutManager: GObject.Object & { - uiGroup: Clutter.Actor, + uiGroup: St.Widget, panelBox: St.BoxLayout, monitors: __shell_private_types.IMonitorState[], primaryMonitor: __shell_private_types.IMonitorState, @@ -214,16 +213,18 @@ declare namespace imports { window: Meta.Window }[]; - _select(n: number): void; - _switcherList: { + _switcherList: St.Widget & { _scrollView: { hscroll: { adjustment: St.Adjustment } } }; - + + _select(n: number): void; _resetNoModsTimeout(): void; + _popModal(): void; + _noModsTimeoutId: number; _initialDelayTimeoutId: number; _selectedIndex: number; diff --git a/metadata.json b/metadata.json index 481c9fc..2311dfc 100644 --- a/metadata.json +++ b/metadata.json @@ -3,10 +3,11 @@ "name": "Gesture Improvements", "shell-version": [ "40", - "41" + "41", + "42" ], "settings-schema": "org.gnome.shell.extensions.gestureImprovements", "url": "https://github.com/harshadgavali/gnome-gesture-improvements", "uuid": "gestureImprovements@gestures", - "version": 19 -} \ No newline at end of file + "version": 20 +} diff --git a/tests/prefs.ts b/tests/prefs.ts index a5c8045..fb494f4 100644 --- a/tests/prefs.ts +++ b/tests/prefs.ts @@ -7,7 +7,6 @@ import Gio from '@gi-types/gio2'; import GLib from '@gi-types/glib2'; import { registerClass } from '@gi-types/gobject2'; import Gtk from '@gi-types/gtk4'; -import { getPrefsWidget } from './common/prefs'; /** Add parent directory of file in searchPath to be able to import files */ function InsertIntoImportsPath() { @@ -19,6 +18,8 @@ function InsertIntoImportsPath() { } InsertIntoImportsPath(); +import { getPrefsWidget } from './common/prefs'; + /** Read metadata of extension file */ function GetExtensionObj(): ExtensionMeta { const [_, buffer] = Gio.file_new_for_path('./metadata.json').load_contents(null); From a3c4212a957e2b450ce98bf2cc305c511f426984 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 8 Apr 2022 02:43:17 +0530 Subject: [PATCH 112/155] metadata: remove older shell versions from --- metadata.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/metadata.json b/metadata.json index 2311dfc..3c2152a 100644 --- a/metadata.json +++ b/metadata.json @@ -2,8 +2,6 @@ "description": "Improve touchpad gestures for Wayland/X11", "name": "Gesture Improvements", "shell-version": [ - "40", - "41", "42" ], "settings-schema": "org.gnome.shell.extensions.gestureImprovements", From 12d3f06c6c25b440842d9d54a89bab63604d759d Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Tue, 23 Nov 2021 23:06:51 +0530 Subject: [PATCH 113/155] showDesktop: Area weighted centroid calculation --- extension/src/pinchGestures/showDesktop.ts | 2 ++ extension/src/utils/pointsArithmetic.ts | 13 +++++++++---- extension/ui/prefs.ui | 4 +--- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/extension/src/pinchGestures/showDesktop.ts b/extension/src/pinchGestures/showDesktop.ts index a02f069..e25d99f 100644 --- a/extension/src/pinchGestures/showDesktop.ts +++ b/extension/src/pinchGestures/showDesktop.ts @@ -91,6 +91,8 @@ class MonitorGroup { return { x: actorClone.clone.x + actorClone.clone.width / 2, y: actorClone.clone.y + actorClone.clone.height / 2, + weight: actorClone.clone.width * actorClone.clone.height, + // weight: 1, }; }), ); diff --git a/extension/src/utils/pointsArithmetic.ts b/extension/src/utils/pointsArithmetic.ts index 1b1c883..feb12a5 100644 --- a/extension/src/utils/pointsArithmetic.ts +++ b/extension/src/utils/pointsArithmetic.ts @@ -3,6 +3,10 @@ export interface Point { y: number, } +export interface WeightedPoint extends Point { + weight: number, +} + interface TransformationMatrix { 0: [number, number], 1: [number, number], @@ -25,13 +29,14 @@ function transform_point(matrix: TransformationMatrix, p: Point): Point { * @param windows * @returns centroid of points or undefined if array is empty */ -export function findCentroid(points: Point[]): Point | undefined { - if (points.length === 0) +export function findCentroid(points: WeightedPoint[]): Point | undefined { + const weightSum = points.reduce((res, p) => res + p.weight, 0); + if (weightSum === 0) return undefined; return { - x: points.map(p => p.x).reduce((res, x) => res + x, 0) / points.length, - y: points.map(p => p.y).reduce((res, y) => res + y, 0) / points.length, + x: points.reduce((res, p) => res + p.x * p.weight, 0) / weightSum, + y: points.reduce((res, p) => res + p.y * p.weight, 0) / weightSum, }; } diff --git a/extension/ui/prefs.ui b/extension/ui/prefs.ui index 8ff05aa..6793f9a 100644 --- a/extension/ui/prefs.ui +++ b/extension/ui/prefs.ui @@ -26,8 +26,6 @@ 700 36 36 - 36 - 36 vertical @@ -642,4 +640,4 @@ - \ No newline at end of file + From b5fb89950c4e8b97e808b26360e0748814b24d43 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Tue, 23 Nov 2021 23:07:37 +0530 Subject: [PATCH 114/155] showDesktop: WIP add 2 algorithms 1. KDE algorithm: windowaperture, badBadWindowsEffect 2. Similar to Topological sorting: Minimum #windows that can be assigned to corner <- Ceil( #windows / #corners ) Extra Windows <- #windows - #corners * Minimum #windows assigned Sort all pairs with distance window needs to hide in a corner Traverse sorted array from shortest distance If window in pair is assigned => continue If corner more than Minimum #windows assigned => continue If corner has Minimum #windows assigned If No more Extra windows => continue Else => Extra Windows <- Extra Windows - 1 Assign window to corner Animate window to assigned corner --- extension/src/pinchGestures/showDesktop.ts | 141 ++++++++++++++++++++- 1 file changed, 136 insertions(+), 5 deletions(-) diff --git a/extension/src/pinchGestures/showDesktop.ts b/extension/src/pinchGestures/showDesktop.ts index e25d99f..50a62cc 100644 --- a/extension/src/pinchGestures/showDesktop.ts +++ b/extension/src/pinchGestures/showDesktop.ts @@ -41,6 +41,8 @@ declare type WindowActorClone = { start: Point, end: Point, }, + apertureDistances?: [number, number, number, number], + apertureCorner?: number, }; class MonitorGroup { @@ -122,7 +124,140 @@ class MonitorGroup { } } + private _calculateDist(p: Point, q: Point) { + return Math.abs(p.x - q.x) + Math.abs(p.y - q.y); + } + + private _assignCorner(actorClone: WindowActorClone, corner: Corner) { + const { clone } = actorClone; + const destPoint = this._getDestPoint(clone, corner); + actorClone.translation = { + start: { x: clone.x, y: clone.y }, + end: { x: destPoint.x, y: destPoint.y }, + }; + } + private _fillCloneDestPosition(windowActorsClones: WindowActorClone[]) { + interface IMetricData { + value: number, + actorClone: WindowActorClone, + corner: Corner, + } + + const distanceMetrics: IMetricData[] = []; + this._corners.forEach(corner => { + windowActorsClones.forEach(actorClone => { + distanceMetrics.push({ + value: this._calculateDist(actorClone.clone, this._getDestPoint(actorClone.clone, corner)), + actorClone, + corner, + }); + }); + }); + + const minActorsPerCorner = Math.floor(windowActorsClones.length / this._corners.length); + let extraActors = windowActorsClones.length - this._corners.length * minActorsPerCorner; + const clusterSizes = new Map(); + const takenActorClones = new Set(); + distanceMetrics.sort((a, b) => a.value - b.value); + distanceMetrics.forEach(metric => { + const size = clusterSizes.get(metric.corner.position) ?? 0; + if (takenActorClones.has(metric.actorClone)) return; + if (size >= minActorsPerCorner) { + if (size > minActorsPerCorner || extraActors <= 0) return; + extraActors -= 1; + } + + takenActorClones.add(metric.actorClone); + clusterSizes.set(metric.corner.position, size + 1); + + this._assignCorner(metric.actorClone, metric.corner); + }); + } + + private _fillCloneDestPosition_kde(windowActorsClones: WindowActorClone[]) { + // corner's closest actor + type CornerCluster = { + postition: CornerPositions, + closestClone?: WindowActorClone, + assignedClones?: WindowActorClone[], + } + const cornerClusters = new Map(); + this._corners.forEach(c => cornerClusters.set(c.position, { postition: c.position })); + + const closestWindows: (undefined | WindowActorClone)[] = [undefined, undefined, undefined, undefined]; + const screenGeo = this.monitor; + let movedWindowsCount = 0; + for (let i = 0; i < windowActorsClones.length; ++i) { + const actorClone = windowActorsClones[i]; + + // calculate the corner distances + const geo = actorClone.clone; + const dl = geo.x + geo.width - screenGeo.x; + const dr = screenGeo.x + screenGeo.width - geo.x; + const dt = geo.y + geo.height - screenGeo.y; + const db = screenGeo.y + screenGeo.height - geo.y; + actorClone.apertureDistances = [dl + dt, dr + dt, dr + db, dl + db]; + movedWindowsCount += 1; + + // if this window is the closest one to any corner, set it as preferred there + let nearest = 0; + for (let j = 1; j < 4; ++j) { + if (actorClone.apertureDistances[j] < actorClone.apertureDistances[nearest] || + (actorClone.apertureDistances[j] === actorClone.apertureDistances[nearest] && closestWindows[j] === undefined)) { + nearest = j; + } + } + if (closestWindows[nearest] === undefined || + closestWindows[nearest]!.apertureDistances![nearest] > actorClone.apertureDistances[nearest]) + closestWindows[nearest] = actorClone; + } + + // second pass, select corners + + // 1st off, move the nearest windows to their nearest corners + // this will ensure that if there's only on window in the lower right + // it won't be moved out to the upper left + const movedWindowsDec = [0, 0, 0, 0]; + for (let i = 0; i < 4; ++i) { + if (closestWindows[i] === undefined) + continue; + closestWindows[i]!.apertureCorner = i; + delete closestWindows[i]!.apertureDistances; + movedWindowsDec[i] = 1; + } + + // 2nd, distribute the remainders according to their preferences + // this doesn't exactly have heapsort performance ;-) + movedWindowsCount = Math.floor((movedWindowsCount + 3) / 4); + for (let i = 0; i < 4; ++i) { + for (let j = 0; j < movedWindowsCount - movedWindowsDec[i]; ++j) { + let bestWindow = undefined; + for (let k = 0; k < windowActorsClones.length; ++k) { + if (windowActorsClones[k].apertureDistances === undefined) + continue; + if (bestWindow === undefined || + windowActorsClones[k].apertureDistances![i] < bestWindow.apertureDistances![i]) + bestWindow = windowActorsClones[k]; + } + if (bestWindow === undefined) + break; + bestWindow.apertureCorner = i; + delete bestWindow.apertureDistances; + } + } + + // fill translation properties + for (let i = 0; i < windowActorsClones.length; ++i) { + const actorClone = windowActorsClones[i]; + const cornerIndex = actorClone.apertureCorner ?? 1; + const destCorner = this._corners[cornerIndex]; + + this._assignCorner(actorClone, destCorner); + } + } + + private _fillCloneDestPosition_centroid(windowActorsClones: WindowActorClone[]) { const centroid = this._getCloneCentroid(windowActorsClones); windowActorsClones.map(actorClone => { @@ -135,11 +270,7 @@ class MonitorGroup { let destCorner = centroid ? findCornerForWindow(cloneCenter, centroid, this._corners) : undefined; destCorner = destCorner ?? this._bottomMidCorner; - const destPoint = this._getDestPoint(clone, destCorner); - actorClone.translation = { - start: { x: clone.x, y: clone.y }, - end: { x: destPoint.x, y: destPoint.y }, - }; + this._assignCorner(actorClone, destCorner); }); } From 4f8a69e7bd6a23bd62be50b3eb6805aaf884f096 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Wed, 24 Nov 2021 00:31:14 +0530 Subject: [PATCH 115/155] showDesktop: Minimize to bottom if there's single window --- extension/src/pinchGestures/showDesktop.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/extension/src/pinchGestures/showDesktop.ts b/extension/src/pinchGestures/showDesktop.ts index 50a62cc..562c4d5 100644 --- a/extension/src/pinchGestures/showDesktop.ts +++ b/extension/src/pinchGestures/showDesktop.ts @@ -138,6 +138,12 @@ class MonitorGroup { } private _fillCloneDestPosition(windowActorsClones: WindowActorClone[]) { + if (windowActorsClones.length === 0) return; + if (windowActorsClones.length === 1) { + this._assignCorner(windowActorsClones[0], this._bottomMidCorner); + return; + } + interface IMetricData { value: number, actorClone: WindowActorClone, From e4adaab17f5c72ab1c8f2b6317a31f500606ac4a Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Fri, 26 Nov 2021 19:26:08 +0530 Subject: [PATCH 116/155] schemas: Add option to revert direction of overview navigation gesture --- extension/common/prefs.ts | 1 + extension/common/settings.ts | 3 +- extension/constants.ts | 1 + extension/extension.ts | 1 + ...extensions.gestureImprovements.gschema.xml | 4 + extension/src/overviewRoundTrip.ts | 1 + extension/ui/prefs.ui | 1045 ++++++++--------- 7 files changed, 529 insertions(+), 527 deletions(-) diff --git a/extension/common/prefs.ts b/extension/common/prefs.ts index 8af54fb..c2f0b0b 100644 --- a/extension/common/prefs.ts +++ b/extension/common/prefs.ts @@ -94,6 +94,7 @@ export function getPrefsWidget(settings: Gio.Settin bind_boolean_value('default-session-workspace', settings, builder, { flags: Gio.SettingsBindFlags.INVERT_BOOLEAN }); bind_boolean_value('default-overview', settings, builder, { flags: Gio.SettingsBindFlags.INVERT_BOOLEAN }); bind_boolean_value('follow-natural-scroll', settings, builder); + bind_boolean_value('default-overview-gesture-direction', settings, builder, { flags: Gio.SettingsBindFlags.INVERT_BOOLEAN }); bind_boolean_value('enable-alttab-gesture', settings, builder, { sensitiveRowKeys: ['alttab-delay_box-row'] }); bind_boolean_value('enable-window-manipulation-gesture', settings, builder, { sensitiveRowKeys: ['allow-minimize-window_box-row'] }); diff --git a/extension/common/settings.ts b/extension/common/settings.ts index b893f89..3a5c436 100644 --- a/extension/common/settings.ts +++ b/extension/common/settings.ts @@ -12,7 +12,8 @@ export type BooleanSettingsKeys = 'allow-minimize-window' | 'follow-natural-scroll' | 'enable-alttab-gesture' | - 'enable-window-manipulation-gesture' + 'enable-window-manipulation-gesture' | + 'default-overview-gesture-direction' ; export type IntegerSettingsKeys = diff --git a/extension/constants.ts b/extension/constants.ts index f93a9d5..d5443f7 100644 --- a/extension/constants.ts +++ b/extension/constants.ts @@ -33,6 +33,7 @@ export const ExtSettings = { DEFAULT_OVERVIEW_GESTURE: false, ALLOW_MINIMIZE_WINDOW: false, FOLLOW_NATURAL_SCROLL: true, + DEFAULT_OVERVIEW_GESTURE_DIRECTION: true, }; export const RELOAD_DELAY = 150; // reload extension delay in ms \ No newline at end of file diff --git a/extension/extension.ts b/extension/extension.ts index df566a8..a57ae29 100644 --- a/extension/extension.ts +++ b/extension/extension.ts @@ -107,6 +107,7 @@ class Extension { ExtSettings.DEFAULT_OVERVIEW_GESTURE = this.settings.get_boolean('default-overview'); ExtSettings.ALLOW_MINIMIZE_WINDOW = this.settings.get_boolean('allow-minimize-window'); ExtSettings.FOLLOW_NATURAL_SCROLL = this.settings.get_boolean('follow-natural-scroll'); + ExtSettings.DEFAULT_OVERVIEW_GESTURE_DIRECTION = this.settings.get_boolean('default-overview-gesture-direction'); TouchpadConstants.SWIPE_MULTIPLIER = Constants.TouchpadConstants.DEFAULT_SWIPE_MULTIPLIER * this.settings.get_double('touchpad-speed-scale'); TouchpadConstants.PINCH_MULTIPLIER = Constants.TouchpadConstants.DEFAULT_PINCH_MULTIPLIER * this.settings.get_double('touchpad-pinch-speed'); diff --git a/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml b/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml index cf982df..43c8a1a 100644 --- a/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml +++ b/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml @@ -31,6 +31,10 @@ true Whether to follow natural scroll for swipe + + true + Default direction for overview navigation + true Enable alttab gesture diff --git a/extension/src/overviewRoundTrip.ts b/extension/src/overviewRoundTrip.ts index 7b12749..fb65137 100644 --- a/extension/src/overviewRoundTrip.ts +++ b/extension/src/overviewRoundTrip.ts @@ -62,6 +62,7 @@ export class OverviewRoundTripGestureExtension implements ISubExtension { (ExtSettings.DEFAULT_OVERVIEW_GESTURE ? [3] : [4]), Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW, Clutter.Orientation.VERTICAL, + ExtSettings.DEFAULT_OVERVIEW_GESTURE_DIRECTION, ); this._swipeTracker.orientation = Clutter.Orientation.VERTICAL; diff --git a/extension/ui/prefs.ui b/extension/ui/prefs.ui index 6793f9a..f291245 100644 --- a/extension/ui/prefs.ui +++ b/extension/ui/prefs.ui @@ -45,246 +45,88 @@ + - - 36 + - - none + + 12 + 12 + 12 + 12 + 32 - - - - - 12 - 12 - 12 - 12 - 32 - - - - vertical - start - - - - start - start - 1 - 0 - 4-finger gestures for overview navigation - - - - - - start - end - True - 0 - 6 - For navigating between desktop, activities and appgrid - - - - - - - - - - end - True - center - - - - - + + start + center + 1 + 0 + 4-finger gestures for workspace switching - - - - - 12 - 12 - 12 - 12 - 32 - - - - start - center - 1 - 0 - 4-finger gestures for workspace switching - - - - - - end - True - center - - - - - + + end + True + center - - - - - - 12 - 12 - 12 - 12 - 32 - - - - start - center - 1 - 0 - Window switching - - - - - - end - True - center - - + + + + - - - - + + + + + + 12 + 12 + 12 + 12 + 32 - - - - - 12 - 12 - 12 - 12 - 32 - - - - vertical - start - - - - start - start - 1 - 0 - Window manipulation - - - - - - start - end - True - 0 - 6 - Tile, unmaximize, maximize or fullscreen a window - - - - - - - - - - end - True - center - - - + + vertical + start + + + + start + start + 1 + 0 + 4-finger gestures for overview navigation + + + + + + start + end + True + 0 + 6 + For navigating between desktop, activities and appgrid + - + + - - - - - 12 - 12 - 12 - 12 - 32 - - - - vertical - start - - - - start - start - 1 - 0 - Minimize window - - - - - - start - end - True - 0 - 6 - This will disable tiling gesture - - - - - - - - - - end - True - center - - - - - + + end + True + center @@ -293,97 +135,32 @@ - - - - 12 - - - start - center - Pinch Gestures - - - - - - - - + - - 36 + - - none + + 12 + 12 + 12 + 12 + 32 - - - - - 12 - 12 - 12 - 12 - 32 - - - - start - center - 1 - 0 - 3 finger pinch - - - - - - - None - Show Desktop - - - - - - + + start + center + 1 + 0 + Window switching - - - - - 12 - 12 - 12 - 12 - 32 - - - - start - center - 1 - 0 - 4 finger pinch - - - - - - - None - Show Desktop - - - - - - + + end + True + center @@ -392,245 +169,110 @@ - - - - 12 - vertical - - - start - center - Customization - - - - - - - - + - - 36 + - - none + + 12 + 12 + 12 + 12 + 32 - - - - - 12 - 12 - 12 - 12 - 32 - - - - start - center - 1 - 0 - Touchpad swipe speed - - - - - - horizontal - end - 1 - - - - 300 - start - end - False - touchpad_scale_adjustment - - - - - - - - - - - center - end - 5 - False - False - 1.00 - - - - - + + vertical + start + + + + start + start + 1 + 0 + Window manipulation + + + + + + start + end + True + 0 + 6 + Tile, unmaximize, maximize or fullscreen a window + - + + - - - - - 12 - 12 - 12 - 12 - 32 - - - - vertical - start - - - - start - start - 1 - 0 - Follow natural swipe - - - - - - start - end - True - 0 - 6 - Similar to natural scrolling. Swipe moves the content, not the view - - - - - - - - - - end - True - center - - - - - + + end + True + center - - - - - - 12 - 12 - 12 - 12 - 32 - - - - start - center - 1 - 0 - Window switcher popup delay (ms) - - - - - - end - alttab_delay_adjustment - - - + + + + + + + + + + + 12 + 12 + 12 + 12 + 32 + + + vertical + start + + + + start + start + 1 + 0 + Minimize window - + + + + + start + end + True + 0 + 6 + This will disable tiling gesture + + + + - - - - - 12 - 12 - 12 - 12 - 32 - - - - start - center - 1 - 0 - Touchpad pinch speed - - - - - - horizontal - end - 1 - - - - 300 - start - end - False - - - 0.00 - -3.3219280948873626 - 3.3219280948873626 - 0.01 - - - - - - - - - - - - - center - end - 5 - False - False - 1.00 - - - - - - - + + end + True + center @@ -640,4 +282,355 @@ - + + + + + + + + 12 + + + start + center + Pinch Gestures + + + + + + + + + + + 36 + + + none + + + + + + + 12 + 12 + 12 + 12 + 32 + + + + start + center + 1 + 0 + 3 finger pinch + + + + + + + None + Show Desktop + + + + + + + + + + + + + + + 12 + 12 + 12 + 12 + 32 + + + + start + center + 1 + 0 + 4 finger pinch + + + + + + + None + Show Desktop + + + + + + + + + + + + + + + + + + 12 + vertical + + + start + center + Customization + + + + + + + + + + + 36 + + + none + + + + + + + 12 + 12 + 12 + 12 + 32 + + + + start + center + 1 + 0 + Touchpad swipe speed + + + + + + horizontal + end + 1 + + + + 300 + start + end + False + touchpad_scale_adjustment + + + + + + + + + + + center + end + 5 + False + False + 1.00 + + + + + + + + + + + + + + + + 12 + 12 + 12 + 12 + 32 + + + + vertical + start + + + + start + start + 1 + 0 + Follow natural swipe + + + + + + start + end + True + 0 + 6 + Similar to natural scrolling. Swipe moves the content, not the view + + + + + + + + + + end + True + center + + + + + + + + + + + + + + 12 + 12 + 12 + 12 + 32 + + + + start + center + 1 + 0 + Window switcher popup delay (ms) + + + + + + end + alttab_delay_adjustment + + + + + + + + + + + + + + + 12 + 12 + 12 + 12 + 32 + + + + start + center + 1 + 0 + Touchpad pinch speed + + + + + + horizontal + end + 1 + + + + 300 + start + end + False + + + 0.00 + -3.3219280948873626 + 3.3219280948873626 + 0.01 + + + + + + + + + + + + + center + end + 5 + False + False + 1.00 + + + + + + + + + + + + + + + + + \ No newline at end of file From 7d8eb3cab883f473392e05847825d85ee88be4f7 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 29 Mar 2022 06:07:13 +0530 Subject: [PATCH 117/155] Code cleanup remove unused methods --- extension/src/pinchGestures/showDesktop.ts | 125 +-- extension/src/utils/pointsArithmetic.ts | 78 -- extension/ui/prefs.ui | 1045 ++++++++++---------- 3 files changed, 532 insertions(+), 716 deletions(-) delete mode 100644 extension/src/utils/pointsArithmetic.ts diff --git a/extension/src/pinchGestures/showDesktop.ts b/extension/src/pinchGestures/showDesktop.ts index 562c4d5..6e5d774 100644 --- a/extension/src/pinchGestures/showDesktop.ts +++ b/extension/src/pinchGestures/showDesktop.ts @@ -5,7 +5,6 @@ import Shell from '@gi-types/shell0'; import { global, imports, __shell_private_types } from 'gnome-shell'; import { TouchpadPinchGesture } from '../trackers/pinchTracker'; import { easeActor } from '../utils/environment'; -import { findCentroid, findCornerForWindow, Point } from '../utils/pointsArithmetic'; const Main = imports.ui.main; const Layout = imports.ui.layout; @@ -30,6 +29,11 @@ declare type CornerPositions = | 'bottom-left' | 'bottom-mid' | 'bottom-right' ; +declare type Point = { + x: number, + y: number, +} + declare type Corner = Point & { position: CornerPositions; } @@ -41,8 +45,6 @@ declare type WindowActorClone = { start: Point, end: Point, }, - apertureDistances?: [number, number, number, number], - apertureCorner?: number, }; class MonitorGroup { @@ -87,24 +89,6 @@ class MonitorGroup { this._container.insert_child_below(clone, null); } - private _getCloneCentroid(windowActorsClones: WindowActorClone[]) { - const point = findCentroid( - windowActorsClones.map(actorClone => { - return { - x: actorClone.clone.x + actorClone.clone.width / 2, - y: actorClone.clone.y + actorClone.clone.height / 2, - weight: actorClone.clone.width * actorClone.clone.height, - // weight: 1, - }; - }), - ); - if (point) { - point.x = Math.round(point.x); - point.y = Math.round(point.y); - } - return point; - } - private _getDestPoint(clone: Clutter.Clone, destCorner: Corner): Point { const destY = destCorner.y; const cloneRelXCenter = Math.round(clone.width / 2); @@ -181,105 +165,6 @@ class MonitorGroup { }); } - private _fillCloneDestPosition_kde(windowActorsClones: WindowActorClone[]) { - // corner's closest actor - type CornerCluster = { - postition: CornerPositions, - closestClone?: WindowActorClone, - assignedClones?: WindowActorClone[], - } - const cornerClusters = new Map(); - this._corners.forEach(c => cornerClusters.set(c.position, { postition: c.position })); - - const closestWindows: (undefined | WindowActorClone)[] = [undefined, undefined, undefined, undefined]; - const screenGeo = this.monitor; - let movedWindowsCount = 0; - for (let i = 0; i < windowActorsClones.length; ++i) { - const actorClone = windowActorsClones[i]; - - // calculate the corner distances - const geo = actorClone.clone; - const dl = geo.x + geo.width - screenGeo.x; - const dr = screenGeo.x + screenGeo.width - geo.x; - const dt = geo.y + geo.height - screenGeo.y; - const db = screenGeo.y + screenGeo.height - geo.y; - actorClone.apertureDistances = [dl + dt, dr + dt, dr + db, dl + db]; - movedWindowsCount += 1; - - // if this window is the closest one to any corner, set it as preferred there - let nearest = 0; - for (let j = 1; j < 4; ++j) { - if (actorClone.apertureDistances[j] < actorClone.apertureDistances[nearest] || - (actorClone.apertureDistances[j] === actorClone.apertureDistances[nearest] && closestWindows[j] === undefined)) { - nearest = j; - } - } - if (closestWindows[nearest] === undefined || - closestWindows[nearest]!.apertureDistances![nearest] > actorClone.apertureDistances[nearest]) - closestWindows[nearest] = actorClone; - } - - // second pass, select corners - - // 1st off, move the nearest windows to their nearest corners - // this will ensure that if there's only on window in the lower right - // it won't be moved out to the upper left - const movedWindowsDec = [0, 0, 0, 0]; - for (let i = 0; i < 4; ++i) { - if (closestWindows[i] === undefined) - continue; - closestWindows[i]!.apertureCorner = i; - delete closestWindows[i]!.apertureDistances; - movedWindowsDec[i] = 1; - } - - // 2nd, distribute the remainders according to their preferences - // this doesn't exactly have heapsort performance ;-) - movedWindowsCount = Math.floor((movedWindowsCount + 3) / 4); - for (let i = 0; i < 4; ++i) { - for (let j = 0; j < movedWindowsCount - movedWindowsDec[i]; ++j) { - let bestWindow = undefined; - for (let k = 0; k < windowActorsClones.length; ++k) { - if (windowActorsClones[k].apertureDistances === undefined) - continue; - if (bestWindow === undefined || - windowActorsClones[k].apertureDistances![i] < bestWindow.apertureDistances![i]) - bestWindow = windowActorsClones[k]; - } - if (bestWindow === undefined) - break; - bestWindow.apertureCorner = i; - delete bestWindow.apertureDistances; - } - } - - // fill translation properties - for (let i = 0; i < windowActorsClones.length; ++i) { - const actorClone = windowActorsClones[i]; - const cornerIndex = actorClone.apertureCorner ?? 1; - const destCorner = this._corners[cornerIndex]; - - this._assignCorner(actorClone, destCorner); - } - } - - private _fillCloneDestPosition_centroid(windowActorsClones: WindowActorClone[]) { - const centroid = this._getCloneCentroid(windowActorsClones); - - windowActorsClones.map(actorClone => { - const { clone } = actorClone; - const cloneCenter: Point = { - x: clone.x + Math.round(clone.width / 2), - y: clone.y + Math.round(clone.height / 2), - }; - - let destCorner = centroid ? findCornerForWindow(cloneCenter, centroid, this._corners) : undefined; - destCorner = destCorner ?? this._bottomMidCorner; - - this._assignCorner(actorClone, destCorner); - }); - } - gestureBegin(windowActors: Meta.WindowActor[]) { windowActors.forEach(this._addWindowActor.bind(this)); this._fillCloneDestPosition(this._windowActorClones); diff --git a/extension/src/utils/pointsArithmetic.ts b/extension/src/utils/pointsArithmetic.ts deleted file mode 100644 index feb12a5..0000000 --- a/extension/src/utils/pointsArithmetic.ts +++ /dev/null @@ -1,78 +0,0 @@ -export interface Point { - x: number, - y: number, -} - -export interface WeightedPoint extends Point { - weight: number, -} - -interface TransformationMatrix { - 0: [number, number], - 1: [number, number], - delta: number, -} - -function sqaure_distance(p1: Point, p2: Point): number { - return (p1.x - p2.x) * (p1.x - p2.x) + - (p1.y - p2.y) * (p1.y - p2.y); -} - -function transform_point(matrix: TransformationMatrix, p: Point): Point { - return { - x: (matrix[0][0] * p.x + matrix[0][1] * p.y) / matrix.delta, - y: (matrix[1][0] * p.x + matrix[1][1] * p.y) / matrix.delta, - }; -} - -/** - * @param windows - * @returns centroid of points or undefined if array is empty - */ -export function findCentroid(points: WeightedPoint[]): Point | undefined { - const weightSum = points.reduce((res, p) => res + p.weight, 0); - if (weightSum === 0) - return undefined; - - return { - x: points.reduce((res, p) => res + p.x * p.weight, 0) / weightSum, - y: points.reduce((res, p) => res + p.y * p.weight, 0) / weightSum, - }; -} - -/** - * first convert points so that win and centroid point are on horizontal line - * and win is at origin and centroid point is on negative x axis - * then filter out points which on negative x area - * then distance between win and corner is equal to distance between win and point on x axis - * on parabola passing through corner, with vertex at win and focus at centroid - * @param win Center of window - * @param centroid centroid point of center of all windows - * @returns corner which is closest(according to algorithm) to window - * or undefined if win and centroid point are same or all corners are in opposite direction - */ -export function findCornerForWindow(win: Point, centroid: Point, corners: T[]): undefined | T { - const dist_w_m = Math.sqrt(sqaure_distance(win, centroid)); - if (dist_w_m === 0 || corners.length === 0) - return undefined; - - const transform_matrix: TransformationMatrix = { - 0: [win.x - centroid.x, win.y - centroid.y], - 1: [-win.y + centroid.y, win.x - centroid.x], - delta: dist_w_m, - }; - - win = transform_point(transform_matrix, win); - let mapped_corners = corners.map(c => { - const point = transform_point(transform_matrix, c); - point.x -= win.x; - point.y -= win.y; - return { ...point, corner: c }; - }); - - // ignore points which are on negative x axis (opposite direction to centroid->win array); - mapped_corners = mapped_corners.filter(c => c.x >= 0); - const corner_dists = mapped_corners.map(c => c.x + (c.y * c.y) / (2 * dist_w_m)); - const minIndex = corner_dists.indexOf(Math.min(...corner_dists)); - return mapped_corners[minIndex]?.corner; -} diff --git a/extension/ui/prefs.ui b/extension/ui/prefs.ui index f291245..8ff05aa 100644 --- a/extension/ui/prefs.ui +++ b/extension/ui/prefs.ui @@ -26,6 +26,8 @@ 700 36 36 + 36 + 36 vertical @@ -45,88 +47,246 @@ - - + + 36 - - 12 - 12 - 12 - 12 - 32 + + none + - - start - center - 1 - 0 - 4-finger gestures for workspace switching + + + + 12 + 12 + 12 + 12 + 32 + + + + vertical + start + + + + start + start + 1 + 0 + 4-finger gestures for overview navigation + + + + + + start + end + True + 0 + 6 + For navigating between desktop, activities and appgrid + + + + + + + + + + end + True + center + + + + + + - - end - True - center + + + + 12 + 12 + 12 + 12 + 32 + + + + start + center + 1 + 0 + 4-finger gestures for workspace switching + + + + + + end + True + center + + + + + - - - - + + + + + + 12 + 12 + 12 + 12 + 32 + + + + start + center + 1 + 0 + Window switching + + + + + + end + True + center + + - - - - - - 12 - 12 - 12 - 12 - 32 + + + + + - - vertical - start - - - - start - start - 1 - 0 - 4-finger gestures for overview navigation - - - - - - start - end - True - 0 - 6 - For navigating between desktop, activities and appgrid - - - + + + + 12 + 12 + 12 + 12 + 32 + + + + vertical + start + + + + start + start + 1 + 0 + Window manipulation + + + + + + start + end + True + 0 + 6 + Tile, unmaximize, maximize or fullscreen a window + + + + + + + + + + end + True + center + + + + + - - end - True - center + + + + 12 + 12 + 12 + 12 + 32 + + + + vertical + start + + + + start + start + 1 + 0 + Minimize window + + + + + + start + end + True + 0 + 6 + This will disable tiling gesture + + + + + + + + + + end + True + center + + + + + @@ -135,32 +295,97 @@ - + + + + 12 + + + start + center + Pinch Gestures + + + + + + + + - + + 36 - - 12 - 12 - 12 - 12 - 32 + + none + - - start - center - 1 - 0 - Window switching + + + + 12 + 12 + 12 + 12 + 32 + + + + start + center + 1 + 0 + 3 finger pinch + + + + + + + None + Show Desktop + + + + + + + - - end - True - center + + + + 12 + 12 + 12 + 12 + 32 + + + + start + center + 1 + 0 + 4 finger pinch + + + + + + + None + Show Desktop + + + + + + @@ -169,110 +394,245 @@ - + + + + 12 + vertical + + + start + center + Customization + + + + + + + + - + + 36 - - 12 - 12 - 12 - 12 - 32 + + none + - - vertical - start - - - - start - start - 1 - 0 - Window manipulation - - - - - - start - end - True - 0 - 6 - Tile, unmaximize, maximize or fullscreen a window - + + + + 12 + 12 + 12 + 12 + 32 + + + + start + center + 1 + 0 + Touchpad swipe speed + + + + + + horizontal + end + 1 + + + + 300 + start + end + False + touchpad_scale_adjustment + + + + + + + + + + + center + end + 5 + False + False + 1.00 + + + + + - - + + - - end - True - center + + + + 12 + 12 + 12 + 12 + 32 + + + + vertical + start + + + + start + start + 1 + 0 + Follow natural swipe + + + + + + start + end + True + 0 + 6 + Similar to natural scrolling. Swipe moves the content, not the view + + + + + + + + + + end + True + center + + + + + - - - - - - - - - - - 12 - 12 - 12 - 12 - 32 - + - - vertical - start - - - - start - start - 1 - 0 - Minimize window - - - - - - start - end - True - 0 - 6 - This will disable tiling gesture - - - + + + + 12 + 12 + 12 + 12 + 32 + + + + start + center + 1 + 0 + Window switcher popup delay (ms) + + + + + + end + alttab_delay_adjustment + + + + + + - - end - True - center + + + + 12 + 12 + 12 + 12 + 32 + + + + start + center + 1 + 0 + Touchpad pinch speed + + + + + + horizontal + end + 1 + + + + 300 + start + end + False + + + 0.00 + -3.3219280948873626 + 3.3219280948873626 + 0.01 + + + + + + + + + + + + + center + end + 5 + False + False + 1.00 + + + + + + + @@ -281,356 +641,5 @@ - - - - - - - - - 12 - - - start - center - Pinch Gestures - - - - - - - - - - - 36 - - - none - - - - - - - 12 - 12 - 12 - 12 - 32 - - - - start - center - 1 - 0 - 3 finger pinch - - - - - - - None - Show Desktop - - - - - - - - - - - - - - - 12 - 12 - 12 - 12 - 32 - - - - start - center - 1 - 0 - 4 finger pinch - - - - - - - None - Show Desktop - - - - - - - - - - - - - - - - - - 12 - vertical - - - start - center - Customization - - - - - - - - - - - 36 - - - none - - - - - - - 12 - 12 - 12 - 12 - 32 - - - - start - center - 1 - 0 - Touchpad swipe speed - - - - - - horizontal - end - 1 - - - - 300 - start - end - False - touchpad_scale_adjustment - - - - - - - - - - - center - end - 5 - False - False - 1.00 - - - - - - - - - - - - - - - - 12 - 12 - 12 - 12 - 32 - - - - vertical - start - - - - start - start - 1 - 0 - Follow natural swipe - - - - - - start - end - True - 0 - 6 - Similar to natural scrolling. Swipe moves the content, not the view - - - - - - - - - - end - True - center - - - - - - - - - - - - - - 12 - 12 - 12 - 12 - 32 - - - - start - center - 1 - 0 - Window switcher popup delay (ms) - - - - - - end - alttab_delay_adjustment - - - - - - - - - - - - - - - 12 - 12 - 12 - 12 - 32 - - - - start - center - 1 - 0 - Touchpad pinch speed - - - - - - horizontal - end - 1 - - - - 300 - start - end - False - - - 0.00 - -3.3219280948873626 - 3.3219280948873626 - 0.01 - - - - - - - - - - - - - center - end - 5 - False - False - 1.00 - - - - - - - - - - - - - - - \ No newline at end of file From 44ef4b0762e387afa72ad65639d9be03fce9a5df Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Fri, 26 Nov 2021 19:26:08 +0530 Subject: [PATCH 118/155] prefs: Add option to revert direction of overview navigation gesture --- extension/ui/prefs.ui | 38 +++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/extension/ui/prefs.ui b/extension/ui/prefs.ui index 8ff05aa..4faf516 100644 --- a/extension/ui/prefs.ui +++ b/extension/ui/prefs.ui @@ -23,11 +23,9 @@ vertical 600 - 700 + 600 36 36 - 36 - 36 vertical @@ -535,6 +533,40 @@ + + + + + + 12 + 12 + 12 + 12 + 32 + + + + start + center + 1 + 0 + Revert direction of overview navigation gesture + + + + + + end + True + center + + + + + + + + From 4f6a260686b038bfe9adda41a40782b92e9acc14 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Fri, 8 Apr 2022 03:35:23 +0530 Subject: [PATCH 119/155] deps: update npm dependencies --- package-lock.json | 565 ++++++++++++++++++++++------------------------ package.json | 14 +- 2 files changed, 272 insertions(+), 307 deletions(-) diff --git a/package-lock.json b/package-lock.json index d31a0f8..1da0e77 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,8 +12,8 @@ "fs": "0.0.1-security", "glob": "^7.2.0", "path": "^0.12.7", - "typescript": "^4.5.5", - "yargs": "^17.3.1" + "typescript": "^4.6.3", + "yargs": "^17.4.0" }, "devDependencies": { "@gi-types/clutter8": "^8.0.0", @@ -26,24 +26,24 @@ "@gi-types/shell0": "^0.1.0", "@gi-types/st1": "^1.0.0", "@types/glob": "^7.2.0", - "@types/node": "^17.0.10", - "@types/yargs": "^17.0.8", - "@typescript-eslint/eslint-plugin": "^5.10.0", - "@typescript-eslint/parser": "^5.10.0", - "eslint": "^8.7.0" + "@types/node": "^17.0.23", + "@types/yargs": "^17.0.10", + "@typescript-eslint/eslint-plugin": "^5.18.0", + "@typescript-eslint/parser": "^5.18.0", + "eslint": "^8.12.0" } }, "node_modules/@eslint/eslintrc": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.5.tgz", - "integrity": "sha512-BLxsnmK3KyPunz5wmCCpqy0YelEoxxGmH73Is+Z74oOTMtExcjkr3dDR6quwrjh1YspA8DH9gnX1o069KiS9AQ==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.1.tgz", + "integrity": "sha512-bxvbYnBPN1Gibwyp6NrpnFzA3YtRL3BBAyEAFVIpNTm2Rn4Vy87GA5M4aSn3InRrlsbX5N0GW7XIx+U4SAEKdQ==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.2.0", + "espree": "^9.3.1", "globals": "^13.9.0", - "ignore": "^4.0.6", + "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", "minimatch": "^3.0.4", @@ -53,15 +53,6 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/@eslint/eslintrc/node_modules/ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, "node_modules/@gi-types/atk1": { "version": "2.36.0", "resolved": "https://registry.npmjs.org/@gi-types/atk1/-/atk1-2.36.0.tgz", @@ -445,9 +436,9 @@ } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.9.2", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.2.tgz", - "integrity": "sha512-UXOuFCGcwciWckOpmfKDq/GyhlTf9pN/BzG//x8p8zTOFEcGuA68ANXheFS0AGvy3qgZqLBUkMs7hqzqCKOVwA==", + "version": "0.9.5", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz", + "integrity": "sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==", "dev": true, "dependencies": { "@humanwhocodes/object-schema": "^1.2.1", @@ -510,9 +501,9 @@ } }, "node_modules/@types/json-schema": { - "version": "7.0.9", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", - "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", + "version": "7.0.11", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", "dev": true }, "node_modules/@types/minimatch": { @@ -522,35 +513,35 @@ "dev": true }, "node_modules/@types/node": { - "version": "17.0.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.10.tgz", - "integrity": "sha512-S/3xB4KzyFxYGCppyDt68yzBU9ysL88lSdIah4D6cptdcltc4NCPCAMc0+PCpg/lLIyC7IPvj2Z52OJWeIUkog==", + "version": "17.0.23", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.23.tgz", + "integrity": "sha512-UxDxWn7dl97rKVeVS61vErvw086aCYhDLyvRQZ5Rk65rZKepaFdm53GeqXaKBuOhED4e9uWq34IC3TdSdJJ2Gw==", "dev": true }, "node_modules/@types/yargs": { - "version": "17.0.8", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.8.tgz", - "integrity": "sha512-wDeUwiUmem9FzsyysEwRukaEdDNcwbROvQ9QGRKaLI6t+IltNzbn4/i4asmB10auvZGQCzSQ6t0GSczEThlUXw==", + "version": "17.0.10", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.10.tgz", + "integrity": "sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA==", "dev": true, "dependencies": { "@types/yargs-parser": "*" } }, "node_modules/@types/yargs-parser": { - "version": "20.2.1", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-20.2.1.tgz", - "integrity": "sha512-7tFImggNeNBVMsn0vLrpn1H1uPrUBdnARPTpZoitY37ZrdJREzf7I16tMrlK3hen349gr1NYh8CmZQa7CTG6Aw==", + "version": "21.0.0", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz", + "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==", "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.10.0.tgz", - "integrity": "sha512-XXVKnMsq2fuu9K2KsIxPUGqb6xAImz8MEChClbXmE3VbveFtBUU5bzM6IPVWqzyADIgdkS2Ws/6Xo7W2TeZWjQ==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.18.0.tgz", + "integrity": "sha512-tzrmdGMJI/uii9/V6lurMo4/o+dMTKDH82LkNjhJ3adCW22YQydoRs5MwTiqxGF9CSYxPxQ7EYb4jLNlIs+E+A==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.10.0", - "@typescript-eslint/type-utils": "5.10.0", - "@typescript-eslint/utils": "5.10.0", + "@typescript-eslint/scope-manager": "5.18.0", + "@typescript-eslint/type-utils": "5.18.0", + "@typescript-eslint/utils": "5.18.0", "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", @@ -576,14 +567,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.10.0.tgz", - "integrity": "sha512-pJB2CCeHWtwOAeIxv8CHVGJhI5FNyJAIpx5Pt72YkK3QfEzt6qAlXZuyaBmyfOdM62qU0rbxJzNToPTVeJGrQw==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.18.0.tgz", + "integrity": "sha512-+08nYfurBzSSPndngnHvFw/fniWYJ5ymOrn/63oMIbgomVQOvIDhBoJmYZ9lwQOCnQV9xHGvf88ze3jFGUYooQ==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.10.0", - "@typescript-eslint/types": "5.10.0", - "@typescript-eslint/typescript-estree": "5.10.0", + "@typescript-eslint/scope-manager": "5.18.0", + "@typescript-eslint/types": "5.18.0", + "@typescript-eslint/typescript-estree": "5.18.0", "debug": "^4.3.2" }, "engines": { @@ -603,13 +594,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.10.0.tgz", - "integrity": "sha512-tgNgUgb4MhqK6DoKn3RBhyZ9aJga7EQrw+2/OiDk5hKf3pTVZWyqBi7ukP+Z0iEEDMF5FDa64LqODzlfE4O/Dg==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.18.0.tgz", + "integrity": "sha512-C0CZML6NyRDj+ZbMqh9FnPscg2PrzSaVQg3IpTmpe0NURMVBXlghGZgMYqBw07YW73i0MCqSDqv2SbywnCS8jQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.10.0", - "@typescript-eslint/visitor-keys": "5.10.0" + "@typescript-eslint/types": "5.18.0", + "@typescript-eslint/visitor-keys": "5.18.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -620,12 +611,12 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.10.0.tgz", - "integrity": "sha512-TzlyTmufJO5V886N+hTJBGIfnjQDQ32rJYxPaeiyWKdjsv2Ld5l8cbS7pxim4DeNs62fKzRSt8Q14Evs4JnZyQ==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.18.0.tgz", + "integrity": "sha512-vcn9/6J5D6jtHxpEJrgK8FhaM8r6J1/ZiNu70ZUJN554Y3D9t3iovi6u7JF8l/e7FcBIxeuTEidZDR70UuCIfA==", "dev": true, "dependencies": { - "@typescript-eslint/utils": "5.10.0", + "@typescript-eslint/utils": "5.18.0", "debug": "^4.3.2", "tsutils": "^3.21.0" }, @@ -646,9 +637,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.10.0.tgz", - "integrity": "sha512-wUljCgkqHsMZbw60IbOqT/puLfyqqD5PquGiBo1u1IS3PLxdi3RDGlyf032IJyh+eQoGhz9kzhtZa+VC4eWTlQ==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.18.0.tgz", + "integrity": "sha512-bhV1+XjM+9bHMTmXi46p1Led5NP6iqQcsOxgx7fvk6gGiV48c6IynY0apQb7693twJDsXiVzNXTflhplmaiJaw==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -659,13 +650,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.10.0.tgz", - "integrity": "sha512-x+7e5IqfwLwsxTdliHRtlIYkgdtYXzE0CkFeV6ytAqq431ZyxCFzNMNR5sr3WOlIG/ihVZr9K/y71VHTF/DUQA==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.18.0.tgz", + "integrity": "sha512-wa+2VAhOPpZs1bVij9e5gyVu60ReMi/KuOx4LKjGx2Y3XTNUDJgQ+5f77D49pHtqef/klglf+mibuHs9TrPxdQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.10.0", - "@typescript-eslint/visitor-keys": "5.10.0", + "@typescript-eslint/types": "5.18.0", + "@typescript-eslint/visitor-keys": "5.18.0", "debug": "^4.3.2", "globby": "^11.0.4", "is-glob": "^4.0.3", @@ -686,15 +677,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.10.0.tgz", - "integrity": "sha512-IGYwlt1CVcFoE2ueW4/ioEwybR60RAdGeiJX/iDAw0t5w0wK3S7QncDwpmsM70nKgGTuVchEWB8lwZwHqPAWRg==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.18.0.tgz", + "integrity": "sha512-+hFGWUMMri7OFY26TsOlGa+zgjEy1ssEipxpLjtl4wSll8zy85x0GrUSju/FHdKfVorZPYJLkF3I4XPtnCTewA==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.10.0", - "@typescript-eslint/types": "5.10.0", - "@typescript-eslint/typescript-estree": "5.10.0", + "@typescript-eslint/scope-manager": "5.18.0", + "@typescript-eslint/types": "5.18.0", + "@typescript-eslint/typescript-estree": "5.18.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, @@ -710,12 +701,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.10.0.tgz", - "integrity": "sha512-GMxj0K1uyrFLPKASLmZzCuSddmjZVbVj3Ouy5QVuIGKZopxvOr24JsS7gruz6C3GExE01mublZ3mIBOaon9zuQ==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.18.0.tgz", + "integrity": "sha512-Hf+t+dJsjAKpKSkg3EHvbtEpFFb/1CiOHnvI8bjHgOD4/wAw3gKrA0i94LrbekypiZVanJu3McWJg7rWDMzRTg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.10.0", + "@typescript-eslint/types": "5.18.0", "eslint-visitor-keys": "^3.0.0" }, "engines": { @@ -897,9 +888,9 @@ } }, "node_modules/debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "dependencies": { "ms": "2.1.2" @@ -969,12 +960,12 @@ } }, "node_modules/eslint": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.7.0.tgz", - "integrity": "sha512-ifHYzkBGrzS2iDU7KjhCAVMGCvF6M3Xfs8X8b37cgrUlDt6bWRTpRh6T/gtSXv1HJ/BUGgmjvNvOEGu85Iif7w==", + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.12.0.tgz", + "integrity": "sha512-it1oBL9alZg1S8UycLm5YDMAkIhtH6FtAzuZs6YvoGVldWjbS08BkAdb/ymP9LlAyq8koANu32U7Ib/w+UNh8Q==", "dev": true, "dependencies": { - "@eslint/eslintrc": "^1.0.5", + "@eslint/eslintrc": "^1.2.1", "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", @@ -982,10 +973,10 @@ "debug": "^4.3.2", "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.0", + "eslint-scope": "^7.1.1", "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.2.0", - "espree": "^9.3.0", + "eslint-visitor-keys": "^3.3.0", + "espree": "^9.3.1", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -1061,18 +1052,18 @@ } }, "node_modules/eslint-visitor-keys": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz", - "integrity": "sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/eslint/node_modules/eslint-scope": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.0.tgz", - "integrity": "sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", + "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", "dev": true, "dependencies": { "esrecurse": "^4.3.0", @@ -1092,14 +1083,14 @@ } }, "node_modules/espree": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.0.tgz", - "integrity": "sha512-d/5nCsb0JcqsSEeQzFZ8DH1RmxPcglRWh24EFTlUEmCKoehXGdpsx0RkHDubqUI8LSAIKMQp4r9SzQ3n+sm4HQ==", + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.1.tgz", + "integrity": "sha512-bvdyLmJMfwkV3NCRl5ZhJf22zBFo1y8bYh3VYb+bfzqNB4Je68P2sSuXyuFquzWLebHpNd2/d5uv7yoP9ISnGQ==", "dev": true, "dependencies": { "acorn": "^8.7.0", "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^3.1.0" + "eslint-visitor-keys": "^3.3.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1118,9 +1109,9 @@ } }, "node_modules/esquery/node_modules/estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, "engines": { "node": ">=4.0" @@ -1139,9 +1130,9 @@ } }, "node_modules/esrecurse/node_modules/estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, "engines": { "node": ">=4.0" @@ -1172,9 +1163,9 @@ "dev": true }, "node_modules/fast-glob": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.7.tgz", - "integrity": "sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==", + "version": "3.2.11", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", + "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", "dev": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", @@ -1184,7 +1175,7 @@ "micromatch": "^4.0.4" }, "engines": { - "node": ">=8" + "node": ">=8.6.0" } }, "node_modules/fast-glob/node_modules/glob-parent": { @@ -1258,9 +1249,9 @@ } }, "node_modules/flatted": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.2.tgz", - "integrity": "sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA==", + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.5.tgz", + "integrity": "sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==", "dev": true }, "node_modules/fs": { @@ -1319,9 +1310,9 @@ } }, "node_modules/globals": { - "version": "13.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.0.tgz", - "integrity": "sha512-uS8X6lSKN2JumVoXrbUz+uG4BYG+eiawqm3qFcT7ammfbUHeCBoJMlHcec/S3krSk73/AE/f0szYFmgAA3kYZg==", + "version": "13.13.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.13.0.tgz", + "integrity": "sha512-EQ7Q18AJlPwp3vUDL4mKA0KXrXyNIQyWon6T6XQiBQF0XHvRsiCSrWmmeATpUzdJN2HhWZU6Pdl0a9zdep5p6A==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -1334,16 +1325,16 @@ } }, "node_modules/globby": { - "version": "11.0.4", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz", - "integrity": "sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==", + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", "dev": true, "dependencies": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", - "fast-glob": "^3.1.1", - "ignore": "^5.1.4", - "merge2": "^1.3.0", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", "slash": "^3.0.0" }, "engines": { @@ -1498,15 +1489,12 @@ "dev": true }, "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.8.0.tgz", + "integrity": "sha512-AmXqneQZL3KZMIgBpaPTeI6pfwh+xQ2vutMsyqOu1TBdEXFZgpG/80wuJ531w2ZN7TI0/oc8CPxzh/DKQudZqg==", "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, "engines": { - "node": ">=10" + "node": ">=12" } }, "node_modules/merge2": { @@ -1519,22 +1507,22 @@ } }, "node_modules/micromatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", - "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", "dev": true, "dependencies": { - "braces": "^3.0.1", - "picomatch": "^2.2.3" + "braces": "^3.0.2", + "picomatch": "^2.3.1" }, "engines": { "node": ">=8.6" } }, "node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -1627,9 +1615,9 @@ } }, "node_modules/picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, "engines": { "node": ">=8.6" @@ -1762,18 +1750,18 @@ } }, "node_modules/semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "version": "7.3.6", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.6.tgz", + "integrity": "sha512-HZWqcgwLsjaX1HBD31msI/rXktuIhS+lWvdE4kN9z+8IVT4Itc7vqU2WvYsyD6/sjYCt4dEKH/m1M3dwI9CC5w==", "dev": true, "dependencies": { - "lru-cache": "^6.0.0" + "lru-cache": "^7.4.0" }, "bin": { "semver": "bin/semver.js" }, "engines": { - "node": ">=10" + "node": "^10.0.0 || ^12.0.0 || ^14.0.0 || >=16.0.0" } }, "node_modules/shebang-command": { @@ -1918,9 +1906,9 @@ } }, "node_modules/typescript": { - "version": "4.5.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", - "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz", + "integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -2010,16 +1998,10 @@ "node": ">=10" } }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/yargs": { - "version": "17.3.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.3.1.tgz", - "integrity": "sha512-WUANQeVgjLbNsEmGk20f+nlHgOqzRFpiGWVaBrYGYIGANIIu3lWjoyi0fNlFmJkvfhCZ6BXINe7/W2O2bV4iaA==", + "version": "17.4.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.4.0.tgz", + "integrity": "sha512-WJudfrk81yWFSOkZYpAZx4Nt7V4xp7S/uJkX0CnxovMCt1wCE8LNftPpNuF9X/u9gN5nsD7ycYtRcDf2pL3UiA==", "dependencies": { "cliui": "^7.0.2", "escalade": "^3.1.1", @@ -2034,9 +2016,9 @@ } }, "node_modules/yargs-parser": { - "version": "21.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.0.tgz", - "integrity": "sha512-z9kApYUOCwoeZ78rfRYYWdiU/iNL6mwwYlkkZfJoyMR1xps+NEBX5X7XmRpxkZHhXJ6+Ey00IwKxBBSW9FIjyA==", + "version": "21.0.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.1.tgz", + "integrity": "sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg==", "engines": { "node": ">=12" } @@ -2044,28 +2026,20 @@ }, "dependencies": { "@eslint/eslintrc": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.5.tgz", - "integrity": "sha512-BLxsnmK3KyPunz5wmCCpqy0YelEoxxGmH73Is+Z74oOTMtExcjkr3dDR6quwrjh1YspA8DH9gnX1o069KiS9AQ==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.1.tgz", + "integrity": "sha512-bxvbYnBPN1Gibwyp6NrpnFzA3YtRL3BBAyEAFVIpNTm2Rn4Vy87GA5M4aSn3InRrlsbX5N0GW7XIx+U4SAEKdQ==", "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.2.0", + "espree": "^9.3.1", "globals": "^13.9.0", - "ignore": "^4.0.6", + "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", "minimatch": "^3.0.4", "strip-json-comments": "^3.1.1" - }, - "dependencies": { - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true - } } }, "@gi-types/atk1": { @@ -2451,9 +2425,9 @@ } }, "@humanwhocodes/config-array": { - "version": "0.9.2", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.2.tgz", - "integrity": "sha512-UXOuFCGcwciWckOpmfKDq/GyhlTf9pN/BzG//x8p8zTOFEcGuA68ANXheFS0AGvy3qgZqLBUkMs7hqzqCKOVwA==", + "version": "0.9.5", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz", + "integrity": "sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==", "dev": true, "requires": { "@humanwhocodes/object-schema": "^1.2.1", @@ -2504,9 +2478,9 @@ } }, "@types/json-schema": { - "version": "7.0.9", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", - "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", + "version": "7.0.11", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", "dev": true }, "@types/minimatch": { @@ -2516,35 +2490,35 @@ "dev": true }, "@types/node": { - "version": "17.0.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.10.tgz", - "integrity": "sha512-S/3xB4KzyFxYGCppyDt68yzBU9ysL88lSdIah4D6cptdcltc4NCPCAMc0+PCpg/lLIyC7IPvj2Z52OJWeIUkog==", + "version": "17.0.23", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.23.tgz", + "integrity": "sha512-UxDxWn7dl97rKVeVS61vErvw086aCYhDLyvRQZ5Rk65rZKepaFdm53GeqXaKBuOhED4e9uWq34IC3TdSdJJ2Gw==", "dev": true }, "@types/yargs": { - "version": "17.0.8", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.8.tgz", - "integrity": "sha512-wDeUwiUmem9FzsyysEwRukaEdDNcwbROvQ9QGRKaLI6t+IltNzbn4/i4asmB10auvZGQCzSQ6t0GSczEThlUXw==", + "version": "17.0.10", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.10.tgz", + "integrity": "sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA==", "dev": true, "requires": { "@types/yargs-parser": "*" } }, "@types/yargs-parser": { - "version": "20.2.1", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-20.2.1.tgz", - "integrity": "sha512-7tFImggNeNBVMsn0vLrpn1H1uPrUBdnARPTpZoitY37ZrdJREzf7I16tMrlK3hen349gr1NYh8CmZQa7CTG6Aw==", + "version": "21.0.0", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz", + "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==", "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.10.0.tgz", - "integrity": "sha512-XXVKnMsq2fuu9K2KsIxPUGqb6xAImz8MEChClbXmE3VbveFtBUU5bzM6IPVWqzyADIgdkS2Ws/6Xo7W2TeZWjQ==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.18.0.tgz", + "integrity": "sha512-tzrmdGMJI/uii9/V6lurMo4/o+dMTKDH82LkNjhJ3adCW22YQydoRs5MwTiqxGF9CSYxPxQ7EYb4jLNlIs+E+A==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.10.0", - "@typescript-eslint/type-utils": "5.10.0", - "@typescript-eslint/utils": "5.10.0", + "@typescript-eslint/scope-manager": "5.18.0", + "@typescript-eslint/type-utils": "5.18.0", + "@typescript-eslint/utils": "5.18.0", "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", @@ -2554,52 +2528,52 @@ } }, "@typescript-eslint/parser": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.10.0.tgz", - "integrity": "sha512-pJB2CCeHWtwOAeIxv8CHVGJhI5FNyJAIpx5Pt72YkK3QfEzt6qAlXZuyaBmyfOdM62qU0rbxJzNToPTVeJGrQw==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.18.0.tgz", + "integrity": "sha512-+08nYfurBzSSPndngnHvFw/fniWYJ5ymOrn/63oMIbgomVQOvIDhBoJmYZ9lwQOCnQV9xHGvf88ze3jFGUYooQ==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.10.0", - "@typescript-eslint/types": "5.10.0", - "@typescript-eslint/typescript-estree": "5.10.0", + "@typescript-eslint/scope-manager": "5.18.0", + "@typescript-eslint/types": "5.18.0", + "@typescript-eslint/typescript-estree": "5.18.0", "debug": "^4.3.2" } }, "@typescript-eslint/scope-manager": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.10.0.tgz", - "integrity": "sha512-tgNgUgb4MhqK6DoKn3RBhyZ9aJga7EQrw+2/OiDk5hKf3pTVZWyqBi7ukP+Z0iEEDMF5FDa64LqODzlfE4O/Dg==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.18.0.tgz", + "integrity": "sha512-C0CZML6NyRDj+ZbMqh9FnPscg2PrzSaVQg3IpTmpe0NURMVBXlghGZgMYqBw07YW73i0MCqSDqv2SbywnCS8jQ==", "dev": true, "requires": { - "@typescript-eslint/types": "5.10.0", - "@typescript-eslint/visitor-keys": "5.10.0" + "@typescript-eslint/types": "5.18.0", + "@typescript-eslint/visitor-keys": "5.18.0" } }, "@typescript-eslint/type-utils": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.10.0.tgz", - "integrity": "sha512-TzlyTmufJO5V886N+hTJBGIfnjQDQ32rJYxPaeiyWKdjsv2Ld5l8cbS7pxim4DeNs62fKzRSt8Q14Evs4JnZyQ==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.18.0.tgz", + "integrity": "sha512-vcn9/6J5D6jtHxpEJrgK8FhaM8r6J1/ZiNu70ZUJN554Y3D9t3iovi6u7JF8l/e7FcBIxeuTEidZDR70UuCIfA==", "dev": true, "requires": { - "@typescript-eslint/utils": "5.10.0", + "@typescript-eslint/utils": "5.18.0", "debug": "^4.3.2", "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.10.0.tgz", - "integrity": "sha512-wUljCgkqHsMZbw60IbOqT/puLfyqqD5PquGiBo1u1IS3PLxdi3RDGlyf032IJyh+eQoGhz9kzhtZa+VC4eWTlQ==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.18.0.tgz", + "integrity": "sha512-bhV1+XjM+9bHMTmXi46p1Led5NP6iqQcsOxgx7fvk6gGiV48c6IynY0apQb7693twJDsXiVzNXTflhplmaiJaw==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.10.0.tgz", - "integrity": "sha512-x+7e5IqfwLwsxTdliHRtlIYkgdtYXzE0CkFeV6ytAqq431ZyxCFzNMNR5sr3WOlIG/ihVZr9K/y71VHTF/DUQA==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.18.0.tgz", + "integrity": "sha512-wa+2VAhOPpZs1bVij9e5gyVu60ReMi/KuOx4LKjGx2Y3XTNUDJgQ+5f77D49pHtqef/klglf+mibuHs9TrPxdQ==", "dev": true, "requires": { - "@typescript-eslint/types": "5.10.0", - "@typescript-eslint/visitor-keys": "5.10.0", + "@typescript-eslint/types": "5.18.0", + "@typescript-eslint/visitor-keys": "5.18.0", "debug": "^4.3.2", "globby": "^11.0.4", "is-glob": "^4.0.3", @@ -2608,26 +2582,26 @@ } }, "@typescript-eslint/utils": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.10.0.tgz", - "integrity": "sha512-IGYwlt1CVcFoE2ueW4/ioEwybR60RAdGeiJX/iDAw0t5w0wK3S7QncDwpmsM70nKgGTuVchEWB8lwZwHqPAWRg==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.18.0.tgz", + "integrity": "sha512-+hFGWUMMri7OFY26TsOlGa+zgjEy1ssEipxpLjtl4wSll8zy85x0GrUSju/FHdKfVorZPYJLkF3I4XPtnCTewA==", "dev": true, "requires": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.10.0", - "@typescript-eslint/types": "5.10.0", - "@typescript-eslint/typescript-estree": "5.10.0", + "@typescript-eslint/scope-manager": "5.18.0", + "@typescript-eslint/types": "5.18.0", + "@typescript-eslint/typescript-estree": "5.18.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" } }, "@typescript-eslint/visitor-keys": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.10.0.tgz", - "integrity": "sha512-GMxj0K1uyrFLPKASLmZzCuSddmjZVbVj3Ouy5QVuIGKZopxvOr24JsS7gruz6C3GExE01mublZ3mIBOaon9zuQ==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.18.0.tgz", + "integrity": "sha512-Hf+t+dJsjAKpKSkg3EHvbtEpFFb/1CiOHnvI8bjHgOD4/wAw3gKrA0i94LrbekypiZVanJu3McWJg7rWDMzRTg==", "dev": true, "requires": { - "@typescript-eslint/types": "5.10.0", + "@typescript-eslint/types": "5.18.0", "eslint-visitor-keys": "^3.0.0" } }, @@ -2760,9 +2734,9 @@ } }, "debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "requires": { "ms": "2.1.2" @@ -2809,12 +2783,12 @@ "dev": true }, "eslint": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.7.0.tgz", - "integrity": "sha512-ifHYzkBGrzS2iDU7KjhCAVMGCvF6M3Xfs8X8b37cgrUlDt6bWRTpRh6T/gtSXv1HJ/BUGgmjvNvOEGu85Iif7w==", + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.12.0.tgz", + "integrity": "sha512-it1oBL9alZg1S8UycLm5YDMAkIhtH6FtAzuZs6YvoGVldWjbS08BkAdb/ymP9LlAyq8koANu32U7Ib/w+UNh8Q==", "dev": true, "requires": { - "@eslint/eslintrc": "^1.0.5", + "@eslint/eslintrc": "^1.2.1", "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", @@ -2822,10 +2796,10 @@ "debug": "^4.3.2", "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.0", + "eslint-scope": "^7.1.1", "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.2.0", - "espree": "^9.3.0", + "eslint-visitor-keys": "^3.3.0", + "espree": "^9.3.1", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -2852,9 +2826,9 @@ }, "dependencies": { "eslint-scope": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.0.tgz", - "integrity": "sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", + "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", "dev": true, "requires": { "esrecurse": "^4.3.0", @@ -2897,20 +2871,20 @@ } }, "eslint-visitor-keys": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz", - "integrity": "sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", "dev": true }, "espree": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.0.tgz", - "integrity": "sha512-d/5nCsb0JcqsSEeQzFZ8DH1RmxPcglRWh24EFTlUEmCKoehXGdpsx0RkHDubqUI8LSAIKMQp4r9SzQ3n+sm4HQ==", + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.1.tgz", + "integrity": "sha512-bvdyLmJMfwkV3NCRl5ZhJf22zBFo1y8bYh3VYb+bfzqNB4Je68P2sSuXyuFquzWLebHpNd2/d5uv7yoP9ISnGQ==", "dev": true, "requires": { "acorn": "^8.7.0", "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^3.1.0" + "eslint-visitor-keys": "^3.3.0" } }, "esquery": { @@ -2923,9 +2897,9 @@ }, "dependencies": { "estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true } } @@ -2940,9 +2914,9 @@ }, "dependencies": { "estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true } } @@ -2966,9 +2940,9 @@ "dev": true }, "fast-glob": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.7.tgz", - "integrity": "sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==", + "version": "3.2.11", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", + "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", "dev": true, "requires": { "@nodelib/fs.stat": "^2.0.2", @@ -3039,9 +3013,9 @@ } }, "flatted": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.2.tgz", - "integrity": "sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA==", + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.5.tgz", + "integrity": "sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==", "dev": true }, "fs": { @@ -3088,25 +3062,25 @@ } }, "globals": { - "version": "13.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.0.tgz", - "integrity": "sha512-uS8X6lSKN2JumVoXrbUz+uG4BYG+eiawqm3qFcT7ammfbUHeCBoJMlHcec/S3krSk73/AE/f0szYFmgAA3kYZg==", + "version": "13.13.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.13.0.tgz", + "integrity": "sha512-EQ7Q18AJlPwp3vUDL4mKA0KXrXyNIQyWon6T6XQiBQF0XHvRsiCSrWmmeATpUzdJN2HhWZU6Pdl0a9zdep5p6A==", "dev": true, "requires": { "type-fest": "^0.20.2" } }, "globby": { - "version": "11.0.4", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz", - "integrity": "sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==", + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", "dev": true, "requires": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", - "fast-glob": "^3.1.1", - "ignore": "^5.1.4", - "merge2": "^1.3.0", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", "slash": "^3.0.0" } }, @@ -3222,13 +3196,10 @@ "dev": true }, "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.8.0.tgz", + "integrity": "sha512-AmXqneQZL3KZMIgBpaPTeI6pfwh+xQ2vutMsyqOu1TBdEXFZgpG/80wuJ531w2ZN7TI0/oc8CPxzh/DKQudZqg==", + "dev": true }, "merge2": { "version": "1.4.1", @@ -3237,19 +3208,19 @@ "dev": true }, "micromatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", - "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", "dev": true, "requires": { - "braces": "^3.0.1", - "picomatch": "^2.2.3" + "braces": "^3.0.2", + "picomatch": "^2.3.1" } }, "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "requires": { "brace-expansion": "^1.1.7" } @@ -3324,9 +3295,9 @@ "dev": true }, "picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true }, "prelude-ls": { @@ -3394,12 +3365,12 @@ } }, "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "version": "7.3.6", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.6.tgz", + "integrity": "sha512-HZWqcgwLsjaX1HBD31msI/rXktuIhS+lWvdE4kN9z+8IVT4Itc7vqU2WvYsyD6/sjYCt4dEKH/m1M3dwI9CC5w==", "dev": true, "requires": { - "lru-cache": "^6.0.0" + "lru-cache": "^7.4.0" } }, "shebang-command": { @@ -3502,9 +3473,9 @@ "dev": true }, "typescript": { - "version": "4.5.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", - "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==" + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz", + "integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==" }, "uri-js": { "version": "4.4.1", @@ -3571,16 +3542,10 @@ "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==" }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "yargs": { - "version": "17.3.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.3.1.tgz", - "integrity": "sha512-WUANQeVgjLbNsEmGk20f+nlHgOqzRFpiGWVaBrYGYIGANIIu3lWjoyi0fNlFmJkvfhCZ6BXINe7/W2O2bV4iaA==", + "version": "17.4.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.4.0.tgz", + "integrity": "sha512-WJudfrk81yWFSOkZYpAZx4Nt7V4xp7S/uJkX0CnxovMCt1wCE8LNftPpNuF9X/u9gN5nsD7ycYtRcDf2pL3UiA==", "requires": { "cliui": "^7.0.2", "escalade": "^3.1.1", @@ -3592,9 +3557,9 @@ } }, "yargs-parser": { - "version": "21.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.0.tgz", - "integrity": "sha512-z9kApYUOCwoeZ78rfRYYWdiU/iNL6mwwYlkkZfJoyMR1xps+NEBX5X7XmRpxkZHhXJ6+Ey00IwKxBBSW9FIjyA==" + "version": "21.0.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.1.tgz", + "integrity": "sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg==" } } } diff --git a/package.json b/package.json index 9b7a509..8dbc31b 100644 --- a/package.json +++ b/package.json @@ -33,17 +33,17 @@ "@gi-types/shell0": "^0.1.0", "@gi-types/st1": "^1.0.0", "@types/glob": "^7.2.0", - "@types/node": "^17.0.10", - "@types/yargs": "^17.0.8", - "@typescript-eslint/eslint-plugin": "^5.10.0", - "@typescript-eslint/parser": "^5.10.0", - "eslint": "^8.7.0" + "@types/node": "^17.0.23", + "@types/yargs": "^17.0.10", + "@typescript-eslint/eslint-plugin": "^5.18.0", + "@typescript-eslint/parser": "^5.18.0", + "eslint": "^8.12.0" }, "dependencies": { "fs": "0.0.1-security", "glob": "^7.2.0", "path": "^0.12.7", - "typescript": "^4.5.5", - "yargs": "^17.3.1" + "typescript": "^4.6.3", + "yargs": "^17.4.0" } } From fd1a20eef0579eda0a86fe100b651aba59a6e332 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sun, 17 Apr 2022 19:23:20 +0530 Subject: [PATCH 120/155] arrow: add class for arrow icon animation --- extension/src/animations/arrow.ts | 99 +++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 extension/src/animations/arrow.ts diff --git a/extension/src/animations/arrow.ts b/extension/src/animations/arrow.ts new file mode 100644 index 0000000..a9dbca2 --- /dev/null +++ b/extension/src/animations/arrow.ts @@ -0,0 +1,99 @@ +// import GObject from '@gi-types/gobject2'; +import Gio from '@gi-types/gio2'; +import Clutter from '@gi-types/clutter8'; +import St from '@gi-types/st1'; + +import { imports } from 'gnome-shell'; +import { registerClass } from '../../common/utils/gobject'; +import { easeActor } from '../utils/environment'; + +const ExtMe = imports.misc.extensionUtils.getCurrentExtension(); +const Util = imports.misc.util; + +declare type IconList = 'arrow1-right-symbolic.svg' | 'arrow1-left-symbolic.svg'; + +const Circle = registerClass( + class GIE_Circle extends St.Widget { + constructor(style_class: string) { + style_class = `gie-circle ${style_class}`; + super({ style_class }); + this.set_pivot_point(0.5, 0.5); + } + }, +); + +export const ArrowIconAnimation = registerClass( + class GIE_ArrowIcon extends St.Widget { + private _inner_circle: typeof Circle.prototype; + private _outer_circle: typeof Circle.prototype; + private _arrow_icon: St.Icon; + private _transition?: { arrow: { from: number; end: number; }; outer_circle: { from: number; end: number; }; }; + + constructor() { + super(); + + this._inner_circle = new Circle('gie-inner-circle'); + this._outer_circle = new Circle('gie-outer-circle'); + this._arrow_icon = new St.Icon({ style_class: 'gie-arrow-icon' }); + + this._inner_circle.set_clip_to_allocation(true); + this._inner_circle.add_child(this._arrow_icon); + + this.add_child(this._outer_circle); + this.add_child(this._inner_circle); + } + + gestureBegin(icon_name: IconList, from_left: boolean) { + this._transition = { + arrow: { + from: this._inner_circle.width * (from_left ? -1 : 1), + end: 0, + }, + outer_circle: { + from: 1, + end: 2, + }, + }; + + this._arrow_icon.translation_x = this._transition.arrow.from; + this._outer_circle.scale_x = this._transition.outer_circle.from; + this._outer_circle.scale_y = this._outer_circle.scale_x; + this._arrow_icon.opacity = 255; + this._arrow_icon.set_gicon(Gio.Icon.new_for_string(`${ExtMe.dir.get_uri()}/assets/${icon_name}`)); + } + + gestureUpdate(progress: number) { + if (this._transition === undefined) return; + + this._arrow_icon.translation_x = Util.lerp(this._transition.arrow.from, this._transition.arrow.end, progress); + this._outer_circle.scale_x = Util.lerp(this._transition.outer_circle.from, this._transition.outer_circle.end, progress); + this._outer_circle.scale_y = this._outer_circle.scale_x; + } + + gestureEnd(duration: number, progress: number, callback: () => void) { + if (this._transition === undefined) return; + + const translation_x = Util.lerp(this._transition.arrow.from, this._transition.arrow.end, progress); + easeActor(this._arrow_icon, { + translation_x, + duration, + mode: Clutter.AnimationMode.EASE_OUT_EXPO, + onStopped: () => { + callback(); + this._arrow_icon.opacity = 0; + this._arrow_icon.translation_x = 0; + this._outer_circle.scale_x = 1; + this._outer_circle.scale_y = 1; + }, + }); + + const scale = Util.lerp(this._transition.outer_circle.from, this._transition.outer_circle.end, progress); + easeActor(this._outer_circle, { + scale_x: scale, + scale_y: scale, + duration, + mode: Clutter.AnimationMode.EASE_OUT_EXPO, + }); + } + }, +); \ No newline at end of file From 124fd5b79289c3a887783387269c9432c47da845 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Sun, 17 Apr 2022 19:28:22 +0530 Subject: [PATCH 121/155] gesture: Add new gesture to go forward or backward in application --- Makefile | 2 +- extension/assets/arrow1-left-symbolic.svg | 407 +++++++++++++++++++++ extension/assets/arrow1-right-symbolic.svg | 407 +++++++++++++++++++++ extension/src/forwardBack.ts | 144 ++++++++ extension/src/utils/keyboard.ts | 28 ++ extension/stylesheet.css | 22 ++ gnome-shell/global.d.ts | 2 +- 7 files changed, 1010 insertions(+), 2 deletions(-) create mode 100644 extension/assets/arrow1-left-symbolic.svg create mode 100644 extension/assets/arrow1-right-symbolic.svg create mode 100644 extension/src/forwardBack.ts create mode 100644 extension/src/utils/keyboard.ts diff --git a/Makefile b/Makefile index 198903b..0b48e0d 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ endif pack: cp metadata.json $(EXTENSIONDIR) - cp -r extension/stylesheet.css extension/ui extension/schemas $(EXTENSIONDIR) + cp -r extension/assets/ extension/stylesheet.css extension/ui extension/schemas $(EXTENSIONDIR) glib-compile-schemas ${EXTENSIONDIR}/schemas rm -f ${ZIPPATH} cd ${EXTENSIONDIR} && zip -r ${ZIPPATH} . diff --git a/extension/assets/arrow1-left-symbolic.svg b/extension/assets/arrow1-left-symbolic.svg new file mode 100644 index 0000000..39eb56d --- /dev/null +++ b/extension/assets/arrow1-left-symbolic.svg @@ -0,0 +1,407 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/extension/assets/arrow1-right-symbolic.svg b/extension/assets/arrow1-right-symbolic.svg new file mode 100644 index 0000000..31973b1 --- /dev/null +++ b/extension/assets/arrow1-right-symbolic.svg @@ -0,0 +1,407 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/extension/src/forwardBack.ts b/extension/src/forwardBack.ts new file mode 100644 index 0000000..7078cae --- /dev/null +++ b/extension/src/forwardBack.ts @@ -0,0 +1,144 @@ +import Clutter from '@gi-types/clutter8'; +import Shell from '@gi-types/shell0'; +import Meta from '@gi-types/meta8'; + +import { imports, global } from 'gnome-shell'; + +import { ExtSettings } from '../constants'; +import { ArrowIconAnimation } from './animations/arrow'; +import { createSwipeTracker } from './swipeTracker'; +import { getVirtualKeyboard, IVirtualKeyboard } from './utils/keyboard'; + +const Main = imports.ui.main; +declare type SwipeTrackerT = imports.ui.swipeTracker.SwipeTracker; + +// declare enum +enum AnimationState { + WAITING = 0, // waiting to cross threshold + DEFAULT = WAITING, + LEFT = -1, + RIGHT = 1, +} + +const SnapPointThreshold = 0.1; + +export class ForwardBackGestureExtension implements ISubExtension { + private _connectHandlers: number[]; + private _swipeTracker: SwipeTrackerT; + private _keyboard: IVirtualKeyboard; + private _arrowIconAnimation: typeof ArrowIconAnimation.prototype; + private _animationState = AnimationState.WAITING; + + constructor() { + this._keyboard = getVirtualKeyboard(); + + this._swipeTracker = createSwipeTracker( + global.stage, + ExtSettings.DEFAULT_SESSION_WORKSPACE_GESTURE ? [4] : [3], + Shell.ActionMode.NORMAL, + Clutter.Orientation.HORIZONTAL, + false, + 1, + { allowTouch: false }, + ); + + this._connectHandlers = [ + this._swipeTracker.connect('begin', this._gestureBegin.bind(this)), + this._swipeTracker.connect('update', this._gestureUpdate.bind(this)), + this._swipeTracker.connect('end', this._gestureEnd.bind(this)), + ]; + + this._arrowIconAnimation = new ArrowIconAnimation(); + this._arrowIconAnimation.hide(); + Main.layoutManager.uiGroup.add_child(this._arrowIconAnimation); + } + + destroy(): void { + this._connectHandlers.forEach(handle => this._swipeTracker.disconnect(handle)); + this._connectHandlers = []; + this._swipeTracker.destroy(); + this._arrowIconAnimation.destroy(); + } + + + _gestureBegin(tracker: SwipeTrackerT): void { + this._animationState = AnimationState.WAITING; + tracker.confirmSwipe( + global.screen_width, + [AnimationState.LEFT, AnimationState.DEFAULT, AnimationState.RIGHT], + AnimationState.DEFAULT, + AnimationState.DEFAULT, + ); + } + + _gestureUpdate(_tracker: SwipeTrackerT, progress: number): void { + switch (this._animationState) { + case AnimationState.WAITING: + if (Math.abs(progress - AnimationState.DEFAULT) < SnapPointThreshold) return; + this._showArrow(progress); + break; + case AnimationState.RIGHT: + progress = (progress - SnapPointThreshold) / (AnimationState.RIGHT - SnapPointThreshold); + this._arrowIconAnimation.gestureUpdate(Math.clamp(progress, 0, 1)); + break; + case AnimationState.LEFT: + progress = (progress + SnapPointThreshold) / (AnimationState.LEFT + SnapPointThreshold); + this._arrowIconAnimation.gestureUpdate(Math.clamp(progress, 0, 1)); + } + } + + _gestureEnd(_tracker: SwipeTrackerT, duration: number, progress: AnimationState): void { + if (this._animationState === AnimationState.WAITING) { + if (progress === AnimationState.DEFAULT) return; + this._showArrow(progress); + } + + switch (this._animationState) { + case AnimationState.RIGHT: + progress = (progress - SnapPointThreshold) / (AnimationState.RIGHT - SnapPointThreshold); + progress = Math.clamp(progress, 0, 1); + this._arrowIconAnimation.gestureEnd(duration, progress, () => { + if (progress !== 0) { + // bring left page to right + this._keyboard.sendKeys(Clutter.KEY_Back); + } + this._arrowIconAnimation.hide(); + }); + break; + case AnimationState.LEFT: + progress = (progress + SnapPointThreshold) / (AnimationState.LEFT + SnapPointThreshold); + progress = Math.clamp(progress, 0, 1); + this._arrowIconAnimation.gestureEnd(duration, progress, () => { + if (progress !== 0) { + // bring right page to left + this._keyboard.sendKeys(Clutter.KEY_Forward); + } + this._arrowIconAnimation.hide(); + }); + } + } + + _showArrow(progress: number) { + const [height, width] = [this._arrowIconAnimation.height, this._arrowIconAnimation.width]; + const workArea = this._getWorkArea(); + if (progress > AnimationState.DEFAULT) { + this._animationState = AnimationState.RIGHT; + this._arrowIconAnimation.gestureBegin('arrow1-left-symbolic.svg', true); + this._arrowIconAnimation.set_position(workArea.x + width, workArea.y + Math.round((workArea.height - height) / 2)); + } + else { + this._animationState = AnimationState.LEFT; + this._arrowIconAnimation.gestureBegin('arrow1-right-symbolic.svg', false); + this._arrowIconAnimation.set_position(workArea.x + workArea.width - 2 * width, workArea.y + Math.round((workArea.height - height) / 2)); + } + + this._arrowIconAnimation.show(); + } + + _getWorkArea() { + const window = global.display.get_focus_window() as Meta.Window | null; + if (window) + return window.get_frame_rect(); + return Main.layoutManager.getWorkAreaForMonitor(Main.layoutManager.currentMonitor.index); + } +} \ No newline at end of file diff --git a/extension/src/utils/keyboard.ts b/extension/src/utils/keyboard.ts new file mode 100644 index 0000000..3b4111e --- /dev/null +++ b/extension/src/utils/keyboard.ts @@ -0,0 +1,28 @@ +import Clutter from '@gi-types/clutter8'; + +class VirtualKeyboard { + private _virtualDevice: Clutter.VirtualInputDevice; + + constructor() { + const seat = Clutter.get_default_backend().get_default_seat(); + this._virtualDevice = seat.create_virtual_device(Clutter.InputDeviceType.KEYBOARD_DEVICE); + } + + sendKeys(...keys: number[]) { + const currentTime = Clutter.get_current_event_time(); + keys.forEach(key => this._virtualDevice.notify_keyval(currentTime, key, Clutter.KeyState.PRESSED)); + keys.reverse().forEach(key => this._virtualDevice.notify_keyval(currentTime, key, Clutter.KeyState.RELEASED)); + } +} + +export type IVirtualKeyboard = VirtualKeyboard; + +let _keyboard: VirtualKeyboard | undefined; +export function getVirtualKeyboard() { + _keyboard = _keyboard ?? new VirtualKeyboard(); + return _keyboard; +} + +export function extensionCleanup() { + _keyboard = undefined; +} \ No newline at end of file diff --git a/extension/stylesheet.css b/extension/stylesheet.css index 423d7d9..044e9cc 100644 --- a/extension/stylesheet.css +++ b/extension/stylesheet.css @@ -2,4 +2,26 @@ .gie-alttab-quick-transition .switcher-list, .gie-alttab-quick-transition .item-box { transition-duration: 0ms; +} +.gie-circle { + width: 50px; + height: 50px; + border-radius: 50px; +} + +.gie-inner-circle { + border: solid 2px #396bd7; + color: #396bd7; + background-color: #ffffff; +} + +.gie-arrow-icon { + color: #396bd7; + margin: 10px 10px; /* (50+2 - 32)/2 */ + icon-size: 32px, +} + +.gie-outer-circle { + background-color: rgba(68, 120, 175, 0.5); + border: solid 2px; } \ No newline at end of file diff --git a/gnome-shell/global.d.ts b/gnome-shell/global.d.ts index 9e633bd..637ed05 100644 --- a/gnome-shell/global.d.ts +++ b/gnome-shell/global.d.ts @@ -8,7 +8,7 @@ declare interface IExtension { } declare interface ISubExtension { - apply(): void, + apply?(): void, destroy(): void; } From 6608e3cda393504017a0a1beddd5ac6ddfd9bd6f Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 17 Apr 2022 23:26:07 +0530 Subject: [PATCH 122/155] forwardBack: Send different keyboard keys for different application --- .vscode/settings.json | 11 +++++ Makefile | 2 +- extension/common/settings.ts | 29 ++++++++++- extension/extension.ts | 9 +++- ...extensions.gestureImprovements.gschema.xml | 30 +++++++++++- extension/src/forwardBack.ts | 48 +++++++++++++++++-- extension/src/snapWindow.ts | 10 ++-- extension/src/utils/keyboard.ts | 48 +++++++++++++++++-- 8 files changed, 168 insertions(+), 19 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..dd78be9 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,11 @@ +{ + "files.exclude": { + "**/.git": true, + "**/.svn": true, + "**/.hg": true, + "**/CVS": true, + "**/.DS_Store": true, + "**/Thumbs.db": true, + "node_modules": true, + }, +} \ No newline at end of file diff --git a/Makefile b/Makefile index 0b48e0d..66d253d 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ endif pack: cp metadata.json $(EXTENSIONDIR) cp -r extension/assets/ extension/stylesheet.css extension/ui extension/schemas $(EXTENSIONDIR) - glib-compile-schemas ${EXTENSIONDIR}/schemas + glib-compile-schemas --strict ${EXTENSIONDIR}/schemas rm -f ${ZIPPATH} cd ${EXTENSIONDIR} && zip -r ${ZIPPATH} . diff --git a/extension/common/settings.ts b/extension/common/settings.ts index 3a5c436..8d81cba 100644 --- a/extension/common/settings.ts +++ b/extension/common/settings.ts @@ -1,4 +1,5 @@ import Gio from '@gi-types/gio2'; +import GLib from '@gi-types/glib2'; // define enum export enum PinchGestureType { @@ -6,12 +7,22 @@ export enum PinchGestureType { SHOW_DESKTOP = 1, } +export enum ForwardBackKeyBinds { + DEFAULT = 0, + FORWARD_BACK = 1, + PAGE_UP_DOWN = 2, + RIGHT_LEFT = 3, + AUDIO_NEXT_PREV = 4, + TAB_NEXT_PREV = 5, +} + export type BooleanSettingsKeys = 'default-session-workspace' | 'default-overview' | 'allow-minimize-window' | 'follow-natural-scroll' | 'enable-alttab-gesture' | + 'enable-forward-back-gesture' | 'enable-window-manipulation-gesture' | 'default-overview-gesture-direction' ; @@ -29,12 +40,16 @@ export type EnumSettingsKeys = 'pinch-4-finger-gesture' ; +export type MiscSettingsKeys = + 'forward-back-application-keyboard-shortcuts' + ; export type AllSettingsKeys = BooleanSettingsKeys | IntegerSettingsKeys | DoubleSettingsKeys | - EnumSettingsKeys + EnumSettingsKeys | + MiscSettingsKeys ; export type AllUIObjectKeys = @@ -54,6 +69,15 @@ type SettingsEnumFunctions = Enum_Functions<'pinch-3-finger-gesture' | 'pinch-4-finger-gesture', PinchGestureType> ; +type Misc_Functions = { + get_value(key: K): GLib.Variant; + set_value(key: K, value: GLib.Variant): void; +} + +type SettingsMiscFunctions = + Misc_Functions<'forward-back-application-keyboard-shortcuts', 'a{s(ib)}'> + ; + export type GioSettings = Omit> & { @@ -62,5 +86,6 @@ export type GioSettings = get_double(key: DoubleSettingsKeys): number; set_double(key: DoubleSettingsKeys, value: number): void; } & - SettingsEnumFunctions + SettingsEnumFunctions & + SettingsMiscFunctions ; diff --git a/extension/extension.ts b/extension/extension.ts index a57ae29..6b07624 100644 --- a/extension/extension.ts +++ b/extension/extension.ts @@ -4,11 +4,13 @@ import { AllSettingsKeys, GioSettings, PinchGestureType } from './common/setting import * as Constants from './constants'; import { AltTabConstants, ExtSettings, TouchpadConstants } from './constants'; import { AltTabGestureExtension } from './src/altTab'; +import { ForwardBackGestureExtension } from './src/forwardBack'; import { GestureExtension } from './src/gestures'; import { OverviewRoundTripGestureExtension } from './src/overviewRoundTrip'; import { ShowDesktopExtension } from './src/pinchGestures/showDesktop'; import { SnapWindowExtension } from './src/snapWindow'; import * as DBusUtils from './src/utils/dbus'; +import * as VKeyboard from './src/utils/keyboard'; const ExtensionUtils = imports.misc.extensionUtils; @@ -74,6 +76,10 @@ class Extension { if (this.settings.get_boolean('enable-alttab-gesture')) this._extensions.push(new AltTabGestureExtension()); + else if (this.settings.get_boolean('enable-forward-back-gesture')) { + const appForwardBackKeyBinds = this.settings.get_value('forward-back-application-keyboard-shortcuts').deepUnpack(); + this._extensions.push(new ForwardBackGestureExtension(appForwardBackKeyBinds)); + } this._extensions.push( new OverviewRoundTripGestureExtension(), @@ -92,10 +98,11 @@ class Extension { if (showDesktopFingers.length) this._extensions.push(new ShowDesktopExtension(showDesktopFingers)); - this._extensions.forEach(extension => extension.apply()); + this._extensions.forEach(extension => extension.apply?.()); } _disable() { + VKeyboard.extensionCleanup(); DBusUtils.unsubscribeAll(); this._extensions.reverse().forEach(extension => extension.destroy()); this._extensions = []; diff --git a/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml b/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml index 43c8a1a..8f038c0 100644 --- a/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml +++ b/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml @@ -5,7 +5,7 @@ - + 1.0 @@ -39,6 +39,10 @@ true Enable alttab gesture + + false + Enable forward/back keybinding gesture + true Enable Window manipulation gesture @@ -51,5 +55,29 @@ 'SHOW_DESKTOP' Gesture for 4 finger pinch + + + + { + 'firefox.desktop': (1, false), + 'org.chromium.Chromium.desktop': (1, false), + 'org.gnome.eog.desktop': (3, false), + 'org.gnome.gThumb.desktop': (2, false), + 'com.spotify.Client.desktop': (4, false), + 'code-insiders.desktop': (5, false), + 'org.gnome.Terminal.desktop': (5, false), + 'org.gnome.TextEditor.desktop': (5, false) + } + + Application keyboard shortcuts for forward-back gesture + \ No newline at end of file diff --git a/extension/src/forwardBack.ts b/extension/src/forwardBack.ts index 7078cae..b3b30bb 100644 --- a/extension/src/forwardBack.ts +++ b/extension/src/forwardBack.ts @@ -8,6 +8,7 @@ import { ExtSettings } from '../constants'; import { ArrowIconAnimation } from './animations/arrow'; import { createSwipeTracker } from './swipeTracker'; import { getVirtualKeyboard, IVirtualKeyboard } from './utils/keyboard'; +import { ForwardBackKeyBinds } from '../common/settings'; const Main = imports.ui.main; declare type SwipeTrackerT = imports.ui.swipeTracker.SwipeTracker; @@ -20,16 +21,28 @@ enum AnimationState { RIGHT = 1, } +// declare enum +enum SwipeGestureDirection { + LeftToRight = 1, + RightToLeft = 2, +} + const SnapPointThreshold = 0.1; +type AppForwardBackKeyBinds = Record; + export class ForwardBackGestureExtension implements ISubExtension { private _connectHandlers: number[]; private _swipeTracker: SwipeTrackerT; private _keyboard: IVirtualKeyboard; private _arrowIconAnimation: typeof ArrowIconAnimation.prototype; private _animationState = AnimationState.WAITING; + private _appForwardBackKeyBinds: AppForwardBackKeyBinds; + private _windowTracker: Shell.WindowTracker; - constructor() { + constructor(appForwardBackKeyBinds: AppForwardBackKeyBinds) { + this._appForwardBackKeyBinds = appForwardBackKeyBinds; + this._windowTracker = Shell.WindowTracker.get_default(); this._keyboard = getVirtualKeyboard(); this._swipeTracker = createSwipeTracker( @@ -100,7 +113,8 @@ export class ForwardBackGestureExtension implements ISubExtension { this._arrowIconAnimation.gestureEnd(duration, progress, () => { if (progress !== 0) { // bring left page to right - this._keyboard.sendKeys(Clutter.KEY_Back); + const keys = this._getClutterKeyForFocusedApp(SwipeGestureDirection.LeftToRight); + this._keyboard.sendKeys(keys); } this._arrowIconAnimation.hide(); }); @@ -111,7 +125,8 @@ export class ForwardBackGestureExtension implements ISubExtension { this._arrowIconAnimation.gestureEnd(duration, progress, () => { if (progress !== 0) { // bring right page to left - this._keyboard.sendKeys(Clutter.KEY_Forward); + const keys = this._getClutterKeyForFocusedApp(SwipeGestureDirection.RightToLeft); + this._keyboard.sendKeys(keys); } this._arrowIconAnimation.hide(); }); @@ -141,4 +156,31 @@ export class ForwardBackGestureExtension implements ISubExtension { return window.get_frame_rect(); return Main.layoutManager.getWorkAreaForMonitor(Main.layoutManager.currentMonitor.index); } + + /** + * @param gestureDirection direction of swipe gesture left to right or right to left + */ + _getClutterKeyForFocusedApp(gestureDirection: SwipeGestureDirection) { + const focusApp = this._windowTracker.focus_app as Shell.App | null; + const keyBind = focusApp ? this._appForwardBackKeyBinds[focusApp.get_id()] : null; + + if (keyBind) { + // if keyBind[1] is true => reverse order or keys + const returnBackKey = (gestureDirection === SwipeGestureDirection.LeftToRight) !== keyBind[1]; + switch (keyBind[0]) { + case ForwardBackKeyBinds.FORWARD_BACK: + return [returnBackKey ? Clutter.KEY_Back : Clutter.KEY_Forward]; + case ForwardBackKeyBinds.PAGE_UP_DOWN: + return [returnBackKey ? Clutter.KEY_Page_Up : Clutter.KEY_Page_Down]; + case ForwardBackKeyBinds.RIGHT_LEFT: + return [returnBackKey ? Clutter.KEY_Left : Clutter.KEY_Right]; + case ForwardBackKeyBinds.AUDIO_NEXT_PREV: + return [returnBackKey ? Clutter.KEY_AudioPrev : Clutter.KEY_AudioNext]; + case ForwardBackKeyBinds.TAB_NEXT_PREV: + return [Clutter.KEY_Control_L, returnBackKey ? Clutter.KEY_Page_Up: Clutter.KEY_Page_Down]; + } + } + // default key bind + return [gestureDirection === SwipeGestureDirection.LeftToRight ? Clutter.KEY_Back : Clutter.KEY_Forward]; + } } \ No newline at end of file diff --git a/extension/src/snapWindow.ts b/extension/src/snapWindow.ts index 342ae5c..700c523 100644 --- a/extension/src/snapWindow.ts +++ b/extension/src/snapWindow.ts @@ -7,6 +7,7 @@ import { registerClass } from '../common/utils/gobject'; import { ExtSettings } from '../constants'; import { createSwipeTracker, TouchpadSwipeGesture } from './swipeTracker'; import { easeActor, easeAdjustment } from './utils/environment'; +import { getVirtualKeyboard, IVirtualKeyboard } from './utils/keyboard'; const Main = imports.ui.main; @@ -44,7 +45,7 @@ const TilePreview = registerClass( private _minimizeBox?: Meta.Rectangle; private _leftSnapBox?: Meta.Rectangle; private _rightSnapBox?: Meta.Rectangle; - private _virtualDevice: Clutter.VirtualInputDevice; + private _virtualDevice: IVirtualKeyboard; private _fullscreenBox?: Meta.Rectangle; constructor() { @@ -64,8 +65,7 @@ const TilePreview = registerClass( }); this._adjustment.connect('notify::value', this._valueChanged.bind(this)); - const seat = Clutter.get_default_backend().get_default_seat(); - this._virtualDevice = seat.create_virtual_device(Clutter.InputDeviceType.KEYBOARD_DEVICE); + this._virtualDevice = getVirtualKeyboard(); } open(window: Meta.Window, currentProgress: GestureMaxUnMaxState): boolean { @@ -134,10 +134,8 @@ const TilePreview = registerClass( // snap-left,normal,snap-right else { if (state !== GestureTileState.NORMAL) { - const currentTime = Clutter.get_current_event_time(); const keys = [Clutter.KEY_Super_L, (state === GestureTileState.LEFT_TILE ? Clutter.KEY_Left : Clutter.KEY_Right)]; - keys.forEach(key => this._virtualDevice.notify_keyval(currentTime, key, Clutter.KeyState.PRESSED)); - keys.reverse().forEach(key => this._virtualDevice.notify_keyval(currentTime, key, Clutter.KeyState.RELEASED)); + this._virtualDevice.sendKeys(keys); } } } diff --git a/extension/src/utils/keyboard.ts b/extension/src/utils/keyboard.ts index 3b4111e..2bcf28c 100644 --- a/extension/src/utils/keyboard.ts +++ b/extension/src/utils/keyboard.ts @@ -1,17 +1,53 @@ import Clutter from '@gi-types/clutter8'; +import GLib from '@gi-types/glib2'; + +const DELAY_BETWEEN_KEY_PRESS = 10; // ms +const timeoutIds = new Set(); class VirtualKeyboard { private _virtualDevice: Clutter.VirtualInputDevice; - + constructor() { const seat = Clutter.get_default_backend().get_default_seat(); this._virtualDevice = seat.create_virtual_device(Clutter.InputDeviceType.KEYBOARD_DEVICE); } - sendKeys(...keys: number[]) { - const currentTime = Clutter.get_current_event_time(); - keys.forEach(key => this._virtualDevice.notify_keyval(currentTime, key, Clutter.KeyState.PRESSED)); - keys.reverse().forEach(key => this._virtualDevice.notify_keyval(currentTime, key, Clutter.KeyState.RELEASED)); + sendKeys(keys: number[]) { + log(`sending keys: ${keys}`); + + // keyEvents are stored in revere order so first event can be just popped + const keyEvents: [number, Clutter.KeyState][] = []; + keys.forEach(key => keyEvents.push([key, Clutter.KeyState.RELEASED])); + keys.reverse().forEach(key => keyEvents.push([key, Clutter.KeyState.PRESSED])); + + let timeoutId = GLib.timeout_add( + GLib.PRIORITY_DEFAULT, + DELAY_BETWEEN_KEY_PRESS, + () => { + const keyEvent = keyEvents.pop(); + if (keyEvent !== undefined) + this._sendKey(...keyEvent); + + if (keyEvents.length === 0) { + timeoutIds.delete(timeoutId); + timeoutId = 0; + return GLib.SOURCE_REMOVE; + } + + return GLib.SOURCE_CONTINUE; + }, + ); + + if (timeoutId) + timeoutIds.add(timeoutId); + } + + private _sendKey(keyval: number, keyState: Clutter.KeyState) { + this._virtualDevice.notify_keyval( + Clutter.get_current_event_time() * 1000, + keyval, + keyState, + ); } } @@ -24,5 +60,7 @@ export function getVirtualKeyboard() { } export function extensionCleanup() { + timeoutIds.forEach(id => GLib.Source.remove(id)); + timeoutIds.clear(); _keyboard = undefined; } \ No newline at end of file From 049026d9fcb074b9f63b58b65636af36ad469d9c Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 17 Apr 2022 23:55:28 +0530 Subject: [PATCH 123/155] bindings: Add script to generate typescript bindings for Adw --- .eslintrc.json | 6 +- @types/adw1/doc.json | 13 + @types/adw1/index.d.ts | 3642 +++++++++++++++++++++++++++++++ package-lock.json | 1168 +++++++++- package.json | 7 + scripts/generate-gi-bindings.sh | 14 + tsconfig.json | 114 +- 7 files changed, 4876 insertions(+), 88 deletions(-) create mode 100644 @types/adw1/doc.json create mode 100644 @types/adw1/index.d.ts create mode 100644 scripts/generate-gi-bindings.sh diff --git a/.eslintrc.json b/.eslintrc.json index b5cefed..aefde47 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -47,7 +47,6 @@ "argsIgnorePattern": "^_" } ], - "no-console": "error", "no-empty": "error", "no-mixed-spaces-and-tabs": "error", "comma-dangle": [ @@ -114,10 +113,7 @@ }, "files": [ "scripts/**/*.ts" - ], - "rules": { - "no-console": "off" - } + ] } ] } \ No newline at end of file diff --git a/@types/adw1/doc.json b/@types/adw1/doc.json new file mode 100644 index 0000000..093cf22 --- /dev/null +++ b/@types/adw1/doc.json @@ -0,0 +1,13 @@ +{ + "name": "Adw", + "api_version": "1", + "package_version": "1.1.0", + "imports": { + "Gtk": "4.0", + "GObject": "2.0", + "Gio": "2.0", + "GLib": "2.0", + "Gdk": "4.0", + "Gsk": "4.0" + } +} \ No newline at end of file diff --git a/@types/adw1/index.d.ts b/@types/adw1/index.d.ts new file mode 100644 index 0000000..0db92ae --- /dev/null +++ b/@types/adw1/index.d.ts @@ -0,0 +1,3642 @@ +/** + * Adw 1 + * + * Generated from 1.1.0 + */ + +import * as Gtk from "@gi-types/gtk4"; +import * as GObject from "@gi-types/gobject2"; +import * as Gio from "@gi-types/gio2"; +import * as GLib from "@gi-types/glib2"; +import * as Gdk from "@gi-types/gdk4"; +import * as Gsk from "@gi-types/gsk4"; + +export const DURATION_INFINITE: number; +export const MAJOR_VERSION: number; +export const MICRO_VERSION: number; +export const MINOR_VERSION: number; +export const VERSION_S: string; +export function easing_ease(self: Easing, value: number): number; +export function get_enable_animations(widget: Gtk.Widget): boolean; +export function get_major_version(): number; +export function get_micro_version(): number; +export function get_minor_version(): number; +export function init(): void; +export function is_initialized(): boolean; +export function lerp(a: number, b: number, t: number): number; +export type AnimationTargetFunc = (value: number) => void; + +export namespace AnimationState { + export const $gtype: GObject.GType; +} + +export enum AnimationState { + IDLE = 0, + PAUSED = 1, + PLAYING = 2, + FINISHED = 3, +} + +export namespace CenteringPolicy { + export const $gtype: GObject.GType; +} + +export enum CenteringPolicy { + LOOSE = 0, + STRICT = 1, +} + +export namespace ColorScheme { + export const $gtype: GObject.GType; +} + +export enum ColorScheme { + DEFAULT = 0, + FORCE_LIGHT = 1, + PREFER_LIGHT = 2, + PREFER_DARK = 3, + FORCE_DARK = 4, +} + +export namespace Easing { + export const $gtype: GObject.GType; +} + +export enum Easing { + LINEAR = 0, + EASE_IN_QUAD = 1, + EASE_OUT_QUAD = 2, + EASE_IN_OUT_QUAD = 3, + EASE_IN_CUBIC = 4, + EASE_OUT_CUBIC = 5, + EASE_IN_OUT_CUBIC = 6, + EASE_IN_QUART = 7, + EASE_OUT_QUART = 8, + EASE_IN_OUT_QUART = 9, + EASE_IN_QUINT = 10, + EASE_OUT_QUINT = 11, + EASE_IN_OUT_QUINT = 12, + EASE_IN_SINE = 13, + EASE_OUT_SINE = 14, + EASE_IN_OUT_SINE = 15, + EASE_IN_EXPO = 16, + EASE_OUT_EXPO = 17, + EASE_IN_OUT_EXPO = 18, + EASE_IN_CIRC = 19, + EASE_OUT_CIRC = 20, + EASE_IN_OUT_CIRC = 21, + EASE_IN_ELASTIC = 22, + EASE_OUT_ELASTIC = 23, + EASE_IN_OUT_ELASTIC = 24, + EASE_IN_BACK = 25, + EASE_OUT_BACK = 26, + EASE_IN_OUT_BACK = 27, + EASE_IN_BOUNCE = 28, + EASE_OUT_BOUNCE = 29, + EASE_IN_OUT_BOUNCE = 30, +} + +export namespace FlapFoldPolicy { + export const $gtype: GObject.GType; +} + +export enum FlapFoldPolicy { + NEVER = 0, + ALWAYS = 1, + AUTO = 2, +} + +export namespace FlapTransitionType { + export const $gtype: GObject.GType; +} + +export enum FlapTransitionType { + OVER = 0, + UNDER = 1, + SLIDE = 2, +} + +export namespace FoldThresholdPolicy { + export const $gtype: GObject.GType; +} + +export enum FoldThresholdPolicy { + MINIMUM = 0, + NATURAL = 1, +} + +export namespace LeafletTransitionType { + export const $gtype: GObject.GType; +} + +export enum LeafletTransitionType { + OVER = 0, + UNDER = 1, + SLIDE = 2, +} + +export namespace NavigationDirection { + export const $gtype: GObject.GType; +} + +export enum NavigationDirection { + BACK = 0, + FORWARD = 1, +} + +export namespace SqueezerTransitionType { + export const $gtype: GObject.GType; +} + +export enum SqueezerTransitionType { + NONE = 0, + CROSSFADE = 1, +} + +export namespace ToastPriority { + export const $gtype: GObject.GType; +} + +export enum ToastPriority { + NORMAL = 0, + HIGH = 1, +} + +export namespace ViewSwitcherPolicy { + export const $gtype: GObject.GType; +} + +export enum ViewSwitcherPolicy { + NARROW = 0, + WIDE = 1, +} +export module ActionRow { + export interface ConstructorProperties extends PreferencesRow.ConstructorProperties { + [key: string]: any; + activatable_widget: Gtk.Widget; + activatableWidget: Gtk.Widget; + icon_name: string; + iconName: string; + subtitle: string; + subtitle_lines: number; + subtitleLines: number; + title_lines: number; + titleLines: number; + } +} +export class ActionRow + extends PreferencesRow + implements Gtk.Accessible, Gtk.Actionable, Gtk.Buildable, Gtk.ConstraintTarget +{ + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get activatable_widget(): Gtk.Widget; + set activatable_widget(val: Gtk.Widget); + get activatableWidget(): Gtk.Widget; + set activatableWidget(val: Gtk.Widget); + get icon_name(): string; + set icon_name(val: string); + get iconName(): string; + set iconName(val: string); + get subtitle(): string; + set subtitle(val: string); + get subtitle_lines(): number; + set subtitle_lines(val: number); + get subtitleLines(): number; + set subtitleLines(val: number); + get title_lines(): number; + set title_lines(val: number); + get titleLines(): number; + set titleLines(val: number); + + // Signals + + connect(id: string, callback: (...args: any[]) => any): number; + connect_after(id: string, callback: (...args: any[]) => any): number; + emit(id: string, ...args: any[]): void; + connect(signal: "activated", callback: (_source: this) => void): number; + connect_after(signal: "activated", callback: (_source: this) => void): number; + emit(signal: "activated"): void; + + // Constructors + + static ["new"](): ActionRow; + + // Members + + activate(): void; + // Conflicted with Gtk.Widget.activate + activate(...args: never[]): any; + add_prefix(widget: Gtk.Widget): void; + add_suffix(widget: Gtk.Widget): void; + get_activatable_widget(): Gtk.Widget | null; + get_icon_name(): string | null; + get_subtitle(): string | null; + get_subtitle_lines(): number; + get_title_lines(): number; + remove(widget: Gtk.Widget): void; + set_activatable_widget(widget?: Gtk.Widget | null): void; + set_icon_name(icon_name?: string | null): void; + set_subtitle(subtitle: string): void; + set_subtitle_lines(subtitle_lines: number): void; + set_title_lines(title_lines: number): void; + vfunc_activate(): void; +} +export module Animation { + export interface ConstructorProperties extends GObject.Object.ConstructorProperties { + [key: string]: any; + state: AnimationState; + target: AnimationTarget; + value: number; + widget: Gtk.Widget; + } +} +export abstract class Animation extends GObject.Object { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get state(): AnimationState; + get target(): AnimationTarget; + set target(val: AnimationTarget); + get value(): number; + get widget(): Gtk.Widget; + + // Signals + + connect(id: string, callback: (...args: any[]) => any): number; + connect_after(id: string, callback: (...args: any[]) => any): number; + emit(id: string, ...args: any[]): void; + connect(signal: "done", callback: (_source: this) => void): number; + connect_after(signal: "done", callback: (_source: this) => void): number; + emit(signal: "done"): void; + + // Members + + get_state(): AnimationState; + get_target(): AnimationTarget; + get_value(): number; + get_widget(): Gtk.Widget; + pause(): void; + play(): void; + reset(): void; + resume(): void; + skip(): void; +} +export module AnimationTarget { + export interface ConstructorProperties extends GObject.Object.ConstructorProperties { + [key: string]: any; + } +} +export abstract class AnimationTarget extends GObject.Object { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; +} +export module Application { + export interface ConstructorProperties extends Gtk.Application.ConstructorProperties { + [key: string]: any; + style_manager: StyleManager; + styleManager: StyleManager; + } +} +export class Application extends Gtk.Application implements Gio.ActionGroup, Gio.ActionMap { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get style_manager(): StyleManager; + get styleManager(): StyleManager; + + // Constructors + + static ["new"](application_id: string | null, flags: Gio.ApplicationFlags): Application; + + // Members + + get_style_manager(): StyleManager; +} +export module ApplicationWindow { + export interface ConstructorProperties extends Gtk.ApplicationWindow.ConstructorProperties { + [key: string]: any; + content: Gtk.Widget; + } +} +export class ApplicationWindow + extends Gtk.ApplicationWindow + implements + Gio.ActionGroup, + Gio.ActionMap, + Gtk.Accessible, + Gtk.Buildable, + Gtk.ConstraintTarget, + Gtk.Native, + Gtk.Root, + Gtk.ShortcutManager +{ + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get content(): Gtk.Widget; + set content(val: Gtk.Widget); + + // Constructors + + static ["new"](app: Gtk.Application): ApplicationWindow; + // Conflicted with Gtk.Window.new + static ["new"](...args: never[]): any; + + // Members + + get_content(): Gtk.Widget | null; + set_content(content?: Gtk.Widget | null): void; + + // Implemented Members + + action_added(action_name: string): void; + action_enabled_changed(action_name: string, enabled: boolean): void; + action_removed(action_name: string): void; + action_state_changed(action_name: string, state: GLib.Variant): void; + activate_action(action_name: string, parameter?: GLib.Variant | null): void; + // Conflicted with Gtk.Widget.activate_action + activate_action(...args: never[]): any; + change_action_state(action_name: string, value: GLib.Variant): void; + get_action_enabled(action_name: string): boolean; + get_action_parameter_type(action_name: string): GLib.VariantType | null; + get_action_state(action_name: string): GLib.Variant | null; + get_action_state_hint(action_name: string): GLib.Variant | null; + get_action_state_type(action_name: string): GLib.VariantType | null; + has_action(action_name: string): boolean; + list_actions(): string[]; + query_action( + action_name: string + ): [boolean, boolean, GLib.VariantType | null, GLib.VariantType | null, GLib.Variant | null, GLib.Variant | null]; + vfunc_action_added(action_name: string): void; + vfunc_action_enabled_changed(action_name: string, enabled: boolean): void; + vfunc_action_removed(action_name: string): void; + vfunc_action_state_changed(action_name: string, state: GLib.Variant): void; + vfunc_activate_action(action_name: string, parameter?: GLib.Variant | null): void; + vfunc_change_action_state(action_name: string, value: GLib.Variant): void; + vfunc_get_action_enabled(action_name: string): boolean; + vfunc_get_action_parameter_type(action_name: string): GLib.VariantType | null; + vfunc_get_action_state(action_name: string): GLib.Variant | null; + vfunc_get_action_state_hint(action_name: string): GLib.Variant | null; + vfunc_get_action_state_type(action_name: string): GLib.VariantType | null; + vfunc_has_action(action_name: string): boolean; + vfunc_list_actions(): string[]; + vfunc_query_action( + action_name: string + ): [boolean, boolean, GLib.VariantType | null, GLib.VariantType | null, GLib.Variant | null, GLib.Variant | null]; + add_action(action: Gio.Action): void; + add_action_entries(entries: Gio.ActionEntry[], user_data?: any | null): void; + lookup_action(action_name: string): Gio.Action | null; + remove_action(action_name: string): void; + vfunc_add_action(action: Gio.Action): void; + vfunc_lookup_action(action_name: string): Gio.Action | null; + vfunc_remove_action(action_name: string): void; +} +export module Avatar { + export interface ConstructorProperties extends Gtk.Widget.ConstructorProperties { + [key: string]: any; + custom_image: Gdk.Paintable; + customImage: Gdk.Paintable; + icon_name: string; + iconName: string; + show_initials: boolean; + showInitials: boolean; + size: number; + text: string; + } +} +export class Avatar extends Gtk.Widget implements Gtk.Accessible, Gtk.Buildable, Gtk.ConstraintTarget { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get custom_image(): Gdk.Paintable; + set custom_image(val: Gdk.Paintable); + get customImage(): Gdk.Paintable; + set customImage(val: Gdk.Paintable); + get icon_name(): string; + set icon_name(val: string); + get iconName(): string; + set iconName(val: string); + get show_initials(): boolean; + set show_initials(val: boolean); + get showInitials(): boolean; + set showInitials(val: boolean); + get size(): number; + set size(val: number); + get text(): string; + set text(val: string); + + // Implemented Properties + + get accessible_role(): Gtk.AccessibleRole; + set accessible_role(val: Gtk.AccessibleRole); + get accessibleRole(): Gtk.AccessibleRole; + set accessibleRole(val: Gtk.AccessibleRole); + + // Constructors + + static ["new"](size: number, text: string | null, show_initials: boolean): Avatar; + + // Members + + draw_to_texture(scale_factor: number): Gdk.Texture; + get_custom_image(): Gdk.Paintable | null; + get_icon_name(): string | null; + get_show_initials(): boolean; + get_size(): number; + get_text(): string | null; + set_custom_image(custom_image?: Gdk.Paintable | null): void; + set_icon_name(icon_name?: string | null): void; + set_show_initials(show_initials: boolean): void; + set_size(size: number): void; + set_text(text?: string | null): void; + + // Implemented Members + + get_accessible_role(): Gtk.AccessibleRole; + reset_property(property: Gtk.AccessibleProperty): void; + reset_relation(relation: Gtk.AccessibleRelation): void; + reset_state(state: Gtk.AccessibleState): void; + update_property(properties: Gtk.AccessibleProperty[], values: GObject.Value[]): void; + update_relation(relations: Gtk.AccessibleRelation[], values: GObject.Value[]): void; + update_state(states: Gtk.AccessibleState[], values: GObject.Value[]): void; + get_buildable_id(): string | null; + vfunc_add_child(builder: Gtk.Builder, child: GObject.Object, type?: string | null): void; + vfunc_custom_finished(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_end(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_start( + builder: Gtk.Builder, + child: GObject.Object | null, + tagname: string + ): [boolean, Gtk.BuildableParser, any | null]; + vfunc_get_id(): string; + vfunc_get_internal_child(builder: Gtk.Builder, childname: string): T; + vfunc_parser_finished(builder: Gtk.Builder): void; + vfunc_set_buildable_property(builder: Gtk.Builder, name: string, value: GObject.Value | any): void; + vfunc_set_id(id: string): void; +} +export module Bin { + export interface ConstructorProperties extends Gtk.Widget.ConstructorProperties { + [key: string]: any; + child: Gtk.Widget; + } +} +export class Bin extends Gtk.Widget implements Gtk.Accessible, Gtk.Buildable, Gtk.ConstraintTarget { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get child(): Gtk.Widget; + set child(val: Gtk.Widget); + + // Implemented Properties + + get accessible_role(): Gtk.AccessibleRole; + set accessible_role(val: Gtk.AccessibleRole); + get accessibleRole(): Gtk.AccessibleRole; + set accessibleRole(val: Gtk.AccessibleRole); + + // Constructors + + static ["new"](): Bin; + + // Members + + get_child(): Gtk.Widget | null; + set_child(child?: Gtk.Widget | null): void; + + // Implemented Members + + get_accessible_role(): Gtk.AccessibleRole; + reset_property(property: Gtk.AccessibleProperty): void; + reset_relation(relation: Gtk.AccessibleRelation): void; + reset_state(state: Gtk.AccessibleState): void; + update_property(properties: Gtk.AccessibleProperty[], values: GObject.Value[]): void; + update_relation(relations: Gtk.AccessibleRelation[], values: GObject.Value[]): void; + update_state(states: Gtk.AccessibleState[], values: GObject.Value[]): void; + get_buildable_id(): string | null; + vfunc_add_child(builder: Gtk.Builder, child: GObject.Object, type?: string | null): void; + vfunc_custom_finished(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_end(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_start( + builder: Gtk.Builder, + child: GObject.Object | null, + tagname: string + ): [boolean, Gtk.BuildableParser, any | null]; + vfunc_get_id(): string; + vfunc_get_internal_child(builder: Gtk.Builder, childname: string): T; + vfunc_parser_finished(builder: Gtk.Builder): void; + vfunc_set_buildable_property(builder: Gtk.Builder, name: string, value: GObject.Value | any): void; + vfunc_set_id(id: string): void; +} +export module ButtonContent { + export interface ConstructorProperties extends Gtk.Widget.ConstructorProperties { + [key: string]: any; + icon_name: string; + iconName: string; + label: string; + use_underline: boolean; + useUnderline: boolean; + } +} +export class ButtonContent extends Gtk.Widget implements Gtk.Accessible, Gtk.Buildable, Gtk.ConstraintTarget { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get icon_name(): string; + set icon_name(val: string); + get iconName(): string; + set iconName(val: string); + get label(): string; + set label(val: string); + get use_underline(): boolean; + set use_underline(val: boolean); + get useUnderline(): boolean; + set useUnderline(val: boolean); + + // Implemented Properties + + get accessible_role(): Gtk.AccessibleRole; + set accessible_role(val: Gtk.AccessibleRole); + get accessibleRole(): Gtk.AccessibleRole; + set accessibleRole(val: Gtk.AccessibleRole); + + // Constructors + + static ["new"](): ButtonContent; + + // Members + + get_icon_name(): string; + get_label(): string; + get_use_underline(): boolean; + set_icon_name(icon_name: string): void; + set_label(label: string): void; + set_use_underline(use_underline: boolean): void; + + // Implemented Members + + get_accessible_role(): Gtk.AccessibleRole; + reset_property(property: Gtk.AccessibleProperty): void; + reset_relation(relation: Gtk.AccessibleRelation): void; + reset_state(state: Gtk.AccessibleState): void; + update_property(properties: Gtk.AccessibleProperty[], values: GObject.Value[]): void; + update_relation(relations: Gtk.AccessibleRelation[], values: GObject.Value[]): void; + update_state(states: Gtk.AccessibleState[], values: GObject.Value[]): void; + get_buildable_id(): string | null; + vfunc_add_child(builder: Gtk.Builder, child: GObject.Object, type?: string | null): void; + vfunc_custom_finished(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_end(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_start( + builder: Gtk.Builder, + child: GObject.Object | null, + tagname: string + ): [boolean, Gtk.BuildableParser, any | null]; + vfunc_get_id(): string; + vfunc_get_internal_child(builder: Gtk.Builder, childname: string): T; + vfunc_parser_finished(builder: Gtk.Builder): void; + vfunc_set_buildable_property(builder: Gtk.Builder, name: string, value: GObject.Value | any): void; + vfunc_set_id(id: string): void; +} +export module CallbackAnimationTarget { + export interface ConstructorProperties extends AnimationTarget.ConstructorProperties { + [key: string]: any; + } +} +export class CallbackAnimationTarget extends AnimationTarget { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Constructors + + static ["new"](): CallbackAnimationTarget; +} +export module Carousel { + export interface ConstructorProperties extends Gtk.Widget.ConstructorProperties { + [key: string]: any; + allow_long_swipes: boolean; + allowLongSwipes: boolean; + allow_mouse_drag: boolean; + allowMouseDrag: boolean; + allow_scroll_wheel: boolean; + allowScrollWheel: boolean; + interactive: boolean; + n_pages: number; + nPages: number; + position: number; + reveal_duration: number; + revealDuration: number; + scroll_params: SpringParams; + scrollParams: SpringParams; + spacing: number; + } +} +export class Carousel + extends Gtk.Widget + implements Swipeable, Gtk.Accessible, Gtk.Buildable, Gtk.ConstraintTarget, Gtk.Orientable +{ + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get allow_long_swipes(): boolean; + set allow_long_swipes(val: boolean); + get allowLongSwipes(): boolean; + set allowLongSwipes(val: boolean); + get allow_mouse_drag(): boolean; + set allow_mouse_drag(val: boolean); + get allowMouseDrag(): boolean; + set allowMouseDrag(val: boolean); + get allow_scroll_wheel(): boolean; + set allow_scroll_wheel(val: boolean); + get allowScrollWheel(): boolean; + set allowScrollWheel(val: boolean); + get interactive(): boolean; + set interactive(val: boolean); + get n_pages(): number; + get nPages(): number; + get position(): number; + get reveal_duration(): number; + set reveal_duration(val: number); + get revealDuration(): number; + set revealDuration(val: number); + get scroll_params(): SpringParams; + set scroll_params(val: SpringParams); + get scrollParams(): SpringParams; + set scrollParams(val: SpringParams); + get spacing(): number; + set spacing(val: number); + + // Signals + + connect(id: string, callback: (...args: any[]) => any): number; + connect_after(id: string, callback: (...args: any[]) => any): number; + emit(id: string, ...args: any[]): void; + connect(signal: "page-changed", callback: (_source: this, index: number) => void): number; + connect_after(signal: "page-changed", callback: (_source: this, index: number) => void): number; + emit(signal: "page-changed", index: number): void; + + // Implemented Properties + + get accessible_role(): Gtk.AccessibleRole; + set accessible_role(val: Gtk.AccessibleRole); + get accessibleRole(): Gtk.AccessibleRole; + set accessibleRole(val: Gtk.AccessibleRole); + get orientation(): Gtk.Orientation; + set orientation(val: Gtk.Orientation); + + // Constructors + + static ["new"](): Carousel; + + // Members + + append(child: Gtk.Widget): void; + get_allow_long_swipes(): boolean; + get_allow_mouse_drag(): boolean; + get_allow_scroll_wheel(): boolean; + get_interactive(): boolean; + get_n_pages(): number; + get_nth_page(n: number): Gtk.Widget; + get_position(): number; + get_reveal_duration(): number; + get_scroll_params(): SpringParams; + get_spacing(): number; + insert(child: Gtk.Widget, position: number): void; + prepend(child: Gtk.Widget): void; + remove(child: Gtk.Widget): void; + reorder(child: Gtk.Widget, position: number): void; + scroll_to(widget: Gtk.Widget, animate: boolean): void; + set_allow_long_swipes(allow_long_swipes: boolean): void; + set_allow_mouse_drag(allow_mouse_drag: boolean): void; + set_allow_scroll_wheel(allow_scroll_wheel: boolean): void; + set_interactive(interactive: boolean): void; + set_reveal_duration(reveal_duration: number): void; + set_scroll_params(params: SpringParams): void; + set_spacing(spacing: number): void; + + // Implemented Members + + get_cancel_progress(): number; + get_distance(): number; + get_progress(): number; + get_snap_points(): number[]; + get_swipe_area(navigation_direction: NavigationDirection, is_drag: boolean): Gdk.Rectangle; + vfunc_get_cancel_progress(): number; + vfunc_get_distance(): number; + vfunc_get_progress(): number; + vfunc_get_snap_points(): number[]; + vfunc_get_swipe_area(navigation_direction: NavigationDirection, is_drag: boolean): Gdk.Rectangle; + get_accessible_role(): Gtk.AccessibleRole; + reset_property(property: Gtk.AccessibleProperty): void; + reset_relation(relation: Gtk.AccessibleRelation): void; + reset_state(state: Gtk.AccessibleState): void; + update_property(properties: Gtk.AccessibleProperty[], values: GObject.Value[]): void; + update_relation(relations: Gtk.AccessibleRelation[], values: GObject.Value[]): void; + update_state(states: Gtk.AccessibleState[], values: GObject.Value[]): void; + get_buildable_id(): string | null; + vfunc_add_child(builder: Gtk.Builder, child: GObject.Object, type?: string | null): void; + vfunc_custom_finished(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_end(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_start( + builder: Gtk.Builder, + child: GObject.Object | null, + tagname: string + ): [boolean, Gtk.BuildableParser, any | null]; + vfunc_get_id(): string; + vfunc_get_internal_child(builder: Gtk.Builder, childname: string): T; + vfunc_parser_finished(builder: Gtk.Builder): void; + vfunc_set_buildable_property(builder: Gtk.Builder, name: string, value: GObject.Value | any): void; + vfunc_set_id(id: string): void; + get_orientation(): Gtk.Orientation; + set_orientation(orientation: Gtk.Orientation): void; +} +export module CarouselIndicatorDots { + export interface ConstructorProperties extends Gtk.Widget.ConstructorProperties { + [key: string]: any; + carousel: Carousel; + } +} +export class CarouselIndicatorDots + extends Gtk.Widget + implements Gtk.Accessible, Gtk.Buildable, Gtk.ConstraintTarget, Gtk.Orientable +{ + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get carousel(): Carousel; + set carousel(val: Carousel); + + // Implemented Properties + + get accessible_role(): Gtk.AccessibleRole; + set accessible_role(val: Gtk.AccessibleRole); + get accessibleRole(): Gtk.AccessibleRole; + set accessibleRole(val: Gtk.AccessibleRole); + get orientation(): Gtk.Orientation; + set orientation(val: Gtk.Orientation); + + // Constructors + + static ["new"](): CarouselIndicatorDots; + + // Members + + get_carousel(): Carousel | null; + set_carousel(carousel?: Carousel | null): void; + + // Implemented Members + + get_accessible_role(): Gtk.AccessibleRole; + reset_property(property: Gtk.AccessibleProperty): void; + reset_relation(relation: Gtk.AccessibleRelation): void; + reset_state(state: Gtk.AccessibleState): void; + update_property(properties: Gtk.AccessibleProperty[], values: GObject.Value[]): void; + update_relation(relations: Gtk.AccessibleRelation[], values: GObject.Value[]): void; + update_state(states: Gtk.AccessibleState[], values: GObject.Value[]): void; + get_buildable_id(): string | null; + vfunc_add_child(builder: Gtk.Builder, child: GObject.Object, type?: string | null): void; + vfunc_custom_finished(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_end(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_start( + builder: Gtk.Builder, + child: GObject.Object | null, + tagname: string + ): [boolean, Gtk.BuildableParser, any | null]; + vfunc_get_id(): string; + vfunc_get_internal_child(builder: Gtk.Builder, childname: string): T; + vfunc_parser_finished(builder: Gtk.Builder): void; + vfunc_set_buildable_property(builder: Gtk.Builder, name: string, value: GObject.Value | any): void; + vfunc_set_id(id: string): void; + get_orientation(): Gtk.Orientation; + set_orientation(orientation: Gtk.Orientation): void; +} +export module CarouselIndicatorLines { + export interface ConstructorProperties extends Gtk.Widget.ConstructorProperties { + [key: string]: any; + carousel: Carousel; + } +} +export class CarouselIndicatorLines + extends Gtk.Widget + implements Gtk.Accessible, Gtk.Buildable, Gtk.ConstraintTarget, Gtk.Orientable +{ + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get carousel(): Carousel; + set carousel(val: Carousel); + + // Implemented Properties + + get accessible_role(): Gtk.AccessibleRole; + set accessible_role(val: Gtk.AccessibleRole); + get accessibleRole(): Gtk.AccessibleRole; + set accessibleRole(val: Gtk.AccessibleRole); + get orientation(): Gtk.Orientation; + set orientation(val: Gtk.Orientation); + + // Constructors + + static ["new"](): CarouselIndicatorLines; + + // Members + + get_carousel(): Carousel | null; + set_carousel(carousel?: Carousel | null): void; + + // Implemented Members + + get_accessible_role(): Gtk.AccessibleRole; + reset_property(property: Gtk.AccessibleProperty): void; + reset_relation(relation: Gtk.AccessibleRelation): void; + reset_state(state: Gtk.AccessibleState): void; + update_property(properties: Gtk.AccessibleProperty[], values: GObject.Value[]): void; + update_relation(relations: Gtk.AccessibleRelation[], values: GObject.Value[]): void; + update_state(states: Gtk.AccessibleState[], values: GObject.Value[]): void; + get_buildable_id(): string | null; + vfunc_add_child(builder: Gtk.Builder, child: GObject.Object, type?: string | null): void; + vfunc_custom_finished(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_end(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_start( + builder: Gtk.Builder, + child: GObject.Object | null, + tagname: string + ): [boolean, Gtk.BuildableParser, any | null]; + vfunc_get_id(): string; + vfunc_get_internal_child(builder: Gtk.Builder, childname: string): T; + vfunc_parser_finished(builder: Gtk.Builder): void; + vfunc_set_buildable_property(builder: Gtk.Builder, name: string, value: GObject.Value | any): void; + vfunc_set_id(id: string): void; + get_orientation(): Gtk.Orientation; + set_orientation(orientation: Gtk.Orientation): void; +} +export module Clamp { + export interface ConstructorProperties extends Gtk.Widget.ConstructorProperties { + [key: string]: any; + child: Gtk.Widget; + maximum_size: number; + maximumSize: number; + tightening_threshold: number; + tighteningThreshold: number; + } +} +export class Clamp extends Gtk.Widget implements Gtk.Accessible, Gtk.Buildable, Gtk.ConstraintTarget, Gtk.Orientable { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get child(): Gtk.Widget; + set child(val: Gtk.Widget); + get maximum_size(): number; + set maximum_size(val: number); + get maximumSize(): number; + set maximumSize(val: number); + get tightening_threshold(): number; + set tightening_threshold(val: number); + get tighteningThreshold(): number; + set tighteningThreshold(val: number); + + // Implemented Properties + + get accessible_role(): Gtk.AccessibleRole; + set accessible_role(val: Gtk.AccessibleRole); + get accessibleRole(): Gtk.AccessibleRole; + set accessibleRole(val: Gtk.AccessibleRole); + get orientation(): Gtk.Orientation; + set orientation(val: Gtk.Orientation); + + // Constructors + + static ["new"](): Clamp; + + // Members + + get_child(): Gtk.Widget | null; + get_maximum_size(): number; + get_tightening_threshold(): number; + set_child(child?: Gtk.Widget | null): void; + set_maximum_size(maximum_size: number): void; + set_tightening_threshold(tightening_threshold: number): void; + + // Implemented Members + + get_accessible_role(): Gtk.AccessibleRole; + reset_property(property: Gtk.AccessibleProperty): void; + reset_relation(relation: Gtk.AccessibleRelation): void; + reset_state(state: Gtk.AccessibleState): void; + update_property(properties: Gtk.AccessibleProperty[], values: GObject.Value[]): void; + update_relation(relations: Gtk.AccessibleRelation[], values: GObject.Value[]): void; + update_state(states: Gtk.AccessibleState[], values: GObject.Value[]): void; + get_buildable_id(): string | null; + vfunc_add_child(builder: Gtk.Builder, child: GObject.Object, type?: string | null): void; + vfunc_custom_finished(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_end(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_start( + builder: Gtk.Builder, + child: GObject.Object | null, + tagname: string + ): [boolean, Gtk.BuildableParser, any | null]; + vfunc_get_id(): string; + vfunc_get_internal_child(builder: Gtk.Builder, childname: string): T; + vfunc_parser_finished(builder: Gtk.Builder): void; + vfunc_set_buildable_property(builder: Gtk.Builder, name: string, value: GObject.Value | any): void; + vfunc_set_id(id: string): void; + get_orientation(): Gtk.Orientation; + set_orientation(orientation: Gtk.Orientation): void; +} +export module ClampLayout { + export interface ConstructorProperties extends Gtk.LayoutManager.ConstructorProperties { + [key: string]: any; + maximum_size: number; + maximumSize: number; + tightening_threshold: number; + tighteningThreshold: number; + } +} +export class ClampLayout extends Gtk.LayoutManager implements Gtk.Orientable { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get maximum_size(): number; + set maximum_size(val: number); + get maximumSize(): number; + set maximumSize(val: number); + get tightening_threshold(): number; + set tightening_threshold(val: number); + get tighteningThreshold(): number; + set tighteningThreshold(val: number); + + // Implemented Properties + + get orientation(): Gtk.Orientation; + set orientation(val: Gtk.Orientation); + + // Constructors + + static ["new"](): ClampLayout; + + // Members + + get_maximum_size(): number; + get_tightening_threshold(): number; + set_maximum_size(maximum_size: number): void; + set_tightening_threshold(tightening_threshold: number): void; + + // Implemented Members + + get_orientation(): Gtk.Orientation; + set_orientation(orientation: Gtk.Orientation): void; +} +export module ClampScrollable { + export interface ConstructorProperties extends Gtk.Widget.ConstructorProperties { + [key: string]: any; + child: Gtk.Widget; + maximum_size: number; + maximumSize: number; + tightening_threshold: number; + tighteningThreshold: number; + } +} +export class ClampScrollable + extends Gtk.Widget + implements Gtk.Accessible, Gtk.Buildable, Gtk.ConstraintTarget, Gtk.Orientable, Gtk.Scrollable +{ + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get child(): Gtk.Widget; + set child(val: Gtk.Widget); + get maximum_size(): number; + set maximum_size(val: number); + get maximumSize(): number; + set maximumSize(val: number); + get tightening_threshold(): number; + set tightening_threshold(val: number); + get tighteningThreshold(): number; + set tighteningThreshold(val: number); + + // Implemented Properties + + get accessible_role(): Gtk.AccessibleRole; + set accessible_role(val: Gtk.AccessibleRole); + get accessibleRole(): Gtk.AccessibleRole; + set accessibleRole(val: Gtk.AccessibleRole); + get orientation(): Gtk.Orientation; + set orientation(val: Gtk.Orientation); + get hadjustment(): Gtk.Adjustment; + set hadjustment(val: Gtk.Adjustment); + get hscroll_policy(): Gtk.ScrollablePolicy; + set hscroll_policy(val: Gtk.ScrollablePolicy); + get hscrollPolicy(): Gtk.ScrollablePolicy; + set hscrollPolicy(val: Gtk.ScrollablePolicy); + get vadjustment(): Gtk.Adjustment; + set vadjustment(val: Gtk.Adjustment); + get vscroll_policy(): Gtk.ScrollablePolicy; + set vscroll_policy(val: Gtk.ScrollablePolicy); + get vscrollPolicy(): Gtk.ScrollablePolicy; + set vscrollPolicy(val: Gtk.ScrollablePolicy); + + // Constructors + + static ["new"](): ClampScrollable; + + // Members + + get_child(): Gtk.Widget | null; + get_maximum_size(): number; + get_tightening_threshold(): number; + set_child(child?: Gtk.Widget | null): void; + set_maximum_size(maximum_size: number): void; + set_tightening_threshold(tightening_threshold: number): void; + + // Implemented Members + + get_accessible_role(): Gtk.AccessibleRole; + reset_property(property: Gtk.AccessibleProperty): void; + reset_relation(relation: Gtk.AccessibleRelation): void; + reset_state(state: Gtk.AccessibleState): void; + update_property(properties: Gtk.AccessibleProperty[], values: GObject.Value[]): void; + update_relation(relations: Gtk.AccessibleRelation[], values: GObject.Value[]): void; + update_state(states: Gtk.AccessibleState[], values: GObject.Value[]): void; + get_buildable_id(): string | null; + vfunc_add_child(builder: Gtk.Builder, child: GObject.Object, type?: string | null): void; + vfunc_custom_finished(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_end(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_start( + builder: Gtk.Builder, + child: GObject.Object | null, + tagname: string + ): [boolean, Gtk.BuildableParser, any | null]; + vfunc_get_id(): string; + vfunc_get_internal_child(builder: Gtk.Builder, childname: string): T; + vfunc_parser_finished(builder: Gtk.Builder): void; + vfunc_set_buildable_property(builder: Gtk.Builder, name: string, value: GObject.Value | any): void; + vfunc_set_id(id: string): void; + get_orientation(): Gtk.Orientation; + set_orientation(orientation: Gtk.Orientation): void; + get_border(): [boolean, Gtk.Border]; + get_hadjustment(): Gtk.Adjustment | null; + get_hscroll_policy(): Gtk.ScrollablePolicy; + get_vadjustment(): Gtk.Adjustment | null; + get_vscroll_policy(): Gtk.ScrollablePolicy; + set_hadjustment(hadjustment?: Gtk.Adjustment | null): void; + set_hscroll_policy(policy: Gtk.ScrollablePolicy): void; + set_vadjustment(vadjustment?: Gtk.Adjustment | null): void; + set_vscroll_policy(policy: Gtk.ScrollablePolicy): void; + vfunc_get_border(): [boolean, Gtk.Border]; +} +export module ComboRow { + export interface ConstructorProperties extends ActionRow.ConstructorProperties { + [key: string]: any; + expression: Gtk.Expression; + factory: Gtk.ListItemFactory; + list_factory: Gtk.ListItemFactory; + listFactory: Gtk.ListItemFactory; + model: Gio.ListModel; + selected: number; + selected_item: GObject.Object; + selectedItem: GObject.Object; + use_subtitle: boolean; + useSubtitle: boolean; + } +} +export class ComboRow extends ActionRow implements Gtk.Accessible, Gtk.Actionable, Gtk.Buildable, Gtk.ConstraintTarget { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get expression(): Gtk.Expression; + set expression(val: Gtk.Expression); + get factory(): Gtk.ListItemFactory; + set factory(val: Gtk.ListItemFactory); + get list_factory(): Gtk.ListItemFactory; + set list_factory(val: Gtk.ListItemFactory); + get listFactory(): Gtk.ListItemFactory; + set listFactory(val: Gtk.ListItemFactory); + get model(): Gio.ListModel; + set model(val: Gio.ListModel); + get selected(): number; + set selected(val: number); + get selected_item(): GObject.Object; + get selectedItem(): GObject.Object; + get use_subtitle(): boolean; + set use_subtitle(val: boolean); + get useSubtitle(): boolean; + set useSubtitle(val: boolean); + + // Constructors + + static ["new"](): ComboRow; + + // Members + + get_expression(): Gtk.Expression | null; + get_factory(): Gtk.ListItemFactory | null; + get_list_factory(): Gtk.ListItemFactory | null; + get_model(): Gio.ListModel | null; + get_selected(): number; + get_selected_item(): T; + get_use_subtitle(): boolean; + set_expression(expression?: Gtk.Expression | null): void; + set_factory(factory?: Gtk.ListItemFactory | null): void; + set_list_factory(factory?: Gtk.ListItemFactory | null): void; + set_model(model?: Gio.ListModel | null): void; + set_selected(position: number): void; + set_use_subtitle(use_subtitle: boolean): void; +} +export module EnumListItem { + export interface ConstructorProperties extends GObject.Object.ConstructorProperties { + [key: string]: any; + name: string; + nick: string; + value: number; + } +} +export class EnumListItem extends GObject.Object { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get name(): string; + get nick(): string; + get value(): number; + + // Members + + get_name(): string; + get_nick(): string; + get_value(): number; +} +export module EnumListModel { + export interface ConstructorProperties + extends GObject.Object.ConstructorProperties { + [key: string]: any; + enum_type: GObject.GType; + enumType: GObject.GType; + } +} +export class EnumListModel + extends GObject.Object + implements Gio.ListModel +{ + static $gtype: GObject.GType; + + constructor(properties?: Partial>, ...args: any[]); + _init(properties?: Partial>, ...args: any[]): void; + + // Properties + get enum_type(): GObject.GType; + get enumType(): GObject.GType; + + // Constructors + + static ["new"](enum_type: GObject.GType): EnumListModel; + + // Members + + find_position(value: number): number; + get_enum_type(): GObject.GType; + + // Implemented Members + + get_item_type(): GObject.GType; + get_n_items(): number; + get_item(position: number): A | null; + items_changed(position: number, removed: number, added: number): void; + vfunc_get_item(position: number): A | null; + vfunc_get_item_type(): GObject.GType; + vfunc_get_n_items(): number; +} +export module ExpanderRow { + export interface ConstructorProperties extends PreferencesRow.ConstructorProperties { + [key: string]: any; + enable_expansion: boolean; + enableExpansion: boolean; + expanded: boolean; + icon_name: string; + iconName: string; + show_enable_switch: boolean; + showEnableSwitch: boolean; + subtitle: string; + } +} +export class ExpanderRow + extends PreferencesRow + implements Gtk.Accessible, Gtk.Actionable, Gtk.Buildable, Gtk.ConstraintTarget +{ + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get enable_expansion(): boolean; + set enable_expansion(val: boolean); + get enableExpansion(): boolean; + set enableExpansion(val: boolean); + get expanded(): boolean; + set expanded(val: boolean); + get icon_name(): string; + set icon_name(val: string); + get iconName(): string; + set iconName(val: string); + get show_enable_switch(): boolean; + set show_enable_switch(val: boolean); + get showEnableSwitch(): boolean; + set showEnableSwitch(val: boolean); + get subtitle(): string; + set subtitle(val: string); + + // Constructors + + static ["new"](): ExpanderRow; + + // Members + + add_action(widget: Gtk.Widget): void; + add_prefix(widget: Gtk.Widget): void; + add_row(child: Gtk.Widget): void; + get_enable_expansion(): boolean; + get_expanded(): boolean; + get_icon_name(): string | null; + get_show_enable_switch(): boolean; + get_subtitle(): string; + remove(child: Gtk.Widget): void; + set_enable_expansion(enable_expansion: boolean): void; + set_expanded(expanded: boolean): void; + set_icon_name(icon_name?: string | null): void; + set_show_enable_switch(show_enable_switch: boolean): void; + set_subtitle(subtitle: string): void; +} +export module Flap { + export interface ConstructorProperties extends Gtk.Widget.ConstructorProperties { + [key: string]: any; + content: Gtk.Widget; + flap: Gtk.Widget; + flap_position: Gtk.PackType; + flapPosition: Gtk.PackType; + fold_duration: number; + foldDuration: number; + fold_policy: FlapFoldPolicy; + foldPolicy: FlapFoldPolicy; + fold_threshold_policy: FoldThresholdPolicy; + foldThresholdPolicy: FoldThresholdPolicy; + folded: boolean; + locked: boolean; + modal: boolean; + reveal_flap: boolean; + revealFlap: boolean; + reveal_params: SpringParams; + revealParams: SpringParams; + reveal_progress: number; + revealProgress: number; + separator: Gtk.Widget; + swipe_to_close: boolean; + swipeToClose: boolean; + swipe_to_open: boolean; + swipeToOpen: boolean; + transition_type: FlapTransitionType; + transitionType: FlapTransitionType; + } +} +export class Flap + extends Gtk.Widget + implements Swipeable, Gtk.Accessible, Gtk.Buildable, Gtk.ConstraintTarget, Gtk.Orientable +{ + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get content(): Gtk.Widget; + set content(val: Gtk.Widget); + get flap(): Gtk.Widget; + set flap(val: Gtk.Widget); + get flap_position(): Gtk.PackType; + set flap_position(val: Gtk.PackType); + get flapPosition(): Gtk.PackType; + set flapPosition(val: Gtk.PackType); + get fold_duration(): number; + set fold_duration(val: number); + get foldDuration(): number; + set foldDuration(val: number); + get fold_policy(): FlapFoldPolicy; + set fold_policy(val: FlapFoldPolicy); + get foldPolicy(): FlapFoldPolicy; + set foldPolicy(val: FlapFoldPolicy); + get fold_threshold_policy(): FoldThresholdPolicy; + set fold_threshold_policy(val: FoldThresholdPolicy); + get foldThresholdPolicy(): FoldThresholdPolicy; + set foldThresholdPolicy(val: FoldThresholdPolicy); + get folded(): boolean; + get locked(): boolean; + set locked(val: boolean); + get modal(): boolean; + set modal(val: boolean); + get reveal_flap(): boolean; + set reveal_flap(val: boolean); + get revealFlap(): boolean; + set revealFlap(val: boolean); + get reveal_params(): SpringParams; + set reveal_params(val: SpringParams); + get revealParams(): SpringParams; + set revealParams(val: SpringParams); + get reveal_progress(): number; + get revealProgress(): number; + get separator(): Gtk.Widget; + set separator(val: Gtk.Widget); + get swipe_to_close(): boolean; + set swipe_to_close(val: boolean); + get swipeToClose(): boolean; + set swipeToClose(val: boolean); + get swipe_to_open(): boolean; + set swipe_to_open(val: boolean); + get swipeToOpen(): boolean; + set swipeToOpen(val: boolean); + get transition_type(): FlapTransitionType; + set transition_type(val: FlapTransitionType); + get transitionType(): FlapTransitionType; + set transitionType(val: FlapTransitionType); + + // Implemented Properties + + get accessible_role(): Gtk.AccessibleRole; + set accessible_role(val: Gtk.AccessibleRole); + get accessibleRole(): Gtk.AccessibleRole; + set accessibleRole(val: Gtk.AccessibleRole); + get orientation(): Gtk.Orientation; + set orientation(val: Gtk.Orientation); + + // Constructors + + static ["new"](): Flap; + + // Members + + get_content(): Gtk.Widget | null; + get_flap(): Gtk.Widget | null; + get_flap_position(): Gtk.PackType; + get_fold_duration(): number; + get_fold_policy(): FlapFoldPolicy; + get_fold_threshold_policy(): FoldThresholdPolicy; + get_folded(): boolean; + get_locked(): boolean; + get_modal(): boolean; + get_reveal_flap(): boolean; + get_reveal_params(): SpringParams; + get_reveal_progress(): number; + get_separator(): Gtk.Widget | null; + get_swipe_to_close(): boolean; + get_swipe_to_open(): boolean; + get_transition_type(): FlapTransitionType; + set_content(content?: Gtk.Widget | null): void; + set_flap(flap?: Gtk.Widget | null): void; + set_flap_position(position: Gtk.PackType): void; + set_fold_duration(duration: number): void; + set_fold_policy(policy: FlapFoldPolicy): void; + set_fold_threshold_policy(policy: FoldThresholdPolicy): void; + set_locked(locked: boolean): void; + set_modal(modal: boolean): void; + set_reveal_flap(reveal_flap: boolean): void; + set_reveal_params(params: SpringParams): void; + set_separator(separator?: Gtk.Widget | null): void; + set_swipe_to_close(swipe_to_close: boolean): void; + set_swipe_to_open(swipe_to_open: boolean): void; + set_transition_type(transition_type: FlapTransitionType): void; + + // Implemented Members + + get_cancel_progress(): number; + get_distance(): number; + get_progress(): number; + get_snap_points(): number[]; + get_swipe_area(navigation_direction: NavigationDirection, is_drag: boolean): Gdk.Rectangle; + vfunc_get_cancel_progress(): number; + vfunc_get_distance(): number; + vfunc_get_progress(): number; + vfunc_get_snap_points(): number[]; + vfunc_get_swipe_area(navigation_direction: NavigationDirection, is_drag: boolean): Gdk.Rectangle; + get_accessible_role(): Gtk.AccessibleRole; + reset_property(property: Gtk.AccessibleProperty): void; + reset_relation(relation: Gtk.AccessibleRelation): void; + reset_state(state: Gtk.AccessibleState): void; + update_property(properties: Gtk.AccessibleProperty[], values: GObject.Value[]): void; + update_relation(relations: Gtk.AccessibleRelation[], values: GObject.Value[]): void; + update_state(states: Gtk.AccessibleState[], values: GObject.Value[]): void; + get_buildable_id(): string | null; + vfunc_add_child(builder: Gtk.Builder, child: GObject.Object, type?: string | null): void; + vfunc_custom_finished(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_end(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_start( + builder: Gtk.Builder, + child: GObject.Object | null, + tagname: string + ): [boolean, Gtk.BuildableParser, any | null]; + vfunc_get_id(): string; + vfunc_get_internal_child(builder: Gtk.Builder, childname: string): T; + vfunc_parser_finished(builder: Gtk.Builder): void; + vfunc_set_buildable_property(builder: Gtk.Builder, name: string, value: GObject.Value | any): void; + vfunc_set_id(id: string): void; + get_orientation(): Gtk.Orientation; + set_orientation(orientation: Gtk.Orientation): void; +} +export module HeaderBar { + export interface ConstructorProperties extends Gtk.Widget.ConstructorProperties { + [key: string]: any; + centering_policy: CenteringPolicy; + centeringPolicy: CenteringPolicy; + decoration_layout: string; + decorationLayout: string; + show_end_title_buttons: boolean; + showEndTitleButtons: boolean; + show_start_title_buttons: boolean; + showStartTitleButtons: boolean; + title_widget: Gtk.Widget; + titleWidget: Gtk.Widget; + } +} +export class HeaderBar extends Gtk.Widget implements Gtk.Accessible, Gtk.Buildable, Gtk.ConstraintTarget { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get centering_policy(): CenteringPolicy; + set centering_policy(val: CenteringPolicy); + get centeringPolicy(): CenteringPolicy; + set centeringPolicy(val: CenteringPolicy); + get decoration_layout(): string; + set decoration_layout(val: string); + get decorationLayout(): string; + set decorationLayout(val: string); + get show_end_title_buttons(): boolean; + set show_end_title_buttons(val: boolean); + get showEndTitleButtons(): boolean; + set showEndTitleButtons(val: boolean); + get show_start_title_buttons(): boolean; + set show_start_title_buttons(val: boolean); + get showStartTitleButtons(): boolean; + set showStartTitleButtons(val: boolean); + get title_widget(): Gtk.Widget; + set title_widget(val: Gtk.Widget); + get titleWidget(): Gtk.Widget; + set titleWidget(val: Gtk.Widget); + + // Implemented Properties + + get accessible_role(): Gtk.AccessibleRole; + set accessible_role(val: Gtk.AccessibleRole); + get accessibleRole(): Gtk.AccessibleRole; + set accessibleRole(val: Gtk.AccessibleRole); + + // Constructors + + static ["new"](): HeaderBar; + + // Members + + get_centering_policy(): CenteringPolicy; + get_decoration_layout(): string | null; + get_show_end_title_buttons(): boolean; + get_show_start_title_buttons(): boolean; + get_title_widget(): Gtk.Widget | null; + pack_end(child: Gtk.Widget): void; + pack_start(child: Gtk.Widget): void; + remove(child: Gtk.Widget): void; + set_centering_policy(centering_policy: CenteringPolicy): void; + set_decoration_layout(layout?: string | null): void; + set_show_end_title_buttons(setting: boolean): void; + set_show_start_title_buttons(setting: boolean): void; + set_title_widget(title_widget?: Gtk.Widget | null): void; + + // Implemented Members + + get_accessible_role(): Gtk.AccessibleRole; + reset_property(property: Gtk.AccessibleProperty): void; + reset_relation(relation: Gtk.AccessibleRelation): void; + reset_state(state: Gtk.AccessibleState): void; + update_property(properties: Gtk.AccessibleProperty[], values: GObject.Value[]): void; + update_relation(relations: Gtk.AccessibleRelation[], values: GObject.Value[]): void; + update_state(states: Gtk.AccessibleState[], values: GObject.Value[]): void; + get_buildable_id(): string | null; + vfunc_add_child(builder: Gtk.Builder, child: GObject.Object, type?: string | null): void; + vfunc_custom_finished(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_end(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_start( + builder: Gtk.Builder, + child: GObject.Object | null, + tagname: string + ): [boolean, Gtk.BuildableParser, any | null]; + vfunc_get_id(): string; + vfunc_get_internal_child(builder: Gtk.Builder, childname: string): T; + vfunc_parser_finished(builder: Gtk.Builder): void; + vfunc_set_buildable_property(builder: Gtk.Builder, name: string, value: GObject.Value | any): void; + vfunc_set_id(id: string): void; +} +export module Leaflet { + export interface ConstructorProperties extends Gtk.Widget.ConstructorProperties { + [key: string]: any; + can_navigate_back: boolean; + canNavigateBack: boolean; + can_navigate_forward: boolean; + canNavigateForward: boolean; + can_unfold: boolean; + canUnfold: boolean; + child_transition_params: SpringParams; + childTransitionParams: SpringParams; + child_transition_running: boolean; + childTransitionRunning: boolean; + fold_threshold_policy: FoldThresholdPolicy; + foldThresholdPolicy: FoldThresholdPolicy; + folded: boolean; + homogeneous: boolean; + mode_transition_duration: number; + modeTransitionDuration: number; + pages: Gtk.SelectionModel; + transition_type: LeafletTransitionType; + transitionType: LeafletTransitionType; + visible_child: Gtk.Widget; + visibleChild: Gtk.Widget; + visible_child_name: string; + visibleChildName: string; + } +} +export class Leaflet + extends Gtk.Widget + implements Swipeable, Gtk.Accessible, Gtk.Buildable, Gtk.ConstraintTarget, Gtk.Orientable +{ + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get can_navigate_back(): boolean; + set can_navigate_back(val: boolean); + get canNavigateBack(): boolean; + set canNavigateBack(val: boolean); + get can_navigate_forward(): boolean; + set can_navigate_forward(val: boolean); + get canNavigateForward(): boolean; + set canNavigateForward(val: boolean); + get can_unfold(): boolean; + set can_unfold(val: boolean); + get canUnfold(): boolean; + set canUnfold(val: boolean); + get child_transition_params(): SpringParams; + set child_transition_params(val: SpringParams); + get childTransitionParams(): SpringParams; + set childTransitionParams(val: SpringParams); + get child_transition_running(): boolean; + get childTransitionRunning(): boolean; + get fold_threshold_policy(): FoldThresholdPolicy; + set fold_threshold_policy(val: FoldThresholdPolicy); + get foldThresholdPolicy(): FoldThresholdPolicy; + set foldThresholdPolicy(val: FoldThresholdPolicy); + get folded(): boolean; + get homogeneous(): boolean; + set homogeneous(val: boolean); + get mode_transition_duration(): number; + set mode_transition_duration(val: number); + get modeTransitionDuration(): number; + set modeTransitionDuration(val: number); + get pages(): Gtk.SelectionModel; + get transition_type(): LeafletTransitionType; + set transition_type(val: LeafletTransitionType); + get transitionType(): LeafletTransitionType; + set transitionType(val: LeafletTransitionType); + get visible_child(): Gtk.Widget; + set visible_child(val: Gtk.Widget); + get visibleChild(): Gtk.Widget; + set visibleChild(val: Gtk.Widget); + get visible_child_name(): string; + set visible_child_name(val: string); + get visibleChildName(): string; + set visibleChildName(val: string); + + // Implemented Properties + + get accessible_role(): Gtk.AccessibleRole; + set accessible_role(val: Gtk.AccessibleRole); + get accessibleRole(): Gtk.AccessibleRole; + set accessibleRole(val: Gtk.AccessibleRole); + get orientation(): Gtk.Orientation; + set orientation(val: Gtk.Orientation); + + // Constructors + + static ["new"](): Leaflet; + + // Members + + append(child: Gtk.Widget): LeafletPage; + get_adjacent_child(direction: NavigationDirection): Gtk.Widget | null; + get_can_navigate_back(): boolean; + get_can_navigate_forward(): boolean; + get_can_unfold(): boolean; + get_child_by_name(name: string): Gtk.Widget | null; + get_child_transition_params(): SpringParams; + get_child_transition_running(): boolean; + get_fold_threshold_policy(): FoldThresholdPolicy; + get_folded(): boolean; + get_homogeneous(): boolean; + get_mode_transition_duration(): number; + get_page(child: Gtk.Widget): LeafletPage; + get_pages(): Gtk.SelectionModel; + get_transition_type(): LeafletTransitionType; + get_visible_child(): Gtk.Widget | null; + get_visible_child_name(): string | null; + insert_child_after(child: Gtk.Widget, sibling?: Gtk.Widget | null): LeafletPage; + navigate(direction: NavigationDirection): boolean; + prepend(child: Gtk.Widget): LeafletPage; + remove(child: Gtk.Widget): void; + reorder_child_after(child: Gtk.Widget, sibling?: Gtk.Widget | null): void; + set_can_navigate_back(can_navigate_back: boolean): void; + set_can_navigate_forward(can_navigate_forward: boolean): void; + set_can_unfold(can_unfold: boolean): void; + set_child_transition_params(params: SpringParams): void; + set_fold_threshold_policy(policy: FoldThresholdPolicy): void; + set_homogeneous(homogeneous: boolean): void; + set_mode_transition_duration(duration: number): void; + set_transition_type(transition: LeafletTransitionType): void; + set_visible_child(visible_child: Gtk.Widget): void; + set_visible_child_name(name: string): void; + + // Implemented Members + + get_cancel_progress(): number; + get_distance(): number; + get_progress(): number; + get_snap_points(): number[]; + get_swipe_area(navigation_direction: NavigationDirection, is_drag: boolean): Gdk.Rectangle; + vfunc_get_cancel_progress(): number; + vfunc_get_distance(): number; + vfunc_get_progress(): number; + vfunc_get_snap_points(): number[]; + vfunc_get_swipe_area(navigation_direction: NavigationDirection, is_drag: boolean): Gdk.Rectangle; + get_accessible_role(): Gtk.AccessibleRole; + reset_property(property: Gtk.AccessibleProperty): void; + reset_relation(relation: Gtk.AccessibleRelation): void; + reset_state(state: Gtk.AccessibleState): void; + update_property(properties: Gtk.AccessibleProperty[], values: GObject.Value[]): void; + update_relation(relations: Gtk.AccessibleRelation[], values: GObject.Value[]): void; + update_state(states: Gtk.AccessibleState[], values: GObject.Value[]): void; + get_buildable_id(): string | null; + vfunc_add_child(builder: Gtk.Builder, child: GObject.Object, type?: string | null): void; + vfunc_custom_finished(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_end(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_start( + builder: Gtk.Builder, + child: GObject.Object | null, + tagname: string + ): [boolean, Gtk.BuildableParser, any | null]; + vfunc_get_id(): string; + vfunc_get_internal_child(builder: Gtk.Builder, childname: string): T; + vfunc_parser_finished(builder: Gtk.Builder): void; + vfunc_set_buildable_property(builder: Gtk.Builder, name: string, value: GObject.Value | any): void; + vfunc_set_id(id: string): void; + get_orientation(): Gtk.Orientation; + set_orientation(orientation: Gtk.Orientation): void; +} +export module LeafletPage { + export interface ConstructorProperties extends GObject.Object.ConstructorProperties { + [key: string]: any; + child: Gtk.Widget; + name: string; + navigatable: boolean; + } +} +export class LeafletPage extends GObject.Object { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get child(): Gtk.Widget; + get name(): string; + set name(val: string); + get navigatable(): boolean; + set navigatable(val: boolean); + + // Members + + get_child(): Gtk.Widget; + get_name(): string | null; + get_navigatable(): boolean; + set_name(name?: string | null): void; + set_navigatable(navigatable: boolean): void; +} +export module PreferencesGroup { + export interface ConstructorProperties extends Gtk.Widget.ConstructorProperties { + [key: string]: any; + description: string; + header_suffix: Gtk.Widget; + headerSuffix: Gtk.Widget; + title: string; + } +} +export class PreferencesGroup extends Gtk.Widget implements Gtk.Accessible, Gtk.Buildable, Gtk.ConstraintTarget { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get description(): string; + set description(val: string); + get header_suffix(): Gtk.Widget; + set header_suffix(val: Gtk.Widget); + get headerSuffix(): Gtk.Widget; + set headerSuffix(val: Gtk.Widget); + get title(): string; + set title(val: string); + + // Implemented Properties + + get accessible_role(): Gtk.AccessibleRole; + set accessible_role(val: Gtk.AccessibleRole); + get accessibleRole(): Gtk.AccessibleRole; + set accessibleRole(val: Gtk.AccessibleRole); + + // Constructors + + static ["new"](): PreferencesGroup; + + // Members + + add(child: Gtk.Widget): void; + get_description(): string | null; + get_header_suffix(): Gtk.Widget | null; + get_title(): string; + remove(child: Gtk.Widget): void; + set_description(description?: string | null): void; + set_header_suffix(child: Gtk.Widget): void; + set_title(title: string): void; + + // Implemented Members + + get_accessible_role(): Gtk.AccessibleRole; + reset_property(property: Gtk.AccessibleProperty): void; + reset_relation(relation: Gtk.AccessibleRelation): void; + reset_state(state: Gtk.AccessibleState): void; + update_property(properties: Gtk.AccessibleProperty[], values: GObject.Value[]): void; + update_relation(relations: Gtk.AccessibleRelation[], values: GObject.Value[]): void; + update_state(states: Gtk.AccessibleState[], values: GObject.Value[]): void; + get_buildable_id(): string | null; + vfunc_add_child(builder: Gtk.Builder, child: GObject.Object, type?: string | null): void; + vfunc_custom_finished(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_end(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_start( + builder: Gtk.Builder, + child: GObject.Object | null, + tagname: string + ): [boolean, Gtk.BuildableParser, any | null]; + vfunc_get_id(): string; + vfunc_get_internal_child(builder: Gtk.Builder, childname: string): T; + vfunc_parser_finished(builder: Gtk.Builder): void; + vfunc_set_buildable_property(builder: Gtk.Builder, name: string, value: GObject.Value | any): void; + vfunc_set_id(id: string): void; +} +export module PreferencesPage { + export interface ConstructorProperties extends Gtk.Widget.ConstructorProperties { + [key: string]: any; + icon_name: string; + iconName: string; + name: string; + title: string; + use_underline: boolean; + useUnderline: boolean; + } +} +export class PreferencesPage extends Gtk.Widget implements Gtk.Accessible, Gtk.Buildable, Gtk.ConstraintTarget { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get icon_name(): string; + set icon_name(val: string); + get iconName(): string; + set iconName(val: string); + get name(): string; + set name(val: string); + get title(): string; + set title(val: string); + get use_underline(): boolean; + set use_underline(val: boolean); + get useUnderline(): boolean; + set useUnderline(val: boolean); + + // Implemented Properties + + get accessible_role(): Gtk.AccessibleRole; + set accessible_role(val: Gtk.AccessibleRole); + get accessibleRole(): Gtk.AccessibleRole; + set accessibleRole(val: Gtk.AccessibleRole); + + // Constructors + + static ["new"](): PreferencesPage; + + // Members + + add(group: PreferencesGroup): void; + get_icon_name(): string | null; + get_name(): string | null; + // Conflicted with Gtk.Widget.get_name + get_name(...args: never[]): any; + get_title(): string; + get_use_underline(): boolean; + remove(group: PreferencesGroup): void; + set_icon_name(icon_name?: string | null): void; + set_name(name?: string | null): void; + // Conflicted with Gtk.Widget.set_name + set_name(...args: never[]): any; + set_title(title: string): void; + set_use_underline(use_underline: boolean): void; + + // Implemented Members + + get_accessible_role(): Gtk.AccessibleRole; + reset_property(property: Gtk.AccessibleProperty): void; + reset_relation(relation: Gtk.AccessibleRelation): void; + reset_state(state: Gtk.AccessibleState): void; + update_property(properties: Gtk.AccessibleProperty[], values: GObject.Value[]): void; + update_relation(relations: Gtk.AccessibleRelation[], values: GObject.Value[]): void; + update_state(states: Gtk.AccessibleState[], values: GObject.Value[]): void; + get_buildable_id(): string | null; + vfunc_add_child(builder: Gtk.Builder, child: GObject.Object, type?: string | null): void; + vfunc_custom_finished(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_end(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_start( + builder: Gtk.Builder, + child: GObject.Object | null, + tagname: string + ): [boolean, Gtk.BuildableParser, any | null]; + vfunc_get_id(): string; + vfunc_get_internal_child(builder: Gtk.Builder, childname: string): T; + vfunc_parser_finished(builder: Gtk.Builder): void; + vfunc_set_buildable_property(builder: Gtk.Builder, name: string, value: GObject.Value | any): void; + vfunc_set_id(id: string): void; +} +export module PreferencesRow { + export interface ConstructorProperties extends Gtk.ListBoxRow.ConstructorProperties { + [key: string]: any; + title: string; + title_selectable: boolean; + titleSelectable: boolean; + use_underline: boolean; + useUnderline: boolean; + } +} +export class PreferencesRow + extends Gtk.ListBoxRow + implements Gtk.Accessible, Gtk.Actionable, Gtk.Buildable, Gtk.ConstraintTarget +{ + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get title(): string; + set title(val: string); + get title_selectable(): boolean; + set title_selectable(val: boolean); + get titleSelectable(): boolean; + set titleSelectable(val: boolean); + get use_underline(): boolean; + set use_underline(val: boolean); + get useUnderline(): boolean; + set useUnderline(val: boolean); + + // Implemented Properties + + get action_name(): string; + set action_name(val: string); + get actionName(): string; + set actionName(val: string); + get action_target(): GLib.Variant; + set action_target(val: GLib.Variant); + get actionTarget(): GLib.Variant; + set actionTarget(val: GLib.Variant); + + // Constructors + + static ["new"](): PreferencesRow; + + // Members + + get_title(): string; + get_title_selectable(): boolean; + get_use_underline(): boolean; + set_title(title: string): void; + set_title_selectable(title_selectable: boolean): void; + set_use_underline(use_underline: boolean): void; + + // Implemented Members + + get_action_name(): string | null; + get_action_target_value(): GLib.Variant | null; + set_action_name(action_name?: string | null): void; + set_action_target_value(target_value?: GLib.Variant | null): void; + set_detailed_action_name(detailed_action_name: string): void; + vfunc_get_action_name(): string | null; + vfunc_get_action_target_value(): GLib.Variant | null; + vfunc_set_action_name(action_name?: string | null): void; + vfunc_set_action_target_value(target_value?: GLib.Variant | null): void; +} +export module PreferencesWindow { + export interface ConstructorProperties extends Window.ConstructorProperties { + [key: string]: any; + can_navigate_back: boolean; + canNavigateBack: boolean; + search_enabled: boolean; + searchEnabled: boolean; + visible_page: Gtk.Widget; + visiblePage: Gtk.Widget; + visible_page_name: string; + visiblePageName: string; + } +} +export class PreferencesWindow + extends Window + implements Gtk.Accessible, Gtk.Buildable, Gtk.ConstraintTarget, Gtk.Native, Gtk.Root, Gtk.ShortcutManager +{ + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get can_navigate_back(): boolean; + set can_navigate_back(val: boolean); + get canNavigateBack(): boolean; + set canNavigateBack(val: boolean); + get search_enabled(): boolean; + set search_enabled(val: boolean); + get searchEnabled(): boolean; + set searchEnabled(val: boolean); + get visible_page(): Gtk.Widget; + set visible_page(val: Gtk.Widget); + get visiblePage(): Gtk.Widget; + set visiblePage(val: Gtk.Widget); + get visible_page_name(): string; + set visible_page_name(val: string); + get visiblePageName(): string; + set visiblePageName(val: string); + + // Constructors + + static ["new"](): PreferencesWindow; + + // Members + + add(page: PreferencesPage): void; + add_toast(toast: Toast): void; + close_subpage(): void; + get_can_navigate_back(): boolean; + get_search_enabled(): boolean; + get_visible_page(): PreferencesPage | null; + get_visible_page_name(): string | null; + present_subpage(subpage: Gtk.Widget): void; + remove(page: PreferencesPage): void; + set_can_navigate_back(can_navigate_back: boolean): void; + set_search_enabled(search_enabled: boolean): void; + set_visible_page(page: PreferencesPage): void; + set_visible_page_name(name: string): void; +} +export module SplitButton { + export interface ConstructorProperties extends Gtk.Widget.ConstructorProperties { + [key: string]: any; + child: Gtk.Widget; + direction: Gtk.ArrowType; + icon_name: string; + iconName: string; + label: string; + menu_model: Gio.MenuModel; + menuModel: Gio.MenuModel; + popover: Gtk.Popover; + use_underline: boolean; + useUnderline: boolean; + } +} +export class SplitButton + extends Gtk.Widget + implements Gtk.Accessible, Gtk.Actionable, Gtk.Buildable, Gtk.ConstraintTarget +{ + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get child(): Gtk.Widget; + set child(val: Gtk.Widget); + get direction(): Gtk.ArrowType; + set direction(val: Gtk.ArrowType); + get icon_name(): string; + set icon_name(val: string); + get iconName(): string; + set iconName(val: string); + get label(): string; + set label(val: string); + get menu_model(): Gio.MenuModel; + set menu_model(val: Gio.MenuModel); + get menuModel(): Gio.MenuModel; + set menuModel(val: Gio.MenuModel); + get popover(): Gtk.Popover; + set popover(val: Gtk.Popover); + get use_underline(): boolean; + set use_underline(val: boolean); + get useUnderline(): boolean; + set useUnderline(val: boolean); + + // Signals + + connect(id: string, callback: (...args: any[]) => any): number; + connect_after(id: string, callback: (...args: any[]) => any): number; + emit(id: string, ...args: any[]): void; + connect(signal: "activate", callback: (_source: this) => void): number; + connect_after(signal: "activate", callback: (_source: this) => void): number; + emit(signal: "activate"): void; + connect(signal: "clicked", callback: (_source: this) => void): number; + connect_after(signal: "clicked", callback: (_source: this) => void): number; + emit(signal: "clicked"): void; + + // Implemented Properties + + get accessible_role(): Gtk.AccessibleRole; + set accessible_role(val: Gtk.AccessibleRole); + get accessibleRole(): Gtk.AccessibleRole; + set accessibleRole(val: Gtk.AccessibleRole); + get action_name(): string; + set action_name(val: string); + get actionName(): string; + set actionName(val: string); + get action_target(): GLib.Variant; + set action_target(val: GLib.Variant); + get actionTarget(): GLib.Variant; + set actionTarget(val: GLib.Variant); + + // Constructors + + static ["new"](): SplitButton; + + // Members + + get_child(): Gtk.Widget | null; + get_direction(): Gtk.ArrowType; + // Conflicted with Gtk.Widget.get_direction + get_direction(...args: never[]): any; + get_icon_name(): string | null; + get_label(): string | null; + get_menu_model(): Gio.MenuModel | null; + get_popover(): Gtk.Popover | null; + get_use_underline(): boolean; + popdown(): void; + popup(): void; + set_child(child?: Gtk.Widget | null): void; + set_direction(direction: Gtk.ArrowType): void; + // Conflicted with Gtk.Widget.set_direction + set_direction(...args: never[]): any; + set_icon_name(icon_name: string): void; + set_label(label: string): void; + set_menu_model(menu_model?: Gio.MenuModel | null): void; + set_popover(popover?: Gtk.Popover | null): void; + set_use_underline(use_underline: boolean): void; + + // Implemented Members + + get_accessible_role(): Gtk.AccessibleRole; + reset_property(property: Gtk.AccessibleProperty): void; + reset_relation(relation: Gtk.AccessibleRelation): void; + reset_state(state: Gtk.AccessibleState): void; + update_property(properties: Gtk.AccessibleProperty[], values: GObject.Value[]): void; + update_relation(relations: Gtk.AccessibleRelation[], values: GObject.Value[]): void; + update_state(states: Gtk.AccessibleState[], values: GObject.Value[]): void; + get_action_name(): string | null; + get_action_target_value(): GLib.Variant | null; + set_action_name(action_name?: string | null): void; + set_action_target_value(target_value?: GLib.Variant | null): void; + set_detailed_action_name(detailed_action_name: string): void; + vfunc_get_action_name(): string | null; + vfunc_get_action_target_value(): GLib.Variant | null; + vfunc_set_action_name(action_name?: string | null): void; + vfunc_set_action_target_value(target_value?: GLib.Variant | null): void; + get_buildable_id(): string | null; + vfunc_add_child(builder: Gtk.Builder, child: GObject.Object, type?: string | null): void; + vfunc_custom_finished(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_end(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_start( + builder: Gtk.Builder, + child: GObject.Object | null, + tagname: string + ): [boolean, Gtk.BuildableParser, any | null]; + vfunc_get_id(): string; + vfunc_get_internal_child(builder: Gtk.Builder, childname: string): T; + vfunc_parser_finished(builder: Gtk.Builder): void; + vfunc_set_buildable_property(builder: Gtk.Builder, name: string, value: GObject.Value | any): void; + vfunc_set_id(id: string): void; +} +export module SpringAnimation { + export interface ConstructorProperties extends Animation.ConstructorProperties { + [key: string]: any; + clamp: boolean; + epsilon: number; + estimated_duration: number; + estimatedDuration: number; + initial_velocity: number; + initialVelocity: number; + spring_params: SpringParams; + springParams: SpringParams; + value_from: number; + valueFrom: number; + value_to: number; + valueTo: number; + velocity: number; + } +} +export class SpringAnimation extends Animation { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get clamp(): boolean; + set clamp(val: boolean); + get epsilon(): number; + set epsilon(val: number); + get estimated_duration(): number; + get estimatedDuration(): number; + get initial_velocity(): number; + set initial_velocity(val: number); + get initialVelocity(): number; + set initialVelocity(val: number); + get spring_params(): SpringParams; + set spring_params(val: SpringParams); + get springParams(): SpringParams; + set springParams(val: SpringParams); + get value_from(): number; + set value_from(val: number); + get valueFrom(): number; + set valueFrom(val: number); + get value_to(): number; + set value_to(val: number); + get valueTo(): number; + set valueTo(val: number); + get velocity(): number; + + // Constructors + + static ["new"]( + widget: Gtk.Widget, + from: number, + to: number, + spring_params: SpringParams, + target: AnimationTarget + ): SpringAnimation; + + // Members + + get_clamp(): boolean; + get_epsilon(): number; + get_estimated_duration(): number; + get_initial_velocity(): number; + get_spring_params(): SpringParams; + get_value_from(): number; + get_value_to(): number; + get_velocity(): number; + set_clamp(clamp: boolean): void; + set_epsilon(epsilon: number): void; + set_initial_velocity(velocity: number): void; + set_spring_params(spring_params: SpringParams): void; + set_value_from(value: number): void; + set_value_to(value: number): void; +} +export module Squeezer { + export interface ConstructorProperties extends Gtk.Widget.ConstructorProperties { + [key: string]: any; + allow_none: boolean; + allowNone: boolean; + homogeneous: boolean; + interpolate_size: boolean; + interpolateSize: boolean; + pages: Gtk.SelectionModel; + switch_threshold_policy: FoldThresholdPolicy; + switchThresholdPolicy: FoldThresholdPolicy; + transition_duration: number; + transitionDuration: number; + transition_running: boolean; + transitionRunning: boolean; + transition_type: SqueezerTransitionType; + transitionType: SqueezerTransitionType; + visible_child: Gtk.Widget; + visibleChild: Gtk.Widget; + xalign: number; + yalign: number; + } +} +export class Squeezer + extends Gtk.Widget + implements Gtk.Accessible, Gtk.Buildable, Gtk.ConstraintTarget, Gtk.Orientable +{ + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get allow_none(): boolean; + set allow_none(val: boolean); + get allowNone(): boolean; + set allowNone(val: boolean); + get homogeneous(): boolean; + set homogeneous(val: boolean); + get interpolate_size(): boolean; + set interpolate_size(val: boolean); + get interpolateSize(): boolean; + set interpolateSize(val: boolean); + get pages(): Gtk.SelectionModel; + get switch_threshold_policy(): FoldThresholdPolicy; + set switch_threshold_policy(val: FoldThresholdPolicy); + get switchThresholdPolicy(): FoldThresholdPolicy; + set switchThresholdPolicy(val: FoldThresholdPolicy); + get transition_duration(): number; + set transition_duration(val: number); + get transitionDuration(): number; + set transitionDuration(val: number); + get transition_running(): boolean; + get transitionRunning(): boolean; + get transition_type(): SqueezerTransitionType; + set transition_type(val: SqueezerTransitionType); + get transitionType(): SqueezerTransitionType; + set transitionType(val: SqueezerTransitionType); + get visible_child(): Gtk.Widget; + get visibleChild(): Gtk.Widget; + get xalign(): number; + set xalign(val: number); + get yalign(): number; + set yalign(val: number); + + // Implemented Properties + + get accessible_role(): Gtk.AccessibleRole; + set accessible_role(val: Gtk.AccessibleRole); + get accessibleRole(): Gtk.AccessibleRole; + set accessibleRole(val: Gtk.AccessibleRole); + get orientation(): Gtk.Orientation; + set orientation(val: Gtk.Orientation); + + // Constructors + + static ["new"](): Squeezer; + + // Members + + add(child: Gtk.Widget): SqueezerPage; + get_allow_none(): boolean; + get_homogeneous(): boolean; + get_interpolate_size(): boolean; + get_page(child: Gtk.Widget): SqueezerPage; + get_pages(): Gtk.SelectionModel; + get_switch_threshold_policy(): FoldThresholdPolicy; + get_transition_duration(): number; + get_transition_running(): boolean; + get_transition_type(): SqueezerTransitionType; + get_visible_child(): Gtk.Widget | null; + get_xalign(): number; + get_yalign(): number; + remove(child: Gtk.Widget): void; + set_allow_none(allow_none: boolean): void; + set_homogeneous(homogeneous: boolean): void; + set_interpolate_size(interpolate_size: boolean): void; + set_switch_threshold_policy(policy: FoldThresholdPolicy): void; + set_transition_duration(duration: number): void; + set_transition_type(transition: SqueezerTransitionType): void; + set_xalign(xalign: number): void; + set_yalign(yalign: number): void; + + // Implemented Members + + get_accessible_role(): Gtk.AccessibleRole; + reset_property(property: Gtk.AccessibleProperty): void; + reset_relation(relation: Gtk.AccessibleRelation): void; + reset_state(state: Gtk.AccessibleState): void; + update_property(properties: Gtk.AccessibleProperty[], values: GObject.Value[]): void; + update_relation(relations: Gtk.AccessibleRelation[], values: GObject.Value[]): void; + update_state(states: Gtk.AccessibleState[], values: GObject.Value[]): void; + get_buildable_id(): string | null; + vfunc_add_child(builder: Gtk.Builder, child: GObject.Object, type?: string | null): void; + vfunc_custom_finished(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_end(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_start( + builder: Gtk.Builder, + child: GObject.Object | null, + tagname: string + ): [boolean, Gtk.BuildableParser, any | null]; + vfunc_get_id(): string; + vfunc_get_internal_child(builder: Gtk.Builder, childname: string): T; + vfunc_parser_finished(builder: Gtk.Builder): void; + vfunc_set_buildable_property(builder: Gtk.Builder, name: string, value: GObject.Value | any): void; + vfunc_set_id(id: string): void; + get_orientation(): Gtk.Orientation; + set_orientation(orientation: Gtk.Orientation): void; +} +export module SqueezerPage { + export interface ConstructorProperties extends GObject.Object.ConstructorProperties { + [key: string]: any; + child: Gtk.Widget; + enabled: boolean; + } +} +export class SqueezerPage extends GObject.Object { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get child(): Gtk.Widget; + get enabled(): boolean; + set enabled(val: boolean); + + // Members + + get_child(): Gtk.Widget; + get_enabled(): boolean; + set_enabled(enabled: boolean): void; +} +export module StatusPage { + export interface ConstructorProperties extends Gtk.Widget.ConstructorProperties { + [key: string]: any; + child: Gtk.Widget; + description: string; + icon_name: string; + iconName: string; + paintable: Gdk.Paintable; + title: string; + } +} +export class StatusPage extends Gtk.Widget implements Gtk.Accessible, Gtk.Buildable, Gtk.ConstraintTarget { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get child(): Gtk.Widget; + set child(val: Gtk.Widget); + get description(): string; + set description(val: string); + get icon_name(): string; + set icon_name(val: string); + get iconName(): string; + set iconName(val: string); + get paintable(): Gdk.Paintable; + set paintable(val: Gdk.Paintable); + get title(): string; + set title(val: string); + + // Implemented Properties + + get accessible_role(): Gtk.AccessibleRole; + set accessible_role(val: Gtk.AccessibleRole); + get accessibleRole(): Gtk.AccessibleRole; + set accessibleRole(val: Gtk.AccessibleRole); + + // Constructors + + static ["new"](): StatusPage; + + // Members + + get_child(): Gtk.Widget | null; + get_description(): string | null; + get_icon_name(): string | null; + get_paintable(): Gdk.Paintable | null; + get_title(): string; + set_child(child?: Gtk.Widget | null): void; + set_description(description?: string | null): void; + set_icon_name(icon_name?: string | null): void; + set_paintable(paintable?: Gdk.Paintable | null): void; + set_title(title: string): void; + + // Implemented Members + + get_accessible_role(): Gtk.AccessibleRole; + reset_property(property: Gtk.AccessibleProperty): void; + reset_relation(relation: Gtk.AccessibleRelation): void; + reset_state(state: Gtk.AccessibleState): void; + update_property(properties: Gtk.AccessibleProperty[], values: GObject.Value[]): void; + update_relation(relations: Gtk.AccessibleRelation[], values: GObject.Value[]): void; + update_state(states: Gtk.AccessibleState[], values: GObject.Value[]): void; + get_buildable_id(): string | null; + vfunc_add_child(builder: Gtk.Builder, child: GObject.Object, type?: string | null): void; + vfunc_custom_finished(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_end(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_start( + builder: Gtk.Builder, + child: GObject.Object | null, + tagname: string + ): [boolean, Gtk.BuildableParser, any | null]; + vfunc_get_id(): string; + vfunc_get_internal_child(builder: Gtk.Builder, childname: string): T; + vfunc_parser_finished(builder: Gtk.Builder): void; + vfunc_set_buildable_property(builder: Gtk.Builder, name: string, value: GObject.Value | any): void; + vfunc_set_id(id: string): void; +} +export module StyleManager { + export interface ConstructorProperties extends GObject.Object.ConstructorProperties { + [key: string]: any; + color_scheme: ColorScheme; + colorScheme: ColorScheme; + dark: boolean; + display: Gdk.Display; + high_contrast: boolean; + highContrast: boolean; + system_supports_color_schemes: boolean; + systemSupportsColorSchemes: boolean; + } +} +export class StyleManager extends GObject.Object { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get color_scheme(): ColorScheme; + set color_scheme(val: ColorScheme); + get colorScheme(): ColorScheme; + set colorScheme(val: ColorScheme); + get dark(): boolean; + get display(): Gdk.Display; + get high_contrast(): boolean; + get highContrast(): boolean; + get system_supports_color_schemes(): boolean; + get systemSupportsColorSchemes(): boolean; + + // Members + + get_color_scheme(): ColorScheme; + get_dark(): boolean; + get_display(): Gdk.Display; + get_high_contrast(): boolean; + get_system_supports_color_schemes(): boolean; + set_color_scheme(color_scheme: ColorScheme): void; + static get_default(): StyleManager; + static get_for_display(display: Gdk.Display): StyleManager; +} +export module SwipeTracker { + export interface ConstructorProperties extends GObject.Object.ConstructorProperties { + [key: string]: any; + allow_long_swipes: boolean; + allowLongSwipes: boolean; + allow_mouse_drag: boolean; + allowMouseDrag: boolean; + enabled: boolean; + reversed: boolean; + swipeable: Swipeable; + } +} +export class SwipeTracker extends GObject.Object implements Gtk.Orientable { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get allow_long_swipes(): boolean; + set allow_long_swipes(val: boolean); + get allowLongSwipes(): boolean; + set allowLongSwipes(val: boolean); + get allow_mouse_drag(): boolean; + set allow_mouse_drag(val: boolean); + get allowMouseDrag(): boolean; + set allowMouseDrag(val: boolean); + get enabled(): boolean; + set enabled(val: boolean); + get reversed(): boolean; + set reversed(val: boolean); + get swipeable(): Swipeable; + + // Signals + + connect(id: string, callback: (...args: any[]) => any): number; + connect_after(id: string, callback: (...args: any[]) => any): number; + emit(id: string, ...args: any[]): void; + connect(signal: "begin-swipe", callback: (_source: this) => void): number; + connect_after(signal: "begin-swipe", callback: (_source: this) => void): number; + emit(signal: "begin-swipe"): void; + connect(signal: "end-swipe", callback: (_source: this, velocity: number, to: number) => void): number; + connect_after(signal: "end-swipe", callback: (_source: this, velocity: number, to: number) => void): number; + emit(signal: "end-swipe", velocity: number, to: number): void; + connect(signal: "prepare", callback: (_source: this, direction: NavigationDirection) => void): number; + connect_after(signal: "prepare", callback: (_source: this, direction: NavigationDirection) => void): number; + emit(signal: "prepare", direction: NavigationDirection): void; + connect(signal: "update-swipe", callback: (_source: this, progress: number) => void): number; + connect_after(signal: "update-swipe", callback: (_source: this, progress: number) => void): number; + emit(signal: "update-swipe", progress: number): void; + + // Implemented Properties + + get orientation(): Gtk.Orientation; + set orientation(val: Gtk.Orientation); + + // Constructors + + static ["new"](swipeable: Swipeable): SwipeTracker; + + // Members + + get_allow_long_swipes(): boolean; + get_allow_mouse_drag(): boolean; + get_enabled(): boolean; + get_reversed(): boolean; + get_swipeable(): Swipeable; + set_allow_long_swipes(allow_long_swipes: boolean): void; + set_allow_mouse_drag(allow_mouse_drag: boolean): void; + set_enabled(enabled: boolean): void; + set_reversed(reversed: boolean): void; + shift_position(delta: number): void; + + // Implemented Members + + get_orientation(): Gtk.Orientation; + set_orientation(orientation: Gtk.Orientation): void; +} +export module TabBar { + export interface ConstructorProperties extends Gtk.Widget.ConstructorProperties { + [key: string]: any; + autohide: boolean; + end_action_widget: Gtk.Widget; + endActionWidget: Gtk.Widget; + expand_tabs: boolean; + expandTabs: boolean; + inverted: boolean; + is_overflowing: boolean; + isOverflowing: boolean; + start_action_widget: Gtk.Widget; + startActionWidget: Gtk.Widget; + tabs_revealed: boolean; + tabsRevealed: boolean; + view: TabView; + } +} +export class TabBar extends Gtk.Widget implements Gtk.Accessible, Gtk.Buildable, Gtk.ConstraintTarget { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get autohide(): boolean; + set autohide(val: boolean); + get end_action_widget(): Gtk.Widget; + set end_action_widget(val: Gtk.Widget); + get endActionWidget(): Gtk.Widget; + set endActionWidget(val: Gtk.Widget); + get expand_tabs(): boolean; + set expand_tabs(val: boolean); + get expandTabs(): boolean; + set expandTabs(val: boolean); + get inverted(): boolean; + set inverted(val: boolean); + get is_overflowing(): boolean; + get isOverflowing(): boolean; + get start_action_widget(): Gtk.Widget; + set start_action_widget(val: Gtk.Widget); + get startActionWidget(): Gtk.Widget; + set startActionWidget(val: Gtk.Widget); + get tabs_revealed(): boolean; + get tabsRevealed(): boolean; + get view(): TabView; + set view(val: TabView); + + // Signals + + connect(id: string, callback: (...args: any[]) => any): number; + connect_after(id: string, callback: (...args: any[]) => any): number; + emit(id: string, ...args: any[]): void; + connect( + signal: "extra-drag-drop", + callback: (_source: this, page: TabPage, value: GObject.Value) => boolean + ): number; + connect_after( + signal: "extra-drag-drop", + callback: (_source: this, page: TabPage, value: GObject.Value) => boolean + ): number; + emit(signal: "extra-drag-drop", page: TabPage, value: GObject.Value | any): void; + + // Implemented Properties + + get accessible_role(): Gtk.AccessibleRole; + set accessible_role(val: Gtk.AccessibleRole); + get accessibleRole(): Gtk.AccessibleRole; + set accessibleRole(val: Gtk.AccessibleRole); + + // Constructors + + static ["new"](): TabBar; + + // Members + + get_autohide(): boolean; + get_end_action_widget(): Gtk.Widget | null; + get_expand_tabs(): boolean; + get_inverted(): boolean; + get_is_overflowing(): boolean; + get_start_action_widget(): Gtk.Widget | null; + get_tabs_revealed(): boolean; + get_view(): TabView | null; + set_autohide(autohide: boolean): void; + set_end_action_widget(widget?: Gtk.Widget | null): void; + set_expand_tabs(expand_tabs: boolean): void; + set_inverted(inverted: boolean): void; + set_start_action_widget(widget?: Gtk.Widget | null): void; + set_view(view?: TabView | null): void; + setup_extra_drop_target(actions: Gdk.DragAction, types?: GObject.GType[] | null): void; + + // Implemented Members + + get_accessible_role(): Gtk.AccessibleRole; + reset_property(property: Gtk.AccessibleProperty): void; + reset_relation(relation: Gtk.AccessibleRelation): void; + reset_state(state: Gtk.AccessibleState): void; + update_property(properties: Gtk.AccessibleProperty[], values: GObject.Value[]): void; + update_relation(relations: Gtk.AccessibleRelation[], values: GObject.Value[]): void; + update_state(states: Gtk.AccessibleState[], values: GObject.Value[]): void; + get_buildable_id(): string | null; + vfunc_add_child(builder: Gtk.Builder, child: GObject.Object, type?: string | null): void; + vfunc_custom_finished(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_end(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_start( + builder: Gtk.Builder, + child: GObject.Object | null, + tagname: string + ): [boolean, Gtk.BuildableParser, any | null]; + vfunc_get_id(): string; + vfunc_get_internal_child(builder: Gtk.Builder, childname: string): T; + vfunc_parser_finished(builder: Gtk.Builder): void; + vfunc_set_buildable_property(builder: Gtk.Builder, name: string, value: GObject.Value | any): void; + vfunc_set_id(id: string): void; +} +export module TabPage { + export interface ConstructorProperties extends GObject.Object.ConstructorProperties { + [key: string]: any; + child: Gtk.Widget; + icon: Gio.Icon; + indicator_activatable: boolean; + indicatorActivatable: boolean; + indicator_icon: Gio.Icon; + indicatorIcon: Gio.Icon; + loading: boolean; + needs_attention: boolean; + needsAttention: boolean; + pinned: boolean; + selected: boolean; + title: string; + tooltip: string; + } +} +export class TabPage extends GObject.Object { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get child(): Gtk.Widget; + get icon(): Gio.Icon; + set icon(val: Gio.Icon); + get indicator_activatable(): boolean; + set indicator_activatable(val: boolean); + get indicatorActivatable(): boolean; + set indicatorActivatable(val: boolean); + get indicator_icon(): Gio.Icon; + set indicator_icon(val: Gio.Icon); + get indicatorIcon(): Gio.Icon; + set indicatorIcon(val: Gio.Icon); + get loading(): boolean; + set loading(val: boolean); + get needs_attention(): boolean; + set needs_attention(val: boolean); + get needsAttention(): boolean; + set needsAttention(val: boolean); + get pinned(): boolean; + get selected(): boolean; + get title(): string; + set title(val: string); + get tooltip(): string; + set tooltip(val: string); + + // Members + + get_child(): Gtk.Widget; + get_icon(): Gio.Icon | null; + get_indicator_activatable(): boolean; + get_indicator_icon(): Gio.Icon | null; + get_loading(): boolean; + get_needs_attention(): boolean; + get_parent(): TabPage | null; + get_pinned(): boolean; + get_selected(): boolean; + get_title(): string; + get_tooltip(): string | null; + set_icon(icon?: Gio.Icon | null): void; + set_indicator_activatable(activatable: boolean): void; + set_indicator_icon(indicator_icon?: Gio.Icon | null): void; + set_loading(loading: boolean): void; + set_needs_attention(needs_attention: boolean): void; + set_title(title: string): void; + set_tooltip(tooltip: string): void; +} +export module TabView { + export interface ConstructorProperties extends Gtk.Widget.ConstructorProperties { + [key: string]: any; + default_icon: Gio.Icon; + defaultIcon: Gio.Icon; + is_transferring_page: boolean; + isTransferringPage: boolean; + menu_model: Gio.MenuModel; + menuModel: Gio.MenuModel; + n_pages: number; + nPages: number; + n_pinned_pages: number; + nPinnedPages: number; + pages: Gtk.SelectionModel; + selected_page: TabPage; + selectedPage: TabPage; + } +} +export class TabView extends Gtk.Widget implements Gtk.Accessible, Gtk.Buildable, Gtk.ConstraintTarget { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get default_icon(): Gio.Icon; + set default_icon(val: Gio.Icon); + get defaultIcon(): Gio.Icon; + set defaultIcon(val: Gio.Icon); + get is_transferring_page(): boolean; + get isTransferringPage(): boolean; + get menu_model(): Gio.MenuModel; + set menu_model(val: Gio.MenuModel); + get menuModel(): Gio.MenuModel; + set menuModel(val: Gio.MenuModel); + get n_pages(): number; + get nPages(): number; + get n_pinned_pages(): number; + get nPinnedPages(): number; + get pages(): Gtk.SelectionModel; + get selected_page(): TabPage; + set selected_page(val: TabPage); + get selectedPage(): TabPage; + set selectedPage(val: TabPage); + + // Signals + + connect(id: string, callback: (...args: any[]) => any): number; + connect_after(id: string, callback: (...args: any[]) => any): number; + emit(id: string, ...args: any[]): void; + connect(signal: "close-page", callback: (_source: this, page: TabPage) => boolean): number; + connect_after(signal: "close-page", callback: (_source: this, page: TabPage) => boolean): number; + emit(signal: "close-page", page: TabPage): void; + connect(signal: "create-window", callback: (_source: this) => TabView | null): number; + connect_after(signal: "create-window", callback: (_source: this) => TabView | null): number; + emit(signal: "create-window"): void; + connect(signal: "indicator-activated", callback: (_source: this, page: TabPage) => void): number; + connect_after(signal: "indicator-activated", callback: (_source: this, page: TabPage) => void): number; + emit(signal: "indicator-activated", page: TabPage): void; + connect(signal: "page-attached", callback: (_source: this, page: TabPage, position: number) => void): number; + connect_after(signal: "page-attached", callback: (_source: this, page: TabPage, position: number) => void): number; + emit(signal: "page-attached", page: TabPage, position: number): void; + connect(signal: "page-detached", callback: (_source: this, page: TabPage, position: number) => void): number; + connect_after(signal: "page-detached", callback: (_source: this, page: TabPage, position: number) => void): number; + emit(signal: "page-detached", page: TabPage, position: number): void; + connect(signal: "page-reordered", callback: (_source: this, page: TabPage, position: number) => void): number; + connect_after(signal: "page-reordered", callback: (_source: this, page: TabPage, position: number) => void): number; + emit(signal: "page-reordered", page: TabPage, position: number): void; + connect(signal: "setup-menu", callback: (_source: this, page: TabPage | null) => void): number; + connect_after(signal: "setup-menu", callback: (_source: this, page: TabPage | null) => void): number; + emit(signal: "setup-menu", page: TabPage | null): void; + + // Implemented Properties + + get accessible_role(): Gtk.AccessibleRole; + set accessible_role(val: Gtk.AccessibleRole); + get accessibleRole(): Gtk.AccessibleRole; + set accessibleRole(val: Gtk.AccessibleRole); + + // Constructors + + static ["new"](): TabView; + + // Members + + add_page(child: Gtk.Widget, parent?: TabPage | null): TabPage; + append(child: Gtk.Widget): TabPage; + append_pinned(child: Gtk.Widget): TabPage; + close_other_pages(page: TabPage): void; + close_page(page: TabPage): void; + close_page_finish(page: TabPage, confirm: boolean): void; + close_pages_after(page: TabPage): void; + close_pages_before(page: TabPage): void; + get_default_icon(): Gio.Icon; + get_is_transferring_page(): boolean; + get_menu_model(): Gio.MenuModel | null; + get_n_pages(): number; + get_n_pinned_pages(): number; + get_nth_page(position: number): TabPage; + get_page(child: Gtk.Widget): TabPage; + get_page_position(page: TabPage): number; + get_pages(): Gtk.SelectionModel; + get_selected_page(): TabPage | null; + insert(child: Gtk.Widget, position: number): TabPage; + insert_pinned(child: Gtk.Widget, position: number): TabPage; + prepend(child: Gtk.Widget): TabPage; + prepend_pinned(child: Gtk.Widget): TabPage; + reorder_backward(page: TabPage): boolean; + reorder_first(page: TabPage): boolean; + reorder_forward(page: TabPage): boolean; + reorder_last(page: TabPage): boolean; + reorder_page(page: TabPage, position: number): boolean; + select_next_page(): boolean; + select_previous_page(): boolean; + set_default_icon(default_icon: Gio.Icon): void; + set_menu_model(menu_model?: Gio.MenuModel | null): void; + set_page_pinned(page: TabPage, pinned: boolean): void; + set_selected_page(selected_page: TabPage): void; + transfer_page(page: TabPage, other_view: TabView, position: number): void; + + // Implemented Members + + get_accessible_role(): Gtk.AccessibleRole; + reset_property(property: Gtk.AccessibleProperty): void; + reset_relation(relation: Gtk.AccessibleRelation): void; + reset_state(state: Gtk.AccessibleState): void; + update_property(properties: Gtk.AccessibleProperty[], values: GObject.Value[]): void; + update_relation(relations: Gtk.AccessibleRelation[], values: GObject.Value[]): void; + update_state(states: Gtk.AccessibleState[], values: GObject.Value[]): void; + get_buildable_id(): string | null; + vfunc_add_child(builder: Gtk.Builder, child: GObject.Object, type?: string | null): void; + vfunc_custom_finished(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_end(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_start( + builder: Gtk.Builder, + child: GObject.Object | null, + tagname: string + ): [boolean, Gtk.BuildableParser, any | null]; + vfunc_get_id(): string; + vfunc_get_internal_child(builder: Gtk.Builder, childname: string): T; + vfunc_parser_finished(builder: Gtk.Builder): void; + vfunc_set_buildable_property(builder: Gtk.Builder, name: string, value: GObject.Value | any): void; + vfunc_set_id(id: string): void; +} +export module TimedAnimation { + export interface ConstructorProperties extends Animation.ConstructorProperties { + [key: string]: any; + alternate: boolean; + duration: number; + easing: Easing; + repeat_count: number; + repeatCount: number; + reverse: boolean; + value_from: number; + valueFrom: number; + value_to: number; + valueTo: number; + } +} +export class TimedAnimation extends Animation { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get alternate(): boolean; + set alternate(val: boolean); + get duration(): number; + set duration(val: number); + get easing(): Easing; + set easing(val: Easing); + get repeat_count(): number; + set repeat_count(val: number); + get repeatCount(): number; + set repeatCount(val: number); + get reverse(): boolean; + set reverse(val: boolean); + get value_from(): number; + set value_from(val: number); + get valueFrom(): number; + set valueFrom(val: number); + get value_to(): number; + set value_to(val: number); + get valueTo(): number; + set valueTo(val: number); + + // Constructors + + static ["new"]( + widget: Gtk.Widget, + from: number, + to: number, + duration: number, + target: AnimationTarget + ): TimedAnimation; + + // Members + + get_alternate(): boolean; + get_duration(): number; + get_easing(): Easing; + get_repeat_count(): number; + get_reverse(): boolean; + get_value_from(): number; + get_value_to(): number; + set_alternate(alternate: boolean): void; + set_duration(duration: number): void; + set_easing(easing: Easing): void; + set_repeat_count(repeat_count: number): void; + set_reverse(reverse: boolean): void; + set_value_from(value: number): void; + set_value_to(value: number): void; +} +export module Toast { + export interface ConstructorProperties extends GObject.Object.ConstructorProperties { + [key: string]: any; + action_name: string; + actionName: string; + action_target: GLib.Variant; + actionTarget: GLib.Variant; + button_label: string; + buttonLabel: string; + priority: ToastPriority; + timeout: number; + title: string; + } +} +export class Toast extends GObject.Object { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get action_name(): string; + set action_name(val: string); + get actionName(): string; + set actionName(val: string); + get action_target(): GLib.Variant; + set action_target(val: GLib.Variant); + get actionTarget(): GLib.Variant; + set actionTarget(val: GLib.Variant); + get button_label(): string; + set button_label(val: string); + get buttonLabel(): string; + set buttonLabel(val: string); + get priority(): ToastPriority; + set priority(val: ToastPriority); + get timeout(): number; + set timeout(val: number); + get title(): string; + set title(val: string); + + // Signals + + connect(id: string, callback: (...args: any[]) => any): number; + connect_after(id: string, callback: (...args: any[]) => any): number; + emit(id: string, ...args: any[]): void; + connect(signal: "dismissed", callback: (_source: this) => void): number; + connect_after(signal: "dismissed", callback: (_source: this) => void): number; + emit(signal: "dismissed"): void; + + // Constructors + + static ["new"](title: string): Toast; + + // Members + + dismiss(): void; + get_action_name(): string | null; + get_action_target_value(): GLib.Variant | null; + get_button_label(): string | null; + get_priority(): ToastPriority; + get_timeout(): number; + get_title(): string; + set_action_name(action_name?: string | null): void; + set_action_target_value(action_target?: GLib.Variant | null): void; + set_button_label(button_label?: string | null): void; + set_detailed_action_name(detailed_action_name?: string | null): void; + set_priority(priority: ToastPriority): void; + set_timeout(timeout: number): void; + set_title(title: string): void; +} +export module ToastOverlay { + export interface ConstructorProperties extends Gtk.Widget.ConstructorProperties { + [key: string]: any; + child: Gtk.Widget; + } +} +export class ToastOverlay extends Gtk.Widget implements Gtk.Accessible, Gtk.Buildable, Gtk.ConstraintTarget { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get child(): Gtk.Widget; + set child(val: Gtk.Widget); + + // Implemented Properties + + get accessible_role(): Gtk.AccessibleRole; + set accessible_role(val: Gtk.AccessibleRole); + get accessibleRole(): Gtk.AccessibleRole; + set accessibleRole(val: Gtk.AccessibleRole); + + // Constructors + + static ["new"](): ToastOverlay; + + // Members + + add_toast(toast: Toast): void; + get_child(): Gtk.Widget | null; + set_child(child?: Gtk.Widget | null): void; + + // Implemented Members + + get_accessible_role(): Gtk.AccessibleRole; + reset_property(property: Gtk.AccessibleProperty): void; + reset_relation(relation: Gtk.AccessibleRelation): void; + reset_state(state: Gtk.AccessibleState): void; + update_property(properties: Gtk.AccessibleProperty[], values: GObject.Value[]): void; + update_relation(relations: Gtk.AccessibleRelation[], values: GObject.Value[]): void; + update_state(states: Gtk.AccessibleState[], values: GObject.Value[]): void; + get_buildable_id(): string | null; + vfunc_add_child(builder: Gtk.Builder, child: GObject.Object, type?: string | null): void; + vfunc_custom_finished(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_end(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_start( + builder: Gtk.Builder, + child: GObject.Object | null, + tagname: string + ): [boolean, Gtk.BuildableParser, any | null]; + vfunc_get_id(): string; + vfunc_get_internal_child(builder: Gtk.Builder, childname: string): T; + vfunc_parser_finished(builder: Gtk.Builder): void; + vfunc_set_buildable_property(builder: Gtk.Builder, name: string, value: GObject.Value | any): void; + vfunc_set_id(id: string): void; +} +export module ViewStack { + export interface ConstructorProperties extends Gtk.Widget.ConstructorProperties { + [key: string]: any; + hhomogeneous: boolean; + pages: Gtk.SelectionModel; + vhomogeneous: boolean; + visible_child: Gtk.Widget; + visibleChild: Gtk.Widget; + visible_child_name: string; + visibleChildName: string; + } +} +export class ViewStack extends Gtk.Widget implements Gtk.Accessible, Gtk.Buildable, Gtk.ConstraintTarget { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get hhomogeneous(): boolean; + set hhomogeneous(val: boolean); + get pages(): Gtk.SelectionModel; + get vhomogeneous(): boolean; + set vhomogeneous(val: boolean); + get visible_child(): Gtk.Widget; + set visible_child(val: Gtk.Widget); + get visibleChild(): Gtk.Widget; + set visibleChild(val: Gtk.Widget); + get visible_child_name(): string; + set visible_child_name(val: string); + get visibleChildName(): string; + set visibleChildName(val: string); + + // Implemented Properties + + get accessible_role(): Gtk.AccessibleRole; + set accessible_role(val: Gtk.AccessibleRole); + get accessibleRole(): Gtk.AccessibleRole; + set accessibleRole(val: Gtk.AccessibleRole); + + // Constructors + + static ["new"](): ViewStack; + + // Members + + add(child: Gtk.Widget): ViewStackPage; + add_named(child: Gtk.Widget, name?: string | null): ViewStackPage; + add_titled(child: Gtk.Widget, name: string | null, title: string): ViewStackPage; + get_child_by_name(name: string): Gtk.Widget | null; + get_hhomogeneous(): boolean; + get_page(child: Gtk.Widget): ViewStackPage; + get_pages(): Gtk.SelectionModel; + get_vhomogeneous(): boolean; + get_visible_child(): Gtk.Widget | null; + get_visible_child_name(): string | null; + remove(child: Gtk.Widget): void; + set_hhomogeneous(hhomogeneous: boolean): void; + set_vhomogeneous(vhomogeneous: boolean): void; + set_visible_child(child: Gtk.Widget): void; + set_visible_child_name(name: string): void; + + // Implemented Members + + get_accessible_role(): Gtk.AccessibleRole; + reset_property(property: Gtk.AccessibleProperty): void; + reset_relation(relation: Gtk.AccessibleRelation): void; + reset_state(state: Gtk.AccessibleState): void; + update_property(properties: Gtk.AccessibleProperty[], values: GObject.Value[]): void; + update_relation(relations: Gtk.AccessibleRelation[], values: GObject.Value[]): void; + update_state(states: Gtk.AccessibleState[], values: GObject.Value[]): void; + get_buildable_id(): string | null; + vfunc_add_child(builder: Gtk.Builder, child: GObject.Object, type?: string | null): void; + vfunc_custom_finished(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_end(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_start( + builder: Gtk.Builder, + child: GObject.Object | null, + tagname: string + ): [boolean, Gtk.BuildableParser, any | null]; + vfunc_get_id(): string; + vfunc_get_internal_child(builder: Gtk.Builder, childname: string): T; + vfunc_parser_finished(builder: Gtk.Builder): void; + vfunc_set_buildable_property(builder: Gtk.Builder, name: string, value: GObject.Value | any): void; + vfunc_set_id(id: string): void; +} +export module ViewStackPage { + export interface ConstructorProperties extends GObject.Object.ConstructorProperties { + [key: string]: any; + badge_number: number; + badgeNumber: number; + child: Gtk.Widget; + icon_name: string; + iconName: string; + name: string; + needs_attention: boolean; + needsAttention: boolean; + title: string; + use_underline: boolean; + useUnderline: boolean; + visible: boolean; + } +} +export class ViewStackPage extends GObject.Object { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get badge_number(): number; + set badge_number(val: number); + get badgeNumber(): number; + set badgeNumber(val: number); + get child(): Gtk.Widget; + get icon_name(): string; + set icon_name(val: string); + get iconName(): string; + set iconName(val: string); + get name(): string; + set name(val: string); + get needs_attention(): boolean; + set needs_attention(val: boolean); + get needsAttention(): boolean; + set needsAttention(val: boolean); + get title(): string; + set title(val: string); + get use_underline(): boolean; + set use_underline(val: boolean); + get useUnderline(): boolean; + set useUnderline(val: boolean); + get visible(): boolean; + set visible(val: boolean); + + // Members + + get_badge_number(): number; + get_child(): Gtk.Widget; + get_icon_name(): string | null; + get_name(): string | null; + get_needs_attention(): boolean; + get_title(): string | null; + get_use_underline(): boolean; + get_visible(): boolean; + set_badge_number(badge_number: number): void; + set_icon_name(icon_name?: string | null): void; + set_name(name?: string | null): void; + set_needs_attention(needs_attention: boolean): void; + set_title(title?: string | null): void; + set_use_underline(use_underline: boolean): void; + set_visible(visible: boolean): void; +} +export module ViewSwitcher { + export interface ConstructorProperties extends Gtk.Widget.ConstructorProperties { + [key: string]: any; + policy: ViewSwitcherPolicy; + stack: ViewStack; + } +} +export class ViewSwitcher extends Gtk.Widget implements Gtk.Accessible, Gtk.Buildable, Gtk.ConstraintTarget { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get policy(): ViewSwitcherPolicy; + set policy(val: ViewSwitcherPolicy); + get stack(): ViewStack; + set stack(val: ViewStack); + + // Implemented Properties + + get accessible_role(): Gtk.AccessibleRole; + set accessible_role(val: Gtk.AccessibleRole); + get accessibleRole(): Gtk.AccessibleRole; + set accessibleRole(val: Gtk.AccessibleRole); + + // Constructors + + static ["new"](): ViewSwitcher; + + // Members + + get_policy(): ViewSwitcherPolicy; + get_stack(): ViewStack | null; + set_policy(policy: ViewSwitcherPolicy): void; + set_stack(stack?: ViewStack | null): void; + + // Implemented Members + + get_accessible_role(): Gtk.AccessibleRole; + reset_property(property: Gtk.AccessibleProperty): void; + reset_relation(relation: Gtk.AccessibleRelation): void; + reset_state(state: Gtk.AccessibleState): void; + update_property(properties: Gtk.AccessibleProperty[], values: GObject.Value[]): void; + update_relation(relations: Gtk.AccessibleRelation[], values: GObject.Value[]): void; + update_state(states: Gtk.AccessibleState[], values: GObject.Value[]): void; + get_buildable_id(): string | null; + vfunc_add_child(builder: Gtk.Builder, child: GObject.Object, type?: string | null): void; + vfunc_custom_finished(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_end(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_start( + builder: Gtk.Builder, + child: GObject.Object | null, + tagname: string + ): [boolean, Gtk.BuildableParser, any | null]; + vfunc_get_id(): string; + vfunc_get_internal_child(builder: Gtk.Builder, childname: string): T; + vfunc_parser_finished(builder: Gtk.Builder): void; + vfunc_set_buildable_property(builder: Gtk.Builder, name: string, value: GObject.Value | any): void; + vfunc_set_id(id: string): void; +} +export module ViewSwitcherBar { + export interface ConstructorProperties extends Gtk.Widget.ConstructorProperties { + [key: string]: any; + reveal: boolean; + stack: ViewStack; + } +} +export class ViewSwitcherBar extends Gtk.Widget implements Gtk.Accessible, Gtk.Buildable, Gtk.ConstraintTarget { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get reveal(): boolean; + set reveal(val: boolean); + get stack(): ViewStack; + set stack(val: ViewStack); + + // Implemented Properties + + get accessible_role(): Gtk.AccessibleRole; + set accessible_role(val: Gtk.AccessibleRole); + get accessibleRole(): Gtk.AccessibleRole; + set accessibleRole(val: Gtk.AccessibleRole); + + // Constructors + + static ["new"](): ViewSwitcherBar; + + // Members + + get_reveal(): boolean; + get_stack(): ViewStack | null; + set_reveal(reveal: boolean): void; + set_stack(stack?: ViewStack | null): void; + + // Implemented Members + + get_accessible_role(): Gtk.AccessibleRole; + reset_property(property: Gtk.AccessibleProperty): void; + reset_relation(relation: Gtk.AccessibleRelation): void; + reset_state(state: Gtk.AccessibleState): void; + update_property(properties: Gtk.AccessibleProperty[], values: GObject.Value[]): void; + update_relation(relations: Gtk.AccessibleRelation[], values: GObject.Value[]): void; + update_state(states: Gtk.AccessibleState[], values: GObject.Value[]): void; + get_buildable_id(): string | null; + vfunc_add_child(builder: Gtk.Builder, child: GObject.Object, type?: string | null): void; + vfunc_custom_finished(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_end(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_start( + builder: Gtk.Builder, + child: GObject.Object | null, + tagname: string + ): [boolean, Gtk.BuildableParser, any | null]; + vfunc_get_id(): string; + vfunc_get_internal_child(builder: Gtk.Builder, childname: string): T; + vfunc_parser_finished(builder: Gtk.Builder): void; + vfunc_set_buildable_property(builder: Gtk.Builder, name: string, value: GObject.Value | any): void; + vfunc_set_id(id: string): void; +} +export module ViewSwitcherTitle { + export interface ConstructorProperties extends Gtk.Widget.ConstructorProperties { + [key: string]: any; + stack: ViewStack; + subtitle: string; + title: string; + title_visible: boolean; + titleVisible: boolean; + view_switcher_enabled: boolean; + viewSwitcherEnabled: boolean; + } +} +export class ViewSwitcherTitle extends Gtk.Widget implements Gtk.Accessible, Gtk.Buildable, Gtk.ConstraintTarget { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get stack(): ViewStack; + set stack(val: ViewStack); + get subtitle(): string; + set subtitle(val: string); + get title(): string; + set title(val: string); + get title_visible(): boolean; + get titleVisible(): boolean; + get view_switcher_enabled(): boolean; + set view_switcher_enabled(val: boolean); + get viewSwitcherEnabled(): boolean; + set viewSwitcherEnabled(val: boolean); + + // Implemented Properties + + get accessible_role(): Gtk.AccessibleRole; + set accessible_role(val: Gtk.AccessibleRole); + get accessibleRole(): Gtk.AccessibleRole; + set accessibleRole(val: Gtk.AccessibleRole); + + // Constructors + + static ["new"](): ViewSwitcherTitle; + + // Members + + get_stack(): ViewStack | null; + get_subtitle(): string; + get_title(): string; + get_title_visible(): boolean; + get_view_switcher_enabled(): boolean; + set_stack(stack?: ViewStack | null): void; + set_subtitle(subtitle: string): void; + set_title(title: string): void; + set_view_switcher_enabled(enabled: boolean): void; + + // Implemented Members + + get_accessible_role(): Gtk.AccessibleRole; + reset_property(property: Gtk.AccessibleProperty): void; + reset_relation(relation: Gtk.AccessibleRelation): void; + reset_state(state: Gtk.AccessibleState): void; + update_property(properties: Gtk.AccessibleProperty[], values: GObject.Value[]): void; + update_relation(relations: Gtk.AccessibleRelation[], values: GObject.Value[]): void; + update_state(states: Gtk.AccessibleState[], values: GObject.Value[]): void; + get_buildable_id(): string | null; + vfunc_add_child(builder: Gtk.Builder, child: GObject.Object, type?: string | null): void; + vfunc_custom_finished(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_end(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_start( + builder: Gtk.Builder, + child: GObject.Object | null, + tagname: string + ): [boolean, Gtk.BuildableParser, any | null]; + vfunc_get_id(): string; + vfunc_get_internal_child(builder: Gtk.Builder, childname: string): T; + vfunc_parser_finished(builder: Gtk.Builder): void; + vfunc_set_buildable_property(builder: Gtk.Builder, name: string, value: GObject.Value | any): void; + vfunc_set_id(id: string): void; +} +export module Window { + export interface ConstructorProperties extends Gtk.Window.ConstructorProperties { + [key: string]: any; + content: Gtk.Widget; + } +} +export class Window + extends Gtk.Window + implements Gtk.Accessible, Gtk.Buildable, Gtk.ConstraintTarget, Gtk.Native, Gtk.Root, Gtk.ShortcutManager +{ + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get content(): Gtk.Widget; + set content(val: Gtk.Widget); + + // Constructors + + static ["new"](): Window; + + // Members + + get_content(): Gtk.Widget | null; + set_content(content?: Gtk.Widget | null): void; + + // Implemented Members + + get_renderer(): Gsk.Renderer; + get_surface(): Gdk.Surface; + get_surface_transform(): [number, number]; + realize(): void; + unrealize(): void; + get_display(): Gdk.Display; + get_focus(): Gtk.Widget | null; + set_focus(focus?: Gtk.Widget | null): void; + vfunc_add_controller(controller: Gtk.ShortcutController): void; + vfunc_remove_controller(controller: Gtk.ShortcutController): void; +} +export module WindowTitle { + export interface ConstructorProperties extends Gtk.Widget.ConstructorProperties { + [key: string]: any; + subtitle: string; + title: string; + } +} +export class WindowTitle extends Gtk.Widget implements Gtk.Accessible, Gtk.Buildable, Gtk.ConstraintTarget { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get subtitle(): string; + set subtitle(val: string); + get title(): string; + set title(val: string); + + // Implemented Properties + + get accessible_role(): Gtk.AccessibleRole; + set accessible_role(val: Gtk.AccessibleRole); + get accessibleRole(): Gtk.AccessibleRole; + set accessibleRole(val: Gtk.AccessibleRole); + + // Constructors + + static ["new"](title: string, subtitle: string): WindowTitle; + + // Members + + get_subtitle(): string; + get_title(): string; + set_subtitle(subtitle: string): void; + set_title(title: string): void; + + // Implemented Members + + get_accessible_role(): Gtk.AccessibleRole; + reset_property(property: Gtk.AccessibleProperty): void; + reset_relation(relation: Gtk.AccessibleRelation): void; + reset_state(state: Gtk.AccessibleState): void; + update_property(properties: Gtk.AccessibleProperty[], values: GObject.Value[]): void; + update_relation(relations: Gtk.AccessibleRelation[], values: GObject.Value[]): void; + update_state(states: Gtk.AccessibleState[], values: GObject.Value[]): void; + get_buildable_id(): string | null; + vfunc_add_child(builder: Gtk.Builder, child: GObject.Object, type?: string | null): void; + vfunc_custom_finished(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_end(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data?: any | null): void; + vfunc_custom_tag_start( + builder: Gtk.Builder, + child: GObject.Object | null, + tagname: string + ): [boolean, Gtk.BuildableParser, any | null]; + vfunc_get_id(): string; + vfunc_get_internal_child(builder: Gtk.Builder, childname: string): T; + vfunc_parser_finished(builder: Gtk.Builder): void; + vfunc_set_buildable_property(builder: Gtk.Builder, name: string, value: GObject.Value | any): void; + vfunc_set_id(id: string): void; +} + +export class SpringParams { + static $gtype: GObject.GType; + + constructor(damping_ratio: number, mass: number, stiffness: number); + constructor(copy: SpringParams); + + // Constructors + static ["new"](damping_ratio: number, mass: number, stiffness: number): SpringParams; + static new_full(damping: number, mass: number, stiffness: number): SpringParams; + + // Members + get_damping(): number; + get_damping_ratio(): number; + get_mass(): number; + get_stiffness(): number; + ref(): SpringParams; + unref(): void; +} + +export interface SwipeableNamespace { + $gtype: GObject.GType; + prototype: SwipeablePrototype; +} +export type Swipeable = SwipeablePrototype; +export interface SwipeablePrototype extends Gtk.Widget { + // Members + + get_cancel_progress(): number; + get_distance(): number; + get_progress(): number; + get_snap_points(): number[]; + get_swipe_area(navigation_direction: NavigationDirection, is_drag: boolean): Gdk.Rectangle; + vfunc_get_cancel_progress(): number; + vfunc_get_distance(): number; + vfunc_get_progress(): number; + vfunc_get_snap_points(): number[]; + vfunc_get_swipe_area(navigation_direction: NavigationDirection, is_drag: boolean): Gdk.Rectangle; +} + +export const Swipeable: SwipeableNamespace; diff --git a/package-lock.json b/package-lock.json index 1da0e77..fe163a7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,21 +16,26 @@ "yargs": "^17.4.0" }, "devDependencies": { + "@gi-types/base-types": "^1.0.0", "@gi-types/clutter8": "^8.0.0", "@gi-types/gio2": "^2.68.0", "@gi-types/gjs-environment": "^1.0.0", "@gi-types/glib2": "^2.68.0", "@gi-types/gobject2": "^2.68.0", "@gi-types/gtk4": "^4.2.0", + "@gi-types/gtk4-types": "^1.0.0", "@gi-types/meta8": "^8.0.0", "@gi-types/shell0": "^0.1.0", "@gi-types/st1": "^1.0.0", + "@gi.ts/cli": "^1.5.7", + "@gi.ts/lib": "^1.5.9", "@types/glob": "^7.2.0", "@types/node": "^17.0.23", "@types/yargs": "^17.0.10", "@typescript-eslint/eslint-plugin": "^5.18.0", "@typescript-eslint/parser": "^5.18.0", - "eslint": "^8.12.0" + "eslint": "^8.12.0", + "typescript": "^4.3.5" } }, "node_modules/@eslint/eslintrc": { @@ -53,6 +58,17 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, + "node_modules/@gi-types/accountsservice1": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/accountsservice1/-/accountsservice1-1.0.0.tgz", + "integrity": "sha512-EbtQcheg/Xj5y4k4/HoYr6y2VX80zf93SO4lEN0f6lrdUWKwndEZ5h24bgsDlv2+PoVlrgD6U9OLuRnniKWfFw==", + "dev": true, + "dependencies": { + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0" + } + }, "node_modules/@gi-types/atk1": { "version": "2.36.0", "resolved": "https://registry.npmjs.org/@gi-types/atk1/-/atk1-2.36.0.tgz", @@ -63,6 +79,56 @@ "@gi-types/gobject2": "^2.68.0" } }, + "node_modules/@gi-types/atspi2": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/atspi2/-/atspi2-2.0.0.tgz", + "integrity": "sha512-B6E6YUEi74ylX2XVRVOhK2jwZhXijcmd2UUp9XdOXg3Ja8Z9+NleOVugShsK7v6B55E3Qzj+W8PyW2ucBnAKVA==", + "dev": true, + "dependencies": { + "@gi-types/dbus1": "^1.0.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0" + } + }, + "node_modules/@gi-types/base-types": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/base-types/-/base-types-1.0.0.tgz", + "integrity": "sha512-A+TMfI4f+RgBx5uM5la4tqRrraP8N9B3SDFFPvYyH3h9VMcy03/Fp4X0LVtHuYdAUHmdRR8Z4Got9lwVd975+g==", + "dev": true, + "dependencies": { + "@gi-types/accountsservice1": "^1.0.0", + "@gi-types/atk1": "*", + "@gi-types/atspi2": "*", + "@gi-types/cairo1": "*", + "@gi-types/dbus1": "*", + "@gi-types/gck1": "*", + "@gi-types/gcr3": "*", + "@gi-types/gdkpixbuf2": "*", + "@gi-types/gdm1": "*", + "@gi-types/geoclue2": "*", + "@gi-types/gio2": "*", + "@gi-types/girepository2": "^1.68.0", + "@gi-types/glib2": "*", + "@gi-types/gmodule2": "*", + "@gi-types/gobject2": "*", + "@gi-types/harfbuzz2": "*", + "@gi-types/ibus1": "*", + "@gi-types/json1": "*", + "@gi-types/malcontent0": "*", + "@gi-types/modemmanager1": "*", + "@gi-types/nm1": "*", + "@gi-types/notify0": "*", + "@gi-types/pango1": "*", + "@gi-types/polkit1": "*", + "@gi-types/polkitagent1": "*", + "@gi-types/rsvg2": "*", + "@gi-types/soup2": "*", + "@gi-types/telepathyglib0": "*", + "@gi-types/telepathylogger0": "*", + "@gi-types/upowerglib1": "*", + "@gi-types/xlib2": "*" + } + }, "node_modules/@gi-types/cairo1": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@gi-types/cairo1/-/cairo1-1.0.0.tgz", @@ -112,6 +178,15 @@ "@gi-types/graphene1": "^1.0.0" } }, + "node_modules/@gi-types/dbus1": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/dbus1/-/dbus1-1.0.0.tgz", + "integrity": "sha512-MyT8RkHL6vySSpd5UWmDmojBZyC3W6zLtpJykABi0TV+pw+TVXQUghP7aYOiFGaXfiYzzRxBp8JoNq6PHHmw+A==", + "dev": true, + "dependencies": { + "@gi-types/gobject2": "^2.68.0" + } + }, "node_modules/@gi-types/gck1": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@gi-types/gck1/-/gck1-1.0.0.tgz", @@ -184,6 +259,28 @@ "@gi-types/gobject2": "^2.68.0" } }, + "node_modules/@gi-types/gdm1": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/gdm1/-/gdm1-1.0.0.tgz", + "integrity": "sha512-I3p/NPRFRgP2PFLkz64yGNlM5ZGH0ZtWWnivrhEL4Kx7YLfHpRULj1KW2x2W5xIsHMKLwgQmum1qb3dpbQk+Mw==", + "dev": true, + "dependencies": { + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0" + } + }, + "node_modules/@gi-types/geoclue2": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/geoclue2/-/geoclue2-2.0.0.tgz", + "integrity": "sha512-fgtBPESIGkxmKFQ2TIWN2OTfJLj3PYgZUYDa/DPTL0GbLLOZuclLw+Bt+ON2gljf23Lr1CunZqz1f8IcwUzpLQ==", + "dev": true, + "dependencies": { + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0" + } + }, "node_modules/@gi-types/gio2": { "version": "2.68.0", "resolved": "https://registry.npmjs.org/@gi-types/gio2/-/gio2-2.68.0.tgz", @@ -194,6 +291,16 @@ "@gi-types/gobject2": "^2.68.0" } }, + "node_modules/@gi-types/girepository2": { + "version": "1.68.0", + "resolved": "https://registry.npmjs.org/@gi-types/girepository2/-/girepository2-1.68.0.tgz", + "integrity": "sha512-OYTsgMdQ1UWua6Bvx/rSL29qn9CCZ1rMpoBsfvDs5ol+9nNYsxUIl7AvRIojEk/IbWmYh/K9Kv3Mqi3ntB3aTA==", + "dev": true, + "dependencies": { + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0" + } + }, "node_modules/@gi-types/gjs-environment": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@gi-types/gjs-environment/-/gjs-environment-1.0.0.tgz", @@ -289,6 +396,18 @@ "@gi-types/pango1": "^1.0.0" } }, + "node_modules/@gi-types/gtk4-types": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/gtk4-types/-/gtk4-types-1.0.0.tgz", + "integrity": "sha512-Y7SNMhAX9bUBK/HfJbidMePIjsa/7B6WroLR2nZF3afIzqjYgEugmbYWC85516z0+c1/3Z4eXC8V3j1CleXmGQ==", + "dev": true, + "dependencies": { + "@gi-types/gdk4": "*", + "@gi-types/graphene1": "*", + "@gi-types/gsk4": "*", + "@gi-types/gtk4": "*" + } + }, "node_modules/@gi-types/harfbuzz2": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/@gi-types/harfbuzz2/-/harfbuzz2-2.8.1.tgz", @@ -299,6 +418,17 @@ "@gi-types/gobject2": "^2.68.0" } }, + "node_modules/@gi-types/ibus1": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@gi-types/ibus1/-/ibus1-1.5.0.tgz", + "integrity": "sha512-s8122Qp6jU1xgetUgFRaDto5hNKSFNwDITya+nXL9QWqw2Q4MGPHJlwNb+/QHbcc2rZ0dSu39jW+Z/zWpIlzbg==", + "dev": true, + "dependencies": { + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0" + } + }, "node_modules/@gi-types/json1": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/@gi-types/json1/-/json1-1.6.0.tgz", @@ -310,6 +440,17 @@ "@gi-types/gobject2": "^2.68.0" } }, + "node_modules/@gi-types/malcontent0": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/malcontent0/-/malcontent0-0.0.0.tgz", + "integrity": "sha512-btlw8DK4rEbLwC47J6Q2NSom7UiSytPZy5JVPK4/faP45CFOCOQ1aJpi5lNaa9cN5AB+Br5EJFVCMDob6hUu8A==", + "dev": true, + "dependencies": { + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0" + } + }, "node_modules/@gi-types/meta8": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/@gi-types/meta8/-/meta8-8.0.0.tgz", @@ -332,6 +473,17 @@ "@gi-types/xlib2": "^2.0.0" } }, + "node_modules/@gi-types/modemmanager1": { + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/@gi-types/modemmanager1/-/modemmanager1-1.16.0.tgz", + "integrity": "sha512-6pKXtRp+v/TuSS8fsdCTNLDTBp/+cYphmxPhs6UzPxJW56yvmoxbwv+Y5YbKhHxc+hKfBqzP7iNB/JBj+4pF8Q==", + "dev": true, + "dependencies": { + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0" + } + }, "node_modules/@gi-types/nm1": { "version": "1.32.0", "resolved": "https://registry.npmjs.org/@gi-types/nm1/-/nm1-1.32.0.tgz", @@ -343,6 +495,17 @@ "@gi-types/gobject2": "^2.68.0" } }, + "node_modules/@gi-types/notify0": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@gi-types/notify0/-/notify0-0.7.0.tgz", + "integrity": "sha512-trQXuPvPlQ6DHj45THn4tbPHjIZumG6CZkspcAzzjDBK2XLIcDVIbUee5YMQUISiAqNKgKzQWp4C63cRYsFazQ==", + "dev": true, + "dependencies": { + "@gi-types/gdkpixbuf2": "^2.0.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0" + } + }, "node_modules/@gi-types/pango1": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@gi-types/pango1/-/pango1-1.0.0.tgz", @@ -377,6 +540,19 @@ "@gi-types/polkit1": "^1.0.0" } }, + "node_modules/@gi-types/rsvg2": { + "version": "2.50.0", + "resolved": "https://registry.npmjs.org/@gi-types/rsvg2/-/rsvg2-2.50.0.tgz", + "integrity": "sha512-KfODNokeIxse65cah4IVPdDmZ4A8NcKQuhUOldcx259vQZz8VzYbAJiCw9PZ3BKZFqqEMitX3YSnzlHPZ0xK1Q==", + "dev": true, + "dependencies": { + "@gi-types/cairo1": "^1.0.0", + "@gi-types/gdkpixbuf2": "^2.0.0", + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0" + } + }, "node_modules/@gi-types/shell0": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/@gi-types/shell0/-/shell0-0.1.0.tgz", @@ -399,6 +575,17 @@ "@gi-types/st1": "^1.0.0" } }, + "node_modules/@gi-types/soup2": { + "version": "2.72.0", + "resolved": "https://registry.npmjs.org/@gi-types/soup2/-/soup2-2.72.0.tgz", + "integrity": "sha512-PGCUaj9IEfA9vIhZPbXNFamklWWCIqszV0OIdyzzQxcL6EcJTdW8mn0DTRGqJPXuC52l/V5smOSF9eelyhMKZA==", + "dev": true, + "dependencies": { + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0" + } + }, "node_modules/@gi-types/st1": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@gi-types/st1/-/st1-1.0.0.tgz", @@ -417,6 +604,39 @@ "@gi-types/pango1": "^1.0.0" } }, + "node_modules/@gi-types/telepathyglib0": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@gi-types/telepathyglib0/-/telepathyglib0-0.12.0.tgz", + "integrity": "sha512-mtuSOev0fP8J4mq+EkVpZpBGwqJhFFPp8yEpNm7LB72xqgHRBSI07hYjgMPO7Fm3EC+i/2aUCoRH/b26sGchBg==", + "dev": true, + "dependencies": { + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0" + } + }, + "node_modules/@gi-types/telepathylogger0": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@gi-types/telepathylogger0/-/telepathylogger0-0.2.0.tgz", + "integrity": "sha512-rIL+MbB204Gpc3pqbr0xKarFBCcS0gaV3f1u523MQZfAfuK6Hh7ci2tSHmTcXjLtT7+w6F5kcBrHXP7uwMgU9w==", + "dev": true, + "dependencies": { + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0", + "@gi-types/telepathyglib0": "^0.12.0" + } + }, + "node_modules/@gi-types/upowerglib1": { + "version": "0.99.0", + "resolved": "https://registry.npmjs.org/@gi-types/upowerglib1/-/upowerglib1-0.99.0.tgz", + "integrity": "sha512-MPqFnwKmW4RlV3ififdXiUgzs3+kRjUBmJiM8y+NQApLIbqLipBrpm3IxwkB5oRZV6i9KnHp47AguQvqfjoxtA==", + "dev": true, + "dependencies": { + "@gi-types/gio2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0" + } + }, "node_modules/@gi-types/xfixes4": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@gi-types/xfixes4/-/xfixes4-4.0.0.tgz", @@ -435,6 +655,67 @@ "@gi-types/gobject2": "^2.68.0" } }, + "node_modules/@gi.ts/cli": { + "version": "1.5.7", + "resolved": "https://registry.npmjs.org/@gi.ts/cli/-/cli-1.5.7.tgz", + "integrity": "sha512-D7/tNUy4JJmNFhKEB2kbOldXgaOgzHS8yLxUJWviZRzkB+E5RSm8HK61ZRLdnreUsCbZay8RIErLTbKLwr7ZhA==", + "dev": true, + "dependencies": { + "@gi.ts/node-loader": "^1.5.3", + "@gi.ts/parser": "^1.5.3", + "@oclif/command": "^1", + "@oclif/config": "^1", + "@oclif/plugin-help": "^3", + "prettier": "^2.2.1", + "tslib": "^1" + }, + "bin": { + "gi-ts": "bin/run" + }, + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "@gi.ts/lib": "^1.5.6" + } + }, + "node_modules/@gi.ts/lib": { + "version": "1.5.9", + "resolved": "https://registry.npmjs.org/@gi.ts/lib/-/lib-1.5.9.tgz", + "integrity": "sha512-SsUZZlNRyCek1HgScYace4u1gpy9m5TAay9iZXC+TQxaKc3q29fImnDjaiBVwAGsVsCjmrTZPlWxencos46a5g==", + "dev": true, + "dependencies": { + "@gi.ts/parser": "^1.5.3" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@gi.ts/node-loader": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/@gi.ts/node-loader/-/node-loader-1.5.3.tgz", + "integrity": "sha512-BGqDps5veP85KzRbuby+tl2n/lH4+oTPOC23udqNiD0jqg2kDc9vLuQml7PozgwFBA6yMSRaNvb8KTZ4UiTO6g==", + "dev": true, + "dependencies": { + "@gi.ts/parser": "^1.5.3", + "glob": "^7.1.6" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@gi.ts/parser": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/@gi.ts/parser/-/parser-1.5.3.tgz", + "integrity": "sha512-U2xQIVGXO4hjx5MUNTFbArftNkX2bpJaRn2BjkxfXSd/e7SYTt0dx7ErpY5zoz2MSB9tIc6du5LT7CuEXOxlzA==", + "dev": true, + "dependencies": { + "fast-xml-parser": "^3.17.5" + }, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/@humanwhocodes/config-array": { "version": "0.9.5", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz", @@ -490,6 +771,208 @@ "node": ">= 8" } }, + "node_modules/@oclif/command": { + "version": "1.8.16", + "resolved": "https://registry.npmjs.org/@oclif/command/-/command-1.8.16.tgz", + "integrity": "sha512-rmVKYEsKzurfRU0xJz+iHelbi1LGlihIWZ7Qvmb/CBz1EkhL7nOkW4SVXmG2dA5Ce0si2gr88i6q4eBOMRNJ1w==", + "dev": true, + "dependencies": { + "@oclif/config": "^1.18.2", + "@oclif/errors": "^1.3.5", + "@oclif/help": "^1.0.1", + "@oclif/parser": "^3.8.6", + "debug": "^4.1.1", + "semver": "^7.3.2" + }, + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "@oclif/config": "^1" + } + }, + "node_modules/@oclif/config": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/@oclif/config/-/config-1.18.3.tgz", + "integrity": "sha512-sBpko86IrTscc39EvHUhL+c++81BVTsIZ3ETu/vG+cCdi0N6vb2DoahR67A9FI2CGnxRRHjnTfa3m6LulwNATA==", + "dev": true, + "dependencies": { + "@oclif/errors": "^1.3.5", + "@oclif/parser": "^3.8.0", + "debug": "^4.1.1", + "globby": "^11.0.1", + "is-wsl": "^2.1.1", + "tslib": "^2.3.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@oclif/config/node_modules/tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "dev": true + }, + "node_modules/@oclif/errors": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@oclif/errors/-/errors-1.3.5.tgz", + "integrity": "sha512-OivucXPH/eLLlOT7FkCMoZXiaVYf8I/w1eTAM1+gKzfhALwWTusxEx7wBmW0uzvkSg/9ovWLycPaBgJbM3LOCQ==", + "dev": true, + "dependencies": { + "clean-stack": "^3.0.0", + "fs-extra": "^8.1", + "indent-string": "^4.0.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@oclif/help": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@oclif/help/-/help-1.0.1.tgz", + "integrity": "sha512-8rsl4RHL5+vBUAKBL6PFI3mj58hjPCp2VYyXD4TAa7IMStikFfOH2gtWmqLzIlxAED2EpD0dfYwo9JJxYsH7Aw==", + "dev": true, + "dependencies": { + "@oclif/config": "1.18.2", + "@oclif/errors": "1.3.5", + "chalk": "^4.1.2", + "indent-string": "^4.0.0", + "lodash": "^4.17.21", + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "widest-line": "^3.1.0", + "wrap-ansi": "^6.2.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@oclif/help/node_modules/@oclif/config": { + "version": "1.18.2", + "resolved": "https://registry.npmjs.org/@oclif/config/-/config-1.18.2.tgz", + "integrity": "sha512-cE3qfHWv8hGRCP31j7fIS7BfCflm/BNZ2HNqHexH+fDrdF2f1D5S8VmXWLC77ffv3oDvWyvE9AZeR0RfmHCCaA==", + "dev": true, + "dependencies": { + "@oclif/errors": "^1.3.3", + "@oclif/parser": "^3.8.0", + "debug": "^4.1.1", + "globby": "^11.0.1", + "is-wsl": "^2.1.1", + "tslib": "^2.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@oclif/help/node_modules/tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "dev": true + }, + "node_modules/@oclif/help/node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@oclif/linewrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@oclif/linewrap/-/linewrap-1.0.0.tgz", + "integrity": "sha512-Ups2dShK52xXa8w6iBWLgcjPJWjais6KPJQq3gQ/88AY6BXoTX+MIGFPrWQO1KLMiQfoTpcLnUwloN4brrVUHw==", + "dev": true + }, + "node_modules/@oclif/parser": { + "version": "3.8.7", + "resolved": "https://registry.npmjs.org/@oclif/parser/-/parser-3.8.7.tgz", + "integrity": "sha512-b11xBmIUK+LuuwVGJpFs4LwQN2xj2cBWj2c4z1FtiXGrJ85h9xV6q+k136Hw0tGg1jQoRXuvuBnqQ7es7vO9/Q==", + "dev": true, + "dependencies": { + "@oclif/errors": "^1.3.5", + "@oclif/linewrap": "^1.0.0", + "chalk": "^4.1.0", + "tslib": "^2.3.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@oclif/parser/node_modules/tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "dev": true + }, + "node_modules/@oclif/plugin-help": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@oclif/plugin-help/-/plugin-help-3.3.1.tgz", + "integrity": "sha512-QuSiseNRJygaqAdABYFWn/H1CwIZCp9zp/PLid6yXvy6VcQV7OenEFF5XuYaCvSARe2Tg9r8Jqls5+fw1A9CbQ==", + "dev": true, + "dependencies": { + "@oclif/command": "^1.8.15", + "@oclif/config": "1.18.2", + "@oclif/errors": "1.3.5", + "@oclif/help": "^1.0.1", + "chalk": "^4.1.2", + "indent-string": "^4.0.0", + "lodash": "^4.17.21", + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "widest-line": "^3.1.0", + "wrap-ansi": "^6.2.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@oclif/plugin-help/node_modules/@oclif/config": { + "version": "1.18.2", + "resolved": "https://registry.npmjs.org/@oclif/config/-/config-1.18.2.tgz", + "integrity": "sha512-cE3qfHWv8hGRCP31j7fIS7BfCflm/BNZ2HNqHexH+fDrdF2f1D5S8VmXWLC77ffv3oDvWyvE9AZeR0RfmHCCaA==", + "dev": true, + "dependencies": { + "@oclif/errors": "^1.3.3", + "@oclif/parser": "^3.8.0", + "debug": "^4.1.1", + "globby": "^11.0.1", + "is-wsl": "^2.1.1", + "tslib": "^2.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@oclif/plugin-help/node_modules/tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "dev": true + }, + "node_modules/@oclif/plugin-help/node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/@types/glob": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", @@ -842,6 +1325,21 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, + "node_modules/clean-stack": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-3.0.1.tgz", + "integrity": "sha512-lR9wNiMRcVQjSB3a7xXGLuz4cr4wJuuXlaAEbRutGowQTmlp7R72/DOgN21e8jdwblMWl9UOJMJXarX94pzKdg==", + "dev": true, + "dependencies": { + "escape-string-regexp": "4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", @@ -1202,6 +1700,22 @@ "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "dev": true }, + "node_modules/fast-xml-parser": { + "version": "3.21.1", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-3.21.1.tgz", + "integrity": "sha512-FTFVjYoBOZTJekiUsawGsSYV9QL0A+zDYCRj7y34IO6Jg+2IMYEtQa+bbictpdpV8dHxXywqU7C0gRDEOFtBFg==", + "dev": true, + "dependencies": { + "strnum": "^1.0.4" + }, + "bin": { + "xml2js": "cli.js" + }, + "funding": { + "type": "paypal", + "url": "https://paypal.me/naturalintelligence" + } + }, "node_modules/fastq": { "version": "1.13.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", @@ -1259,6 +1773,20 @@ "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", "integrity": "sha1-invTcYa23d84E/I4WLV+yq9eQdQ=" }, + "node_modules/fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -1344,6 +1872,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "dev": true + }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -1387,6 +1921,15 @@ "node": ">=0.8.19" } }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -1401,6 +1944,21 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "node_modules/is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "dev": true, + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -1439,6 +1997,18 @@ "node": ">=0.12.0" } }, + "node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -1469,6 +2039,15 @@ "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", "dev": true }, + "node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, "node_modules/levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", @@ -1482,6 +2061,12 @@ "node": ">= 0.8.0" } }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -1635,6 +2220,21 @@ "node": ">= 0.8.0" } }, + "node_modules/prettier": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.2.tgz", + "integrity": "sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew==", + "dev": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", @@ -1830,6 +2430,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/strnum": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz", + "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==", + "dev": true + }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -1909,12 +2515,22 @@ "version": "4.6.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz", "integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==", + "dev": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=4.2.0" + } + }, + "node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "engines": { + "node": ">= 4.0.0" } }, "node_modules/uri-js": { @@ -1960,6 +2576,18 @@ "node": ">= 8" } }, + "node_modules/widest-line": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", + "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", + "dev": true, + "dependencies": { + "string-width": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", @@ -2042,6 +2670,17 @@ "strip-json-comments": "^3.1.1" } }, + "@gi-types/accountsservice1": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/accountsservice1/-/accountsservice1-1.0.0.tgz", + "integrity": "sha512-EbtQcheg/Xj5y4k4/HoYr6y2VX80zf93SO4lEN0f6lrdUWKwndEZ5h24bgsDlv2+PoVlrgD6U9OLuRnniKWfFw==", + "dev": true, + "requires": { + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0" + } + }, "@gi-types/atk1": { "version": "2.36.0", "resolved": "https://registry.npmjs.org/@gi-types/atk1/-/atk1-2.36.0.tgz", @@ -2052,6 +2691,56 @@ "@gi-types/gobject2": "^2.68.0" } }, + "@gi-types/atspi2": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/atspi2/-/atspi2-2.0.0.tgz", + "integrity": "sha512-B6E6YUEi74ylX2XVRVOhK2jwZhXijcmd2UUp9XdOXg3Ja8Z9+NleOVugShsK7v6B55E3Qzj+W8PyW2ucBnAKVA==", + "dev": true, + "requires": { + "@gi-types/dbus1": "^1.0.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0" + } + }, + "@gi-types/base-types": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/base-types/-/base-types-1.0.0.tgz", + "integrity": "sha512-A+TMfI4f+RgBx5uM5la4tqRrraP8N9B3SDFFPvYyH3h9VMcy03/Fp4X0LVtHuYdAUHmdRR8Z4Got9lwVd975+g==", + "dev": true, + "requires": { + "@gi-types/accountsservice1": "^1.0.0", + "@gi-types/atk1": "*", + "@gi-types/atspi2": "*", + "@gi-types/cairo1": "*", + "@gi-types/dbus1": "*", + "@gi-types/gck1": "*", + "@gi-types/gcr3": "*", + "@gi-types/gdkpixbuf2": "*", + "@gi-types/gdm1": "*", + "@gi-types/geoclue2": "*", + "@gi-types/gio2": "*", + "@gi-types/girepository2": "^1.68.0", + "@gi-types/glib2": "*", + "@gi-types/gmodule2": "*", + "@gi-types/gobject2": "*", + "@gi-types/harfbuzz2": "*", + "@gi-types/ibus1": "*", + "@gi-types/json1": "*", + "@gi-types/malcontent0": "*", + "@gi-types/modemmanager1": "*", + "@gi-types/nm1": "*", + "@gi-types/notify0": "*", + "@gi-types/pango1": "*", + "@gi-types/polkit1": "*", + "@gi-types/polkitagent1": "*", + "@gi-types/rsvg2": "*", + "@gi-types/soup2": "*", + "@gi-types/telepathyglib0": "*", + "@gi-types/telepathylogger0": "*", + "@gi-types/upowerglib1": "*", + "@gi-types/xlib2": "*" + } + }, "@gi-types/cairo1": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@gi-types/cairo1/-/cairo1-1.0.0.tgz", @@ -2101,6 +2790,15 @@ "@gi-types/graphene1": "^1.0.0" } }, + "@gi-types/dbus1": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/dbus1/-/dbus1-1.0.0.tgz", + "integrity": "sha512-MyT8RkHL6vySSpd5UWmDmojBZyC3W6zLtpJykABi0TV+pw+TVXQUghP7aYOiFGaXfiYzzRxBp8JoNq6PHHmw+A==", + "dev": true, + "requires": { + "@gi-types/gobject2": "^2.68.0" + } + }, "@gi-types/gck1": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@gi-types/gck1/-/gck1-1.0.0.tgz", @@ -2173,6 +2871,28 @@ "@gi-types/gobject2": "^2.68.0" } }, + "@gi-types/gdm1": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/gdm1/-/gdm1-1.0.0.tgz", + "integrity": "sha512-I3p/NPRFRgP2PFLkz64yGNlM5ZGH0ZtWWnivrhEL4Kx7YLfHpRULj1KW2x2W5xIsHMKLwgQmum1qb3dpbQk+Mw==", + "dev": true, + "requires": { + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0" + } + }, + "@gi-types/geoclue2": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/geoclue2/-/geoclue2-2.0.0.tgz", + "integrity": "sha512-fgtBPESIGkxmKFQ2TIWN2OTfJLj3PYgZUYDa/DPTL0GbLLOZuclLw+Bt+ON2gljf23Lr1CunZqz1f8IcwUzpLQ==", + "dev": true, + "requires": { + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0" + } + }, "@gi-types/gio2": { "version": "2.68.0", "resolved": "https://registry.npmjs.org/@gi-types/gio2/-/gio2-2.68.0.tgz", @@ -2183,6 +2903,16 @@ "@gi-types/gobject2": "^2.68.0" } }, + "@gi-types/girepository2": { + "version": "1.68.0", + "resolved": "https://registry.npmjs.org/@gi-types/girepository2/-/girepository2-1.68.0.tgz", + "integrity": "sha512-OYTsgMdQ1UWua6Bvx/rSL29qn9CCZ1rMpoBsfvDs5ol+9nNYsxUIl7AvRIojEk/IbWmYh/K9Kv3Mqi3ntB3aTA==", + "dev": true, + "requires": { + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0" + } + }, "@gi-types/gjs-environment": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@gi-types/gjs-environment/-/gjs-environment-1.0.0.tgz", @@ -2278,6 +3008,18 @@ "@gi-types/pango1": "^1.0.0" } }, + "@gi-types/gtk4-types": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/gtk4-types/-/gtk4-types-1.0.0.tgz", + "integrity": "sha512-Y7SNMhAX9bUBK/HfJbidMePIjsa/7B6WroLR2nZF3afIzqjYgEugmbYWC85516z0+c1/3Z4eXC8V3j1CleXmGQ==", + "dev": true, + "requires": { + "@gi-types/gdk4": "*", + "@gi-types/graphene1": "*", + "@gi-types/gsk4": "*", + "@gi-types/gtk4": "*" + } + }, "@gi-types/harfbuzz2": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/@gi-types/harfbuzz2/-/harfbuzz2-2.8.1.tgz", @@ -2288,6 +3030,17 @@ "@gi-types/gobject2": "^2.68.0" } }, + "@gi-types/ibus1": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@gi-types/ibus1/-/ibus1-1.5.0.tgz", + "integrity": "sha512-s8122Qp6jU1xgetUgFRaDto5hNKSFNwDITya+nXL9QWqw2Q4MGPHJlwNb+/QHbcc2rZ0dSu39jW+Z/zWpIlzbg==", + "dev": true, + "requires": { + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0" + } + }, "@gi-types/json1": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/@gi-types/json1/-/json1-1.6.0.tgz", @@ -2299,6 +3052,17 @@ "@gi-types/gobject2": "^2.68.0" } }, + "@gi-types/malcontent0": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/@gi-types/malcontent0/-/malcontent0-0.0.0.tgz", + "integrity": "sha512-btlw8DK4rEbLwC47J6Q2NSom7UiSytPZy5JVPK4/faP45CFOCOQ1aJpi5lNaa9cN5AB+Br5EJFVCMDob6hUu8A==", + "dev": true, + "requires": { + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0" + } + }, "@gi-types/meta8": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/@gi-types/meta8/-/meta8-8.0.0.tgz", @@ -2321,6 +3085,17 @@ "@gi-types/xlib2": "^2.0.0" } }, + "@gi-types/modemmanager1": { + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/@gi-types/modemmanager1/-/modemmanager1-1.16.0.tgz", + "integrity": "sha512-6pKXtRp+v/TuSS8fsdCTNLDTBp/+cYphmxPhs6UzPxJW56yvmoxbwv+Y5YbKhHxc+hKfBqzP7iNB/JBj+4pF8Q==", + "dev": true, + "requires": { + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0" + } + }, "@gi-types/nm1": { "version": "1.32.0", "resolved": "https://registry.npmjs.org/@gi-types/nm1/-/nm1-1.32.0.tgz", @@ -2332,6 +3107,17 @@ "@gi-types/gobject2": "^2.68.0" } }, + "@gi-types/notify0": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@gi-types/notify0/-/notify0-0.7.0.tgz", + "integrity": "sha512-trQXuPvPlQ6DHj45THn4tbPHjIZumG6CZkspcAzzjDBK2XLIcDVIbUee5YMQUISiAqNKgKzQWp4C63cRYsFazQ==", + "dev": true, + "requires": { + "@gi-types/gdkpixbuf2": "^2.0.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0" + } + }, "@gi-types/pango1": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@gi-types/pango1/-/pango1-1.0.0.tgz", @@ -2366,6 +3152,19 @@ "@gi-types/polkit1": "^1.0.0" } }, + "@gi-types/rsvg2": { + "version": "2.50.0", + "resolved": "https://registry.npmjs.org/@gi-types/rsvg2/-/rsvg2-2.50.0.tgz", + "integrity": "sha512-KfODNokeIxse65cah4IVPdDmZ4A8NcKQuhUOldcx259vQZz8VzYbAJiCw9PZ3BKZFqqEMitX3YSnzlHPZ0xK1Q==", + "dev": true, + "requires": { + "@gi-types/cairo1": "^1.0.0", + "@gi-types/gdkpixbuf2": "^2.0.0", + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0" + } + }, "@gi-types/shell0": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/@gi-types/shell0/-/shell0-0.1.0.tgz", @@ -2388,6 +3187,17 @@ "@gi-types/st1": "^1.0.0" } }, + "@gi-types/soup2": { + "version": "2.72.0", + "resolved": "https://registry.npmjs.org/@gi-types/soup2/-/soup2-2.72.0.tgz", + "integrity": "sha512-PGCUaj9IEfA9vIhZPbXNFamklWWCIqszV0OIdyzzQxcL6EcJTdW8mn0DTRGqJPXuC52l/V5smOSF9eelyhMKZA==", + "dev": true, + "requires": { + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0" + } + }, "@gi-types/st1": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@gi-types/st1/-/st1-1.0.0.tgz", @@ -2406,6 +3216,39 @@ "@gi-types/pango1": "^1.0.0" } }, + "@gi-types/telepathyglib0": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@gi-types/telepathyglib0/-/telepathyglib0-0.12.0.tgz", + "integrity": "sha512-mtuSOev0fP8J4mq+EkVpZpBGwqJhFFPp8yEpNm7LB72xqgHRBSI07hYjgMPO7Fm3EC+i/2aUCoRH/b26sGchBg==", + "dev": true, + "requires": { + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0" + } + }, + "@gi-types/telepathylogger0": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@gi-types/telepathylogger0/-/telepathylogger0-0.2.0.tgz", + "integrity": "sha512-rIL+MbB204Gpc3pqbr0xKarFBCcS0gaV3f1u523MQZfAfuK6Hh7ci2tSHmTcXjLtT7+w6F5kcBrHXP7uwMgU9w==", + "dev": true, + "requires": { + "@gi-types/gio2": "^2.68.0", + "@gi-types/glib2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0", + "@gi-types/telepathyglib0": "^0.12.0" + } + }, + "@gi-types/upowerglib1": { + "version": "0.99.0", + "resolved": "https://registry.npmjs.org/@gi-types/upowerglib1/-/upowerglib1-0.99.0.tgz", + "integrity": "sha512-MPqFnwKmW4RlV3ififdXiUgzs3+kRjUBmJiM8y+NQApLIbqLipBrpm3IxwkB5oRZV6i9KnHp47AguQvqfjoxtA==", + "dev": true, + "requires": { + "@gi-types/gio2": "^2.68.0", + "@gi-types/gobject2": "^2.68.0" + } + }, "@gi-types/xfixes4": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@gi-types/xfixes4/-/xfixes4-4.0.0.tgz", @@ -2424,6 +3267,49 @@ "@gi-types/gobject2": "^2.68.0" } }, + "@gi.ts/cli": { + "version": "1.5.7", + "resolved": "https://registry.npmjs.org/@gi.ts/cli/-/cli-1.5.7.tgz", + "integrity": "sha512-D7/tNUy4JJmNFhKEB2kbOldXgaOgzHS8yLxUJWviZRzkB+E5RSm8HK61ZRLdnreUsCbZay8RIErLTbKLwr7ZhA==", + "dev": true, + "requires": { + "@gi.ts/node-loader": "^1.5.3", + "@gi.ts/parser": "^1.5.3", + "@oclif/command": "^1", + "@oclif/config": "^1", + "@oclif/plugin-help": "^3", + "prettier": "^2.2.1", + "tslib": "^1" + } + }, + "@gi.ts/lib": { + "version": "1.5.9", + "resolved": "https://registry.npmjs.org/@gi.ts/lib/-/lib-1.5.9.tgz", + "integrity": "sha512-SsUZZlNRyCek1HgScYace4u1gpy9m5TAay9iZXC+TQxaKc3q29fImnDjaiBVwAGsVsCjmrTZPlWxencos46a5g==", + "dev": true, + "requires": { + "@gi.ts/parser": "^1.5.3" + } + }, + "@gi.ts/node-loader": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/@gi.ts/node-loader/-/node-loader-1.5.3.tgz", + "integrity": "sha512-BGqDps5veP85KzRbuby+tl2n/lH4+oTPOC23udqNiD0jqg2kDc9vLuQml7PozgwFBA6yMSRaNvb8KTZ4UiTO6g==", + "dev": true, + "requires": { + "@gi.ts/parser": "^1.5.3", + "glob": "^7.1.6" + } + }, + "@gi.ts/parser": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/@gi.ts/parser/-/parser-1.5.3.tgz", + "integrity": "sha512-U2xQIVGXO4hjx5MUNTFbArftNkX2bpJaRn2BjkxfXSd/e7SYTt0dx7ErpY5zoz2MSB9tIc6du5LT7CuEXOxlzA==", + "dev": true, + "requires": { + "fast-xml-parser": "^3.17.5" + } + }, "@humanwhocodes/config-array": { "version": "0.9.5", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz", @@ -2467,6 +3353,183 @@ "fastq": "^1.6.0" } }, + "@oclif/command": { + "version": "1.8.16", + "resolved": "https://registry.npmjs.org/@oclif/command/-/command-1.8.16.tgz", + "integrity": "sha512-rmVKYEsKzurfRU0xJz+iHelbi1LGlihIWZ7Qvmb/CBz1EkhL7nOkW4SVXmG2dA5Ce0si2gr88i6q4eBOMRNJ1w==", + "dev": true, + "requires": { + "@oclif/config": "^1.18.2", + "@oclif/errors": "^1.3.5", + "@oclif/help": "^1.0.1", + "@oclif/parser": "^3.8.6", + "debug": "^4.1.1", + "semver": "^7.3.2" + } + }, + "@oclif/config": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/@oclif/config/-/config-1.18.3.tgz", + "integrity": "sha512-sBpko86IrTscc39EvHUhL+c++81BVTsIZ3ETu/vG+cCdi0N6vb2DoahR67A9FI2CGnxRRHjnTfa3m6LulwNATA==", + "dev": true, + "requires": { + "@oclif/errors": "^1.3.5", + "@oclif/parser": "^3.8.0", + "debug": "^4.1.1", + "globby": "^11.0.1", + "is-wsl": "^2.1.1", + "tslib": "^2.3.1" + }, + "dependencies": { + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "dev": true + } + } + }, + "@oclif/errors": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@oclif/errors/-/errors-1.3.5.tgz", + "integrity": "sha512-OivucXPH/eLLlOT7FkCMoZXiaVYf8I/w1eTAM1+gKzfhALwWTusxEx7wBmW0uzvkSg/9ovWLycPaBgJbM3LOCQ==", + "dev": true, + "requires": { + "clean-stack": "^3.0.0", + "fs-extra": "^8.1", + "indent-string": "^4.0.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "@oclif/help": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@oclif/help/-/help-1.0.1.tgz", + "integrity": "sha512-8rsl4RHL5+vBUAKBL6PFI3mj58hjPCp2VYyXD4TAa7IMStikFfOH2gtWmqLzIlxAED2EpD0dfYwo9JJxYsH7Aw==", + "dev": true, + "requires": { + "@oclif/config": "1.18.2", + "@oclif/errors": "1.3.5", + "chalk": "^4.1.2", + "indent-string": "^4.0.0", + "lodash": "^4.17.21", + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "widest-line": "^3.1.0", + "wrap-ansi": "^6.2.0" + }, + "dependencies": { + "@oclif/config": { + "version": "1.18.2", + "resolved": "https://registry.npmjs.org/@oclif/config/-/config-1.18.2.tgz", + "integrity": "sha512-cE3qfHWv8hGRCP31j7fIS7BfCflm/BNZ2HNqHexH+fDrdF2f1D5S8VmXWLC77ffv3oDvWyvE9AZeR0RfmHCCaA==", + "dev": true, + "requires": { + "@oclif/errors": "^1.3.3", + "@oclif/parser": "^3.8.0", + "debug": "^4.1.1", + "globby": "^11.0.1", + "is-wsl": "^2.1.1", + "tslib": "^2.0.0" + } + }, + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "dev": true + }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + } + } + }, + "@oclif/linewrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@oclif/linewrap/-/linewrap-1.0.0.tgz", + "integrity": "sha512-Ups2dShK52xXa8w6iBWLgcjPJWjais6KPJQq3gQ/88AY6BXoTX+MIGFPrWQO1KLMiQfoTpcLnUwloN4brrVUHw==", + "dev": true + }, + "@oclif/parser": { + "version": "3.8.7", + "resolved": "https://registry.npmjs.org/@oclif/parser/-/parser-3.8.7.tgz", + "integrity": "sha512-b11xBmIUK+LuuwVGJpFs4LwQN2xj2cBWj2c4z1FtiXGrJ85h9xV6q+k136Hw0tGg1jQoRXuvuBnqQ7es7vO9/Q==", + "dev": true, + "requires": { + "@oclif/errors": "^1.3.5", + "@oclif/linewrap": "^1.0.0", + "chalk": "^4.1.0", + "tslib": "^2.3.1" + }, + "dependencies": { + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "dev": true + } + } + }, + "@oclif/plugin-help": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@oclif/plugin-help/-/plugin-help-3.3.1.tgz", + "integrity": "sha512-QuSiseNRJygaqAdABYFWn/H1CwIZCp9zp/PLid6yXvy6VcQV7OenEFF5XuYaCvSARe2Tg9r8Jqls5+fw1A9CbQ==", + "dev": true, + "requires": { + "@oclif/command": "^1.8.15", + "@oclif/config": "1.18.2", + "@oclif/errors": "1.3.5", + "@oclif/help": "^1.0.1", + "chalk": "^4.1.2", + "indent-string": "^4.0.0", + "lodash": "^4.17.21", + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "widest-line": "^3.1.0", + "wrap-ansi": "^6.2.0" + }, + "dependencies": { + "@oclif/config": { + "version": "1.18.2", + "resolved": "https://registry.npmjs.org/@oclif/config/-/config-1.18.2.tgz", + "integrity": "sha512-cE3qfHWv8hGRCP31j7fIS7BfCflm/BNZ2HNqHexH+fDrdF2f1D5S8VmXWLC77ffv3oDvWyvE9AZeR0RfmHCCaA==", + "dev": true, + "requires": { + "@oclif/errors": "^1.3.3", + "@oclif/parser": "^3.8.0", + "debug": "^4.1.1", + "globby": "^11.0.1", + "is-wsl": "^2.1.1", + "tslib": "^2.0.0" + } + }, + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "dev": true + }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + } + } + }, "@types/glob": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", @@ -2694,6 +3757,15 @@ "supports-color": "^7.1.0" } }, + "clean-stack": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-3.0.1.tgz", + "integrity": "sha512-lR9wNiMRcVQjSB3a7xXGLuz4cr4wJuuXlaAEbRutGowQTmlp7R72/DOgN21e8jdwblMWl9UOJMJXarX94pzKdg==", + "dev": true, + "requires": { + "escape-string-regexp": "4.0.0" + } + }, "cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", @@ -2975,6 +4047,15 @@ "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "dev": true }, + "fast-xml-parser": { + "version": "3.21.1", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-3.21.1.tgz", + "integrity": "sha512-FTFVjYoBOZTJekiUsawGsSYV9QL0A+zDYCRj7y34IO6Jg+2IMYEtQa+bbictpdpV8dHxXywqU7C0gRDEOFtBFg==", + "dev": true, + "requires": { + "strnum": "^1.0.4" + } + }, "fastq": { "version": "1.13.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", @@ -3023,6 +4104,17 @@ "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", "integrity": "sha1-invTcYa23d84E/I4WLV+yq9eQdQ=" }, + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -3084,6 +4176,12 @@ "slash": "^3.0.0" } }, + "graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "dev": true + }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -3112,6 +4210,12 @@ "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", "dev": true }, + "indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true + }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -3126,6 +4230,12 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "dev": true + }, "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -3152,6 +4262,15 @@ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true }, + "is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "requires": { + "is-docker": "^2.0.0" + } + }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -3179,6 +4298,15 @@ "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", "dev": true }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, "levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", @@ -3189,6 +4317,12 @@ "type-check": "~0.4.0" } }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, "lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -3306,6 +4440,12 @@ "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true }, + "prettier": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.2.tgz", + "integrity": "sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew==", + "dev": true + }, "process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", @@ -3418,6 +4558,12 @@ "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true }, + "strnum": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz", + "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==", + "dev": true + }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -3475,7 +4621,14 @@ "typescript": { "version": "4.6.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz", - "integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==" + "integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==", + "dev": true + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true }, "uri-js": { "version": "4.4.1", @@ -3516,6 +4669,15 @@ "isexe": "^2.0.0" } }, + "widest-line": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", + "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", + "dev": true, + "requires": { + "string-width": "^4.0.0" + } + }, "word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", diff --git a/package.json b/package.json index 8dbc31b..cee5ffb 100644 --- a/package.json +++ b/package.json @@ -5,11 +5,13 @@ "main": "extension.js", "type": "module", "scripts": { + "generate-bindings": "sh scripts/generate-gi-bindings.sh", "test": "echo \"Error: no test specified\" && exit 1", "build:transpile": "tsc scripts/transpile.ts --outDir build --allowSyntheticDefaultImports --sourceMap --target esnext --module esnext --moduleResolution node", "lint:extension": "eslint extension scripts tests", "lint:package": "eslint build --fix", "transpile:watch": "tsc --watch", + "pretranspile": "cp -r @types/* node_modules/@gi-types/", "transpile": "npm run lint:extension && tsc", "build": "npm run clean && npm run transpile && node --unhandled-rejections=strict build/scripts/transpile.js && npm run lint:package", "clean": "rm -rf build && mkdir build", @@ -23,20 +25,25 @@ "author": "", "license": "ISC", "devDependencies": { + "@gi-types/base-types": "^1.0.0", "@gi-types/clutter8": "^8.0.0", "@gi-types/gio2": "^2.68.0", "@gi-types/gjs-environment": "^1.0.0", "@gi-types/glib2": "^2.68.0", "@gi-types/gobject2": "^2.68.0", + "@gi-types/gtk4-types": "^1.0.0", "@gi-types/gtk4": "^4.2.0", "@gi-types/meta8": "^8.0.0", "@gi-types/shell0": "^0.1.0", "@gi-types/st1": "^1.0.0", + "@gi.ts/cli": "^1.5.7", + "@gi.ts/lib": "^1.5.9", "@types/glob": "^7.2.0", "@types/node": "^17.0.23", "@types/yargs": "^17.0.10", "@typescript-eslint/eslint-plugin": "^5.18.0", "@typescript-eslint/parser": "^5.18.0", + "typescript": "^4.3.5", "eslint": "^8.12.0" }, "dependencies": { diff --git a/scripts/generate-gi-bindings.sh b/scripts/generate-gi-bindings.sh new file mode 100644 index 0000000..2e372a5 --- /dev/null +++ b/scripts/generate-gi-bindings.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +# generate bindings +npx gi-ts generate \ + --all --importPrefix="@gi-types/" \ + --out=build/@types --outputFormat=folder \ + --versionedImports --versionedOutput \ + --withDocs --emitMetadata + +# move adw bindings to @types +cp -r build/@types/adw1 @types/ + +# cleanup +rm -r build/@types/ diff --git a/tsconfig.json b/tsconfig.json index 4597dc0..3db7143 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,83 +1,37 @@ { - "compilerOptions": { - /* Visit https://aka.ms/tsconfig.json to read more about this file */ - /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "es2018", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */ - "module": "es2020", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ - // "lib": [], /* Specify library files to be included in the compilation. */ - "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', 'react', 'react-jsx' or 'react-jsxdev'. */ - // "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - "outDir": "./build", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - /* Strict Type-Checking Options */ - "strict": true, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* Enable strict null checks. */ - // "strictFunctionTypes": true, /* Enable strict checking of function types. */ - // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ - // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ - /* Additional Checks */ - // "noUnusedLocals": true, /* Report errors on unused locals. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ - // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ - // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */ - // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an 'override' modifier. */ - // "noPropertyAccessFromIndexSignature": true, /* Require undeclared properties from index signatures to use element accesses. */ - /* Module Resolution Options */ - "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "typeRoots": [], /* List of folders to include type definitions from. */ - // "types": [], /* Type declaration files to be included in compilation. */ - // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ - /* Source Map Options */ - // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ - // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ - /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ - /* Advanced Options */ - "skipLibCheck": true, /* Skip type checking of declaration files. */ - "forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */ - "paths": { - "gnome-shell": [ - "./gnome-shell" - ] + "compilerOptions": { + "strict": true, + "typeRoots": [ + "./node_modules/@types", + "./node_modules/@gi-types" + ], + "types": [ + "gjs-environment", + "base-types", + "gtk4-types", + "adw1-types", + "node" + ], + "lib": [ + "ES2019" + ], + "allowSyntheticDefaultImports": true, + "rootDir": "./", + "outDir": "./build", + "target": "ES6", + "moduleResolution": "Node", + "skipLibCheck": true, + "paths": { + "gnome-shell": [ + "./gnome-shell" + ] + }, }, - "typeRoots": [ - "./node_modules/@gi-types" - ], - "types": [ - "gjs-environment", - ], - }, - "include": [ - "extension/**/*.ts", - "extension/**/*.js", - "scripts/**/*.ts", - "gnome-shell/*.d.ts", - "tests/**/*.ts" - ] + "include": [ + "extension/**/*.ts", + "extension/**/*.js", + "scripts/**/*.ts", + "gnome-shell/*.d.ts", + "tests/**/*.ts" + ] } \ No newline at end of file From 4a043cb11b4b7e2c9dec8e58543bcf10525b5b93 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Mon, 18 Apr 2022 19:12:26 +0530 Subject: [PATCH 124/155] prefs: Update to libadwaita and add GUI for app specific gesture settings --- extension/common/appGestures.ts | 342 ++++++++++++++++++++++++++++ extension/common/prefs.ts | 91 +++++--- extension/common/settings.ts | 25 +- extension/prefs.ts | 12 +- extension/src/forwardBack.ts | 10 +- extension/src/utils/keyboard.ts | 2 +- extension/ui/customizations.ui | 147 ++++++++++++ extension/ui/gestures.ui | 119 ++++++++++ extension/ui/prefs.ui | 389 -------------------------------- package-lock.json | 1 + package.json | 2 +- scripts/transpile.ts | 1 + scripts/updateMetadata.ts | 46 ++++ tests/prefs.ts | 19 +- tsconfig.json | 1 - 15 files changed, 750 insertions(+), 457 deletions(-) create mode 100644 extension/common/appGestures.ts create mode 100644 extension/ui/customizations.ui create mode 100644 extension/ui/gestures.ui create mode 100644 scripts/updateMetadata.ts diff --git a/extension/common/appGestures.ts b/extension/common/appGestures.ts new file mode 100644 index 0000000..85eb188 --- /dev/null +++ b/extension/common/appGestures.ts @@ -0,0 +1,342 @@ +import Gtk from '@gi-types/gtk4'; +import Gio from '@gi-types/gio2'; +import GLib from '@gi-types/glib2'; +import GObject from '@gi-types/gobject2'; +import Adw from '@gi-types/adw1'; +import { ForwardBackKeyBinds, GioSettings } from './settings'; +import { registerClass } from './utils/gobject'; + +/** return icon name for give app */ +function getAppIconName(app: Gio.AppInfoPrototype) { + return app.get_icon()?.to_string() ?? 'icon-missing'; +} + +/** Dialog window used for selecting application from given list of apps + * Emits `app-selected` signal with application id + */ +const AppChooserDialog = registerClass( + { + Properties: {}, + Signals: { 'app-selected': { param_types: [GObject.TYPE_STRING] } }, + }, + class GIE_AppChooserDialog extends Adw.PreferencesWindow { + private _group: Adw.PreferencesGroup; + + /** + * @param apps list of apps to display in dialog + * @param parent parent window, dialog will be transient for parent + */ + constructor(apps: Gio.AppInfoPrototype[], parent: Adw.Window) { + super({ + modal: true, + transientFor: parent, + // destroyWithParent: false, + }); + + this.set_default_size( + 0.5 * parent.defaultWidth, + 0.6 * parent.defaultHeight, + ); + + this._group = new Adw.PreferencesGroup(); + const page = new Adw.PreferencesPage(); + page.add(this._group); + this.add(page); + + apps.forEach(app => this._addAppRow(app)); + } + + /** for given app add row to selectable list */ + private _addAppRow(app: Gio.AppInfoPrototype) { + const row = new Adw.ActionRow({ + title: app.get_display_name() ?? '', + subtitle: app.get_description() ?? '', + activatable: true, + iconName: getAppIconName(app), + }); + this._group.add(row); + + row.connect('activated', () => { + this.emit('app-selected', app.get_id()); + this.close(); + }); + } + }, +); + +/** type definition for gesture setting(keybind and reverse flag) for app */ +declare type AppGestureSettings = [ForwardBackKeyBinds, boolean]; + +/** + * Class to create row for application in list to display gesture settings of app + * Emits 'value-updated' when any of settings changes + * Emits 'remove-request' when remove button is clicked + */ +const AppGestureSettingsRow = registerClass( + { + Properties: {}, + Signals: { + 'value-updated': { param_types: [GObject.TYPE_UINT, GObject.TYPE_BOOLEAN] }, + 'remove-request': {}, + }, + }, + class GIE_AppGestureSettingsRow extends Adw.ExpanderRow { + private _keyBindCombo: Adw.ComboRow; + private _reverseButton: Gtk.Switch; + + /** + * @param appGestureSettings value of current settings for app + * @param model list of choices of keybings for setting + */ + constructor(app: Gio.AppInfoPrototype, appGestureSettings: AppGestureSettings, model: Gio.ListModel) { + super({ + title: app.get_display_name() ?? '', + iconName: getAppIconName(app), + }); + + const [keyBind, reverse] = appGestureSettings; + + // keybinding combo row + this._keyBindCombo = new Adw.ComboRow({ + title: 'Keybinding', + subtitle: 'Keyboard shortcut to emit after gesture is completed', + model, + }); + this._keyBindCombo.set_selected(keyBind); + this.add_row(this._keyBindCombo); + + // reverse switch row + this._reverseButton = new Gtk.Switch({ + active: reverse, + valign: Gtk.Align.CENTER, + }); + let actionRow = new Adw.ActionRow({ title: 'Reverse gesture direction' }); + actionRow.add_suffix(this._reverseButton); + this.add_row(actionRow); + + // remove setting row + const removeButton = new Gtk.Button({ + label: 'Remove...', + valign: Gtk.Align.CENTER, + halign: Gtk.Align.END, + cssClasses: ['raised'], + }); + actionRow = new Adw.ActionRow(); + actionRow.add_suffix(removeButton); + this.add_row(actionRow); + + // remove request signal emitted when remove button is clicked + removeButton.connect('clicked', () => this.emit('remove-request')); + this._keyBindCombo.connect('notify::selected', this._onValueUpdated.bind(this)); + this._reverseButton.connect('notify::active', this._onValueUpdated.bind(this)); + + } + + /** function called internally whenever some setting is changed, emits external signal */ + private _onValueUpdated() { + this.emit('value-updated', this._keyBindCombo.selected, this._reverseButton.active); + } + }, +); + +/** + * Class to display list of applications and their gesture settings + */ +const AppKeybindingGesturePrefsGroup = registerClass( + class GIE_AppKeybindingGesturePrefsGroup extends Adw.PreferencesGroup { + private _settings: GioSettings; + private _prefsWindow: Adw.PreferencesWindow; + private _appRows: Map; + private _cachedSettings: Record; + private _addAppButtonRow: Adw.PreferencesRow; + private _appGestureModel: Gtk.StringList; + + /** + * @param prefsWindow parent preferences window + * @param settings extension settings object + */ + constructor(prefsWindow: Adw.PreferencesWindow, settings: GioSettings) { + super({ + title: 'Enable application specific gestures', + description: 'Window switching gesture needs to be disabled', + }); + + this._prefsWindow = prefsWindow; + this._settings = settings; + this._appRows = new Map(); + + this._cachedSettings = this._settings.get_value('forward-back-application-keyboard-shortcuts').deepUnpack(); + this._appGestureModel = this._getAppGestureModelForComboBox(); + + // build ui widgets + this._addAppButtonRow = this._buildAddAppButtonRow(); + this.add(this._addAppButtonRow); + + Object.keys(this._cachedSettings).sort().reverse().forEach(appId => this._addAppGestureRow(appId)); + + // bind switch to setting value + const toggleSwitch = new Gtk.Switch({ valign: Gtk.Align.CENTER }); + this._settings.bind('enable-forward-back-gesture', toggleSwitch, 'active', Gio.SettingsBindFlags.DEFAULT); + this.set_header_suffix(toggleSwitch); + } + + /** + * Handler function, called when add button is clicked + * Displays dialog to select application to add + */ + private _onAddAppButtonClicked() { + // find list of new apps that can be selected + const allApps = Gio.app_info_get_all(); + const selectableApps = allApps + .filter(app => { + const appId = app.get_id(); + return app.should_show() && appId && !this._appRows.has(appId); + }) + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + .sort((a, b) => a.get_id()!.localeCompare(b.get_id()!)); + + const appChooserDialog = new AppChooserDialog(selectableApps, this._prefsWindow); + appChooserDialog.connect('app-selected', (_source, appId) => this._addAppGestureRow(appId)); + appChooserDialog.present(); + } + + /** + * @returns row for add app button + */ + private _buildAddAppButtonRow() { + const addButton = new Gtk.Button({ + iconName: 'list-add-symbolic', + cssName: 'card', + heightRequest: 40, + }); + + const addButtonRow = new Adw.PreferencesRow({ child: addButton }); + addButton.connect('clicked', this._onAddAppButtonClicked.bind(this)); + + return addButtonRow; + } + + /** + * Adds application specific gesture settings row for given app id + * Does nothing if app doesn't exist + */ + private _addAppGestureRow(appId: string) { + const app = Gio.DesktopAppInfo.new(appId); + if (!app) return; + + const appRow = new AppGestureSettingsRow( + app, + this._getAppGestureSetting(appId), // this function updates extension settings + this._appGestureModel, + ); + this._appRows.set(appId, appRow); + this.add(appRow); + + // callbacks for setting updates and remove request + appRow.connect('remove-request', () => this._requestRemoveAppGestureRow(appId)); + appRow.connect('value-updated', (_source, keyBind, reverse) => { + this._setAppGestureSetting(appId, [keyBind, reverse]); + }); + + // re-add add-appbutton at the end + this.remove(this._addAppButtonRow); + this.add(this._addAppButtonRow); + } + + /** + * Removes application specific gesture settings row for given app + * Does nothing if row for app was not added + * Updates extension settings + */ + private _removeAppGestureRow(appId: string) { + const appRow = this._appRows.get(appId); + if (!appRow) return; + + this.remove(appRow); + this._appRows.delete(appId); + delete this._cachedSettings[appId]; + this._updateExtensionSettings(); + } + + /** + * Signal handler called when removal of app gesture settings is requested + * Displays confirmation dialog and removes app row if confirmed + */ + private _requestRemoveAppGestureRow(appId: string) { + const app = Gio.DesktopAppInfo.new(appId); + + const dialog = new Gtk.MessageDialog({ + transient_for: this._prefsWindow, + modal: true, + text: `Remove application specific gesture for ${app.get_display_name()}?`, + }); + + dialog.add_button('Cancel', Gtk.ResponseType.CANCEL); + dialog + .add_button('Remove', Gtk.ResponseType.ACCEPT) + .get_style_context() + .add_class('destructive-action'); + + dialog.connect('response', (_dlg, response) => { + if (response === Gtk.ResponseType.ACCEPT) { + this._removeAppGestureRow(appId); + } + dialog.destroy(); + }); + + dialog.present(); + } + + /** + * Returns application specific gesture setting + * if setting is not set, returns default value and saves extension settings + */ + private _getAppGestureSetting(appId: string): AppGestureSettings { + let val = this._cachedSettings[appId]; + + if (!val) { + // this is case when new app was selected for gesture + val = [ForwardBackKeyBinds.Default, false]; + this._setAppGestureSetting(appId, val); + } + + return val; + } + + /** Saves application specific gesture setting into extension settings */ + private _setAppGestureSetting(appId: string, appGestureSettings: AppGestureSettings) { + this._cachedSettings[appId] = appGestureSettings; + this._updateExtensionSettings(); + } + + /** Updates extension settings */ + private _updateExtensionSettings() { + const glibVariant = new GLib.Variant('a{s(ib)}', this._cachedSettings); + this._settings.set_value('forward-back-application-keyboard-shortcuts', glibVariant); + } + + /** Returns model which contains all possible choices for keybinding setting for app-gesture */ + private _getAppGestureModelForComboBox() { + const appGestureModel = new Gtk.StringList(); + Object.values(ForwardBackKeyBinds).forEach(val => { + if (typeof val !== 'number') return; + appGestureModel.append(ForwardBackKeyBinds[val]); + }); + + return appGestureModel; + } + }, +); + +/** + * @returns preference page for application gestures + */ +export function getAppKeybindingGesturePrefsPage(prefsWindow: Adw.PreferencesWindow, settings: GioSettings) { + const page = new Adw.PreferencesPage({ + title: 'App Gestures', + iconName: 'org.gnome.Settings-applications-symbolic', + }); + + page.add(new AppKeybindingGesturePrefsGroup(prefsWindow, settings)); + return page; +} \ No newline at end of file diff --git a/extension/common/prefs.ts b/extension/common/prefs.ts index c2f0b0b..799031a 100644 --- a/extension/common/prefs.ts +++ b/extension/common/prefs.ts @@ -1,9 +1,13 @@ import Gio from '@gi-types/gio2'; import GObject from '@gi-types/gobject2'; import Gtk from '@gi-types/gtk4'; +import Adw from '@gi-types/adw1'; import { AllUIObjectKeys, BooleanSettingsKeys, DoubleSettingsKeys, EnumSettingsKeys, GioSettings, IntegerSettingsKeys } from './settings'; import { CanEnableMinimizeGesture } from './utils/prefUtils'; +// eslint-disable-next-line @typescript-eslint/no-unused-vars +import { getAppKeybindingGesturePrefsPage } from './appGestures'; + type GtkBuilder = Omit & { get_object(name: AllUIObjectKeys): T; } @@ -17,34 +21,25 @@ function bind_int_value(key: IntegerSettingsKeys, settings: GioSettings, builder settings.bind(key, button, 'value', Gio.SettingsBindFlags.DEFAULT); } -interface BindBooleanParams { - /** flag used when binding setting's key to switch's {@link Gtk.Switch.active} status */ - flags?: Gio.SettingsBindFlags, - /** list of key of {@link Gtk.Box} object in builder, setting's key is binded to {@link Gtk.Box.sensitive} */ - sensitiveRowKeys?: AllUIObjectKeys[], -} - /** - * Bind value of settings to {@link Gtk.Swich} + * Bind value of setting to {@link Gtk.Swich} * @param key key of setting and id of {@link Gtk.Switch} object in builder + * @param flags flag used when binding setting's key to switch's {@link Gtk.Switch.active} status */ -function bind_boolean_value(key: BooleanSettingsKeys, settings: GioSettings, builder: GtkBuilder, params?: BindBooleanParams) { +function bind_boolean_value(key: BooleanSettingsKeys, settings: GioSettings, builder: GtkBuilder, flags?: Gio.SettingsBindFlags) { const button = builder.get_object(key); - settings.bind(key, button, 'active', params?.flags ?? Gio.SettingsBindFlags.DEFAULT); - params?.sensitiveRowKeys?.forEach(row_key => { - const row = builder.get_object(row_key); - button.bind_property('active', row, 'sensitive', GObject.BindingFlags.SYNC_CREATE); - }); + settings.bind(key, button, 'active', flags ?? Gio.SettingsBindFlags.DEFAULT); } +/** + * Bind value of setting to {@link Adw.ComboRow} + * @param key key of settings and id of {@link Adw.ComboRow} object in builder + */ function bind_combo_box(key: EnumSettingsKeys, settings: GioSettings, builder: GtkBuilder) { - const comboBox = builder.get_object(key); - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const enumKey = key as any; - comboBox.set_active_id(settings.get_enum(enumKey).toString()); - - comboBox.connect('changed', () => { - settings.set_enum(enumKey, parseInt(comboBox.active_id)); + const comboRow = builder.get_object(key); + comboRow.set_selected(settings.get_enum(key)); + comboRow.connect('notify::selected', () => { + settings.set_enum(key, comboRow.selected); }); } @@ -78,33 +73,59 @@ function showEnableMinimizeButton(key: BooleanSettingsKeys, row_key: AllUIObject /** * Binds preference widgets and settings keys + * @param builder builder object for preference widgets * @param settings setting object of extension - * @param uiPath path of ui file - * @returns Get preference widget of type {@link T} */ -export function getPrefsWidget(settings: Gio.Settings, uiPath: string): T { - const builder = new Gtk.Builder(); - builder.add_from_file(uiPath); +function bindPrefsSettings(builder: GtkBuilder, settings: Gio.Settings) { - display_in_log_scale('touchpad-speed-scale', 'touchpad-speed_scale_display-value', settings, builder); + display_in_log_scale('touchpad-speed-scale', 'touchpad-speed-scale_display-value', settings, builder); display_in_log_scale('touchpad-pinch-speed', 'touchpad-pinch-speed_display-value', settings, builder); bind_int_value('alttab-delay', settings, builder); - bind_boolean_value('default-session-workspace', settings, builder, { flags: Gio.SettingsBindFlags.INVERT_BOOLEAN }); - bind_boolean_value('default-overview', settings, builder, { flags: Gio.SettingsBindFlags.INVERT_BOOLEAN }); + bind_boolean_value('default-session-workspace', settings, builder, Gio.SettingsBindFlags.INVERT_BOOLEAN); + bind_boolean_value('default-overview', settings, builder, Gio.SettingsBindFlags.INVERT_BOOLEAN); bind_boolean_value('follow-natural-scroll', settings, builder); - bind_boolean_value('default-overview-gesture-direction', settings, builder, { flags: Gio.SettingsBindFlags.INVERT_BOOLEAN }); + bind_boolean_value('default-overview-gesture-direction', settings, builder, Gio.SettingsBindFlags.INVERT_BOOLEAN); - bind_boolean_value('enable-alttab-gesture', settings, builder, { sensitiveRowKeys: ['alttab-delay_box-row'] }); - bind_boolean_value('enable-window-manipulation-gesture', settings, builder, { sensitiveRowKeys: ['allow-minimize-window_box-row'] }); + bind_boolean_value('enable-alttab-gesture', settings, builder); + bind_boolean_value('enable-window-manipulation-gesture', settings, builder); showEnableMinimizeButton('allow-minimize-window', 'allow-minimize-window_box-row', settings, builder); bind_combo_box('pinch-3-finger-gesture', settings, builder); bind_combo_box('pinch-4-finger-gesture', settings, builder); +} - const main_prefs = builder.get_object('main_prefs'); - - return main_prefs; +export function buildPrefsWidget( + prefsWindow: Adw.PreferencesWindow, + settings: Gio.Settings, + uiDir: string, +) { + const builder = new Gtk.Builder() as GtkBuilder; + builder.add_from_file(`${uiDir}/gestures.ui`); + builder.add_from_file(`${uiDir}/customizations.ui`); + + // bind to settings + bindPrefsSettings(builder, settings); + + // pinch gesture page + prefsWindow.add(builder.get_object('gestures_page')); + + // application specific gestures + const app_gesture_page = getAppKeybindingGesturePrefsPage(prefsWindow, settings); + app_gesture_page.bind_property( + 'sensitive', + builder.get_object('enable-alttab-gesture'), + 'active', + GObject.BindingFlags.INVERT_BOOLEAN | GObject.BindingFlags.BIDIRECTIONAL, + ); + if (builder.get_object('enable-alttab-gesture').active) { + app_gesture_page.set_sensitive(false); + } + + prefsWindow.add(app_gesture_page); + + // customize page + prefsWindow.add(builder.get_object('customizations_page')); } \ No newline at end of file diff --git a/extension/common/settings.ts b/extension/common/settings.ts index 8d81cba..20f9252 100644 --- a/extension/common/settings.ts +++ b/extension/common/settings.ts @@ -8,12 +8,12 @@ export enum PinchGestureType { } export enum ForwardBackKeyBinds { - DEFAULT = 0, - FORWARD_BACK = 1, - PAGE_UP_DOWN = 2, - RIGHT_LEFT = 3, - AUDIO_NEXT_PREV = 4, - TAB_NEXT_PREV = 5, + Default = 0, + 'Forward/Backward' = 1, + 'Page Up/Down' = 2, + 'Right/Left' = 3, + 'Audio Next/Prev' = 4, + 'Tab Next/Prev' = 5, } export type BooleanSettingsKeys = @@ -52,12 +52,17 @@ export type AllSettingsKeys = MiscSettingsKeys ; +export type UIPageObjectIds = + 'gestures_page' | + 'customizations_page' + ; + export type AllUIObjectKeys = + UIPageObjectIds | AllSettingsKeys | - 'touchpad-speed_scale_display-value' | + 'touchpad-speed-scale_display-value' | 'touchpad-pinch-speed_display-value' | - 'allow-minimize-window_box-row' | - 'alttab-delay_box-row' + 'allow-minimize-window_box-row' ; type Enum_Functions = { @@ -88,4 +93,4 @@ export type GioSettings = } & SettingsEnumFunctions & SettingsMiscFunctions - ; + ; \ No newline at end of file diff --git a/extension/prefs.ts b/extension/prefs.ts index 1c773c6..13d286c 100644 --- a/extension/prefs.ts +++ b/extension/prefs.ts @@ -1,6 +1,8 @@ -import Gtk from '@gi-types/gtk4'; +// import Gtk from '@gi-types/gtk4'; +import Adw from '@gi-types/adw1'; + import { imports } from 'gnome-shell'; -import { getPrefsWidget } from './common/prefs'; +import { buildPrefsWidget } from './common/prefs'; const ExtensionUtils = imports.misc.extensionUtils; const ExtMe = ExtensionUtils.getCurrentExtension(); @@ -8,8 +10,8 @@ const ExtMe = ExtensionUtils.getCurrentExtension(); // eslint-disable-next-line @typescript-eslint/no-empty-function export function init(): void { } -export function buildPrefsWidget(): Gtk.Widget { - const UIFilePath = ExtMe.dir.get_child('ui').get_path() + '/prefs.ui'; +export function fillPreferencesWindow(prefsWindow: Adw.PreferencesWindow) { + const UIDirPath = ExtMe.dir.get_child('ui').get_path() ?? ''; const settings = ExtensionUtils.getSettings(); - return getPrefsWidget(settings, UIFilePath); + buildPrefsWidget(prefsWindow, settings, UIDirPath); } \ No newline at end of file diff --git a/extension/src/forwardBack.ts b/extension/src/forwardBack.ts index b3b30bb..bd3f879 100644 --- a/extension/src/forwardBack.ts +++ b/extension/src/forwardBack.ts @@ -168,15 +168,15 @@ export class ForwardBackGestureExtension implements ISubExtension { // if keyBind[1] is true => reverse order or keys const returnBackKey = (gestureDirection === SwipeGestureDirection.LeftToRight) !== keyBind[1]; switch (keyBind[0]) { - case ForwardBackKeyBinds.FORWARD_BACK: + case ForwardBackKeyBinds['Forward/Backward']: return [returnBackKey ? Clutter.KEY_Back : Clutter.KEY_Forward]; - case ForwardBackKeyBinds.PAGE_UP_DOWN: + case ForwardBackKeyBinds['Page Up/Down']: return [returnBackKey ? Clutter.KEY_Page_Up : Clutter.KEY_Page_Down]; - case ForwardBackKeyBinds.RIGHT_LEFT: + case ForwardBackKeyBinds['Right/Left']: return [returnBackKey ? Clutter.KEY_Left : Clutter.KEY_Right]; - case ForwardBackKeyBinds.AUDIO_NEXT_PREV: + case ForwardBackKeyBinds['Audio Next/Prev']: return [returnBackKey ? Clutter.KEY_AudioPrev : Clutter.KEY_AudioNext]; - case ForwardBackKeyBinds.TAB_NEXT_PREV: + case ForwardBackKeyBinds['Tab Next/Prev']: return [Clutter.KEY_Control_L, returnBackKey ? Clutter.KEY_Page_Up: Clutter.KEY_Page_Down]; } } diff --git a/extension/src/utils/keyboard.ts b/extension/src/utils/keyboard.ts index 2bcf28c..e08a9b6 100644 --- a/extension/src/utils/keyboard.ts +++ b/extension/src/utils/keyboard.ts @@ -13,7 +13,7 @@ class VirtualKeyboard { } sendKeys(keys: number[]) { - log(`sending keys: ${keys}`); + // log(`sending keys: ${keys}`); // keyEvents are stored in revere order so first event can be just popped const keyEvents: [number, Clutter.KeyState][] = []; diff --git a/extension/ui/customizations.ui b/extension/ui/customizations.ui new file mode 100644 index 0000000..5f22cb2 --- /dev/null +++ b/extension/ui/customizations.ui @@ -0,0 +1,147 @@ + + + + + + + Misc + emblem-system-symbolic + + + + + + + + + + Touchpad swipe speed + + + + + + true + no + + + + -3.3219280948873626 + 3.3219280948873626 + 0.01 + + + + + + + + + + + + + center + 5 + False + False + 1.00 + + + + + + + + + + Follow natural swipe + Similar to natural scrolling. Swipe moves the content, not the view + + + center + True + + + + + + + + + Revert direction of overview navigation gesture + + + center + True + + + + + + + + + Window switcher popup delay (ms) + + + + center + + + 0 + 5000 + 5 + + + 150 + + + + + + + + + Touchpad pinch speed + + + + + + true + no + + + + -3.3219280948873626 + 3.3219280948873626 + 0.01 + + + + + + + + + + + + + center + 5 + False + False + 1.00 + + + + + + + + + + + \ No newline at end of file diff --git a/extension/ui/gestures.ui b/extension/ui/gestures.ui new file mode 100644 index 0000000..b01e5e4 --- /dev/null +++ b/extension/ui/gestures.ui @@ -0,0 +1,119 @@ + + + + + + + + None + Show Desktop + + + + + Gestures + gesture-swipe-right-symbolic + + + + + Swipe Gestures + + + + + 4-finger gestures for overview navigation + For navigating between desktop, activities and appgrid + + + center + True + + + + + + + + + 4-finger gestures for workspace switching + + + center + True + + + + + + + + + Window switching + + + center + True + + + + + + + + + Window manipulation + Tile, unmaximize, maximize or fullscreen a window + + + center + True + + + + + + + + + Minimize window + This will disable tiling gesture + + + + center + True + + + + + + + + + + + + + Pinch Gestures + + + + + 3 finger pinch + pinch_gestures_model + + + + + + + 4 finger pinch + pinch_gestures_model + + + + + + + \ No newline at end of file diff --git a/extension/ui/prefs.ui b/extension/ui/prefs.ui index 4faf516..48e2c64 100644 --- a/extension/ui/prefs.ui +++ b/extension/ui/prefs.ui @@ -10,15 +10,6 @@ 0.01 - - 150 - 0 - 5000 - 5 - 5 - - - vertical @@ -293,385 +284,5 @@ - - - - 12 - - - start - center - Pinch Gestures - - - - - - - - - - - 36 - - - none - - - - - - - 12 - 12 - 12 - 12 - 32 - - - - start - center - 1 - 0 - 3 finger pinch - - - - - - - None - Show Desktop - - - - - - - - - - - - - - - 12 - 12 - 12 - 12 - 32 - - - - start - center - 1 - 0 - 4 finger pinch - - - - - - - None - Show Desktop - - - - - - - - - - - - - - - - - - 12 - vertical - - - start - center - Customization - - - - - - - - - - - 36 - - - none - - - - - - - 12 - 12 - 12 - 12 - 32 - - - - start - center - 1 - 0 - Touchpad swipe speed - - - - - - horizontal - end - 1 - - - - 300 - start - end - False - touchpad_scale_adjustment - - - - - - - - - - - center - end - 5 - False - False - 1.00 - - - - - - - - - - - - - - - - 12 - 12 - 12 - 12 - 32 - - - - vertical - start - - - - start - start - 1 - 0 - Follow natural swipe - - - - - - start - end - True - 0 - 6 - Similar to natural scrolling. Swipe moves the content, not the view - - - - - - - - - - end - True - center - - - - - - - - - - - - - - 12 - 12 - 12 - 12 - 32 - - - - start - center - 1 - 0 - Revert direction of overview navigation gesture - - - - - - end - True - center - - - - - - - - - - - - - - 12 - 12 - 12 - 12 - 32 - - - - start - center - 1 - 0 - Window switcher popup delay (ms) - - - - - - end - alttab_delay_adjustment - - - - - - - - - - - - - - - 12 - 12 - 12 - 12 - 32 - - - - start - center - 1 - 0 - Touchpad pinch speed - - - - - - horizontal - end - 1 - - - - 300 - start - end - False - - - 0.00 - -3.3219280948873626 - 3.3219280948873626 - 0.01 - - - - - - - - - - - - - center - end - 5 - False - False - 1.00 - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index fe163a7..bb48a3d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,6 +7,7 @@ "": { "name": "gnome-gestures", "version": "1.0.0", + "hasInstallScript": true, "license": "ISC", "dependencies": { "fs": "0.0.1-security", diff --git a/package.json b/package.json index cee5ffb..5dc30e5 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "lint:extension": "eslint extension scripts tests", "lint:package": "eslint build --fix", "transpile:watch": "tsc --watch", - "pretranspile": "cp -r @types/* node_modules/@gi-types/", + "postinstall": "cp -r @types/* node_modules/@gi-types/", "transpile": "npm run lint:extension && tsc", "build": "npm run clean && npm run transpile && node --unhandled-rejections=strict build/scripts/transpile.js && npm run lint:package", "clean": "rm -rf build && mkdir build", diff --git a/scripts/transpile.ts b/scripts/transpile.ts index 35c7762..1168281 100644 --- a/scripts/transpile.ts +++ b/scripts/transpile.ts @@ -16,6 +16,7 @@ const GIReplacements: Record = { '^@gi-types/gio(\\d+)?$': 'Gio', '^@gi-types/shell(\\d+)?$': 'Shell', '^@gi-types/meta(\\d+)?$': 'Meta', + '^@gi-types/adw(\\d+)?$': 'Adw', }; /** diff --git a/scripts/updateMetadata.ts b/scripts/updateMetadata.ts new file mode 100644 index 0000000..b738607 --- /dev/null +++ b/scripts/updateMetadata.ts @@ -0,0 +1,46 @@ +import * as fs from 'fs'; +import yargs from 'yargs'; +import { hideBin } from 'yargs/helpers'; + +interface ProgramOptions { + inFile: string, + descriptionREADMEFile: string, + outFile?: string, +} + +async function readCommandLineOptions(): Promise { + const options = await yargs(hideBin(process.argv)) + .option('inFile', { + description: 'Input metadata file', + type: 'string', + default: './build/extension/metadata.json', + }) + .option('descriptionREADMEFile', { + description: 'README file for description', + type: 'string', + default: './extension_page.md', + }) + .option('outFile', { + description: 'Output metadada file, if not provided input file is modified', + type: 'string', + requiresArg: false, + }) + .help() + .parse(); + + return options; +} + +async function main() { + const options = await readCommandLineOptions(); + options.outFile = options.outFile ?? options.inFile; + + const metadada = JSON.parse(fs.readFileSync(options.inFile, 'utf8')); + const description = fs.readFileSync(options.descriptionREADMEFile, 'utf8'); + + metadada['description'] = description; + + fs.writeFileSync(options.outFile, JSON.stringify(metadada, null, 2)); +} + +main(); \ No newline at end of file diff --git a/tests/prefs.ts b/tests/prefs.ts index fb494f4..41026bd 100644 --- a/tests/prefs.ts +++ b/tests/prefs.ts @@ -6,7 +6,8 @@ imports.gi.versions['Gtk'] = '4.0'; import Gio from '@gi-types/gio2'; import GLib from '@gi-types/glib2'; import { registerClass } from '@gi-types/gobject2'; -import Gtk from '@gi-types/gtk4'; +// import Gtk from '@gi-types/gtk4'; +import Adw from '@gi-types/adw1'; /** Add parent directory of file in searchPath to be able to import files */ function InsertIntoImportsPath() { @@ -18,7 +19,7 @@ function InsertIntoImportsPath() { } InsertIntoImportsPath(); -import { getPrefsWidget } from './common/prefs'; +import { buildPrefsWidget } from './common/prefs'; /** Read metadata of extension file */ function GetExtensionObj(): ExtensionMeta { @@ -41,7 +42,7 @@ function GetProgramOptions() { return { extensionId, /** updated ui file */ - uiPath: `${currentDir}/extension/ui/prefs.ui`, + uiDir: `${currentDir}/extension/ui`, /** using same schema used by extension to ensure, we can test preference */ schemaDir: Gio.file_new_for_path(`${GLib.get_home_dir()}/.local/share/gnome-shell/extensions/${extensionId}/schemas`), schema, @@ -73,22 +74,20 @@ function getSettings() { } const ExampleApp = registerClass( - class ExampleApp extends Gtk.Application { - appWindow!: Gtk.ApplicationWindow; + class ExampleApp extends Adw.Application { + prefsWindow!: Adw.PreferencesWindow; settings!: Gio.Settings; vfunc_startup() { super.vfunc_startup(); - this.appWindow = new Gtk.ApplicationWindow({ application: this }); + this.prefsWindow = new Adw.PreferencesWindow({ application: this }); this.settings = getSettings(); - const box = getPrefsWidget(this.settings, programOptions.uiPath); - box.connect('destroy', () => log('Box destroyed')); - this.appWindow.set_child(box); + buildPrefsWidget(this.prefsWindow, this.settings, programOptions.uiDir); } vfunc_activate() { super.vfunc_activate(); - this.appWindow.present(); + this.prefsWindow.present(); } }, ); diff --git a/tsconfig.json b/tsconfig.json index 3db7143..7e4d9b0 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,7 +9,6 @@ "gjs-environment", "base-types", "gtk4-types", - "adw1-types", "node" ], "lib": [ From e093d7d64777fb7c2673321b9b49ee05527debeb Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Mon, 18 Apr 2022 19:16:33 +0530 Subject: [PATCH 125/155] cleanup: remove old ui files --- extension/ui/prefs.ui | 288 ------------------------------------------ tests/testing.ts | 15 +++ 2 files changed, 15 insertions(+), 288 deletions(-) delete mode 100644 extension/ui/prefs.ui create mode 100644 tests/testing.ts diff --git a/extension/ui/prefs.ui b/extension/ui/prefs.ui deleted file mode 100644 index 48e2c64..0000000 --- a/extension/ui/prefs.ui +++ /dev/null @@ -1,288 +0,0 @@ - - - - - - 0.00 - -3.3219280948873626 - 3.3219280948873626 - 0.01 - 0.01 - - - - - vertical - 600 - 600 - 36 - 36 - vertical - - - - - 12 - - - start - center - Swipe Gestures - - - - - - - - - - - 36 - - - none - - - - - - - 12 - 12 - 12 - 12 - 32 - - - - vertical - start - - - - start - start - 1 - 0 - 4-finger gestures for overview navigation - - - - - - start - end - True - 0 - 6 - For navigating between desktop, activities and appgrid - - - - - - - - - - end - True - center - - - - - - - - - - - - - - 12 - 12 - 12 - 12 - 32 - - - - start - center - 1 - 0 - 4-finger gestures for workspace switching - - - - - - end - True - center - - - - - - - - - - - - - - 12 - 12 - 12 - 12 - 32 - - - - start - center - 1 - 0 - Window switching - - - - - - end - True - center - - - - - - - - - - - - - - 12 - 12 - 12 - 12 - 32 - - - - vertical - start - - - - start - start - 1 - 0 - Window manipulation - - - - - - start - end - True - 0 - 6 - Tile, unmaximize, maximize or fullscreen a window - - - - - - - - - - end - True - center - - - - - - - - - - - - - - 12 - 12 - 12 - 12 - 32 - - - - vertical - start - - - - start - start - 1 - 0 - Minimize window - - - - - - start - end - True - 0 - 6 - This will disable tiling gesture - - - - - - - - - - end - True - center - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tests/testing.ts b/tests/testing.ts new file mode 100644 index 0000000..e833789 --- /dev/null +++ b/tests/testing.ts @@ -0,0 +1,15 @@ +// // used for testing stuff + +// import GLib from '@gi-types/glib2'; +// import Clutter from '@gi-types/clutter8'; +// // import Adw from '@gi-types/adw1'; + +// // const group = new Adw.PreferencesGroup({na}) + +// const aa = new GLib.Variant<'a{s(ib)}'>('a{s(ib)}', {}); +// const val = aa.deepUnpack(); +// log(aa); +// log(val); + +// log(Clutter.KEY_Tab); +// console.log('eget'); \ No newline at end of file From ba0cadab5eeef2424d57197e228cda9336a81e04 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Mon, 18 Apr 2022 19:26:40 +0530 Subject: [PATCH 126/155] Update README --- Makefile | 4 +++- README.md | 16 ++++++++++++---- extension_page.md | 1 + metadata.json | 2 +- 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 66d253d..76b5ded 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,9 @@ ifdef FLATPAK_ID endif pack: - cp metadata.json $(EXTENSIONDIR) + node ${BUILDIR}/scripts/updateMetadata.js \ + --descriptionREADMEFile=extension_page.md \ + --inFile=metadata.json --outFile=${EXTENSIONDIR}/metadata.json cp -r extension/assets/ extension/stylesheet.css extension/ui extension/schemas $(EXTENSIONDIR) glib-compile-schemas --strict ${EXTENSIONDIR}/schemas rm -f ${ZIPPATH} diff --git a/README.md b/README.md index 53ac2ce..5704bce 100644 --- a/README.md +++ b/README.md @@ -41,15 +41,23 @@ On X11, you also need to install [gnome-x11-gesture-daemon](https://github.com/h | :------------ | :------ | :------ | | Show Desktop | Desktop | 3/4 | -#### Notes -* Minimize gesture is available if you have dash-to-dock/panel or similar extension enabled. +| Application Gestures (Configurable) | +| :--- | +| Go back or forward in browser tab | +| Switch to next or previous image in image viewer | +| Switch to next or previous audio | +| Change tabs | -#### For activating tiling gesture -0. This can't be activated if you enable minimize gesture +#### For activating tiling gesture (inverted T gesture) 1. Do a 3-finger vertical downward gesture on a unmaximized window 2. Wait a few milliseconds 3. Do a 3-finger horizontal gesture to tile a window to either side +#### Notes +* Minimize gesture is available if you have dash-to-dock/panel or similar extension enabled. +* To enable application gesture, window switching gesture needs to be disabled +* Tiling gesture can't be activated if you enable minimize gesture + ## Customization * To switch to windows from *all* workspaces using 3-fingers swipes, run diff --git a/extension_page.md b/extension_page.md index de2a1f1..9bd453d 100644 --- a/extension_page.md +++ b/extension_page.md @@ -9,6 +9,7 @@ This extension adds following features: • Optional minimize a window gesture • Override 3-finger gesture with 4-finger for switching workspace • Pinch to show desktop +• Application specific keyboard shortcut based gestures (e.g., navigating browser tabs) • Configure speed of gestures • Support for X11 diff --git a/metadata.json b/metadata.json index 3c2152a..78cb0b8 100644 --- a/metadata.json +++ b/metadata.json @@ -7,5 +7,5 @@ "settings-schema": "org.gnome.shell.extensions.gestureImprovements", "url": "https://github.com/harshadgavali/gnome-gesture-improvements", "uuid": "gestureImprovements@gestures", - "version": 20 + "version": 20.5 } From d56c40a354593a84ba090c6b58c3af140f540209 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 19 Apr 2022 07:34:55 +0530 Subject: [PATCH 127/155] prefs: inform about default setting on app gesture page --- extension/common/appGestures.ts | 36 ++++++++++++++++++++++----------- extension/common/prefs.ts | 20 ++++++++++++++++++ extension/ui/style-dark.css | 3 +++ extension/ui/style.css | 3 +++ scripts/transpile.ts | 1 + 5 files changed, 51 insertions(+), 12 deletions(-) create mode 100644 extension/ui/style-dark.css create mode 100644 extension/ui/style.css diff --git a/extension/common/appGestures.ts b/extension/common/appGestures.ts index 85eb188..37a16e8 100644 --- a/extension/common/appGestures.ts +++ b/extension/common/appGestures.ts @@ -106,8 +106,8 @@ const AppGestureSettingsRow = registerClass( this.add_row(this._keyBindCombo); // reverse switch row - this._reverseButton = new Gtk.Switch({ - active: reverse, + this._reverseButton = new Gtk.Switch({ + active: reverse, valign: Gtk.Align.CENTER, }); let actionRow = new Adw.ActionRow({ title: 'Reverse gesture direction' }); @@ -164,11 +164,23 @@ const AppKeybindingGesturePrefsGroup = registerClass( this._prefsWindow = prefsWindow; this._settings = settings; this._appRows = new Map(); - + this._cachedSettings = this._settings.get_value('forward-back-application-keyboard-shortcuts').deepUnpack(); this._appGestureModel = this._getAppGestureModelForComboBox(); // build ui widgets + this.add( + new Adw.PreferencesRow({ + child: new Gtk.Label({ + label: 'Applications not listed here will have default settings', + halign: Gtk.Align.CENTER, + hexpand: true, + heightRequest: 35, + }), + cssClasses: ['custom--information-label-row'], + }), + ); + this._addAppButtonRow = this._buildAddAppButtonRow(); this.add(this._addAppButtonRow); @@ -197,7 +209,7 @@ const AppKeybindingGesturePrefsGroup = registerClass( const appChooserDialog = new AppChooserDialog(selectableApps, this._prefsWindow); appChooserDialog.connect('app-selected', (_source, appId) => this._addAppGestureRow(appId)); - appChooserDialog.present(); + appChooserDialog.present(); } /** @@ -207,7 +219,7 @@ const AppKeybindingGesturePrefsGroup = registerClass( const addButton = new Gtk.Button({ iconName: 'list-add-symbolic', cssName: 'card', - heightRequest: 40, + heightRequest: 35, }); const addButtonRow = new Adw.PreferencesRow({ child: addButton }); @@ -222,7 +234,7 @@ const AppKeybindingGesturePrefsGroup = registerClass( */ private _addAppGestureRow(appId: string) { const app = Gio.DesktopAppInfo.new(appId); - if (!app) return; + if (!app) return; const appRow = new AppGestureSettingsRow( app, @@ -250,7 +262,7 @@ const AppKeybindingGesturePrefsGroup = registerClass( */ private _removeAppGestureRow(appId: string) { const appRow = this._appRows.get(appId); - if (!appRow) return; + if (!appRow) return; this.remove(appRow); this._appRows.delete(appId); @@ -270,13 +282,13 @@ const AppKeybindingGesturePrefsGroup = registerClass( modal: true, text: `Remove application specific gesture for ${app.get_display_name()}?`, }); - + dialog.add_button('Cancel', Gtk.ResponseType.CANCEL); dialog .add_button('Remove', Gtk.ResponseType.ACCEPT) .get_style_context() .add_class('destructive-action'); - + dialog.connect('response', (_dlg, response) => { if (response === Gtk.ResponseType.ACCEPT) { this._removeAppGestureRow(appId); @@ -293,7 +305,7 @@ const AppKeybindingGesturePrefsGroup = registerClass( */ private _getAppGestureSetting(appId: string): AppGestureSettings { let val = this._cachedSettings[appId]; - + if (!val) { // this is case when new app was selected for gesture val = [ForwardBackKeyBinds.Default, false]; @@ -308,11 +320,11 @@ const AppKeybindingGesturePrefsGroup = registerClass( this._cachedSettings[appId] = appGestureSettings; this._updateExtensionSettings(); } - + /** Updates extension settings */ private _updateExtensionSettings() { const glibVariant = new GLib.Variant('a{s(ib)}', this._cachedSettings); - this._settings.set_value('forward-back-application-keyboard-shortcuts', glibVariant); + this._settings.set_value('forward-back-application-keyboard-shortcuts', glibVariant); } /** Returns model which contains all possible choices for keybinding setting for app-gesture */ diff --git a/extension/common/prefs.ts b/extension/common/prefs.ts index 799031a..0e1de8f 100644 --- a/extension/common/prefs.ts +++ b/extension/common/prefs.ts @@ -1,6 +1,7 @@ import Gio from '@gi-types/gio2'; import GObject from '@gi-types/gobject2'; import Gtk from '@gi-types/gtk4'; +import Gdk from '@gi-types/gdk4'; import Adw from '@gi-types/adw1'; import { AllUIObjectKeys, BooleanSettingsKeys, DoubleSettingsKeys, EnumSettingsKeys, GioSettings, IntegerSettingsKeys } from './settings'; import { CanEnableMinimizeGesture } from './utils/prefUtils'; @@ -97,11 +98,30 @@ function bindPrefsSettings(builder: GtkBuilder, settings: Gio.Settings) { bind_combo_box('pinch-4-finger-gesture', settings, builder); } +function loadCssProvider(styleManager: Adw.StyleManager,uiDir: string) { + const cssProvider = new Gtk.CssProvider(); + cssProvider.load_from_path(`${uiDir}/${styleManager.dark ? 'style-dark' : 'style'}.css`); + const gtkDefaultDisplay = Gdk.Display.get_default(); + if (gtkDefaultDisplay) { + Gtk.StyleContext.add_provider_for_display( + gtkDefaultDisplay, + cssProvider, + Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION, + ); + } +} + export function buildPrefsWidget( prefsWindow: Adw.PreferencesWindow, settings: Gio.Settings, uiDir: string, ) { + prefsWindow.set_search_enabled(true); + + const styleManager = Adw.StyleManager.get_default(); + styleManager.connect('notify::dark', () => loadCssProvider(styleManager, uiDir)); + loadCssProvider(styleManager ,uiDir); + const builder = new Gtk.Builder() as GtkBuilder; builder.add_from_file(`${uiDir}/gestures.ui`); builder.add_from_file(`${uiDir}/customizations.ui`); diff --git a/extension/ui/style-dark.css b/extension/ui/style-dark.css new file mode 100644 index 0000000..8b80006 --- /dev/null +++ b/extension/ui/style-dark.css @@ -0,0 +1,3 @@ +.custom--information-label-row { + background-color: #44403b; +} \ No newline at end of file diff --git a/extension/ui/style.css b/extension/ui/style.css new file mode 100644 index 0000000..cb9ed7a --- /dev/null +++ b/extension/ui/style.css @@ -0,0 +1,3 @@ +.custom--information-label-row { + background-color: #f1e6d9; +} \ No newline at end of file diff --git a/scripts/transpile.ts b/scripts/transpile.ts index 1168281..b71e2f0 100644 --- a/scripts/transpile.ts +++ b/scripts/transpile.ts @@ -9,6 +9,7 @@ import { hideBin } from 'yargs/helpers'; // list of gi modules (regex) and their name in imports.gi const GIReplacements: Record = { '^@gi-types/gtk(\\d+)?$': 'Gtk', + '^@gi-types/gdk(\\d+)?$': 'Gdk', '^@gi-types/st(\\d+)?$': 'St', '^@gi-types/clutter(\\d+)?$': 'Clutter', '^@gi-types/gobject(\\d+)?$': 'GObject', From 7a73af5ebcdc6c6a5a174d346903c64dc393a040 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Tue, 19 Apr 2022 07:49:15 +0530 Subject: [PATCH 128/155] workflows: Update action names --- .github/workflows/ci.yml | 2 +- .github/workflows/pr.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7c4d5a2..ac6ad0e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Extension CI +name: Build on: push: diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 2bd184e..05b667b 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -1,4 +1,4 @@ -name: Extension CI +name: Linter on: pull_request: From 8b176f854ced6893a3b89eee99fec28eae751a81 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Tue, 19 Apr 2022 17:52:34 +0530 Subject: [PATCH 129/155] prefs: escape app names If app name have '&' sign in it, it will be escaped to '&' This fixes warnings on apps which have '&' in their name --- extension/common/appGestures.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/extension/common/appGestures.ts b/extension/common/appGestures.ts index 37a16e8..7a822b6 100644 --- a/extension/common/appGestures.ts +++ b/extension/common/appGestures.ts @@ -11,6 +11,11 @@ function getAppIconName(app: Gio.AppInfoPrototype) { return app.get_icon()?.to_string() ?? 'icon-missing'; } +/** Returns marked escaped text or empty string if text is nullable */ +function markup_escape_text(text?: string | null) { + return text ? GLib.markup_escape_text(text, text.length) : ''; +} + /** Dialog window used for selecting application from given list of apps * Emits `app-selected` signal with application id */ @@ -49,8 +54,8 @@ const AppChooserDialog = registerClass( /** for given app add row to selectable list */ private _addAppRow(app: Gio.AppInfoPrototype) { const row = new Adw.ActionRow({ - title: app.get_display_name() ?? '', - subtitle: app.get_description() ?? '', + title: markup_escape_text(app.get_display_name()), + subtitle: markup_escape_text(app.get_description()), activatable: true, iconName: getAppIconName(app), }); @@ -90,7 +95,7 @@ const AppGestureSettingsRow = registerClass( */ constructor(app: Gio.AppInfoPrototype, appGestureSettings: AppGestureSettings, model: Gio.ListModel) { super({ - title: app.get_display_name() ?? '', + title: markup_escape_text(app.get_display_name()), iconName: getAppIconName(app), }); From ce8ccc68da7d81b6e25746a58dfebf0e684bda09 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Tue, 19 Apr 2022 21:59:48 +0530 Subject: [PATCH 130/155] prefs: increase app icon size --- extension/common/appGestures.ts | 27 ++++++++++++++------------- extension/ui/style-dark.css | 6 +++++- extension/ui/style.css | 6 +++++- 3 files changed, 24 insertions(+), 15 deletions(-) diff --git a/extension/common/appGestures.ts b/extension/common/appGestures.ts index 7a822b6..3202990 100644 --- a/extension/common/appGestures.ts +++ b/extension/common/appGestures.ts @@ -6,9 +6,13 @@ import Adw from '@gi-types/adw1'; import { ForwardBackKeyBinds, GioSettings } from './settings'; import { registerClass } from './utils/gobject'; -/** return icon name for give app */ -function getAppIconName(app: Gio.AppInfoPrototype) { - return app.get_icon()?.to_string() ?? 'icon-missing'; +/** return icon image for give app */ +function getAppIconImage(app: Gio.AppInfoPrototype) { + const iconName = app.get_icon()?.to_string() ?? 'icon-missing'; + return new Gtk.Image({ + gicon: Gio.icon_new_for_string(iconName), + iconSize: Gtk.IconSize.LARGE, + }); } /** Returns marked escaped text or empty string if text is nullable */ @@ -35,7 +39,7 @@ const AppChooserDialog = registerClass( super({ modal: true, transientFor: parent, - // destroyWithParent: false, + destroyWithParent: false, }); this.set_default_size( @@ -57,8 +61,8 @@ const AppChooserDialog = registerClass( title: markup_escape_text(app.get_display_name()), subtitle: markup_escape_text(app.get_description()), activatable: true, - iconName: getAppIconName(app), }); + row.add_prefix(getAppIconImage(app)); this._group.add(row); row.connect('activated', () => { @@ -94,10 +98,8 @@ const AppGestureSettingsRow = registerClass( * @param model list of choices of keybings for setting */ constructor(app: Gio.AppInfoPrototype, appGestureSettings: AppGestureSettings, model: Gio.ListModel) { - super({ - title: markup_escape_text(app.get_display_name()), - iconName: getAppIconName(app), - }); + super({ title: markup_escape_text(app.get_display_name())}); + this.add_prefix(getAppIconImage(app)); const [keyBind, reverse] = appGestureSettings; @@ -180,9 +182,8 @@ const AppKeybindingGesturePrefsGroup = registerClass( label: 'Applications not listed here will have default settings', halign: Gtk.Align.CENTER, hexpand: true, - heightRequest: 35, }), - cssClasses: ['custom--information-label-row'], + cssClasses: ['custom-information-label-row', 'custom-smaller-card'], }), ); @@ -224,7 +225,7 @@ const AppKeybindingGesturePrefsGroup = registerClass( const addButton = new Gtk.Button({ iconName: 'list-add-symbolic', cssName: 'card', - heightRequest: 35, + cssClasses: ['custom-smaller-card'], }); const addButtonRow = new Adw.PreferencesRow({ child: addButton }); @@ -285,7 +286,7 @@ const AppKeybindingGesturePrefsGroup = registerClass( const dialog = new Gtk.MessageDialog({ transient_for: this._prefsWindow, modal: true, - text: `Remove application specific gesture for ${app.get_display_name()}?`, + text: `Remove gesture setting for ${app.get_display_name()}?`, }); dialog.add_button('Cancel', Gtk.ResponseType.CANCEL); diff --git a/extension/ui/style-dark.css b/extension/ui/style-dark.css index 8b80006..377f4d8 100644 --- a/extension/ui/style-dark.css +++ b/extension/ui/style-dark.css @@ -1,3 +1,7 @@ -.custom--information-label-row { +.custom-smaller-card { + min-height: 35px; +} + +.custom-information-label-row { background-color: #44403b; } \ No newline at end of file diff --git a/extension/ui/style.css b/extension/ui/style.css index cb9ed7a..5fd26e2 100644 --- a/extension/ui/style.css +++ b/extension/ui/style.css @@ -1,3 +1,7 @@ -.custom--information-label-row { +.custom-smaller-card { + min-height: 35px; +} + +.custom-information-label-row { background-color: #f1e6d9; } \ No newline at end of file From 965823e1473440f4a1419fadafa984cfcb92ab51 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Tue, 19 Apr 2022 22:00:16 +0530 Subject: [PATCH 131/155] schemas: Add more default app gesture settings --- Makefile | 2 +- ...g.gnome.shell.extensions.gestureImprovements.gschema.xml | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 76b5ded..dc480c6 100644 --- a/Makefile +++ b/Makefile @@ -26,4 +26,4 @@ build-tests: build/tests/prefs.js @npx eslint build/tests --fix test-ui: build-tests - gjs build/tests/prefs.js + gjs -m build/tests/prefs.js diff --git a/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml b/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml index 8f038c0..f08f4c8 100644 --- a/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml +++ b/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml @@ -69,11 +69,15 @@ { 'firefox.desktop': (1, false), 'org.chromium.Chromium.desktop': (1, false), - 'org.gnome.eog.desktop': (3, false), 'org.gnome.gThumb.desktop': (2, false), + 'org.gnome.eog.desktop': (3, false), + 'org.gnome.Photos.desktop': (3, false), + 'shotwell.desktop': (3, false), 'com.spotify.Client.desktop': (4, false), + 'code.desktop': (5, false), 'code-insiders.desktop': (5, false), 'org.gnome.Terminal.desktop': (5, false), + 'com.gexperts.Tilix.desktop': (5, false), 'org.gnome.TextEditor.desktop': (5, false) } From dfc2a3196a9f17d65eb1137ba8e0235d302baa74 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Wed, 20 Apr 2022 00:09:14 +0530 Subject: [PATCH 132/155] Update version --- metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata.json b/metadata.json index 78cb0b8..2d80351 100644 --- a/metadata.json +++ b/metadata.json @@ -7,5 +7,5 @@ "settings-schema": "org.gnome.shell.extensions.gestureImprovements", "url": "https://github.com/harshadgavali/gnome-gesture-improvements", "uuid": "gestureImprovements@gestures", - "version": 20.5 + "version": 21 } From 9de8764286f71c4e40bd1aab25e419496fe93fa4 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Wed, 20 Apr 2022 01:25:17 +0530 Subject: [PATCH 133/155] build: Add newlines in transpiled files for prettier output files --- .eslintrc.json | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index aefde47..40faef2 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/eslintrc", "env": { "es2021": true }, @@ -104,7 +105,28 @@ "no-unused-expressions": "off", "no-mixed-spaces-and-tabs": "off", "comma-dangle": "off", - "lines-between-class-members": "off" + "no-multiple-empty-lines": ["error", { "max": 1 }], + "padding-line-between-statements": [ + "error", + { "blankLine": "always", "prev": "*", "next": ["function", "multiline-var"] }, + { + "blankLine": "always", + "prev": [ + "function", "multiline-const", + "multiline-var", "multiline-let", + "multiline-expression", "multiline-block-like" + ], + "next": "*" + } + ], + "lines-around-comment": [ + "error", + { + "beforeBlockComment": true, + "beforeLineComment": true, + "allowBlockStart": true + } + ] } }, { From 5157f1ad162b2b219f15e281c5b2fa0b9273eae9 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Wed, 20 Apr 2022 01:48:31 +0530 Subject: [PATCH 134/155] prefs: Always show minimize gesture option --- extension/common/prefs.ts | 13 +------------ extension/common/settings.ts | 3 +-- extension/common/utils/prefUtils.ts | 18 ------------------ extension/ui/gestures.ui | 2 +- 4 files changed, 3 insertions(+), 33 deletions(-) delete mode 100644 extension/common/utils/prefUtils.ts diff --git a/extension/common/prefs.ts b/extension/common/prefs.ts index 0e1de8f..5a529e5 100644 --- a/extension/common/prefs.ts +++ b/extension/common/prefs.ts @@ -4,7 +4,6 @@ import Gtk from '@gi-types/gtk4'; import Gdk from '@gi-types/gdk4'; import Adw from '@gi-types/adw1'; import { AllUIObjectKeys, BooleanSettingsKeys, DoubleSettingsKeys, EnumSettingsKeys, GioSettings, IntegerSettingsKeys } from './settings'; -import { CanEnableMinimizeGesture } from './utils/prefUtils'; // eslint-disable-next-line @typescript-eslint/no-unused-vars import { getAppKeybindingGesturePrefsPage } from './appGestures'; @@ -63,15 +62,6 @@ function display_in_log_scale(key: DoubleSettingsKeys, label_key: AllUIObjectKey scale.set_value(initialValue); } -/** Show button to enable minimize gesture, returns whether button was shown */ -function showEnableMinimizeButton(key: BooleanSettingsKeys, row_key: AllUIObjectKeys, settings: GioSettings, builder: GtkBuilder) { - const row = builder.get_object(row_key); - row.visible = settings.get_boolean(key) || CanEnableMinimizeGesture(); - if (row.visible) - bind_boolean_value(key, settings, builder); - return row.visible; -} - /** * Binds preference widgets and settings keys * @param builder builder object for preference widgets @@ -91,8 +81,7 @@ function bindPrefsSettings(builder: GtkBuilder, settings: Gio.Settings) { bind_boolean_value('enable-alttab-gesture', settings, builder); bind_boolean_value('enable-window-manipulation-gesture', settings, builder); - - showEnableMinimizeButton('allow-minimize-window', 'allow-minimize-window_box-row', settings, builder); + bind_boolean_value('allow-minimize-window', settings, builder); bind_combo_box('pinch-3-finger-gesture', settings, builder); bind_combo_box('pinch-4-finger-gesture', settings, builder); diff --git a/extension/common/settings.ts b/extension/common/settings.ts index 20f9252..1d65736 100644 --- a/extension/common/settings.ts +++ b/extension/common/settings.ts @@ -61,8 +61,7 @@ export type AllUIObjectKeys = UIPageObjectIds | AllSettingsKeys | 'touchpad-speed-scale_display-value' | - 'touchpad-pinch-speed_display-value' | - 'allow-minimize-window_box-row' + 'touchpad-pinch-speed_display-value' ; type Enum_Functions = { diff --git a/extension/common/utils/prefUtils.ts b/extension/common/utils/prefUtils.ts deleted file mode 100644 index 9352cca..0000000 --- a/extension/common/utils/prefUtils.ts +++ /dev/null @@ -1,18 +0,0 @@ -import Gio from '@gi-types/gio2'; - -function getShellSettings() { - return new Gio.Settings({ schema_id: 'org.gnome.shell' }); -} - -export function CanEnableMinimizeGesture() { - const extensionsWhichCanMinimizeToBottom = [ - 'dash-to-dock@micxgx.gmail.com', - 'dash-to-panel@jderose9.github.com', - 'window-list@gnome-shell-extensions.gcampax.github.com', - 'ubuntu-dock@ubuntu.com', - ]; - - const shellSettings = getShellSettings(); - const enabledExtensionsIds = shellSettings.get_strv('enabled-extensions'); - return enabledExtensionsIds.some(extensionId => extensionsWhichCanMinimizeToBottom.includes(extensionId)); -} \ No newline at end of file diff --git a/extension/ui/gestures.ui b/extension/ui/gestures.ui index b01e5e4..6503fac 100644 --- a/extension/ui/gestures.ui +++ b/extension/ui/gestures.ui @@ -75,7 +75,7 @@ - + Minimize window This will disable tiling gesture From e83181e9b71f1bc344916a35e08bf3865994bb8a Mon Sep 17 00:00:00 2001 From: Achim Stuy Date: Sun, 2 Jan 2022 22:46:54 +0100 Subject: [PATCH 135/155] Add Close Window on 3 finger pinch --- extension/src/pinchGestures/closeWindow.ts | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 extension/src/pinchGestures/closeWindow.ts diff --git a/extension/src/pinchGestures/closeWindow.ts b/extension/src/pinchGestures/closeWindow.ts new file mode 100644 index 0000000..360c5f7 --- /dev/null +++ b/extension/src/pinchGestures/closeWindow.ts @@ -0,0 +1,35 @@ +import Clutter from '@gi-types/clutter8'; +import Shell from '@gi-types/shell0'; +import { TouchpadPinchGesture } from '../trackers/pinchTracker'; +import { VirtualKeyboard } from '../utils/keyboard'; + +export class CloseWindowExtension implements ISubExtension { + private _keyboard: VirtualKeyboard; + private _pinchTracker: typeof TouchpadPinchGesture.prototype; + + constructor(nfingers: number[]) { + this._keyboard = new VirtualKeyboard(); + + this._pinchTracker = new TouchpadPinchGesture({ + nfingers: nfingers, + allowedModes: Shell.ActionMode.NORMAL, + }); + } + + apply(): void { + this._pinchTracker.connect('begin', this.gestureBegin.bind(this)); + this._pinchTracker.connect('end', this.gestureEnd.bind(this)); + } + + destroy(): void { + this._pinchTracker?.destroy(); + } + + gestureBegin() { + this._pinchTracker.confirmPinch(0, [0, 1], 0); + } + + gestureEnd(_duration: number, _progress: number) { + this._keyboard.sendKeys(Clutter.KEY_Control_L, Clutter.KEY_w); + } +} \ No newline at end of file From 859f0543a3e5e3fcf03401a70d12d24a90cca24b Mon Sep 17 00:00:00 2001 From: Achim Stuy Date: Thu, 6 Jan 2022 22:00:08 +0100 Subject: [PATCH 136/155] Add Close Window to settings --- extension/common/settings.ts | 1 + extension/extension.ts | 10 ++++++++++ ...me.shell.extensions.gestureImprovements.gschema.xml | 1 + 3 files changed, 12 insertions(+) diff --git a/extension/common/settings.ts b/extension/common/settings.ts index 1d65736..73f0b5d 100644 --- a/extension/common/settings.ts +++ b/extension/common/settings.ts @@ -5,6 +5,7 @@ import GLib from '@gi-types/glib2'; export enum PinchGestureType { NONE = 0, SHOW_DESKTOP = 1, + CLOSE_WINDOW = 2, } export enum ForwardBackKeyBinds { diff --git a/extension/extension.ts b/extension/extension.ts index 6b07624..ef386dc 100644 --- a/extension/extension.ts +++ b/extension/extension.ts @@ -7,6 +7,7 @@ import { AltTabGestureExtension } from './src/altTab'; import { ForwardBackGestureExtension } from './src/forwardBack'; import { GestureExtension } from './src/gestures'; import { OverviewRoundTripGestureExtension } from './src/overviewRoundTrip'; +import { CloseWindowExtension } from './src/pinchGestures/closeWindow'; import { ShowDesktopExtension } from './src/pinchGestures/showDesktop'; import { SnapWindowExtension } from './src/snapWindow'; import * as DBusUtils from './src/utils/dbus'; @@ -98,6 +99,15 @@ class Extension { if (showDesktopFingers.length) this._extensions.push(new ShowDesktopExtension(showDesktopFingers)); + // pinch to close window + const closeWindowFingers = [ + this.settings.get_enum('pinch-3-finger-gesture') === PinchGestureType.CLOSE_WINDOW ? 3 : undefined, + this.settings.get_enum('pinch-4-finger-gesture') === PinchGestureType.CLOSE_WINDOW ? 4 : undefined, + ].filter((f): f is number => typeof f === 'number'); + + if (closeWindowFingers.length) + this._extensions.push(new CloseWindowExtension(closeWindowFingers)); + this._extensions.forEach(extension => extension.apply?.()); } diff --git a/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml b/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml index f08f4c8..b157310 100644 --- a/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml +++ b/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml @@ -3,6 +3,7 @@ + From 9f0bb3b0b5b8d0f68adc6884757b484e6af783de Mon Sep 17 00:00:00 2001 From: Achim Stuy Date: Wed, 19 Jan 2022 22:24:48 +0100 Subject: [PATCH 137/155] Add preview animation for close current window --- extension/src/pinchGestures/closeWindow.ts | 132 ++++++++++++++++++++- 1 file changed, 130 insertions(+), 2 deletions(-) diff --git a/extension/src/pinchGestures/closeWindow.ts b/extension/src/pinchGestures/closeWindow.ts index 360c5f7..ff9ec14 100644 --- a/extension/src/pinchGestures/closeWindow.ts +++ b/extension/src/pinchGestures/closeWindow.ts @@ -1,11 +1,116 @@ import Clutter from '@gi-types/clutter8'; +import { registerClass } from '@gi-types/gobject2'; +import Meta from '@gi-types/meta8'; import Shell from '@gi-types/shell0'; +import St from '@gi-types/st1'; + +import { global, imports } from 'gnome-shell'; + import { TouchpadPinchGesture } from '../trackers/pinchTracker'; +import { easeActor, easeAdjustment } from '../utils/environment'; import { VirtualKeyboard } from '../utils/keyboard'; +const Main = imports.ui.main; +const Utils = imports.misc.util; + +const ClosePreview = registerClass( + class ClosePreview extends St.Widget { + private _adjustment: St.Adjustment; + private _windowBox?: Meta.Rectangle; + + + constructor() { + super({ + reactive: false, + style_class: 'tile-preview', + style: 'border-radius: 8px', + visible: false, + }); + this.connect('destroy', this._onDestroy.bind(this)); + + this._adjustment = new St.Adjustment({ + actor: this, + value: 0, + lower: -1, + upper: 2, + }); + + this._adjustment.connect('notify::value', this._valueChanged.bind(this)); + } + + open(window: Meta.Window, currentProgress: number): boolean{ + this._windowBox = window.get_frame_rect(); + + this.opacity = 0; + this._adjustment.value = currentProgress; + this._valueChanged(); + this.visible = true; + this.easeOpacity(255); + return true; + } + + finish(duration: number, progress: number): void { + + const callback = () => { + + this._windowBox = undefined; + }; + + this.easeOpacity(0, () => this.visible = false); + + easeAdjustment(this._adjustment, progress, { + duration: duration, + mode: Clutter.AnimationMode.EASE_IN_EXPO, + onStopped: callback, + }); + } + + _valueChanged(): void { + const progress = this._adjustment.value; + + if (this._windowBox) { + const [x, y] = [ + Utils.lerp(this._windowBox.x, this._windowBox.x + this._windowBox.width / 2, progress), + Utils.lerp(this._windowBox.y, this._windowBox.y + this._windowBox.height / 2, progress), + ]; + + const [width, height] = [ + Utils.lerp(this._windowBox.width, 0, progress), + Utils.lerp(this._windowBox.height, 0, progress), + ]; + + this.set_position(x, y); + this.set_size(width, height); + } + } + + _onDestroy(): void { + this._adjustment.run_dispose(); + } + + easeOpacity(value: number, callback?: () => void) { + easeActor(this as St.Widget, { + opacity: value, + duration: 150, + mode: Clutter.AnimationMode.EASE_IN_EXPO, + onStopped: () => { + if (callback) + callback(); + }, + }); + } + + get adjustment(): St.Adjustment { + return this._adjustment; + } + }, +); + export class CloseWindowExtension implements ISubExtension { private _keyboard: VirtualKeyboard; private _pinchTracker: typeof TouchpadPinchGesture.prototype; + private _preview: typeof ClosePreview.prototype; + private _uiGroupAddedActorId: number; constructor(nfingers: number[]) { this._keyboard = new VirtualKeyboard(); @@ -14,6 +119,13 @@ export class CloseWindowExtension implements ISubExtension { nfingers: nfingers, allowedModes: Shell.ActionMode.NORMAL, }); + + this._preview = new ClosePreview(); + Main.layoutManager.uiGroup.add_child(this._preview); + this._uiGroupAddedActorId = Main.layoutManager.uiGroup.connect('actor-added', () => { + Main.layoutManager.uiGroup.set_child_above_sibling(this._preview, null); + }); + Main.layoutManager.uiGroup.set_child_above_sibling(this._preview, null); } apply(): void { @@ -22,14 +134,30 @@ export class CloseWindowExtension implements ISubExtension { } destroy(): void { + if (this._uiGroupAddedActorId) { + Main.layoutManager.uiGroup.disconnect(this._uiGroupAddedActorId); + this._uiGroupAddedActorId = 0; + } + Main.layoutManager.uiGroup.remove_child(this._preview); + this._preview.destroy(); + this._pinchTracker?.destroy(); } gestureBegin() { - this._pinchTracker.confirmPinch(0, [0, 1], 0); + const window = global.display.get_focus_window() as Meta.Window | null; + if (window) { + this._pinchTracker.confirmPinch(0, [0, 1], 0); + this._preview.open(window, 0); + } + } + + _gestureUpdate(progress: number): void { + this._preview.adjustment.value = progress; } - gestureEnd(_duration: number, _progress: number) { + gestureEnd(duration: number, progress: number) { + this._preview.finish(duration, progress); this._keyboard.sendKeys(Clutter.KEY_Control_L, Clutter.KEY_w); } } \ No newline at end of file From 1f74e83fa554d2a076cbff48e61326f37e8a0767 Mon Sep 17 00:00:00 2001 From: Achim Stuy Date: Mon, 24 Jan 2022 00:26:59 +0100 Subject: [PATCH 138/155] fixup! Add preview animation for close current window --- extension/src/pinchGestures/closeWindow.ts | 61 ++++++++++++---------- extension/stylesheet.css | 7 +++ 2 files changed, 39 insertions(+), 29 deletions(-) diff --git a/extension/src/pinchGestures/closeWindow.ts b/extension/src/pinchGestures/closeWindow.ts index ff9ec14..67104b8 100644 --- a/extension/src/pinchGestures/closeWindow.ts +++ b/extension/src/pinchGestures/closeWindow.ts @@ -7,23 +7,23 @@ import St from '@gi-types/st1'; import { global, imports } from 'gnome-shell'; import { TouchpadPinchGesture } from '../trackers/pinchTracker'; -import { easeActor, easeAdjustment } from '../utils/environment'; +import { easeActor } from '../utils/environment'; import { VirtualKeyboard } from '../utils/keyboard'; const Main = imports.ui.main; const Utils = imports.misc.util; +declare type Type_TouchpadPinchGesture = typeof TouchpadPinchGesture.prototype; + const ClosePreview = registerClass( class ClosePreview extends St.Widget { private _adjustment: St.Adjustment; private _windowBox?: Meta.Rectangle; - constructor() { super({ reactive: false, - style_class: 'tile-preview', - style: 'border-radius: 8px', + style_class: 'close-window-preview', visible: false, }); this.connect('destroy', this._onDestroy.bind(this)); @@ -31,37 +31,28 @@ const ClosePreview = registerClass( this._adjustment = new St.Adjustment({ actor: this, value: 0, - lower: -1, - upper: 2, + lower: 0, + upper: 1, }); this._adjustment.connect('notify::value', this._valueChanged.bind(this)); } - open(window: Meta.Window, currentProgress: number): boolean{ + open(window: Meta.Window): boolean{ this._windowBox = window.get_frame_rect(); this.opacity = 0; - this._adjustment.value = currentProgress; + this._adjustment.value = 0; this._valueChanged(); this.visible = true; this.easeOpacity(255); return true; } - finish(duration: number, progress: number): void { - - const callback = () => { - + finish(): void { + this.easeOpacity(0, () => { + this.visible = false; this._windowBox = undefined; - }; - - this.easeOpacity(0, () => this.visible = false); - - easeAdjustment(this._adjustment, progress, { - duration: duration, - mode: Clutter.AnimationMode.EASE_IN_EXPO, - onStopped: callback, }); } @@ -92,7 +83,7 @@ const ClosePreview = registerClass( easeActor(this as St.Widget, { opacity: value, duration: 150, - mode: Clutter.AnimationMode.EASE_IN_EXPO, + mode: Clutter.AnimationMode.EASE, onStopped: () => { if (callback) callback(); @@ -107,8 +98,11 @@ const ClosePreview = registerClass( ); export class CloseWindowExtension implements ISubExtension { + // Define initial progress as 0.5 to allow pinch in and pinch out. + readonly _initialProgress: number = 0.5; + private _keyboard: VirtualKeyboard; - private _pinchTracker: typeof TouchpadPinchGesture.prototype; + private _pinchTracker: Type_TouchpadPinchGesture; private _preview: typeof ClosePreview.prototype; private _uiGroupAddedActorId: number; @@ -130,10 +124,13 @@ export class CloseWindowExtension implements ISubExtension { apply(): void { this._pinchTracker.connect('begin', this.gestureBegin.bind(this)); + this._pinchTracker.connect('update', this.gestureUpdate.bind(this)); this._pinchTracker.connect('end', this.gestureEnd.bind(this)); } destroy(): void { + this._pinchTracker?.destroy(); + if (this._uiGroupAddedActorId) { Main.layoutManager.uiGroup.disconnect(this._uiGroupAddedActorId); this._uiGroupAddedActorId = 0; @@ -144,20 +141,26 @@ export class CloseWindowExtension implements ISubExtension { this._pinchTracker?.destroy(); } - gestureBegin() { + gestureBegin(tracker: Type_TouchpadPinchGesture) { const window = global.display.get_focus_window() as Meta.Window | null; if (window) { - this._pinchTracker.confirmPinch(0, [0, 1], 0); - this._preview.open(window, 0); + tracker.confirmPinch(0, [0, 1], this._initialProgress); + this._preview.open(window); } } - _gestureUpdate(progress: number): void { - this._preview.adjustment.value = progress; + gestureUpdate(_tracker: unknown, progress: number): void { + // Convert progress to number between 0 (start) and 1 (end). + let relativeProgress: number; + if (this._initialProgress === 0) + relativeProgress = progress; + else + relativeProgress = Math.abs(this._initialProgress - progress) / this._initialProgress; + this._preview.adjustment.value = relativeProgress; } - gestureEnd(duration: number, progress: number) { - this._preview.finish(duration, progress); + gestureEnd(_tracker: unknown, _duration: number, _progress: number) { + this._preview.finish(); this._keyboard.sendKeys(Clutter.KEY_Control_L, Clutter.KEY_w); } } \ No newline at end of file diff --git a/extension/stylesheet.css b/extension/stylesheet.css index 044e9cc..3055051 100644 --- a/extension/stylesheet.css +++ b/extension/stylesheet.css @@ -3,6 +3,7 @@ .gie-alttab-quick-transition .item-box { transition-duration: 0ms; } + .gie-circle { width: 50px; height: 50px; @@ -24,4 +25,10 @@ .gie-outer-circle { background-color: rgba(68, 120, 175, 0.5); border: solid 2px; +} + +.close-window-preview { + background-color: rgba(255, 0, 0, 0.75); + border-color: red; + border-radius: 8px; } \ No newline at end of file From 552b7f2db3c90a65a3d6b607e0d71fb340288be9 Mon Sep 17 00:00:00 2001 From: Achim Stuy Date: Mon, 24 Jan 2022 00:28:22 +0100 Subject: [PATCH 139/155] Change animation to red overlay increasing opacity. --- extension/src/pinchGestures/closeWindow.ts | 48 ++++------------------ extension/stylesheet.css | 3 +- 2 files changed, 9 insertions(+), 42 deletions(-) diff --git a/extension/src/pinchGestures/closeWindow.ts b/extension/src/pinchGestures/closeWindow.ts index 67104b8..8cab929 100644 --- a/extension/src/pinchGestures/closeWindow.ts +++ b/extension/src/pinchGestures/closeWindow.ts @@ -7,18 +7,15 @@ import St from '@gi-types/st1'; import { global, imports } from 'gnome-shell'; import { TouchpadPinchGesture } from '../trackers/pinchTracker'; -import { easeActor } from '../utils/environment'; import { VirtualKeyboard } from '../utils/keyboard'; const Main = imports.ui.main; -const Utils = imports.misc.util; declare type Type_TouchpadPinchGesture = typeof TouchpadPinchGesture.prototype; const ClosePreview = registerClass( class ClosePreview extends St.Widget { private _adjustment: St.Adjustment; - private _windowBox?: Meta.Rectangle; constructor() { super({ @@ -38,59 +35,28 @@ const ClosePreview = registerClass( this._adjustment.connect('notify::value', this._valueChanged.bind(this)); } - open(window: Meta.Window): boolean{ - this._windowBox = window.get_frame_rect(); + open(window: Meta.Window): void { + const windowBox = window.get_frame_rect(); + this.set_position(windowBox.x, windowBox.y); + this.set_size(windowBox.width, windowBox.height); - this.opacity = 0; - this._adjustment.value = 0; - this._valueChanged(); this.visible = true; - this.easeOpacity(255); - return true; + this._adjustment.value = 0; } finish(): void { - this.easeOpacity(0, () => { - this.visible = false; - this._windowBox = undefined; - }); + this.visible = false; } _valueChanged(): void { const progress = this._adjustment.value; - - if (this._windowBox) { - const [x, y] = [ - Utils.lerp(this._windowBox.x, this._windowBox.x + this._windowBox.width / 2, progress), - Utils.lerp(this._windowBox.y, this._windowBox.y + this._windowBox.height / 2, progress), - ]; - - const [width, height] = [ - Utils.lerp(this._windowBox.width, 0, progress), - Utils.lerp(this._windowBox.height, 0, progress), - ]; - - this.set_position(x, y); - this.set_size(width, height); - } + this.opacity = progress * 255; } _onDestroy(): void { this._adjustment.run_dispose(); } - easeOpacity(value: number, callback?: () => void) { - easeActor(this as St.Widget, { - opacity: value, - duration: 150, - mode: Clutter.AnimationMode.EASE, - onStopped: () => { - if (callback) - callback(); - }, - }); - } - get adjustment(): St.Adjustment { return this._adjustment; } diff --git a/extension/stylesheet.css b/extension/stylesheet.css index 3055051..124c8cf 100644 --- a/extension/stylesheet.css +++ b/extension/stylesheet.css @@ -30,5 +30,6 @@ .close-window-preview { background-color: rgba(255, 0, 0, 0.75); border-color: red; - border-radius: 8px; + border-top-left-radius: 8px; + border-top-right-radius: 8px; } \ No newline at end of file From 4286d5d37932d8bbaa03a3ce1059dca8c6eca4ed Mon Sep 17 00:00:00 2001 From: Achim Stuy Date: Mon, 24 Jan 2022 22:48:53 +0100 Subject: [PATCH 140/155] Add threshold to cancel close window action. --- extension/src/pinchGestures/closeWindow.ts | 40 +++++++++++++++------- 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/extension/src/pinchGestures/closeWindow.ts b/extension/src/pinchGestures/closeWindow.ts index 8cab929..95477bf 100644 --- a/extension/src/pinchGestures/closeWindow.ts +++ b/extension/src/pinchGestures/closeWindow.ts @@ -13,6 +13,15 @@ const Main = imports.ui.main; declare type Type_TouchpadPinchGesture = typeof TouchpadPinchGesture.prototype; +/** + * Define initial progress as 0.5 to allow pinch in and pinch out. + */ +const _initialProgress = 0.5; +/** + * Relative progress must finish above this value to execute close action. + */ +const _closeThreshold = 0.5; + const ClosePreview = registerClass( class ClosePreview extends St.Widget { private _adjustment: St.Adjustment; @@ -64,9 +73,6 @@ const ClosePreview = registerClass( ); export class CloseWindowExtension implements ISubExtension { - // Define initial progress as 0.5 to allow pinch in and pinch out. - readonly _initialProgress: number = 0.5; - private _keyboard: VirtualKeyboard; private _pinchTracker: Type_TouchpadPinchGesture; private _preview: typeof ClosePreview.prototype; @@ -110,23 +116,33 @@ export class CloseWindowExtension implements ISubExtension { gestureBegin(tracker: Type_TouchpadPinchGesture) { const window = global.display.get_focus_window() as Meta.Window | null; if (window) { - tracker.confirmPinch(0, [0, 1], this._initialProgress); + tracker.confirmPinch(0, [0, 1], _initialProgress); this._preview.open(window); } } gestureUpdate(_tracker: unknown, progress: number): void { - // Convert progress to number between 0 (start) and 1 (end). - let relativeProgress: number; - if (this._initialProgress === 0) - relativeProgress = progress; - else - relativeProgress = Math.abs(this._initialProgress - progress) / this._initialProgress; - this._preview.adjustment.value = relativeProgress; + this._preview.adjustment.value = this.calculateRelativeProgress(progress); } gestureEnd(_tracker: unknown, _duration: number, _progress: number) { + // Don't use _progress parameter, as it's value is always 0 or 1 but not a value between. this._preview.finish(); - this._keyboard.sendKeys(Clutter.KEY_Control_L, Clutter.KEY_w); + if (this._preview.adjustment.value >= _closeThreshold) + this._keyboard.sendKeys(Clutter.KEY_Control_L, Clutter.KEY_w); + } + + /** + * Convert absolute progress from pinch tracker to number between 0 (start) and 1 (end). + * @param progress Progress from pinch tracker as value between 0 and 1. + */ + calculateRelativeProgress(progress: number) { + // Disable compile / lint error in order to allow modification of _initialProgress. + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + if (_initialProgress === 0) + return progress; + else + return Math.abs(_initialProgress - progress) / _initialProgress; } } \ No newline at end of file From 640fa1f6d9988a4aca43da180fbf6ea0ba21ae47 Mon Sep 17 00:00:00 2001 From: Achim Stuy Date: Tue, 1 Feb 2022 21:33:11 +0100 Subject: [PATCH 141/155] Use PinchTracker's snap points instead of custom threshold implementation. --- extension/src/pinchGestures/closeWindow.ts | 38 ++++++---------------- 1 file changed, 10 insertions(+), 28 deletions(-) diff --git a/extension/src/pinchGestures/closeWindow.ts b/extension/src/pinchGestures/closeWindow.ts index 95477bf..bf29d8b 100644 --- a/extension/src/pinchGestures/closeWindow.ts +++ b/extension/src/pinchGestures/closeWindow.ts @@ -11,16 +11,13 @@ import { VirtualKeyboard } from '../utils/keyboard'; const Main = imports.ui.main; -declare type Type_TouchpadPinchGesture = typeof TouchpadPinchGesture.prototype; +enum CloseWindowGestureState { + PINCH_IN = -1, + DEFAULT = 0, + PINCH_OUT = 1 +} -/** - * Define initial progress as 0.5 to allow pinch in and pinch out. - */ -const _initialProgress = 0.5; -/** - * Relative progress must finish above this value to execute close action. - */ -const _closeThreshold = 0.5; +declare type Type_TouchpadPinchGesture = typeof TouchpadPinchGesture.prototype; const ClosePreview = registerClass( class ClosePreview extends St.Widget { @@ -116,33 +113,18 @@ export class CloseWindowExtension implements ISubExtension { gestureBegin(tracker: Type_TouchpadPinchGesture) { const window = global.display.get_focus_window() as Meta.Window | null; if (window) { - tracker.confirmPinch(0, [0, 1], _initialProgress); + tracker.confirmPinch(0, [CloseWindowGestureState.PINCH_IN, CloseWindowGestureState.DEFAULT, CloseWindowGestureState.PINCH_OUT], CloseWindowGestureState.DEFAULT); this._preview.open(window); } } gestureUpdate(_tracker: unknown, progress: number): void { - this._preview.adjustment.value = this.calculateRelativeProgress(progress); + this._preview.adjustment.value = Math.abs(progress); } - gestureEnd(_tracker: unknown, _duration: number, _progress: number) { - // Don't use _progress parameter, as it's value is always 0 or 1 but not a value between. + gestureEnd(_tracker: unknown, _duration: number, progress: number) { this._preview.finish(); - if (this._preview.adjustment.value >= _closeThreshold) + if (progress !== CloseWindowGestureState.DEFAULT) this._keyboard.sendKeys(Clutter.KEY_Control_L, Clutter.KEY_w); } - - /** - * Convert absolute progress from pinch tracker to number between 0 (start) and 1 (end). - * @param progress Progress from pinch tracker as value between 0 and 1. - */ - calculateRelativeProgress(progress: number) { - // Disable compile / lint error in order to allow modification of _initialProgress. - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - if (_initialProgress === 0) - return progress; - else - return Math.abs(_initialProgress - progress) / _initialProgress; - } } \ No newline at end of file From e52473beb6d484b5e2356eed890b1c3488c33cb2 Mon Sep 17 00:00:00 2001 From: Achim Stuy Date: Tue, 1 Feb 2022 22:15:53 +0100 Subject: [PATCH 142/155] Distinguish between `Close Document` and `Close Window` --- extension/common/settings.ts | 3 +- extension/extension.ts | 11 ++++++- ...extensions.gestureImprovements.gschema.xml | 3 +- extension/src/pinchGestures/closeWindow.ts | 33 ++++++++++++++++--- 4 files changed, 43 insertions(+), 7 deletions(-) diff --git a/extension/common/settings.ts b/extension/common/settings.ts index 73f0b5d..a0969c5 100644 --- a/extension/common/settings.ts +++ b/extension/common/settings.ts @@ -5,7 +5,8 @@ import GLib from '@gi-types/glib2'; export enum PinchGestureType { NONE = 0, SHOW_DESKTOP = 1, - CLOSE_WINDOW = 2, + CLOSE_DOCUMENT = 2, + CLOSE_WINDOW = 3, } export enum ForwardBackKeyBinds { diff --git a/extension/extension.ts b/extension/extension.ts index ef386dc..eb853db 100644 --- a/extension/extension.ts +++ b/extension/extension.ts @@ -99,6 +99,15 @@ class Extension { if (showDesktopFingers.length) this._extensions.push(new ShowDesktopExtension(showDesktopFingers)); + // pinch to close document + const closeDocumentFingers = [ + this.settings.get_enum('pinch-3-finger-gesture') === PinchGestureType.CLOSE_DOCUMENT ? 3 : undefined, + this.settings.get_enum('pinch-4-finger-gesture') === PinchGestureType.CLOSE_DOCUMENT ? 4 : undefined, + ].filter((f): f is number => typeof f === 'number'); + + if (closeDocumentFingers.length) + this._extensions.push(new CloseWindowExtension(closeDocumentFingers, PinchGestureType.CLOSE_DOCUMENT)); + // pinch to close window const closeWindowFingers = [ this.settings.get_enum('pinch-3-finger-gesture') === PinchGestureType.CLOSE_WINDOW ? 3 : undefined, @@ -106,7 +115,7 @@ class Extension { ].filter((f): f is number => typeof f === 'number'); if (closeWindowFingers.length) - this._extensions.push(new CloseWindowExtension(closeWindowFingers)); + this._extensions.push(new CloseWindowExtension(closeWindowFingers, PinchGestureType.CLOSE_WINDOW)); this._extensions.forEach(extension => extension.apply?.()); } diff --git a/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml b/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml index b157310..a6b9d1e 100644 --- a/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml +++ b/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml @@ -3,7 +3,8 @@ - + + diff --git a/extension/src/pinchGestures/closeWindow.ts b/extension/src/pinchGestures/closeWindow.ts index bf29d8b..08ca5b4 100644 --- a/extension/src/pinchGestures/closeWindow.ts +++ b/extension/src/pinchGestures/closeWindow.ts @@ -6,6 +6,7 @@ import St from '@gi-types/st1'; import { global, imports } from 'gnome-shell'; +import { PinchGestureType } from '../../common/settings'; import { TouchpadPinchGesture } from '../trackers/pinchTracker'; import { VirtualKeyboard } from '../utils/keyboard'; @@ -22,6 +23,7 @@ declare type Type_TouchpadPinchGesture = typeof TouchpadPinchGesture.prototype; const ClosePreview = registerClass( class ClosePreview extends St.Widget { private _adjustment: St.Adjustment; + private _window?: Meta.Window; constructor() { super({ @@ -42,7 +44,8 @@ const ClosePreview = registerClass( } open(window: Meta.Window): void { - const windowBox = window.get_frame_rect(); + this._window = window; + const windowBox = this._window.get_frame_rect(); this.set_position(windowBox.x, windowBox.y); this.set_size(windowBox.width, windowBox.height); @@ -52,6 +55,7 @@ const ClosePreview = registerClass( finish(): void { this.visible = false; + this._window = undefined; } _valueChanged(): void { @@ -66,16 +70,27 @@ const ClosePreview = registerClass( get adjustment(): St.Adjustment { return this._adjustment; } + + get window(): Meta.Window | undefined { + return this._window; + } }, ); export class CloseWindowExtension implements ISubExtension { + private _closeType: PinchGestureType; private _keyboard: VirtualKeyboard; private _pinchTracker: Type_TouchpadPinchGesture; private _preview: typeof ClosePreview.prototype; private _uiGroupAddedActorId: number; - constructor(nfingers: number[]) { + constructor(nfingers: number[], closeType: PinchGestureType) { + if (closeType !== PinchGestureType.CLOSE_DOCUMENT && closeType !== PinchGestureType.CLOSE_WINDOW) { + throw new Error('CloseType must be CLOSE_DOCUMENT or CLOSE_WINDOW.'); + } else { + this._closeType = closeType; + } + this._keyboard = new VirtualKeyboard(); this._pinchTracker = new TouchpadPinchGesture({ @@ -123,8 +138,18 @@ export class CloseWindowExtension implements ISubExtension { } gestureEnd(_tracker: unknown, _duration: number, progress: number) { + if (progress !== CloseWindowGestureState.DEFAULT) { + switch (this._closeType) { + case PinchGestureType.CLOSE_DOCUMENT: + this._keyboard.sendKeys(Clutter.KEY_Control_L, Clutter.KEY_w); + break; + case PinchGestureType.CLOSE_WINDOW: + this._preview.window?.delete(Clutter.get_current_event_time()); + break; + default: + break; + } + } this._preview.finish(); - if (progress !== CloseWindowGestureState.DEFAULT) - this._keyboard.sendKeys(Clutter.KEY_Control_L, Clutter.KEY_w); } } \ No newline at end of file From 97481e6bebbc51c1a4a1d9da7dd6fbcc75b651c1 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Wed, 20 Apr 2022 03:53:18 +0530 Subject: [PATCH 143/155] closeWindow: Update close window gesture for main branch --- extension/common/settings.ts | 4 +- extension/extension.ts | 48 +++-- ...extensions.gestureImprovements.gschema.xml | 4 +- extension/src/pinchGestures/closeWindow.ts | 185 +++++++----------- extension/stylesheet.css | 9 +- extension/ui/gestures.ui | 2 + 6 files changed, 111 insertions(+), 141 deletions(-) diff --git a/extension/common/settings.ts b/extension/common/settings.ts index a0969c5..1585a8f 100644 --- a/extension/common/settings.ts +++ b/extension/common/settings.ts @@ -5,8 +5,8 @@ import GLib from '@gi-types/glib2'; export enum PinchGestureType { NONE = 0, SHOW_DESKTOP = 1, - CLOSE_DOCUMENT = 2, - CLOSE_WINDOW = 3, + CLOSE_WINDOW = 2, + CLOSE_DOCUMENT = 3, } export enum ForwardBackKeyBinds { diff --git a/extension/extension.ts b/extension/extension.ts index eb853db..19099b4 100644 --- a/extension/extension.ts +++ b/extension/extension.ts @@ -91,32 +91,21 @@ class Extension { this._extensions.push(new SnapWindowExtension()); // pinch to show desktop - const showDesktopFingers = [ - this.settings.get_enum('pinch-3-finger-gesture') === PinchGestureType.SHOW_DESKTOP ? 3 : undefined, - this.settings.get_enum('pinch-4-finger-gesture') === PinchGestureType.SHOW_DESKTOP ? 4 : undefined, - ].filter((f): f is number => typeof f === 'number'); - - if (showDesktopFingers.length) + const pinchToFingersMap = this._getPinchGestureTypeAndFingers(); + const showDesktopFingers = pinchToFingersMap.get(PinchGestureType.SHOW_DESKTOP); + if (showDesktopFingers?.length) this._extensions.push(new ShowDesktopExtension(showDesktopFingers)); - // pinch to close document - const closeDocumentFingers = [ - this.settings.get_enum('pinch-3-finger-gesture') === PinchGestureType.CLOSE_DOCUMENT ? 3 : undefined, - this.settings.get_enum('pinch-4-finger-gesture') === PinchGestureType.CLOSE_DOCUMENT ? 4 : undefined, - ].filter((f): f is number => typeof f === 'number'); - - if (closeDocumentFingers.length) - this._extensions.push(new CloseWindowExtension(closeDocumentFingers, PinchGestureType.CLOSE_DOCUMENT)); - // pinch to close window - const closeWindowFingers = [ - this.settings.get_enum('pinch-3-finger-gesture') === PinchGestureType.CLOSE_WINDOW ? 3 : undefined, - this.settings.get_enum('pinch-4-finger-gesture') === PinchGestureType.CLOSE_WINDOW ? 4 : undefined, - ].filter((f): f is number => typeof f === 'number'); - - if (closeWindowFingers.length) + const closeWindowFingers = pinchToFingersMap.get(PinchGestureType.CLOSE_WINDOW); + if (closeWindowFingers?.length) this._extensions.push(new CloseWindowExtension(closeWindowFingers, PinchGestureType.CLOSE_WINDOW)); + // pinch to close document + const closeDocumentFingers = pinchToFingersMap.get(PinchGestureType.CLOSE_DOCUMENT); + if (closeDocumentFingers?.length) + this._extensions.push(new CloseWindowExtension(closeDocumentFingers, PinchGestureType.CLOSE_DOCUMENT)); + this._extensions.forEach(extension => extension.apply?.()); } @@ -140,6 +129,23 @@ class Extension { AltTabConstants.DELAY_DURATION = this.settings.get_int('alttab-delay'); } } + + private _getPinchGestureTypeAndFingers(): Map { + if (!this.settings) return new Map(); + + const pinch3FingerGesture = this.settings.get_enum('pinch-3-finger-gesture'); + const pinch4FingerGesture = this.settings.get_enum('pinch-4-finger-gesture'); + + const gestureToFingersMap = new Map(); + if (pinch3FingerGesture === pinch4FingerGesture) + gestureToFingersMap.set(pinch3FingerGesture, [3, 4]); + else { + gestureToFingersMap.set(pinch3FingerGesture, [3]); + gestureToFingersMap.set(pinch4FingerGesture, [4]); + } + + return gestureToFingersMap; + } } export function init(): IExtension { diff --git a/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml b/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml index a6b9d1e..8b35f55 100644 --- a/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml +++ b/extension/schemas/org.gnome.shell.extensions.gestureImprovements.gschema.xml @@ -3,8 +3,8 @@ - - + + diff --git a/extension/src/pinchGestures/closeWindow.ts b/extension/src/pinchGestures/closeWindow.ts index 08ca5b4..57dabe3 100644 --- a/extension/src/pinchGestures/closeWindow.ts +++ b/extension/src/pinchGestures/closeWindow.ts @@ -1,5 +1,4 @@ import Clutter from '@gi-types/clutter8'; -import { registerClass } from '@gi-types/gobject2'; import Meta from '@gi-types/meta8'; import Shell from '@gi-types/shell0'; import St from '@gi-types/st1'; @@ -8,148 +7,112 @@ import { global, imports } from 'gnome-shell'; import { PinchGestureType } from '../../common/settings'; import { TouchpadPinchGesture } from '../trackers/pinchTracker'; -import { VirtualKeyboard } from '../utils/keyboard'; +import { easeActor } from '../utils/environment'; +import { getVirtualKeyboard, IVirtualKeyboard } from '../utils/keyboard'; const Main = imports.ui.main; +const Util = imports.misc.util; + +const START_OPACITY = 0; enum CloseWindowGestureState { PINCH_IN = -1, DEFAULT = 0, - PINCH_OUT = 1 } declare type Type_TouchpadPinchGesture = typeof TouchpadPinchGesture.prototype; -const ClosePreview = registerClass( - class ClosePreview extends St.Widget { - private _adjustment: St.Adjustment; - private _window?: Meta.Window; - - constructor() { - super({ - reactive: false, - style_class: 'close-window-preview', - visible: false, - }); - this.connect('destroy', this._onDestroy.bind(this)); - - this._adjustment = new St.Adjustment({ - actor: this, - value: 0, - lower: 0, - upper: 1, - }); - - this._adjustment.connect('notify::value', this._valueChanged.bind(this)); - } - - open(window: Meta.Window): void { - this._window = window; - const windowBox = this._window.get_frame_rect(); - this.set_position(windowBox.x, windowBox.y); - this.set_size(windowBox.width, windowBox.height); - - this.visible = true; - this._adjustment.value = 0; - } - - finish(): void { - this.visible = false; - this._window = undefined; - } - - _valueChanged(): void { - const progress = this._adjustment.value; - this.opacity = progress * 255; - } - - _onDestroy(): void { - this._adjustment.run_dispose(); - } - - get adjustment(): St.Adjustment { - return this._adjustment; - } - - get window(): Meta.Window | undefined { - return this._window; - } - }, -); - export class CloseWindowExtension implements ISubExtension { - private _closeType: PinchGestureType; - private _keyboard: VirtualKeyboard; + private _closeType: PinchGestureType.CLOSE_DOCUMENT | PinchGestureType.CLOSE_WINDOW; + private _keyboard: IVirtualKeyboard; private _pinchTracker: Type_TouchpadPinchGesture; - private _preview: typeof ClosePreview.prototype; - private _uiGroupAddedActorId: number; - - constructor(nfingers: number[], closeType: PinchGestureType) { - if (closeType !== PinchGestureType.CLOSE_DOCUMENT && closeType !== PinchGestureType.CLOSE_WINDOW) { - throw new Error('CloseType must be CLOSE_DOCUMENT or CLOSE_WINDOW.'); - } else { - this._closeType = closeType; - } - - this._keyboard = new VirtualKeyboard(); + private _preview: St.Widget; + private _focusWindow?: Meta.Window | null; + + constructor(nfingers: number[], closeType: PinchGestureType.CLOSE_DOCUMENT | PinchGestureType.CLOSE_WINDOW) { + this._closeType = closeType; + this._keyboard = getVirtualKeyboard(); + + this._preview = new St.Widget({ + reactive: false, + style_class: 'gie-close-window-preview', + visible: false, + opacity: START_OPACITY, + }); + this._preview.set_pivot_point(0.5, 0.5); + Main.layoutManager.uiGroup.add_child(this._preview); this._pinchTracker = new TouchpadPinchGesture({ nfingers: nfingers, allowedModes: Shell.ActionMode.NORMAL, + pinchSpeed: 0.25, }); - - this._preview = new ClosePreview(); - Main.layoutManager.uiGroup.add_child(this._preview); - this._uiGroupAddedActorId = Main.layoutManager.uiGroup.connect('actor-added', () => { - Main.layoutManager.uiGroup.set_child_above_sibling(this._preview, null); - }); - Main.layoutManager.uiGroup.set_child_above_sibling(this._preview, null); - } - - apply(): void { this._pinchTracker.connect('begin', this.gestureBegin.bind(this)); this._pinchTracker.connect('update', this.gestureUpdate.bind(this)); this._pinchTracker.connect('end', this.gestureEnd.bind(this)); } destroy(): void { - this._pinchTracker?.destroy(); - - if (this._uiGroupAddedActorId) { - Main.layoutManager.uiGroup.disconnect(this._uiGroupAddedActorId); - this._uiGroupAddedActorId = 0; - } - Main.layoutManager.uiGroup.remove_child(this._preview); + this._pinchTracker.destroy(); this._preview.destroy(); - - this._pinchTracker?.destroy(); } gestureBegin(tracker: Type_TouchpadPinchGesture) { - const window = global.display.get_focus_window() as Meta.Window | null; - if (window) { - tracker.confirmPinch(0, [CloseWindowGestureState.PINCH_IN, CloseWindowGestureState.DEFAULT, CloseWindowGestureState.PINCH_OUT], CloseWindowGestureState.DEFAULT); - this._preview.open(window); - } + this._focusWindow = global.display.get_focus_window() as Meta.Window | null; + if (!this._focusWindow) return; + + tracker.confirmPinch(0, [CloseWindowGestureState.PINCH_IN, CloseWindowGestureState.DEFAULT], CloseWindowGestureState.DEFAULT); + + const frame = this._focusWindow.get_frame_rect(); + this._preview.set_position(frame.x, frame.y); + this._preview.set_size(frame.width, frame.height); + this._preview.show(); } gestureUpdate(_tracker: unknown, progress: number): void { - this._preview.adjustment.value = Math.abs(progress); + progress = progress - CloseWindowGestureState.PINCH_IN; + this._preview.set_scale(progress, progress); + this._preview.opacity = Util.lerp(START_OPACITY, 255, progress); } - gestureEnd(_tracker: unknown, _duration: number, progress: number) { - if (progress !== CloseWindowGestureState.DEFAULT) { - switch (this._closeType) { - case PinchGestureType.CLOSE_DOCUMENT: - this._keyboard.sendKeys(Clutter.KEY_Control_L, Clutter.KEY_w); - break; - case PinchGestureType.CLOSE_WINDOW: - this._preview.window?.delete(Clutter.get_current_event_time()); - break; - default: - break; - } + gestureEnd(_tracker: unknown, duration: number, progress: CloseWindowGestureState) { + switch (progress) { + case CloseWindowGestureState.DEFAULT: + this._animatePreview(false, duration); + break; + case CloseWindowGestureState.PINCH_IN: + this._animatePreview(true, duration, this._invokeGestureCompleteAction.bind(this)); } - this._preview.finish(); + } + + private _invokeGestureCompleteAction() { + switch (this._closeType) { + case PinchGestureType.CLOSE_WINDOW: + this._focusWindow?.delete(Clutter.get_current_event_time()); + break; + case PinchGestureType.CLOSE_DOCUMENT: + this._keyboard.sendKeys([Clutter.KEY_Control_L, Clutter.KEY_w]); + } + } + + private _animatePreview(gestureCompleted: boolean, duration: number, callback?: () => void) { + easeActor(this._preview, { + opacity: gestureCompleted ? 255 : 0, + scaleX: gestureCompleted ? 0 : 1, + scaleY: gestureCompleted ? 0 : 1, + duration, + mode: Clutter.AnimationMode.EASE_OUT_QUAD, + onStopped: () => { + if (callback) + callback(); + this._gestureAnimationDone(); + }, + }); + } + + private _gestureAnimationDone() { + this._preview.hide(); + this._preview.opacity = START_OPACITY; + this._preview.set_scale(1, 1); } } \ No newline at end of file diff --git a/extension/stylesheet.css b/extension/stylesheet.css index 124c8cf..22d1e71 100644 --- a/extension/stylesheet.css +++ b/extension/stylesheet.css @@ -27,9 +27,8 @@ border: solid 2px; } -.close-window-preview { - background-color: rgba(255, 0, 0, 0.75); - border-color: red; - border-top-left-radius: 8px; - border-top-right-radius: 8px; +.gie-close-window-preview { + background-color: rgba(255, 128, 128, 0.5); + border: 1px solid rgba(255, 128, 128); + border-radius: 16px; } \ No newline at end of file diff --git a/extension/ui/gestures.ui b/extension/ui/gestures.ui index 6503fac..b2d722f 100644 --- a/extension/ui/gestures.ui +++ b/extension/ui/gestures.ui @@ -7,6 +7,8 @@ None Show Desktop + Close Window + Invoke Ctrl+W shortcut From 9efd901272da0bb7fe45959bda97b2b54d4f5767 Mon Sep 17 00:00:00 2001 From: Harshad Gavali Date: Thu, 28 Apr 2022 10:08:59 +0530 Subject: [PATCH 144/155] dependencies: Generate typescript bindings for shell components locally This is to avoid waiting for bindings to be available on npmjs --- @types/clutter10/doc.json | 16 + @types/clutter10/index.d.ts | 8470 ++++++++++++++++++++ @types/meta10/doc.json | 21 + @types/meta10/index.d.ts | 2850 +++++++ @types/shell0/doc.json | 22 + @types/shell0/index.d.ts | 1330 +++ @types/st1/doc.json | 17 + @types/st1/index.d.ts | 2038 +++++ extension/src/altTab.ts | 6 +- extension/src/animations/arrow.ts | 4 +- extension/src/forwardBack.ts | 6 +- extension/src/gestures.ts | 4 +- extension/src/overviewRoundTrip.ts | 4 +- extension/src/pinchGestures/closeWindow.ts | 8 +- extension/src/pinchGestures/showDesktop.ts | 6 +- extension/src/snapWindow.ts | 8 +- extension/src/swipeTracker.ts | 6 +- extension/src/trackers/pinchTracker.ts | 6 +- extension/src/utils/dbus.ts | 2 +- extension/src/utils/environment.ts | 4 +- extension/src/utils/keyboard.ts | 2 +- gnome-shell/global.d.ts | 18 + gnome-shell/index.d.ts | 12 +- metadata.json | 2 +- package-lock.json | 306 - package.json | 6 +- scripts/generate-gi-bindings.sh | 33 +- scripts/transpile.ts | 4 +- tests/testing.ts | 2 +- 29 files changed, 14851 insertions(+), 362 deletions(-) create mode 100644 @types/clutter10/doc.json create mode 100644 @types/clutter10/index.d.ts create mode 100644 @types/meta10/doc.json create mode 100644 @types/meta10/index.d.ts create mode 100644 @types/shell0/doc.json create mode 100644 @types/shell0/index.d.ts create mode 100644 @types/st1/doc.json create mode 100644 @types/st1/index.d.ts diff --git a/@types/clutter10/doc.json b/@types/clutter10/doc.json new file mode 100644 index 0000000..bb408e0 --- /dev/null +++ b/@types/clutter10/doc.json @@ -0,0 +1,16 @@ +{ + "name": "Clutter", + "api_version": "10", + "package_version": "10.0", + "imports": { + "GObject": "2.0", + "cairo": "1.0", + "Atk": "1.0", + "Pango": "1.0", + "GLib": "2.0", + "Graphene": "1.0", + "Gio": "2.0", + "Json": "1.0", + "Cogl": "10" + } +} \ No newline at end of file diff --git a/@types/clutter10/index.d.ts b/@types/clutter10/index.d.ts new file mode 100644 index 0000000..de31645 --- /dev/null +++ b/@types/clutter10/index.d.ts @@ -0,0 +1,8470 @@ +/** + * Clutter 10 + * + * Generated from 10.0 + */ + +import * as GObject from "@gi-types/gobject2"; +import * as cairo from "@gi-types/cairo1"; +import * as Atk from "@gi-types/atk1"; +import * as Pango from "@gi-types/pango1"; +import * as GLib from "@gi-types/glib2"; +import * as Graphene from "@gi-types/graphene1"; +import * as Gio from "@gi-types/gio2"; +import * as Json from "@gi-types/json1"; +import * as Cogl from "@gi-types/cogl10"; + +export const BUTTON_MIDDLE: number; +export const BUTTON_PRIMARY: number; +export const BUTTON_SECONDARY: number; +export const COGL: string; +export const CURRENT_TIME: number; +export const EVENT_PROPAGATE: boolean; +export const EVENT_STOP: boolean; +export const FLAVOUR: string; +export const KEY_0: number; +export const KEY_1: number; +export const KEY_2: number; +export const KEY_3: number; +export const KEY_3270_AltCursor: number; +export const KEY_3270_Attn: number; +export const KEY_3270_BackTab: number; +export const KEY_3270_ChangeScreen: number; +export const KEY_3270_Copy: number; +export const KEY_3270_CursorBlink: number; +export const KEY_3270_CursorSelect: number; +export const KEY_3270_DeleteWord: number; +export const KEY_3270_Duplicate: number; +export const KEY_3270_Enter: number; +export const KEY_3270_EraseEOF: number; +export const KEY_3270_EraseInput: number; +export const KEY_3270_ExSelect: number; +export const KEY_3270_FieldMark: number; +export const KEY_3270_Ident: number; +export const KEY_3270_Jump: number; +export const KEY_3270_KeyClick: number; +export const KEY_3270_Left2: number; +export const KEY_3270_PA1: number; +export const KEY_3270_PA2: number; +export const KEY_3270_PA3: number; +export const KEY_3270_Play: number; +export const KEY_3270_PrintScreen: number; +export const KEY_3270_Quit: number; +export const KEY_3270_Record: number; +export const KEY_3270_Reset: number; +export const KEY_3270_Right2: number; +export const KEY_3270_Rule: number; +export const KEY_3270_Setup: number; +export const KEY_3270_Test: number; +export const KEY_4: number; +export const KEY_5: number; +export const KEY_6: number; +export const KEY_7: number; +export const KEY_8: number; +export const KEY_9: number; +export const KEY_A: number; +export const KEY_AE: number; +export const KEY_Aacute: number; +export const KEY_Abelowdot: number; +export const KEY_Abreve: number; +export const KEY_Abreveacute: number; +export const KEY_Abrevebelowdot: number; +export const KEY_Abrevegrave: number; +export const KEY_Abrevehook: number; +export const KEY_Abrevetilde: number; +export const KEY_AccessX_Enable: number; +export const KEY_AccessX_Feedback_Enable: number; +export const KEY_Acircumflex: number; +export const KEY_Acircumflexacute: number; +export const KEY_Acircumflexbelowdot: number; +export const KEY_Acircumflexgrave: number; +export const KEY_Acircumflexhook: number; +export const KEY_Acircumflextilde: number; +export const KEY_AddFavorite: number; +export const KEY_Adiaeresis: number; +export const KEY_Agrave: number; +export const KEY_Ahook: number; +export const KEY_Alt_L: number; +export const KEY_Alt_R: number; +export const KEY_Amacron: number; +export const KEY_Aogonek: number; +export const KEY_ApplicationLeft: number; +export const KEY_ApplicationRight: number; +export const KEY_Arabic_0: number; +export const KEY_Arabic_1: number; +export const KEY_Arabic_2: number; +export const KEY_Arabic_3: number; +export const KEY_Arabic_4: number; +export const KEY_Arabic_5: number; +export const KEY_Arabic_6: number; +export const KEY_Arabic_7: number; +export const KEY_Arabic_8: number; +export const KEY_Arabic_9: number; +export const KEY_Arabic_ain: number; +export const KEY_Arabic_alef: number; +export const KEY_Arabic_alefmaksura: number; +export const KEY_Arabic_beh: number; +export const KEY_Arabic_comma: number; +export const KEY_Arabic_dad: number; +export const KEY_Arabic_dal: number; +export const KEY_Arabic_damma: number; +export const KEY_Arabic_dammatan: number; +export const KEY_Arabic_ddal: number; +export const KEY_Arabic_farsi_yeh: number; +export const KEY_Arabic_fatha: number; +export const KEY_Arabic_fathatan: number; +export const KEY_Arabic_feh: number; +export const KEY_Arabic_fullstop: number; +export const KEY_Arabic_gaf: number; +export const KEY_Arabic_ghain: number; +export const KEY_Arabic_ha: number; +export const KEY_Arabic_hah: number; +export const KEY_Arabic_hamza: number; +export const KEY_Arabic_hamza_above: number; +export const KEY_Arabic_hamza_below: number; +export const KEY_Arabic_hamzaonalef: number; +export const KEY_Arabic_hamzaonwaw: number; +export const KEY_Arabic_hamzaonyeh: number; +export const KEY_Arabic_hamzaunderalef: number; +export const KEY_Arabic_heh: number; +export const KEY_Arabic_heh_doachashmee: number; +export const KEY_Arabic_heh_goal: number; +export const KEY_Arabic_jeem: number; +export const KEY_Arabic_jeh: number; +export const KEY_Arabic_kaf: number; +export const KEY_Arabic_kasra: number; +export const KEY_Arabic_kasratan: number; +export const KEY_Arabic_keheh: number; +export const KEY_Arabic_khah: number; +export const KEY_Arabic_lam: number; +export const KEY_Arabic_madda_above: number; +export const KEY_Arabic_maddaonalef: number; +export const KEY_Arabic_meem: number; +export const KEY_Arabic_noon: number; +export const KEY_Arabic_noon_ghunna: number; +export const KEY_Arabic_peh: number; +export const KEY_Arabic_percent: number; +export const KEY_Arabic_qaf: number; +export const KEY_Arabic_question_mark: number; +export const KEY_Arabic_ra: number; +export const KEY_Arabic_rreh: number; +export const KEY_Arabic_sad: number; +export const KEY_Arabic_seen: number; +export const KEY_Arabic_semicolon: number; +export const KEY_Arabic_shadda: number; +export const KEY_Arabic_sheen: number; +export const KEY_Arabic_sukun: number; +export const KEY_Arabic_superscript_alef: number; +export const KEY_Arabic_switch: number; +export const KEY_Arabic_tah: number; +export const KEY_Arabic_tatweel: number; +export const KEY_Arabic_tcheh: number; +export const KEY_Arabic_teh: number; +export const KEY_Arabic_tehmarbuta: number; +export const KEY_Arabic_thal: number; +export const KEY_Arabic_theh: number; +export const KEY_Arabic_tteh: number; +export const KEY_Arabic_veh: number; +export const KEY_Arabic_waw: number; +export const KEY_Arabic_yeh: number; +export const KEY_Arabic_yeh_baree: number; +export const KEY_Arabic_zah: number; +export const KEY_Arabic_zain: number; +export const KEY_Aring: number; +export const KEY_Armenian_AT: number; +export const KEY_Armenian_AYB: number; +export const KEY_Armenian_BEN: number; +export const KEY_Armenian_CHA: number; +export const KEY_Armenian_DA: number; +export const KEY_Armenian_DZA: number; +export const KEY_Armenian_E: number; +export const KEY_Armenian_FE: number; +export const KEY_Armenian_GHAT: number; +export const KEY_Armenian_GIM: number; +export const KEY_Armenian_HI: number; +export const KEY_Armenian_HO: number; +export const KEY_Armenian_INI: number; +export const KEY_Armenian_JE: number; +export const KEY_Armenian_KE: number; +export const KEY_Armenian_KEN: number; +export const KEY_Armenian_KHE: number; +export const KEY_Armenian_LYUN: number; +export const KEY_Armenian_MEN: number; +export const KEY_Armenian_NU: number; +export const KEY_Armenian_O: number; +export const KEY_Armenian_PE: number; +export const KEY_Armenian_PYUR: number; +export const KEY_Armenian_RA: number; +export const KEY_Armenian_RE: number; +export const KEY_Armenian_SE: number; +export const KEY_Armenian_SHA: number; +export const KEY_Armenian_TCHE: number; +export const KEY_Armenian_TO: number; +export const KEY_Armenian_TSA: number; +export const KEY_Armenian_TSO: number; +export const KEY_Armenian_TYUN: number; +export const KEY_Armenian_VEV: number; +export const KEY_Armenian_VO: number; +export const KEY_Armenian_VYUN: number; +export const KEY_Armenian_YECH: number; +export const KEY_Armenian_ZA: number; +export const KEY_Armenian_ZHE: number; +export const KEY_Armenian_accent: number; +export const KEY_Armenian_amanak: number; +export const KEY_Armenian_apostrophe: number; +export const KEY_Armenian_at: number; +export const KEY_Armenian_ayb: number; +export const KEY_Armenian_ben: number; +export const KEY_Armenian_but: number; +export const KEY_Armenian_cha: number; +export const KEY_Armenian_da: number; +export const KEY_Armenian_dza: number; +export const KEY_Armenian_e: number; +export const KEY_Armenian_exclam: number; +export const KEY_Armenian_fe: number; +export const KEY_Armenian_full_stop: number; +export const KEY_Armenian_ghat: number; +export const KEY_Armenian_gim: number; +export const KEY_Armenian_hi: number; +export const KEY_Armenian_ho: number; +export const KEY_Armenian_hyphen: number; +export const KEY_Armenian_ini: number; +export const KEY_Armenian_je: number; +export const KEY_Armenian_ke: number; +export const KEY_Armenian_ken: number; +export const KEY_Armenian_khe: number; +export const KEY_Armenian_ligature_ew: number; +export const KEY_Armenian_lyun: number; +export const KEY_Armenian_men: number; +export const KEY_Armenian_nu: number; +export const KEY_Armenian_o: number; +export const KEY_Armenian_paruyk: number; +export const KEY_Armenian_pe: number; +export const KEY_Armenian_pyur: number; +export const KEY_Armenian_question: number; +export const KEY_Armenian_ra: number; +export const KEY_Armenian_re: number; +export const KEY_Armenian_se: number; +export const KEY_Armenian_separation_mark: number; +export const KEY_Armenian_sha: number; +export const KEY_Armenian_shesht: number; +export const KEY_Armenian_tche: number; +export const KEY_Armenian_to: number; +export const KEY_Armenian_tsa: number; +export const KEY_Armenian_tso: number; +export const KEY_Armenian_tyun: number; +export const KEY_Armenian_verjaket: number; +export const KEY_Armenian_vev: number; +export const KEY_Armenian_vo: number; +export const KEY_Armenian_vyun: number; +export const KEY_Armenian_yech: number; +export const KEY_Armenian_yentamna: number; +export const KEY_Armenian_za: number; +export const KEY_Armenian_zhe: number; +export const KEY_Atilde: number; +export const KEY_AudibleBell_Enable: number; +export const KEY_AudioCycleTrack: number; +export const KEY_AudioForward: number; +export const KEY_AudioLowerVolume: number; +export const KEY_AudioMedia: number; +export const KEY_AudioMicMute: number; +export const KEY_AudioMute: number; +export const KEY_AudioNext: number; +export const KEY_AudioPause: number; +export const KEY_AudioPlay: number; +export const KEY_AudioPrev: number; +export const KEY_AudioRaiseVolume: number; +export const KEY_AudioRandomPlay: number; +export const KEY_AudioRecord: number; +export const KEY_AudioRepeat: number; +export const KEY_AudioRewind: number; +export const KEY_AudioStop: number; +export const KEY_Away: number; +export const KEY_B: number; +export const KEY_Babovedot: number; +export const KEY_Back: number; +export const KEY_BackForward: number; +export const KEY_BackSpace: number; +export const KEY_Battery: number; +export const KEY_Begin: number; +export const KEY_Blue: number; +export const KEY_Bluetooth: number; +export const KEY_Book: number; +export const KEY_BounceKeys_Enable: number; +export const KEY_Break: number; +export const KEY_BrightnessAdjust: number; +export const KEY_Byelorussian_SHORTU: number; +export const KEY_Byelorussian_shortu: number; +export const KEY_C: number; +export const KEY_CD: number; +export const KEY_CH: number; +export const KEY_C_H: number; +export const KEY_C_h: number; +export const KEY_Cabovedot: number; +export const KEY_Cacute: number; +export const KEY_Calculator: number; +export const KEY_Calendar: number; +export const KEY_Cancel: number; +export const KEY_Caps_Lock: number; +export const KEY_Ccaron: number; +export const KEY_Ccedilla: number; +export const KEY_Ccircumflex: number; +export const KEY_Ch: number; +export const KEY_Clear: number; +export const KEY_ClearGrab: number; +export const KEY_Close: number; +export const KEY_Codeinput: number; +export const KEY_ColonSign: number; +export const KEY_Community: number; +export const KEY_ContrastAdjust: number; +export const KEY_Control_L: number; +export const KEY_Control_R: number; +export const KEY_Copy: number; +export const KEY_CruzeiroSign: number; +export const KEY_Cut: number; +export const KEY_CycleAngle: number; +export const KEY_Cyrillic_A: number; +export const KEY_Cyrillic_BE: number; +export const KEY_Cyrillic_CHE: number; +export const KEY_Cyrillic_CHE_descender: number; +export const KEY_Cyrillic_CHE_vertstroke: number; +export const KEY_Cyrillic_DE: number; +export const KEY_Cyrillic_DZHE: number; +export const KEY_Cyrillic_E: number; +export const KEY_Cyrillic_EF: number; +export const KEY_Cyrillic_EL: number; +export const KEY_Cyrillic_EM: number; +export const KEY_Cyrillic_EN: number; +export const KEY_Cyrillic_EN_descender: number; +export const KEY_Cyrillic_ER: number; +export const KEY_Cyrillic_ES: number; +export const KEY_Cyrillic_GHE: number; +export const KEY_Cyrillic_GHE_bar: number; +export const KEY_Cyrillic_HA: number; +export const KEY_Cyrillic_HARDSIGN: number; +export const KEY_Cyrillic_HA_descender: number; +export const KEY_Cyrillic_I: number; +export const KEY_Cyrillic_IE: number; +export const KEY_Cyrillic_IO: number; +export const KEY_Cyrillic_I_macron: number; +export const KEY_Cyrillic_JE: number; +export const KEY_Cyrillic_KA: number; +export const KEY_Cyrillic_KA_descender: number; +export const KEY_Cyrillic_KA_vertstroke: number; +export const KEY_Cyrillic_LJE: number; +export const KEY_Cyrillic_NJE: number; +export const KEY_Cyrillic_O: number; +export const KEY_Cyrillic_O_bar: number; +export const KEY_Cyrillic_PE: number; +export const KEY_Cyrillic_SCHWA: number; +export const KEY_Cyrillic_SHA: number; +export const KEY_Cyrillic_SHCHA: number; +export const KEY_Cyrillic_SHHA: number; +export const KEY_Cyrillic_SHORTI: number; +export const KEY_Cyrillic_SOFTSIGN: number; +export const KEY_Cyrillic_TE: number; +export const KEY_Cyrillic_TSE: number; +export const KEY_Cyrillic_U: number; +export const KEY_Cyrillic_U_macron: number; +export const KEY_Cyrillic_U_straight: number; +export const KEY_Cyrillic_U_straight_bar: number; +export const KEY_Cyrillic_VE: number; +export const KEY_Cyrillic_YA: number; +export const KEY_Cyrillic_YERU: number; +export const KEY_Cyrillic_YU: number; +export const KEY_Cyrillic_ZE: number; +export const KEY_Cyrillic_ZHE: number; +export const KEY_Cyrillic_ZHE_descender: number; +export const KEY_Cyrillic_a: number; +export const KEY_Cyrillic_be: number; +export const KEY_Cyrillic_che: number; +export const KEY_Cyrillic_che_descender: number; +export const KEY_Cyrillic_che_vertstroke: number; +export const KEY_Cyrillic_de: number; +export const KEY_Cyrillic_dzhe: number; +export const KEY_Cyrillic_e: number; +export const KEY_Cyrillic_ef: number; +export const KEY_Cyrillic_el: number; +export const KEY_Cyrillic_em: number; +export const KEY_Cyrillic_en: number; +export const KEY_Cyrillic_en_descender: number; +export const KEY_Cyrillic_er: number; +export const KEY_Cyrillic_es: number; +export const KEY_Cyrillic_ghe: number; +export const KEY_Cyrillic_ghe_bar: number; +export const KEY_Cyrillic_ha: number; +export const KEY_Cyrillic_ha_descender: number; +export const KEY_Cyrillic_hardsign: number; +export const KEY_Cyrillic_i: number; +export const KEY_Cyrillic_i_macron: number; +export const KEY_Cyrillic_ie: number; +export const KEY_Cyrillic_io: number; +export const KEY_Cyrillic_je: number; +export const KEY_Cyrillic_ka: number; +export const KEY_Cyrillic_ka_descender: number; +export const KEY_Cyrillic_ka_vertstroke: number; +export const KEY_Cyrillic_lje: number; +export const KEY_Cyrillic_nje: number; +export const KEY_Cyrillic_o: number; +export const KEY_Cyrillic_o_bar: number; +export const KEY_Cyrillic_pe: number; +export const KEY_Cyrillic_schwa: number; +export const KEY_Cyrillic_sha: number; +export const KEY_Cyrillic_shcha: number; +export const KEY_Cyrillic_shha: number; +export const KEY_Cyrillic_shorti: number; +export const KEY_Cyrillic_softsign: number; +export const KEY_Cyrillic_te: number; +export const KEY_Cyrillic_tse: number; +export const KEY_Cyrillic_u: number; +export const KEY_Cyrillic_u_macron: number; +export const KEY_Cyrillic_u_straight: number; +export const KEY_Cyrillic_u_straight_bar: number; +export const KEY_Cyrillic_ve: number; +export const KEY_Cyrillic_ya: number; +export const KEY_Cyrillic_yeru: number; +export const KEY_Cyrillic_yu: number; +export const KEY_Cyrillic_ze: number; +export const KEY_Cyrillic_zhe: number; +export const KEY_Cyrillic_zhe_descender: number; +export const KEY_D: number; +export const KEY_DOS: number; +export const KEY_Dabovedot: number; +export const KEY_Dcaron: number; +export const KEY_Delete: number; +export const KEY_Display: number; +export const KEY_Documents: number; +export const KEY_DongSign: number; +export const KEY_Down: number; +export const KEY_Dstroke: number; +export const KEY_E: number; +export const KEY_ENG: number; +export const KEY_ETH: number; +export const KEY_EZH: number; +export const KEY_Eabovedot: number; +export const KEY_Eacute: number; +export const KEY_Ebelowdot: number; +export const KEY_Ecaron: number; +export const KEY_Ecircumflex: number; +export const KEY_Ecircumflexacute: number; +export const KEY_Ecircumflexbelowdot: number; +export const KEY_Ecircumflexgrave: number; +export const KEY_Ecircumflexhook: number; +export const KEY_Ecircumflextilde: number; +export const KEY_EcuSign: number; +export const KEY_Ediaeresis: number; +export const KEY_Egrave: number; +export const KEY_Ehook: number; +export const KEY_Eisu_Shift: number; +export const KEY_Eisu_toggle: number; +export const KEY_Eject: number; +export const KEY_Emacron: number; +export const KEY_End: number; +export const KEY_Eogonek: number; +export const KEY_Escape: number; +export const KEY_Eth: number; +export const KEY_Etilde: number; +export const KEY_EuroSign: number; +export const KEY_Excel: number; +export const KEY_Execute: number; +export const KEY_Explorer: number; +export const KEY_F: number; +export const KEY_F1: number; +export const KEY_F10: number; +export const KEY_F11: number; +export const KEY_F12: number; +export const KEY_F13: number; +export const KEY_F14: number; +export const KEY_F15: number; +export const KEY_F16: number; +export const KEY_F17: number; +export const KEY_F18: number; +export const KEY_F19: number; +export const KEY_F2: number; +export const KEY_F20: number; +export const KEY_F21: number; +export const KEY_F22: number; +export const KEY_F23: number; +export const KEY_F24: number; +export const KEY_F25: number; +export const KEY_F26: number; +export const KEY_F27: number; +export const KEY_F28: number; +export const KEY_F29: number; +export const KEY_F3: number; +export const KEY_F30: number; +export const KEY_F31: number; +export const KEY_F32: number; +export const KEY_F33: number; +export const KEY_F34: number; +export const KEY_F35: number; +export const KEY_F4: number; +export const KEY_F5: number; +export const KEY_F6: number; +export const KEY_F7: number; +export const KEY_F8: number; +export const KEY_F9: number; +export const KEY_FFrancSign: number; +export const KEY_Fabovedot: number; +export const KEY_Farsi_0: number; +export const KEY_Farsi_1: number; +export const KEY_Farsi_2: number; +export const KEY_Farsi_3: number; +export const KEY_Farsi_4: number; +export const KEY_Farsi_5: number; +export const KEY_Farsi_6: number; +export const KEY_Farsi_7: number; +export const KEY_Farsi_8: number; +export const KEY_Farsi_9: number; +export const KEY_Farsi_yeh: number; +export const KEY_Favorites: number; +export const KEY_Finance: number; +export const KEY_Find: number; +export const KEY_First_Virtual_Screen: number; +export const KEY_Forward: number; +export const KEY_FrameBack: number; +export const KEY_FrameForward: number; +export const KEY_G: number; +export const KEY_Gabovedot: number; +export const KEY_Game: number; +export const KEY_Gbreve: number; +export const KEY_Gcaron: number; +export const KEY_Gcedilla: number; +export const KEY_Gcircumflex: number; +export const KEY_Georgian_an: number; +export const KEY_Georgian_ban: number; +export const KEY_Georgian_can: number; +export const KEY_Georgian_char: number; +export const KEY_Georgian_chin: number; +export const KEY_Georgian_cil: number; +export const KEY_Georgian_don: number; +export const KEY_Georgian_en: number; +export const KEY_Georgian_fi: number; +export const KEY_Georgian_gan: number; +export const KEY_Georgian_ghan: number; +export const KEY_Georgian_hae: number; +export const KEY_Georgian_har: number; +export const KEY_Georgian_he: number; +export const KEY_Georgian_hie: number; +export const KEY_Georgian_hoe: number; +export const KEY_Georgian_in: number; +export const KEY_Georgian_jhan: number; +export const KEY_Georgian_jil: number; +export const KEY_Georgian_kan: number; +export const KEY_Georgian_khar: number; +export const KEY_Georgian_las: number; +export const KEY_Georgian_man: number; +export const KEY_Georgian_nar: number; +export const KEY_Georgian_on: number; +export const KEY_Georgian_par: number; +export const KEY_Georgian_phar: number; +export const KEY_Georgian_qar: number; +export const KEY_Georgian_rae: number; +export const KEY_Georgian_san: number; +export const KEY_Georgian_shin: number; +export const KEY_Georgian_tan: number; +export const KEY_Georgian_tar: number; +export const KEY_Georgian_un: number; +export const KEY_Georgian_vin: number; +export const KEY_Georgian_we: number; +export const KEY_Georgian_xan: number; +export const KEY_Georgian_zen: number; +export const KEY_Georgian_zhar: number; +export const KEY_Go: number; +export const KEY_Greek_ALPHA: number; +export const KEY_Greek_ALPHAaccent: number; +export const KEY_Greek_BETA: number; +export const KEY_Greek_CHI: number; +export const KEY_Greek_DELTA: number; +export const KEY_Greek_EPSILON: number; +export const KEY_Greek_EPSILONaccent: number; +export const KEY_Greek_ETA: number; +export const KEY_Greek_ETAaccent: number; +export const KEY_Greek_GAMMA: number; +export const KEY_Greek_IOTA: number; +export const KEY_Greek_IOTAaccent: number; +export const KEY_Greek_IOTAdiaeresis: number; +export const KEY_Greek_IOTAdieresis: number; +export const KEY_Greek_KAPPA: number; +export const KEY_Greek_LAMBDA: number; +export const KEY_Greek_LAMDA: number; +export const KEY_Greek_MU: number; +export const KEY_Greek_NU: number; +export const KEY_Greek_OMEGA: number; +export const KEY_Greek_OMEGAaccent: number; +export const KEY_Greek_OMICRON: number; +export const KEY_Greek_OMICRONaccent: number; +export const KEY_Greek_PHI: number; +export const KEY_Greek_PI: number; +export const KEY_Greek_PSI: number; +export const KEY_Greek_RHO: number; +export const KEY_Greek_SIGMA: number; +export const KEY_Greek_TAU: number; +export const KEY_Greek_THETA: number; +export const KEY_Greek_UPSILON: number; +export const KEY_Greek_UPSILONaccent: number; +export const KEY_Greek_UPSILONdieresis: number; +export const KEY_Greek_XI: number; +export const KEY_Greek_ZETA: number; +export const KEY_Greek_accentdieresis: number; +export const KEY_Greek_alpha: number; +export const KEY_Greek_alphaaccent: number; +export const KEY_Greek_beta: number; +export const KEY_Greek_chi: number; +export const KEY_Greek_delta: number; +export const KEY_Greek_epsilon: number; +export const KEY_Greek_epsilonaccent: number; +export const KEY_Greek_eta: number; +export const KEY_Greek_etaaccent: number; +export const KEY_Greek_finalsmallsigma: number; +export const KEY_Greek_gamma: number; +export const KEY_Greek_horizbar: number; +export const KEY_Greek_iota: number; +export const KEY_Greek_iotaaccent: number; +export const KEY_Greek_iotaaccentdieresis: number; +export const KEY_Greek_iotadieresis: number; +export const KEY_Greek_kappa: number; +export const KEY_Greek_lambda: number; +export const KEY_Greek_lamda: number; +export const KEY_Greek_mu: number; +export const KEY_Greek_nu: number; +export const KEY_Greek_omega: number; +export const KEY_Greek_omegaaccent: number; +export const KEY_Greek_omicron: number; +export const KEY_Greek_omicronaccent: number; +export const KEY_Greek_phi: number; +export const KEY_Greek_pi: number; +export const KEY_Greek_psi: number; +export const KEY_Greek_rho: number; +export const KEY_Greek_sigma: number; +export const KEY_Greek_switch: number; +export const KEY_Greek_tau: number; +export const KEY_Greek_theta: number; +export const KEY_Greek_upsilon: number; +export const KEY_Greek_upsilonaccent: number; +export const KEY_Greek_upsilonaccentdieresis: number; +export const KEY_Greek_upsilondieresis: number; +export const KEY_Greek_xi: number; +export const KEY_Greek_zeta: number; +export const KEY_Green: number; +export const KEY_H: number; +export const KEY_Hangul: number; +export const KEY_Hangul_A: number; +export const KEY_Hangul_AE: number; +export const KEY_Hangul_AraeA: number; +export const KEY_Hangul_AraeAE: number; +export const KEY_Hangul_Banja: number; +export const KEY_Hangul_Cieuc: number; +export const KEY_Hangul_Codeinput: number; +export const KEY_Hangul_Dikeud: number; +export const KEY_Hangul_E: number; +export const KEY_Hangul_EO: number; +export const KEY_Hangul_EU: number; +export const KEY_Hangul_End: number; +export const KEY_Hangul_Hanja: number; +export const KEY_Hangul_Hieuh: number; +export const KEY_Hangul_I: number; +export const KEY_Hangul_Ieung: number; +export const KEY_Hangul_J_Cieuc: number; +export const KEY_Hangul_J_Dikeud: number; +export const KEY_Hangul_J_Hieuh: number; +export const KEY_Hangul_J_Ieung: number; +export const KEY_Hangul_J_Jieuj: number; +export const KEY_Hangul_J_Khieuq: number; +export const KEY_Hangul_J_Kiyeog: number; +export const KEY_Hangul_J_KiyeogSios: number; +export const KEY_Hangul_J_KkogjiDalrinIeung: number; +export const KEY_Hangul_J_Mieum: number; +export const KEY_Hangul_J_Nieun: number; +export const KEY_Hangul_J_NieunHieuh: number; +export const KEY_Hangul_J_NieunJieuj: number; +export const KEY_Hangul_J_PanSios: number; +export const KEY_Hangul_J_Phieuf: number; +export const KEY_Hangul_J_Pieub: number; +export const KEY_Hangul_J_PieubSios: number; +export const KEY_Hangul_J_Rieul: number; +export const KEY_Hangul_J_RieulHieuh: number; +export const KEY_Hangul_J_RieulKiyeog: number; +export const KEY_Hangul_J_RieulMieum: number; +export const KEY_Hangul_J_RieulPhieuf: number; +export const KEY_Hangul_J_RieulPieub: number; +export const KEY_Hangul_J_RieulSios: number; +export const KEY_Hangul_J_RieulTieut: number; +export const KEY_Hangul_J_Sios: number; +export const KEY_Hangul_J_SsangKiyeog: number; +export const KEY_Hangul_J_SsangSios: number; +export const KEY_Hangul_J_Tieut: number; +export const KEY_Hangul_J_YeorinHieuh: number; +export const KEY_Hangul_Jamo: number; +export const KEY_Hangul_Jeonja: number; +export const KEY_Hangul_Jieuj: number; +export const KEY_Hangul_Khieuq: number; +export const KEY_Hangul_Kiyeog: number; +export const KEY_Hangul_KiyeogSios: number; +export const KEY_Hangul_KkogjiDalrinIeung: number; +export const KEY_Hangul_Mieum: number; +export const KEY_Hangul_MultipleCandidate: number; +export const KEY_Hangul_Nieun: number; +export const KEY_Hangul_NieunHieuh: number; +export const KEY_Hangul_NieunJieuj: number; +export const KEY_Hangul_O: number; +export const KEY_Hangul_OE: number; +export const KEY_Hangul_PanSios: number; +export const KEY_Hangul_Phieuf: number; +export const KEY_Hangul_Pieub: number; +export const KEY_Hangul_PieubSios: number; +export const KEY_Hangul_PostHanja: number; +export const KEY_Hangul_PreHanja: number; +export const KEY_Hangul_PreviousCandidate: number; +export const KEY_Hangul_Rieul: number; +export const KEY_Hangul_RieulHieuh: number; +export const KEY_Hangul_RieulKiyeog: number; +export const KEY_Hangul_RieulMieum: number; +export const KEY_Hangul_RieulPhieuf: number; +export const KEY_Hangul_RieulPieub: number; +export const KEY_Hangul_RieulSios: number; +export const KEY_Hangul_RieulTieut: number; +export const KEY_Hangul_RieulYeorinHieuh: number; +export const KEY_Hangul_Romaja: number; +export const KEY_Hangul_SingleCandidate: number; +export const KEY_Hangul_Sios: number; +export const KEY_Hangul_Special: number; +export const KEY_Hangul_SsangDikeud: number; +export const KEY_Hangul_SsangJieuj: number; +export const KEY_Hangul_SsangKiyeog: number; +export const KEY_Hangul_SsangPieub: number; +export const KEY_Hangul_SsangSios: number; +export const KEY_Hangul_Start: number; +export const KEY_Hangul_SunkyeongeumMieum: number; +export const KEY_Hangul_SunkyeongeumPhieuf: number; +export const KEY_Hangul_SunkyeongeumPieub: number; +export const KEY_Hangul_Tieut: number; +export const KEY_Hangul_U: number; +export const KEY_Hangul_WA: number; +export const KEY_Hangul_WAE: number; +export const KEY_Hangul_WE: number; +export const KEY_Hangul_WEO: number; +export const KEY_Hangul_WI: number; +export const KEY_Hangul_YA: number; +export const KEY_Hangul_YAE: number; +export const KEY_Hangul_YE: number; +export const KEY_Hangul_YEO: number; +export const KEY_Hangul_YI: number; +export const KEY_Hangul_YO: number; +export const KEY_Hangul_YU: number; +export const KEY_Hangul_YeorinHieuh: number; +export const KEY_Hangul_switch: number; +export const KEY_Hankaku: number; +export const KEY_Hcircumflex: number; +export const KEY_Hebrew_switch: number; +export const KEY_Help: number; +export const KEY_Henkan: number; +export const KEY_Henkan_Mode: number; +export const KEY_Hibernate: number; +export const KEY_Hiragana: number; +export const KEY_Hiragana_Katakana: number; +export const KEY_History: number; +export const KEY_Home: number; +export const KEY_HomePage: number; +export const KEY_HotLinks: number; +export const KEY_Hstroke: number; +export const KEY_Hyper_L: number; +export const KEY_Hyper_R: number; +export const KEY_I: number; +export const KEY_ISO_Center_Object: number; +export const KEY_ISO_Continuous_Underline: number; +export const KEY_ISO_Discontinuous_Underline: number; +export const KEY_ISO_Emphasize: number; +export const KEY_ISO_Enter: number; +export const KEY_ISO_Fast_Cursor_Down: number; +export const KEY_ISO_Fast_Cursor_Left: number; +export const KEY_ISO_Fast_Cursor_Right: number; +export const KEY_ISO_Fast_Cursor_Up: number; +export const KEY_ISO_First_Group: number; +export const KEY_ISO_First_Group_Lock: number; +export const KEY_ISO_Group_Latch: number; +export const KEY_ISO_Group_Lock: number; +export const KEY_ISO_Group_Shift: number; +export const KEY_ISO_Last_Group: number; +export const KEY_ISO_Last_Group_Lock: number; +export const KEY_ISO_Left_Tab: number; +export const KEY_ISO_Level2_Latch: number; +export const KEY_ISO_Level3_Latch: number; +export const KEY_ISO_Level3_Lock: number; +export const KEY_ISO_Level3_Shift: number; +export const KEY_ISO_Level5_Latch: number; +export const KEY_ISO_Level5_Lock: number; +export const KEY_ISO_Level5_Shift: number; +export const KEY_ISO_Lock: number; +export const KEY_ISO_Move_Line_Down: number; +export const KEY_ISO_Move_Line_Up: number; +export const KEY_ISO_Next_Group: number; +export const KEY_ISO_Next_Group_Lock: number; +export const KEY_ISO_Partial_Line_Down: number; +export const KEY_ISO_Partial_Line_Up: number; +export const KEY_ISO_Partial_Space_Left: number; +export const KEY_ISO_Partial_Space_Right: number; +export const KEY_ISO_Prev_Group: number; +export const KEY_ISO_Prev_Group_Lock: number; +export const KEY_ISO_Release_Both_Margins: number; +export const KEY_ISO_Release_Margin_Left: number; +export const KEY_ISO_Release_Margin_Right: number; +export const KEY_ISO_Set_Margin_Left: number; +export const KEY_ISO_Set_Margin_Right: number; +export const KEY_Iabovedot: number; +export const KEY_Iacute: number; +export const KEY_Ibelowdot: number; +export const KEY_Ibreve: number; +export const KEY_Icircumflex: number; +export const KEY_Idiaeresis: number; +export const KEY_Igrave: number; +export const KEY_Ihook: number; +export const KEY_Imacron: number; +export const KEY_Insert: number; +export const KEY_Iogonek: number; +export const KEY_Itilde: number; +export const KEY_J: number; +export const KEY_Jcircumflex: number; +export const KEY_K: number; +export const KEY_KP_0: number; +export const KEY_KP_1: number; +export const KEY_KP_2: number; +export const KEY_KP_3: number; +export const KEY_KP_4: number; +export const KEY_KP_5: number; +export const KEY_KP_6: number; +export const KEY_KP_7: number; +export const KEY_KP_8: number; +export const KEY_KP_9: number; +export const KEY_KP_Add: number; +export const KEY_KP_Begin: number; +export const KEY_KP_Decimal: number; +export const KEY_KP_Delete: number; +export const KEY_KP_Divide: number; +export const KEY_KP_Down: number; +export const KEY_KP_End: number; +export const KEY_KP_Enter: number; +export const KEY_KP_Equal: number; +export const KEY_KP_F1: number; +export const KEY_KP_F2: number; +export const KEY_KP_F3: number; +export const KEY_KP_F4: number; +export const KEY_KP_Home: number; +export const KEY_KP_Insert: number; +export const KEY_KP_Left: number; +export const KEY_KP_Multiply: number; +export const KEY_KP_Next: number; +export const KEY_KP_Page_Down: number; +export const KEY_KP_Page_Up: number; +export const KEY_KP_Prior: number; +export const KEY_KP_Right: number; +export const KEY_KP_Separator: number; +export const KEY_KP_Space: number; +export const KEY_KP_Subtract: number; +export const KEY_KP_Tab: number; +export const KEY_KP_Up: number; +export const KEY_Kana_Lock: number; +export const KEY_Kana_Shift: number; +export const KEY_Kanji: number; +export const KEY_Kanji_Bangou: number; +export const KEY_Katakana: number; +export const KEY_KbdBrightnessDown: number; +export const KEY_KbdBrightnessUp: number; +export const KEY_KbdLightOnOff: number; +export const KEY_Kcedilla: number; +export const KEY_Korean_Won: number; +export const KEY_L: number; +export const KEY_L1: number; +export const KEY_L10: number; +export const KEY_L2: number; +export const KEY_L3: number; +export const KEY_L4: number; +export const KEY_L5: number; +export const KEY_L6: number; +export const KEY_L7: number; +export const KEY_L8: number; +export const KEY_L9: number; +export const KEY_Lacute: number; +export const KEY_Last_Virtual_Screen: number; +export const KEY_Launch0: number; +export const KEY_Launch1: number; +export const KEY_Launch2: number; +export const KEY_Launch3: number; +export const KEY_Launch4: number; +export const KEY_Launch5: number; +export const KEY_Launch6: number; +export const KEY_Launch7: number; +export const KEY_Launch8: number; +export const KEY_Launch9: number; +export const KEY_LaunchA: number; +export const KEY_LaunchB: number; +export const KEY_LaunchC: number; +export const KEY_LaunchD: number; +export const KEY_LaunchE: number; +export const KEY_LaunchF: number; +export const KEY_Lbelowdot: number; +export const KEY_Lcaron: number; +export const KEY_Lcedilla: number; +export const KEY_Left: number; +export const KEY_LightBulb: number; +export const KEY_Linefeed: number; +export const KEY_LiraSign: number; +export const KEY_LogGrabInfo: number; +export const KEY_LogOff: number; +export const KEY_LogWindowTree: number; +export const KEY_Lstroke: number; +export const KEY_M: number; +export const KEY_Mabovedot: number; +export const KEY_Macedonia_DSE: number; +export const KEY_Macedonia_GJE: number; +export const KEY_Macedonia_KJE: number; +export const KEY_Macedonia_dse: number; +export const KEY_Macedonia_gje: number; +export const KEY_Macedonia_kje: number; +export const KEY_Mae_Koho: number; +export const KEY_Mail: number; +export const KEY_MailForward: number; +export const KEY_Market: number; +export const KEY_Massyo: number; +export const KEY_Meeting: number; +export const KEY_Memo: number; +export const KEY_Menu: number; +export const KEY_MenuKB: number; +export const KEY_MenuPB: number; +export const KEY_Messenger: number; +export const KEY_Meta_L: number; +export const KEY_Meta_R: number; +export const KEY_MillSign: number; +export const KEY_ModeLock: number; +export const KEY_Mode_switch: number; +export const KEY_MonBrightnessDown: number; +export const KEY_MonBrightnessUp: number; +export const KEY_MouseKeys_Accel_Enable: number; +export const KEY_MouseKeys_Enable: number; +export const KEY_Muhenkan: number; +export const KEY_Multi_key: number; +export const KEY_MultipleCandidate: number; +export const KEY_Music: number; +export const KEY_MyComputer: number; +export const KEY_MySites: number; +export const KEY_N: number; +export const KEY_Nacute: number; +export const KEY_NairaSign: number; +export const KEY_Ncaron: number; +export const KEY_Ncedilla: number; +export const KEY_New: number; +export const KEY_NewSheqelSign: number; +export const KEY_News: number; +export const KEY_Next: number; +export const KEY_Next_VMode: number; +export const KEY_Next_Virtual_Screen: number; +export const KEY_Ntilde: number; +export const KEY_Num_Lock: number; +export const KEY_O: number; +export const KEY_OE: number; +export const KEY_Oacute: number; +export const KEY_Obarred: number; +export const KEY_Obelowdot: number; +export const KEY_Ocaron: number; +export const KEY_Ocircumflex: number; +export const KEY_Ocircumflexacute: number; +export const KEY_Ocircumflexbelowdot: number; +export const KEY_Ocircumflexgrave: number; +export const KEY_Ocircumflexhook: number; +export const KEY_Ocircumflextilde: number; +export const KEY_Odiaeresis: number; +export const KEY_Odoubleacute: number; +export const KEY_OfficeHome: number; +export const KEY_Ograve: number; +export const KEY_Ohook: number; +export const KEY_Ohorn: number; +export const KEY_Ohornacute: number; +export const KEY_Ohornbelowdot: number; +export const KEY_Ohorngrave: number; +export const KEY_Ohornhook: number; +export const KEY_Ohorntilde: number; +export const KEY_Omacron: number; +export const KEY_Ooblique: number; +export const KEY_Open: number; +export const KEY_OpenURL: number; +export const KEY_Option: number; +export const KEY_Oslash: number; +export const KEY_Otilde: number; +export const KEY_Overlay1_Enable: number; +export const KEY_Overlay2_Enable: number; +export const KEY_P: number; +export const KEY_Pabovedot: number; +export const KEY_Page_Down: number; +export const KEY_Page_Up: number; +export const KEY_Paste: number; +export const KEY_Pause: number; +export const KEY_PesetaSign: number; +export const KEY_Phone: number; +export const KEY_Pictures: number; +export const KEY_Pointer_Accelerate: number; +export const KEY_Pointer_Button1: number; +export const KEY_Pointer_Button2: number; +export const KEY_Pointer_Button3: number; +export const KEY_Pointer_Button4: number; +export const KEY_Pointer_Button5: number; +export const KEY_Pointer_Button_Dflt: number; +export const KEY_Pointer_DblClick1: number; +export const KEY_Pointer_DblClick2: number; +export const KEY_Pointer_DblClick3: number; +export const KEY_Pointer_DblClick4: number; +export const KEY_Pointer_DblClick5: number; +export const KEY_Pointer_DblClick_Dflt: number; +export const KEY_Pointer_DfltBtnNext: number; +export const KEY_Pointer_DfltBtnPrev: number; +export const KEY_Pointer_Down: number; +export const KEY_Pointer_DownLeft: number; +export const KEY_Pointer_DownRight: number; +export const KEY_Pointer_Drag1: number; +export const KEY_Pointer_Drag2: number; +export const KEY_Pointer_Drag3: number; +export const KEY_Pointer_Drag4: number; +export const KEY_Pointer_Drag5: number; +export const KEY_Pointer_Drag_Dflt: number; +export const KEY_Pointer_EnableKeys: number; +export const KEY_Pointer_Left: number; +export const KEY_Pointer_Right: number; +export const KEY_Pointer_Up: number; +export const KEY_Pointer_UpLeft: number; +export const KEY_Pointer_UpRight: number; +export const KEY_PowerDown: number; +export const KEY_PowerOff: number; +export const KEY_Prev_VMode: number; +export const KEY_Prev_Virtual_Screen: number; +export const KEY_PreviousCandidate: number; +export const KEY_Print: number; +export const KEY_Prior: number; +export const KEY_Q: number; +export const KEY_R: number; +export const KEY_R1: number; +export const KEY_R10: number; +export const KEY_R11: number; +export const KEY_R12: number; +export const KEY_R13: number; +export const KEY_R14: number; +export const KEY_R15: number; +export const KEY_R2: number; +export const KEY_R3: number; +export const KEY_R4: number; +export const KEY_R5: number; +export const KEY_R6: number; +export const KEY_R7: number; +export const KEY_R8: number; +export const KEY_R9: number; +export const KEY_Racute: number; +export const KEY_Rcaron: number; +export const KEY_Rcedilla: number; +export const KEY_Red: number; +export const KEY_Redo: number; +export const KEY_Refresh: number; +export const KEY_Reload: number; +export const KEY_RepeatKeys_Enable: number; +export const KEY_Reply: number; +export const KEY_Return: number; +export const KEY_Right: number; +export const KEY_RockerDown: number; +export const KEY_RockerEnter: number; +export const KEY_RockerUp: number; +export const KEY_Romaji: number; +export const KEY_RotateWindows: number; +export const KEY_RotationKB: number; +export const KEY_RotationPB: number; +export const KEY_RupeeSign: number; +export const KEY_S: number; +export const KEY_SCHWA: number; +export const KEY_Sabovedot: number; +export const KEY_Sacute: number; +export const KEY_Save: number; +export const KEY_Scaron: number; +export const KEY_Scedilla: number; +export const KEY_Scircumflex: number; +export const KEY_ScreenSaver: number; +export const KEY_ScrollClick: number; +export const KEY_ScrollDown: number; +export const KEY_ScrollUp: number; +export const KEY_Scroll_Lock: number; +export const KEY_Search: number; +export const KEY_Select: number; +export const KEY_SelectButton: number; +export const KEY_Send: number; +export const KEY_Serbian_DJE: number; +export const KEY_Serbian_DZE: number; +export const KEY_Serbian_JE: number; +export const KEY_Serbian_LJE: number; +export const KEY_Serbian_NJE: number; +export const KEY_Serbian_TSHE: number; +export const KEY_Serbian_dje: number; +export const KEY_Serbian_dze: number; +export const KEY_Serbian_je: number; +export const KEY_Serbian_lje: number; +export const KEY_Serbian_nje: number; +export const KEY_Serbian_tshe: number; +export const KEY_Shift_L: number; +export const KEY_Shift_Lock: number; +export const KEY_Shift_R: number; +export const KEY_Shop: number; +export const KEY_SingleCandidate: number; +export const KEY_Sinh_a: number; +export const KEY_Sinh_aa: number; +export const KEY_Sinh_aa2: number; +export const KEY_Sinh_ae: number; +export const KEY_Sinh_ae2: number; +export const KEY_Sinh_aee: number; +export const KEY_Sinh_aee2: number; +export const KEY_Sinh_ai: number; +export const KEY_Sinh_ai2: number; +export const KEY_Sinh_al: number; +export const KEY_Sinh_au: number; +export const KEY_Sinh_au2: number; +export const KEY_Sinh_ba: number; +export const KEY_Sinh_bha: number; +export const KEY_Sinh_ca: number; +export const KEY_Sinh_cha: number; +export const KEY_Sinh_dda: number; +export const KEY_Sinh_ddha: number; +export const KEY_Sinh_dha: number; +export const KEY_Sinh_dhha: number; +export const KEY_Sinh_e: number; +export const KEY_Sinh_e2: number; +export const KEY_Sinh_ee: number; +export const KEY_Sinh_ee2: number; +export const KEY_Sinh_fa: number; +export const KEY_Sinh_ga: number; +export const KEY_Sinh_gha: number; +export const KEY_Sinh_h2: number; +export const KEY_Sinh_ha: number; +export const KEY_Sinh_i: number; +export const KEY_Sinh_i2: number; +export const KEY_Sinh_ii: number; +export const KEY_Sinh_ii2: number; +export const KEY_Sinh_ja: number; +export const KEY_Sinh_jha: number; +export const KEY_Sinh_jnya: number; +export const KEY_Sinh_ka: number; +export const KEY_Sinh_kha: number; +export const KEY_Sinh_kunddaliya: number; +export const KEY_Sinh_la: number; +export const KEY_Sinh_lla: number; +export const KEY_Sinh_lu: number; +export const KEY_Sinh_lu2: number; +export const KEY_Sinh_luu: number; +export const KEY_Sinh_luu2: number; +export const KEY_Sinh_ma: number; +export const KEY_Sinh_mba: number; +export const KEY_Sinh_na: number; +export const KEY_Sinh_ndda: number; +export const KEY_Sinh_ndha: number; +export const KEY_Sinh_ng: number; +export const KEY_Sinh_ng2: number; +export const KEY_Sinh_nga: number; +export const KEY_Sinh_nja: number; +export const KEY_Sinh_nna: number; +export const KEY_Sinh_nya: number; +export const KEY_Sinh_o: number; +export const KEY_Sinh_o2: number; +export const KEY_Sinh_oo: number; +export const KEY_Sinh_oo2: number; +export const KEY_Sinh_pa: number; +export const KEY_Sinh_pha: number; +export const KEY_Sinh_ra: number; +export const KEY_Sinh_ri: number; +export const KEY_Sinh_rii: number; +export const KEY_Sinh_ru2: number; +export const KEY_Sinh_ruu2: number; +export const KEY_Sinh_sa: number; +export const KEY_Sinh_sha: number; +export const KEY_Sinh_ssha: number; +export const KEY_Sinh_tha: number; +export const KEY_Sinh_thha: number; +export const KEY_Sinh_tta: number; +export const KEY_Sinh_ttha: number; +export const KEY_Sinh_u: number; +export const KEY_Sinh_u2: number; +export const KEY_Sinh_uu: number; +export const KEY_Sinh_uu2: number; +export const KEY_Sinh_va: number; +export const KEY_Sinh_ya: number; +export const KEY_Sleep: number; +export const KEY_SlowKeys_Enable: number; +export const KEY_Spell: number; +export const KEY_SplitScreen: number; +export const KEY_Standby: number; +export const KEY_Start: number; +export const KEY_StickyKeys_Enable: number; +export const KEY_Stop: number; +export const KEY_Subtitle: number; +export const KEY_Super_L: number; +export const KEY_Super_R: number; +export const KEY_Support: number; +export const KEY_Suspend: number; +export const KEY_Switch_VT_1: number; +export const KEY_Switch_VT_10: number; +export const KEY_Switch_VT_11: number; +export const KEY_Switch_VT_12: number; +export const KEY_Switch_VT_2: number; +export const KEY_Switch_VT_3: number; +export const KEY_Switch_VT_4: number; +export const KEY_Switch_VT_5: number; +export const KEY_Switch_VT_6: number; +export const KEY_Switch_VT_7: number; +export const KEY_Switch_VT_8: number; +export const KEY_Switch_VT_9: number; +export const KEY_Sys_Req: number; +export const KEY_T: number; +export const KEY_THORN: number; +export const KEY_Tab: number; +export const KEY_Tabovedot: number; +export const KEY_TaskPane: number; +export const KEY_Tcaron: number; +export const KEY_Tcedilla: number; +export const KEY_Terminal: number; +export const KEY_Terminate_Server: number; +export const KEY_Thai_baht: number; +export const KEY_Thai_bobaimai: number; +export const KEY_Thai_chochan: number; +export const KEY_Thai_chochang: number; +export const KEY_Thai_choching: number; +export const KEY_Thai_chochoe: number; +export const KEY_Thai_dochada: number; +export const KEY_Thai_dodek: number; +export const KEY_Thai_fofa: number; +export const KEY_Thai_fofan: number; +export const KEY_Thai_hohip: number; +export const KEY_Thai_honokhuk: number; +export const KEY_Thai_khokhai: number; +export const KEY_Thai_khokhon: number; +export const KEY_Thai_khokhuat: number; +export const KEY_Thai_khokhwai: number; +export const KEY_Thai_khorakhang: number; +export const KEY_Thai_kokai: number; +export const KEY_Thai_lakkhangyao: number; +export const KEY_Thai_lekchet: number; +export const KEY_Thai_lekha: number; +export const KEY_Thai_lekhok: number; +export const KEY_Thai_lekkao: number; +export const KEY_Thai_leknung: number; +export const KEY_Thai_lekpaet: number; +export const KEY_Thai_leksam: number; +export const KEY_Thai_leksi: number; +export const KEY_Thai_leksong: number; +export const KEY_Thai_leksun: number; +export const KEY_Thai_lochula: number; +export const KEY_Thai_loling: number; +export const KEY_Thai_lu: number; +export const KEY_Thai_maichattawa: number; +export const KEY_Thai_maiek: number; +export const KEY_Thai_maihanakat: number; +export const KEY_Thai_maihanakat_maitho: number; +export const KEY_Thai_maitaikhu: number; +export const KEY_Thai_maitho: number; +export const KEY_Thai_maitri: number; +export const KEY_Thai_maiyamok: number; +export const KEY_Thai_moma: number; +export const KEY_Thai_ngongu: number; +export const KEY_Thai_nikhahit: number; +export const KEY_Thai_nonen: number; +export const KEY_Thai_nonu: number; +export const KEY_Thai_oang: number; +export const KEY_Thai_paiyannoi: number; +export const KEY_Thai_phinthu: number; +export const KEY_Thai_phophan: number; +export const KEY_Thai_phophung: number; +export const KEY_Thai_phosamphao: number; +export const KEY_Thai_popla: number; +export const KEY_Thai_rorua: number; +export const KEY_Thai_ru: number; +export const KEY_Thai_saraa: number; +export const KEY_Thai_saraaa: number; +export const KEY_Thai_saraae: number; +export const KEY_Thai_saraaimaimalai: number; +export const KEY_Thai_saraaimaimuan: number; +export const KEY_Thai_saraam: number; +export const KEY_Thai_sarae: number; +export const KEY_Thai_sarai: number; +export const KEY_Thai_saraii: number; +export const KEY_Thai_sarao: number; +export const KEY_Thai_sarau: number; +export const KEY_Thai_saraue: number; +export const KEY_Thai_sarauee: number; +export const KEY_Thai_sarauu: number; +export const KEY_Thai_sorusi: number; +export const KEY_Thai_sosala: number; +export const KEY_Thai_soso: number; +export const KEY_Thai_sosua: number; +export const KEY_Thai_thanthakhat: number; +export const KEY_Thai_thonangmontho: number; +export const KEY_Thai_thophuthao: number; +export const KEY_Thai_thothahan: number; +export const KEY_Thai_thothan: number; +export const KEY_Thai_thothong: number; +export const KEY_Thai_thothung: number; +export const KEY_Thai_topatak: number; +export const KEY_Thai_totao: number; +export const KEY_Thai_wowaen: number; +export const KEY_Thai_yoyak: number; +export const KEY_Thai_yoying: number; +export const KEY_Thorn: number; +export const KEY_Time: number; +export const KEY_ToDoList: number; +export const KEY_Tools: number; +export const KEY_TopMenu: number; +export const KEY_TouchpadOff: number; +export const KEY_TouchpadOn: number; +export const KEY_TouchpadToggle: number; +export const KEY_Touroku: number; +export const KEY_Travel: number; +export const KEY_Tslash: number; +export const KEY_U: number; +export const KEY_UWB: number; +export const KEY_Uacute: number; +export const KEY_Ubelowdot: number; +export const KEY_Ubreve: number; +export const KEY_Ucircumflex: number; +export const KEY_Udiaeresis: number; +export const KEY_Udoubleacute: number; +export const KEY_Ugrave: number; +export const KEY_Uhook: number; +export const KEY_Uhorn: number; +export const KEY_Uhornacute: number; +export const KEY_Uhornbelowdot: number; +export const KEY_Uhorngrave: number; +export const KEY_Uhornhook: number; +export const KEY_Uhorntilde: number; +export const KEY_Ukrainian_GHE_WITH_UPTURN: number; +export const KEY_Ukrainian_I: number; +export const KEY_Ukrainian_IE: number; +export const KEY_Ukrainian_YI: number; +export const KEY_Ukrainian_ghe_with_upturn: number; +export const KEY_Ukrainian_i: number; +export const KEY_Ukrainian_ie: number; +export const KEY_Ukrainian_yi: number; +export const KEY_Ukranian_I: number; +export const KEY_Ukranian_JE: number; +export const KEY_Ukranian_YI: number; +export const KEY_Ukranian_i: number; +export const KEY_Ukranian_je: number; +export const KEY_Ukranian_yi: number; +export const KEY_Umacron: number; +export const KEY_Undo: number; +export const KEY_Ungrab: number; +export const KEY_Uogonek: number; +export const KEY_Up: number; +export const KEY_Uring: number; +export const KEY_User1KB: number; +export const KEY_User2KB: number; +export const KEY_UserPB: number; +export const KEY_Utilde: number; +export const KEY_V: number; +export const KEY_VendorHome: number; +export const KEY_Video: number; +export const KEY_View: number; +export const KEY_VoidSymbol: number; +export const KEY_W: number; +export const KEY_WLAN: number; +export const KEY_WWW: number; +export const KEY_Wacute: number; +export const KEY_WakeUp: number; +export const KEY_Wcircumflex: number; +export const KEY_Wdiaeresis: number; +export const KEY_WebCam: number; +export const KEY_Wgrave: number; +export const KEY_WheelButton: number; +export const KEY_WindowClear: number; +export const KEY_WonSign: number; +export const KEY_Word: number; +export const KEY_X: number; +export const KEY_Xabovedot: number; +export const KEY_Xfer: number; +export const KEY_Y: number; +export const KEY_Yacute: number; +export const KEY_Ybelowdot: number; +export const KEY_Ycircumflex: number; +export const KEY_Ydiaeresis: number; +export const KEY_Yellow: number; +export const KEY_Ygrave: number; +export const KEY_Yhook: number; +export const KEY_Ytilde: number; +export const KEY_Z: number; +export const KEY_Zabovedot: number; +export const KEY_Zacute: number; +export const KEY_Zcaron: number; +export const KEY_Zen_Koho: number; +export const KEY_Zenkaku: number; +export const KEY_Zenkaku_Hankaku: number; +export const KEY_ZoomIn: number; +export const KEY_ZoomOut: number; +export const KEY_Zstroke: number; +export const KEY_a: number; +export const KEY_aacute: number; +export const KEY_abelowdot: number; +export const KEY_abovedot: number; +export const KEY_abreve: number; +export const KEY_abreveacute: number; +export const KEY_abrevebelowdot: number; +export const KEY_abrevegrave: number; +export const KEY_abrevehook: number; +export const KEY_abrevetilde: number; +export const KEY_acircumflex: number; +export const KEY_acircumflexacute: number; +export const KEY_acircumflexbelowdot: number; +export const KEY_acircumflexgrave: number; +export const KEY_acircumflexhook: number; +export const KEY_acircumflextilde: number; +export const KEY_acute: number; +export const KEY_adiaeresis: number; +export const KEY_ae: number; +export const KEY_agrave: number; +export const KEY_ahook: number; +export const KEY_amacron: number; +export const KEY_ampersand: number; +export const KEY_aogonek: number; +export const KEY_apostrophe: number; +export const KEY_approxeq: number; +export const KEY_approximate: number; +export const KEY_aring: number; +export const KEY_asciicircum: number; +export const KEY_asciitilde: number; +export const KEY_asterisk: number; +export const KEY_at: number; +export const KEY_atilde: number; +export const KEY_b: number; +export const KEY_babovedot: number; +export const KEY_backslash: number; +export const KEY_ballotcross: number; +export const KEY_bar: number; +export const KEY_because: number; +export const KEY_blank: number; +export const KEY_botintegral: number; +export const KEY_botleftparens: number; +export const KEY_botleftsqbracket: number; +export const KEY_botleftsummation: number; +export const KEY_botrightparens: number; +export const KEY_botrightsqbracket: number; +export const KEY_botrightsummation: number; +export const KEY_bott: number; +export const KEY_botvertsummationconnector: number; +export const KEY_braceleft: number; +export const KEY_braceright: number; +export const KEY_bracketleft: number; +export const KEY_bracketright: number; +export const KEY_braille_blank: number; +export const KEY_braille_dot_1: number; +export const KEY_braille_dot_10: number; +export const KEY_braille_dot_2: number; +export const KEY_braille_dot_3: number; +export const KEY_braille_dot_4: number; +export const KEY_braille_dot_5: number; +export const KEY_braille_dot_6: number; +export const KEY_braille_dot_7: number; +export const KEY_braille_dot_8: number; +export const KEY_braille_dot_9: number; +export const KEY_braille_dots_1: number; +export const KEY_braille_dots_12: number; +export const KEY_braille_dots_123: number; +export const KEY_braille_dots_1234: number; +export const KEY_braille_dots_12345: number; +export const KEY_braille_dots_123456: number; +export const KEY_braille_dots_1234567: number; +export const KEY_braille_dots_12345678: number; +export const KEY_braille_dots_1234568: number; +export const KEY_braille_dots_123457: number; +export const KEY_braille_dots_1234578: number; +export const KEY_braille_dots_123458: number; +export const KEY_braille_dots_12346: number; +export const KEY_braille_dots_123467: number; +export const KEY_braille_dots_1234678: number; +export const KEY_braille_dots_123468: number; +export const KEY_braille_dots_12347: number; +export const KEY_braille_dots_123478: number; +export const KEY_braille_dots_12348: number; +export const KEY_braille_dots_1235: number; +export const KEY_braille_dots_12356: number; +export const KEY_braille_dots_123567: number; +export const KEY_braille_dots_1235678: number; +export const KEY_braille_dots_123568: number; +export const KEY_braille_dots_12357: number; +export const KEY_braille_dots_123578: number; +export const KEY_braille_dots_12358: number; +export const KEY_braille_dots_1236: number; +export const KEY_braille_dots_12367: number; +export const KEY_braille_dots_123678: number; +export const KEY_braille_dots_12368: number; +export const KEY_braille_dots_1237: number; +export const KEY_braille_dots_12378: number; +export const KEY_braille_dots_1238: number; +export const KEY_braille_dots_124: number; +export const KEY_braille_dots_1245: number; +export const KEY_braille_dots_12456: number; +export const KEY_braille_dots_124567: number; +export const KEY_braille_dots_1245678: number; +export const KEY_braille_dots_124568: number; +export const KEY_braille_dots_12457: number; +export const KEY_braille_dots_124578: number; +export const KEY_braille_dots_12458: number; +export const KEY_braille_dots_1246: number; +export const KEY_braille_dots_12467: number; +export const KEY_braille_dots_124678: number; +export const KEY_braille_dots_12468: number; +export const KEY_braille_dots_1247: number; +export const KEY_braille_dots_12478: number; +export const KEY_braille_dots_1248: number; +export const KEY_braille_dots_125: number; +export const KEY_braille_dots_1256: number; +export const KEY_braille_dots_12567: number; +export const KEY_braille_dots_125678: number; +export const KEY_braille_dots_12568: number; +export const KEY_braille_dots_1257: number; +export const KEY_braille_dots_12578: number; +export const KEY_braille_dots_1258: number; +export const KEY_braille_dots_126: number; +export const KEY_braille_dots_1267: number; +export const KEY_braille_dots_12678: number; +export const KEY_braille_dots_1268: number; +export const KEY_braille_dots_127: number; +export const KEY_braille_dots_1278: number; +export const KEY_braille_dots_128: number; +export const KEY_braille_dots_13: number; +export const KEY_braille_dots_134: number; +export const KEY_braille_dots_1345: number; +export const KEY_braille_dots_13456: number; +export const KEY_braille_dots_134567: number; +export const KEY_braille_dots_1345678: number; +export const KEY_braille_dots_134568: number; +export const KEY_braille_dots_13457: number; +export const KEY_braille_dots_134578: number; +export const KEY_braille_dots_13458: number; +export const KEY_braille_dots_1346: number; +export const KEY_braille_dots_13467: number; +export const KEY_braille_dots_134678: number; +export const KEY_braille_dots_13468: number; +export const KEY_braille_dots_1347: number; +export const KEY_braille_dots_13478: number; +export const KEY_braille_dots_1348: number; +export const KEY_braille_dots_135: number; +export const KEY_braille_dots_1356: number; +export const KEY_braille_dots_13567: number; +export const KEY_braille_dots_135678: number; +export const KEY_braille_dots_13568: number; +export const KEY_braille_dots_1357: number; +export const KEY_braille_dots_13578: number; +export const KEY_braille_dots_1358: number; +export const KEY_braille_dots_136: number; +export const KEY_braille_dots_1367: number; +export const KEY_braille_dots_13678: number; +export const KEY_braille_dots_1368: number; +export const KEY_braille_dots_137: number; +export const KEY_braille_dots_1378: number; +export const KEY_braille_dots_138: number; +export const KEY_braille_dots_14: number; +export const KEY_braille_dots_145: number; +export const KEY_braille_dots_1456: number; +export const KEY_braille_dots_14567: number; +export const KEY_braille_dots_145678: number; +export const KEY_braille_dots_14568: number; +export const KEY_braille_dots_1457: number; +export const KEY_braille_dots_14578: number; +export const KEY_braille_dots_1458: number; +export const KEY_braille_dots_146: number; +export const KEY_braille_dots_1467: number; +export const KEY_braille_dots_14678: number; +export const KEY_braille_dots_1468: number; +export const KEY_braille_dots_147: number; +export const KEY_braille_dots_1478: number; +export const KEY_braille_dots_148: number; +export const KEY_braille_dots_15: number; +export const KEY_braille_dots_156: number; +export const KEY_braille_dots_1567: number; +export const KEY_braille_dots_15678: number; +export const KEY_braille_dots_1568: number; +export const KEY_braille_dots_157: number; +export const KEY_braille_dots_1578: number; +export const KEY_braille_dots_158: number; +export const KEY_braille_dots_16: number; +export const KEY_braille_dots_167: number; +export const KEY_braille_dots_1678: number; +export const KEY_braille_dots_168: number; +export const KEY_braille_dots_17: number; +export const KEY_braille_dots_178: number; +export const KEY_braille_dots_18: number; +export const KEY_braille_dots_2: number; +export const KEY_braille_dots_23: number; +export const KEY_braille_dots_234: number; +export const KEY_braille_dots_2345: number; +export const KEY_braille_dots_23456: number; +export const KEY_braille_dots_234567: number; +export const KEY_braille_dots_2345678: number; +export const KEY_braille_dots_234568: number; +export const KEY_braille_dots_23457: number; +export const KEY_braille_dots_234578: number; +export const KEY_braille_dots_23458: number; +export const KEY_braille_dots_2346: number; +export const KEY_braille_dots_23467: number; +export const KEY_braille_dots_234678: number; +export const KEY_braille_dots_23468: number; +export const KEY_braille_dots_2347: number; +export const KEY_braille_dots_23478: number; +export const KEY_braille_dots_2348: number; +export const KEY_braille_dots_235: number; +export const KEY_braille_dots_2356: number; +export const KEY_braille_dots_23567: number; +export const KEY_braille_dots_235678: number; +export const KEY_braille_dots_23568: number; +export const KEY_braille_dots_2357: number; +export const KEY_braille_dots_23578: number; +export const KEY_braille_dots_2358: number; +export const KEY_braille_dots_236: number; +export const KEY_braille_dots_2367: number; +export const KEY_braille_dots_23678: number; +export const KEY_braille_dots_2368: number; +export const KEY_braille_dots_237: number; +export const KEY_braille_dots_2378: number; +export const KEY_braille_dots_238: number; +export const KEY_braille_dots_24: number; +export const KEY_braille_dots_245: number; +export const KEY_braille_dots_2456: number; +export const KEY_braille_dots_24567: number; +export const KEY_braille_dots_245678: number; +export const KEY_braille_dots_24568: number; +export const KEY_braille_dots_2457: number; +export const KEY_braille_dots_24578: number; +export const KEY_braille_dots_2458: number; +export const KEY_braille_dots_246: number; +export const KEY_braille_dots_2467: number; +export const KEY_braille_dots_24678: number; +export const KEY_braille_dots_2468: number; +export const KEY_braille_dots_247: number; +export const KEY_braille_dots_2478: number; +export const KEY_braille_dots_248: number; +export const KEY_braille_dots_25: number; +export const KEY_braille_dots_256: number; +export const KEY_braille_dots_2567: number; +export const KEY_braille_dots_25678: number; +export const KEY_braille_dots_2568: number; +export const KEY_braille_dots_257: number; +export const KEY_braille_dots_2578: number; +export const KEY_braille_dots_258: number; +export const KEY_braille_dots_26: number; +export const KEY_braille_dots_267: number; +export const KEY_braille_dots_2678: number; +export const KEY_braille_dots_268: number; +export const KEY_braille_dots_27: number; +export const KEY_braille_dots_278: number; +export const KEY_braille_dots_28: number; +export const KEY_braille_dots_3: number; +export const KEY_braille_dots_34: number; +export const KEY_braille_dots_345: number; +export const KEY_braille_dots_3456: number; +export const KEY_braille_dots_34567: number; +export const KEY_braille_dots_345678: number; +export const KEY_braille_dots_34568: number; +export const KEY_braille_dots_3457: number; +export const KEY_braille_dots_34578: number; +export const KEY_braille_dots_3458: number; +export const KEY_braille_dots_346: number; +export const KEY_braille_dots_3467: number; +export const KEY_braille_dots_34678: number; +export const KEY_braille_dots_3468: number; +export const KEY_braille_dots_347: number; +export const KEY_braille_dots_3478: number; +export const KEY_braille_dots_348: number; +export const KEY_braille_dots_35: number; +export const KEY_braille_dots_356: number; +export const KEY_braille_dots_3567: number; +export const KEY_braille_dots_35678: number; +export const KEY_braille_dots_3568: number; +export const KEY_braille_dots_357: number; +export const KEY_braille_dots_3578: number; +export const KEY_braille_dots_358: number; +export const KEY_braille_dots_36: number; +export const KEY_braille_dots_367: number; +export const KEY_braille_dots_3678: number; +export const KEY_braille_dots_368: number; +export const KEY_braille_dots_37: number; +export const KEY_braille_dots_378: number; +export const KEY_braille_dots_38: number; +export const KEY_braille_dots_4: number; +export const KEY_braille_dots_45: number; +export const KEY_braille_dots_456: number; +export const KEY_braille_dots_4567: number; +export const KEY_braille_dots_45678: number; +export const KEY_braille_dots_4568: number; +export const KEY_braille_dots_457: number; +export const KEY_braille_dots_4578: number; +export const KEY_braille_dots_458: number; +export const KEY_braille_dots_46: number; +export const KEY_braille_dots_467: number; +export const KEY_braille_dots_4678: number; +export const KEY_braille_dots_468: number; +export const KEY_braille_dots_47: number; +export const KEY_braille_dots_478: number; +export const KEY_braille_dots_48: number; +export const KEY_braille_dots_5: number; +export const KEY_braille_dots_56: number; +export const KEY_braille_dots_567: number; +export const KEY_braille_dots_5678: number; +export const KEY_braille_dots_568: number; +export const KEY_braille_dots_57: number; +export const KEY_braille_dots_578: number; +export const KEY_braille_dots_58: number; +export const KEY_braille_dots_6: number; +export const KEY_braille_dots_67: number; +export const KEY_braille_dots_678: number; +export const KEY_braille_dots_68: number; +export const KEY_braille_dots_7: number; +export const KEY_braille_dots_78: number; +export const KEY_braille_dots_8: number; +export const KEY_breve: number; +export const KEY_brokenbar: number; +export const KEY_c: number; +export const KEY_c_h: number; +export const KEY_cabovedot: number; +export const KEY_cacute: number; +export const KEY_careof: number; +export const KEY_caret: number; +export const KEY_caron: number; +export const KEY_ccaron: number; +export const KEY_ccedilla: number; +export const KEY_ccircumflex: number; +export const KEY_cedilla: number; +export const KEY_cent: number; +export const KEY_ch: number; +export const KEY_checkerboard: number; +export const KEY_checkmark: number; +export const KEY_circle: number; +export const KEY_club: number; +export const KEY_colon: number; +export const KEY_comma: number; +export const KEY_containsas: number; +export const KEY_copyright: number; +export const KEY_cr: number; +export const KEY_crossinglines: number; +export const KEY_cuberoot: number; +export const KEY_currency: number; +export const KEY_cursor: number; +export const KEY_d: number; +export const KEY_dabovedot: number; +export const KEY_dagger: number; +export const KEY_dcaron: number; +export const KEY_dead_A: number; +export const KEY_dead_E: number; +export const KEY_dead_I: number; +export const KEY_dead_O: number; +export const KEY_dead_U: number; +export const KEY_dead_a: number; +export const KEY_dead_abovecomma: number; +export const KEY_dead_abovedot: number; +export const KEY_dead_abovereversedcomma: number; +export const KEY_dead_abovering: number; +export const KEY_dead_aboveverticalline: number; +export const KEY_dead_acute: number; +export const KEY_dead_belowbreve: number; +export const KEY_dead_belowcircumflex: number; +export const KEY_dead_belowcomma: number; +export const KEY_dead_belowdiaeresis: number; +export const KEY_dead_belowdot: number; +export const KEY_dead_belowmacron: number; +export const KEY_dead_belowring: number; +export const KEY_dead_belowtilde: number; +export const KEY_dead_belowverticalline: number; +export const KEY_dead_breve: number; +export const KEY_dead_capital_schwa: number; +export const KEY_dead_caron: number; +export const KEY_dead_cedilla: number; +export const KEY_dead_circumflex: number; +export const KEY_dead_currency: number; +export const KEY_dead_dasia: number; +export const KEY_dead_diaeresis: number; +export const KEY_dead_doubleacute: number; +export const KEY_dead_doublegrave: number; +export const KEY_dead_e: number; +export const KEY_dead_grave: number; +export const KEY_dead_greek: number; +export const KEY_dead_hook: number; +export const KEY_dead_horn: number; +export const KEY_dead_i: number; +export const KEY_dead_invertedbreve: number; +export const KEY_dead_iota: number; +export const KEY_dead_longsolidusoverlay: number; +export const KEY_dead_lowline: number; +export const KEY_dead_macron: number; +export const KEY_dead_o: number; +export const KEY_dead_ogonek: number; +export const KEY_dead_perispomeni: number; +export const KEY_dead_psili: number; +export const KEY_dead_semivoiced_sound: number; +export const KEY_dead_small_schwa: number; +export const KEY_dead_stroke: number; +export const KEY_dead_tilde: number; +export const KEY_dead_u: number; +export const KEY_dead_voiced_sound: number; +export const KEY_decimalpoint: number; +export const KEY_degree: number; +export const KEY_diaeresis: number; +export const KEY_diamond: number; +export const KEY_digitspace: number; +export const KEY_dintegral: number; +export const KEY_division: number; +export const KEY_dollar: number; +export const KEY_doubbaselinedot: number; +export const KEY_doubleacute: number; +export const KEY_doubledagger: number; +export const KEY_doublelowquotemark: number; +export const KEY_downarrow: number; +export const KEY_downcaret: number; +export const KEY_downshoe: number; +export const KEY_downstile: number; +export const KEY_downtack: number; +export const KEY_dstroke: number; +export const KEY_e: number; +export const KEY_eabovedot: number; +export const KEY_eacute: number; +export const KEY_ebelowdot: number; +export const KEY_ecaron: number; +export const KEY_ecircumflex: number; +export const KEY_ecircumflexacute: number; +export const KEY_ecircumflexbelowdot: number; +export const KEY_ecircumflexgrave: number; +export const KEY_ecircumflexhook: number; +export const KEY_ecircumflextilde: number; +export const KEY_ediaeresis: number; +export const KEY_egrave: number; +export const KEY_ehook: number; +export const KEY_eightsubscript: number; +export const KEY_eightsuperior: number; +export const KEY_elementof: number; +export const KEY_ellipsis: number; +export const KEY_em3space: number; +export const KEY_em4space: number; +export const KEY_emacron: number; +export const KEY_emdash: number; +export const KEY_emfilledcircle: number; +export const KEY_emfilledrect: number; +export const KEY_emopencircle: number; +export const KEY_emopenrectangle: number; +export const KEY_emptyset: number; +export const KEY_emspace: number; +export const KEY_endash: number; +export const KEY_enfilledcircbullet: number; +export const KEY_enfilledsqbullet: number; +export const KEY_eng: number; +export const KEY_enopencircbullet: number; +export const KEY_enopensquarebullet: number; +export const KEY_enspace: number; +export const KEY_eogonek: number; +export const KEY_equal: number; +export const KEY_eth: number; +export const KEY_etilde: number; +export const KEY_exclam: number; +export const KEY_exclamdown: number; +export const KEY_ezh: number; +export const KEY_f: number; +export const KEY_fabovedot: number; +export const KEY_femalesymbol: number; +export const KEY_ff: number; +export const KEY_figdash: number; +export const KEY_filledlefttribullet: number; +export const KEY_filledrectbullet: number; +export const KEY_filledrighttribullet: number; +export const KEY_filledtribulletdown: number; +export const KEY_filledtribulletup: number; +export const KEY_fiveeighths: number; +export const KEY_fivesixths: number; +export const KEY_fivesubscript: number; +export const KEY_fivesuperior: number; +export const KEY_fourfifths: number; +export const KEY_foursubscript: number; +export const KEY_foursuperior: number; +export const KEY_fourthroot: number; +export const KEY_function: number; +export const KEY_g: number; +export const KEY_gabovedot: number; +export const KEY_gbreve: number; +export const KEY_gcaron: number; +export const KEY_gcedilla: number; +export const KEY_gcircumflex: number; +export const KEY_grave: number; +export const KEY_greater: number; +export const KEY_greaterthanequal: number; +export const KEY_guillemotleft: number; +export const KEY_guillemotright: number; +export const KEY_h: number; +export const KEY_hairspace: number; +export const KEY_hcircumflex: number; +export const KEY_heart: number; +export const KEY_hebrew_aleph: number; +export const KEY_hebrew_ayin: number; +export const KEY_hebrew_bet: number; +export const KEY_hebrew_beth: number; +export const KEY_hebrew_chet: number; +export const KEY_hebrew_dalet: number; +export const KEY_hebrew_daleth: number; +export const KEY_hebrew_doublelowline: number; +export const KEY_hebrew_finalkaph: number; +export const KEY_hebrew_finalmem: number; +export const KEY_hebrew_finalnun: number; +export const KEY_hebrew_finalpe: number; +export const KEY_hebrew_finalzade: number; +export const KEY_hebrew_finalzadi: number; +export const KEY_hebrew_gimel: number; +export const KEY_hebrew_gimmel: number; +export const KEY_hebrew_he: number; +export const KEY_hebrew_het: number; +export const KEY_hebrew_kaph: number; +export const KEY_hebrew_kuf: number; +export const KEY_hebrew_lamed: number; +export const KEY_hebrew_mem: number; +export const KEY_hebrew_nun: number; +export const KEY_hebrew_pe: number; +export const KEY_hebrew_qoph: number; +export const KEY_hebrew_resh: number; +export const KEY_hebrew_samech: number; +export const KEY_hebrew_samekh: number; +export const KEY_hebrew_shin: number; +export const KEY_hebrew_taf: number; +export const KEY_hebrew_taw: number; +export const KEY_hebrew_tet: number; +export const KEY_hebrew_teth: number; +export const KEY_hebrew_waw: number; +export const KEY_hebrew_yod: number; +export const KEY_hebrew_zade: number; +export const KEY_hebrew_zadi: number; +export const KEY_hebrew_zain: number; +export const KEY_hebrew_zayin: number; +export const KEY_hexagram: number; +export const KEY_horizconnector: number; +export const KEY_horizlinescan1: number; +export const KEY_horizlinescan3: number; +export const KEY_horizlinescan5: number; +export const KEY_horizlinescan7: number; +export const KEY_horizlinescan9: number; +export const KEY_hstroke: number; +export const KEY_ht: number; +export const KEY_hyphen: number; +export const KEY_i: number; +export const KEY_iTouch: number; +export const KEY_iacute: number; +export const KEY_ibelowdot: number; +export const KEY_ibreve: number; +export const KEY_icircumflex: number; +export const KEY_identical: number; +export const KEY_idiaeresis: number; +export const KEY_idotless: number; +export const KEY_ifonlyif: number; +export const KEY_igrave: number; +export const KEY_ihook: number; +export const KEY_imacron: number; +export const KEY_implies: number; +export const KEY_includedin: number; +export const KEY_includes: number; +export const KEY_infinity: number; +export const KEY_integral: number; +export const KEY_intersection: number; +export const KEY_iogonek: number; +export const KEY_itilde: number; +export const KEY_j: number; +export const KEY_jcircumflex: number; +export const KEY_jot: number; +export const KEY_k: number; +export const KEY_kana_A: number; +export const KEY_kana_CHI: number; +export const KEY_kana_E: number; +export const KEY_kana_FU: number; +export const KEY_kana_HA: number; +export const KEY_kana_HE: number; +export const KEY_kana_HI: number; +export const KEY_kana_HO: number; +export const KEY_kana_HU: number; +export const KEY_kana_I: number; +export const KEY_kana_KA: number; +export const KEY_kana_KE: number; +export const KEY_kana_KI: number; +export const KEY_kana_KO: number; +export const KEY_kana_KU: number; +export const KEY_kana_MA: number; +export const KEY_kana_ME: number; +export const KEY_kana_MI: number; +export const KEY_kana_MO: number; +export const KEY_kana_MU: number; +export const KEY_kana_N: number; +export const KEY_kana_NA: number; +export const KEY_kana_NE: number; +export const KEY_kana_NI: number; +export const KEY_kana_NO: number; +export const KEY_kana_NU: number; +export const KEY_kana_O: number; +export const KEY_kana_RA: number; +export const KEY_kana_RE: number; +export const KEY_kana_RI: number; +export const KEY_kana_RO: number; +export const KEY_kana_RU: number; +export const KEY_kana_SA: number; +export const KEY_kana_SE: number; +export const KEY_kana_SHI: number; +export const KEY_kana_SO: number; +export const KEY_kana_SU: number; +export const KEY_kana_TA: number; +export const KEY_kana_TE: number; +export const KEY_kana_TI: number; +export const KEY_kana_TO: number; +export const KEY_kana_TSU: number; +export const KEY_kana_TU: number; +export const KEY_kana_U: number; +export const KEY_kana_WA: number; +export const KEY_kana_WO: number; +export const KEY_kana_YA: number; +export const KEY_kana_YO: number; +export const KEY_kana_YU: number; +export const KEY_kana_a: number; +export const KEY_kana_closingbracket: number; +export const KEY_kana_comma: number; +export const KEY_kana_conjunctive: number; +export const KEY_kana_e: number; +export const KEY_kana_fullstop: number; +export const KEY_kana_i: number; +export const KEY_kana_middledot: number; +export const KEY_kana_o: number; +export const KEY_kana_openingbracket: number; +export const KEY_kana_switch: number; +export const KEY_kana_tsu: number; +export const KEY_kana_tu: number; +export const KEY_kana_u: number; +export const KEY_kana_ya: number; +export const KEY_kana_yo: number; +export const KEY_kana_yu: number; +export const KEY_kappa: number; +export const KEY_kcedilla: number; +export const KEY_kra: number; +export const KEY_l: number; +export const KEY_lacute: number; +export const KEY_latincross: number; +export const KEY_lbelowdot: number; +export const KEY_lcaron: number; +export const KEY_lcedilla: number; +export const KEY_leftanglebracket: number; +export const KEY_leftarrow: number; +export const KEY_leftcaret: number; +export const KEY_leftdoublequotemark: number; +export const KEY_leftmiddlecurlybrace: number; +export const KEY_leftopentriangle: number; +export const KEY_leftpointer: number; +export const KEY_leftradical: number; +export const KEY_leftshoe: number; +export const KEY_leftsinglequotemark: number; +export const KEY_leftt: number; +export const KEY_lefttack: number; +export const KEY_less: number; +export const KEY_lessthanequal: number; +export const KEY_lf: number; +export const KEY_logicaland: number; +export const KEY_logicalor: number; +export const KEY_lowleftcorner: number; +export const KEY_lowrightcorner: number; +export const KEY_lstroke: number; +export const KEY_m: number; +export const KEY_mabovedot: number; +export const KEY_macron: number; +export const KEY_malesymbol: number; +export const KEY_maltesecross: number; +export const KEY_marker: number; +export const KEY_masculine: number; +export const KEY_minus: number; +export const KEY_minutes: number; +export const KEY_mu: number; +export const KEY_multiply: number; +export const KEY_musicalflat: number; +export const KEY_musicalsharp: number; +export const KEY_n: number; +export const KEY_nabla: number; +export const KEY_nacute: number; +export const KEY_ncaron: number; +export const KEY_ncedilla: number; +export const KEY_ninesubscript: number; +export const KEY_ninesuperior: number; +export const KEY_nl: number; +export const KEY_nobreakspace: number; +export const KEY_notapproxeq: number; +export const KEY_notelementof: number; +export const KEY_notequal: number; +export const KEY_notidentical: number; +export const KEY_notsign: number; +export const KEY_ntilde: number; +export const KEY_numbersign: number; +export const KEY_numerosign: number; +export const KEY_o: number; +export const KEY_oacute: number; +export const KEY_obarred: number; +export const KEY_obelowdot: number; +export const KEY_ocaron: number; +export const KEY_ocircumflex: number; +export const KEY_ocircumflexacute: number; +export const KEY_ocircumflexbelowdot: number; +export const KEY_ocircumflexgrave: number; +export const KEY_ocircumflexhook: number; +export const KEY_ocircumflextilde: number; +export const KEY_odiaeresis: number; +export const KEY_odoubleacute: number; +export const KEY_oe: number; +export const KEY_ogonek: number; +export const KEY_ograve: number; +export const KEY_ohook: number; +export const KEY_ohorn: number; +export const KEY_ohornacute: number; +export const KEY_ohornbelowdot: number; +export const KEY_ohorngrave: number; +export const KEY_ohornhook: number; +export const KEY_ohorntilde: number; +export const KEY_omacron: number; +export const KEY_oneeighth: number; +export const KEY_onefifth: number; +export const KEY_onehalf: number; +export const KEY_onequarter: number; +export const KEY_onesixth: number; +export const KEY_onesubscript: number; +export const KEY_onesuperior: number; +export const KEY_onethird: number; +export const KEY_ooblique: number; +export const KEY_openrectbullet: number; +export const KEY_openstar: number; +export const KEY_opentribulletdown: number; +export const KEY_opentribulletup: number; +export const KEY_ordfeminine: number; +export const KEY_oslash: number; +export const KEY_otilde: number; +export const KEY_overbar: number; +export const KEY_overline: number; +export const KEY_p: number; +export const KEY_pabovedot: number; +export const KEY_paragraph: number; +export const KEY_parenleft: number; +export const KEY_parenright: number; +export const KEY_partdifferential: number; +export const KEY_partialderivative: number; +export const KEY_percent: number; +export const KEY_period: number; +export const KEY_periodcentered: number; +export const KEY_permille: number; +export const KEY_phonographcopyright: number; +export const KEY_plus: number; +export const KEY_plusminus: number; +export const KEY_prescription: number; +export const KEY_prolongedsound: number; +export const KEY_punctspace: number; +export const KEY_q: number; +export const KEY_quad: number; +export const KEY_question: number; +export const KEY_questiondown: number; +export const KEY_quotedbl: number; +export const KEY_quoteleft: number; +export const KEY_quoteright: number; +export const KEY_r: number; +export const KEY_racute: number; +export const KEY_radical: number; +export const KEY_rcaron: number; +export const KEY_rcedilla: number; +export const KEY_registered: number; +export const KEY_rightanglebracket: number; +export const KEY_rightarrow: number; +export const KEY_rightcaret: number; +export const KEY_rightdoublequotemark: number; +export const KEY_rightmiddlecurlybrace: number; +export const KEY_rightmiddlesummation: number; +export const KEY_rightopentriangle: number; +export const KEY_rightpointer: number; +export const KEY_rightshoe: number; +export const KEY_rightsinglequotemark: number; +export const KEY_rightt: number; +export const KEY_righttack: number; +export const KEY_s: number; +export const KEY_sabovedot: number; +export const KEY_sacute: number; +export const KEY_scaron: number; +export const KEY_scedilla: number; +export const KEY_schwa: number; +export const KEY_scircumflex: number; +export const KEY_script_switch: number; +export const KEY_seconds: number; +export const KEY_section: number; +export const KEY_semicolon: number; +export const KEY_semivoicedsound: number; +export const KEY_seveneighths: number; +export const KEY_sevensubscript: number; +export const KEY_sevensuperior: number; +export const KEY_signaturemark: number; +export const KEY_signifblank: number; +export const KEY_similarequal: number; +export const KEY_singlelowquotemark: number; +export const KEY_sixsubscript: number; +export const KEY_sixsuperior: number; +export const KEY_slash: number; +export const KEY_soliddiamond: number; +export const KEY_space: number; +export const KEY_squareroot: number; +export const KEY_ssharp: number; +export const KEY_sterling: number; +export const KEY_stricteq: number; +export const KEY_t: number; +export const KEY_tabovedot: number; +export const KEY_tcaron: number; +export const KEY_tcedilla: number; +export const KEY_telephone: number; +export const KEY_telephonerecorder: number; +export const KEY_therefore: number; +export const KEY_thinspace: number; +export const KEY_thorn: number; +export const KEY_threeeighths: number; +export const KEY_threefifths: number; +export const KEY_threequarters: number; +export const KEY_threesubscript: number; +export const KEY_threesuperior: number; +export const KEY_tintegral: number; +export const KEY_topintegral: number; +export const KEY_topleftparens: number; +export const KEY_topleftradical: number; +export const KEY_topleftsqbracket: number; +export const KEY_topleftsummation: number; +export const KEY_toprightparens: number; +export const KEY_toprightsqbracket: number; +export const KEY_toprightsummation: number; +export const KEY_topt: number; +export const KEY_topvertsummationconnector: number; +export const KEY_trademark: number; +export const KEY_trademarkincircle: number; +export const KEY_tslash: number; +export const KEY_twofifths: number; +export const KEY_twosubscript: number; +export const KEY_twosuperior: number; +export const KEY_twothirds: number; +export const KEY_u: number; +export const KEY_uacute: number; +export const KEY_ubelowdot: number; +export const KEY_ubreve: number; +export const KEY_ucircumflex: number; +export const KEY_udiaeresis: number; +export const KEY_udoubleacute: number; +export const KEY_ugrave: number; +export const KEY_uhook: number; +export const KEY_uhorn: number; +export const KEY_uhornacute: number; +export const KEY_uhornbelowdot: number; +export const KEY_uhorngrave: number; +export const KEY_uhornhook: number; +export const KEY_uhorntilde: number; +export const KEY_umacron: number; +export const KEY_underbar: number; +export const KEY_underscore: number; +export const KEY_union: number; +export const KEY_uogonek: number; +export const KEY_uparrow: number; +export const KEY_upcaret: number; +export const KEY_upleftcorner: number; +export const KEY_uprightcorner: number; +export const KEY_upshoe: number; +export const KEY_upstile: number; +export const KEY_uptack: number; +export const KEY_uring: number; +export const KEY_utilde: number; +export const KEY_v: number; +export const KEY_variation: number; +export const KEY_vertbar: number; +export const KEY_vertconnector: number; +export const KEY_voicedsound: number; +export const KEY_vt: number; +export const KEY_w: number; +export const KEY_wacute: number; +export const KEY_wcircumflex: number; +export const KEY_wdiaeresis: number; +export const KEY_wgrave: number; +export const KEY_x: number; +export const KEY_xabovedot: number; +export const KEY_y: number; +export const KEY_yacute: number; +export const KEY_ybelowdot: number; +export const KEY_ycircumflex: number; +export const KEY_ydiaeresis: number; +export const KEY_yen: number; +export const KEY_ygrave: number; +export const KEY_yhook: number; +export const KEY_ytilde: number; +export const KEY_z: number; +export const KEY_zabovedot: number; +export const KEY_zacute: number; +export const KEY_zcaron: number; +export const KEY_zerosubscript: number; +export const KEY_zerosuperior: number; +export const KEY_zstroke: number; +export const NO_FPU: number; +export const PATH_RELATIVE: number; +export const PRIORITY_REDRAW: number; +export const STAGE_TYPE: string; +export const VIRTUAL_INPUT_DEVICE_MAX_TOUCH_SLOTS: number; +export function actor_box_alloc(): ActorBox; +export function cairo_clear(cr: cairo.Context): void; +export function cairo_set_source_color(cr: cairo.Context, color: Color): void; +export function color_from_hls(hue: number, luminance: number, saturation: number): Color; +export function color_from_pixel(pixel: number): Color; +export function color_from_string(str: string): [boolean, Color]; +export function color_get_static(color: StaticColor): Color; +export function container_class_find_child_property(klass: GObject.Object, property_name: string): GObject.ParamSpec; +export function container_class_list_child_properties(klass: GObject.Object): GObject.ParamSpec[]; +export function debug_set_max_render_time_constant(max_render_time_constant_us: number): void; +export function disable_accessibility(): void; +export function do_event(event: Event): void; +export function event_add_filter(stage: Stage | null, func: EventFilterFunc): number; +export function event_get(): Event; +export function event_remove_filter(id: number): void; +export function events_pending(): boolean; +export function feature_available(feature: FeatureFlags): boolean; +export function feature_get_all(): FeatureFlags; +export function get_accessibility_enabled(): boolean; +export function get_current_event(): Event; +export function get_current_event_time(): number; +export function get_debug_flags(debug_flags: DebugFlag, draw_flags: DrawDebugFlag, pick_flags: PickDebugFlag): void; +export function get_default_backend(): Backend; +export function get_default_text_direction(): TextDirection; +export function get_font_map(): Pango.FontMap; +export function get_script_id(gobject: GObject.Object): string; +export function image_error_quark(): GLib.Quark; +export function keysym_to_unicode(keyval: number): number; +export function script_error_quark(): GLib.Quark; +export function threads_add_idle(priority: number, func: GLib.SourceFunc): number; +export function threads_add_repaint_func(func: GLib.SourceFunc): number; +export function threads_add_repaint_func_full(flags: RepaintFlags, func: GLib.SourceFunc): number; +export function threads_add_timeout(priority: number, interval: number, func: GLib.SourceFunc): number; +export function threads_remove_repaint_func(handle_id: number): void; +export function unicode_to_keysym(wc: number): number; +export function units_from_cm(cm: number): Units; +export function units_from_em(em: number): Units; +export function units_from_em_for_font(font_name: string | null, em: number): Units; +export function units_from_mm(mm: number): Units; +export function units_from_pixels(px: number): Units; +export function units_from_pt(pt: number): Units; +export function units_from_string(str: string): [boolean, Units]; +export function value_dup_paint_node(value: GObject.Value | any): PaintNode; +export function value_get_color(value: GObject.Value | any): Color; +export function value_get_paint_node(value: GObject.Value | any): PaintNode; +export function value_get_shader_float(value: GObject.Value | any): number[]; +export function value_get_shader_int(value: GObject.Value | any): number[]; +export function value_get_shader_matrix(value: GObject.Value | any): number[]; +export function value_get_units(value: GObject.Value | any): Units; +export function value_set_color(value: GObject.Value | any, color: Color): void; +export function value_set_paint_node(value: GObject.Value | any, node?: PaintNode | null): void; +export function value_set_shader_float(value: GObject.Value | any, floats: number[]): void; +export function value_set_shader_int(value: GObject.Value | any, ints: number[]): void; +export function value_set_shader_matrix(value: GObject.Value | any, matrix: number[]): void; +export function value_set_units(value: GObject.Value | any, units: Units): void; +export function value_take_paint_node(value: GObject.Value | any, node?: PaintNode | null): void; +export type ActorCreateChildFunc = (item: A) => Actor; +export type BindingActionFunc = ( + gobject: A, + action_name: string, + key_val: number, + modifiers: ModifierType +) => boolean; +export type Callback = (actor: Actor) => void; +export type EventFilterFunc = (event: Event) => boolean; +export type PathCallback = (node: PathNode) => void; +export type ProgressFunc = ( + a: GObject.Value | any, + b: GObject.Value | any, + progress: number, + retval: GObject.Value | any +) => boolean; +export type ScriptConnectFunc = ( + script: Script, + object: A, + signal_name: string, + handler_name: string, + connect_object: B, + flags: GObject.ConnectFlags +) => void; +export type TimelineProgressFunc = (timeline: Timeline, elapsed: number, total: number) => number; + +export namespace ActorAlign { + export const $gtype: GObject.GType; +} + +export enum ActorAlign { + FILL = 0, + START = 1, + CENTER = 2, + END = 3, +} + +export namespace AlignAxis { + export const $gtype: GObject.GType; +} + +export enum AlignAxis { + X_AXIS = 0, + Y_AXIS = 1, + BOTH = 2, +} + +export namespace AnimationMode { + export const $gtype: GObject.GType; +} + +export enum AnimationMode { + CUSTOM_MODE = 0, + LINEAR = 1, + EASE_IN_QUAD = 2, + EASE_OUT_QUAD = 3, + EASE_IN_OUT_QUAD = 4, + EASE_IN_CUBIC = 5, + EASE_OUT_CUBIC = 6, + EASE_IN_OUT_CUBIC = 7, + EASE_IN_QUART = 8, + EASE_OUT_QUART = 9, + EASE_IN_OUT_QUART = 10, + EASE_IN_QUINT = 11, + EASE_OUT_QUINT = 12, + EASE_IN_OUT_QUINT = 13, + EASE_IN_SINE = 14, + EASE_OUT_SINE = 15, + EASE_IN_OUT_SINE = 16, + EASE_IN_EXPO = 17, + EASE_OUT_EXPO = 18, + EASE_IN_OUT_EXPO = 19, + EASE_IN_CIRC = 20, + EASE_OUT_CIRC = 21, + EASE_IN_OUT_CIRC = 22, + EASE_IN_ELASTIC = 23, + EASE_OUT_ELASTIC = 24, + EASE_IN_OUT_ELASTIC = 25, + EASE_IN_BACK = 26, + EASE_OUT_BACK = 27, + EASE_IN_OUT_BACK = 28, + EASE_IN_BOUNCE = 29, + EASE_OUT_BOUNCE = 30, + EASE_IN_OUT_BOUNCE = 31, + STEPS = 32, + STEP_START = 33, + STEP_END = 34, + CUBIC_BEZIER = 35, + EASE = 36, + EASE_IN = 37, + EASE_OUT = 38, + EASE_IN_OUT = 39, + ANIMATION_LAST = 40, +} + +export namespace BinAlignment { + export const $gtype: GObject.GType; +} + +export enum BinAlignment { + FIXED = 0, + FILL = 1, + START = 2, + END = 3, + CENTER = 4, +} + +export namespace BindCoordinate { + export const $gtype: GObject.GType; +} + +export enum BindCoordinate { + X = 0, + Y = 1, + WIDTH = 2, + HEIGHT = 3, + POSITION = 4, + SIZE = 5, + ALL = 6, +} + +export namespace BoxAlignment { + export const $gtype: GObject.GType; +} + +export enum BoxAlignment { + START = 0, + END = 1, + CENTER = 2, +} + +export namespace ButtonState { + export const $gtype: GObject.GType; +} + +export enum ButtonState { + RELEASED = 0, + PRESSED = 1, +} + +export namespace ContentGravity { + export const $gtype: GObject.GType; +} + +export enum ContentGravity { + TOP_LEFT = 0, + TOP = 1, + TOP_RIGHT = 2, + LEFT = 3, + CENTER = 4, + RIGHT = 5, + BOTTOM_LEFT = 6, + BOTTOM = 7, + BOTTOM_RIGHT = 8, + RESIZE_FILL = 9, + RESIZE_ASPECT = 10, +} + +export namespace DragAxis { + export const $gtype: GObject.GType; +} + +export enum DragAxis { + AXIS_NONE = 0, + X_AXIS = 1, + Y_AXIS = 2, +} + +export namespace EventPhase { + export const $gtype: GObject.GType; +} + +export enum EventPhase { + CAPTURE = 0, + BUBBLE = 1, +} + +export namespace EventType { + export const $gtype: GObject.GType; +} + +export enum EventType { + NOTHING = 0, + KEY_PRESS = 1, + KEY_RELEASE = 2, + MOTION = 3, + ENTER = 4, + LEAVE = 5, + BUTTON_PRESS = 6, + BUTTON_RELEASE = 7, + SCROLL = 8, + TOUCH_BEGIN = 9, + TOUCH_UPDATE = 10, + TOUCH_END = 11, + TOUCH_CANCEL = 12, + TOUCHPAD_PINCH = 13, + TOUCHPAD_SWIPE = 14, + TOUCHPAD_HOLD = 15, + PROXIMITY_IN = 16, + PROXIMITY_OUT = 17, + PAD_BUTTON_PRESS = 18, + PAD_BUTTON_RELEASE = 19, + PAD_STRIP = 20, + PAD_RING = 21, + DEVICE_ADDED = 22, + DEVICE_REMOVED = 23, + IM_COMMIT = 24, + IM_DELETE = 25, + IM_PREEDIT = 26, + EVENT_LAST = 27, +} + +export namespace FlowOrientation { + export const $gtype: GObject.GType; +} + +export enum FlowOrientation { + HORIZONTAL = 0, + VERTICAL = 1, +} + +export namespace FrameResult { + export const $gtype: GObject.GType; +} + +export enum FrameResult { + PENDING_PRESENTED = 0, + IDLE = 1, +} + +export namespace GestureTriggerEdge { + export const $gtype: GObject.GType; +} + +export enum GestureTriggerEdge { + NONE = 0, + AFTER = 1, + BEFORE = 2, +} + +export namespace Gravity { + export const $gtype: GObject.GType; +} + +export enum Gravity { + NONE = 0, + NORTH = 1, + NORTH_EAST = 2, + EAST = 3, + SOUTH_EAST = 4, + SOUTH = 5, + SOUTH_WEST = 6, + WEST = 7, + NORTH_WEST = 8, + CENTER = 9, +} + +export namespace GridPosition { + export const $gtype: GObject.GType; +} + +export enum GridPosition { + LEFT = 0, + RIGHT = 1, + TOP = 2, + BOTTOM = 3, +} + +export class ImageError extends GLib.Error { + static $gtype: GObject.GType; + + constructor(options: { message: string; code: number }); + constructor(copy: ImageError); + + // Fields + static DATA: number; + + // Members + static quark(): GLib.Quark; +} + +export namespace InputAxis { + export const $gtype: GObject.GType; +} + +export enum InputAxis { + IGNORE = 0, + X = 1, + Y = 2, + PRESSURE = 3, + XTILT = 4, + YTILT = 5, + WHEEL = 6, + DISTANCE = 7, + ROTATION = 8, + SLIDER = 9, + LAST = 10, +} + +export namespace InputContentPurpose { + export const $gtype: GObject.GType; +} + +export enum InputContentPurpose { + NORMAL = 0, + ALPHA = 1, + DIGITS = 2, + NUMBER = 3, + PHONE = 4, + URL = 5, + EMAIL = 6, + NAME = 7, + PASSWORD = 8, + DATE = 9, + TIME = 10, + DATETIME = 11, + TERMINAL = 12, +} + +export namespace InputDevicePadFeature { + export const $gtype: GObject.GType; +} + +export enum InputDevicePadFeature { + BUTTON = 0, + RING = 1, + STRIP = 2, +} + +export namespace InputDevicePadSource { + export const $gtype: GObject.GType; +} + +export enum InputDevicePadSource { + UNKNOWN = 0, + FINGER = 1, +} + +export namespace InputDeviceToolType { + export const $gtype: GObject.GType; +} + +export enum InputDeviceToolType { + NONE = 0, + PEN = 1, + ERASER = 2, + BRUSH = 3, + PENCIL = 4, + AIRBRUSH = 5, + MOUSE = 6, + LENS = 7, +} + +export namespace InputDeviceType { + export const $gtype: GObject.GType; +} + +export enum InputDeviceType { + POINTER_DEVICE = 0, + KEYBOARD_DEVICE = 1, + EXTENSION_DEVICE = 2, + JOYSTICK_DEVICE = 3, + TABLET_DEVICE = 4, + TOUCHPAD_DEVICE = 5, + TOUCHSCREEN_DEVICE = 6, + PEN_DEVICE = 7, + ERASER_DEVICE = 8, + CURSOR_DEVICE = 9, + PAD_DEVICE = 10, + N_DEVICE_TYPES = 11, +} + +export namespace InputMode { + export const $gtype: GObject.GType; +} + +export enum InputMode { + LOGICAL = 0, + PHYSICAL = 1, + FLOATING = 2, +} + +export namespace InputPanelState { + export const $gtype: GObject.GType; +} + +export enum InputPanelState { + OFF = 0, + ON = 1, + TOGGLE = 2, +} + +export namespace Interpolation { + export const $gtype: GObject.GType; +} + +export enum Interpolation { + LINEAR = 0, + CUBIC = 1, +} + +export namespace KeyState { + export const $gtype: GObject.GType; +} + +export enum KeyState { + RELEASED = 0, + PRESSED = 1, +} + +export namespace LongPressState { + export const $gtype: GObject.GType; +} + +export enum LongPressState { + QUERY = 0, + ACTIVATE = 1, + CANCEL = 2, +} + +export namespace Orientation { + export const $gtype: GObject.GType; +} + +export enum Orientation { + HORIZONTAL = 0, + VERTICAL = 1, +} + +export namespace PanAxis { + export const $gtype: GObject.GType; +} + +export enum PanAxis { + AXIS_NONE = 0, + X_AXIS = 1, + Y_AXIS = 2, + AXIS_AUTO = 3, +} + +export namespace PathNodeType { + export const $gtype: GObject.GType; +} + +export enum PathNodeType { + MOVE_TO = 0, + LINE_TO = 1, + CURVE_TO = 2, + CLOSE = 3, + REL_MOVE_TO = 32, + REL_LINE_TO = 33, + REL_CURVE_TO = 34, +} + +export namespace PickMode { + export const $gtype: GObject.GType; +} + +export enum PickMode { + NONE = 0, + REACTIVE = 1, + ALL = 2, +} + +export namespace PointerA11yDwellClickType { + export const $gtype: GObject.GType; +} + +export enum PointerA11yDwellClickType { + NONE = 0, + PRIMARY = 1, + SECONDARY = 2, + MIDDLE = 3, + DOUBLE = 4, + DRAG = 5, +} + +export namespace PointerA11yDwellDirection { + export const $gtype: GObject.GType; +} + +export enum PointerA11yDwellDirection { + NONE = 0, + LEFT = 1, + RIGHT = 2, + UP = 3, + DOWN = 4, +} + +export namespace PointerA11yDwellMode { + export const $gtype: GObject.GType; +} + +export enum PointerA11yDwellMode { + WINDOW = 0, + GESTURE = 1, +} + +export namespace PointerA11yTimeoutType { + export const $gtype: GObject.GType; +} + +export enum PointerA11yTimeoutType { + SECONDARY_CLICK = 0, + DWELL = 1, + GESTURE = 2, +} + +export namespace PreeditResetMode { + export const $gtype: GObject.GType; +} + +export enum PreeditResetMode { + CLEAR = 0, + COMMIT = 1, +} + +export namespace RequestMode { + export const $gtype: GObject.GType; +} + +export enum RequestMode { + HEIGHT_FOR_WIDTH = 0, + WIDTH_FOR_HEIGHT = 1, + CONTENT_SIZE = 2, +} + +export namespace RotateAxis { + export const $gtype: GObject.GType; +} + +export enum RotateAxis { + X_AXIS = 0, + Y_AXIS = 1, + Z_AXIS = 2, +} + +export namespace RotateDirection { + export const $gtype: GObject.GType; +} + +export enum RotateDirection { + CW = 0, + CCW = 1, +} + +export namespace ScalingFilter { + export const $gtype: GObject.GType; +} + +export enum ScalingFilter { + LINEAR = 0, + NEAREST = 1, + TRILINEAR = 2, +} + +export class ScriptError extends GLib.Error { + static $gtype: GObject.GType; + + constructor(options: { message: string; code: number }); + constructor(copy: ScriptError); + + // Fields + static TYPE_FUNCTION: number; + static PROPERTY: number; + static VALUE: number; + + // Members + static quark(): GLib.Quark; +} + +export namespace ScrollDirection { + export const $gtype: GObject.GType; +} + +export enum ScrollDirection { + UP = 0, + DOWN = 1, + LEFT = 2, + RIGHT = 3, + SMOOTH = 4, +} + +export namespace ScrollSource { + export const $gtype: GObject.GType; +} + +export enum ScrollSource { + UNKNOWN = 0, + WHEEL = 1, + FINGER = 2, + CONTINUOUS = 3, +} + +export namespace ShaderType { + export const $gtype: GObject.GType; +} + +export enum ShaderType { + VERTEX_SHADER = 0, + FRAGMENT_SHADER = 1, +} + +export namespace SnapEdge { + export const $gtype: GObject.GType; +} + +export enum SnapEdge { + TOP = 0, + RIGHT = 1, + BOTTOM = 2, + LEFT = 3, +} + +export namespace StaticColor { + export const $gtype: GObject.GType; +} + +export enum StaticColor { + WHITE = 0, + BLACK = 1, + RED = 2, + DARK_RED = 3, + GREEN = 4, + DARK_GREEN = 5, + BLUE = 6, + DARK_BLUE = 7, + CYAN = 8, + DARK_CYAN = 9, + MAGENTA = 10, + DARK_MAGENTA = 11, + YELLOW = 12, + DARK_YELLOW = 13, + GRAY = 14, + DARK_GRAY = 15, + LIGHT_GRAY = 16, + BUTTER = 17, + BUTTER_LIGHT = 18, + BUTTER_DARK = 19, + ORANGE = 20, + ORANGE_LIGHT = 21, + ORANGE_DARK = 22, + CHOCOLATE = 23, + CHOCOLATE_LIGHT = 24, + CHOCOLATE_DARK = 25, + CHAMELEON = 26, + CHAMELEON_LIGHT = 27, + CHAMELEON_DARK = 28, + SKY_BLUE = 29, + SKY_BLUE_LIGHT = 30, + SKY_BLUE_DARK = 31, + PLUM = 32, + PLUM_LIGHT = 33, + PLUM_DARK = 34, + SCARLET_RED = 35, + SCARLET_RED_LIGHT = 36, + SCARLET_RED_DARK = 37, + ALUMINIUM_1 = 38, + ALUMINIUM_2 = 39, + ALUMINIUM_3 = 40, + ALUMINIUM_4 = 41, + ALUMINIUM_5 = 42, + ALUMINIUM_6 = 43, + TRANSPARENT = 44, +} + +export namespace StepMode { + export const $gtype: GObject.GType; +} + +export enum StepMode { + START = 0, + END = 1, +} + +export namespace TextDirection { + export const $gtype: GObject.GType; +} + +export enum TextDirection { + DEFAULT = 0, + LTR = 1, + RTL = 2, +} + +export namespace TextureQuality { + export const $gtype: GObject.GType; +} + +export enum TextureQuality { + LOW = 0, + MEDIUM = 1, + HIGH = 2, +} + +export namespace TimelineDirection { + export const $gtype: GObject.GType; +} + +export enum TimelineDirection { + FORWARD = 0, + BACKWARD = 1, +} + +export namespace TouchpadGesturePhase { + export const $gtype: GObject.GType; +} + +export enum TouchpadGesturePhase { + BEGIN = 0, + UPDATE = 1, + END = 2, + CANCEL = 3, +} + +export namespace UnitType { + export const $gtype: GObject.GType; +} + +export enum UnitType { + PIXEL = 0, + EM = 1, + MM = 2, + POINT = 3, + CM = 4, +} + +export namespace ActorFlags { + export const $gtype: GObject.GType; +} + +export enum ActorFlags { + MAPPED = 2, + REALIZED = 4, + REACTIVE = 8, + VISIBLE = 16, + NO_LAYOUT = 32, +} + +export namespace ContentRepeat { + export const $gtype: GObject.GType; +} + +export enum ContentRepeat { + NONE = 0, + X_AXIS = 1, + Y_AXIS = 2, + BOTH = 3, +} + +export namespace DebugFlag { + export const $gtype: GObject.GType; +} + +export enum DebugFlag { + MISC = 1, + ACTOR = 2, + TEXTURE = 4, + EVENT = 8, + PAINT = 16, + PANGO = 32, + BACKEND = 64, + SCHEDULER = 128, + SCRIPT = 256, + SHADER = 512, + MULTISTAGE = 1024, + ANIMATION = 2048, + LAYOUT = 4096, + PICK = 8192, + EVENTLOOP = 16384, + CLIPPING = 32768, + OOB_TRANSFORMS = 65536, + FRAME_TIMINGS = 131072, + DETAILED_TRACE = 262144, +} + +export namespace DrawDebugFlag { + export const $gtype: GObject.GType; +} + +export enum DrawDebugFlag { + DISABLE_SWAP_EVENTS = 1, + DISABLE_CLIPPED_REDRAWS = 2, + REDRAWS = 4, + PAINT_VOLUMES = 8, + DISABLE_CULLING = 16, + DISABLE_OFFSCREEN_REDIRECT = 32, + CONTINUOUS_REDRAW = 64, + PAINT_DEFORM_TILES = 128, + PAINT_DAMAGE_REGION = 256, + DISABLE_DYNAMIC_MAX_RENDER_TIME = 512, + PAINT_MAX_RENDER_TIME = 1024, +} + +export namespace EffectPaintFlags { + export const $gtype: GObject.GType; +} + +export enum EffectPaintFlags { + ACTOR_DIRTY = 1, + BYPASS_EFFECT = 2, +} + +export namespace EventFlags { + export const $gtype: GObject.GType; +} + +export enum EventFlags { + NONE = 0, + FLAG_SYNTHETIC = 1, + FLAG_INPUT_METHOD = 2, + FLAG_REPEATED = 4, + FLAG_RELATIVE_MOTION = 8, + FLAG_GRAB_NOTIFY = 16, +} + +export namespace FeatureFlags { + export const $gtype: GObject.GType; +} + +export enum FeatureFlags { + GLSL = 512, +} + +export namespace FrameInfoFlag { + export const $gtype: GObject.GType; +} + +export enum FrameInfoFlag { + NONE = 0, + HW_CLOCK = 1, + ZERO_COPY = 2, + VSYNC = 4, +} + +export namespace GrabState { + export const $gtype: GObject.GType; +} + +export enum GrabState { + NONE = 0, + POINTER = 1, + KEYBOARD = 2, + ALL = 3, +} + +export namespace InputAxisFlags { + export const $gtype: GObject.GType; +} + +export enum InputAxisFlags { + NONE = 0, + X = 2, + Y = 4, + PRESSURE = 8, + XTILT = 16, + YTILT = 32, + WHEEL = 64, + DISTANCE = 128, + ROTATION = 256, + SLIDER = 512, +} + +export namespace InputCapabilities { + export const $gtype: GObject.GType; +} + +export enum InputCapabilities { + NONE = 0, + POINTER = 1, + KEYBOARD = 2, + TOUCHPAD = 4, + TOUCH = 8, + TABLET_TOOL = 16, + TABLET_PAD = 32, +} + +export namespace InputContentHintFlags { + export const $gtype: GObject.GType; +} + +export enum InputContentHintFlags { + COMPLETION = 1, + SPELLCHECK = 2, + AUTO_CAPITALIZATION = 4, + LOWERCASE = 8, + UPPERCASE = 16, + TITLECASE = 32, + HIDDEN_TEXT = 64, + SENSITIVE_DATA = 128, + LATIN = 256, + MULTILINE = 512, +} + +export namespace ModifierType { + export const $gtype: GObject.GType; +} + +export enum ModifierType { + SHIFT_MASK = 1, + LOCK_MASK = 2, + CONTROL_MASK = 4, + MOD1_MASK = 8, + MOD2_MASK = 16, + MOD3_MASK = 32, + MOD4_MASK = 64, + MOD5_MASK = 128, + BUTTON1_MASK = 256, + BUTTON2_MASK = 512, + BUTTON3_MASK = 1024, + BUTTON4_MASK = 2048, + BUTTON5_MASK = 4096, + MODIFIER_RESERVED_13_MASK = 8192, + MODIFIER_RESERVED_14_MASK = 16384, + MODIFIER_RESERVED_15_MASK = 32768, + MODIFIER_RESERVED_16_MASK = 65536, + MODIFIER_RESERVED_17_MASK = 131072, + MODIFIER_RESERVED_18_MASK = 262144, + MODIFIER_RESERVED_19_MASK = 524288, + MODIFIER_RESERVED_20_MASK = 1048576, + MODIFIER_RESERVED_21_MASK = 2097152, + MODIFIER_RESERVED_22_MASK = 4194304, + MODIFIER_RESERVED_23_MASK = 8388608, + MODIFIER_RESERVED_24_MASK = 16777216, + MODIFIER_RESERVED_25_MASK = 33554432, + SUPER_MASK = 67108864, + HYPER_MASK = 134217728, + META_MASK = 268435456, + MODIFIER_RESERVED_29_MASK = 536870912, + RELEASE_MASK = 1073741824, + MODIFIER_MASK = 1543512063, +} + +export namespace OffscreenRedirect { + export const $gtype: GObject.GType; +} + +export enum OffscreenRedirect { + AUTOMATIC_FOR_OPACITY = 1, + ALWAYS = 2, + ON_IDLE = 4, +} + +export namespace PaintFlag { + export const $gtype: GObject.GType; +} + +export enum PaintFlag { + NONE = 0, + NO_CURSORS = 1, + FORCE_CURSORS = 2, + CLEAR = 4, +} + +export namespace PickDebugFlag { + export const $gtype: GObject.GType; +} + +export enum PickDebugFlag { + PICKING = 1, +} + +export namespace PointerA11yFlags { + export const $gtype: GObject.GType; +} + +export enum PointerA11yFlags { + SECONDARY_CLICK_ENABLED = 1, + DWELL_ENABLED = 2, +} + +export namespace RepaintFlags { + export const $gtype: GObject.GType; +} + +export enum RepaintFlags { + PRE_PAINT = 1, + POST_PAINT = 2, +} + +export namespace ScrollFinishFlags { + export const $gtype: GObject.GType; +} + +export enum ScrollFinishFlags { + NONE = 0, + HORIZONTAL = 1, + VERTICAL = 2, +} + +export namespace ScrollMode { + export const $gtype: GObject.GType; +} + +export enum ScrollMode { + NONE = 0, + HORIZONTALLY = 1, + VERTICALLY = 2, + BOTH = 3, +} + +export namespace SwipeDirection { + export const $gtype: GObject.GType; +} + +export enum SwipeDirection { + UP = 1, + DOWN = 2, + LEFT = 4, + RIGHT = 8, +} + +export namespace TextureFlags { + export const $gtype: GObject.GType; +} + +export enum TextureFlags { + NONE = 0, + RGB_FLAG_BGR = 2, + RGB_FLAG_PREMULT = 4, + YUV_FLAG_YUV2 = 8, +} + +export namespace VirtualDeviceType { + export const $gtype: GObject.GType; +} + +export enum VirtualDeviceType { + NONE = 0, + KEYBOARD = 1, + POINTER = 2, + TOUCHSCREEN = 4, +} +export module Action { + export interface ConstructorProperties extends ActorMeta.ConstructorProperties { + [key: string]: any; + } +} +export abstract class Action extends ActorMeta { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Members + + get_phase(): EventPhase; + vfunc_handle_event(event: Event): boolean; +} +export module Actor { + export interface ConstructorProperties + extends GObject.InitiallyUnowned.ConstructorProperties { + [key: string]: any; + actions: Action; + allocation: ActorBox; + background_color: Color; + backgroundColor: Color; + background_color_set: boolean; + backgroundColorSet: boolean; + child_transform: Graphene.Matrix; + childTransform: Graphene.Matrix; + child_transform_set: boolean; + childTransformSet: boolean; + clip_rect: Graphene.Rect; + clipRect: Graphene.Rect; + clip_to_allocation: boolean; + clipToAllocation: boolean; + constraints: Constraint; + content: B; + content_box: ActorBox; + contentBox: ActorBox; + content_gravity: ContentGravity; + contentGravity: ContentGravity; + content_repeat: ContentRepeat; + contentRepeat: ContentRepeat; + effect: Effect; + first_child: Actor; + firstChild: Actor; + fixed_position_set: boolean; + fixedPositionSet: boolean; + fixed_x: number; + fixedX: number; + fixed_y: number; + fixedY: number; + has_clip: boolean; + hasClip: boolean; + has_pointer: boolean; + hasPointer: boolean; + height: number; + last_child: Actor; + lastChild: Actor; + layout_manager: A; + layoutManager: A; + magnification_filter: ScalingFilter; + magnificationFilter: ScalingFilter; + mapped: boolean; + margin_bottom: number; + marginBottom: number; + margin_left: number; + marginLeft: number; + margin_right: number; + marginRight: number; + margin_top: number; + marginTop: number; + min_height: number; + minHeight: number; + min_height_set: boolean; + minHeightSet: boolean; + min_width: number; + minWidth: number; + min_width_set: boolean; + minWidthSet: boolean; + minification_filter: ScalingFilter; + minificationFilter: ScalingFilter; + name: string; + natural_height: number; + naturalHeight: number; + natural_height_set: boolean; + naturalHeightSet: boolean; + natural_width: number; + naturalWidth: number; + natural_width_set: boolean; + naturalWidthSet: boolean; + offscreen_redirect: OffscreenRedirect; + offscreenRedirect: OffscreenRedirect; + opacity: number; + pivot_point: Graphene.Point; + pivotPoint: Graphene.Point; + pivot_point_z: number; + pivotPointZ: number; + position: Graphene.Point; + reactive: boolean; + realized: boolean; + request_mode: RequestMode; + requestMode: RequestMode; + rotation_angle_x: number; + rotationAngleX: number; + rotation_angle_y: number; + rotationAngleY: number; + rotation_angle_z: number; + rotationAngleZ: number; + scale_x: number; + scaleX: number; + scale_y: number; + scaleY: number; + scale_z: number; + scaleZ: number; + show_on_set_parent: boolean; + showOnSetParent: boolean; + size: Graphene.Size; + text_direction: TextDirection; + textDirection: TextDirection; + transform: Graphene.Matrix; + transform_set: boolean; + transformSet: boolean; + translation_x: number; + translationX: number; + translation_y: number; + translationY: number; + translation_z: number; + translationZ: number; + visible: boolean; + width: number; + x: number; + x_align: ActorAlign; + xAlign: ActorAlign; + x_expand: boolean; + xExpand: boolean; + y: number; + y_align: ActorAlign; + yAlign: ActorAlign; + y_expand: boolean; + yExpand: boolean; + z_position: number; + zPosition: number; + } +} +export class Actor + extends GObject.InitiallyUnowned + implements Atk.ImplementorIface, Animatable, Container, Scriptable +{ + static $gtype: GObject.GType; + + constructor(properties?: Partial>, ...args: any[]); + _init(properties?: Partial>, ...args: any[]): void; + + // Properties + set actions(val: Action); + get allocation(): ActorBox; + get background_color(): Color; + set background_color(val: Color); + get backgroundColor(): Color; + set backgroundColor(val: Color); + get background_color_set(): boolean; + get backgroundColorSet(): boolean; + get child_transform(): Graphene.Matrix; + set child_transform(val: Graphene.Matrix); + get childTransform(): Graphene.Matrix; + set childTransform(val: Graphene.Matrix); + get child_transform_set(): boolean; + get childTransformSet(): boolean; + get clip_rect(): Graphene.Rect; + set clip_rect(val: Graphene.Rect); + get clipRect(): Graphene.Rect; + set clipRect(val: Graphene.Rect); + get clip_to_allocation(): boolean; + set clip_to_allocation(val: boolean); + get clipToAllocation(): boolean; + set clipToAllocation(val: boolean); + set constraints(val: Constraint); + get content(): B; + set content(val: B); + get content_box(): ActorBox; + get contentBox(): ActorBox; + get content_gravity(): ContentGravity; + set content_gravity(val: ContentGravity); + get contentGravity(): ContentGravity; + set contentGravity(val: ContentGravity); + get content_repeat(): ContentRepeat; + set content_repeat(val: ContentRepeat); + get contentRepeat(): ContentRepeat; + set contentRepeat(val: ContentRepeat); + set effect(val: Effect); + get first_child(): Actor; + get firstChild(): Actor; + get fixed_position_set(): boolean; + set fixed_position_set(val: boolean); + get fixedPositionSet(): boolean; + set fixedPositionSet(val: boolean); + get fixed_x(): number; + set fixed_x(val: number); + get fixedX(): number; + set fixedX(val: number); + get fixed_y(): number; + set fixed_y(val: number); + get fixedY(): number; + set fixedY(val: number); + get has_clip(): boolean; + get hasClip(): boolean; + get has_pointer(): boolean; + get hasPointer(): boolean; + get height(): number; + set height(val: number); + get last_child(): Actor; + get lastChild(): Actor; + get layout_manager(): A; + set layout_manager(val: A); + get layoutManager(): A; + set layoutManager(val: A); + get magnification_filter(): ScalingFilter; + set magnification_filter(val: ScalingFilter); + get magnificationFilter(): ScalingFilter; + set magnificationFilter(val: ScalingFilter); + get mapped(): boolean; + get margin_bottom(): number; + set margin_bottom(val: number); + get marginBottom(): number; + set marginBottom(val: number); + get margin_left(): number; + set margin_left(val: number); + get marginLeft(): number; + set marginLeft(val: number); + get margin_right(): number; + set margin_right(val: number); + get marginRight(): number; + set marginRight(val: number); + get margin_top(): number; + set margin_top(val: number); + get marginTop(): number; + set marginTop(val: number); + get min_height(): number; + set min_height(val: number); + get minHeight(): number; + set minHeight(val: number); + get min_height_set(): boolean; + set min_height_set(val: boolean); + get minHeightSet(): boolean; + set minHeightSet(val: boolean); + get min_width(): number; + set min_width(val: number); + get minWidth(): number; + set minWidth(val: number); + get min_width_set(): boolean; + set min_width_set(val: boolean); + get minWidthSet(): boolean; + set minWidthSet(val: boolean); + get minification_filter(): ScalingFilter; + set minification_filter(val: ScalingFilter); + get minificationFilter(): ScalingFilter; + set minificationFilter(val: ScalingFilter); + get name(): string; + set name(val: string); + get natural_height(): number; + set natural_height(val: number); + get naturalHeight(): number; + set naturalHeight(val: number); + get natural_height_set(): boolean; + set natural_height_set(val: boolean); + get naturalHeightSet(): boolean; + set naturalHeightSet(val: boolean); + get natural_width(): number; + set natural_width(val: number); + get naturalWidth(): number; + set naturalWidth(val: number); + get natural_width_set(): boolean; + set natural_width_set(val: boolean); + get naturalWidthSet(): boolean; + set naturalWidthSet(val: boolean); + get offscreen_redirect(): OffscreenRedirect; + set offscreen_redirect(val: OffscreenRedirect); + get offscreenRedirect(): OffscreenRedirect; + set offscreenRedirect(val: OffscreenRedirect); + get opacity(): number; + set opacity(val: number); + get pivot_point(): Graphene.Point; + set pivot_point(val: Graphene.Point); + get pivotPoint(): Graphene.Point; + set pivotPoint(val: Graphene.Point); + get pivot_point_z(): number; + set pivot_point_z(val: number); + get pivotPointZ(): number; + set pivotPointZ(val: number); + get position(): Graphene.Point; + set position(val: Graphene.Point); + get reactive(): boolean; + set reactive(val: boolean); + get realized(): boolean; + get request_mode(): RequestMode; + set request_mode(val: RequestMode); + get requestMode(): RequestMode; + set requestMode(val: RequestMode); + get rotation_angle_x(): number; + set rotation_angle_x(val: number); + get rotationAngleX(): number; + set rotationAngleX(val: number); + get rotation_angle_y(): number; + set rotation_angle_y(val: number); + get rotationAngleY(): number; + set rotationAngleY(val: number); + get rotation_angle_z(): number; + set rotation_angle_z(val: number); + get rotationAngleZ(): number; + set rotationAngleZ(val: number); + get scale_x(): number; + set scale_x(val: number); + get scaleX(): number; + set scaleX(val: number); + get scale_y(): number; + set scale_y(val: number); + get scaleY(): number; + set scaleY(val: number); + get scale_z(): number; + set scale_z(val: number); + get scaleZ(): number; + set scaleZ(val: number); + get show_on_set_parent(): boolean; + set show_on_set_parent(val: boolean); + get showOnSetParent(): boolean; + set showOnSetParent(val: boolean); + get size(): Graphene.Size; + set size(val: Graphene.Size); + get text_direction(): TextDirection; + set text_direction(val: TextDirection); + get textDirection(): TextDirection; + set textDirection(val: TextDirection); + get transform(): Graphene.Matrix; + set transform(val: Graphene.Matrix); + get transform_set(): boolean; + get transformSet(): boolean; + get translation_x(): number; + set translation_x(val: number); + get translationX(): number; + set translationX(val: number); + get translation_y(): number; + set translation_y(val: number); + get translationY(): number; + set translationY(val: number); + get translation_z(): number; + set translation_z(val: number); + get translationZ(): number; + set translationZ(val: number); + get visible(): boolean; + set visible(val: boolean); + get width(): number; + set width(val: number); + get x(): number; + set x(val: number); + get x_align(): ActorAlign; + set x_align(val: ActorAlign); + get xAlign(): ActorAlign; + set xAlign(val: ActorAlign); + get x_expand(): boolean; + set x_expand(val: boolean); + get xExpand(): boolean; + set xExpand(val: boolean); + get y(): number; + set y(val: number); + get y_align(): ActorAlign; + set y_align(val: ActorAlign); + get yAlign(): ActorAlign; + set yAlign(val: ActorAlign); + get y_expand(): boolean; + set y_expand(val: boolean); + get yExpand(): boolean; + set yExpand(val: boolean); + get z_position(): number; + set z_position(val: number); + get zPosition(): number; + set zPosition(val: number); + + // Fields + flags: number; + + // Signals + + connect(id: string, callback: (...args: any[]) => any): number; + connect_after(id: string, callback: (...args: any[]) => any): number; + emit(id: string, ...args: any[]): void; + connect(signal: "button-press-event", callback: (_source: this, event: ButtonEvent) => boolean): number; + connect_after(signal: "button-press-event", callback: (_source: this, event: ButtonEvent) => boolean): number; + emit(signal: "button-press-event", event: ButtonEvent): void; + connect(signal: "button-release-event", callback: (_source: this, event: ButtonEvent) => boolean): number; + connect_after(signal: "button-release-event", callback: (_source: this, event: ButtonEvent) => boolean): number; + emit(signal: "button-release-event", event: ButtonEvent): void; + connect(signal: "captured-event", callback: (_source: this, event: Event) => boolean): number; + connect_after(signal: "captured-event", callback: (_source: this, event: Event) => boolean): number; + emit(signal: "captured-event", event: Event): void; + connect(signal: "destroy", callback: (_source: this) => void): number; + connect_after(signal: "destroy", callback: (_source: this) => void): number; + emit(signal: "destroy"): void; + connect(signal: "enter-event", callback: (_source: this, event: CrossingEvent) => boolean): number; + connect_after(signal: "enter-event", callback: (_source: this, event: CrossingEvent) => boolean): number; + emit(signal: "enter-event", event: CrossingEvent): void; + connect(signal: "event", callback: (_source: this, event: Event) => boolean): number; + connect_after(signal: "event", callback: (_source: this, event: Event) => boolean): number; + emit(signal: "event", event: Event): void; + connect(signal: "hide", callback: (_source: this) => void): number; + connect_after(signal: "hide", callback: (_source: this) => void): number; + emit(signal: "hide"): void; + connect(signal: "key-focus-in", callback: (_source: this) => void): number; + connect_after(signal: "key-focus-in", callback: (_source: this) => void): number; + emit(signal: "key-focus-in"): void; + connect(signal: "key-focus-out", callback: (_source: this) => void): number; + connect_after(signal: "key-focus-out", callback: (_source: this) => void): number; + emit(signal: "key-focus-out"): void; + connect(signal: "key-press-event", callback: (_source: this, event: KeyEvent) => boolean): number; + connect_after(signal: "key-press-event", callback: (_source: this, event: KeyEvent) => boolean): number; + emit(signal: "key-press-event", event: KeyEvent): void; + connect(signal: "key-release-event", callback: (_source: this, event: KeyEvent) => boolean): number; + connect_after(signal: "key-release-event", callback: (_source: this, event: KeyEvent) => boolean): number; + emit(signal: "key-release-event", event: KeyEvent): void; + connect(signal: "leave-event", callback: (_source: this, event: CrossingEvent) => boolean): number; + connect_after(signal: "leave-event", callback: (_source: this, event: CrossingEvent) => boolean): number; + emit(signal: "leave-event", event: CrossingEvent): void; + connect(signal: "motion-event", callback: (_source: this, event: MotionEvent) => boolean): number; + connect_after(signal: "motion-event", callback: (_source: this, event: MotionEvent) => boolean): number; + emit(signal: "motion-event", event: MotionEvent): void; + connect(signal: "parent-set", callback: (_source: this, old_parent: Actor | null) => void): number; + connect_after(signal: "parent-set", callback: (_source: this, old_parent: Actor | null) => void): number; + emit(signal: "parent-set", old_parent: Actor | null): void; + connect(signal: "pick", callback: (_source: this, pick_context: PickContext) => void): number; + connect_after(signal: "pick", callback: (_source: this, pick_context: PickContext) => void): number; + emit(signal: "pick", pick_context: PickContext): void; + connect(signal: "queue-relayout", callback: (_source: this) => void): number; + connect_after(signal: "queue-relayout", callback: (_source: this) => void): number; + emit(signal: "queue-relayout"): void; + connect(signal: "realize", callback: (_source: this) => void): number; + connect_after(signal: "realize", callback: (_source: this) => void): number; + emit(signal: "realize"): void; + connect(signal: "resource-scale-changed", callback: (_source: this) => void): number; + connect_after(signal: "resource-scale-changed", callback: (_source: this) => void): number; + emit(signal: "resource-scale-changed"): void; + connect(signal: "scroll-event", callback: (_source: this, event: ScrollEvent) => boolean): number; + connect_after(signal: "scroll-event", callback: (_source: this, event: ScrollEvent) => boolean): number; + emit(signal: "scroll-event", event: ScrollEvent): void; + connect(signal: "show", callback: (_source: this) => void): number; + connect_after(signal: "show", callback: (_source: this) => void): number; + emit(signal: "show"): void; + connect(signal: "stage-views-changed", callback: (_source: this) => void): number; + connect_after(signal: "stage-views-changed", callback: (_source: this) => void): number; + emit(signal: "stage-views-changed"): void; + connect(signal: "touch-event", callback: (_source: this, event: Event) => boolean): number; + connect_after(signal: "touch-event", callback: (_source: this, event: Event) => boolean): number; + emit(signal: "touch-event", event: Event): void; + connect( + signal: "transition-stopped", + callback: (_source: this, name: string, is_finished: boolean) => void + ): number; + connect_after( + signal: "transition-stopped", + callback: (_source: this, name: string, is_finished: boolean) => void + ): number; + emit(signal: "transition-stopped", name: string, is_finished: boolean): void; + connect(signal: "transitions-completed", callback: (_source: this) => void): number; + connect_after(signal: "transitions-completed", callback: (_source: this) => void): number; + emit(signal: "transitions-completed"): void; + connect(signal: "unrealize", callback: (_source: this) => void): number; + connect_after(signal: "unrealize", callback: (_source: this) => void): number; + emit(signal: "unrealize"): void; + + // Constructors + + static ["new"](): Actor; + + // Members + + add_action(action: Action): void; + add_action_full(name: string, phase: EventPhase, action: Action): void; + add_action_with_name(name: string, action: Action): void; + add_child(child: Actor): void; + add_constraint(constraint: Constraint): void; + add_constraint_with_name(name: string, constraint: Constraint): void; + add_effect(effect: Effect): void; + add_effect_with_name(name: string, effect: Effect): void; + add_transition(name: string, transition: Transition): void; + allocate(box: ActorBox): void; + allocate_align_fill(box: ActorBox, x_align: number, y_align: number, x_fill: boolean, y_fill: boolean): void; + allocate_available_size(x: number, y: number, available_width: number, available_height: number): void; + allocate_preferred_size(x: number, y: number): void; + apply_relative_transform_to_point(ancestor: Actor | null, point: Graphene.Point3D): Graphene.Point3D; + apply_transform_to_point(point: Graphene.Point3D): Graphene.Point3D; + bind_model(model: Gio.ListModel | null, create_child_func: ActorCreateChildFunc): void; + clear_actions(): void; + clear_constraints(): void; + clear_effects(): void; + contains(descendant: Actor): boolean; + continue_paint(paint_context: PaintContext): void; + continue_pick(pick_context: PickContext): void; + create_pango_context(): Pango.Context; + create_pango_layout(text?: string | null): Pango.Layout; + destroy(): void; + destroy_all_children(): void; + event(event: Event, capture: boolean): boolean; + get_abs_allocation_vertices(): Graphene.Point3D[]; + get_accessible(): Atk.Object; + get_action(name: string): Action | null; + get_actions(): Action[]; + get_allocation_box(): ActorBox; + get_background_color(): Color; + get_child_at_index(index_: number): Actor | null; + get_child_transform(): Graphene.Matrix; + get_children(): Actor[]; + get_clip(): [number | null, number | null, number | null, number | null]; + get_clip_to_allocation(): boolean; + get_constraint(name: string): Constraint | null; + get_constraints(): Constraint[]; + get_content(): B | null; + get_content_box(): ActorBox; + get_content_gravity(): ContentGravity; + get_content_repeat(): ContentRepeat; + get_content_scaling_filters(): [ScalingFilter | null, ScalingFilter | null]; + get_default_paint_volume(): PaintVolume | null; + get_easing_delay(): number; + get_easing_duration(): number; + get_easing_mode(): AnimationMode; + get_effect(name: string): Effect | null; + get_effects(): Effect[]; + get_first_child(): Actor | null; + get_fixed_position(): [boolean, number | null, number | null]; + get_fixed_position_set(): boolean; + get_flags(): ActorFlags; + get_height(): number; + get_last_child(): Actor | null; + get_layout_manager(): A | null; + get_margin(): Margin; + get_margin_bottom(): number; + get_margin_left(): number; + get_margin_right(): number; + get_margin_top(): number; + get_n_children(): number; + get_name(): string | null; + get_next_sibling(): Actor | null; + get_offscreen_redirect(): OffscreenRedirect; + get_opacity(): number; + get_opacity_override(): number; + get_paint_box(): [boolean, ActorBox]; + get_paint_opacity(): number; + get_paint_visibility(): boolean; + get_paint_volume(): PaintVolume | null; + get_pango_context(): Pango.Context; + get_parent(): Actor | null; + get_pivot_point(): [number | null, number | null]; + get_pivot_point_z(): number; + get_position(): [number | null, number | null]; + get_preferred_height(for_width: number): [number | null, number | null]; + get_preferred_size(): [number | null, number | null, number | null, number | null]; + get_preferred_width(for_height: number): [number | null, number | null]; + get_previous_sibling(): Actor | null; + get_reactive(): boolean; + get_request_mode(): RequestMode; + get_resource_scale(): number; + get_rotation_angle(axis: RotateAxis): number; + get_scale(): [number | null, number | null]; + get_scale_z(): number; + get_size(): [number | null, number | null]; + get_stage(): Stage; + get_text_direction(): TextDirection; + get_transform(): Graphene.Matrix; + get_transformed_extents(): Graphene.Rect; + get_transformed_paint_volume(relative_to_ancestor: Actor): PaintVolume | null; + get_transformed_position(): [number | null, number | null]; + get_transformed_size(): [number | null, number | null]; + get_transition(name: string): Transition | null; + get_translation(): [number | null, number | null, number | null]; + get_width(): number; + get_x(): number; + get_x_align(): ActorAlign; + get_x_expand(): boolean; + get_y(): number; + get_y_align(): ActorAlign; + get_y_expand(): boolean; + get_z_position(): number; + grab_key_focus(): void; + has_accessible(): boolean; + has_actions(): boolean; + has_allocation(): boolean; + has_constraints(): boolean; + has_damage(): boolean; + has_effects(): boolean; + has_key_focus(): boolean; + has_mapped_clones(): boolean; + has_overlaps(): boolean; + hide(): void; + inhibit_culling(): void; + insert_child_above(child: Actor, sibling?: Actor | null): void; + insert_child_at_index(child: Actor, index_: number): void; + insert_child_below(child: Actor, sibling?: Actor | null): void; + invalidate_paint_volume(): void; + invalidate_transform(): void; + is_effectively_on_stage_view(view: StageView): boolean; + is_in_clone_paint(): boolean; + is_mapped(): boolean; + is_realized(): boolean; + is_rotated(): boolean; + is_scaled(): boolean; + is_visible(): boolean; + map(): void; + move_by(dx: number, dy: number): void; + needs_expand(orientation: Orientation): boolean; + paint(paint_context: PaintContext): void; + peek_stage_views(): StageView[]; + pick(pick_context: PickContext): void; + pick_box(pick_context: PickContext, box: ActorBox): void; + queue_redraw(): void; + queue_redraw_with_clip(clip?: cairo.RectangleInt | null): void; + queue_relayout(): void; + realize(): void; + remove_action(action: Action): void; + remove_action_by_name(name: string): void; + remove_all_children(): void; + remove_all_transitions(): void; + remove_child(child: Actor): void; + remove_clip(): void; + remove_constraint(constraint: Constraint): void; + remove_constraint_by_name(name: string): void; + remove_effect(effect: Effect): void; + remove_effect_by_name(name: string): void; + remove_transition(name: string): void; + replace_child(old_child: Actor, new_child: Actor): void; + restore_easing_state(): void; + save_easing_state(): void; + set_allocation(box: ActorBox): void; + set_background_color(color?: Color | null): void; + set_child_above_sibling(child: Actor, sibling?: Actor | null): void; + set_child_at_index(child: Actor, index_: number): void; + set_child_below_sibling(child: Actor, sibling?: Actor | null): void; + set_child_transform(transform?: Graphene.Matrix | null): void; + set_clip(xoff: number, yoff: number, width: number, height: number): void; + set_clip_to_allocation(clip_set: boolean): void; + set_content(content?: B | null): void; + set_content_gravity(gravity: ContentGravity): void; + set_content_repeat(repeat: ContentRepeat): void; + set_content_scaling_filters(min_filter: ScalingFilter, mag_filter: ScalingFilter): void; + set_easing_delay(msecs: number): void; + set_easing_duration(msecs: number): void; + set_easing_mode(mode: AnimationMode): void; + set_fixed_position_set(is_set: boolean): void; + set_flags(flags: ActorFlags): void; + set_height(height: number): void; + set_layout_manager(manager?: A | null): void; + set_margin(margin: Margin): void; + set_margin_bottom(margin: number): void; + set_margin_left(margin: number): void; + set_margin_right(margin: number): void; + set_margin_top(margin: number): void; + set_name(name?: string | null): void; + set_offscreen_redirect(redirect: OffscreenRedirect): void; + set_opacity(opacity: number): void; + set_opacity_override(opacity: number): void; + set_pivot_point(pivot_x: number, pivot_y: number): void; + set_pivot_point_z(pivot_z: number): void; + set_position(x: number, y: number): void; + set_reactive(reactive: boolean): void; + set_request_mode(mode: RequestMode): void; + set_rotation_angle(axis: RotateAxis, angle: number): void; + set_scale(scale_x: number, scale_y: number): void; + set_scale_z(scale_z: number): void; + set_size(width: number, height: number): void; + set_text_direction(text_dir: TextDirection): void; + set_transform(transform?: Graphene.Matrix | null): void; + set_translation(translate_x: number, translate_y: number, translate_z: number): void; + set_width(width: number): void; + set_x(x: number): void; + set_x_align(x_align: ActorAlign): void; + set_x_expand(expand: boolean): void; + set_y(y: number): void; + set_y_align(y_align: ActorAlign): void; + set_y_expand(expand: boolean): void; + set_z_position(z_position: number): void; + should_pick(pick_context: PickContext): boolean; + show(): void; + transform_stage_point(x: number, y: number): [boolean, number | null, number | null]; + uninhibit_culling(): void; + unmap(): void; + unrealize(): void; + unset_flags(flags: ActorFlags): void; + vfunc_allocate(box: ActorBox): void; + vfunc_apply_transform(matrix: Graphene.Matrix): void; + vfunc_button_press_event(event: ButtonEvent): boolean; + vfunc_button_release_event(event: ButtonEvent): boolean; + vfunc_calculate_resource_scale(phase: number): number; + vfunc_captured_event(event: Event): boolean; + vfunc_destroy(): void; + vfunc_enter_event(event: CrossingEvent): boolean; + vfunc_event(event: Event): boolean; + vfunc_get_accessible(): Atk.Object; + vfunc_get_paint_volume(volume: PaintVolume): boolean; + vfunc_get_preferred_height(for_width: number): [number | null, number | null]; + vfunc_get_preferred_width(for_height: number): [number | null, number | null]; + vfunc_has_accessible(): boolean; + vfunc_has_overlaps(): boolean; + vfunc_hide(): void; + vfunc_hide_all(): void; + vfunc_key_focus_in(): void; + vfunc_key_focus_out(): void; + vfunc_key_press_event(event: KeyEvent): boolean; + vfunc_key_release_event(event: KeyEvent): boolean; + vfunc_leave_event(event: CrossingEvent): boolean; + vfunc_map(): void; + vfunc_motion_event(event: MotionEvent): boolean; + vfunc_paint(paint_context: PaintContext): void; + vfunc_paint_node(root: PaintNode): void; + vfunc_parent_set(old_parent: Actor): void; + vfunc_pick(pick_context: PickContext): void; + vfunc_queue_relayout(): void; + vfunc_realize(): void; + vfunc_resource_scale_changed(): void; + vfunc_scroll_event(event: ScrollEvent): boolean; + vfunc_show(): void; + vfunc_touch_event(event: TouchEvent): boolean; + vfunc_unmap(): void; + vfunc_unrealize(): void; + + // Implemented Members + + find_property(property_name: string): GObject.ParamSpec; + get_actor(): Actor; + get_initial_state(property_name: string, value: GObject.Value | any): void; + interpolate_value(property_name: string, interval: Interval, progress: number): [boolean, unknown]; + set_final_state(property_name: string, value: GObject.Value | any): void; + vfunc_find_property(property_name: string): GObject.ParamSpec; + vfunc_get_actor(): Actor; + vfunc_get_initial_state(property_name: string, value: GObject.Value | any): void; + vfunc_interpolate_value(property_name: string, interval: Interval, progress: number): [boolean, unknown]; + vfunc_set_final_state(property_name: string, value: GObject.Value | any): void; + add_actor(actor: Actor): void; + // Conflicted with Clutter.Container.add_actor + add_actor(...args: never[]): any; + child_get_property(child: Actor, property: string, value: GObject.Value | any): void; + // Conflicted with Clutter.Container.child_get_property + child_get_property(...args: never[]): any; + child_notify(child: Actor, pspec: GObject.ParamSpec): void; + // Conflicted with Clutter.Container.child_notify + child_notify(...args: never[]): any; + child_set_property(child: Actor, property: string, value: GObject.Value | any): void; + // Conflicted with Clutter.Container.child_set_property + child_set_property(...args: never[]): any; + create_child_meta(actor: Actor): void; + // Conflicted with Clutter.Container.create_child_meta + create_child_meta(...args: never[]): any; + destroy_child_meta(actor: Actor): void; + // Conflicted with Clutter.Container.destroy_child_meta + destroy_child_meta(...args: never[]): any; + find_child_by_name(child_name: string): Actor; + // Conflicted with Clutter.Container.find_child_by_name + find_child_by_name(...args: never[]): any; + get_child_meta(actor: Actor): ChildMeta; + // Conflicted with Clutter.Container.get_child_meta + get_child_meta(...args: never[]): any; + remove_actor(actor: Actor): void; + // Conflicted with Clutter.Container.remove_actor + remove_actor(...args: never[]): any; + vfunc_actor_added(actor: Actor): void; + // Conflicted with Clutter.Container.vfunc_actor_added + vfunc_actor_added(...args: never[]): any; + vfunc_actor_removed(actor: Actor): void; + // Conflicted with Clutter.Container.vfunc_actor_removed + vfunc_actor_removed(...args: never[]): any; + vfunc_add(actor: Actor): void; + // Conflicted with Clutter.Container.vfunc_add + vfunc_add(...args: never[]): any; + vfunc_child_notify(child: Actor, pspec: GObject.ParamSpec): void; + // Conflicted with Clutter.Container.vfunc_child_notify + vfunc_child_notify(...args: never[]): any; + vfunc_create_child_meta(actor: Actor): void; + // Conflicted with Clutter.Container.vfunc_create_child_meta + vfunc_create_child_meta(...args: never[]): any; + vfunc_destroy_child_meta(actor: Actor): void; + // Conflicted with Clutter.Container.vfunc_destroy_child_meta + vfunc_destroy_child_meta(...args: never[]): any; + vfunc_get_child_meta(actor: Actor): ChildMeta; + // Conflicted with Clutter.Container.vfunc_get_child_meta + vfunc_get_child_meta(...args: never[]): any; + vfunc_remove(actor: Actor): void; + // Conflicted with Clutter.Container.vfunc_remove + vfunc_remove(...args: never[]): any; + get_id(): string; + parse_custom_node(script: Script, value: GObject.Value | any, name: string, node: Json.Node): boolean; + set_custom_property(script: Script, name: string, value: GObject.Value | any): void; + set_id(id_: string): void; + vfunc_get_id(): string; + vfunc_parse_custom_node(script: Script, value: GObject.Value | any, name: string, node: Json.Node): boolean; + vfunc_set_custom_property(script: Script, name: string, value: GObject.Value | any): void; + vfunc_set_id(id_: string): void; +} +export module ActorMeta { + export interface ConstructorProperties extends GObject.InitiallyUnowned.ConstructorProperties { + [key: string]: any; + actor: Actor; + enabled: boolean; + name: string; + } +} +export abstract class ActorMeta extends GObject.InitiallyUnowned { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get actor(): Actor; + get enabled(): boolean; + set enabled(val: boolean); + get name(): string; + set name(val: string); + + // Members + + get_actor(): Actor; + get_enabled(): boolean; + get_name(): string; + set_enabled(is_enabled: boolean): void; + set_name(name: string): void; + vfunc_set_actor(actor?: Actor | null): void; + vfunc_set_enabled(is_enabled: boolean): void; +} +export module ActorNode { + export interface ConstructorProperties extends PaintNode.ConstructorProperties { + [key: string]: any; + } +} +export class ActorNode extends PaintNode { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Constructors + + static ["new"](actor: Actor, opacity: number): ActorNode; +} +export module AlignConstraint { + export interface ConstructorProperties extends Constraint.ConstructorProperties { + [key: string]: any; + align_axis: AlignAxis; + alignAxis: AlignAxis; + factor: number; + pivot_point: Graphene.Point; + pivotPoint: Graphene.Point; + source: Actor; + } +} +export class AlignConstraint extends Constraint { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get align_axis(): AlignAxis; + set align_axis(val: AlignAxis); + get alignAxis(): AlignAxis; + set alignAxis(val: AlignAxis); + get factor(): number; + set factor(val: number); + get pivot_point(): Graphene.Point; + set pivot_point(val: Graphene.Point); + get pivotPoint(): Graphene.Point; + set pivotPoint(val: Graphene.Point); + get source(): Actor; + set source(val: Actor); + + // Constructors + + static ["new"](source: Actor | null, axis: AlignAxis, factor: number): AlignConstraint; + + // Members + + get_align_axis(): AlignAxis; + get_factor(): number; + get_pivot_point(): Graphene.Point; + get_source(): Actor; + set_align_axis(axis: AlignAxis): void; + set_factor(factor: number): void; + set_pivot_point(pivot_point: Graphene.Point): void; + set_source(source?: Actor | null): void; +} +export module Backend { + export interface ConstructorProperties extends GObject.Object.ConstructorProperties { + [key: string]: any; + } +} +export abstract class Backend extends GObject.Object { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Signals + + connect(id: string, callback: (...args: any[]) => any): number; + connect_after(id: string, callback: (...args: any[]) => any): number; + emit(id: string, ...args: any[]): void; + connect(signal: "font-changed", callback: (_source: this) => void): number; + connect_after(signal: "font-changed", callback: (_source: this) => void): number; + emit(signal: "font-changed"): void; + connect(signal: "resolution-changed", callback: (_source: this) => void): number; + connect_after(signal: "resolution-changed", callback: (_source: this) => void): number; + emit(signal: "resolution-changed"): void; + connect(signal: "settings-changed", callback: (_source: this) => void): number; + connect_after(signal: "settings-changed", callback: (_source: this) => void): number; + emit(signal: "settings-changed"): void; + + // Members + + get_default_seat(): Seat; + get_font_options(): cairo.FontOptions; + get_input_method(): InputMethod; + get_resolution(): number; + set_font_options(options: cairo.FontOptions): void; + set_input_method(method: InputMethod): void; +} +export module BinLayout { + export interface ConstructorProperties extends LayoutManager.ConstructorProperties { + [key: string]: any; + x_align: BinAlignment; + xAlign: BinAlignment; + y_align: BinAlignment; + yAlign: BinAlignment; + } +} +export class BinLayout extends LayoutManager { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get x_align(): BinAlignment; + set x_align(val: BinAlignment); + get xAlign(): BinAlignment; + set xAlign(val: BinAlignment); + get y_align(): BinAlignment; + set y_align(val: BinAlignment); + get yAlign(): BinAlignment; + set yAlign(val: BinAlignment); + + // Constructors + + static ["new"](x_align: BinAlignment, y_align: BinAlignment): BinLayout; +} +export module BindConstraint { + export interface ConstructorProperties extends Constraint.ConstructorProperties { + [key: string]: any; + coordinate: BindCoordinate; + offset: number; + source: Actor; + } +} +export class BindConstraint extends Constraint { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get coordinate(): BindCoordinate; + set coordinate(val: BindCoordinate); + get offset(): number; + set offset(val: number); + get source(): Actor; + set source(val: Actor); + + // Constructors + + static ["new"](source: Actor | null, coordinate: BindCoordinate, offset: number): BindConstraint; + + // Members + + get_coordinate(): BindCoordinate; + get_offset(): number; + get_source(): Actor; + set_coordinate(coordinate: BindCoordinate): void; + set_offset(offset: number): void; + set_source(source?: Actor | null): void; +} +export module BindingPool { + export interface ConstructorProperties extends GObject.Object.ConstructorProperties { + [key: string]: any; + name: string; + } +} +export class BindingPool extends GObject.Object { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get name(): string; + + // Constructors + + static ["new"](name: string): BindingPool; + + // Members + + activate(key_val: number, modifiers: ModifierType, gobject: GObject.Object): boolean; + block_action(action_name: string): void; + find_action(key_val: number, modifiers: ModifierType): string; + install_action(action_name: string, key_val: number, modifiers: ModifierType, callback: BindingActionFunc): void; + install_closure(action_name: string, key_val: number, modifiers: ModifierType, closure: GObject.Closure): void; + override_action(key_val: number, modifiers: ModifierType, callback: GObject.Callback): void; + override_closure(key_val: number, modifiers: ModifierType, closure: GObject.Closure): void; + remove_action(key_val: number, modifiers: ModifierType): void; + unblock_action(action_name: string): void; + static find(name: string): BindingPool; + static get_for_class(klass?: any | null): BindingPool; +} +export module BlitNode { + export interface ConstructorProperties extends PaintNode.ConstructorProperties { + [key: string]: any; + } +} +export class BlitNode extends PaintNode { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Constructors + + static ["new"](src: Cogl.Framebuffer): BlitNode; + + // Members + + add_blit_rectangle(src_x: number, src_y: number, dst_x: number, dst_y: number, width: number, height: number): void; +} +export module BlurEffect { + export interface ConstructorProperties extends OffscreenEffect.ConstructorProperties { + [key: string]: any; + } +} +export class BlurEffect extends OffscreenEffect { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Constructors + + static ["new"](): BlurEffect; +} +export module BlurNode { + export interface ConstructorProperties extends LayerNode.ConstructorProperties { + [key: string]: any; + } +} +export class BlurNode extends LayerNode { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Constructors + + static ["new"](width: number, height: number, sigma: number): BlurNode; + // Conflicted with Clutter.LayerNode.new + static ["new"](...args: never[]): any; +} +export module BoxLayout { + export interface ConstructorProperties extends LayoutManager.ConstructorProperties { + [key: string]: any; + homogeneous: boolean; + orientation: Orientation; + pack_start: boolean; + packStart: boolean; + spacing: number; + } +} +export class BoxLayout extends LayoutManager { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get homogeneous(): boolean; + set homogeneous(val: boolean); + get orientation(): Orientation; + set orientation(val: Orientation); + get pack_start(): boolean; + set pack_start(val: boolean); + get packStart(): boolean; + set packStart(val: boolean); + get spacing(): number; + set spacing(val: number); + + // Constructors + + static ["new"](): BoxLayout; + + // Members + + get_homogeneous(): boolean; + get_orientation(): Orientation; + get_pack_start(): boolean; + get_spacing(): number; + set_homogeneous(homogeneous: boolean): void; + set_orientation(orientation: Orientation): void; + set_pack_start(pack_start: boolean): void; + set_spacing(spacing: number): void; +} +export module BrightnessContrastEffect { + export interface ConstructorProperties extends OffscreenEffect.ConstructorProperties { + [key: string]: any; + brightness: Color; + contrast: Color; + } +} +export class BrightnessContrastEffect extends OffscreenEffect { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get brightness(): Color; + set brightness(val: Color); + get contrast(): Color; + set contrast(val: Color); + + // Constructors + + static ["new"](): BrightnessContrastEffect; + + // Members + + get_brightness(): [number | null, number | null, number | null]; + get_contrast(): [number | null, number | null, number | null]; + set_brightness(brightness: number): void; + set_brightness_full(red: number, green: number, blue: number): void; + set_contrast(contrast: number): void; + set_contrast_full(red: number, green: number, blue: number): void; +} +export module Canvas { + export interface ConstructorProperties extends GObject.Object.ConstructorProperties { + [key: string]: any; + height: number; + scale_factor: number; + scaleFactor: number; + width: number; + } +} +export class Canvas extends GObject.Object implements Content { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get height(): number; + set height(val: number); + get scale_factor(): number; + set scale_factor(val: number); + get scaleFactor(): number; + set scaleFactor(val: number); + get width(): number; + set width(val: number); + + // Signals + + connect(id: string, callback: (...args: any[]) => any): number; + connect_after(id: string, callback: (...args: any[]) => any): number; + emit(id: string, ...args: any[]): void; + connect( + signal: "draw", + callback: (_source: this, cr: cairo.Context, width: number, height: number) => boolean + ): number; + connect_after( + signal: "draw", + callback: (_source: this, cr: cairo.Context, width: number, height: number) => boolean + ): number; + emit(signal: "draw", cr: cairo.Context, width: number, height: number): void; + + // Members + + get_scale_factor(): number; + set_scale_factor(scale: number): void; + set_size(width: number, height: number): boolean; + vfunc_draw(cr: cairo.Context, width: number, height: number): boolean; + static new(): Content; + + // Implemented Members + + get_preferred_size(): [boolean, number | null, number | null]; + invalidate(): void; + invalidate_size(): void; + vfunc_attached(actor: Actor): void; + vfunc_detached(actor: Actor): void; + vfunc_get_preferred_size(): [boolean, number | null, number | null]; + vfunc_invalidate(): void; + vfunc_invalidate_size(): void; + vfunc_paint_content(actor: Actor, node: PaintNode, paint_context: PaintContext): void; +} +export module ChildMeta { + export interface ConstructorProperties extends GObject.Object.ConstructorProperties { + [key: string]: any; + actor: Actor; + container: Container; + } +} +export abstract class ChildMeta extends GObject.Object { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get actor(): Actor; + get container(): Container; + + // Members + + get_actor(): Actor; + get_container(): Container; +} +export module ClickAction { + export interface ConstructorProperties extends Action.ConstructorProperties { + [key: string]: any; + held: boolean; + long_press_duration: number; + longPressDuration: number; + long_press_threshold: number; + longPressThreshold: number; + pressed: boolean; + } +} +export class ClickAction extends Action { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get held(): boolean; + get long_press_duration(): number; + set long_press_duration(val: number); + get longPressDuration(): number; + set longPressDuration(val: number); + get long_press_threshold(): number; + set long_press_threshold(val: number); + get longPressThreshold(): number; + set longPressThreshold(val: number); + get pressed(): boolean; + + // Signals + + connect(id: string, callback: (...args: any[]) => any): number; + connect_after(id: string, callback: (...args: any[]) => any): number; + emit(id: string, ...args: any[]): void; + connect(signal: "clicked", callback: (_source: this, actor: Actor) => void): number; + connect_after(signal: "clicked", callback: (_source: this, actor: Actor) => void): number; + emit(signal: "clicked", actor: Actor): void; + connect(signal: "long-press", callback: (_source: this, actor: Actor, state: LongPressState) => boolean): number; + connect_after( + signal: "long-press", + callback: (_source: this, actor: Actor, state: LongPressState) => boolean + ): number; + emit(signal: "long-press", actor: Actor, state: LongPressState): void; + + // Constructors + + static ["new"](): ClickAction; + + // Members + + get_button(): number; + get_coords(): [number, number]; + get_state(): ModifierType; + release(): void; + vfunc_clicked(actor: Actor): void; + vfunc_long_press(actor: Actor, state: LongPressState): boolean; +} +export module ClipNode { + export interface ConstructorProperties extends PaintNode.ConstructorProperties { + [key: string]: any; + } +} +export class ClipNode extends PaintNode { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Constructors + + static ["new"](): ClipNode; +} +export module Clone { + export interface ConstructorProperties extends Actor.ConstructorProperties { + [key: string]: any; + source: A; + } +} +export class Clone + extends Actor + implements Atk.ImplementorIface, Animatable, Container, Scriptable +{ + static $gtype: GObject.GType; + + constructor(properties?: Partial>, ...args: any[]); + _init(properties?: Partial>, ...args: any[]): void; + + // Properties + get source(): A; + set source(val: A); + + // Constructors + + static ["new"](source: Actor): Clone; + // Conflicted with Clutter.Actor.new + static ["new"](...args: never[]): any; + + // Members + + get_source(): A; + set_source(source?: A | null): void; + + // Implemented Members + + find_property(property_name: string): GObject.ParamSpec; + get_actor(): Actor; + get_initial_state(property_name: string, value: GObject.Value | any): void; + interpolate_value(property_name: string, interval: Interval, progress: number): [boolean, unknown]; + set_final_state(property_name: string, value: GObject.Value | any): void; + vfunc_find_property(property_name: string): GObject.ParamSpec; + vfunc_get_actor(): Actor; + vfunc_get_initial_state(property_name: string, value: GObject.Value | any): void; + vfunc_interpolate_value(property_name: string, interval: Interval, progress: number): [boolean, unknown]; + vfunc_set_final_state(property_name: string, value: GObject.Value | any): void; + add_actor(actor: A): void; + child_get_property(child: A, property: string, value: GObject.Value | any): void; + child_notify(child: A, pspec: GObject.ParamSpec): void; + child_set_property(child: A, property: string, value: GObject.Value | any): void; + create_child_meta(actor: A): void; + destroy_child_meta(actor: A): void; + find_child_by_name(child_name: string): A; + get_child_meta(actor: A): ChildMeta; + remove_actor(actor: A): void; + vfunc_actor_added(actor: A): void; + vfunc_actor_removed(actor: A): void; + vfunc_add(actor: A): void; + vfunc_child_notify(child: A, pspec: GObject.ParamSpec): void; + vfunc_create_child_meta(actor: A): void; + vfunc_destroy_child_meta(actor: A): void; + vfunc_get_child_meta(actor: A): ChildMeta; + vfunc_remove(actor: A): void; + get_id(): string; + parse_custom_node(script: Script, value: GObject.Value | any, name: string, node: Json.Node): boolean; + set_custom_property(script: Script, name: string, value: GObject.Value | any): void; + set_id(id_: string): void; + vfunc_get_id(): string; + vfunc_parse_custom_node(script: Script, value: GObject.Value | any, name: string, node: Json.Node): boolean; + vfunc_set_custom_property(script: Script, name: string, value: GObject.Value | any): void; + vfunc_set_id(id_: string): void; +} +export module ColorNode { + export interface ConstructorProperties extends PipelineNode.ConstructorProperties { + [key: string]: any; + } +} +export class ColorNode extends PipelineNode { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Constructors + + static ["new"](color?: Color | null): ColorNode; + // Conflicted with Clutter.PipelineNode.new + static ["new"](...args: never[]): any; +} +export module ColorizeEffect { + export interface ConstructorProperties extends OffscreenEffect.ConstructorProperties { + [key: string]: any; + tint: Color; + } +} +export class ColorizeEffect extends OffscreenEffect { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get tint(): Color; + set tint(val: Color); + + // Constructors + + static ["new"](tint: Color): ColorizeEffect; + + // Members + + get_tint(): Color; + set_tint(tint: Color): void; +} +export module Constraint { + export interface ConstructorProperties extends ActorMeta.ConstructorProperties { + [key: string]: any; + } +} +export abstract class Constraint extends ActorMeta { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Members + + update_preferred_size( + actor: Actor, + direction: Orientation, + for_size: number, + minimum_size: number, + natural_size: number + ): [number, number]; + vfunc_update_allocation(actor: Actor, allocation: ActorBox): void; + vfunc_update_preferred_size( + actor: Actor, + direction: Orientation, + for_size: number, + minimum_size: number, + natural_size: number + ): [number, number]; +} +export module DeformEffect { + export interface ConstructorProperties extends OffscreenEffect.ConstructorProperties { + [key: string]: any; + x_tiles: number; + xTiles: number; + y_tiles: number; + yTiles: number; + } +} +export abstract class DeformEffect extends OffscreenEffect { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get x_tiles(): number; + set x_tiles(val: number); + get xTiles(): number; + set xTiles(val: number); + get y_tiles(): number; + set y_tiles(val: number); + get yTiles(): number; + set yTiles(val: number); + + // Members + + get_back_material(): Cogl.Handle; + get_n_tiles(): [number, number]; + invalidate(): void; + set_back_material(material?: Cogl.Handle | null): void; + set_n_tiles(x_tiles: number, y_tiles: number): void; + vfunc_deform_vertex(width: number, height: number, vertex: Cogl.TextureVertex): void; +} +export module DesaturateEffect { + export interface ConstructorProperties extends OffscreenEffect.ConstructorProperties { + [key: string]: any; + factor: number; + } +} +export class DesaturateEffect extends OffscreenEffect { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get factor(): number; + set factor(val: number); + + // Constructors + + static ["new"](factor: number): DesaturateEffect; + + // Members + + get_factor(): number; + set_factor(factor: number): void; +} +export module Effect { + export interface ConstructorProperties extends ActorMeta.ConstructorProperties { + [key: string]: any; + } +} +export abstract class Effect extends ActorMeta { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Members + + queue_repaint(): void; + vfunc_modify_paint_volume(volume: PaintVolume): boolean; + vfunc_paint(node: PaintNode, paint_context: PaintContext, flags: EffectPaintFlags): void; + vfunc_paint_node(node: PaintNode, paint_context: PaintContext, flags: EffectPaintFlags): void; + vfunc_pick(pick_context: PickContext): void; + vfunc_post_paint(node: PaintNode, paint_context: PaintContext): void; + vfunc_pre_paint(node: PaintNode, paint_context: PaintContext): boolean; +} +export module FixedLayout { + export interface ConstructorProperties extends LayoutManager.ConstructorProperties { + [key: string]: any; + } +} +export class FixedLayout extends LayoutManager { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Constructors + + static ["new"](): FixedLayout; +} +export module FlowLayout { + export interface ConstructorProperties extends LayoutManager.ConstructorProperties { + [key: string]: any; + column_spacing: number; + columnSpacing: number; + homogeneous: boolean; + max_column_width: number; + maxColumnWidth: number; + max_row_height: number; + maxRowHeight: number; + min_column_width: number; + minColumnWidth: number; + min_row_height: number; + minRowHeight: number; + orientation: FlowOrientation; + row_spacing: number; + rowSpacing: number; + snap_to_grid: boolean; + snapToGrid: boolean; + } +} +export class FlowLayout extends LayoutManager { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get column_spacing(): number; + set column_spacing(val: number); + get columnSpacing(): number; + set columnSpacing(val: number); + get homogeneous(): boolean; + set homogeneous(val: boolean); + get max_column_width(): number; + set max_column_width(val: number); + get maxColumnWidth(): number; + set maxColumnWidth(val: number); + get max_row_height(): number; + set max_row_height(val: number); + get maxRowHeight(): number; + set maxRowHeight(val: number); + get min_column_width(): number; + set min_column_width(val: number); + get minColumnWidth(): number; + set minColumnWidth(val: number); + get min_row_height(): number; + set min_row_height(val: number); + get minRowHeight(): number; + set minRowHeight(val: number); + get orientation(): FlowOrientation; + set orientation(val: FlowOrientation); + get row_spacing(): number; + set row_spacing(val: number); + get rowSpacing(): number; + set rowSpacing(val: number); + get snap_to_grid(): boolean; + set snap_to_grid(val: boolean); + get snapToGrid(): boolean; + set snapToGrid(val: boolean); + + // Constructors + + static ["new"](orientation: FlowOrientation): FlowLayout; + + // Members + + get_column_spacing(): number; + get_column_width(): [number, number]; + get_homogeneous(): boolean; + get_orientation(): FlowOrientation; + get_row_height(): [number, number]; + get_row_spacing(): number; + get_snap_to_grid(): boolean; + set_column_spacing(spacing: number): void; + set_column_width(min_width: number, max_width: number): void; + set_homogeneous(homogeneous: boolean): void; + set_orientation(orientation: FlowOrientation): void; + set_row_height(min_height: number, max_height: number): void; + set_row_spacing(spacing: number): void; + set_snap_to_grid(snap_to_grid: boolean): void; +} +export module FrameClock { + export interface ConstructorProperties extends GObject.Object.ConstructorProperties { + [key: string]: any; + } +} +export class FrameClock extends GObject.Object { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Signals + + connect(id: string, callback: (...args: any[]) => any): number; + connect_after(id: string, callback: (...args: any[]) => any): number; + emit(id: string, ...args: any[]): void; + connect(signal: "destroy", callback: (_source: this) => void): number; + connect_after(signal: "destroy", callback: (_source: this) => void): number; + emit(signal: "destroy"): void; + + // Members + + add_timeline(timeline: Timeline): void; + destroy(): void; + get_max_render_time_debug_info(): GLib.String; + get_refresh_rate(): number; + inhibit(): void; + notify_ready(): void; + record_flip_time(flip_time_us: number): void; + remove_timeline(timeline: Timeline): void; + schedule_update(): void; + schedule_update_now(): void; + uninhibit(): void; +} +export module GestureAction { + export interface ConstructorProperties extends Action.ConstructorProperties { + [key: string]: any; + n_touch_points: number; + nTouchPoints: number; + threshold_trigger_distance_x: number; + thresholdTriggerDistanceX: number; + threshold_trigger_distance_y: number; + thresholdTriggerDistanceY: number; + threshold_trigger_edge: GestureTriggerEdge; + thresholdTriggerEdge: GestureTriggerEdge; + } +} +export class GestureAction extends Action { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get n_touch_points(): number; + set n_touch_points(val: number); + get nTouchPoints(): number; + set nTouchPoints(val: number); + get threshold_trigger_distance_x(): number; + get thresholdTriggerDistanceX(): number; + get threshold_trigger_distance_y(): number; + get thresholdTriggerDistanceY(): number; + get threshold_trigger_edge(): GestureTriggerEdge; + get thresholdTriggerEdge(): GestureTriggerEdge; + + // Signals + + connect(id: string, callback: (...args: any[]) => any): number; + connect_after(id: string, callback: (...args: any[]) => any): number; + emit(id: string, ...args: any[]): void; + connect(signal: "gesture-begin", callback: (_source: this, actor: Actor) => boolean): number; + connect_after(signal: "gesture-begin", callback: (_source: this, actor: Actor) => boolean): number; + emit(signal: "gesture-begin", actor: Actor): void; + connect(signal: "gesture-cancel", callback: (_source: this, actor: Actor) => void): number; + connect_after(signal: "gesture-cancel", callback: (_source: this, actor: Actor) => void): number; + emit(signal: "gesture-cancel", actor: Actor): void; + connect(signal: "gesture-end", callback: (_source: this, actor: Actor) => void): number; + connect_after(signal: "gesture-end", callback: (_source: this, actor: Actor) => void): number; + emit(signal: "gesture-end", actor: Actor): void; + connect(signal: "gesture-progress", callback: (_source: this, actor: Actor) => boolean): number; + connect_after(signal: "gesture-progress", callback: (_source: this, actor: Actor) => boolean): number; + emit(signal: "gesture-progress", actor: Actor): void; + + // Constructors + + static ["new"](): GestureAction; + + // Members + + cancel(): void; + get_device(point: number): InputDevice; + get_last_event(point: number): Event; + get_motion_coords(point: number): [number | null, number | null]; + get_motion_delta(point: number): [number, number | null, number | null]; + get_n_current_points(): number; + get_n_touch_points(): number; + get_press_coords(point: number): [number | null, number | null]; + get_release_coords(point: number): [number | null, number | null]; + get_sequence(point: number): EventSequence; + get_threshold_trigger_distance(): [number | null, number | null]; + get_threshold_trigger_edge(): GestureTriggerEdge; + get_threshold_trigger_egde(): GestureTriggerEdge; + get_velocity(point: number): [number, number | null, number | null]; + set_n_touch_points(nb_points: number): void; + set_threshold_trigger_distance(x: number, y: number): void; + set_threshold_trigger_edge(edge: GestureTriggerEdge): void; + vfunc_gesture_begin(actor: Actor): boolean; + vfunc_gesture_cancel(actor: Actor): void; + vfunc_gesture_end(actor: Actor): void; + vfunc_gesture_prepare(actor: Actor): boolean; + vfunc_gesture_progress(actor: Actor): boolean; +} +export module GridLayout { + export interface ConstructorProperties extends LayoutManager.ConstructorProperties { + [key: string]: any; + column_homogeneous: boolean; + columnHomogeneous: boolean; + column_spacing: number; + columnSpacing: number; + orientation: Orientation; + row_homogeneous: boolean; + rowHomogeneous: boolean; + row_spacing: number; + rowSpacing: number; + } +} +export class GridLayout extends LayoutManager { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get column_homogeneous(): boolean; + set column_homogeneous(val: boolean); + get columnHomogeneous(): boolean; + set columnHomogeneous(val: boolean); + get column_spacing(): number; + set column_spacing(val: number); + get columnSpacing(): number; + set columnSpacing(val: number); + get orientation(): Orientation; + set orientation(val: Orientation); + get row_homogeneous(): boolean; + set row_homogeneous(val: boolean); + get rowHomogeneous(): boolean; + set rowHomogeneous(val: boolean); + get row_spacing(): number; + set row_spacing(val: number); + get rowSpacing(): number; + set rowSpacing(val: number); + + // Constructors + + static ["new"](): GridLayout; + + // Members + + attach(child: Actor, left: number, top: number, width: number, height: number): void; + attach_next_to(child: Actor, sibling: Actor | null, side: GridPosition, width: number, height: number): void; + get_child_at(left: number, top: number): Actor; + get_column_homogeneous(): boolean; + get_column_spacing(): number; + get_orientation(): Orientation; + get_row_homogeneous(): boolean; + get_row_spacing(): number; + insert_column(position: number): void; + insert_next_to(sibling: Actor, side: GridPosition): void; + insert_row(position: number): void; + set_column_homogeneous(homogeneous: boolean): void; + set_column_spacing(spacing: number): void; + set_orientation(orientation: Orientation): void; + set_row_homogeneous(homogeneous: boolean): void; + set_row_spacing(spacing: number): void; +} +export module Image { + export interface ConstructorProperties extends GObject.Object.ConstructorProperties { + [key: string]: any; + } +} +export class Image extends GObject.Object implements Content { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Members + + get_texture(): Cogl.Texture; + set_area( + data: Uint8Array | string, + pixel_format: Cogl.PixelFormat, + rect: cairo.RectangleInt, + row_stride: number + ): boolean; + set_bytes( + data: GLib.Bytes | Uint8Array, + pixel_format: Cogl.PixelFormat, + width: number, + height: number, + row_stride: number + ): boolean; + set_data( + data: Uint8Array | string, + pixel_format: Cogl.PixelFormat, + width: number, + height: number, + row_stride: number + ): boolean; + // Conflicted with GObject.Object.set_data + set_data(...args: never[]): any; + static new(): Content; + + // Implemented Members + + get_preferred_size(): [boolean, number | null, number | null]; + invalidate(): void; + invalidate_size(): void; + vfunc_attached(actor: Actor): void; + vfunc_detached(actor: Actor): void; + vfunc_get_preferred_size(): [boolean, number | null, number | null]; + vfunc_invalidate(): void; + vfunc_invalidate_size(): void; + vfunc_paint_content(actor: Actor, node: PaintNode, paint_context: PaintContext): void; +} +export module InputDevice { + export interface ConstructorProperties extends GObject.Object.ConstructorProperties { + [key: string]: any; + backend: Backend; + capabilities: InputCapabilities; + device_mode: InputMode; + deviceMode: InputMode; + device_node: string; + deviceNode: string; + device_type: InputDeviceType; + deviceType: InputDeviceType; + has_cursor: boolean; + hasCursor: boolean; + n_buttons: number; + nButtons: number; + n_mode_groups: number; + nModeGroups: number; + n_rings: number; + nRings: number; + n_strips: number; + nStrips: number; + name: string; + product_id: string; + productId: string; + seat: Seat; + vendor_id: string; + vendorId: string; + } +} +export class InputDevice extends GObject.Object { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get backend(): Backend; + get capabilities(): InputCapabilities; + get device_mode(): InputMode; + get deviceMode(): InputMode; + get device_node(): string; + get deviceNode(): string; + get device_type(): InputDeviceType; + get deviceType(): InputDeviceType; + get has_cursor(): boolean; + get hasCursor(): boolean; + get n_buttons(): number; + get nButtons(): number; + get n_mode_groups(): number; + get nModeGroups(): number; + get n_rings(): number; + get nRings(): number; + get n_strips(): number; + get nStrips(): number; + get name(): string; + get product_id(): string; + get productId(): string; + get seat(): Seat; + get vendor_id(): string; + get vendorId(): string; + + // Members + + get_capabilities(): InputCapabilities; + get_device_mode(): InputMode; + get_device_name(): string; + get_device_node(): string; + get_device_type(): InputDeviceType; + get_group_n_modes(group: number): number; + get_has_cursor(): boolean; + get_mode_switch_button_group(button: number): number; + get_n_buttons(): number; + get_n_mode_groups(): number; + get_n_rings(): number; + get_n_strips(): number; + get_pad_feature_group(feature: InputDevicePadFeature, n_feature: number): number; + get_product_id(): string; + get_seat(): Seat; + get_vendor_id(): string; + is_grouped(other_device: InputDevice): boolean; + is_mode_switch_button(group: number, button: number): boolean; + vfunc_get_group_n_modes(group: number): number; + vfunc_get_pad_feature_group(feature: InputDevicePadFeature, n_feature: number): number; + vfunc_is_grouped(other_device: InputDevice): boolean; + vfunc_is_mode_switch_button(group: number, button: number): boolean; +} +export module InputDeviceTool { + export interface ConstructorProperties extends GObject.Object.ConstructorProperties { + [key: string]: any; + axes: InputAxisFlags; + id: number; + serial: number; + type: InputDeviceToolType; + } +} +export abstract class InputDeviceTool extends GObject.Object { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get axes(): InputAxisFlags; + get id(): number; + get serial(): number; + get type(): InputDeviceToolType; + + // Members + + get_axes(): InputAxisFlags; + get_id(): number; + get_serial(): number; + get_tool_type(): InputDeviceToolType; +} +export module InputFocus { + export interface ConstructorProperties extends GObject.Object.ConstructorProperties { + [key: string]: any; + } +} +export abstract class InputFocus extends GObject.Object { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Members + + filter_event(event: Event): boolean; + is_focused(): boolean; + reset(): void; + set_can_show_preedit(can_show_preedit: boolean): void; + set_content_hints(hint: InputContentHintFlags): void; + set_content_purpose(purpose: InputContentPurpose): void; + set_cursor_location(rect: Graphene.Rect): void; + set_input_panel_state(state: InputPanelState): void; + set_surrounding(text: string, cursor: number, anchor: number): void; + vfunc_commit_text(text: string): void; + vfunc_delete_surrounding(offset: number, len: number): void; + vfunc_focus_in(input_method: InputMethod): void; + vfunc_focus_out(): void; + vfunc_request_surrounding(): void; + vfunc_set_preedit_text(preedit: string, cursor: number): void; +} +export module InputMethod { + export interface ConstructorProperties extends GObject.Object.ConstructorProperties { + [key: string]: any; + can_show_preedit: boolean; + canShowPreedit: boolean; + content_hints: InputContentHintFlags; + contentHints: InputContentHintFlags; + content_purpose: InputContentPurpose; + contentPurpose: InputContentPurpose; + } +} +export abstract class InputMethod extends GObject.Object { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get can_show_preedit(): boolean; + set can_show_preedit(val: boolean); + get canShowPreedit(): boolean; + set canShowPreedit(val: boolean); + get content_hints(): InputContentHintFlags; + set content_hints(val: InputContentHintFlags); + get contentHints(): InputContentHintFlags; + set contentHints(val: InputContentHintFlags); + get content_purpose(): InputContentPurpose; + set content_purpose(val: InputContentPurpose); + get contentPurpose(): InputContentPurpose; + set contentPurpose(val: InputContentPurpose); + + // Signals + + connect(id: string, callback: (...args: any[]) => any): number; + connect_after(id: string, callback: (...args: any[]) => any): number; + emit(id: string, ...args: any[]): void; + connect(signal: "commit", callback: (_source: this, object: string) => void): number; + connect_after(signal: "commit", callback: (_source: this, object: string) => void): number; + emit(signal: "commit", object: string): void; + connect(signal: "cursor-location-changed", callback: (_source: this, object: Graphene.Rect) => void): number; + connect_after(signal: "cursor-location-changed", callback: (_source: this, object: Graphene.Rect) => void): number; + emit(signal: "cursor-location-changed", object: Graphene.Rect): void; + connect(signal: "delete-surrounding", callback: (_source: this, object: number, p0: number) => void): number; + connect_after(signal: "delete-surrounding", callback: (_source: this, object: number, p0: number) => void): number; + emit(signal: "delete-surrounding", object: number, p0: number): void; + connect(signal: "input-panel-state", callback: (_source: this, object: InputPanelState) => void): number; + connect_after(signal: "input-panel-state", callback: (_source: this, object: InputPanelState) => void): number; + emit(signal: "input-panel-state", object: InputPanelState): void; + connect(signal: "request-surrounding", callback: (_source: this) => void): number; + connect_after(signal: "request-surrounding", callback: (_source: this) => void): number; + emit(signal: "request-surrounding"): void; + + // Members + + commit(text: string): void; + delete_surrounding(offset: number, len: number): void; + focus_in(focus: InputFocus): void; + focus_out(): void; + forward_key(keyval: number, keycode: number, state: number, time_: number, press: boolean): void; + notify_key_event(event: Event, filtered: boolean): void; + request_surrounding(): void; + set_input_panel_state(state: InputPanelState): void; + set_preedit_text(preedit: string | null, cursor: number, mode: PreeditResetMode): void; + vfunc_filter_key_event(key: Event): boolean; + vfunc_focus_in(actor: InputFocus): void; + vfunc_focus_out(): void; + vfunc_reset(): void; + vfunc_set_cursor_location(rect: Graphene.Rect): void; + vfunc_set_surrounding(text: string, cursor: number, anchor: number): void; + vfunc_update_content_hints(hint: InputContentHintFlags): void; + vfunc_update_content_purpose(purpose: InputContentPurpose): void; +} +export module Interval { + export interface ConstructorProperties extends GObject.InitiallyUnowned.ConstructorProperties { + [key: string]: any; + final: GObject.Value; + initial: GObject.Value; + value_type: GObject.GType; + valueType: GObject.GType; + } +} +export class Interval extends GObject.InitiallyUnowned implements Scriptable { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get final(): GObject.Value; + set final(val: GObject.Value); + get initial(): GObject.Value; + set initial(val: GObject.Value); + get value_type(): GObject.GType; + get valueType(): GObject.GType; + + // Constructors + + static new_with_values( + gtype: GObject.GType, + initial?: GObject.Value | null, + _final?: GObject.Value | null + ): Interval; + + // Members + + clone(): Interval; + compute(factor: number): unknown; + compute_value(factor: number): [boolean, unknown]; + get_final_value(): unknown; + get_initial_value(): unknown; + get_value_type(): GObject.GType; + is_valid(): boolean; + peek_final_value(): unknown; + peek_initial_value(): unknown; + set_final(value: GObject.Value | any): void; + set_initial(value: GObject.Value | any): void; + validate(pspec: GObject.ParamSpec): boolean; + vfunc_compute_value(factor: number): [boolean, unknown]; + vfunc_validate(pspec: GObject.ParamSpec): boolean; + + // Implemented Members + + get_id(): string; + parse_custom_node(script: Script, value: GObject.Value | any, name: string, node: Json.Node): boolean; + set_custom_property(script: Script, name: string, value: GObject.Value | any): void; + set_id(id_: string): void; + vfunc_get_id(): string; + vfunc_parse_custom_node(script: Script, value: GObject.Value | any, name: string, node: Json.Node): boolean; + vfunc_set_custom_property(script: Script, name: string, value: GObject.Value | any): void; + vfunc_set_id(id_: string): void; +} +export module KeyframeTransition { + export interface ConstructorProperties extends PropertyTransition.ConstructorProperties { + [key: string]: any; + } +} +export class KeyframeTransition extends PropertyTransition implements Scriptable { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Constructors + + static ["new"](property_name: string): KeyframeTransition; + // Conflicted with Clutter.PropertyTransition.new + static ["new"](...args: never[]): any; + + // Members + + clear(): void; + get_key_frame(index_: number): [number | null, AnimationMode | null, unknown]; + get_n_key_frames(): number; + set_key_frame(index_: number, key: number, mode: AnimationMode, value: GObject.Value | any): void; + set_key_frames(key_frames: number[]): void; + set_modes(modes: AnimationMode[]): void; + set_values(values: GObject.Value[]): void; +} +export module Keymap { + export interface ConstructorProperties extends GObject.Object.ConstructorProperties { + [key: string]: any; + caps_lock_state: boolean; + capsLockState: boolean; + num_lock_state: boolean; + numLockState: boolean; + } +} +export abstract class Keymap extends GObject.Object { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get caps_lock_state(): boolean; + get capsLockState(): boolean; + get num_lock_state(): boolean; + get numLockState(): boolean; + + // Signals + + connect(id: string, callback: (...args: any[]) => any): number; + connect_after(id: string, callback: (...args: any[]) => any): number; + emit(id: string, ...args: any[]): void; + connect(signal: "state-changed", callback: (_source: this) => void): number; + connect_after(signal: "state-changed", callback: (_source: this) => void): number; + emit(signal: "state-changed"): void; + + // Members + + get_caps_lock_state(): boolean; + get_direction(): Pango.Direction; + get_num_lock_state(): boolean; + vfunc_get_direction(): Pango.Direction; +} +export module LayerNode { + export interface ConstructorProperties extends PaintNode.ConstructorProperties { + [key: string]: any; + } +} +export class LayerNode extends PaintNode { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Constructors + + static ["new"]( + projection: Graphene.Matrix, + viewport: cairo.Rectangle, + width: number, + height: number, + opacity: number + ): LayerNode; + static new_to_framebuffer(framebuffer: Cogl.Framebuffer, pipeline: Cogl.Pipeline): LayerNode; +} +export module LayoutManager { + export interface ConstructorProperties extends GObject.InitiallyUnowned.ConstructorProperties { + [key: string]: any; + } +} +export abstract class LayoutManager extends GObject.InitiallyUnowned { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Signals + + connect(id: string, callback: (...args: any[]) => any): number; + connect_after(id: string, callback: (...args: any[]) => any): number; + emit(id: string, ...args: any[]): void; + connect(signal: "layout-changed", callback: (_source: this) => void): number; + connect_after(signal: "layout-changed", callback: (_source: this) => void): number; + emit(signal: "layout-changed"): void; + + // Members + + allocate(container: Container, allocation: ActorBox): void; + child_get_property(container: Container, actor: Actor, property_name: string, value: GObject.Value | any): void; + child_set_property(container: Container, actor: Actor, property_name: string, value: GObject.Value | any): void; + find_child_property(name: string): GObject.ParamSpec; + get_child_meta(container: Container, actor: Actor): LayoutMeta; + get_preferred_height(container: Container, for_width: number): [number | null, number | null]; + get_preferred_width(container: Container, for_height: number): [number | null, number | null]; + layout_changed(): void; + list_child_properties(): GObject.ParamSpec[]; + set_container(container?: Container | null): void; + vfunc_allocate(container: Container, allocation: ActorBox): void; + vfunc_get_child_meta_type(): GObject.GType; + vfunc_get_preferred_height(container: Container, for_width: number): [number | null, number | null]; + vfunc_get_preferred_width(container: Container, for_height: number): [number | null, number | null]; + vfunc_layout_changed(): void; + vfunc_set_container(container?: Container | null): void; +} +export module LayoutMeta { + export interface ConstructorProperties extends ChildMeta.ConstructorProperties { + [key: string]: any; + manager: LayoutManager; + } +} +export abstract class LayoutMeta extends ChildMeta { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get manager(): LayoutManager; + + // Members + + get_manager(): LayoutManager; +} +export module OffscreenEffect { + export interface ConstructorProperties extends Effect.ConstructorProperties { + [key: string]: any; + } +} +export abstract class OffscreenEffect extends Effect { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Members + + create_texture(width: number, height: number): Cogl.Handle; + get_pipeline(): Cogl.Pipeline | null; + get_target_size(): [boolean, number, number]; + get_texture(): Cogl.Handle; + paint_target(node: PaintNode, paint_context: PaintContext): void; + vfunc_create_texture(width: number, height: number): Cogl.Handle; + vfunc_paint_target(node: PaintNode, paint_context: PaintContext): void; +} +export module PageTurnEffect { + export interface ConstructorProperties extends DeformEffect.ConstructorProperties { + [key: string]: any; + angle: number; + period: number; + radius: number; + } +} +export class PageTurnEffect extends DeformEffect { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get angle(): number; + set angle(val: number); + get period(): number; + set period(val: number); + get radius(): number; + set radius(val: number); + + // Constructors + + static ["new"](period: number, angle: number, radius: number): PageTurnEffect; + + // Members + + get_angle(): number; + get_period(): number; + get_radius(): number; + set_angle(angle: number): void; + set_period(period: number): void; + set_radius(radius: number): void; +} +export module PaintNode { + export interface ConstructorProperties { + [key: string]: any; + } +} +export abstract class PaintNode { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Members + + add_child(child: PaintNode): void; + add_multitexture_rectangle(rect: ActorBox, text_coords: number, text_coords_len: number): void; + add_rectangle(rect: ActorBox): void; + add_rectangles(coords: number[]): void; + add_texture_rectangle(rect: ActorBox, x_1: number, y_1: number, x_2: number, y_2: number): void; + add_texture_rectangles(coords: number[]): void; + get_framebuffer(): Cogl.Framebuffer; + paint(paint_context: PaintContext): void; + ref(): PaintNode; + set_name(name: string): void; + unref(): void; +} +export module PanAction { + export interface ConstructorProperties extends GestureAction.ConstructorProperties { + [key: string]: any; + acceleration_factor: number; + accelerationFactor: number; + deceleration: number; + interpolate: boolean; + pan_axis: PanAxis; + panAxis: PanAxis; + } +} +export class PanAction extends GestureAction { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get acceleration_factor(): number; + set acceleration_factor(val: number); + get accelerationFactor(): number; + set accelerationFactor(val: number); + get deceleration(): number; + set deceleration(val: number); + get interpolate(): boolean; + set interpolate(val: boolean); + get pan_axis(): PanAxis; + set pan_axis(val: PanAxis); + get panAxis(): PanAxis; + set panAxis(val: PanAxis); + + // Signals + + connect(id: string, callback: (...args: any[]) => any): number; + connect_after(id: string, callback: (...args: any[]) => any): number; + emit(id: string, ...args: any[]): void; + connect(signal: "pan", callback: (_source: this, actor: Actor, is_interpolated: boolean) => boolean): number; + connect_after(signal: "pan", callback: (_source: this, actor: Actor, is_interpolated: boolean) => boolean): number; + emit(signal: "pan", actor: Actor, is_interpolated: boolean): void; + connect(signal: "pan-stopped", callback: (_source: this, actor: Actor) => void): number; + connect_after(signal: "pan-stopped", callback: (_source: this, actor: Actor) => void): number; + emit(signal: "pan-stopped", actor: Actor): void; + + // Constructors + + static ["new"](): PanAction; + + // Members + + get_acceleration_factor(): number; + get_constrained_motion_delta(point: number): [number, number | null, number | null]; + get_deceleration(): number; + get_interpolate(): boolean; + get_interpolated_coords(): [number | null, number | null]; + get_interpolated_delta(): [number, number | null, number | null]; + get_motion_coords(point: number): [number | null, number | null]; + get_motion_delta(point: number): [number, number | null, number | null]; + get_pan_axis(): PanAxis; + set_acceleration_factor(factor: number): void; + set_deceleration(rate: number): void; + set_interpolate(should_interpolate: boolean): void; + set_pan_axis(axis: PanAxis): void; + vfunc_pan_stopped(actor: Actor): void; +} + +export module Path { + export interface ConstructorProperties extends GObject.InitiallyUnowned.ConstructorProperties { + [key: string]: any; + description: string; + length: number; + } +} +export class Path extends GObject.InitiallyUnowned { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get description(): string; + set description(val: string); + get length(): number; + + // Constructors + + static ["new"](): Path; + static new_with_description(desc: string): Path; + + // Members + + add_cairo_path(cpath: cairo.Path): void; + add_close(): void; + add_curve_to(x_1: number, y_1: number, x_2: number, y_2: number, x_3: number, y_3: number): void; + add_line_to(x: number, y: number): void; + add_move_to(x: number, y: number): void; + add_node(node: PathNode): void; + add_rel_curve_to(x_1: number, y_1: number, x_2: number, y_2: number, x_3: number, y_3: number): void; + add_rel_line_to(x: number, y: number): void; + add_rel_move_to(x: number, y: number): void; + add_string(str: string): boolean; + clear(): void; + foreach(callback: PathCallback): void; + get_description(): string; + get_length(): number; + get_n_nodes(): number; + get_node(index_: number): PathNode; + get_nodes(): PathNode[]; + get_position(progress: number): [number, Knot]; + insert_node(index_: number, node: PathNode): void; + remove_node(index_: number): void; + replace_node(index_: number, node: PathNode): void; + set_description(str: string): boolean; + to_cairo_path(cr: cairo.Context): void; +} +export module PathConstraint { + export interface ConstructorProperties extends Constraint.ConstructorProperties { + [key: string]: any; + offset: number; + path: Path; + } +} +export class PathConstraint extends Constraint { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get offset(): number; + set offset(val: number); + get path(): Path; + set path(val: Path); + + // Signals + + connect(id: string, callback: (...args: any[]) => any): number; + connect_after(id: string, callback: (...args: any[]) => any): number; + emit(id: string, ...args: any[]): void; + connect(signal: "node-reached", callback: (_source: this, actor: Actor, index: number) => void): number; + connect_after(signal: "node-reached", callback: (_source: this, actor: Actor, index: number) => void): number; + emit(signal: "node-reached", actor: Actor, index: number): void; + + // Constructors + + static ["new"](path: Path | null, offset: number): PathConstraint; + + // Members + + get_offset(): number; + get_path(): Path; + set_offset(offset: number): void; + set_path(path?: Path | null): void; +} +export module PipelineNode { + export interface ConstructorProperties extends PaintNode.ConstructorProperties { + [key: string]: any; + } +} +export class PipelineNode extends PaintNode { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Constructors + + static ["new"](pipeline?: Cogl.Pipeline | null): PipelineNode; +} +export module PropertyTransition { + export interface ConstructorProperties extends Transition.ConstructorProperties { + [key: string]: any; + property_name: string; + propertyName: string; + } +} +export class PropertyTransition extends Transition implements Scriptable { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Properties + get property_name(): string; + set property_name(val: string); + get propertyName(): string; + set propertyName(val: string); + + // Constructors + + static ["new"](property_name?: string | null): PropertyTransition; + // Conflicted with Clutter.Timeline.new + static ["new"](...args: never[]): any; + static new_for_actor(actor: Actor, property_name?: string | null): PropertyTransition; + // Conflicted with Clutter.Timeline.new_for_actor + static new_for_actor(...args: never[]): any; + + // Members + + get_property_name(): string; + set_property_name(property_name?: string | null): void; +} +export module RootNode { + export interface ConstructorProperties extends PaintNode.ConstructorProperties { + [key: string]: any; + } +} +export class RootNode extends PaintNode { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Constructors + + static ["new"](framebuffer: Cogl.Framebuffer, clear_color: Color, clear_flags: Cogl.BufferBit): RootNode; +} +export module RotateAction { + export interface ConstructorProperties extends GestureAction.ConstructorProperties { + [key: string]: any; + } +} +export class RotateAction extends GestureAction { + static $gtype: GObject.GType; + + constructor(properties?: Partial, ...args: any[]); + _init(properties?: Partial, ...args: any[]): void; + + // Signals + + connect(id: string, callback: (...args: any[]) => any): number; + connect_after(id: string, callback: (...args: any[]) => any): number; + emit(id: string, ...args: any[]): void; + connect(signal: "rotate", callback: (_source: this, actor: Actor, angle: number) => boolean): number; + connect_after(signal: "rotate", callback: (_source: this, actor: Actor, angle: number) => boolean): number; + emit(signal: "rotate", actor: Actor, angle: number): void; + + // Constructors + + static ["new"](): RotateAction; +} +export module Script { + export interface ConstructorProperties extends GObject.Object.ConstructorProperties { + [key: string]: any; + filename: string; + filename_set: boolean; + filenameSet: boolean; + translation_domain: string; + translationDomain: string; + } +} +export class Script extends GObject.Object { + static $gtype: GObject.GType