This repository has been archived by the owner on Feb 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathindex.d.ts
85 lines (79 loc) · 1.85 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
declare module 'electron-acrylic-window' {
import {
BrowserWindow as EBrowserWindow,
BrowserWindowConstructorOptions,
} from 'electron'
class BrowserWindow extends EBrowserWindow {
constructor(options?: AcrylicBrowserWindowConstructorOptions)
}
/**
* Set the vibrancy for the specified window.
*
* @param window
* @param options
*/
function setVibrancy(
window: EBrowserWindow,
options: AcrylicBrowserWindowConstructorOptions | null
): void
/**
* Allow modifying default BrowserWindowConstructorOptions
* to change vibrancy to VibrancyOptions.
*/
type Modify<T, R> = Omit<T, keyof R> & R
/**
* The new options of the BrowserWindow with the VibrancyOptions.
*/
type AcrylicBrowserWindowConstructorOptions = Modify<
BrowserWindowConstructorOptions,
{
/**
* The vibrancy settings for the window. Can be
* a VibrancyTheme or the VibrancyOptions object.
*/
vibrancy?: VibrancyTheme | VibrancyOptions
}
>
/**
* The vibrancy object
*/
interface VibrancyOptions {
/**
* The theme to use.
*/
theme?: VibrancyTheme
/**
* The effect to use.
*/
effect?: VibrancyEffect
/**
* If enabled, we use a custom window resize/move
* handler for performance.
*/
useCustomWindowRefreshMethod?: boolean
/**
* Maximum value to refresh application screen
* in seconds.
*/
maximumRefreshRate?: number
/**
* If true, acrylic effect will be disabled whe
* window lost focus.
*/
disableOnBlur?: boolean
/**
* If true, log will printed to console.
*/
debug?: boolean
}
/**
* The theme to apply to the vibrancy. Can be 'light',
* 'dark', 'appearance-based' or a custom HEX color
* with alpha.
*/
type VibrancyTheme = 'light' | 'dark' | 'appearance-based' | 0xff
/**
* The effect to apply. Can be 'acrylic' or 'blur'.
*/
type VibrancyEffect = 'acrylic' | 'blur'
}