-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from schnz/main
Add ExtensionPreferences and WindowManager types
- Loading branch information
Showing
6 changed files
with
113 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import type Adw from '@girs/adw-1'; | ||
|
||
import type { Extension } from './extension'; | ||
import type { ExtensionBase, TranslationFunctions } from './sharedInternals'; | ||
|
||
export class ExtensionPreferences extends ExtensionBase { | ||
static lookupByUUID(uuid: string): Extension | null; | ||
static defineTranslationFunctions(url: string): TranslationFunctions; | ||
|
||
/** | ||
* Get the single widget that implements | ||
* the extension's preferences. | ||
* | ||
* @returns {Gtk.Widget} | ||
* @throws {GObject.NotImplementedError} | ||
*/ | ||
getPreferencesWidget(): void; | ||
|
||
/** | ||
* Fill the preferences window with preferences. | ||
* | ||
* The default implementation adds the widget | ||
* returned by getPreferencesWidget(). | ||
* | ||
* @param {Adw.PreferencesWindow} window - the preferences window | ||
*/ | ||
fillPreferencesWindow(window: Adw.PreferencesWindow): void; | ||
} | ||
|
||
export declare const gettext: TranslationFunctions['gettext']; | ||
export declare const ngettext: TranslationFunctions['ngettext']; | ||
export declare const pgettext: TranslationFunctions['pgettext']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import type Clutter from 'gi://Clutter'; | ||
import type Gio from 'gi://Gio'; | ||
import type Meta from 'gi://Meta'; | ||
import type Shell from 'gi://Shell'; | ||
|
||
export class WindowManager { | ||
insertWorkspace(pos: number): void; | ||
|
||
setCustomKeybindingHandler( | ||
name: string, | ||
modes: Shell.ActionMode, | ||
handler: Meta.KeyHandlerFunc | ||
): void; | ||
|
||
addKeybinding( | ||
name: string, | ||
settings: Gio.Settings, | ||
flags: Meta.KeyBindingFlags, | ||
modes: Shell.ActionMode, | ||
handler: Meta.KeyHandlerFunc | ||
): number; | ||
|
||
removeKeybinding(name: string): void; | ||
|
||
allowKeybinding(name: string, modes: Shell.ActionMode): void; | ||
|
||
handleWorkspaceScroll(event: Clutter.Event): boolean; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters