2022-02-26 21:26:16 +00:00
|
|
|
declare module "glasstron" {
|
2022-03-04 17:53:18 +00:00
|
|
|
export class BrowserWindow extends Electron.BrowserWindow {
|
|
|
|
getBlur(): Promise<boolean>;
|
|
|
|
setBlur(value: boolean): Promise<boolean>;
|
2022-02-26 21:26:16 +00:00
|
|
|
blurType: WindowsBlurType;
|
2022-03-04 17:53:18 +00:00
|
|
|
setVibrancy(vibrancy: MacOSVibrancy): void;
|
2022-02-26 21:26:16 +00:00
|
|
|
}
|
2022-03-04 17:53:18 +00:00
|
|
|
/**
|
|
|
|
* @deprecated
|
|
|
|
*/
|
|
|
|
export function init(): void;
|
|
|
|
/**
|
|
|
|
* @deprecated
|
|
|
|
*/
|
|
|
|
export function update(
|
|
|
|
window: Electron.BrowserWindow,
|
|
|
|
values: {
|
|
|
|
windows?: {
|
|
|
|
blurType: WindowsBlurType;
|
|
|
|
};
|
|
|
|
macos?: {
|
|
|
|
vibrancy: MacOSVibrancy;
|
|
|
|
};
|
|
|
|
linux?: {
|
|
|
|
requestBlur: boolean;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
): void;
|
|
|
|
export class Hacks {
|
|
|
|
static injectOnElectron(): void;
|
|
|
|
static delayReadyEvent(): void;
|
|
|
|
}
|
|
|
|
export type WindowsBlurType = "acrylic" | "blurbehind" | "transparent" | "none";
|
|
|
|
export type MacOSVibrancy =
|
|
|
|
| (
|
|
|
|
| "appearance-based"
|
|
|
|
| "light"
|
|
|
|
| "dark"
|
|
|
|
| "titlebar"
|
|
|
|
| "selection"
|
|
|
|
| "menu"
|
|
|
|
| "popover"
|
|
|
|
| "sidebar"
|
|
|
|
| "medium-light"
|
|
|
|
| "ultra-dark"
|
|
|
|
| "header"
|
|
|
|
| "sheet"
|
|
|
|
| "window"
|
|
|
|
| "hud"
|
|
|
|
| "fullscreen-ui"
|
|
|
|
| "tooltip"
|
|
|
|
| "content"
|
|
|
|
| "under-window"
|
|
|
|
| "under-page"
|
|
|
|
)
|
|
|
|
| null;
|
2022-02-26 21:26:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
declare module "glasstron/src/utils" {
|
2022-03-04 17:53:18 +00:00
|
|
|
class Utils {
|
|
|
|
static getSavePath(): string;
|
|
|
|
static copyToPath(innerFile: string, outerFilename?: string, flags?: number): void;
|
|
|
|
static removeFromPath(filename: string): void;
|
|
|
|
static isInPath(filename: string): boolean;
|
|
|
|
static getPlatform(): any;
|
|
|
|
static parseKeyValString(string: string, keyvalSeparator?: string, pairSeparator?: string): any;
|
|
|
|
static makeKeyValString(object: any, keyvalSeparator?: string, pairSeparator?: string): string;
|
|
|
|
}
|
|
|
|
export = Utils;
|
2022-02-26 21:26:16 +00:00
|
|
|
}
|