mirror of
https://github.com/zen-browser/desktop.git
synced 2025-07-08 00:10:00 +02:00
style: Formatted the project, b=(no-bug), c=scripts
This commit is contained in:
parent
e65991aa03
commit
8136387a75
11 changed files with 41339 additions and 33414 deletions
|
@ -2,23 +2,24 @@
|
||||||
import os
|
import os
|
||||||
|
|
||||||
FILES = [
|
FILES = [
|
||||||
"index.d.ts",
|
"index.d.ts",
|
||||||
"lib.gecko.darwin.d.ts",
|
"lib.gecko.darwin.d.ts",
|
||||||
"lib.gecko.dom.d.ts",
|
"lib.gecko.dom.d.ts",
|
||||||
"lib.gecko.glean.d.ts",
|
"lib.gecko.glean.d.ts",
|
||||||
"lib.gecko.linux.d.ts",
|
"lib.gecko.linux.d.ts",
|
||||||
"lib.gecko.modules.d.ts",
|
"lib.gecko.modules.d.ts",
|
||||||
"lib.gecko.nsresult.d.ts",
|
"lib.gecko.nsresult.d.ts",
|
||||||
"lib.gecko.services.d.ts",
|
"lib.gecko.services.d.ts",
|
||||||
"lib.gecko.tweaks.d.ts",
|
"lib.gecko.tweaks.d.ts",
|
||||||
"lib.gecko.win32.d.ts",
|
"lib.gecko.win32.d.ts",
|
||||||
"lib.gecko.xpcom.d.ts",
|
"lib.gecko.xpcom.d.ts",
|
||||||
"lib.gecko.xpidl.d.ts",
|
"lib.gecko.xpidl.d.ts",
|
||||||
]
|
]
|
||||||
|
|
||||||
ENGINE_PATH = os.path.join("engine", "tools", "@types")
|
ENGINE_PATH = os.path.join("engine", "tools", "@types")
|
||||||
SRC_PATH = os.path.join("src", "zen", "@types")
|
SRC_PATH = os.path.join("src", "zen", "@types")
|
||||||
|
|
||||||
|
|
||||||
def update_ts_types():
|
def update_ts_types():
|
||||||
os.system("cd engine && ./mach ts build && ./mach ts update")
|
os.system("cd engine && ./mach ts build && ./mach ts update")
|
||||||
# copy the files from engine/tools/@types to src/@types
|
# copy the files from engine/tools/@types to src/@types
|
||||||
|
@ -36,6 +37,7 @@ def update_ts_types():
|
||||||
f.write('/// <reference types="./zen.d.ts" />\n')
|
f.write('/// <reference types="./zen.d.ts" />\n')
|
||||||
f.write('\n')
|
f.write('\n')
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
update_ts_types()
|
update_ts_types()
|
||||||
print("Updated TypeScript types.")
|
print("Updated TypeScript types.")
|
||||||
|
|
1
src/zen/@types/index.d.ts
vendored
1
src/zen/@types/index.d.ts
vendored
|
@ -34,4 +34,3 @@ declare global {
|
||||||
export {};
|
export {};
|
||||||
|
|
||||||
/// <reference types="./zen.d.ts" />
|
/// <reference types="./zen.d.ts" />
|
||||||
|
|
||||||
|
|
327
src/zen/@types/lib.gecko.darwin.d.ts
vendored
327
src/zen/@types/lib.gecko.darwin.d.ts
vendored
|
@ -5,207 +5,204 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleMacInterface.idl
|
||||||
|
|
||||||
// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleMacInterface.idl
|
interface nsIAccessibleMacNSObjectWrapper extends nsISupports {}
|
||||||
|
|
||||||
interface nsIAccessibleMacNSObjectWrapper extends nsISupports {
|
interface nsIAccessibleMacInterface extends nsISupports {
|
||||||
}
|
readonly attributeNames: string[];
|
||||||
|
readonly parameterizedAttributeNames: string[];
|
||||||
|
readonly actionNames: string[];
|
||||||
|
getAttributeValue(attributeName: string): any;
|
||||||
|
getParameterizedAttributeValue(attributeName: string, parameter: any): any;
|
||||||
|
performAction(actionName: string): void;
|
||||||
|
isAttributeSettable(attributeName: string): boolean;
|
||||||
|
setAttributeValue(attributeName: string, attributeValue: any): void;
|
||||||
|
}
|
||||||
|
|
||||||
interface nsIAccessibleMacInterface extends nsISupports {
|
interface nsIAccessibleMacEvent extends nsISupports {
|
||||||
readonly attributeNames: string[];
|
readonly macIface: nsIAccessibleMacInterface;
|
||||||
readonly parameterizedAttributeNames: string[];
|
readonly data: any;
|
||||||
readonly actionNames: string[];
|
}
|
||||||
getAttributeValue(attributeName: string): any;
|
|
||||||
getParameterizedAttributeValue(attributeName: string, parameter: any): any;
|
|
||||||
performAction(actionName: string): void;
|
|
||||||
isAttributeSettable(attributeName: string): boolean;
|
|
||||||
setAttributeValue(attributeName: string, attributeValue: any): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface nsIAccessibleMacEvent extends nsISupports {
|
// https://searchfox.org/mozilla-central/source/browser/components/migration/nsIKeychainMigrationUtils.idl
|
||||||
readonly macIface: nsIAccessibleMacInterface;
|
|
||||||
readonly data: any;
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://searchfox.org/mozilla-central/source/browser/components/migration/nsIKeychainMigrationUtils.idl
|
interface nsIKeychainMigrationUtils extends nsISupports {
|
||||||
|
getGenericPassword(aServiceName: string, aAccountName: string): string;
|
||||||
|
}
|
||||||
|
|
||||||
interface nsIKeychainMigrationUtils extends nsISupports {
|
// https://searchfox.org/mozilla-central/source/browser/components/shell/nsIMacShellService.idl
|
||||||
getGenericPassword(aServiceName: string, aAccountName: string): string;
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://searchfox.org/mozilla-central/source/browser/components/shell/nsIMacShellService.idl
|
interface nsIMacShellService extends nsIShellService {
|
||||||
|
showDesktopPreferences(): void;
|
||||||
|
showSecurityPreferences(aPaneID: string): void;
|
||||||
|
getAvailableApplicationsForProtocol(protocol: string): string[][];
|
||||||
|
}
|
||||||
|
|
||||||
interface nsIMacShellService extends nsIShellService {
|
// https://searchfox.org/mozilla-central/source/widget/nsIMacDockSupport.idl
|
||||||
showDesktopPreferences(): void;
|
|
||||||
showSecurityPreferences(aPaneID: string): void;
|
|
||||||
getAvailableApplicationsForProtocol(protocol: string): string[][];
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://searchfox.org/mozilla-central/source/widget/nsIMacDockSupport.idl
|
interface nsIAppBundleLaunchOptions extends nsISupports {
|
||||||
|
readonly addsToRecentItems: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
interface nsIAppBundleLaunchOptions extends nsISupports {
|
interface nsIMacDockSupport extends nsISupports {
|
||||||
readonly addsToRecentItems: boolean;
|
dockMenu: nsIStandaloneNativeMenu;
|
||||||
}
|
activateApplication(aIgnoreOtherApplications: boolean): void;
|
||||||
|
badgeText: string;
|
||||||
|
setBadgeImage(aBadgeImage: imgIContainer, aPaintContext?: nsISVGPaintContext): void;
|
||||||
|
readonly isAppInDock: boolean;
|
||||||
|
ensureAppIsPinnedToDock(aAppPath?: string, aAppToReplacePath?: string): boolean;
|
||||||
|
launchAppBundle(aAppBundle: nsIFile, aArgs: string[], aLaunchOptions?: nsIAppBundleLaunchOptions): void;
|
||||||
|
}
|
||||||
|
|
||||||
interface nsIMacDockSupport extends nsISupports {
|
// https://searchfox.org/mozilla-central/source/widget/nsIMacFinderProgress.idl
|
||||||
dockMenu: nsIStandaloneNativeMenu;
|
|
||||||
activateApplication(aIgnoreOtherApplications: boolean): void;
|
|
||||||
badgeText: string;
|
|
||||||
setBadgeImage(aBadgeImage: imgIContainer, aPaintContext?: nsISVGPaintContext): void;
|
|
||||||
readonly isAppInDock: boolean;
|
|
||||||
ensureAppIsPinnedToDock(aAppPath?: string, aAppToReplacePath?: string): boolean;
|
|
||||||
launchAppBundle(aAppBundle: nsIFile, aArgs: string[], aLaunchOptions?: nsIAppBundleLaunchOptions): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://searchfox.org/mozilla-central/source/widget/nsIMacFinderProgress.idl
|
type nsIMacFinderProgressCanceledCallback = Callable<{
|
||||||
|
canceled(): void;
|
||||||
|
}>;
|
||||||
|
|
||||||
type nsIMacFinderProgressCanceledCallback = Callable<{
|
interface nsIMacFinderProgress extends nsISupports {
|
||||||
canceled(): void;
|
init(path: string, canceledCallback: nsIMacFinderProgressCanceledCallback): void;
|
||||||
}>
|
updateProgress(currentProgress: u64, totalProgress: u64): void;
|
||||||
|
end(): void;
|
||||||
|
}
|
||||||
|
|
||||||
interface nsIMacFinderProgress extends nsISupports {
|
// https://searchfox.org/mozilla-central/source/widget/nsIMacSharingService.idl
|
||||||
init(path: string, canceledCallback: nsIMacFinderProgressCanceledCallback): void;
|
|
||||||
updateProgress(currentProgress: u64, totalProgress: u64): void;
|
|
||||||
end(): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://searchfox.org/mozilla-central/source/widget/nsIMacSharingService.idl
|
interface nsIMacSharingService extends nsISupports {
|
||||||
|
getSharingProviders(pageUrl: string): any;
|
||||||
|
shareUrl(serviceName: string, pageUrl: string, pageTitle: string): void;
|
||||||
|
openSharingPreferences(): void;
|
||||||
|
}
|
||||||
|
|
||||||
interface nsIMacSharingService extends nsISupports {
|
// https://searchfox.org/mozilla-central/source/widget/nsIMacUserActivityUpdater.idl
|
||||||
getSharingProviders(pageUrl: string): any;
|
|
||||||
shareUrl(serviceName: string, pageUrl: string, pageTitle: string): void;
|
|
||||||
openSharingPreferences(): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://searchfox.org/mozilla-central/source/widget/nsIMacUserActivityUpdater.idl
|
interface nsIMacUserActivityUpdater extends nsISupports {
|
||||||
|
updateLocation(pageUrl: string, pageTitle: string, window: nsIBaseWindow): void;
|
||||||
|
}
|
||||||
|
|
||||||
interface nsIMacUserActivityUpdater extends nsISupports {
|
// https://searchfox.org/mozilla-central/source/widget/nsIMacWebAppUtils.idl
|
||||||
updateLocation(pageUrl: string, pageTitle: string, window: nsIBaseWindow): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://searchfox.org/mozilla-central/source/widget/nsIMacWebAppUtils.idl
|
type nsITrashAppCallback = Callable<{
|
||||||
|
trashAppFinished(rv: nsresult): void;
|
||||||
|
}>;
|
||||||
|
|
||||||
type nsITrashAppCallback = Callable<{
|
interface nsIMacWebAppUtils extends nsISupports {
|
||||||
trashAppFinished(rv: nsresult): void;
|
pathForAppWithIdentifier(bundleIdentifier: string): string;
|
||||||
}>
|
launchAppWithIdentifier(bundleIdentifier: string): void;
|
||||||
|
trashApp(path: string, callback: nsITrashAppCallback): void;
|
||||||
|
}
|
||||||
|
|
||||||
interface nsIMacWebAppUtils extends nsISupports {
|
// https://searchfox.org/mozilla-central/source/widget/nsIStandaloneNativeMenu.idl
|
||||||
pathForAppWithIdentifier(bundleIdentifier: string): string;
|
|
||||||
launchAppWithIdentifier(bundleIdentifier: string): void;
|
|
||||||
trashApp(path: string, callback: nsITrashAppCallback): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://searchfox.org/mozilla-central/source/widget/nsIStandaloneNativeMenu.idl
|
interface nsIStandaloneNativeMenu extends nsISupports {
|
||||||
|
init(aElement: Element): void;
|
||||||
|
menuWillOpen(): boolean;
|
||||||
|
activateNativeMenuItemAt(anIndexString: string): void;
|
||||||
|
forceUpdateNativeMenuAt(anIndexString: string): void;
|
||||||
|
dump(): void;
|
||||||
|
}
|
||||||
|
|
||||||
interface nsIStandaloneNativeMenu extends nsISupports {
|
// https://searchfox.org/mozilla-central/source/widget/nsITaskbarProgress.idl
|
||||||
init(aElement: Element): void;
|
|
||||||
menuWillOpen(): boolean;
|
|
||||||
activateNativeMenuItemAt(anIndexString: string): void;
|
|
||||||
forceUpdateNativeMenuAt(anIndexString: string): void;
|
|
||||||
dump(): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://searchfox.org/mozilla-central/source/widget/nsITaskbarProgress.idl
|
interface nsITaskbarProgress extends nsISupports {
|
||||||
|
readonly STATE_NO_PROGRESS?: 0;
|
||||||
|
readonly STATE_INDETERMINATE?: 1;
|
||||||
|
readonly STATE_NORMAL?: 2;
|
||||||
|
readonly STATE_ERROR?: 3;
|
||||||
|
readonly STATE_PAUSED?: 4;
|
||||||
|
|
||||||
interface nsITaskbarProgress extends nsISupports {
|
setProgressState(state: nsTaskbarProgressState, currentValue?: u64, maxValue?: u64): void;
|
||||||
readonly STATE_NO_PROGRESS?: 0;
|
}
|
||||||
readonly STATE_INDETERMINATE?: 1;
|
|
||||||
readonly STATE_NORMAL?: 2;
|
|
||||||
readonly STATE_ERROR?: 3;
|
|
||||||
readonly STATE_PAUSED?: 4;
|
|
||||||
|
|
||||||
setProgressState(state: nsTaskbarProgressState, currentValue?: u64, maxValue?: u64): void;
|
// https://searchfox.org/mozilla-central/source/widget/nsITouchBarHelper.idl
|
||||||
}
|
|
||||||
|
|
||||||
// https://searchfox.org/mozilla-central/source/widget/nsITouchBarHelper.idl
|
interface nsITouchBarHelper extends nsISupports {
|
||||||
|
readonly activeUrl: string;
|
||||||
|
readonly activeTitle: string;
|
||||||
|
readonly isUrlbarFocused: boolean;
|
||||||
|
toggleFocusUrlbar(): void;
|
||||||
|
unfocusUrlbar(): void;
|
||||||
|
allItems: nsIArray;
|
||||||
|
readonly document: Document;
|
||||||
|
getTouchBarInput(aInputName: string): nsITouchBarInput;
|
||||||
|
insertRestrictionInUrlbar(aToken: string): void;
|
||||||
|
}
|
||||||
|
|
||||||
interface nsITouchBarHelper extends nsISupports {
|
// https://searchfox.org/mozilla-central/source/widget/nsITouchBarInput.idl
|
||||||
readonly activeUrl: string;
|
|
||||||
readonly activeTitle: string;
|
|
||||||
readonly isUrlbarFocused: boolean;
|
|
||||||
toggleFocusUrlbar(): void;
|
|
||||||
unfocusUrlbar(): void;
|
|
||||||
allItems: nsIArray;
|
|
||||||
readonly document: Document;
|
|
||||||
getTouchBarInput(aInputName: string): nsITouchBarInput;
|
|
||||||
insertRestrictionInUrlbar(aToken: string): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://searchfox.org/mozilla-central/source/widget/nsITouchBarInput.idl
|
type nsITouchBarInputCallback = Callable<{
|
||||||
|
onCommand(): void;
|
||||||
|
}>;
|
||||||
|
|
||||||
type nsITouchBarInputCallback = Callable<{
|
interface nsITouchBarInput extends nsISupports {
|
||||||
onCommand(): void;
|
readonly key: string;
|
||||||
}>
|
title: string;
|
||||||
|
image: nsIURI;
|
||||||
|
type: string;
|
||||||
|
callback: nsITouchBarInputCallback;
|
||||||
|
color: u32;
|
||||||
|
disabled: boolean;
|
||||||
|
children: nsIArray;
|
||||||
|
}
|
||||||
|
|
||||||
interface nsITouchBarInput extends nsISupports {
|
// https://searchfox.org/mozilla-central/source/widget/nsITouchBarUpdater.idl
|
||||||
readonly key: string;
|
|
||||||
title: string;
|
|
||||||
image: nsIURI;
|
|
||||||
type: string;
|
|
||||||
callback: nsITouchBarInputCallback;
|
|
||||||
color: u32;
|
|
||||||
disabled: boolean;
|
|
||||||
children: nsIArray;
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://searchfox.org/mozilla-central/source/widget/nsITouchBarUpdater.idl
|
interface nsITouchBarUpdater extends nsISupports {
|
||||||
|
updateTouchBarInputs(aWindow: nsIBaseWindow, aInputs: nsITouchBarInput[]): void;
|
||||||
|
enterCustomizeMode(): void;
|
||||||
|
isTouchBarInitialized(): boolean;
|
||||||
|
setTouchBarInitialized(aIsInitialized: boolean): void;
|
||||||
|
showPopover(aWindow: nsIBaseWindow, aPopover: nsITouchBarInput, aShowing: boolean): void;
|
||||||
|
}
|
||||||
|
|
||||||
interface nsITouchBarUpdater extends nsISupports {
|
// https://searchfox.org/mozilla-central/source/xpcom/base/nsIMacPreferencesReader.idl
|
||||||
updateTouchBarInputs(aWindow: nsIBaseWindow, aInputs: nsITouchBarInput[]): void;
|
|
||||||
enterCustomizeMode(): void;
|
|
||||||
isTouchBarInitialized(): boolean;
|
|
||||||
setTouchBarInitialized(aIsInitialized: boolean): void;
|
|
||||||
showPopover(aWindow: nsIBaseWindow, aPopover: nsITouchBarInput, aShowing: boolean): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://searchfox.org/mozilla-central/source/xpcom/base/nsIMacPreferencesReader.idl
|
interface nsIMacPreferencesReader extends nsISupports {
|
||||||
|
policiesEnabled(): boolean;
|
||||||
|
readPreferences(): any;
|
||||||
|
}
|
||||||
|
|
||||||
interface nsIMacPreferencesReader extends nsISupports {
|
// https://searchfox.org/mozilla-central/source/xpcom/io/nsILocalFileMac.idl
|
||||||
policiesEnabled(): boolean;
|
|
||||||
readPreferences(): any;
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://searchfox.org/mozilla-central/source/xpcom/io/nsILocalFileMac.idl
|
interface nsILocalFileMac extends nsIFile {
|
||||||
|
readonly fileSizeWithResFork: i64;
|
||||||
|
launchWithDoc(aDocToLoad: nsIFile, aLaunchInBackground: boolean): void;
|
||||||
|
openDocWithApp(aAppToOpenWith: nsIFile, aLaunchInBackground: boolean): void;
|
||||||
|
isPackage(): boolean;
|
||||||
|
readonly bundleDisplayName: string;
|
||||||
|
readonly bundleIdentifier: string;
|
||||||
|
readonly bundleContentsLastModifiedTime: i64;
|
||||||
|
hasXAttr(aAttrName: string): boolean;
|
||||||
|
getXAttr(aAttrName: string): u8[];
|
||||||
|
setXAttr(aAttrName: string, aAttrValue: u8[]): void;
|
||||||
|
delXAttr(aAttrName: string): void;
|
||||||
|
}
|
||||||
|
|
||||||
interface nsILocalFileMac extends nsIFile {
|
interface nsIXPCComponents_Interfaces {
|
||||||
readonly fileSizeWithResFork: i64;
|
nsIAccessibleMacNSObjectWrapper: nsJSIID<nsIAccessibleMacNSObjectWrapper>;
|
||||||
launchWithDoc(aDocToLoad: nsIFile, aLaunchInBackground: boolean): void;
|
nsIAccessibleMacInterface: nsJSIID<nsIAccessibleMacInterface>;
|
||||||
openDocWithApp(aAppToOpenWith: nsIFile, aLaunchInBackground: boolean): void;
|
nsIAccessibleMacEvent: nsJSIID<nsIAccessibleMacEvent>;
|
||||||
isPackage(): boolean;
|
nsIKeychainMigrationUtils: nsJSIID<nsIKeychainMigrationUtils>;
|
||||||
readonly bundleDisplayName: string;
|
nsIMacShellService: nsJSIID<nsIMacShellService>;
|
||||||
readonly bundleIdentifier: string;
|
nsIAppBundleLaunchOptions: nsJSIID<nsIAppBundleLaunchOptions>;
|
||||||
readonly bundleContentsLastModifiedTime: i64;
|
nsIMacDockSupport: nsJSIID<nsIMacDockSupport>;
|
||||||
hasXAttr(aAttrName: string): boolean;
|
nsIMacFinderProgressCanceledCallback: nsJSIID<nsIMacFinderProgressCanceledCallback>;
|
||||||
getXAttr(aAttrName: string): u8[];
|
nsIMacFinderProgress: nsJSIID<nsIMacFinderProgress>;
|
||||||
setXAttr(aAttrName: string, aAttrValue: u8[]): void;
|
nsIMacSharingService: nsJSIID<nsIMacSharingService>;
|
||||||
delXAttr(aAttrName: string): void;
|
nsIMacUserActivityUpdater: nsJSIID<nsIMacUserActivityUpdater>;
|
||||||
}
|
nsITrashAppCallback: nsJSIID<nsITrashAppCallback>;
|
||||||
|
nsIMacWebAppUtils: nsJSIID<nsIMacWebAppUtils>;
|
||||||
interface nsIXPCComponents_Interfaces {
|
nsIStandaloneNativeMenu: nsJSIID<nsIStandaloneNativeMenu>;
|
||||||
nsIAccessibleMacNSObjectWrapper: nsJSIID<nsIAccessibleMacNSObjectWrapper>;
|
nsITaskbarProgress: nsJSIID<nsITaskbarProgress>;
|
||||||
nsIAccessibleMacInterface: nsJSIID<nsIAccessibleMacInterface>;
|
nsITouchBarHelper: nsJSIID<nsITouchBarHelper>;
|
||||||
nsIAccessibleMacEvent: nsJSIID<nsIAccessibleMacEvent>;
|
nsITouchBarInputCallback: nsJSIID<nsITouchBarInputCallback>;
|
||||||
nsIKeychainMigrationUtils: nsJSIID<nsIKeychainMigrationUtils>;
|
nsITouchBarInput: nsJSIID<nsITouchBarInput>;
|
||||||
nsIMacShellService: nsJSIID<nsIMacShellService>;
|
nsITouchBarUpdater: nsJSIID<nsITouchBarUpdater>;
|
||||||
nsIAppBundleLaunchOptions: nsJSIID<nsIAppBundleLaunchOptions>;
|
nsIMacPreferencesReader: nsJSIID<nsIMacPreferencesReader>;
|
||||||
nsIMacDockSupport: nsJSIID<nsIMacDockSupport>;
|
nsILocalFileMac: nsJSIID<nsILocalFileMac>;
|
||||||
nsIMacFinderProgressCanceledCallback: nsJSIID<nsIMacFinderProgressCanceledCallback>;
|
}
|
||||||
nsIMacFinderProgress: nsJSIID<nsIMacFinderProgress>;
|
} // global
|
||||||
nsIMacSharingService: nsJSIID<nsIMacSharingService>;
|
|
||||||
nsIMacUserActivityUpdater: nsJSIID<nsIMacUserActivityUpdater>;
|
|
||||||
nsITrashAppCallback: nsJSIID<nsITrashAppCallback>;
|
|
||||||
nsIMacWebAppUtils: nsJSIID<nsIMacWebAppUtils>;
|
|
||||||
nsIStandaloneNativeMenu: nsJSIID<nsIStandaloneNativeMenu>;
|
|
||||||
nsITaskbarProgress: nsJSIID<nsITaskbarProgress>;
|
|
||||||
nsITouchBarHelper: nsJSIID<nsITouchBarHelper>;
|
|
||||||
nsITouchBarInputCallback: nsJSIID<nsITouchBarInputCallback>;
|
|
||||||
nsITouchBarInput: nsJSIID<nsITouchBarInput>;
|
|
||||||
nsITouchBarUpdater: nsJSIID<nsITouchBarUpdater>;
|
|
||||||
nsIMacPreferencesReader: nsJSIID<nsIMacPreferencesReader>;
|
|
||||||
nsILocalFileMac: nsJSIID<nsILocalFileMac>;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // global
|
|
||||||
|
|
||||||
// Typedefs from xpidl.
|
// Typedefs from xpidl.
|
||||||
type PRTime = i64;
|
type PRTime = i64;
|
||||||
|
@ -223,6 +220,6 @@ type OutParam<T> = { value?: T };
|
||||||
type Enums<enums> = Partial<Pick<enums, keyof enums>>;
|
type Enums<enums> = Partial<Pick<enums, keyof enums>>;
|
||||||
|
|
||||||
/** Callable accepts either form of a [function] interface. */
|
/** Callable accepts either form of a [function] interface. */
|
||||||
type Callable<iface> = iface | Extract<iface[keyof iface], Function>
|
type Callable<iface> = iface | Extract<iface[keyof iface], Function>;
|
||||||
|
|
||||||
export {};
|
export {};
|
||||||
|
|
40803
src/zen/@types/lib.gecko.dom.d.ts
vendored
40803
src/zen/@types/lib.gecko.dom.d.ts
vendored
File diff suppressed because it is too large
Load diff
84
src/zen/@types/lib.gecko.linux.d.ts
vendored
84
src/zen/@types/lib.gecko.linux.d.ts
vendored
|
@ -5,60 +5,58 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
// https://searchfox.org/mozilla-central/source/browser/components/shell/nsIGNOMEShellService.idl
|
||||||
|
|
||||||
// https://searchfox.org/mozilla-central/source/browser/components/shell/nsIGNOMEShellService.idl
|
interface nsIGNOMEShellService extends nsIShellService {
|
||||||
|
readonly canSetDesktopBackground: boolean;
|
||||||
|
isDefaultForScheme(aScheme: string): boolean;
|
||||||
|
}
|
||||||
|
|
||||||
interface nsIGNOMEShellService extends nsIShellService {
|
// https://searchfox.org/mozilla-central/source/browser/components/shell/nsIOpenTabsProvider.idl
|
||||||
readonly canSetDesktopBackground: boolean;
|
|
||||||
isDefaultForScheme(aScheme: string): boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://searchfox.org/mozilla-central/source/browser/components/shell/nsIOpenTabsProvider.idl
|
interface nsIOpenTabsProvider extends nsISupports {
|
||||||
|
getOpenTabs(): string[];
|
||||||
|
switchToOpenTab(url: string): void;
|
||||||
|
}
|
||||||
|
|
||||||
interface nsIOpenTabsProvider extends nsISupports {
|
// https://searchfox.org/mozilla-central/source/widget/nsIApplicationChooser.idl
|
||||||
getOpenTabs(): string[];
|
|
||||||
switchToOpenTab(url: string): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://searchfox.org/mozilla-central/source/widget/nsIApplicationChooser.idl
|
type nsIApplicationChooserFinishedCallback = Callable<{
|
||||||
|
done(handlerApp: nsIHandlerApp): void;
|
||||||
|
}>;
|
||||||
|
|
||||||
type nsIApplicationChooserFinishedCallback = Callable<{
|
interface nsIApplicationChooser extends nsISupports {
|
||||||
done(handlerApp: nsIHandlerApp): void;
|
init(parent: mozIDOMWindowProxy, title: string): void;
|
||||||
}>
|
open(contentType: string, applicationChooserFinishedCallback: nsIApplicationChooserFinishedCallback): void;
|
||||||
|
}
|
||||||
|
|
||||||
interface nsIApplicationChooser extends nsISupports {
|
// https://searchfox.org/mozilla-central/source/widget/nsIGtkTaskbarProgress.idl
|
||||||
init(parent: mozIDOMWindowProxy, title: string): void;
|
|
||||||
open(contentType: string, applicationChooserFinishedCallback: nsIApplicationChooserFinishedCallback): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://searchfox.org/mozilla-central/source/widget/nsIGtkTaskbarProgress.idl
|
interface nsIGtkTaskbarProgress extends nsITaskbarProgress {
|
||||||
|
setPrimaryWindow(aWindow: mozIDOMWindowProxy): void;
|
||||||
|
}
|
||||||
|
|
||||||
interface nsIGtkTaskbarProgress extends nsITaskbarProgress {
|
// https://searchfox.org/mozilla-central/source/widget/nsITaskbarProgress.idl
|
||||||
setPrimaryWindow(aWindow: mozIDOMWindowProxy): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://searchfox.org/mozilla-central/source/widget/nsITaskbarProgress.idl
|
interface nsITaskbarProgress extends nsISupports {
|
||||||
|
readonly STATE_NO_PROGRESS?: 0;
|
||||||
|
readonly STATE_INDETERMINATE?: 1;
|
||||||
|
readonly STATE_NORMAL?: 2;
|
||||||
|
readonly STATE_ERROR?: 3;
|
||||||
|
readonly STATE_PAUSED?: 4;
|
||||||
|
|
||||||
interface nsITaskbarProgress extends nsISupports {
|
setProgressState(state: nsTaskbarProgressState, currentValue?: u64, maxValue?: u64): void;
|
||||||
readonly STATE_NO_PROGRESS?: 0;
|
}
|
||||||
readonly STATE_INDETERMINATE?: 1;
|
|
||||||
readonly STATE_NORMAL?: 2;
|
|
||||||
readonly STATE_ERROR?: 3;
|
|
||||||
readonly STATE_PAUSED?: 4;
|
|
||||||
|
|
||||||
setProgressState(state: nsTaskbarProgressState, currentValue?: u64, maxValue?: u64): void;
|
interface nsIXPCComponents_Interfaces {
|
||||||
}
|
nsIGNOMEShellService: nsJSIID<nsIGNOMEShellService>;
|
||||||
|
nsIOpenTabsProvider: nsJSIID<nsIOpenTabsProvider>;
|
||||||
interface nsIXPCComponents_Interfaces {
|
nsIApplicationChooserFinishedCallback: nsJSIID<nsIApplicationChooserFinishedCallback>;
|
||||||
nsIGNOMEShellService: nsJSIID<nsIGNOMEShellService>;
|
nsIApplicationChooser: nsJSIID<nsIApplicationChooser>;
|
||||||
nsIOpenTabsProvider: nsJSIID<nsIOpenTabsProvider>;
|
nsIGtkTaskbarProgress: nsJSIID<nsIGtkTaskbarProgress>;
|
||||||
nsIApplicationChooserFinishedCallback: nsJSIID<nsIApplicationChooserFinishedCallback>;
|
nsITaskbarProgress: nsJSIID<nsITaskbarProgress>;
|
||||||
nsIApplicationChooser: nsJSIID<nsIApplicationChooser>;
|
}
|
||||||
nsIGtkTaskbarProgress: nsJSIID<nsIGtkTaskbarProgress>;
|
} // global
|
||||||
nsITaskbarProgress: nsJSIID<nsITaskbarProgress>;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // global
|
|
||||||
|
|
||||||
// Typedefs from xpidl.
|
// Typedefs from xpidl.
|
||||||
type PRTime = i64;
|
type PRTime = i64;
|
||||||
|
@ -77,6 +75,6 @@ type OutParam<T> = { value?: T };
|
||||||
type Enums<enums> = Partial<Pick<enums, keyof enums>>;
|
type Enums<enums> = Partial<Pick<enums, keyof enums>>;
|
||||||
|
|
||||||
/** Callable accepts either form of a [function] interface. */
|
/** Callable accepts either form of a [function] interface. */
|
||||||
type Callable<iface> = iface | Extract<iface[keyof iface], Function>
|
type Callable<iface> = iface | Extract<iface[keyof iface], Function>;
|
||||||
|
|
||||||
export {};
|
export {};
|
||||||
|
|
1888
src/zen/@types/lib.gecko.modules.d.ts
vendored
1888
src/zen/@types/lib.gecko.modules.d.ts
vendored
File diff suppressed because it is too large
Load diff
1
src/zen/@types/lib.gecko.nsresult.d.ts
vendored
1
src/zen/@types/lib.gecko.nsresult.d.ts
vendored
|
@ -5,7 +5,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
interface nsIXPCComponents_Results {
|
interface nsIXPCComponents_Results {
|
||||||
|
|
||||||
// Error Message definitions.
|
// Error Message definitions.
|
||||||
|
|
||||||
// xpconnect specific codes (from nsIXPConnect.h)
|
// xpconnect specific codes (from nsIXPConnect.h)
|
||||||
|
|
39
src/zen/@types/lib.gecko.tweaks.d.ts
vendored
39
src/zen/@types/lib.gecko.tweaks.d.ts
vendored
|
@ -17,21 +17,21 @@ interface ChromeWindow extends Window {
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Document {
|
interface Document {
|
||||||
createXULElement(name: "browser"): XULBrowserElement;
|
createXULElement(name: 'browser'): XULBrowserElement;
|
||||||
}
|
}
|
||||||
|
|
||||||
type nsIGleanPingNoReason = {
|
type nsIGleanPingNoReason = {
|
||||||
[K in keyof nsIGleanPing]: K extends "submit" ? (_?: never) => void : nsIGleanPing[K];
|
[K in keyof nsIGleanPing]: K extends 'submit' ? (_?: never) => void : nsIGleanPing[K];
|
||||||
}
|
};
|
||||||
|
|
||||||
type nsIGleanPingWithReason<T> = {
|
type nsIGleanPingWithReason<T> = {
|
||||||
[K in keyof nsIGleanPing]: K extends "submit" ? (reason: T) => void : nsIGleanPing[K];
|
[K in keyof nsIGleanPing]: K extends 'submit' ? (reason: T) => void : nsIGleanPing[K];
|
||||||
}
|
};
|
||||||
|
|
||||||
interface MessageListenerManagerMixin {
|
interface MessageListenerManagerMixin {
|
||||||
// Overloads that define `data` arg as required, since it's ~always expected.
|
// Overloads that define `data` arg as required, since it's ~always expected.
|
||||||
addMessageListener(msg: string, listener: { receiveMessage(_: ReceiveMessageArgument & { data })});
|
addMessageListener(msg: string, listener: { receiveMessage(_: ReceiveMessageArgument & { data }) });
|
||||||
removeMessageListener(msg: string, listener: { receiveMessage(_: ReceiveMessageArgument & { data })});
|
removeMessageListener(msg: string, listener: { receiveMessage(_: ReceiveMessageArgument & { data }) });
|
||||||
}
|
}
|
||||||
|
|
||||||
interface MozQueryInterface {
|
interface MozQueryInterface {
|
||||||
|
@ -52,31 +52,30 @@ interface nsISupports {
|
||||||
}
|
}
|
||||||
|
|
||||||
interface nsIXPCComponents_Constructor {
|
interface nsIXPCComponents_Constructor {
|
||||||
<const T, IIDs = nsIXPCComponents_Interfaces>(cid, id: T, init?): {
|
<const T, IIDs = nsIXPCComponents_Interfaces>(
|
||||||
|
cid,
|
||||||
|
id: T,
|
||||||
|
init?
|
||||||
|
): {
|
||||||
new (...any): nsQIResult<T extends keyof IIDs ? IIDs[T] : T>;
|
new (...any): nsQIResult<T extends keyof IIDs ? IIDs[T] : T>;
|
||||||
(...any): nsQIResult<T extends keyof IIDs ? IIDs[T] : T>;
|
(...any): nsQIResult<T extends keyof IIDs ? IIDs[T] : T>;
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ComponentsExceptionOptions {
|
interface ComponentsExceptionOptions {
|
||||||
result?: number,
|
result?: number;
|
||||||
stack?: nsIStackFrame,
|
stack?: nsIStackFrame;
|
||||||
data?: object,
|
data?: object;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface nsIException extends Exception {}
|
interface nsIException extends Exception {}
|
||||||
|
|
||||||
interface nsIXPCComponents_Exception {
|
interface nsIXPCComponents_Exception {
|
||||||
(
|
(message?: string, resultOrOptions?: number | ComponentsExceptionOptions, stack?: nsIStackFrame, data?: object): nsIException;
|
||||||
message?: string,
|
|
||||||
resultOrOptions?: number | ComponentsExceptionOptions,
|
|
||||||
stack?: nsIStackFrame,
|
|
||||||
data?: object
|
|
||||||
): nsIException;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface nsIXPCComponents_ID {
|
interface nsIXPCComponents_ID {
|
||||||
(uuid: string): nsID
|
(uuid: string): nsID;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface nsIXPCComponents_utils_Sandbox {
|
interface nsIXPCComponents_utils_Sandbox {
|
||||||
|
@ -87,7 +86,7 @@ interface nsXPCComponents_Classes {
|
||||||
[cid: string]: {
|
[cid: string]: {
|
||||||
createInstance<T>(aID: T): nsQIResult<T>;
|
createInstance<T>(aID: T): nsQIResult<T>;
|
||||||
getService<T>(aID?: T): unknown extends T ? nsISupports : nsQIResult<T>;
|
getService<T>(aID?: T): unknown extends T ? nsISupports : nsQIResult<T>;
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generic overloads.
|
// Generic overloads.
|
||||||
|
|
582
src/zen/@types/lib.gecko.win32.d.ts
vendored
582
src/zen/@types/lib.gecko.win32.d.ts
vendored
|
@ -5,39 +5,37 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
// https://searchfox.org/mozilla-central/source/toolkit/components/aboutthirdparty/nsIAboutThirdParty.idl
|
||||||
|
|
||||||
// https://searchfox.org/mozilla-central/source/toolkit/components/aboutthirdparty/nsIAboutThirdParty.idl
|
interface nsIInstalledApplication extends nsISupports {
|
||||||
|
readonly name: string;
|
||||||
|
readonly publisher: string;
|
||||||
|
}
|
||||||
|
|
||||||
interface nsIInstalledApplication extends nsISupports {
|
interface nsIAboutThirdParty extends nsISupports {
|
||||||
readonly name: string;
|
readonly ModuleType_Unknown?: 1;
|
||||||
readonly publisher: string;
|
readonly ModuleType_IME?: 2;
|
||||||
}
|
readonly ModuleType_ShellExtension?: 4;
|
||||||
|
readonly ModuleType_BlockedByUser?: 8;
|
||||||
|
readonly ModuleType_BlockedByUserAtLaunch?: 16;
|
||||||
|
|
||||||
interface nsIAboutThirdParty extends nsISupports {
|
lookupModuleType(aLeafName: string): u32;
|
||||||
readonly ModuleType_Unknown?: 1;
|
lookupApplication(aModulePath: string): nsIInstalledApplication;
|
||||||
readonly ModuleType_IME?: 2;
|
readonly isDynamicBlocklistAvailable: boolean;
|
||||||
readonly ModuleType_ShellExtension?: 4;
|
readonly isDynamicBlocklistDisabled: boolean;
|
||||||
readonly ModuleType_BlockedByUser?: 8;
|
updateBlocklist(aLeafName: string, aNewBlockStatus: boolean): Promise<any>;
|
||||||
readonly ModuleType_BlockedByUserAtLaunch?: 16;
|
collectSystemInfo(): Promise<any>;
|
||||||
|
loadModuleForTesting(aModulePath: string): void;
|
||||||
|
}
|
||||||
|
|
||||||
lookupModuleType(aLeafName: string): u32;
|
// https://searchfox.org/mozilla-central/source/toolkit/components/aboutwindowsmessages/nsIAboutWindowsMessages.idl
|
||||||
lookupApplication(aModulePath: string): nsIInstalledApplication;
|
|
||||||
readonly isDynamicBlocklistAvailable: boolean;
|
|
||||||
readonly isDynamicBlocklistDisabled: boolean;
|
|
||||||
updateBlocklist(aLeafName: string, aNewBlockStatus: boolean): Promise<any>;
|
|
||||||
collectSystemInfo(): Promise<any>;
|
|
||||||
loadModuleForTesting(aModulePath: string): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://searchfox.org/mozilla-central/source/toolkit/components/aboutwindowsmessages/nsIAboutWindowsMessages.idl
|
interface nsIAboutWindowsMessages extends nsISupports {
|
||||||
|
getMessages(currentWindow: mozIDOMWindowProxy, messages: OutParam<string[][]>, windowTitles: OutParam<string[]>): void;
|
||||||
|
}
|
||||||
|
|
||||||
interface nsIAboutWindowsMessages extends nsISupports {
|
// https://searchfox.org/mozilla-central/source/toolkit/components/alerts/nsIWindowsAlertsService.idl
|
||||||
getMessages(currentWindow: mozIDOMWindowProxy, messages: OutParam<string[][]>, windowTitles: OutParam<string[]>): void;
|
} // global
|
||||||
}
|
|
||||||
|
|
||||||
// https://searchfox.org/mozilla-central/source/toolkit/components/alerts/nsIWindowsAlertsService.idl
|
|
||||||
|
|
||||||
} // global
|
|
||||||
|
|
||||||
declare enum nsIWindowsAlertNotification_ImagePlacement {
|
declare enum nsIWindowsAlertNotification_ImagePlacement {
|
||||||
eInline = 0,
|
eInline = 0,
|
||||||
|
@ -46,62 +44,67 @@ declare enum nsIWindowsAlertNotification_ImagePlacement {
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
namespace nsIWindowsAlertNotification {
|
||||||
|
type ImagePlacement = nsIWindowsAlertNotification_ImagePlacement;
|
||||||
|
}
|
||||||
|
|
||||||
namespace nsIWindowsAlertNotification {
|
interface nsIWindowsAlertNotification extends nsIAlertNotification, Enums<typeof nsIWindowsAlertNotification_ImagePlacement> {
|
||||||
type ImagePlacement = nsIWindowsAlertNotification_ImagePlacement;
|
imagePlacement: nsIWindowsAlertNotification.ImagePlacement;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface nsIWindowsAlertNotification extends nsIAlertNotification, Enums<typeof nsIWindowsAlertNotification_ImagePlacement> {
|
interface nsIWindowsAlertsService extends nsIAlertsService {
|
||||||
imagePlacement: nsIWindowsAlertNotification.ImagePlacement;
|
handleWindowsTag(aWindowsTag: string): Promise<any>;
|
||||||
}
|
getXmlStringForWindowsAlert(aAlert: nsIAlertNotification, aWindowsTag?: string): string;
|
||||||
|
removeAllNotificationsForInstall(): void;
|
||||||
|
}
|
||||||
|
|
||||||
interface nsIWindowsAlertsService extends nsIAlertsService {
|
// https://searchfox.org/mozilla-central/source/toolkit/mozapps/defaultagent/nsIDefaultAgent.idl
|
||||||
handleWindowsTag(aWindowsTag: string): Promise<any>;
|
|
||||||
getXmlStringForWindowsAlert(aAlert: nsIAlertNotification, aWindowsTag?: string): string;
|
|
||||||
removeAllNotificationsForInstall(): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://searchfox.org/mozilla-central/source/toolkit/mozapps/defaultagent/nsIDefaultAgent.idl
|
interface nsIDefaultAgent extends nsISupports {
|
||||||
|
registerTask(aUniqueToken: string): void;
|
||||||
|
updateTask(aUniqueToken: string): void;
|
||||||
|
unregisterTask(aUniqueToken: string): void;
|
||||||
|
uninstall(aUniqueToken: string): void;
|
||||||
|
secondsSinceLastAppRun(): i64;
|
||||||
|
getDefaultBrowser(): string;
|
||||||
|
getReplacePreviousDefaultBrowser(aCurrentBrowser: string): string;
|
||||||
|
getDefaultPdfHandler(): string;
|
||||||
|
sendPing(
|
||||||
|
aCurrentBrowser: string,
|
||||||
|
aPreviousBrowser: string,
|
||||||
|
aPdfHandler: string,
|
||||||
|
aNotificationShown: string,
|
||||||
|
aNotificationAction: string,
|
||||||
|
daysSinceLastAppLaunch: u32
|
||||||
|
): void;
|
||||||
|
setDefaultBrowserUserChoice(aAumid: string, aExtraFileExtensions: string[]): void;
|
||||||
|
setDefaultBrowserUserChoiceAsync(aAumid: string, aExtraFileExtensions: string[]): Promise<any>;
|
||||||
|
setDefaultExtensionHandlersUserChoice(aAumid: string, aFileExtensions: string[]): void;
|
||||||
|
agentDisabled(): boolean;
|
||||||
|
}
|
||||||
|
|
||||||
interface nsIDefaultAgent extends nsISupports {
|
// https://searchfox.org/mozilla-central/source/toolkit/mozapps/defaultagent/nsIWindowsMutex.idl
|
||||||
registerTask(aUniqueToken: string): void;
|
|
||||||
updateTask(aUniqueToken: string): void;
|
|
||||||
unregisterTask(aUniqueToken: string): void;
|
|
||||||
uninstall(aUniqueToken: string): void;
|
|
||||||
secondsSinceLastAppRun(): i64;
|
|
||||||
getDefaultBrowser(): string;
|
|
||||||
getReplacePreviousDefaultBrowser(aCurrentBrowser: string): string;
|
|
||||||
getDefaultPdfHandler(): string;
|
|
||||||
sendPing(aCurrentBrowser: string, aPreviousBrowser: string, aPdfHandler: string, aNotificationShown: string, aNotificationAction: string, daysSinceLastAppLaunch: u32): void;
|
|
||||||
setDefaultBrowserUserChoice(aAumid: string, aExtraFileExtensions: string[]): void;
|
|
||||||
setDefaultBrowserUserChoiceAsync(aAumid: string, aExtraFileExtensions: string[]): Promise<any>;
|
|
||||||
setDefaultExtensionHandlersUserChoice(aAumid: string, aFileExtensions: string[]): void;
|
|
||||||
agentDisabled(): boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://searchfox.org/mozilla-central/source/toolkit/mozapps/defaultagent/nsIWindowsMutex.idl
|
interface nsIWindowsMutex extends nsISupports {
|
||||||
|
tryLock(): void;
|
||||||
|
isLocked(): boolean;
|
||||||
|
unlock(): void;
|
||||||
|
}
|
||||||
|
|
||||||
interface nsIWindowsMutex extends nsISupports {
|
interface nsIWindowsMutexFactory extends nsISupports {
|
||||||
tryLock(): void;
|
createMutex(aName: string): nsIWindowsMutex;
|
||||||
isLocked(): boolean;
|
}
|
||||||
unlock(): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface nsIWindowsMutexFactory extends nsISupports {
|
// https://searchfox.org/mozilla-central/source/dom/geolocation/nsIGeolocationUIUtilsWin.idl
|
||||||
createMutex(aName: string): nsIWindowsMutex;
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://searchfox.org/mozilla-central/source/dom/geolocation/nsIGeolocationUIUtilsWin.idl
|
interface nsIGeolocationUIUtilsWin extends nsISupports {
|
||||||
|
dismissPrompts(aBC: BrowsingContext): void;
|
||||||
|
}
|
||||||
|
|
||||||
interface nsIGeolocationUIUtilsWin extends nsISupports {
|
// https://searchfox.org/mozilla-central/source/netwerk/socket/nsINamedPipeService.idl
|
||||||
dismissPrompts(aBC: BrowsingContext): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://searchfox.org/mozilla-central/source/netwerk/socket/nsINamedPipeService.idl
|
// https://searchfox.org/mozilla-central/source/browser/components/shell/nsIWindowsShellService.idl
|
||||||
|
} // global
|
||||||
// https://searchfox.org/mozilla-central/source/browser/components/shell/nsIWindowsShellService.idl
|
|
||||||
|
|
||||||
} // global
|
|
||||||
|
|
||||||
declare enum nsIWindowsShellService_LaunchOnLoginEnabledEnumerator {
|
declare enum nsIWindowsShellService_LaunchOnLoginEnabledEnumerator {
|
||||||
LAUNCH_ON_LOGIN_DISABLED_BY_SETTINGS = 0,
|
LAUNCH_ON_LOGIN_DISABLED_BY_SETTINGS = 0,
|
||||||
|
@ -111,253 +114,262 @@ declare enum nsIWindowsShellService_LaunchOnLoginEnabledEnumerator {
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
namespace nsIWindowsShellService {
|
||||||
|
type LaunchOnLoginEnabledEnumerator = nsIWindowsShellService_LaunchOnLoginEnabledEnumerator;
|
||||||
|
}
|
||||||
|
|
||||||
namespace nsIWindowsShellService {
|
interface nsIWindowsShellService
|
||||||
type LaunchOnLoginEnabledEnumerator = nsIWindowsShellService_LaunchOnLoginEnabledEnumerator;
|
extends nsIShellService,
|
||||||
}
|
Enums<typeof nsIWindowsShellService_LaunchOnLoginEnabledEnumerator> {
|
||||||
|
createShortcut(
|
||||||
|
aBinary: nsIFile,
|
||||||
|
aArguments: string[],
|
||||||
|
aDescription: string,
|
||||||
|
aIconFile: nsIFile,
|
||||||
|
aIconIndex: u16,
|
||||||
|
aAppUserModelId: string,
|
||||||
|
aShortcutFolder: string,
|
||||||
|
aShortcutName: string
|
||||||
|
): Promise<any>;
|
||||||
|
getLaunchOnLoginShortcuts(): string[];
|
||||||
|
pinCurrentAppToStartMenuAsync(aCheckOnly: boolean): Promise<any>;
|
||||||
|
isCurrentAppPinnedToStartMenuAsync(): Promise<any>;
|
||||||
|
enableLaunchOnLoginMSIXAsync(aTaskId: string): Promise<any>;
|
||||||
|
disableLaunchOnLoginMSIXAsync(aTaskId: string): Promise<any>;
|
||||||
|
getLaunchOnLoginEnabledMSIXAsync(aTaskId: string): Promise<any>;
|
||||||
|
pinCurrentAppToTaskbarAsync(aPrivateBrowsing: boolean): Promise<any>;
|
||||||
|
checkPinCurrentAppToTaskbarAsync(aPrivateBrowsing: boolean): Promise<any>;
|
||||||
|
isCurrentAppPinnedToTaskbarAsync(aumid: string): Promise<any>;
|
||||||
|
pinShortcutToTaskbar(aAppUserModelId: string, aShortcutPath: string): Promise<any>;
|
||||||
|
createWindowsIcon(aFile: nsIFile, aContainer: imgIContainer): Promise<any>;
|
||||||
|
unpinShortcutFromTaskbar(aShortcutPath: string): void;
|
||||||
|
getTaskbarTabShortcutPath(aShortcutName: string): string;
|
||||||
|
getTaskbarTabPins(): string[];
|
||||||
|
classifyShortcut(aPath: string): string;
|
||||||
|
hasPinnableShortcut(aAUMID: string, aPrivateBrowsing: boolean): Promise<any>;
|
||||||
|
canSetDefaultBrowserUserChoice(): boolean;
|
||||||
|
checkAllProgIDsExist(): boolean;
|
||||||
|
checkBrowserUserChoiceHashes(): boolean;
|
||||||
|
isDefaultHandlerFor(aFileExtensionOrProtocol: string): boolean;
|
||||||
|
queryCurrentDefaultHandlerFor(aFileExtensionOrProtocol: string): string;
|
||||||
|
}
|
||||||
|
|
||||||
interface nsIWindowsShellService extends nsIShellService, Enums<typeof nsIWindowsShellService_LaunchOnLoginEnabledEnumerator> {
|
// https://searchfox.org/mozilla-central/source/toolkit/components/taskscheduler/nsIWinTaskSchedulerService.idl
|
||||||
createShortcut(aBinary: nsIFile, aArguments: string[], aDescription: string, aIconFile: nsIFile, aIconIndex: u16, aAppUserModelId: string, aShortcutFolder: string, aShortcutName: string): Promise<any>;
|
|
||||||
getLaunchOnLoginShortcuts(): string[];
|
|
||||||
pinCurrentAppToStartMenuAsync(aCheckOnly: boolean): Promise<any>;
|
|
||||||
isCurrentAppPinnedToStartMenuAsync(): Promise<any>;
|
|
||||||
enableLaunchOnLoginMSIXAsync(aTaskId: string): Promise<any>;
|
|
||||||
disableLaunchOnLoginMSIXAsync(aTaskId: string): Promise<any>;
|
|
||||||
getLaunchOnLoginEnabledMSIXAsync(aTaskId: string): Promise<any>;
|
|
||||||
pinCurrentAppToTaskbarAsync(aPrivateBrowsing: boolean): Promise<any>;
|
|
||||||
checkPinCurrentAppToTaskbarAsync(aPrivateBrowsing: boolean): Promise<any>;
|
|
||||||
isCurrentAppPinnedToTaskbarAsync(aumid: string): Promise<any>;
|
|
||||||
pinShortcutToTaskbar(aAppUserModelId: string, aShortcutPath: string): Promise<any>;
|
|
||||||
createWindowsIcon(aFile: nsIFile, aContainer: imgIContainer): Promise<any>;
|
|
||||||
unpinShortcutFromTaskbar(aShortcutPath: string): void;
|
|
||||||
getTaskbarTabShortcutPath(aShortcutName: string): string;
|
|
||||||
getTaskbarTabPins(): string[];
|
|
||||||
classifyShortcut(aPath: string): string;
|
|
||||||
hasPinnableShortcut(aAUMID: string, aPrivateBrowsing: boolean): Promise<any>;
|
|
||||||
canSetDefaultBrowserUserChoice(): boolean;
|
|
||||||
checkAllProgIDsExist(): boolean;
|
|
||||||
checkBrowserUserChoiceHashes(): boolean;
|
|
||||||
isDefaultHandlerFor(aFileExtensionOrProtocol: string): boolean;
|
|
||||||
queryCurrentDefaultHandlerFor(aFileExtensionOrProtocol: string): string;
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://searchfox.org/mozilla-central/source/toolkit/components/taskscheduler/nsIWinTaskSchedulerService.idl
|
interface nsIWinTaskSchedulerService extends nsISupports {
|
||||||
|
registerTask(aFolderName: string, aTaskName: string, aDefinitionXML: string, aUpdateExisting?: boolean): void;
|
||||||
|
validateTaskDefinition(aDefinitionXML: string): i32;
|
||||||
|
getTaskXML(aFolderName: string, aTaskName: string): string;
|
||||||
|
getCurrentUserSid(): string;
|
||||||
|
deleteTask(aFolderName: string, aTaskName: string): void;
|
||||||
|
getFolderTasks(aFolderName: string): string[];
|
||||||
|
createFolder(aParentFolderName: string, aSubFolderName: string): void;
|
||||||
|
deleteFolder(aParentFolderName: string, aSubFolderName: string): void;
|
||||||
|
}
|
||||||
|
|
||||||
interface nsIWinTaskSchedulerService extends nsISupports {
|
// https://searchfox.org/mozilla-central/source/widget/nsIJumpListBuilder.idl
|
||||||
registerTask(aFolderName: string, aTaskName: string, aDefinitionXML: string, aUpdateExisting?: boolean): void;
|
|
||||||
validateTaskDefinition(aDefinitionXML: string): i32;
|
|
||||||
getTaskXML(aFolderName: string, aTaskName: string): string;
|
|
||||||
getCurrentUserSid(): string;
|
|
||||||
deleteTask(aFolderName: string, aTaskName: string): void;
|
|
||||||
getFolderTasks(aFolderName: string): string[];
|
|
||||||
createFolder(aParentFolderName: string, aSubFolderName: string): void;
|
|
||||||
deleteFolder(aParentFolderName: string, aSubFolderName: string): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://searchfox.org/mozilla-central/source/widget/nsIJumpListBuilder.idl
|
interface nsIJumpListBuilder extends nsISupports {
|
||||||
|
obtainAndCacheFavicon(faviconURL: nsIURI): string;
|
||||||
|
obtainAndCacheFaviconAsync(faviconURL: nsIURI): Promise<any>;
|
||||||
|
isAvailable(): Promise<any>;
|
||||||
|
checkForRemovals(): Promise<any>;
|
||||||
|
populateJumpList(aTaskDescriptions: any, aCustomTitle: string, aCustomDescriptions: any): Promise<any>;
|
||||||
|
clearJumpList(): Promise<any>;
|
||||||
|
}
|
||||||
|
|
||||||
interface nsIJumpListBuilder extends nsISupports {
|
// https://searchfox.org/mozilla-central/source/widget/nsIPrintSettingsWin.idl
|
||||||
obtainAndCacheFavicon(faviconURL: nsIURI): string;
|
|
||||||
obtainAndCacheFaviconAsync(faviconURL: nsIURI): Promise<any>;
|
|
||||||
isAvailable(): Promise<any>;
|
|
||||||
checkForRemovals(): Promise<any>;
|
|
||||||
populateJumpList(aTaskDescriptions: any, aCustomTitle: string, aCustomDescriptions: any): Promise<any>;
|
|
||||||
clearJumpList(): Promise<any>;
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://searchfox.org/mozilla-central/source/widget/nsIPrintSettingsWin.idl
|
// https://searchfox.org/mozilla-central/source/widget/nsITaskbarOverlayIconController.idl
|
||||||
|
|
||||||
// https://searchfox.org/mozilla-central/source/widget/nsITaskbarOverlayIconController.idl
|
interface nsITaskbarOverlayIconController extends nsISupports {
|
||||||
|
setOverlayIcon(statusIcon: imgIContainer, statusDescription: string, paintContext?: nsISVGPaintContext): void;
|
||||||
|
}
|
||||||
|
|
||||||
interface nsITaskbarOverlayIconController extends nsISupports {
|
// https://searchfox.org/mozilla-central/source/widget/nsITaskbarPreview.idl
|
||||||
setOverlayIcon(statusIcon: imgIContainer, statusDescription: string, paintContext?: nsISVGPaintContext): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://searchfox.org/mozilla-central/source/widget/nsITaskbarPreview.idl
|
interface nsITaskbarPreview extends nsISupports {
|
||||||
|
controller: nsITaskbarPreviewController;
|
||||||
|
tooltip: string;
|
||||||
|
visible: boolean;
|
||||||
|
active: boolean;
|
||||||
|
invalidate(): void;
|
||||||
|
}
|
||||||
|
|
||||||
interface nsITaskbarPreview extends nsISupports {
|
// https://searchfox.org/mozilla-central/source/widget/nsITaskbarPreviewButton.idl
|
||||||
controller: nsITaskbarPreviewController;
|
|
||||||
tooltip: string;
|
|
||||||
visible: boolean;
|
|
||||||
active: boolean;
|
|
||||||
invalidate(): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://searchfox.org/mozilla-central/source/widget/nsITaskbarPreviewButton.idl
|
interface nsITaskbarPreviewButton extends nsISupports {
|
||||||
|
tooltip: string;
|
||||||
|
dismissOnClick: boolean;
|
||||||
|
hasBorder: boolean;
|
||||||
|
disabled: boolean;
|
||||||
|
image: imgIContainer;
|
||||||
|
visible: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
interface nsITaskbarPreviewButton extends nsISupports {
|
// https://searchfox.org/mozilla-central/source/widget/nsITaskbarPreviewController.idl
|
||||||
tooltip: string;
|
|
||||||
dismissOnClick: boolean;
|
|
||||||
hasBorder: boolean;
|
|
||||||
disabled: boolean;
|
|
||||||
image: imgIContainer;
|
|
||||||
visible: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://searchfox.org/mozilla-central/source/widget/nsITaskbarPreviewController.idl
|
type nsITaskbarPreviewCallback = Callable<{
|
||||||
|
done(aCanvas: nsISupports, aDrawBorder: boolean): void;
|
||||||
|
}>;
|
||||||
|
|
||||||
type nsITaskbarPreviewCallback = Callable<{
|
interface nsITaskbarPreviewController extends nsISupports {
|
||||||
done(aCanvas: nsISupports, aDrawBorder: boolean): void;
|
readonly width: u32;
|
||||||
}>
|
readonly height: u32;
|
||||||
|
readonly thumbnailAspectRatio: float;
|
||||||
|
requestPreview(aCallback: nsITaskbarPreviewCallback): void;
|
||||||
|
requestThumbnail(aCallback: nsITaskbarPreviewCallback, width: u32, height: u32): void;
|
||||||
|
onClose(): void;
|
||||||
|
onActivate(): boolean;
|
||||||
|
onClick(button: nsITaskbarPreviewButton): void;
|
||||||
|
}
|
||||||
|
|
||||||
interface nsITaskbarPreviewController extends nsISupports {
|
// https://searchfox.org/mozilla-central/source/widget/nsITaskbarProgress.idl
|
||||||
readonly width: u32;
|
|
||||||
readonly height: u32;
|
|
||||||
readonly thumbnailAspectRatio: float;
|
|
||||||
requestPreview(aCallback: nsITaskbarPreviewCallback): void;
|
|
||||||
requestThumbnail(aCallback: nsITaskbarPreviewCallback, width: u32, height: u32): void;
|
|
||||||
onClose(): void;
|
|
||||||
onActivate(): boolean;
|
|
||||||
onClick(button: nsITaskbarPreviewButton): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://searchfox.org/mozilla-central/source/widget/nsITaskbarProgress.idl
|
interface nsITaskbarProgress extends nsISupports {
|
||||||
|
readonly STATE_NO_PROGRESS?: 0;
|
||||||
|
readonly STATE_INDETERMINATE?: 1;
|
||||||
|
readonly STATE_NORMAL?: 2;
|
||||||
|
readonly STATE_ERROR?: 3;
|
||||||
|
readonly STATE_PAUSED?: 4;
|
||||||
|
|
||||||
interface nsITaskbarProgress extends nsISupports {
|
setProgressState(state: nsTaskbarProgressState, currentValue?: u64, maxValue?: u64): void;
|
||||||
readonly STATE_NO_PROGRESS?: 0;
|
}
|
||||||
readonly STATE_INDETERMINATE?: 1;
|
|
||||||
readonly STATE_NORMAL?: 2;
|
|
||||||
readonly STATE_ERROR?: 3;
|
|
||||||
readonly STATE_PAUSED?: 4;
|
|
||||||
|
|
||||||
setProgressState(state: nsTaskbarProgressState, currentValue?: u64, maxValue?: u64): void;
|
// https://searchfox.org/mozilla-central/source/widget/nsITaskbarTabPreview.idl
|
||||||
}
|
|
||||||
|
|
||||||
// https://searchfox.org/mozilla-central/source/widget/nsITaskbarTabPreview.idl
|
interface nsITaskbarTabPreview extends nsITaskbarPreview {
|
||||||
|
title: string;
|
||||||
|
icon: imgIContainer;
|
||||||
|
move(aNext: nsITaskbarTabPreview): void;
|
||||||
|
}
|
||||||
|
|
||||||
interface nsITaskbarTabPreview extends nsITaskbarPreview {
|
// https://searchfox.org/mozilla-central/source/widget/nsITaskbarWindowPreview.idl
|
||||||
title: string;
|
|
||||||
icon: imgIContainer;
|
|
||||||
move(aNext: nsITaskbarTabPreview): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://searchfox.org/mozilla-central/source/widget/nsITaskbarWindowPreview.idl
|
interface nsITaskbarWindowPreview extends nsITaskbarPreview {
|
||||||
|
readonly NUM_TOOLBAR_BUTTONS?: 7;
|
||||||
|
|
||||||
interface nsITaskbarWindowPreview extends nsITaskbarPreview {
|
getButton(index: u32): nsITaskbarPreviewButton;
|
||||||
readonly NUM_TOOLBAR_BUTTONS?: 7;
|
enableCustomDrawing: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
getButton(index: u32): nsITaskbarPreviewButton;
|
// https://searchfox.org/mozilla-central/source/widget/nsIWinTaskbar.idl
|
||||||
enableCustomDrawing: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://searchfox.org/mozilla-central/source/widget/nsIWinTaskbar.idl
|
interface nsIWinTaskbar extends nsISupports {
|
||||||
|
readonly available: boolean;
|
||||||
|
readonly defaultGroupId: string;
|
||||||
|
readonly defaultPrivateGroupId: string;
|
||||||
|
createTaskbarTabPreview(shell: nsIDocShell, controller: nsITaskbarPreviewController): nsITaskbarTabPreview;
|
||||||
|
getTaskbarWindowPreview(shell: nsIDocShell): nsITaskbarWindowPreview;
|
||||||
|
getTaskbarProgress(shell: nsIDocShell): nsITaskbarProgress;
|
||||||
|
getOverlayIconController(shell: nsIDocShell): nsITaskbarOverlayIconController;
|
||||||
|
createJumpListBuilder(aPrivateBrowsing: boolean): nsIJumpListBuilder;
|
||||||
|
getGroupIdForWindow(aParent: mozIDOMWindow): string;
|
||||||
|
setGroupIdForWindow(aParent: mozIDOMWindow, aIdentifier: string): void;
|
||||||
|
}
|
||||||
|
|
||||||
interface nsIWinTaskbar extends nsISupports {
|
// https://searchfox.org/mozilla-central/source/widget/nsIWindowsUIUtils.idl
|
||||||
readonly available: boolean;
|
|
||||||
readonly defaultGroupId: string;
|
|
||||||
readonly defaultPrivateGroupId: string;
|
|
||||||
createTaskbarTabPreview(shell: nsIDocShell, controller: nsITaskbarPreviewController): nsITaskbarTabPreview;
|
|
||||||
getTaskbarWindowPreview(shell: nsIDocShell): nsITaskbarWindowPreview;
|
|
||||||
getTaskbarProgress(shell: nsIDocShell): nsITaskbarProgress;
|
|
||||||
getOverlayIconController(shell: nsIDocShell): nsITaskbarOverlayIconController;
|
|
||||||
createJumpListBuilder(aPrivateBrowsing: boolean): nsIJumpListBuilder;
|
|
||||||
getGroupIdForWindow(aParent: mozIDOMWindow): string;
|
|
||||||
setGroupIdForWindow(aParent: mozIDOMWindow, aIdentifier: string): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://searchfox.org/mozilla-central/source/widget/nsIWindowsUIUtils.idl
|
interface nsIWindowsUIUtils extends nsISupports {
|
||||||
|
readonly systemSmallIconSize: i32;
|
||||||
|
readonly systemLargeIconSize: i32;
|
||||||
|
setWindowIcon(aWindow: mozIDOMWindowProxy, aSmallIcon: imgIContainer, aLargeIcon: imgIContainer): void;
|
||||||
|
setWindowIconFromExe(aWindow: mozIDOMWindowProxy, aExe: string, aIndex: u16): void;
|
||||||
|
setWindowIconNoData(aWindow: mozIDOMWindowProxy): void;
|
||||||
|
readonly inWin10TabletMode: boolean;
|
||||||
|
readonly inWin11TabletMode: boolean;
|
||||||
|
shareUrl(shareTitle: string, urlToShare: string): void;
|
||||||
|
}
|
||||||
|
|
||||||
interface nsIWindowsUIUtils extends nsISupports {
|
// https://searchfox.org/mozilla-central/source/toolkit/system/windowsPackageManager/nsIWindowsPackageManager.idl
|
||||||
readonly systemSmallIconSize: i32;
|
|
||||||
readonly systemLargeIconSize: i32;
|
|
||||||
setWindowIcon(aWindow: mozIDOMWindowProxy, aSmallIcon: imgIContainer, aLargeIcon: imgIContainer): void;
|
|
||||||
setWindowIconFromExe(aWindow: mozIDOMWindowProxy, aExe: string, aIndex: u16): void;
|
|
||||||
setWindowIconNoData(aWindow: mozIDOMWindowProxy): void;
|
|
||||||
readonly inWin10TabletMode: boolean;
|
|
||||||
readonly inWin11TabletMode: boolean;
|
|
||||||
shareUrl(shareTitle: string, urlToShare: string): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://searchfox.org/mozilla-central/source/toolkit/system/windowsPackageManager/nsIWindowsPackageManager.idl
|
interface nsIWindowsPackageManager extends nsISupports {
|
||||||
|
findUserInstalledPackages(prefix: string[]): string[];
|
||||||
|
getInstalledDate(): u64;
|
||||||
|
campaignId(): Promise<any>;
|
||||||
|
}
|
||||||
|
|
||||||
interface nsIWindowsPackageManager extends nsISupports {
|
// https://searchfox.org/mozilla-central/source/xpcom/ds/nsIWindowsRegKey.idl
|
||||||
findUserInstalledPackages(prefix: string[]): string[];
|
|
||||||
getInstalledDate(): u64;
|
|
||||||
campaignId(): Promise<any>;
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://searchfox.org/mozilla-central/source/xpcom/ds/nsIWindowsRegKey.idl
|
interface nsIWindowsRegKey extends nsISupports {
|
||||||
|
readonly ROOT_KEY_CLASSES_ROOT?: 2147483648;
|
||||||
|
readonly ROOT_KEY_CURRENT_USER?: 2147483649;
|
||||||
|
readonly ROOT_KEY_LOCAL_MACHINE?: 2147483650;
|
||||||
|
readonly ACCESS_BASIC?: 131072;
|
||||||
|
readonly ACCESS_QUERY_VALUE?: 1;
|
||||||
|
readonly ACCESS_SET_VALUE?: 2;
|
||||||
|
readonly ACCESS_CREATE_SUB_KEY?: 4;
|
||||||
|
readonly ACCESS_ENUMERATE_SUB_KEYS?: 8;
|
||||||
|
readonly ACCESS_NOTIFY?: 16;
|
||||||
|
readonly ACCESS_READ?: 131097;
|
||||||
|
readonly ACCESS_WRITE?: 131078;
|
||||||
|
readonly ACCESS_ALL?: 131103;
|
||||||
|
readonly WOW64_32?: 512;
|
||||||
|
readonly WOW64_64?: 256;
|
||||||
|
readonly TYPE_NONE?: 0;
|
||||||
|
readonly TYPE_STRING?: 1;
|
||||||
|
readonly TYPE_BINARY?: 3;
|
||||||
|
readonly TYPE_INT?: 4;
|
||||||
|
readonly TYPE_INT64?: 11;
|
||||||
|
|
||||||
interface nsIWindowsRegKey extends nsISupports {
|
close(): void;
|
||||||
readonly ROOT_KEY_CLASSES_ROOT?: 2147483648;
|
open(rootKey: u32, relPath: string, mode: u32): void;
|
||||||
readonly ROOT_KEY_CURRENT_USER?: 2147483649;
|
create(rootKey: u32, relPath: string, mode: u32): void;
|
||||||
readonly ROOT_KEY_LOCAL_MACHINE?: 2147483650;
|
openChild(relPath: string, mode: u32): nsIWindowsRegKey;
|
||||||
readonly ACCESS_BASIC?: 131072;
|
createChild(relPath: string, mode: u32): nsIWindowsRegKey;
|
||||||
readonly ACCESS_QUERY_VALUE?: 1;
|
readonly childCount: u32;
|
||||||
readonly ACCESS_SET_VALUE?: 2;
|
getChildName(index: u32): string;
|
||||||
readonly ACCESS_CREATE_SUB_KEY?: 4;
|
hasChild(name: string): boolean;
|
||||||
readonly ACCESS_ENUMERATE_SUB_KEYS?: 8;
|
readonly valueCount: u32;
|
||||||
readonly ACCESS_NOTIFY?: 16;
|
getValueName(index: u32): string;
|
||||||
readonly ACCESS_READ?: 131097;
|
hasValue(name: string): boolean;
|
||||||
readonly ACCESS_WRITE?: 131078;
|
removeChild(relPath: string): void;
|
||||||
readonly ACCESS_ALL?: 131103;
|
removeValue(name: string): void;
|
||||||
readonly WOW64_32?: 512;
|
getValueType(name: string): u32;
|
||||||
readonly WOW64_64?: 256;
|
readStringValue(name: string): string;
|
||||||
readonly TYPE_NONE?: 0;
|
readIntValue(name: string): u32;
|
||||||
readonly TYPE_STRING?: 1;
|
readInt64Value(name: string): u64;
|
||||||
readonly TYPE_BINARY?: 3;
|
readBinaryValue(name: string): string;
|
||||||
readonly TYPE_INT?: 4;
|
writeStringValue(name: string, data: string): void;
|
||||||
readonly TYPE_INT64?: 11;
|
writeIntValue(name: string, data: u32): void;
|
||||||
|
writeInt64Value(name: string, data: u64): void;
|
||||||
|
writeBinaryValue(name: string, data: string): void;
|
||||||
|
}
|
||||||
|
|
||||||
close(): void;
|
// https://searchfox.org/mozilla-central/source/toolkit/xre/nsIWinAppHelper.idl
|
||||||
open(rootKey: u32, relPath: string, mode: u32): void;
|
|
||||||
create(rootKey: u32, relPath: string, mode: u32): void;
|
|
||||||
openChild(relPath: string, mode: u32): nsIWindowsRegKey;
|
|
||||||
createChild(relPath: string, mode: u32): nsIWindowsRegKey;
|
|
||||||
readonly childCount: u32;
|
|
||||||
getChildName(index: u32): string;
|
|
||||||
hasChild(name: string): boolean;
|
|
||||||
readonly valueCount: u32;
|
|
||||||
getValueName(index: u32): string;
|
|
||||||
hasValue(name: string): boolean;
|
|
||||||
removeChild(relPath: string): void;
|
|
||||||
removeValue(name: string): void;
|
|
||||||
getValueType(name: string): u32;
|
|
||||||
readStringValue(name: string): string;
|
|
||||||
readIntValue(name: string): u32;
|
|
||||||
readInt64Value(name: string): u64;
|
|
||||||
readBinaryValue(name: string): string;
|
|
||||||
writeStringValue(name: string, data: string): void;
|
|
||||||
writeIntValue(name: string, data: u32): void;
|
|
||||||
writeInt64Value(name: string, data: u64): void;
|
|
||||||
writeBinaryValue(name: string, data: string): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://searchfox.org/mozilla-central/source/toolkit/xre/nsIWinAppHelper.idl
|
interface nsIWinAppHelper extends nsISupports {
|
||||||
|
readonly userCanElevate: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
interface nsIWinAppHelper extends nsISupports {
|
interface nsIXPCComponents_Interfaces {
|
||||||
readonly userCanElevate: boolean;
|
nsIInstalledApplication: nsJSIID<nsIInstalledApplication>;
|
||||||
}
|
nsIAboutThirdParty: nsJSIID<nsIAboutThirdParty>;
|
||||||
|
nsIAboutWindowsMessages: nsJSIID<nsIAboutWindowsMessages>;
|
||||||
interface nsIXPCComponents_Interfaces {
|
nsIWindowsAlertNotification: nsJSIID<nsIWindowsAlertNotification, typeof nsIWindowsAlertNotification_ImagePlacement>;
|
||||||
nsIInstalledApplication: nsJSIID<nsIInstalledApplication>;
|
nsIWindowsAlertsService: nsJSIID<nsIWindowsAlertsService>;
|
||||||
nsIAboutThirdParty: nsJSIID<nsIAboutThirdParty>;
|
nsIDefaultAgent: nsJSIID<nsIDefaultAgent>;
|
||||||
nsIAboutWindowsMessages: nsJSIID<nsIAboutWindowsMessages>;
|
nsIWindowsMutex: nsJSIID<nsIWindowsMutex>;
|
||||||
nsIWindowsAlertNotification: nsJSIID<nsIWindowsAlertNotification, typeof nsIWindowsAlertNotification_ImagePlacement>;
|
nsIWindowsMutexFactory: nsJSIID<nsIWindowsMutexFactory>;
|
||||||
nsIWindowsAlertsService: nsJSIID<nsIWindowsAlertsService>;
|
nsIGeolocationUIUtilsWin: nsJSIID<nsIGeolocationUIUtilsWin>;
|
||||||
nsIDefaultAgent: nsJSIID<nsIDefaultAgent>;
|
nsIWindowsShellService: nsJSIID<nsIWindowsShellService, typeof nsIWindowsShellService_LaunchOnLoginEnabledEnumerator>;
|
||||||
nsIWindowsMutex: nsJSIID<nsIWindowsMutex>;
|
nsIWinTaskSchedulerService: nsJSIID<nsIWinTaskSchedulerService>;
|
||||||
nsIWindowsMutexFactory: nsJSIID<nsIWindowsMutexFactory>;
|
nsIJumpListBuilder: nsJSIID<nsIJumpListBuilder>;
|
||||||
nsIGeolocationUIUtilsWin: nsJSIID<nsIGeolocationUIUtilsWin>;
|
nsITaskbarOverlayIconController: nsJSIID<nsITaskbarOverlayIconController>;
|
||||||
nsIWindowsShellService: nsJSIID<nsIWindowsShellService, typeof nsIWindowsShellService_LaunchOnLoginEnabledEnumerator>;
|
nsITaskbarPreview: nsJSIID<nsITaskbarPreview>;
|
||||||
nsIWinTaskSchedulerService: nsJSIID<nsIWinTaskSchedulerService>;
|
nsITaskbarPreviewButton: nsJSIID<nsITaskbarPreviewButton>;
|
||||||
nsIJumpListBuilder: nsJSIID<nsIJumpListBuilder>;
|
nsITaskbarPreviewCallback: nsJSIID<nsITaskbarPreviewCallback>;
|
||||||
nsITaskbarOverlayIconController: nsJSIID<nsITaskbarOverlayIconController>;
|
nsITaskbarPreviewController: nsJSIID<nsITaskbarPreviewController>;
|
||||||
nsITaskbarPreview: nsJSIID<nsITaskbarPreview>;
|
nsITaskbarProgress: nsJSIID<nsITaskbarProgress>;
|
||||||
nsITaskbarPreviewButton: nsJSIID<nsITaskbarPreviewButton>;
|
nsITaskbarTabPreview: nsJSIID<nsITaskbarTabPreview>;
|
||||||
nsITaskbarPreviewCallback: nsJSIID<nsITaskbarPreviewCallback>;
|
nsITaskbarWindowPreview: nsJSIID<nsITaskbarWindowPreview>;
|
||||||
nsITaskbarPreviewController: nsJSIID<nsITaskbarPreviewController>;
|
nsIWinTaskbar: nsJSIID<nsIWinTaskbar>;
|
||||||
nsITaskbarProgress: nsJSIID<nsITaskbarProgress>;
|
nsIWindowsUIUtils: nsJSIID<nsIWindowsUIUtils>;
|
||||||
nsITaskbarTabPreview: nsJSIID<nsITaskbarTabPreview>;
|
nsIWindowsPackageManager: nsJSIID<nsIWindowsPackageManager>;
|
||||||
nsITaskbarWindowPreview: nsJSIID<nsITaskbarWindowPreview>;
|
nsIWindowsRegKey: nsJSIID<nsIWindowsRegKey>;
|
||||||
nsIWinTaskbar: nsJSIID<nsIWinTaskbar>;
|
nsIWinAppHelper: nsJSIID<nsIWinAppHelper>;
|
||||||
nsIWindowsUIUtils: nsJSIID<nsIWindowsUIUtils>;
|
}
|
||||||
nsIWindowsPackageManager: nsJSIID<nsIWindowsPackageManager>;
|
} // global
|
||||||
nsIWindowsRegKey: nsJSIID<nsIWindowsRegKey>;
|
|
||||||
nsIWinAppHelper: nsJSIID<nsIWinAppHelper>;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // global
|
|
||||||
|
|
||||||
// Typedefs from xpidl.
|
// Typedefs from xpidl.
|
||||||
type PRTime = i64;
|
type PRTime = i64;
|
||||||
|
@ -375,6 +387,6 @@ type OutParam<T> = { value?: T };
|
||||||
type Enums<enums> = Partial<Pick<enums, keyof enums>>;
|
type Enums<enums> = Partial<Pick<enums, keyof enums>>;
|
||||||
|
|
||||||
/** Callable accepts either form of a [function] interface. */
|
/** Callable accepts either form of a [function] interface. */
|
||||||
type Callable<iface> = iface | Extract<iface[keyof iface], Function>
|
type Callable<iface> = iface | Extract<iface[keyof iface], Function>;
|
||||||
|
|
||||||
export {};
|
export {};
|
||||||
|
|
30992
src/zen/@types/lib.gecko.xpcom.d.ts
vendored
30992
src/zen/@types/lib.gecko.xpcom.d.ts
vendored
File diff suppressed because it is too large
Load diff
10
src/zen/@types/lib.gecko.xpidl.d.ts
vendored
10
src/zen/@types/lib.gecko.xpidl.d.ts
vendored
|
@ -15,10 +15,12 @@ interface nsID<uuid = string> {
|
||||||
* and expose constants defined on the class, including variants from enums.
|
* and expose constants defined on the class, including variants from enums.
|
||||||
* https://searchfox.org/mozilla-central/source/js/xpconnect/src/XPCJSID.cpp#45
|
* https://searchfox.org/mozilla-central/source/js/xpconnect/src/XPCJSID.cpp#45
|
||||||
*/
|
*/
|
||||||
type nsJSIID<iface, enums = {}> = nsID & Constants<iface> & enums & {
|
type nsJSIID<iface, enums = {}> = nsID &
|
||||||
new (_: never): void;
|
Constants<iface> &
|
||||||
prototype: iface;
|
enums & {
|
||||||
}
|
new (_: never): void;
|
||||||
|
prototype: iface;
|
||||||
|
};
|
||||||
|
|
||||||
/** A union type of all known interface IIDs. */
|
/** A union type of all known interface IIDs. */
|
||||||
type nsIID = nsIXPCComponents_Interfaces[keyof nsIXPCComponents_Interfaces];
|
type nsIID = nsIXPCComponents_Interfaces[keyof nsIXPCComponents_Interfaces];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue