electron 29.0.0-alpha.7 → 29.0.0-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/checksums.json +75 -75
- package/electron.d.ts +2648 -401
- package/package.json +1 -1
package/electron.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Type definitions for Electron 29.0.0-alpha.
|
|
1
|
+
// Type definitions for Electron 29.0.0-alpha.9
|
|
2
2
|
// Project: http://electronjs.org/
|
|
3
3
|
// Definitions by: The Electron Team <https://github.com/electron/electron>
|
|
4
4
|
// Definitions: https://github.com/electron/typescript-definitions
|
|
@@ -1924,80 +1924,9 @@ declare namespace Electron {
|
|
|
1924
1924
|
setFeedURL(options: FeedURLOptions): void;
|
|
1925
1925
|
}
|
|
1926
1926
|
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
// Docs: https://electronjs.org/docs/api/structures/bluetooth-device
|
|
1930
|
-
|
|
1931
|
-
deviceId: string;
|
|
1932
|
-
deviceName: string;
|
|
1933
|
-
}
|
|
1934
|
-
|
|
1935
|
-
class BrowserView {
|
|
1936
|
-
|
|
1937
|
-
// Docs: https://electronjs.org/docs/api/browser-view
|
|
1938
|
-
|
|
1939
|
-
/**
|
|
1940
|
-
* BrowserView
|
|
1941
|
-
*/
|
|
1942
|
-
constructor(options?: BrowserViewConstructorOptions);
|
|
1943
|
-
/**
|
|
1944
|
-
* The `bounds` of this BrowserView instance as `Object`.
|
|
1945
|
-
*
|
|
1946
|
-
* @experimental
|
|
1947
|
-
*/
|
|
1948
|
-
getBounds(): Rectangle;
|
|
1949
|
-
/**
|
|
1950
|
-
* @experimental
|
|
1951
|
-
*/
|
|
1952
|
-
setAutoResize(options: AutoResizeOptions): void;
|
|
1953
|
-
/**
|
|
1954
|
-
* Examples of valid `color` values:
|
|
1955
|
-
*
|
|
1956
|
-
* * Hex
|
|
1957
|
-
* * #fff (RGB)
|
|
1958
|
-
* * #ffff (ARGB)
|
|
1959
|
-
* * #ffffff (RRGGBB)
|
|
1960
|
-
* * #ffffffff (AARRGGBB)
|
|
1961
|
-
* * RGB
|
|
1962
|
-
* * rgb(([\d]+),\s*([\d]+),\s*([\d]+))
|
|
1963
|
-
* * e.g. rgb(255, 255, 255)
|
|
1964
|
-
* * RGBA
|
|
1965
|
-
* * rgba(([\d]+),\s*([\d]+),\s*([\d]+),\s*([\d.]+))
|
|
1966
|
-
* * e.g. rgba(255, 255, 255, 1.0)
|
|
1967
|
-
* * HSL
|
|
1968
|
-
* * hsl((-?[\d.]+),\s*([\d.]+)%,\s*([\d.]+)%)
|
|
1969
|
-
* * e.g. hsl(200, 20%, 50%)
|
|
1970
|
-
* * HSLA
|
|
1971
|
-
* * hsla((-?[\d.]+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+))
|
|
1972
|
-
* * e.g. hsla(200, 20%, 50%, 0.5)
|
|
1973
|
-
* * Color name
|
|
1974
|
-
* * Options are listed in SkParseColor.cpp
|
|
1975
|
-
* * Similar to CSS Color Module Level 3 keywords, but case-sensitive.
|
|
1976
|
-
* * e.g. `blueviolet` or `red`
|
|
1977
|
-
*
|
|
1978
|
-
* **Note:** Hex format with alpha takes `AARRGGBB` or `ARGB`, _not_ `RRGGBBA` or
|
|
1979
|
-
* `RGA`.
|
|
1980
|
-
*
|
|
1981
|
-
* @experimental
|
|
1982
|
-
*/
|
|
1983
|
-
setBackgroundColor(color: string): void;
|
|
1984
|
-
/**
|
|
1985
|
-
* Resizes and moves the view to the supplied bounds relative to the window.
|
|
1986
|
-
*
|
|
1987
|
-
* @experimental
|
|
1988
|
-
*/
|
|
1989
|
-
setBounds(bounds: Rectangle): void;
|
|
1990
|
-
/**
|
|
1991
|
-
* A `WebContents` object owned by this view.
|
|
1992
|
-
*
|
|
1993
|
-
* @experimental
|
|
1994
|
-
*/
|
|
1995
|
-
webContents: WebContents;
|
|
1996
|
-
}
|
|
1927
|
+
class BaseWindow extends NodeEventEmitter {
|
|
1997
1928
|
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
// Docs: https://electronjs.org/docs/api/browser-window
|
|
1929
|
+
// Docs: https://electronjs.org/docs/api/base-window
|
|
2001
1930
|
|
|
2002
1931
|
/**
|
|
2003
1932
|
* Emitted when the window is set or unset to show always on top of other windows.
|
|
@@ -2096,14 +2025,6 @@ declare namespace Electron {
|
|
|
2096
2025
|
once(event: 'enter-full-screen', listener: Function): this;
|
|
2097
2026
|
addListener(event: 'enter-full-screen', listener: Function): this;
|
|
2098
2027
|
removeListener(event: 'enter-full-screen', listener: Function): this;
|
|
2099
|
-
/**
|
|
2100
|
-
* Emitted when the window enters a full-screen state triggered by HTML API.
|
|
2101
|
-
*/
|
|
2102
|
-
on(event: 'enter-html-full-screen', listener: Function): this;
|
|
2103
|
-
off(event: 'enter-html-full-screen', listener: Function): this;
|
|
2104
|
-
once(event: 'enter-html-full-screen', listener: Function): this;
|
|
2105
|
-
addListener(event: 'enter-html-full-screen', listener: Function): this;
|
|
2106
|
-
removeListener(event: 'enter-html-full-screen', listener: Function): this;
|
|
2107
2028
|
/**
|
|
2108
2029
|
* Emitted when the window gains focus.
|
|
2109
2030
|
*/
|
|
@@ -2128,14 +2049,6 @@ declare namespace Electron {
|
|
|
2128
2049
|
once(event: 'leave-full-screen', listener: Function): this;
|
|
2129
2050
|
addListener(event: 'leave-full-screen', listener: Function): this;
|
|
2130
2051
|
removeListener(event: 'leave-full-screen', listener: Function): this;
|
|
2131
|
-
/**
|
|
2132
|
-
* Emitted when the window leaves a full-screen state triggered by HTML API.
|
|
2133
|
-
*/
|
|
2134
|
-
on(event: 'leave-html-full-screen', listener: Function): this;
|
|
2135
|
-
off(event: 'leave-html-full-screen', listener: Function): this;
|
|
2136
|
-
once(event: 'leave-html-full-screen', listener: Function): this;
|
|
2137
|
-
addListener(event: 'leave-html-full-screen', listener: Function): this;
|
|
2138
|
-
removeListener(event: 'leave-html-full-screen', listener: Function): this;
|
|
2139
2052
|
/**
|
|
2140
2053
|
* Emitted when window is maximized.
|
|
2141
2054
|
*/
|
|
@@ -2206,39 +2119,6 @@ declare namespace Electron {
|
|
|
2206
2119
|
* @platform darwin
|
|
2207
2120
|
*/
|
|
2208
2121
|
removeListener(event: 'new-window-for-tab', listener: Function): this;
|
|
2209
|
-
/**
|
|
2210
|
-
* Emitted when the document changed its title, calling `event.preventDefault()`
|
|
2211
|
-
* will prevent the native window's title from changing. `explicitSet` is false
|
|
2212
|
-
* when title is synthesized from file URL.
|
|
2213
|
-
*/
|
|
2214
|
-
on(event: 'page-title-updated', listener: (event: Event,
|
|
2215
|
-
title: string,
|
|
2216
|
-
explicitSet: boolean) => void): this;
|
|
2217
|
-
off(event: 'page-title-updated', listener: (event: Event,
|
|
2218
|
-
title: string,
|
|
2219
|
-
explicitSet: boolean) => void): this;
|
|
2220
|
-
once(event: 'page-title-updated', listener: (event: Event,
|
|
2221
|
-
title: string,
|
|
2222
|
-
explicitSet: boolean) => void): this;
|
|
2223
|
-
addListener(event: 'page-title-updated', listener: (event: Event,
|
|
2224
|
-
title: string,
|
|
2225
|
-
explicitSet: boolean) => void): this;
|
|
2226
|
-
removeListener(event: 'page-title-updated', listener: (event: Event,
|
|
2227
|
-
title: string,
|
|
2228
|
-
explicitSet: boolean) => void): this;
|
|
2229
|
-
/**
|
|
2230
|
-
* Emitted when the web page has been rendered (while not being shown) and window
|
|
2231
|
-
* can be displayed without a visual flash.
|
|
2232
|
-
*
|
|
2233
|
-
* Please note that using this event implies that the renderer will be considered
|
|
2234
|
-
* "visible" and paint even though `show` is false. This event will never fire if
|
|
2235
|
-
* you use `paintWhenInitiallyHidden: false`
|
|
2236
|
-
*/
|
|
2237
|
-
on(event: 'ready-to-show', listener: Function): this;
|
|
2238
|
-
off(event: 'ready-to-show', listener: Function): this;
|
|
2239
|
-
once(event: 'ready-to-show', listener: Function): this;
|
|
2240
|
-
addListener(event: 'ready-to-show', listener: Function): this;
|
|
2241
|
-
removeListener(event: 'ready-to-show', listener: Function): this;
|
|
2242
2122
|
/**
|
|
2243
2123
|
* Emitted after the window has been resized.
|
|
2244
2124
|
*/
|
|
@@ -2273,14 +2153,6 @@ declare namespace Electron {
|
|
|
2273
2153
|
* @platform darwin,win32
|
|
2274
2154
|
*/
|
|
2275
2155
|
removeListener(event: 'resized', listener: Function): this;
|
|
2276
|
-
/**
|
|
2277
|
-
* Emitted when the unresponsive web page becomes responsive again.
|
|
2278
|
-
*/
|
|
2279
|
-
on(event: 'responsive', listener: Function): this;
|
|
2280
|
-
off(event: 'responsive', listener: Function): this;
|
|
2281
|
-
once(event: 'responsive', listener: Function): this;
|
|
2282
|
-
addListener(event: 'responsive', listener: Function): this;
|
|
2283
|
-
removeListener(event: 'responsive', listener: Function): this;
|
|
2284
2156
|
/**
|
|
2285
2157
|
* Emitted when the window is restored from a minimized state.
|
|
2286
2158
|
*/
|
|
@@ -2485,14 +2357,6 @@ declare namespace Electron {
|
|
|
2485
2357
|
once(event: 'unmaximize', listener: Function): this;
|
|
2486
2358
|
addListener(event: 'unmaximize', listener: Function): this;
|
|
2487
2359
|
removeListener(event: 'unmaximize', listener: Function): this;
|
|
2488
|
-
/**
|
|
2489
|
-
* Emitted when the web page becomes unresponsive.
|
|
2490
|
-
*/
|
|
2491
|
-
on(event: 'unresponsive', listener: Function): this;
|
|
2492
|
-
off(event: 'unresponsive', listener: Function): this;
|
|
2493
|
-
once(event: 'unresponsive', listener: Function): this;
|
|
2494
|
-
addListener(event: 'unresponsive', listener: Function): this;
|
|
2495
|
-
removeListener(event: 'unresponsive', listener: Function): this;
|
|
2496
2360
|
/**
|
|
2497
2361
|
* Emitted before the window is moved. On Windows, calling `event.preventDefault()`
|
|
2498
2362
|
* will prevent the window from being moved.
|
|
@@ -2600,58 +2464,31 @@ declare namespace Electron {
|
|
|
2600
2464
|
newBounds: Rectangle,
|
|
2601
2465
|
details: WillResizeDetails) => void): this;
|
|
2602
2466
|
/**
|
|
2603
|
-
*
|
|
2604
|
-
*/
|
|
2605
|
-
constructor(options?: BrowserWindowConstructorOptions);
|
|
2606
|
-
/**
|
|
2607
|
-
* The window that owns the given `browserView`. If the given view is not attached
|
|
2608
|
-
* to any window, returns `null`.
|
|
2467
|
+
* BaseWindow
|
|
2609
2468
|
*/
|
|
2610
|
-
|
|
2469
|
+
constructor(options?: BaseWindowConstructorOptions);
|
|
2611
2470
|
/**
|
|
2612
2471
|
* The window with the given `id`.
|
|
2613
2472
|
*/
|
|
2614
|
-
static fromId(id: number): (
|
|
2615
|
-
/**
|
|
2616
|
-
* The window that owns the given `webContents` or `null` if the contents are not
|
|
2617
|
-
* owned by a window.
|
|
2618
|
-
*/
|
|
2619
|
-
static fromWebContents(webContents: WebContents): (BrowserWindow) | (null);
|
|
2473
|
+
static fromId(id: number): (BaseWindow) | (null);
|
|
2620
2474
|
/**
|
|
2621
2475
|
* An array of all opened browser windows.
|
|
2622
2476
|
*/
|
|
2623
|
-
static getAllWindows():
|
|
2477
|
+
static getAllWindows(): BaseWindow[];
|
|
2624
2478
|
/**
|
|
2625
2479
|
* The window that is focused in this application, otherwise returns `null`.
|
|
2626
2480
|
*/
|
|
2627
|
-
static getFocusedWindow(): (
|
|
2628
|
-
/**
|
|
2629
|
-
* Replacement API for setBrowserView supporting work with multi browser views.
|
|
2630
|
-
*
|
|
2631
|
-
* @experimental
|
|
2632
|
-
*/
|
|
2633
|
-
addBrowserView(browserView: BrowserView): void;
|
|
2481
|
+
static getFocusedWindow(): (BaseWindow) | (null);
|
|
2634
2482
|
/**
|
|
2635
2483
|
* Adds a window as a tab on this window, after the tab for the window instance.
|
|
2636
2484
|
*
|
|
2637
2485
|
* @platform darwin
|
|
2638
2486
|
*/
|
|
2639
|
-
addTabbedWindow(
|
|
2487
|
+
addTabbedWindow(baseWindow: BaseWindow): void;
|
|
2640
2488
|
/**
|
|
2641
2489
|
* Removes focus from the window.
|
|
2642
2490
|
*/
|
|
2643
2491
|
blur(): void;
|
|
2644
|
-
blurWebView(): void;
|
|
2645
|
-
/**
|
|
2646
|
-
* Resolves with a NativeImage
|
|
2647
|
-
*
|
|
2648
|
-
* Captures a snapshot of the page within `rect`. Omitting `rect` will capture the
|
|
2649
|
-
* whole visible page. If the page is not visible, `rect` may be empty. The page is
|
|
2650
|
-
* considered visible when its browser window is hidden and the capturer count is
|
|
2651
|
-
* non-zero. If you would like the page to stay hidden, you should ensure that
|
|
2652
|
-
* `stayHidden` is set to true.
|
|
2653
|
-
*/
|
|
2654
|
-
capturePage(rect?: Rectangle, opts?: Opts): Promise<Electron.NativeImage>;
|
|
2655
2492
|
/**
|
|
2656
2493
|
* Moves window to the center of the screen.
|
|
2657
2494
|
*/
|
|
@@ -2682,7 +2519,6 @@ declare namespace Electron {
|
|
|
2682
2519
|
* Focuses on the window.
|
|
2683
2520
|
*/
|
|
2684
2521
|
focus(): void;
|
|
2685
|
-
focusOnWebView(): void;
|
|
2686
2522
|
/**
|
|
2687
2523
|
* Gets the background color of the window in Hex (`#RRGGBB`) format.
|
|
2688
2524
|
*
|
|
@@ -2694,35 +2530,12 @@ declare namespace Electron {
|
|
|
2694
2530
|
getBackgroundColor(): string;
|
|
2695
2531
|
/**
|
|
2696
2532
|
* The `bounds` of the window as `Object`.
|
|
2697
|
-
*
|
|
2698
|
-
* **Note:** On macOS, the y-coordinate value returned will be at minimum the Tray
|
|
2699
|
-
* height. For example, calling `win.setBounds({ x: 25, y: 20, width: 800, height:
|
|
2700
|
-
* 600 })` with a tray height of 38 means that `win.getBounds()` will return `{ x:
|
|
2701
|
-
* 25, y: 38, width: 800, height: 600 }`.
|
|
2702
2533
|
*/
|
|
2703
2534
|
getBounds(): Rectangle;
|
|
2704
|
-
/**
|
|
2705
|
-
* The `BrowserView` attached to `win`. Returns `null` if one is not attached.
|
|
2706
|
-
* Throws an error if multiple `BrowserView`s are attached.
|
|
2707
|
-
*
|
|
2708
|
-
* @experimental
|
|
2709
|
-
*/
|
|
2710
|
-
getBrowserView(): (BrowserView) | (null);
|
|
2711
|
-
/**
|
|
2712
|
-
* a sorted by z-index array of all BrowserViews that have been attached with
|
|
2713
|
-
* `addBrowserView` or `setBrowserView`. The top-most BrowserView is the last
|
|
2714
|
-
* element of the array.
|
|
2715
|
-
*
|
|
2716
|
-
* **Note:** The BrowserView API is currently experimental and may change or be
|
|
2717
|
-
* removed in future Electron releases.
|
|
2718
|
-
*
|
|
2719
|
-
* @experimental
|
|
2720
|
-
*/
|
|
2721
|
-
getBrowserViews(): BrowserView[];
|
|
2722
2535
|
/**
|
|
2723
2536
|
* All child windows.
|
|
2724
2537
|
*/
|
|
2725
|
-
getChildWindows():
|
|
2538
|
+
getChildWindows(): BaseWindow[];
|
|
2726
2539
|
/**
|
|
2727
2540
|
* The `bounds` of the window's client area as `Object`.
|
|
2728
2541
|
*/
|
|
@@ -2731,6 +2544,10 @@ declare namespace Electron {
|
|
|
2731
2544
|
* Contains the window's client area's width and height.
|
|
2732
2545
|
*/
|
|
2733
2546
|
getContentSize(): number[];
|
|
2547
|
+
/**
|
|
2548
|
+
* Returns View - The content view of the window.
|
|
2549
|
+
*/
|
|
2550
|
+
getContentView(): void;
|
|
2734
2551
|
/**
|
|
2735
2552
|
* Contains the window's maximum width and height.
|
|
2736
2553
|
*/
|
|
@@ -2773,7 +2590,7 @@ declare namespace Electron {
|
|
|
2773
2590
|
/**
|
|
2774
2591
|
* The parent window or `null` if there is no parent.
|
|
2775
2592
|
*/
|
|
2776
|
-
getParentWindow(): (
|
|
2593
|
+
getParentWindow(): (BaseWindow) | (null);
|
|
2777
2594
|
/**
|
|
2778
2595
|
* Contains the window's current position.
|
|
2779
2596
|
*/
|
|
@@ -2795,6 +2612,16 @@ declare namespace Electron {
|
|
|
2795
2612
|
* native window.
|
|
2796
2613
|
*/
|
|
2797
2614
|
getTitle(): string;
|
|
2615
|
+
/**
|
|
2616
|
+
* The custom position for the traffic light buttons in frameless window, `{ x: 0,
|
|
2617
|
+
* y: 0 }` will be returned when there is no custom position.
|
|
2618
|
+
*
|
|
2619
|
+
* > **Note** This function is deprecated. Use getWindowButtonPosition instead.
|
|
2620
|
+
*
|
|
2621
|
+
* @deprecated
|
|
2622
|
+
* @platform darwin
|
|
2623
|
+
*/
|
|
2624
|
+
getTrafficLightPosition(): Point;
|
|
2798
2625
|
/**
|
|
2799
2626
|
* The custom position for the traffic light buttons in frameless window, `null`
|
|
2800
2627
|
* will be returned when there is no custom position.
|
|
@@ -2821,9 +2648,9 @@ declare namespace Electron {
|
|
|
2821
2648
|
* Invalidates the window shadow so that it is recomputed based on the current
|
|
2822
2649
|
* window shape.
|
|
2823
2650
|
*
|
|
2824
|
-
* `
|
|
2825
|
-
*
|
|
2826
|
-
*
|
|
2651
|
+
* `BaseWindow`s that are transparent can sometimes leave behind visual artifacts
|
|
2652
|
+
* on macOS. This method can be used to clear these artifacts when, for example,
|
|
2653
|
+
* performing an animation.
|
|
2827
2654
|
*
|
|
2828
2655
|
* @platform darwin
|
|
2829
2656
|
*/
|
|
@@ -2960,7 +2787,7 @@ declare namespace Electron {
|
|
|
2960
2787
|
*/
|
|
2961
2788
|
isTabletMode(): boolean;
|
|
2962
2789
|
/**
|
|
2963
|
-
* Whether the window is visible to the user
|
|
2790
|
+
* Whether the window is visible to the user.
|
|
2964
2791
|
*/
|
|
2965
2792
|
isVisible(): boolean;
|
|
2966
2793
|
/**
|
|
@@ -2977,31 +2804,6 @@ declare namespace Electron {
|
|
|
2977
2804
|
* @platform win32
|
|
2978
2805
|
*/
|
|
2979
2806
|
isWindowMessageHooked(message: number): boolean;
|
|
2980
|
-
/**
|
|
2981
|
-
* the promise will resolve when the page has finished loading (see
|
|
2982
|
-
* `did-finish-load`), and rejects if the page fails to load (see `did-fail-load`).
|
|
2983
|
-
*
|
|
2984
|
-
* Same as `webContents.loadFile`, `filePath` should be a path to an HTML file
|
|
2985
|
-
* relative to the root of your application. See the `webContents` docs for more
|
|
2986
|
-
* information.
|
|
2987
|
-
*/
|
|
2988
|
-
loadFile(filePath: string, options?: LoadFileOptions): Promise<void>;
|
|
2989
|
-
/**
|
|
2990
|
-
* the promise will resolve when the page has finished loading (see
|
|
2991
|
-
* `did-finish-load`), and rejects if the page fails to load (see `did-fail-load`).
|
|
2992
|
-
*
|
|
2993
|
-
* Same as `webContents.loadURL(url[, options])`.
|
|
2994
|
-
*
|
|
2995
|
-
* The `url` can be a remote address (e.g. `http://`) or a path to a local HTML
|
|
2996
|
-
* file using the `file://` protocol.
|
|
2997
|
-
*
|
|
2998
|
-
* To ensure that file URLs are properly formatted, it is recommended to use Node's
|
|
2999
|
-
* `url.format` method:
|
|
3000
|
-
*
|
|
3001
|
-
* You can load a URL using a `POST` request with URL-encoded data by doing the
|
|
3002
|
-
* following:
|
|
3003
|
-
*/
|
|
3004
|
-
loadURL(url: string, options?: LoadURLOptions): Promise<void>;
|
|
3005
2807
|
/**
|
|
3006
2808
|
* Maximizes the window. This will also show (but not focus) the window if it isn't
|
|
3007
2809
|
* being displayed already.
|
|
@@ -3042,14 +2844,6 @@ declare namespace Electron {
|
|
|
3042
2844
|
* @platform darwin
|
|
3043
2845
|
*/
|
|
3044
2846
|
previewFile(path: string, displayName?: string): void;
|
|
3045
|
-
/**
|
|
3046
|
-
* Same as `webContents.reload`.
|
|
3047
|
-
*/
|
|
3048
|
-
reload(): void;
|
|
3049
|
-
/**
|
|
3050
|
-
* @experimental
|
|
3051
|
-
*/
|
|
3052
|
-
removeBrowserView(browserView: BrowserView): void;
|
|
3053
2847
|
/**
|
|
3054
2848
|
* Remove the window's menu bar.
|
|
3055
2849
|
*
|
|
@@ -3136,16 +2930,16 @@ declare namespace Electron {
|
|
|
3136
2930
|
* * #ffffff (RGB)
|
|
3137
2931
|
* * #ffffffff (ARGB)
|
|
3138
2932
|
* * RGB
|
|
3139
|
-
* * rgb(([\d]+),\s*([\d]+),\s*([\d]+))
|
|
2933
|
+
* * `rgb\(([\d]+),\s*([\d]+),\s*([\d]+)\)`
|
|
3140
2934
|
* * e.g. rgb(255, 255, 255)
|
|
3141
2935
|
* * RGBA
|
|
3142
|
-
* * rgba(([\d]+),\s*([\d]+),\s*([\d]+),\s*([\d.]+))
|
|
2936
|
+
* * `rgba\(([\d]+),\s*([\d]+),\s*([\d]+),\s*([\d.]+)\)`
|
|
3143
2937
|
* * e.g. rgba(255, 255, 255, 1.0)
|
|
3144
2938
|
* * HSL
|
|
3145
|
-
* * hsl((-?[\d.]+),\s*([\d.]+)%,\s*([\d.]+)
|
|
2939
|
+
* * `hsl\((-?[\d.]+),\s*([\d.]+)%,\s*([\d.]+)%\)`
|
|
3146
2940
|
* * e.g. hsl(200, 20%, 50%)
|
|
3147
2941
|
* * HSLA
|
|
3148
|
-
* * hsla((-?[\d.]+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+))
|
|
2942
|
+
* * `hsla\((-?[\d.]+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)`
|
|
3149
2943
|
* * e.g. hsla(200, 20%, 50%, 0.5)
|
|
3150
2944
|
* * Color name
|
|
3151
2945
|
* * Options are listed in SkParseColor.cpp
|
|
@@ -3155,31 +2949,11 @@ declare namespace Electron {
|
|
|
3155
2949
|
* Sets the background color of the window. See Setting `backgroundColor`.
|
|
3156
2950
|
*/
|
|
3157
2951
|
setBackgroundColor(backgroundColor: string): void;
|
|
3158
|
-
/**
|
|
3159
|
-
* This method sets the browser window's system-drawn background material,
|
|
3160
|
-
* including behind the non-client area.
|
|
3161
|
-
*
|
|
3162
|
-
* See the Windows documentation for more details.
|
|
3163
|
-
*
|
|
3164
|
-
* **Note:** This method is only supported on Windows 11 22H2 and up.
|
|
3165
|
-
*
|
|
3166
|
-
* @platform win32
|
|
3167
|
-
*/
|
|
3168
|
-
setBackgroundMaterial(material: 'auto' | 'none' | 'mica' | 'acrylic' | 'tabbed'): void;
|
|
3169
2952
|
/**
|
|
3170
2953
|
* Resizes and moves the window to the supplied bounds. Any properties that are not
|
|
3171
2954
|
* supplied will default to their current values.
|
|
3172
|
-
*
|
|
3173
|
-
* **Note:** On macOS, the y-coordinate value cannot be smaller than the Tray
|
|
3174
|
-
* height. The tray height has changed over time and depends on the operating
|
|
3175
|
-
* system, but is between 20-40px. Passing a value lower than the tray height will
|
|
3176
|
-
* result in a window that is flush to the tray.
|
|
3177
2955
|
*/
|
|
3178
2956
|
setBounds(bounds: Partial<Rectangle>, animate?: boolean): void;
|
|
3179
|
-
/**
|
|
3180
|
-
* @experimental
|
|
3181
|
-
*/
|
|
3182
|
-
setBrowserView(browserView: (BrowserView) | (null)): void;
|
|
3183
2957
|
/**
|
|
3184
2958
|
* Sets whether the window can be manually closed by user. On Linux does nothing.
|
|
3185
2959
|
*
|
|
@@ -3206,6 +2980,10 @@ declare namespace Electron {
|
|
|
3206
2980
|
* Resizes the window's client area (e.g. the web page) to `width` and `height`.
|
|
3207
2981
|
*/
|
|
3208
2982
|
setContentSize(width: number, height: number, animate?: boolean): void;
|
|
2983
|
+
/**
|
|
2984
|
+
* Sets the content view of the window.
|
|
2985
|
+
*/
|
|
2986
|
+
setContentView(view: View): void;
|
|
3209
2987
|
/**
|
|
3210
2988
|
* Specifies whether the window’s document has been edited, and the icon in title
|
|
3211
2989
|
* bar will become gray when set to `true`.
|
|
@@ -3227,10 +3005,6 @@ declare namespace Electron {
|
|
|
3227
3005
|
setFocusable(focusable: boolean): void;
|
|
3228
3006
|
/**
|
|
3229
3007
|
* Sets whether the window should be in fullscreen mode.
|
|
3230
|
-
*
|
|
3231
|
-
* **Note:** On macOS, fullscreen transitions take place asynchronously. If further
|
|
3232
|
-
* actions depend on the fullscreen state, use the 'enter-full-screen' or
|
|
3233
|
-
* 'leave-full-screen' events.
|
|
3234
3008
|
*/
|
|
3235
3009
|
setFullScreen(flag: boolean): void;
|
|
3236
3010
|
/**
|
|
@@ -3325,7 +3099,7 @@ declare namespace Electron {
|
|
|
3325
3099
|
* Sets `parent` as current window's parent window, passing `null` will turn
|
|
3326
3100
|
* current window into a top-level window.
|
|
3327
3101
|
*/
|
|
3328
|
-
setParentWindow(parent: (
|
|
3102
|
+
setParentWindow(parent: (BaseWindow) | (null)): void;
|
|
3329
3103
|
/**
|
|
3330
3104
|
* Moves window to `x` and `y`.
|
|
3331
3105
|
*/
|
|
@@ -3369,8 +3143,8 @@ declare namespace Electron {
|
|
|
3369
3143
|
setShape(rects: Rectangle[]): void;
|
|
3370
3144
|
/**
|
|
3371
3145
|
* Changes the attachment point for sheets on macOS. By default, sheets are
|
|
3372
|
-
* attached just below the window frame, but you may want to
|
|
3373
|
-
*
|
|
3146
|
+
* attached just below the window frame, but you may want to offset them. For
|
|
3147
|
+
* example:
|
|
3374
3148
|
*
|
|
3375
3149
|
* @platform darwin
|
|
3376
3150
|
*/
|
|
@@ -3458,14 +3232,7 @@ declare namespace Electron {
|
|
|
3458
3232
|
*
|
|
3459
3233
|
* @platform win32
|
|
3460
3234
|
*/
|
|
3461
|
-
setTitleBarOverlay(options:
|
|
3462
|
-
/**
|
|
3463
|
-
* Raises `browserView` above other `BrowserView`s attached to `win`. Throws an
|
|
3464
|
-
* error if `browserView` is not attached to `win`.
|
|
3465
|
-
*
|
|
3466
|
-
* @experimental
|
|
3467
|
-
*/
|
|
3468
|
-
setTopBrowserView(browserView: BrowserView): void;
|
|
3235
|
+
setTitleBarOverlay(options: TitleBarOverlayOptions): void;
|
|
3469
3236
|
/**
|
|
3470
3237
|
* Sets the touchBar layout for the current window. Specifying `null` or
|
|
3471
3238
|
* `undefined` clears the touch bar. This method only has an effect if the machine
|
|
@@ -3478,12 +3245,25 @@ declare namespace Electron {
|
|
|
3478
3245
|
*/
|
|
3479
3246
|
setTouchBar(touchBar: (TouchBar) | (null)): void;
|
|
3480
3247
|
/**
|
|
3481
|
-
*
|
|
3482
|
-
*
|
|
3248
|
+
* Set a custom position for the traffic light buttons in frameless window. Passing
|
|
3249
|
+
* `{ x: 0, y: 0 }` will reset the position to default.
|
|
3250
|
+
*
|
|
3251
|
+
* > **Note** This function is deprecated. Use setWindowButtonPosition instead.
|
|
3252
|
+
*
|
|
3253
|
+
* @deprecated
|
|
3254
|
+
* @platform darwin
|
|
3255
|
+
*/
|
|
3256
|
+
setTrafficLightPosition(position: Point): void;
|
|
3257
|
+
/**
|
|
3258
|
+
* Adds a vibrancy effect to the window. Passing `null` or an empty string will
|
|
3259
|
+
* remove the vibrancy effect on the window.
|
|
3260
|
+
*
|
|
3261
|
+
* Note that `appearance-based`, `light`, `dark`, `medium-light`, and `ultra-dark`
|
|
3262
|
+
* have been deprecated and will be removed in an upcoming version of macOS.
|
|
3483
3263
|
*
|
|
3484
3264
|
* @platform darwin
|
|
3485
3265
|
*/
|
|
3486
|
-
setVibrancy(type: (('titlebar' | 'selection' | 'menu' | 'popover' | 'sidebar' | 'header' | 'sheet' | 'window' | 'hud' | 'fullscreen-ui' | 'tooltip' | 'content' | 'under-window' | 'under-page')) | (null)): void;
|
|
3266
|
+
setVibrancy(type: (('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)): void;
|
|
3487
3267
|
/**
|
|
3488
3268
|
* Sets whether the window should be visible on all workspaces.
|
|
3489
3269
|
*
|
|
@@ -3509,18 +3289,6 @@ declare namespace Electron {
|
|
|
3509
3289
|
* Shows and gives focus to the window.
|
|
3510
3290
|
*/
|
|
3511
3291
|
show(): void;
|
|
3512
|
-
/**
|
|
3513
|
-
* Shows or hides the tab overview when native tabs are enabled.
|
|
3514
|
-
*
|
|
3515
|
-
* @platform darwin
|
|
3516
|
-
*/
|
|
3517
|
-
showAllTabs(): void;
|
|
3518
|
-
/**
|
|
3519
|
-
* Same as `webContents.showDefinitionForSelection()`.
|
|
3520
|
-
*
|
|
3521
|
-
* @platform darwin
|
|
3522
|
-
*/
|
|
3523
|
-
showDefinitionForSelection(): void;
|
|
3524
3292
|
/**
|
|
3525
3293
|
* Shows the window but doesn't focus on it.
|
|
3526
3294
|
*/
|
|
@@ -3572,6 +3340,10 @@ declare namespace Electron {
|
|
|
3572
3340
|
* @platform darwin,win32
|
|
3573
3341
|
*/
|
|
3574
3342
|
closable: boolean;
|
|
3343
|
+
/**
|
|
3344
|
+
* A `View` property for the content view of the window.
|
|
3345
|
+
*/
|
|
3346
|
+
contentView: View;
|
|
3575
3347
|
/**
|
|
3576
3348
|
* A `boolean` property that specifies whether the window’s document has been
|
|
3577
3349
|
* edited.
|
|
@@ -3605,7 +3377,7 @@ declare namespace Electron {
|
|
|
3605
3377
|
fullScreenable: boolean;
|
|
3606
3378
|
/**
|
|
3607
3379
|
* A `Integer` property representing the unique ID of the window. Each ID is unique
|
|
3608
|
-
* among all `
|
|
3380
|
+
* among all `BaseWindow` instances of the entire Electron application.
|
|
3609
3381
|
*
|
|
3610
3382
|
*/
|
|
3611
3383
|
readonly id: number;
|
|
@@ -3669,13 +3441,6 @@ declare namespace Electron {
|
|
|
3669
3441
|
* fullscreen mode.
|
|
3670
3442
|
*/
|
|
3671
3443
|
simpleFullScreen: boolean;
|
|
3672
|
-
/**
|
|
3673
|
-
* A `string` (optional) property that is equal to the `tabbingIdentifier` passed
|
|
3674
|
-
* to the `BrowserWindow` constructor or `undefined` if none was set.
|
|
3675
|
-
*
|
|
3676
|
-
* @platform darwin
|
|
3677
|
-
*/
|
|
3678
|
-
readonly tabbingIdentifier?: string;
|
|
3679
3444
|
/**
|
|
3680
3445
|
* A `string` property that determines the title of the native window.
|
|
3681
3446
|
*
|
|
@@ -3692,19 +3457,11 @@ declare namespace Electron {
|
|
|
3692
3457
|
* @platform darwin,linux
|
|
3693
3458
|
*/
|
|
3694
3459
|
visibleOnAllWorkspaces: boolean;
|
|
3695
|
-
/**
|
|
3696
|
-
* A `WebContents` object this window owns. All web page related events and
|
|
3697
|
-
* operations will be done via it.
|
|
3698
|
-
*
|
|
3699
|
-
* See the `webContents` documentation for its methods and events.
|
|
3700
|
-
*
|
|
3701
|
-
*/
|
|
3702
|
-
readonly webContents: WebContents;
|
|
3703
3460
|
}
|
|
3704
3461
|
|
|
3705
|
-
interface
|
|
3462
|
+
interface BaseWindowConstructorOptions {
|
|
3706
3463
|
|
|
3707
|
-
// Docs: https://electronjs.org/docs/api/structures/
|
|
3464
|
+
// Docs: https://electronjs.org/docs/api/structures/base-window-options
|
|
3708
3465
|
|
|
3709
3466
|
/**
|
|
3710
3467
|
* Whether clicking an inactive window will also click through to the web contents.
|
|
@@ -3847,155 +3604,2505 @@ declare namespace Electron {
|
|
|
3847
3604
|
/**
|
|
3848
3605
|
* Whether window is movable. This is not implemented on Linux. Default is `true`.
|
|
3849
3606
|
*
|
|
3850
|
-
* @platform darwin,win32
|
|
3607
|
+
* @platform darwin,win32
|
|
3608
|
+
*/
|
|
3609
|
+
movable?: boolean;
|
|
3610
|
+
/**
|
|
3611
|
+
* Set the initial opacity of the window, between 0.0 (fully transparent) and 1.0
|
|
3612
|
+
* (fully opaque). This is only implemented on Windows and macOS.
|
|
3613
|
+
*
|
|
3614
|
+
* @platform darwin,win32
|
|
3615
|
+
*/
|
|
3616
|
+
opacity?: number;
|
|
3617
|
+
/**
|
|
3618
|
+
* Specify parent window. Default is `null`.
|
|
3619
|
+
*/
|
|
3620
|
+
parent?: BaseWindow;
|
|
3621
|
+
/**
|
|
3622
|
+
* Whether window is resizable. Default is `true`.
|
|
3623
|
+
*/
|
|
3624
|
+
resizable?: boolean;
|
|
3625
|
+
/**
|
|
3626
|
+
* Whether frameless window should have rounded corners on macOS. Default is
|
|
3627
|
+
* `true`. Setting this property to `false` will prevent the window from being
|
|
3628
|
+
* fullscreenable.
|
|
3629
|
+
*
|
|
3630
|
+
* @platform darwin
|
|
3631
|
+
*/
|
|
3632
|
+
roundedCorners?: boolean;
|
|
3633
|
+
/**
|
|
3634
|
+
* Whether window should be shown when created. Default is `true`.
|
|
3635
|
+
*/
|
|
3636
|
+
show?: boolean;
|
|
3637
|
+
/**
|
|
3638
|
+
* Use pre-Lion fullscreen on macOS. Default is `false`.
|
|
3639
|
+
*
|
|
3640
|
+
* @platform darwin
|
|
3641
|
+
*/
|
|
3642
|
+
simpleFullscreen?: boolean;
|
|
3643
|
+
/**
|
|
3644
|
+
* Whether to show the window in taskbar. Default is `false`.
|
|
3645
|
+
*
|
|
3646
|
+
* @platform darwin,win32
|
|
3647
|
+
*/
|
|
3648
|
+
skipTaskbar?: boolean;
|
|
3649
|
+
/**
|
|
3650
|
+
* Tab group name, allows opening the window as a native tab. Windows with the same
|
|
3651
|
+
* tabbing identifier will be grouped together. This also adds a native new tab
|
|
3652
|
+
* button to your window's tab bar and allows your `app` and window to receive the
|
|
3653
|
+
* `new-window-for-tab` event.
|
|
3654
|
+
*
|
|
3655
|
+
* @platform darwin
|
|
3656
|
+
*/
|
|
3657
|
+
tabbingIdentifier?: string;
|
|
3658
|
+
/**
|
|
3659
|
+
* Use `WS_THICKFRAME` style for frameless windows on Windows, which adds standard
|
|
3660
|
+
* window frame. Setting it to `false` will remove window shadow and window
|
|
3661
|
+
* animations. Default is `true`.
|
|
3662
|
+
*/
|
|
3663
|
+
thickFrame?: boolean;
|
|
3664
|
+
/**
|
|
3665
|
+
* Default window title. Default is `"Electron"`. If the HTML tag `<title>` is
|
|
3666
|
+
* defined in the HTML file loaded by `loadURL()`, this property will be ignored.
|
|
3667
|
+
*/
|
|
3668
|
+
title?: string;
|
|
3669
|
+
/**
|
|
3670
|
+
* The style of window title bar. Default is `default`. Possible values are:
|
|
3671
|
+
*
|
|
3672
|
+
* @platform darwin,win32
|
|
3673
|
+
*/
|
|
3674
|
+
titleBarStyle?: ('default' | 'hidden' | 'hiddenInset' | 'customButtonsOnHover');
|
|
3675
|
+
/**
|
|
3676
|
+
* Set a custom position for the traffic light buttons in frameless windows.
|
|
3677
|
+
*
|
|
3678
|
+
* @platform darwin
|
|
3679
|
+
*/
|
|
3680
|
+
trafficLightPosition?: Point;
|
|
3681
|
+
/**
|
|
3682
|
+
* Makes the window transparent. Default is `false`. On Windows, does not work
|
|
3683
|
+
* unless the window is frameless.
|
|
3684
|
+
*/
|
|
3685
|
+
transparent?: boolean;
|
|
3686
|
+
/**
|
|
3687
|
+
* The type of window, default is normal window. See more about this below.
|
|
3688
|
+
*/
|
|
3689
|
+
type?: string;
|
|
3690
|
+
/**
|
|
3691
|
+
* The `width` and `height` would be used as web page's size, which means the
|
|
3692
|
+
* actual window's size will include window frame's size and be slightly larger.
|
|
3693
|
+
* Default is `false`.
|
|
3694
|
+
*/
|
|
3695
|
+
useContentSize?: boolean;
|
|
3696
|
+
/**
|
|
3697
|
+
* Add a type of vibrancy effect to the window, only on macOS. Can be
|
|
3698
|
+
* `appearance-based`, `titlebar`, `selection`, `menu`, `popover`, `sidebar`,
|
|
3699
|
+
* `header`, `sheet`, `window`, `hud`, `fullscreen-ui`, `tooltip`, `content`,
|
|
3700
|
+
* `under-window`, or `under-page`.
|
|
3701
|
+
*
|
|
3702
|
+
* @platform darwin
|
|
3703
|
+
*/
|
|
3704
|
+
vibrancy?: ('appearance-based' | 'titlebar' | 'selection' | 'menu' | 'popover' | 'sidebar' | 'header' | 'sheet' | 'window' | 'hud' | 'fullscreen-ui' | 'tooltip' | 'content' | 'under-window' | 'under-page');
|
|
3705
|
+
/**
|
|
3706
|
+
* Specify how the material appearance should reflect window activity state on
|
|
3707
|
+
* macOS. Must be used with the `vibrancy` property. Possible values are:
|
|
3708
|
+
*
|
|
3709
|
+
* @platform darwin
|
|
3710
|
+
*/
|
|
3711
|
+
visualEffectState?: ('followWindow' | 'active' | 'inactive');
|
|
3712
|
+
/**
|
|
3713
|
+
* Window's width in pixels. Default is `800`.
|
|
3714
|
+
*/
|
|
3715
|
+
width?: number;
|
|
3716
|
+
/**
|
|
3717
|
+
* (**required** if y is used) Window's left offset from screen. Default is to
|
|
3718
|
+
* center the window.
|
|
3719
|
+
*/
|
|
3720
|
+
x?: number;
|
|
3721
|
+
/**
|
|
3722
|
+
* (**required** if x is used) Window's top offset from screen. Default is to
|
|
3723
|
+
* center the window.
|
|
3724
|
+
*/
|
|
3725
|
+
y?: number;
|
|
3726
|
+
/**
|
|
3727
|
+
* Controls the behavior on macOS when option-clicking the green stoplight button
|
|
3728
|
+
* on the toolbar or by clicking the Window > Zoom menu item. If `true`, the window
|
|
3729
|
+
* will grow to the preferred width of the web page when zoomed, `false` will cause
|
|
3730
|
+
* it to zoom to the width of the screen. This will also affect the behavior when
|
|
3731
|
+
* calling `maximize()` directly. Default is `false`.
|
|
3732
|
+
*
|
|
3733
|
+
* @platform darwin
|
|
3734
|
+
*/
|
|
3735
|
+
zoomToPageWidth?: boolean;
|
|
3736
|
+
}
|
|
3737
|
+
|
|
3738
|
+
interface BluetoothDevice {
|
|
3739
|
+
|
|
3740
|
+
// Docs: https://electronjs.org/docs/api/structures/bluetooth-device
|
|
3741
|
+
|
|
3742
|
+
deviceId: string;
|
|
3743
|
+
deviceName: string;
|
|
3744
|
+
}
|
|
3745
|
+
|
|
3746
|
+
class BrowserView {
|
|
3747
|
+
|
|
3748
|
+
// Docs: https://electronjs.org/docs/api/browser-view
|
|
3749
|
+
|
|
3750
|
+
/**
|
|
3751
|
+
* BrowserView
|
|
3752
|
+
*/
|
|
3753
|
+
constructor(options?: BrowserViewConstructorOptions);
|
|
3754
|
+
/**
|
|
3755
|
+
* The `bounds` of this BrowserView instance as `Object`.
|
|
3756
|
+
*
|
|
3757
|
+
* @experimental
|
|
3758
|
+
* @deprecated
|
|
3759
|
+
*/
|
|
3760
|
+
getBounds(): Rectangle;
|
|
3761
|
+
/**
|
|
3762
|
+
* @experimental
|
|
3763
|
+
* @deprecated
|
|
3764
|
+
*/
|
|
3765
|
+
setAutoResize(options: AutoResizeOptions): void;
|
|
3766
|
+
/**
|
|
3767
|
+
* Examples of valid `color` values:
|
|
3768
|
+
*
|
|
3769
|
+
* * Hex
|
|
3770
|
+
* * `#fff` (RGB)
|
|
3771
|
+
* * `#ffff` (ARGB)
|
|
3772
|
+
* * `#ffffff` (RRGGBB)
|
|
3773
|
+
* * `#ffffffff` (AARRGGBB)
|
|
3774
|
+
* * RGB
|
|
3775
|
+
* * `rgb\(([\d]+),\s*([\d]+),\s*([\d]+)\)`
|
|
3776
|
+
* * e.g. `rgb(255, 255, 255)`
|
|
3777
|
+
* * RGBA
|
|
3778
|
+
* * `rgba\(([\d]+),\s*([\d]+),\s*([\d]+),\s*([\d.]+)\)`
|
|
3779
|
+
* * e.g. `rgba(255, 255, 255, 1.0)`
|
|
3780
|
+
* * HSL
|
|
3781
|
+
* * `hsl\((-?[\d.]+),\s*([\d.]+)%,\s*([\d.]+)%\)`
|
|
3782
|
+
* * e.g. `hsl(200, 20%, 50%)`
|
|
3783
|
+
* * HSLA
|
|
3784
|
+
* * `hsla\((-?[\d.]+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)`
|
|
3785
|
+
* * e.g. `hsla(200, 20%, 50%, 0.5)`
|
|
3786
|
+
* * Color name
|
|
3787
|
+
* * Options are listed in SkParseColor.cpp
|
|
3788
|
+
* * Similar to CSS Color Module Level 3 keywords, but case-sensitive.
|
|
3789
|
+
* * e.g. `blueviolet` or `red`
|
|
3790
|
+
*
|
|
3791
|
+
* **Note:** Hex format with alpha takes `AARRGGBB` or `ARGB`, _not_ `RRGGBBAA` or
|
|
3792
|
+
* `RGB`.
|
|
3793
|
+
*
|
|
3794
|
+
* @experimental
|
|
3795
|
+
* @deprecated
|
|
3796
|
+
*/
|
|
3797
|
+
setBackgroundColor(color: string): void;
|
|
3798
|
+
/**
|
|
3799
|
+
* Resizes and moves the view to the supplied bounds relative to the window.
|
|
3800
|
+
*
|
|
3801
|
+
* @experimental
|
|
3802
|
+
* @deprecated
|
|
3803
|
+
*/
|
|
3804
|
+
setBounds(bounds: Rectangle): void;
|
|
3805
|
+
/**
|
|
3806
|
+
* A `WebContents` object owned by this view.
|
|
3807
|
+
*
|
|
3808
|
+
* @experimental
|
|
3809
|
+
* @deprecated
|
|
3810
|
+
*/
|
|
3811
|
+
webContents: WebContents;
|
|
3812
|
+
}
|
|
3813
|
+
|
|
3814
|
+
class BrowserWindow extends BaseWindow {
|
|
3815
|
+
|
|
3816
|
+
// Docs: https://electronjs.org/docs/api/browser-window
|
|
3817
|
+
|
|
3818
|
+
/**
|
|
3819
|
+
* Emitted when the window is set or unset to show always on top of other windows.
|
|
3820
|
+
*/
|
|
3821
|
+
on(event: 'always-on-top-changed', listener: (event: Event,
|
|
3822
|
+
isAlwaysOnTop: boolean) => void): this;
|
|
3823
|
+
off(event: 'always-on-top-changed', listener: (event: Event,
|
|
3824
|
+
isAlwaysOnTop: boolean) => void): this;
|
|
3825
|
+
once(event: 'always-on-top-changed', listener: (event: Event,
|
|
3826
|
+
isAlwaysOnTop: boolean) => void): this;
|
|
3827
|
+
addListener(event: 'always-on-top-changed', listener: (event: Event,
|
|
3828
|
+
isAlwaysOnTop: boolean) => void): this;
|
|
3829
|
+
removeListener(event: 'always-on-top-changed', listener: (event: Event,
|
|
3830
|
+
isAlwaysOnTop: boolean) => void): this;
|
|
3831
|
+
/**
|
|
3832
|
+
* Emitted when the window is set or unset to show always on top of other windows.
|
|
3833
|
+
*/
|
|
3834
|
+
on(event: 'always-on-top-changed', listener: (event: Event,
|
|
3835
|
+
isAlwaysOnTop: boolean) => void): this;
|
|
3836
|
+
off(event: 'always-on-top-changed', listener: (event: Event,
|
|
3837
|
+
isAlwaysOnTop: boolean) => void): this;
|
|
3838
|
+
once(event: 'always-on-top-changed', listener: (event: Event,
|
|
3839
|
+
isAlwaysOnTop: boolean) => void): this;
|
|
3840
|
+
addListener(event: 'always-on-top-changed', listener: (event: Event,
|
|
3841
|
+
isAlwaysOnTop: boolean) => void): this;
|
|
3842
|
+
removeListener(event: 'always-on-top-changed', listener: (event: Event,
|
|
3843
|
+
isAlwaysOnTop: boolean) => void): this;
|
|
3844
|
+
/**
|
|
3845
|
+
* Emitted when an App Command is invoked. These are typically related to keyboard
|
|
3846
|
+
* media keys or browser commands, as well as the "Back" button built into some
|
|
3847
|
+
* mice on Windows.
|
|
3848
|
+
*
|
|
3849
|
+
* Commands are lowercased, underscores are replaced with hyphens, and the
|
|
3850
|
+
* `APPCOMMAND_` prefix is stripped off. e.g. `APPCOMMAND_BROWSER_BACKWARD` is
|
|
3851
|
+
* emitted as `browser-backward`.
|
|
3852
|
+
*
|
|
3853
|
+
* The following app commands are explicitly supported on Linux:
|
|
3854
|
+
*
|
|
3855
|
+
* * `browser-backward`
|
|
3856
|
+
* * `browser-forward`
|
|
3857
|
+
*
|
|
3858
|
+
* @platform win32,linux
|
|
3859
|
+
*/
|
|
3860
|
+
on(event: 'app-command', listener: (event: Event,
|
|
3861
|
+
command: string) => void): this;
|
|
3862
|
+
/**
|
|
3863
|
+
* @platform win32,linux
|
|
3864
|
+
*/
|
|
3865
|
+
off(event: 'app-command', listener: (event: Event,
|
|
3866
|
+
command: string) => void): this;
|
|
3867
|
+
/**
|
|
3868
|
+
* @platform win32,linux
|
|
3869
|
+
*/
|
|
3870
|
+
once(event: 'app-command', listener: (event: Event,
|
|
3871
|
+
command: string) => void): this;
|
|
3872
|
+
/**
|
|
3873
|
+
* @platform win32,linux
|
|
3874
|
+
*/
|
|
3875
|
+
addListener(event: 'app-command', listener: (event: Event,
|
|
3876
|
+
command: string) => void): this;
|
|
3877
|
+
/**
|
|
3878
|
+
* @platform win32,linux
|
|
3879
|
+
*/
|
|
3880
|
+
removeListener(event: 'app-command', listener: (event: Event,
|
|
3881
|
+
command: string) => void): this;
|
|
3882
|
+
/**
|
|
3883
|
+
* Emitted when an App Command is invoked. These are typically related to keyboard
|
|
3884
|
+
* media keys or browser commands, as well as the "Back" button built into some
|
|
3885
|
+
* mice on Windows.
|
|
3886
|
+
*
|
|
3887
|
+
* Commands are lowercased, underscores are replaced with hyphens, and the
|
|
3888
|
+
* `APPCOMMAND_` prefix is stripped off. e.g. `APPCOMMAND_BROWSER_BACKWARD` is
|
|
3889
|
+
* emitted as `browser-backward`.
|
|
3890
|
+
*
|
|
3891
|
+
* The following app commands are explicitly supported on Linux:
|
|
3892
|
+
*
|
|
3893
|
+
* * `browser-backward`
|
|
3894
|
+
* * `browser-forward`
|
|
3895
|
+
*
|
|
3896
|
+
* @platform win32,linux
|
|
3897
|
+
*/
|
|
3898
|
+
on(event: 'app-command', listener: (event: Event,
|
|
3899
|
+
command: string) => void): this;
|
|
3900
|
+
/**
|
|
3901
|
+
* @platform win32,linux
|
|
3902
|
+
*/
|
|
3903
|
+
off(event: 'app-command', listener: (event: Event,
|
|
3904
|
+
command: string) => void): this;
|
|
3905
|
+
/**
|
|
3906
|
+
* @platform win32,linux
|
|
3907
|
+
*/
|
|
3908
|
+
once(event: 'app-command', listener: (event: Event,
|
|
3909
|
+
command: string) => void): this;
|
|
3910
|
+
/**
|
|
3911
|
+
* @platform win32,linux
|
|
3912
|
+
*/
|
|
3913
|
+
addListener(event: 'app-command', listener: (event: Event,
|
|
3914
|
+
command: string) => void): this;
|
|
3915
|
+
/**
|
|
3916
|
+
* @platform win32,linux
|
|
3917
|
+
*/
|
|
3918
|
+
removeListener(event: 'app-command', listener: (event: Event,
|
|
3919
|
+
command: string) => void): this;
|
|
3920
|
+
/**
|
|
3921
|
+
* Emitted when the window loses focus.
|
|
3922
|
+
*/
|
|
3923
|
+
on(event: 'blur', listener: Function): this;
|
|
3924
|
+
off(event: 'blur', listener: Function): this;
|
|
3925
|
+
once(event: 'blur', listener: Function): this;
|
|
3926
|
+
addListener(event: 'blur', listener: Function): this;
|
|
3927
|
+
removeListener(event: 'blur', listener: Function): this;
|
|
3928
|
+
/**
|
|
3929
|
+
* Emitted when the window loses focus.
|
|
3930
|
+
*/
|
|
3931
|
+
on(event: 'blur', listener: Function): this;
|
|
3932
|
+
off(event: 'blur', listener: Function): this;
|
|
3933
|
+
once(event: 'blur', listener: Function): this;
|
|
3934
|
+
addListener(event: 'blur', listener: Function): this;
|
|
3935
|
+
removeListener(event: 'blur', listener: Function): this;
|
|
3936
|
+
/**
|
|
3937
|
+
* Emitted when the window is going to be closed. It's emitted before the
|
|
3938
|
+
* `beforeunload` and `unload` event of the DOM. Calling `event.preventDefault()`
|
|
3939
|
+
* will cancel the close.
|
|
3940
|
+
*
|
|
3941
|
+
* Usually you would want to use the `beforeunload` handler to decide whether the
|
|
3942
|
+
* window should be closed, which will also be called when the window is reloaded.
|
|
3943
|
+
* In Electron, returning any value other than `undefined` would cancel the close.
|
|
3944
|
+
* For example:
|
|
3945
|
+
*
|
|
3946
|
+
* _**Note**: There is a subtle difference between the behaviors of
|
|
3947
|
+
* `window.onbeforeunload = handler` and `window.addEventListener('beforeunload',
|
|
3948
|
+
* handler)`. It is recommended to always set the `event.returnValue` explicitly,
|
|
3949
|
+
* instead of only returning a value, as the former works more consistently within
|
|
3950
|
+
* Electron._
|
|
3951
|
+
*/
|
|
3952
|
+
on(event: 'close', listener: (event: Event) => void): this;
|
|
3953
|
+
off(event: 'close', listener: (event: Event) => void): this;
|
|
3954
|
+
once(event: 'close', listener: (event: Event) => void): this;
|
|
3955
|
+
addListener(event: 'close', listener: (event: Event) => void): this;
|
|
3956
|
+
removeListener(event: 'close', listener: (event: Event) => void): this;
|
|
3957
|
+
/**
|
|
3958
|
+
* Emitted when the window is going to be closed. It's emitted before the
|
|
3959
|
+
* `beforeunload` and `unload` event of the DOM. Calling `event.preventDefault()`
|
|
3960
|
+
* will cancel the close.
|
|
3961
|
+
*
|
|
3962
|
+
* Usually you would want to use the `beforeunload` handler to decide whether the
|
|
3963
|
+
* window should be closed, which will also be called when the window is reloaded.
|
|
3964
|
+
* In Electron, returning any value other than `undefined` would cancel the close.
|
|
3965
|
+
* For example:
|
|
3966
|
+
*
|
|
3967
|
+
* _**Note**: There is a subtle difference between the behaviors of
|
|
3968
|
+
* `window.onbeforeunload = handler` and `window.addEventListener('beforeunload',
|
|
3969
|
+
* handler)`. It is recommended to always set the `event.returnValue` explicitly,
|
|
3970
|
+
* instead of only returning a value, as the former works more consistently within
|
|
3971
|
+
* Electron._
|
|
3972
|
+
*/
|
|
3973
|
+
on(event: 'close', listener: (event: Event) => void): this;
|
|
3974
|
+
off(event: 'close', listener: (event: Event) => void): this;
|
|
3975
|
+
once(event: 'close', listener: (event: Event) => void): this;
|
|
3976
|
+
addListener(event: 'close', listener: (event: Event) => void): this;
|
|
3977
|
+
removeListener(event: 'close', listener: (event: Event) => void): this;
|
|
3978
|
+
/**
|
|
3979
|
+
* Emitted when the window is closed. After you have received this event you should
|
|
3980
|
+
* remove the reference to the window and avoid using it any more.
|
|
3981
|
+
*/
|
|
3982
|
+
on(event: 'closed', listener: Function): this;
|
|
3983
|
+
off(event: 'closed', listener: Function): this;
|
|
3984
|
+
once(event: 'closed', listener: Function): this;
|
|
3985
|
+
addListener(event: 'closed', listener: Function): this;
|
|
3986
|
+
removeListener(event: 'closed', listener: Function): this;
|
|
3987
|
+
/**
|
|
3988
|
+
* Emitted when the window is closed. After you have received this event you should
|
|
3989
|
+
* remove the reference to the window and avoid using it any more.
|
|
3990
|
+
*/
|
|
3991
|
+
on(event: 'closed', listener: Function): this;
|
|
3992
|
+
off(event: 'closed', listener: Function): this;
|
|
3993
|
+
once(event: 'closed', listener: Function): this;
|
|
3994
|
+
addListener(event: 'closed', listener: Function): this;
|
|
3995
|
+
removeListener(event: 'closed', listener: Function): this;
|
|
3996
|
+
/**
|
|
3997
|
+
* Emitted when the window enters a full-screen state.
|
|
3998
|
+
*/
|
|
3999
|
+
on(event: 'enter-full-screen', listener: Function): this;
|
|
4000
|
+
off(event: 'enter-full-screen', listener: Function): this;
|
|
4001
|
+
once(event: 'enter-full-screen', listener: Function): this;
|
|
4002
|
+
addListener(event: 'enter-full-screen', listener: Function): this;
|
|
4003
|
+
removeListener(event: 'enter-full-screen', listener: Function): this;
|
|
4004
|
+
/**
|
|
4005
|
+
* Emitted when the window enters a full-screen state.
|
|
4006
|
+
*/
|
|
4007
|
+
on(event: 'enter-full-screen', listener: Function): this;
|
|
4008
|
+
off(event: 'enter-full-screen', listener: Function): this;
|
|
4009
|
+
once(event: 'enter-full-screen', listener: Function): this;
|
|
4010
|
+
addListener(event: 'enter-full-screen', listener: Function): this;
|
|
4011
|
+
removeListener(event: 'enter-full-screen', listener: Function): this;
|
|
4012
|
+
/**
|
|
4013
|
+
* Emitted when the window enters a full-screen state triggered by HTML API.
|
|
4014
|
+
*/
|
|
4015
|
+
on(event: 'enter-html-full-screen', listener: Function): this;
|
|
4016
|
+
off(event: 'enter-html-full-screen', listener: Function): this;
|
|
4017
|
+
once(event: 'enter-html-full-screen', listener: Function): this;
|
|
4018
|
+
addListener(event: 'enter-html-full-screen', listener: Function): this;
|
|
4019
|
+
removeListener(event: 'enter-html-full-screen', listener: Function): this;
|
|
4020
|
+
/**
|
|
4021
|
+
* Emitted when the window gains focus.
|
|
4022
|
+
*/
|
|
4023
|
+
on(event: 'focus', listener: Function): this;
|
|
4024
|
+
off(event: 'focus', listener: Function): this;
|
|
4025
|
+
once(event: 'focus', listener: Function): this;
|
|
4026
|
+
addListener(event: 'focus', listener: Function): this;
|
|
4027
|
+
removeListener(event: 'focus', listener: Function): this;
|
|
4028
|
+
/**
|
|
4029
|
+
* Emitted when the window gains focus.
|
|
4030
|
+
*/
|
|
4031
|
+
on(event: 'focus', listener: Function): this;
|
|
4032
|
+
off(event: 'focus', listener: Function): this;
|
|
4033
|
+
once(event: 'focus', listener: Function): this;
|
|
4034
|
+
addListener(event: 'focus', listener: Function): this;
|
|
4035
|
+
removeListener(event: 'focus', listener: Function): this;
|
|
4036
|
+
/**
|
|
4037
|
+
* Emitted when the window is hidden.
|
|
4038
|
+
*/
|
|
4039
|
+
on(event: 'hide', listener: Function): this;
|
|
4040
|
+
off(event: 'hide', listener: Function): this;
|
|
4041
|
+
once(event: 'hide', listener: Function): this;
|
|
4042
|
+
addListener(event: 'hide', listener: Function): this;
|
|
4043
|
+
removeListener(event: 'hide', listener: Function): this;
|
|
4044
|
+
/**
|
|
4045
|
+
* Emitted when the window is hidden.
|
|
4046
|
+
*/
|
|
4047
|
+
on(event: 'hide', listener: Function): this;
|
|
4048
|
+
off(event: 'hide', listener: Function): this;
|
|
4049
|
+
once(event: 'hide', listener: Function): this;
|
|
4050
|
+
addListener(event: 'hide', listener: Function): this;
|
|
4051
|
+
removeListener(event: 'hide', listener: Function): this;
|
|
4052
|
+
/**
|
|
4053
|
+
* Emitted when the window leaves a full-screen state.
|
|
4054
|
+
*/
|
|
4055
|
+
on(event: 'leave-full-screen', listener: Function): this;
|
|
4056
|
+
off(event: 'leave-full-screen', listener: Function): this;
|
|
4057
|
+
once(event: 'leave-full-screen', listener: Function): this;
|
|
4058
|
+
addListener(event: 'leave-full-screen', listener: Function): this;
|
|
4059
|
+
removeListener(event: 'leave-full-screen', listener: Function): this;
|
|
4060
|
+
/**
|
|
4061
|
+
* Emitted when the window leaves a full-screen state.
|
|
4062
|
+
*/
|
|
4063
|
+
on(event: 'leave-full-screen', listener: Function): this;
|
|
4064
|
+
off(event: 'leave-full-screen', listener: Function): this;
|
|
4065
|
+
once(event: 'leave-full-screen', listener: Function): this;
|
|
4066
|
+
addListener(event: 'leave-full-screen', listener: Function): this;
|
|
4067
|
+
removeListener(event: 'leave-full-screen', listener: Function): this;
|
|
4068
|
+
/**
|
|
4069
|
+
* Emitted when the window leaves a full-screen state triggered by HTML API.
|
|
4070
|
+
*/
|
|
4071
|
+
on(event: 'leave-html-full-screen', listener: Function): this;
|
|
4072
|
+
off(event: 'leave-html-full-screen', listener: Function): this;
|
|
4073
|
+
once(event: 'leave-html-full-screen', listener: Function): this;
|
|
4074
|
+
addListener(event: 'leave-html-full-screen', listener: Function): this;
|
|
4075
|
+
removeListener(event: 'leave-html-full-screen', listener: Function): this;
|
|
4076
|
+
/**
|
|
4077
|
+
* Emitted when window is maximized.
|
|
4078
|
+
*/
|
|
4079
|
+
on(event: 'maximize', listener: Function): this;
|
|
4080
|
+
off(event: 'maximize', listener: Function): this;
|
|
4081
|
+
once(event: 'maximize', listener: Function): this;
|
|
4082
|
+
addListener(event: 'maximize', listener: Function): this;
|
|
4083
|
+
removeListener(event: 'maximize', listener: Function): this;
|
|
4084
|
+
/**
|
|
4085
|
+
* Emitted when window is maximized.
|
|
4086
|
+
*/
|
|
4087
|
+
on(event: 'maximize', listener: Function): this;
|
|
4088
|
+
off(event: 'maximize', listener: Function): this;
|
|
4089
|
+
once(event: 'maximize', listener: Function): this;
|
|
4090
|
+
addListener(event: 'maximize', listener: Function): this;
|
|
4091
|
+
removeListener(event: 'maximize', listener: Function): this;
|
|
4092
|
+
/**
|
|
4093
|
+
* Emitted when the window is minimized.
|
|
4094
|
+
*/
|
|
4095
|
+
on(event: 'minimize', listener: Function): this;
|
|
4096
|
+
off(event: 'minimize', listener: Function): this;
|
|
4097
|
+
once(event: 'minimize', listener: Function): this;
|
|
4098
|
+
addListener(event: 'minimize', listener: Function): this;
|
|
4099
|
+
removeListener(event: 'minimize', listener: Function): this;
|
|
4100
|
+
/**
|
|
4101
|
+
* Emitted when the window is minimized.
|
|
4102
|
+
*/
|
|
4103
|
+
on(event: 'minimize', listener: Function): this;
|
|
4104
|
+
off(event: 'minimize', listener: Function): this;
|
|
4105
|
+
once(event: 'minimize', listener: Function): this;
|
|
4106
|
+
addListener(event: 'minimize', listener: Function): this;
|
|
4107
|
+
removeListener(event: 'minimize', listener: Function): this;
|
|
4108
|
+
/**
|
|
4109
|
+
* Emitted when the window is being moved to a new position.
|
|
4110
|
+
*/
|
|
4111
|
+
on(event: 'move', listener: Function): this;
|
|
4112
|
+
off(event: 'move', listener: Function): this;
|
|
4113
|
+
once(event: 'move', listener: Function): this;
|
|
4114
|
+
addListener(event: 'move', listener: Function): this;
|
|
4115
|
+
removeListener(event: 'move', listener: Function): this;
|
|
4116
|
+
/**
|
|
4117
|
+
* Emitted when the window is being moved to a new position.
|
|
4118
|
+
*/
|
|
4119
|
+
on(event: 'move', listener: Function): this;
|
|
4120
|
+
off(event: 'move', listener: Function): this;
|
|
4121
|
+
once(event: 'move', listener: Function): this;
|
|
4122
|
+
addListener(event: 'move', listener: Function): this;
|
|
4123
|
+
removeListener(event: 'move', listener: Function): this;
|
|
4124
|
+
/**
|
|
4125
|
+
* Emitted once when the window is moved to a new position.
|
|
4126
|
+
*
|
|
4127
|
+
* **Note**: On macOS this event is an alias of `move`.
|
|
4128
|
+
*
|
|
4129
|
+
* @platform darwin,win32
|
|
4130
|
+
*/
|
|
4131
|
+
on(event: 'moved', listener: Function): this;
|
|
4132
|
+
/**
|
|
4133
|
+
* @platform darwin,win32
|
|
4134
|
+
*/
|
|
4135
|
+
off(event: 'moved', listener: Function): this;
|
|
4136
|
+
/**
|
|
4137
|
+
* @platform darwin,win32
|
|
4138
|
+
*/
|
|
4139
|
+
once(event: 'moved', listener: Function): this;
|
|
4140
|
+
/**
|
|
4141
|
+
* @platform darwin,win32
|
|
4142
|
+
*/
|
|
4143
|
+
addListener(event: 'moved', listener: Function): this;
|
|
4144
|
+
/**
|
|
4145
|
+
* @platform darwin,win32
|
|
4146
|
+
*/
|
|
4147
|
+
removeListener(event: 'moved', listener: Function): this;
|
|
4148
|
+
/**
|
|
4149
|
+
* Emitted once when the window is moved to a new position.
|
|
4150
|
+
*
|
|
4151
|
+
* **Note**: On macOS this event is an alias of `move`.
|
|
4152
|
+
*
|
|
4153
|
+
* @platform darwin,win32
|
|
4154
|
+
*/
|
|
4155
|
+
on(event: 'moved', listener: Function): this;
|
|
4156
|
+
/**
|
|
4157
|
+
* @platform darwin,win32
|
|
4158
|
+
*/
|
|
4159
|
+
off(event: 'moved', listener: Function): this;
|
|
4160
|
+
/**
|
|
4161
|
+
* @platform darwin,win32
|
|
4162
|
+
*/
|
|
4163
|
+
once(event: 'moved', listener: Function): this;
|
|
4164
|
+
/**
|
|
4165
|
+
* @platform darwin,win32
|
|
4166
|
+
*/
|
|
4167
|
+
addListener(event: 'moved', listener: Function): this;
|
|
4168
|
+
/**
|
|
4169
|
+
* @platform darwin,win32
|
|
4170
|
+
*/
|
|
4171
|
+
removeListener(event: 'moved', listener: Function): this;
|
|
4172
|
+
/**
|
|
4173
|
+
* Emitted when the native new tab button is clicked.
|
|
4174
|
+
*
|
|
4175
|
+
* @platform darwin
|
|
4176
|
+
*/
|
|
4177
|
+
on(event: 'new-window-for-tab', listener: Function): this;
|
|
4178
|
+
/**
|
|
4179
|
+
* @platform darwin
|
|
4180
|
+
*/
|
|
4181
|
+
off(event: 'new-window-for-tab', listener: Function): this;
|
|
4182
|
+
/**
|
|
4183
|
+
* @platform darwin
|
|
4184
|
+
*/
|
|
4185
|
+
once(event: 'new-window-for-tab', listener: Function): this;
|
|
4186
|
+
/**
|
|
4187
|
+
* @platform darwin
|
|
4188
|
+
*/
|
|
4189
|
+
addListener(event: 'new-window-for-tab', listener: Function): this;
|
|
4190
|
+
/**
|
|
4191
|
+
* @platform darwin
|
|
4192
|
+
*/
|
|
4193
|
+
removeListener(event: 'new-window-for-tab', listener: Function): this;
|
|
4194
|
+
/**
|
|
4195
|
+
* Emitted when the native new tab button is clicked.
|
|
4196
|
+
*
|
|
4197
|
+
* @platform darwin
|
|
4198
|
+
*/
|
|
4199
|
+
on(event: 'new-window-for-tab', listener: Function): this;
|
|
4200
|
+
/**
|
|
4201
|
+
* @platform darwin
|
|
4202
|
+
*/
|
|
4203
|
+
off(event: 'new-window-for-tab', listener: Function): this;
|
|
4204
|
+
/**
|
|
4205
|
+
* @platform darwin
|
|
4206
|
+
*/
|
|
4207
|
+
once(event: 'new-window-for-tab', listener: Function): this;
|
|
4208
|
+
/**
|
|
4209
|
+
* @platform darwin
|
|
4210
|
+
*/
|
|
4211
|
+
addListener(event: 'new-window-for-tab', listener: Function): this;
|
|
4212
|
+
/**
|
|
4213
|
+
* @platform darwin
|
|
4214
|
+
*/
|
|
4215
|
+
removeListener(event: 'new-window-for-tab', listener: Function): this;
|
|
4216
|
+
/**
|
|
4217
|
+
* Emitted when the document changed its title, calling `event.preventDefault()`
|
|
4218
|
+
* will prevent the native window's title from changing. `explicitSet` is false
|
|
4219
|
+
* when title is synthesized from file URL.
|
|
4220
|
+
*/
|
|
4221
|
+
on(event: 'page-title-updated', listener: (event: Event,
|
|
4222
|
+
title: string,
|
|
4223
|
+
explicitSet: boolean) => void): this;
|
|
4224
|
+
off(event: 'page-title-updated', listener: (event: Event,
|
|
4225
|
+
title: string,
|
|
4226
|
+
explicitSet: boolean) => void): this;
|
|
4227
|
+
once(event: 'page-title-updated', listener: (event: Event,
|
|
4228
|
+
title: string,
|
|
4229
|
+
explicitSet: boolean) => void): this;
|
|
4230
|
+
addListener(event: 'page-title-updated', listener: (event: Event,
|
|
4231
|
+
title: string,
|
|
4232
|
+
explicitSet: boolean) => void): this;
|
|
4233
|
+
removeListener(event: 'page-title-updated', listener: (event: Event,
|
|
4234
|
+
title: string,
|
|
4235
|
+
explicitSet: boolean) => void): this;
|
|
4236
|
+
/**
|
|
4237
|
+
* Emitted when the web page has been rendered (while not being shown) and window
|
|
4238
|
+
* can be displayed without a visual flash.
|
|
4239
|
+
*
|
|
4240
|
+
* Please note that using this event implies that the renderer will be considered
|
|
4241
|
+
* "visible" and paint even though `show` is false. This event will never fire if
|
|
4242
|
+
* you use `paintWhenInitiallyHidden: false`
|
|
4243
|
+
*/
|
|
4244
|
+
on(event: 'ready-to-show', listener: Function): this;
|
|
4245
|
+
off(event: 'ready-to-show', listener: Function): this;
|
|
4246
|
+
once(event: 'ready-to-show', listener: Function): this;
|
|
4247
|
+
addListener(event: 'ready-to-show', listener: Function): this;
|
|
4248
|
+
removeListener(event: 'ready-to-show', listener: Function): this;
|
|
4249
|
+
/**
|
|
4250
|
+
* Emitted after the window has been resized.
|
|
4251
|
+
*/
|
|
4252
|
+
on(event: 'resize', listener: Function): this;
|
|
4253
|
+
off(event: 'resize', listener: Function): this;
|
|
4254
|
+
once(event: 'resize', listener: Function): this;
|
|
4255
|
+
addListener(event: 'resize', listener: Function): this;
|
|
4256
|
+
removeListener(event: 'resize', listener: Function): this;
|
|
4257
|
+
/**
|
|
4258
|
+
* Emitted after the window has been resized.
|
|
4259
|
+
*/
|
|
4260
|
+
on(event: 'resize', listener: Function): this;
|
|
4261
|
+
off(event: 'resize', listener: Function): this;
|
|
4262
|
+
once(event: 'resize', listener: Function): this;
|
|
4263
|
+
addListener(event: 'resize', listener: Function): this;
|
|
4264
|
+
removeListener(event: 'resize', listener: Function): this;
|
|
4265
|
+
/**
|
|
4266
|
+
* Emitted once when the window has finished being resized.
|
|
4267
|
+
*
|
|
4268
|
+
* This is usually emitted when the window has been resized manually. On macOS,
|
|
4269
|
+
* resizing the window with `setBounds`/`setSize` and setting the `animate`
|
|
4270
|
+
* parameter to `true` will also emit this event once resizing has finished.
|
|
4271
|
+
*
|
|
4272
|
+
* @platform darwin,win32
|
|
4273
|
+
*/
|
|
4274
|
+
on(event: 'resized', listener: Function): this;
|
|
4275
|
+
/**
|
|
4276
|
+
* @platform darwin,win32
|
|
4277
|
+
*/
|
|
4278
|
+
off(event: 'resized', listener: Function): this;
|
|
4279
|
+
/**
|
|
4280
|
+
* @platform darwin,win32
|
|
4281
|
+
*/
|
|
4282
|
+
once(event: 'resized', listener: Function): this;
|
|
4283
|
+
/**
|
|
4284
|
+
* @platform darwin,win32
|
|
4285
|
+
*/
|
|
4286
|
+
addListener(event: 'resized', listener: Function): this;
|
|
4287
|
+
/**
|
|
4288
|
+
* @platform darwin,win32
|
|
4289
|
+
*/
|
|
4290
|
+
removeListener(event: 'resized', listener: Function): this;
|
|
4291
|
+
/**
|
|
4292
|
+
* Emitted once when the window has finished being resized.
|
|
4293
|
+
*
|
|
4294
|
+
* This is usually emitted when the window has been resized manually. On macOS,
|
|
4295
|
+
* resizing the window with `setBounds`/`setSize` and setting the `animate`
|
|
4296
|
+
* parameter to `true` will also emit this event once resizing has finished.
|
|
4297
|
+
*
|
|
4298
|
+
* @platform darwin,win32
|
|
4299
|
+
*/
|
|
4300
|
+
on(event: 'resized', listener: Function): this;
|
|
4301
|
+
/**
|
|
4302
|
+
* @platform darwin,win32
|
|
4303
|
+
*/
|
|
4304
|
+
off(event: 'resized', listener: Function): this;
|
|
4305
|
+
/**
|
|
4306
|
+
* @platform darwin,win32
|
|
4307
|
+
*/
|
|
4308
|
+
once(event: 'resized', listener: Function): this;
|
|
4309
|
+
/**
|
|
4310
|
+
* @platform darwin,win32
|
|
4311
|
+
*/
|
|
4312
|
+
addListener(event: 'resized', listener: Function): this;
|
|
4313
|
+
/**
|
|
4314
|
+
* @platform darwin,win32
|
|
4315
|
+
*/
|
|
4316
|
+
removeListener(event: 'resized', listener: Function): this;
|
|
4317
|
+
/**
|
|
4318
|
+
* Emitted when the unresponsive web page becomes responsive again.
|
|
4319
|
+
*/
|
|
4320
|
+
on(event: 'responsive', listener: Function): this;
|
|
4321
|
+
off(event: 'responsive', listener: Function): this;
|
|
4322
|
+
once(event: 'responsive', listener: Function): this;
|
|
4323
|
+
addListener(event: 'responsive', listener: Function): this;
|
|
4324
|
+
removeListener(event: 'responsive', listener: Function): this;
|
|
4325
|
+
/**
|
|
4326
|
+
* Emitted when the window is restored from a minimized state.
|
|
4327
|
+
*/
|
|
4328
|
+
on(event: 'restore', listener: Function): this;
|
|
4329
|
+
off(event: 'restore', listener: Function): this;
|
|
4330
|
+
once(event: 'restore', listener: Function): this;
|
|
4331
|
+
addListener(event: 'restore', listener: Function): this;
|
|
4332
|
+
removeListener(event: 'restore', listener: Function): this;
|
|
4333
|
+
/**
|
|
4334
|
+
* Emitted when the window is restored from a minimized state.
|
|
4335
|
+
*/
|
|
4336
|
+
on(event: 'restore', listener: Function): this;
|
|
4337
|
+
off(event: 'restore', listener: Function): this;
|
|
4338
|
+
once(event: 'restore', listener: Function): this;
|
|
4339
|
+
addListener(event: 'restore', listener: Function): this;
|
|
4340
|
+
removeListener(event: 'restore', listener: Function): this;
|
|
4341
|
+
/**
|
|
4342
|
+
* Emitted on trackpad rotation gesture. Continually emitted until rotation gesture
|
|
4343
|
+
* is ended. The `rotation` value on each emission is the angle in degrees rotated
|
|
4344
|
+
* since the last emission. The last emitted event upon a rotation gesture will
|
|
4345
|
+
* always be of value `0`. Counter-clockwise rotation values are positive, while
|
|
4346
|
+
* clockwise ones are negative.
|
|
4347
|
+
*
|
|
4348
|
+
* @platform darwin
|
|
4349
|
+
*/
|
|
4350
|
+
on(event: 'rotate-gesture', listener: (event: Event,
|
|
4351
|
+
rotation: number) => void): this;
|
|
4352
|
+
/**
|
|
4353
|
+
* @platform darwin
|
|
4354
|
+
*/
|
|
4355
|
+
off(event: 'rotate-gesture', listener: (event: Event,
|
|
4356
|
+
rotation: number) => void): this;
|
|
4357
|
+
/**
|
|
4358
|
+
* @platform darwin
|
|
4359
|
+
*/
|
|
4360
|
+
once(event: 'rotate-gesture', listener: (event: Event,
|
|
4361
|
+
rotation: number) => void): this;
|
|
4362
|
+
/**
|
|
4363
|
+
* @platform darwin
|
|
4364
|
+
*/
|
|
4365
|
+
addListener(event: 'rotate-gesture', listener: (event: Event,
|
|
4366
|
+
rotation: number) => void): this;
|
|
4367
|
+
/**
|
|
4368
|
+
* @platform darwin
|
|
4369
|
+
*/
|
|
4370
|
+
removeListener(event: 'rotate-gesture', listener: (event: Event,
|
|
4371
|
+
rotation: number) => void): this;
|
|
4372
|
+
/**
|
|
4373
|
+
* Emitted on trackpad rotation gesture. Continually emitted until rotation gesture
|
|
4374
|
+
* is ended. The `rotation` value on each emission is the angle in degrees rotated
|
|
4375
|
+
* since the last emission. The last emitted event upon a rotation gesture will
|
|
4376
|
+
* always be of value `0`. Counter-clockwise rotation values are positive, while
|
|
4377
|
+
* clockwise ones are negative.
|
|
4378
|
+
*
|
|
4379
|
+
* @platform darwin
|
|
4380
|
+
*/
|
|
4381
|
+
on(event: 'rotate-gesture', listener: (event: Event,
|
|
4382
|
+
rotation: number) => void): this;
|
|
4383
|
+
/**
|
|
4384
|
+
* @platform darwin
|
|
4385
|
+
*/
|
|
4386
|
+
off(event: 'rotate-gesture', listener: (event: Event,
|
|
4387
|
+
rotation: number) => void): this;
|
|
4388
|
+
/**
|
|
4389
|
+
* @platform darwin
|
|
4390
|
+
*/
|
|
4391
|
+
once(event: 'rotate-gesture', listener: (event: Event,
|
|
4392
|
+
rotation: number) => void): this;
|
|
4393
|
+
/**
|
|
4394
|
+
* @platform darwin
|
|
4395
|
+
*/
|
|
4396
|
+
addListener(event: 'rotate-gesture', listener: (event: Event,
|
|
4397
|
+
rotation: number) => void): this;
|
|
4398
|
+
/**
|
|
4399
|
+
* @platform darwin
|
|
4400
|
+
*/
|
|
4401
|
+
removeListener(event: 'rotate-gesture', listener: (event: Event,
|
|
4402
|
+
rotation: number) => void): this;
|
|
4403
|
+
/**
|
|
4404
|
+
* Emitted when window session is going to end due to force shutdown or machine
|
|
4405
|
+
* restart or session log off.
|
|
4406
|
+
*
|
|
4407
|
+
* @platform win32
|
|
4408
|
+
*/
|
|
4409
|
+
on(event: 'session-end', listener: Function): this;
|
|
4410
|
+
/**
|
|
4411
|
+
* @platform win32
|
|
4412
|
+
*/
|
|
4413
|
+
off(event: 'session-end', listener: Function): this;
|
|
4414
|
+
/**
|
|
4415
|
+
* @platform win32
|
|
4416
|
+
*/
|
|
4417
|
+
once(event: 'session-end', listener: Function): this;
|
|
4418
|
+
/**
|
|
4419
|
+
* @platform win32
|
|
4420
|
+
*/
|
|
4421
|
+
addListener(event: 'session-end', listener: Function): this;
|
|
4422
|
+
/**
|
|
4423
|
+
* @platform win32
|
|
4424
|
+
*/
|
|
4425
|
+
removeListener(event: 'session-end', listener: Function): this;
|
|
4426
|
+
/**
|
|
4427
|
+
* Emitted when window session is going to end due to force shutdown or machine
|
|
4428
|
+
* restart or session log off.
|
|
4429
|
+
*
|
|
4430
|
+
* @platform win32
|
|
4431
|
+
*/
|
|
4432
|
+
on(event: 'session-end', listener: Function): this;
|
|
4433
|
+
/**
|
|
4434
|
+
* @platform win32
|
|
4435
|
+
*/
|
|
4436
|
+
off(event: 'session-end', listener: Function): this;
|
|
4437
|
+
/**
|
|
4438
|
+
* @platform win32
|
|
4439
|
+
*/
|
|
4440
|
+
once(event: 'session-end', listener: Function): this;
|
|
4441
|
+
/**
|
|
4442
|
+
* @platform win32
|
|
4443
|
+
*/
|
|
4444
|
+
addListener(event: 'session-end', listener: Function): this;
|
|
4445
|
+
/**
|
|
4446
|
+
* @platform win32
|
|
4447
|
+
*/
|
|
4448
|
+
removeListener(event: 'session-end', listener: Function): this;
|
|
4449
|
+
/**
|
|
4450
|
+
* Emitted when the window opens a sheet.
|
|
4451
|
+
*
|
|
4452
|
+
* @platform darwin
|
|
4453
|
+
*/
|
|
4454
|
+
on(event: 'sheet-begin', listener: Function): this;
|
|
4455
|
+
/**
|
|
4456
|
+
* @platform darwin
|
|
4457
|
+
*/
|
|
4458
|
+
off(event: 'sheet-begin', listener: Function): this;
|
|
4459
|
+
/**
|
|
4460
|
+
* @platform darwin
|
|
4461
|
+
*/
|
|
4462
|
+
once(event: 'sheet-begin', listener: Function): this;
|
|
4463
|
+
/**
|
|
4464
|
+
* @platform darwin
|
|
4465
|
+
*/
|
|
4466
|
+
addListener(event: 'sheet-begin', listener: Function): this;
|
|
4467
|
+
/**
|
|
4468
|
+
* @platform darwin
|
|
4469
|
+
*/
|
|
4470
|
+
removeListener(event: 'sheet-begin', listener: Function): this;
|
|
4471
|
+
/**
|
|
4472
|
+
* Emitted when the window opens a sheet.
|
|
4473
|
+
*
|
|
4474
|
+
* @platform darwin
|
|
4475
|
+
*/
|
|
4476
|
+
on(event: 'sheet-begin', listener: Function): this;
|
|
4477
|
+
/**
|
|
4478
|
+
* @platform darwin
|
|
4479
|
+
*/
|
|
4480
|
+
off(event: 'sheet-begin', listener: Function): this;
|
|
4481
|
+
/**
|
|
4482
|
+
* @platform darwin
|
|
4483
|
+
*/
|
|
4484
|
+
once(event: 'sheet-begin', listener: Function): this;
|
|
4485
|
+
/**
|
|
4486
|
+
* @platform darwin
|
|
4487
|
+
*/
|
|
4488
|
+
addListener(event: 'sheet-begin', listener: Function): this;
|
|
4489
|
+
/**
|
|
4490
|
+
* @platform darwin
|
|
4491
|
+
*/
|
|
4492
|
+
removeListener(event: 'sheet-begin', listener: Function): this;
|
|
4493
|
+
/**
|
|
4494
|
+
* Emitted when the window has closed a sheet.
|
|
4495
|
+
*
|
|
4496
|
+
* @platform darwin
|
|
4497
|
+
*/
|
|
4498
|
+
on(event: 'sheet-end', listener: Function): this;
|
|
4499
|
+
/**
|
|
4500
|
+
* @platform darwin
|
|
4501
|
+
*/
|
|
4502
|
+
off(event: 'sheet-end', listener: Function): this;
|
|
4503
|
+
/**
|
|
4504
|
+
* @platform darwin
|
|
4505
|
+
*/
|
|
4506
|
+
once(event: 'sheet-end', listener: Function): this;
|
|
4507
|
+
/**
|
|
4508
|
+
* @platform darwin
|
|
4509
|
+
*/
|
|
4510
|
+
addListener(event: 'sheet-end', listener: Function): this;
|
|
4511
|
+
/**
|
|
4512
|
+
* @platform darwin
|
|
4513
|
+
*/
|
|
4514
|
+
removeListener(event: 'sheet-end', listener: Function): this;
|
|
4515
|
+
/**
|
|
4516
|
+
* Emitted when the window has closed a sheet.
|
|
4517
|
+
*
|
|
4518
|
+
* @platform darwin
|
|
4519
|
+
*/
|
|
4520
|
+
on(event: 'sheet-end', listener: Function): this;
|
|
4521
|
+
/**
|
|
4522
|
+
* @platform darwin
|
|
4523
|
+
*/
|
|
4524
|
+
off(event: 'sheet-end', listener: Function): this;
|
|
4525
|
+
/**
|
|
4526
|
+
* @platform darwin
|
|
4527
|
+
*/
|
|
4528
|
+
once(event: 'sheet-end', listener: Function): this;
|
|
4529
|
+
/**
|
|
4530
|
+
* @platform darwin
|
|
4531
|
+
*/
|
|
4532
|
+
addListener(event: 'sheet-end', listener: Function): this;
|
|
4533
|
+
/**
|
|
4534
|
+
* @platform darwin
|
|
4535
|
+
*/
|
|
4536
|
+
removeListener(event: 'sheet-end', listener: Function): this;
|
|
4537
|
+
/**
|
|
4538
|
+
* Emitted when the window is shown.
|
|
4539
|
+
*/
|
|
4540
|
+
on(event: 'show', listener: Function): this;
|
|
4541
|
+
off(event: 'show', listener: Function): this;
|
|
4542
|
+
once(event: 'show', listener: Function): this;
|
|
4543
|
+
addListener(event: 'show', listener: Function): this;
|
|
4544
|
+
removeListener(event: 'show', listener: Function): this;
|
|
4545
|
+
/**
|
|
4546
|
+
* Emitted when the window is shown.
|
|
4547
|
+
*/
|
|
4548
|
+
on(event: 'show', listener: Function): this;
|
|
4549
|
+
off(event: 'show', listener: Function): this;
|
|
4550
|
+
once(event: 'show', listener: Function): this;
|
|
4551
|
+
addListener(event: 'show', listener: Function): this;
|
|
4552
|
+
removeListener(event: 'show', listener: Function): this;
|
|
4553
|
+
/**
|
|
4554
|
+
* Emitted on 3-finger swipe. Possible directions are `up`, `right`, `down`,
|
|
4555
|
+
* `left`.
|
|
4556
|
+
*
|
|
4557
|
+
* The method underlying this event is built to handle older macOS-style trackpad
|
|
4558
|
+
* swiping, where the content on the screen doesn't move with the swipe. Most macOS
|
|
4559
|
+
* trackpads are not configured to allow this kind of swiping anymore, so in order
|
|
4560
|
+
* for it to emit properly the 'Swipe between pages' preference in `System
|
|
4561
|
+
* Preferences > Trackpad > More Gestures` must be set to 'Swipe with two or three
|
|
4562
|
+
* fingers'.
|
|
4563
|
+
*
|
|
4564
|
+
* @platform darwin
|
|
4565
|
+
*/
|
|
4566
|
+
on(event: 'swipe', listener: (event: Event,
|
|
4567
|
+
direction: string) => void): this;
|
|
4568
|
+
/**
|
|
4569
|
+
* @platform darwin
|
|
4570
|
+
*/
|
|
4571
|
+
off(event: 'swipe', listener: (event: Event,
|
|
4572
|
+
direction: string) => void): this;
|
|
4573
|
+
/**
|
|
4574
|
+
* @platform darwin
|
|
4575
|
+
*/
|
|
4576
|
+
once(event: 'swipe', listener: (event: Event,
|
|
4577
|
+
direction: string) => void): this;
|
|
4578
|
+
/**
|
|
4579
|
+
* @platform darwin
|
|
4580
|
+
*/
|
|
4581
|
+
addListener(event: 'swipe', listener: (event: Event,
|
|
4582
|
+
direction: string) => void): this;
|
|
4583
|
+
/**
|
|
4584
|
+
* @platform darwin
|
|
4585
|
+
*/
|
|
4586
|
+
removeListener(event: 'swipe', listener: (event: Event,
|
|
4587
|
+
direction: string) => void): this;
|
|
4588
|
+
/**
|
|
4589
|
+
* Emitted on 3-finger swipe. Possible directions are `up`, `right`, `down`,
|
|
4590
|
+
* `left`.
|
|
4591
|
+
*
|
|
4592
|
+
* The method underlying this event is built to handle older macOS-style trackpad
|
|
4593
|
+
* swiping, where the content on the screen doesn't move with the swipe. Most macOS
|
|
4594
|
+
* trackpads are not configured to allow this kind of swiping anymore, so in order
|
|
4595
|
+
* for it to emit properly the 'Swipe between pages' preference in `System
|
|
4596
|
+
* Preferences > Trackpad > More Gestures` must be set to 'Swipe with two or three
|
|
4597
|
+
* fingers'.
|
|
4598
|
+
*
|
|
4599
|
+
* @platform darwin
|
|
4600
|
+
*/
|
|
4601
|
+
on(event: 'swipe', listener: (event: Event,
|
|
4602
|
+
direction: string) => void): this;
|
|
4603
|
+
/**
|
|
4604
|
+
* @platform darwin
|
|
4605
|
+
*/
|
|
4606
|
+
off(event: 'swipe', listener: (event: Event,
|
|
4607
|
+
direction: string) => void): this;
|
|
4608
|
+
/**
|
|
4609
|
+
* @platform darwin
|
|
4610
|
+
*/
|
|
4611
|
+
once(event: 'swipe', listener: (event: Event,
|
|
4612
|
+
direction: string) => void): this;
|
|
4613
|
+
/**
|
|
4614
|
+
* @platform darwin
|
|
4615
|
+
*/
|
|
4616
|
+
addListener(event: 'swipe', listener: (event: Event,
|
|
4617
|
+
direction: string) => void): this;
|
|
4618
|
+
/**
|
|
4619
|
+
* @platform darwin
|
|
4620
|
+
*/
|
|
4621
|
+
removeListener(event: 'swipe', listener: (event: Event,
|
|
4622
|
+
direction: string) => void): this;
|
|
4623
|
+
/**
|
|
4624
|
+
* Emitted when the system context menu is triggered on the window, this is
|
|
4625
|
+
* normally only triggered when the user right clicks on the non-client area of
|
|
4626
|
+
* your window. This is the window titlebar or any area you have declared as
|
|
4627
|
+
* `-webkit-app-region: drag` in a frameless window.
|
|
4628
|
+
*
|
|
4629
|
+
* Calling `event.preventDefault()` will prevent the menu from being displayed.
|
|
4630
|
+
*
|
|
4631
|
+
* @platform win32
|
|
4632
|
+
*/
|
|
4633
|
+
on(event: 'system-context-menu', listener: (event: Event,
|
|
4634
|
+
/**
|
|
4635
|
+
* The screen coordinates the context menu was triggered at
|
|
4636
|
+
*/
|
|
4637
|
+
point: Point) => void): this;
|
|
4638
|
+
/**
|
|
4639
|
+
* @platform win32
|
|
4640
|
+
*/
|
|
4641
|
+
off(event: 'system-context-menu', listener: (event: Event,
|
|
4642
|
+
/**
|
|
4643
|
+
* The screen coordinates the context menu was triggered at
|
|
4644
|
+
*/
|
|
4645
|
+
point: Point) => void): this;
|
|
4646
|
+
/**
|
|
4647
|
+
* @platform win32
|
|
4648
|
+
*/
|
|
4649
|
+
once(event: 'system-context-menu', listener: (event: Event,
|
|
4650
|
+
/**
|
|
4651
|
+
* The screen coordinates the context menu was triggered at
|
|
4652
|
+
*/
|
|
4653
|
+
point: Point) => void): this;
|
|
4654
|
+
/**
|
|
4655
|
+
* @platform win32
|
|
4656
|
+
*/
|
|
4657
|
+
addListener(event: 'system-context-menu', listener: (event: Event,
|
|
4658
|
+
/**
|
|
4659
|
+
* The screen coordinates the context menu was triggered at
|
|
4660
|
+
*/
|
|
4661
|
+
point: Point) => void): this;
|
|
4662
|
+
/**
|
|
4663
|
+
* @platform win32
|
|
4664
|
+
*/
|
|
4665
|
+
removeListener(event: 'system-context-menu', listener: (event: Event,
|
|
4666
|
+
/**
|
|
4667
|
+
* The screen coordinates the context menu was triggered at
|
|
4668
|
+
*/
|
|
4669
|
+
point: Point) => void): this;
|
|
4670
|
+
/**
|
|
4671
|
+
* Emitted when the system context menu is triggered on the window, this is
|
|
4672
|
+
* normally only triggered when the user right clicks on the non-client area of
|
|
4673
|
+
* your window. This is the window titlebar or any area you have declared as
|
|
4674
|
+
* `-webkit-app-region: drag` in a frameless window.
|
|
4675
|
+
*
|
|
4676
|
+
* Calling `event.preventDefault()` will prevent the menu from being displayed.
|
|
4677
|
+
*
|
|
4678
|
+
* @platform win32
|
|
4679
|
+
*/
|
|
4680
|
+
on(event: 'system-context-menu', listener: (event: Event,
|
|
4681
|
+
/**
|
|
4682
|
+
* The screen coordinates the context menu was triggered at
|
|
4683
|
+
*/
|
|
4684
|
+
point: Point) => void): this;
|
|
4685
|
+
/**
|
|
4686
|
+
* @platform win32
|
|
4687
|
+
*/
|
|
4688
|
+
off(event: 'system-context-menu', listener: (event: Event,
|
|
4689
|
+
/**
|
|
4690
|
+
* The screen coordinates the context menu was triggered at
|
|
4691
|
+
*/
|
|
4692
|
+
point: Point) => void): this;
|
|
4693
|
+
/**
|
|
4694
|
+
* @platform win32
|
|
4695
|
+
*/
|
|
4696
|
+
once(event: 'system-context-menu', listener: (event: Event,
|
|
4697
|
+
/**
|
|
4698
|
+
* The screen coordinates the context menu was triggered at
|
|
4699
|
+
*/
|
|
4700
|
+
point: Point) => void): this;
|
|
4701
|
+
/**
|
|
4702
|
+
* @platform win32
|
|
4703
|
+
*/
|
|
4704
|
+
addListener(event: 'system-context-menu', listener: (event: Event,
|
|
4705
|
+
/**
|
|
4706
|
+
* The screen coordinates the context menu was triggered at
|
|
4707
|
+
*/
|
|
4708
|
+
point: Point) => void): this;
|
|
4709
|
+
/**
|
|
4710
|
+
* @platform win32
|
|
4711
|
+
*/
|
|
4712
|
+
removeListener(event: 'system-context-menu', listener: (event: Event,
|
|
4713
|
+
/**
|
|
4714
|
+
* The screen coordinates the context menu was triggered at
|
|
4715
|
+
*/
|
|
4716
|
+
point: Point) => void): this;
|
|
4717
|
+
/**
|
|
4718
|
+
* Emitted when the window exits from a maximized state.
|
|
4719
|
+
*/
|
|
4720
|
+
on(event: 'unmaximize', listener: Function): this;
|
|
4721
|
+
off(event: 'unmaximize', listener: Function): this;
|
|
4722
|
+
once(event: 'unmaximize', listener: Function): this;
|
|
4723
|
+
addListener(event: 'unmaximize', listener: Function): this;
|
|
4724
|
+
removeListener(event: 'unmaximize', listener: Function): this;
|
|
4725
|
+
/**
|
|
4726
|
+
* Emitted when the window exits from a maximized state.
|
|
4727
|
+
*/
|
|
4728
|
+
on(event: 'unmaximize', listener: Function): this;
|
|
4729
|
+
off(event: 'unmaximize', listener: Function): this;
|
|
4730
|
+
once(event: 'unmaximize', listener: Function): this;
|
|
4731
|
+
addListener(event: 'unmaximize', listener: Function): this;
|
|
4732
|
+
removeListener(event: 'unmaximize', listener: Function): this;
|
|
4733
|
+
/**
|
|
4734
|
+
* Emitted when the web page becomes unresponsive.
|
|
4735
|
+
*/
|
|
4736
|
+
on(event: 'unresponsive', listener: Function): this;
|
|
4737
|
+
off(event: 'unresponsive', listener: Function): this;
|
|
4738
|
+
once(event: 'unresponsive', listener: Function): this;
|
|
4739
|
+
addListener(event: 'unresponsive', listener: Function): this;
|
|
4740
|
+
removeListener(event: 'unresponsive', listener: Function): this;
|
|
4741
|
+
/**
|
|
4742
|
+
* Emitted before the window is moved. On Windows, calling `event.preventDefault()`
|
|
4743
|
+
* will prevent the window from being moved.
|
|
4744
|
+
*
|
|
4745
|
+
* Note that this is only emitted when the window is being moved manually. Moving
|
|
4746
|
+
* the window with `setPosition`/`setBounds`/`center` will not emit this event.
|
|
4747
|
+
*
|
|
4748
|
+
* @platform darwin,win32
|
|
4749
|
+
*/
|
|
4750
|
+
on(event: 'will-move', listener: (event: Event,
|
|
4751
|
+
/**
|
|
4752
|
+
* Location the window is being moved to.
|
|
4753
|
+
*/
|
|
4754
|
+
newBounds: Rectangle) => void): this;
|
|
4755
|
+
/**
|
|
4756
|
+
* @platform darwin,win32
|
|
4757
|
+
*/
|
|
4758
|
+
off(event: 'will-move', listener: (event: Event,
|
|
4759
|
+
/**
|
|
4760
|
+
* Location the window is being moved to.
|
|
4761
|
+
*/
|
|
4762
|
+
newBounds: Rectangle) => void): this;
|
|
4763
|
+
/**
|
|
4764
|
+
* @platform darwin,win32
|
|
4765
|
+
*/
|
|
4766
|
+
once(event: 'will-move', listener: (event: Event,
|
|
4767
|
+
/**
|
|
4768
|
+
* Location the window is being moved to.
|
|
4769
|
+
*/
|
|
4770
|
+
newBounds: Rectangle) => void): this;
|
|
4771
|
+
/**
|
|
4772
|
+
* @platform darwin,win32
|
|
4773
|
+
*/
|
|
4774
|
+
addListener(event: 'will-move', listener: (event: Event,
|
|
4775
|
+
/**
|
|
4776
|
+
* Location the window is being moved to.
|
|
4777
|
+
*/
|
|
4778
|
+
newBounds: Rectangle) => void): this;
|
|
4779
|
+
/**
|
|
4780
|
+
* @platform darwin,win32
|
|
4781
|
+
*/
|
|
4782
|
+
removeListener(event: 'will-move', listener: (event: Event,
|
|
4783
|
+
/**
|
|
4784
|
+
* Location the window is being moved to.
|
|
4785
|
+
*/
|
|
4786
|
+
newBounds: Rectangle) => void): this;
|
|
4787
|
+
/**
|
|
4788
|
+
* Emitted before the window is moved. On Windows, calling `event.preventDefault()`
|
|
4789
|
+
* will prevent the window from being moved.
|
|
4790
|
+
*
|
|
4791
|
+
* Note that this is only emitted when the window is being moved manually. Moving
|
|
4792
|
+
* the window with `setPosition`/`setBounds`/`center` will not emit this event.
|
|
4793
|
+
*
|
|
4794
|
+
* @platform darwin,win32
|
|
4795
|
+
*/
|
|
4796
|
+
on(event: 'will-move', listener: (event: Event,
|
|
4797
|
+
/**
|
|
4798
|
+
* Location the window is being moved to.
|
|
4799
|
+
*/
|
|
4800
|
+
newBounds: Rectangle) => void): this;
|
|
4801
|
+
/**
|
|
4802
|
+
* @platform darwin,win32
|
|
4803
|
+
*/
|
|
4804
|
+
off(event: 'will-move', listener: (event: Event,
|
|
4805
|
+
/**
|
|
4806
|
+
* Location the window is being moved to.
|
|
4807
|
+
*/
|
|
4808
|
+
newBounds: Rectangle) => void): this;
|
|
4809
|
+
/**
|
|
4810
|
+
* @platform darwin,win32
|
|
4811
|
+
*/
|
|
4812
|
+
once(event: 'will-move', listener: (event: Event,
|
|
4813
|
+
/**
|
|
4814
|
+
* Location the window is being moved to.
|
|
4815
|
+
*/
|
|
4816
|
+
newBounds: Rectangle) => void): this;
|
|
4817
|
+
/**
|
|
4818
|
+
* @platform darwin,win32
|
|
4819
|
+
*/
|
|
4820
|
+
addListener(event: 'will-move', listener: (event: Event,
|
|
4821
|
+
/**
|
|
4822
|
+
* Location the window is being moved to.
|
|
4823
|
+
*/
|
|
4824
|
+
newBounds: Rectangle) => void): this;
|
|
4825
|
+
/**
|
|
4826
|
+
* @platform darwin,win32
|
|
4827
|
+
*/
|
|
4828
|
+
removeListener(event: 'will-move', listener: (event: Event,
|
|
4829
|
+
/**
|
|
4830
|
+
* Location the window is being moved to.
|
|
4831
|
+
*/
|
|
4832
|
+
newBounds: Rectangle) => void): this;
|
|
4833
|
+
/**
|
|
4834
|
+
* Emitted before the window is resized. Calling `event.preventDefault()` will
|
|
4835
|
+
* prevent the window from being resized.
|
|
4836
|
+
*
|
|
4837
|
+
* Note that this is only emitted when the window is being resized manually.
|
|
4838
|
+
* Resizing the window with `setBounds`/`setSize` will not emit this event.
|
|
4839
|
+
*
|
|
4840
|
+
* The possible values and behaviors of the `edge` option are platform dependent.
|
|
4841
|
+
* Possible values are:
|
|
4842
|
+
*
|
|
4843
|
+
* * On Windows, possible values are `bottom`, `top`, `left`, `right`, `top-left`,
|
|
4844
|
+
* `top-right`, `bottom-left`, `bottom-right`.
|
|
4845
|
+
* * On macOS, possible values are `bottom` and `right`.
|
|
4846
|
+
* * The value `bottom` is used to denote vertical resizing.
|
|
4847
|
+
* * The value `right` is used to denote horizontal resizing.
|
|
4848
|
+
*
|
|
4849
|
+
* @platform darwin,win32
|
|
4850
|
+
*/
|
|
4851
|
+
on(event: 'will-resize', listener: (event: Event,
|
|
4852
|
+
/**
|
|
4853
|
+
* Size the window is being resized to.
|
|
4854
|
+
*/
|
|
4855
|
+
newBounds: Rectangle,
|
|
4856
|
+
details: WillResizeDetails) => void): this;
|
|
4857
|
+
/**
|
|
4858
|
+
* @platform darwin,win32
|
|
4859
|
+
*/
|
|
4860
|
+
off(event: 'will-resize', listener: (event: Event,
|
|
4861
|
+
/**
|
|
4862
|
+
* Size the window is being resized to.
|
|
4863
|
+
*/
|
|
4864
|
+
newBounds: Rectangle,
|
|
4865
|
+
details: WillResizeDetails) => void): this;
|
|
4866
|
+
/**
|
|
4867
|
+
* @platform darwin,win32
|
|
4868
|
+
*/
|
|
4869
|
+
once(event: 'will-resize', listener: (event: Event,
|
|
4870
|
+
/**
|
|
4871
|
+
* Size the window is being resized to.
|
|
4872
|
+
*/
|
|
4873
|
+
newBounds: Rectangle,
|
|
4874
|
+
details: WillResizeDetails) => void): this;
|
|
4875
|
+
/**
|
|
4876
|
+
* @platform darwin,win32
|
|
4877
|
+
*/
|
|
4878
|
+
addListener(event: 'will-resize', listener: (event: Event,
|
|
4879
|
+
/**
|
|
4880
|
+
* Size the window is being resized to.
|
|
4881
|
+
*/
|
|
4882
|
+
newBounds: Rectangle,
|
|
4883
|
+
details: WillResizeDetails) => void): this;
|
|
4884
|
+
/**
|
|
4885
|
+
* @platform darwin,win32
|
|
4886
|
+
*/
|
|
4887
|
+
removeListener(event: 'will-resize', listener: (event: Event,
|
|
4888
|
+
/**
|
|
4889
|
+
* Size the window is being resized to.
|
|
4890
|
+
*/
|
|
4891
|
+
newBounds: Rectangle,
|
|
4892
|
+
details: WillResizeDetails) => void): this;
|
|
4893
|
+
/**
|
|
4894
|
+
* Emitted before the window is resized. Calling `event.preventDefault()` will
|
|
4895
|
+
* prevent the window from being resized.
|
|
4896
|
+
*
|
|
4897
|
+
* Note that this is only emitted when the window is being resized manually.
|
|
4898
|
+
* Resizing the window with `setBounds`/`setSize` will not emit this event.
|
|
4899
|
+
*
|
|
4900
|
+
* The possible values and behaviors of the `edge` option are platform dependent.
|
|
4901
|
+
* Possible values are:
|
|
4902
|
+
*
|
|
4903
|
+
* * On Windows, possible values are `bottom`, `top`, `left`, `right`, `top-left`,
|
|
4904
|
+
* `top-right`, `bottom-left`, `bottom-right`.
|
|
4905
|
+
* * On macOS, possible values are `bottom` and `right`.
|
|
4906
|
+
* * The value `bottom` is used to denote vertical resizing.
|
|
4907
|
+
* * The value `right` is used to denote horizontal resizing.
|
|
4908
|
+
*
|
|
4909
|
+
* @platform darwin,win32
|
|
4910
|
+
*/
|
|
4911
|
+
on(event: 'will-resize', listener: (event: Event,
|
|
4912
|
+
/**
|
|
4913
|
+
* Size the window is being resized to.
|
|
4914
|
+
*/
|
|
4915
|
+
newBounds: Rectangle,
|
|
4916
|
+
details: WillResizeDetails) => void): this;
|
|
4917
|
+
/**
|
|
4918
|
+
* @platform darwin,win32
|
|
4919
|
+
*/
|
|
4920
|
+
off(event: 'will-resize', listener: (event: Event,
|
|
4921
|
+
/**
|
|
4922
|
+
* Size the window is being resized to.
|
|
4923
|
+
*/
|
|
4924
|
+
newBounds: Rectangle,
|
|
4925
|
+
details: WillResizeDetails) => void): this;
|
|
4926
|
+
/**
|
|
4927
|
+
* @platform darwin,win32
|
|
4928
|
+
*/
|
|
4929
|
+
once(event: 'will-resize', listener: (event: Event,
|
|
4930
|
+
/**
|
|
4931
|
+
* Size the window is being resized to.
|
|
4932
|
+
*/
|
|
4933
|
+
newBounds: Rectangle,
|
|
4934
|
+
details: WillResizeDetails) => void): this;
|
|
4935
|
+
/**
|
|
4936
|
+
* @platform darwin,win32
|
|
4937
|
+
*/
|
|
4938
|
+
addListener(event: 'will-resize', listener: (event: Event,
|
|
4939
|
+
/**
|
|
4940
|
+
* Size the window is being resized to.
|
|
4941
|
+
*/
|
|
4942
|
+
newBounds: Rectangle,
|
|
4943
|
+
details: WillResizeDetails) => void): this;
|
|
4944
|
+
/**
|
|
4945
|
+
* @platform darwin,win32
|
|
4946
|
+
*/
|
|
4947
|
+
removeListener(event: 'will-resize', listener: (event: Event,
|
|
4948
|
+
/**
|
|
4949
|
+
* Size the window is being resized to.
|
|
4950
|
+
*/
|
|
4951
|
+
newBounds: Rectangle,
|
|
4952
|
+
details: WillResizeDetails) => void): this;
|
|
4953
|
+
/**
|
|
4954
|
+
* BrowserWindow
|
|
4955
|
+
*/
|
|
4956
|
+
constructor(options?: BrowserWindowConstructorOptions);
|
|
4957
|
+
/**
|
|
4958
|
+
* > **Note** The `BrowserView` class is deprecated, and replaced by the new
|
|
4959
|
+
* `WebContentsView` class.
|
|
4960
|
+
*
|
|
4961
|
+
* The window that owns the given `browserView`. If the given view is not attached
|
|
4962
|
+
* to any window, returns `null`.
|
|
4963
|
+
*
|
|
4964
|
+
* @deprecated
|
|
4965
|
+
*/
|
|
4966
|
+
static fromBrowserView(browserView: BrowserView): (BrowserWindow) | (null);
|
|
4967
|
+
/**
|
|
4968
|
+
* The window with the given `id`.
|
|
4969
|
+
*/
|
|
4970
|
+
static fromId(id: number): (BrowserWindow) | (null);
|
|
4971
|
+
/**
|
|
4972
|
+
* The window that owns the given `webContents` or `null` if the contents are not
|
|
4973
|
+
* owned by a window.
|
|
4974
|
+
*/
|
|
4975
|
+
static fromWebContents(webContents: WebContents): (BrowserWindow) | (null);
|
|
4976
|
+
/**
|
|
4977
|
+
* An array of all opened browser windows.
|
|
4978
|
+
*/
|
|
4979
|
+
static getAllWindows(): BrowserWindow[];
|
|
4980
|
+
/**
|
|
4981
|
+
* The window that is focused in this application, otherwise returns `null`.
|
|
4982
|
+
*/
|
|
4983
|
+
static getFocusedWindow(): (BrowserWindow) | (null);
|
|
4984
|
+
/**
|
|
4985
|
+
* Replacement API for setBrowserView supporting work with multi browser views.
|
|
4986
|
+
*
|
|
4987
|
+
* > **Note** The `BrowserView` class is deprecated, and replaced by the new
|
|
4988
|
+
* `WebContentsView` class.
|
|
4989
|
+
*
|
|
4990
|
+
* @experimental
|
|
4991
|
+
* @deprecated
|
|
4992
|
+
*/
|
|
4993
|
+
addBrowserView(browserView: BrowserView): void;
|
|
4994
|
+
/**
|
|
4995
|
+
* Adds a window as a tab on this window, after the tab for the window instance.
|
|
4996
|
+
*
|
|
4997
|
+
* @platform darwin
|
|
4998
|
+
*/
|
|
4999
|
+
addTabbedWindow(browserWindow: BrowserWindow): void;
|
|
5000
|
+
/**
|
|
5001
|
+
* Removes focus from the window.
|
|
5002
|
+
*/
|
|
5003
|
+
blur(): void;
|
|
5004
|
+
blurWebView(): void;
|
|
5005
|
+
/**
|
|
5006
|
+
* Resolves with a NativeImage
|
|
5007
|
+
*
|
|
5008
|
+
* Captures a snapshot of the page within `rect`. Omitting `rect` will capture the
|
|
5009
|
+
* whole visible page. If the page is not visible, `rect` may be empty. The page is
|
|
5010
|
+
* considered visible when its browser window is hidden and the capturer count is
|
|
5011
|
+
* non-zero. If you would like the page to stay hidden, you should ensure that
|
|
5012
|
+
* `stayHidden` is set to true.
|
|
5013
|
+
*/
|
|
5014
|
+
capturePage(rect?: Rectangle, opts?: Opts): Promise<Electron.NativeImage>;
|
|
5015
|
+
/**
|
|
5016
|
+
* Moves window to the center of the screen.
|
|
5017
|
+
*/
|
|
5018
|
+
center(): void;
|
|
5019
|
+
/**
|
|
5020
|
+
* Try to close the window. This has the same effect as a user manually clicking
|
|
5021
|
+
* the close button of the window. The web page may cancel the close though. See
|
|
5022
|
+
* the close event.
|
|
5023
|
+
*/
|
|
5024
|
+
close(): void;
|
|
5025
|
+
/**
|
|
5026
|
+
* Closes the currently open Quick Look panel.
|
|
5027
|
+
*
|
|
5028
|
+
* @platform darwin
|
|
5029
|
+
*/
|
|
5030
|
+
closeFilePreview(): void;
|
|
5031
|
+
/**
|
|
5032
|
+
* Force closing the window, the `unload` and `beforeunload` event won't be emitted
|
|
5033
|
+
* for the web page, and `close` event will also not be emitted for this window,
|
|
5034
|
+
* but it guarantees the `closed` event will be emitted.
|
|
5035
|
+
*/
|
|
5036
|
+
destroy(): void;
|
|
5037
|
+
/**
|
|
5038
|
+
* Starts or stops flashing the window to attract user's attention.
|
|
5039
|
+
*/
|
|
5040
|
+
flashFrame(flag: boolean): void;
|
|
5041
|
+
/**
|
|
5042
|
+
* Focuses on the window.
|
|
5043
|
+
*/
|
|
5044
|
+
focus(): void;
|
|
5045
|
+
focusOnWebView(): void;
|
|
5046
|
+
/**
|
|
5047
|
+
* Gets the background color of the window in Hex (`#RRGGBB`) format.
|
|
5048
|
+
*
|
|
5049
|
+
* See Setting `backgroundColor`.
|
|
5050
|
+
*
|
|
5051
|
+
* **Note:** The alpha value is _not_ returned alongside the red, green, and blue
|
|
5052
|
+
* values.
|
|
5053
|
+
*/
|
|
5054
|
+
getBackgroundColor(): string;
|
|
5055
|
+
/**
|
|
5056
|
+
* The `bounds` of the window as `Object`.
|
|
5057
|
+
*
|
|
5058
|
+
* **Note:** On macOS, the y-coordinate value returned will be at minimum the Tray
|
|
5059
|
+
* height. For example, calling `win.setBounds({ x: 25, y: 20, width: 800, height:
|
|
5060
|
+
* 600 })` with a tray height of 38 means that `win.getBounds()` will return `{ x:
|
|
5061
|
+
* 25, y: 38, width: 800, height: 600 }`.
|
|
5062
|
+
*/
|
|
5063
|
+
getBounds(): Rectangle;
|
|
5064
|
+
/**
|
|
5065
|
+
* The `BrowserView` attached to `win`. Returns `null` if one is not attached.
|
|
5066
|
+
* Throws an error if multiple `BrowserView`s are attached.
|
|
5067
|
+
*
|
|
5068
|
+
* > **Note** The `BrowserView` class is deprecated, and replaced by the new
|
|
5069
|
+
* `WebContentsView` class.
|
|
5070
|
+
*
|
|
5071
|
+
* @experimental
|
|
5072
|
+
* @deprecated
|
|
5073
|
+
*/
|
|
5074
|
+
getBrowserView(): (BrowserView) | (null);
|
|
5075
|
+
/**
|
|
5076
|
+
* a sorted by z-index array of all BrowserViews that have been attached with
|
|
5077
|
+
* `addBrowserView` or `setBrowserView`. The top-most BrowserView is the last
|
|
5078
|
+
* element of the array.
|
|
5079
|
+
*
|
|
5080
|
+
* > **Note** The `BrowserView` class is deprecated, and replaced by the new
|
|
5081
|
+
* `WebContentsView` class.
|
|
5082
|
+
*
|
|
5083
|
+
* @experimental
|
|
5084
|
+
* @deprecated
|
|
5085
|
+
*/
|
|
5086
|
+
getBrowserViews(): BrowserView[];
|
|
5087
|
+
/**
|
|
5088
|
+
* All child windows.
|
|
5089
|
+
*/
|
|
5090
|
+
getChildWindows(): BrowserWindow[];
|
|
5091
|
+
/**
|
|
5092
|
+
* The `bounds` of the window's client area as `Object`.
|
|
5093
|
+
*/
|
|
5094
|
+
getContentBounds(): Rectangle;
|
|
5095
|
+
/**
|
|
5096
|
+
* Contains the window's client area's width and height.
|
|
5097
|
+
*/
|
|
5098
|
+
getContentSize(): number[];
|
|
5099
|
+
/**
|
|
5100
|
+
* Contains the window's maximum width and height.
|
|
5101
|
+
*/
|
|
5102
|
+
getMaximumSize(): number[];
|
|
5103
|
+
/**
|
|
5104
|
+
* Window id in the format of DesktopCapturerSource's id. For example
|
|
5105
|
+
* "window:1324:0".
|
|
5106
|
+
*
|
|
5107
|
+
* More precisely the format is `window:id:other_id` where `id` is `HWND` on
|
|
5108
|
+
* Windows, `CGWindowID` (`uint64_t`) on macOS and `Window` (`unsigned long`) on
|
|
5109
|
+
* Linux. `other_id` is used to identify web contents (tabs) so within the same top
|
|
5110
|
+
* level window.
|
|
5111
|
+
*/
|
|
5112
|
+
getMediaSourceId(): string;
|
|
5113
|
+
/**
|
|
5114
|
+
* Contains the window's minimum width and height.
|
|
5115
|
+
*/
|
|
5116
|
+
getMinimumSize(): number[];
|
|
5117
|
+
/**
|
|
5118
|
+
* The platform-specific handle of the window.
|
|
5119
|
+
*
|
|
5120
|
+
* The native type of the handle is `HWND` on Windows, `NSView*` on macOS, and
|
|
5121
|
+
* `Window` (`unsigned long`) on Linux.
|
|
5122
|
+
*/
|
|
5123
|
+
getNativeWindowHandle(): Buffer;
|
|
5124
|
+
/**
|
|
5125
|
+
* Contains the window bounds of the normal state
|
|
5126
|
+
*
|
|
5127
|
+
* **Note:** whatever the current state of the window : maximized, minimized or in
|
|
5128
|
+
* fullscreen, this function always returns the position and size of the window in
|
|
5129
|
+
* normal state. In normal state, getBounds and getNormalBounds returns the same
|
|
5130
|
+
* `Rectangle`.
|
|
5131
|
+
*/
|
|
5132
|
+
getNormalBounds(): Rectangle;
|
|
5133
|
+
/**
|
|
5134
|
+
* between 0.0 (fully transparent) and 1.0 (fully opaque). On Linux, always returns
|
|
5135
|
+
* 1.
|
|
5136
|
+
*/
|
|
5137
|
+
getOpacity(): number;
|
|
5138
|
+
/**
|
|
5139
|
+
* The parent window or `null` if there is no parent.
|
|
5140
|
+
*/
|
|
5141
|
+
getParentWindow(): (BrowserWindow) | (null);
|
|
5142
|
+
/**
|
|
5143
|
+
* Contains the window's current position.
|
|
5144
|
+
*/
|
|
5145
|
+
getPosition(): number[];
|
|
5146
|
+
/**
|
|
5147
|
+
* The pathname of the file the window represents.
|
|
5148
|
+
*
|
|
5149
|
+
* @platform darwin
|
|
5150
|
+
*/
|
|
5151
|
+
getRepresentedFilename(): string;
|
|
5152
|
+
/**
|
|
5153
|
+
* Contains the window's width and height.
|
|
5154
|
+
*/
|
|
5155
|
+
getSize(): number[];
|
|
5156
|
+
/**
|
|
5157
|
+
* The title of the native window.
|
|
5158
|
+
*
|
|
5159
|
+
* **Note:** The title of the web page can be different from the title of the
|
|
5160
|
+
* native window.
|
|
5161
|
+
*/
|
|
5162
|
+
getTitle(): string;
|
|
5163
|
+
/**
|
|
5164
|
+
* The custom position for the traffic light buttons in frameless window, `null`
|
|
5165
|
+
* will be returned when there is no custom position.
|
|
5166
|
+
*
|
|
5167
|
+
* @platform darwin
|
|
5168
|
+
*/
|
|
5169
|
+
getWindowButtonPosition(): (Point) | (null);
|
|
5170
|
+
/**
|
|
5171
|
+
* Whether the window has a shadow.
|
|
5172
|
+
*/
|
|
5173
|
+
hasShadow(): boolean;
|
|
5174
|
+
/**
|
|
5175
|
+
* Hides the window.
|
|
5176
|
+
*/
|
|
5177
|
+
hide(): void;
|
|
5178
|
+
/**
|
|
5179
|
+
* Hooks a windows message. The `callback` is called when the message is received
|
|
5180
|
+
* in the WndProc.
|
|
5181
|
+
*
|
|
5182
|
+
* @platform win32
|
|
5183
|
+
*/
|
|
5184
|
+
hookWindowMessage(message: number, callback: (wParam: Buffer, lParam: Buffer) => void): void;
|
|
5185
|
+
/**
|
|
5186
|
+
* Invalidates the window shadow so that it is recomputed based on the current
|
|
5187
|
+
* window shape.
|
|
5188
|
+
*
|
|
5189
|
+
* `BrowserWindows` that are transparent can sometimes leave behind visual
|
|
5190
|
+
* artifacts on macOS. This method can be used to clear these artifacts when, for
|
|
5191
|
+
* example, performing an animation.
|
|
5192
|
+
*
|
|
5193
|
+
* @platform darwin
|
|
5194
|
+
*/
|
|
5195
|
+
invalidateShadow(): void;
|
|
5196
|
+
/**
|
|
5197
|
+
* Whether the window is always on top of other windows.
|
|
5198
|
+
*/
|
|
5199
|
+
isAlwaysOnTop(): boolean;
|
|
5200
|
+
/**
|
|
5201
|
+
* Whether the window can be manually closed by user.
|
|
5202
|
+
*
|
|
5203
|
+
* On Linux always returns `true`.
|
|
5204
|
+
*
|
|
5205
|
+
* @platform darwin,win32
|
|
5206
|
+
*/
|
|
5207
|
+
isClosable(): boolean;
|
|
5208
|
+
/**
|
|
5209
|
+
* Whether the window is destroyed.
|
|
5210
|
+
*/
|
|
5211
|
+
isDestroyed(): boolean;
|
|
5212
|
+
/**
|
|
5213
|
+
* Whether the window's document has been edited.
|
|
5214
|
+
*
|
|
5215
|
+
* @platform darwin
|
|
5216
|
+
*/
|
|
5217
|
+
isDocumentEdited(): boolean;
|
|
5218
|
+
/**
|
|
5219
|
+
* whether the window is enabled.
|
|
5220
|
+
*/
|
|
5221
|
+
isEnabled(): boolean;
|
|
5222
|
+
/**
|
|
5223
|
+
* Whether the window can be focused.
|
|
5224
|
+
*
|
|
5225
|
+
* @platform darwin,win32
|
|
5226
|
+
*/
|
|
5227
|
+
isFocusable(): boolean;
|
|
5228
|
+
/**
|
|
5229
|
+
* Whether the window is focused.
|
|
5230
|
+
*/
|
|
5231
|
+
isFocused(): boolean;
|
|
5232
|
+
/**
|
|
5233
|
+
* Whether the window is in fullscreen mode.
|
|
5234
|
+
*/
|
|
5235
|
+
isFullScreen(): boolean;
|
|
5236
|
+
/**
|
|
5237
|
+
* Whether the maximize/zoom window button toggles fullscreen mode or maximizes the
|
|
5238
|
+
* window.
|
|
5239
|
+
*/
|
|
5240
|
+
isFullScreenable(): boolean;
|
|
5241
|
+
/**
|
|
5242
|
+
* Whether the window will be hidden when the user toggles into mission control.
|
|
5243
|
+
*
|
|
5244
|
+
* @platform darwin
|
|
5245
|
+
*/
|
|
5246
|
+
isHiddenInMissionControl(): boolean;
|
|
5247
|
+
/**
|
|
5248
|
+
* Whether the window is in kiosk mode.
|
|
5249
|
+
*/
|
|
5250
|
+
isKiosk(): boolean;
|
|
5251
|
+
/**
|
|
5252
|
+
* Whether the window can be manually maximized by user.
|
|
5253
|
+
*
|
|
5254
|
+
* On Linux always returns `true`.
|
|
5255
|
+
*
|
|
5256
|
+
* @platform darwin,win32
|
|
5257
|
+
*/
|
|
5258
|
+
isMaximizable(): boolean;
|
|
5259
|
+
/**
|
|
5260
|
+
* Whether the window is maximized.
|
|
5261
|
+
*/
|
|
5262
|
+
isMaximized(): boolean;
|
|
5263
|
+
/**
|
|
5264
|
+
* Whether menu bar automatically hides itself.
|
|
5265
|
+
*
|
|
5266
|
+
* @platform win32,linux
|
|
5267
|
+
*/
|
|
5268
|
+
isMenuBarAutoHide(): boolean;
|
|
5269
|
+
/**
|
|
5270
|
+
* Whether the menu bar is visible.
|
|
5271
|
+
*
|
|
5272
|
+
* @platform win32,linux
|
|
5273
|
+
*/
|
|
5274
|
+
isMenuBarVisible(): boolean;
|
|
5275
|
+
/**
|
|
5276
|
+
* Whether the window can be manually minimized by the user.
|
|
5277
|
+
*
|
|
5278
|
+
* On Linux always returns `true`.
|
|
5279
|
+
*
|
|
5280
|
+
* @platform darwin,win32
|
|
5281
|
+
*/
|
|
5282
|
+
isMinimizable(): boolean;
|
|
5283
|
+
/**
|
|
5284
|
+
* Whether the window is minimized.
|
|
5285
|
+
*/
|
|
5286
|
+
isMinimized(): boolean;
|
|
5287
|
+
/**
|
|
5288
|
+
* Whether current window is a modal window.
|
|
5289
|
+
*/
|
|
5290
|
+
isModal(): boolean;
|
|
5291
|
+
/**
|
|
5292
|
+
* Whether the window can be moved by user.
|
|
5293
|
+
*
|
|
5294
|
+
* On Linux always returns `true`.
|
|
5295
|
+
*
|
|
5296
|
+
* @platform darwin,win32
|
|
5297
|
+
*/
|
|
5298
|
+
isMovable(): boolean;
|
|
5299
|
+
/**
|
|
5300
|
+
* Whether the window is in normal state (not maximized, not minimized, not in
|
|
5301
|
+
* fullscreen mode).
|
|
5302
|
+
*/
|
|
5303
|
+
isNormal(): boolean;
|
|
5304
|
+
/**
|
|
5305
|
+
* Whether the window can be manually resized by the user.
|
|
5306
|
+
*/
|
|
5307
|
+
isResizable(): boolean;
|
|
5308
|
+
/**
|
|
5309
|
+
* Whether the window is in simple (pre-Lion) fullscreen mode.
|
|
5310
|
+
*
|
|
5311
|
+
* @platform darwin
|
|
5312
|
+
*/
|
|
5313
|
+
isSimpleFullScreen(): boolean;
|
|
5314
|
+
/**
|
|
5315
|
+
* Whether the window is in Windows 10 tablet mode.
|
|
5316
|
+
*
|
|
5317
|
+
* Since Windows 10 users can use their PC as tablet, under this mode apps can
|
|
5318
|
+
* choose to optimize their UI for tablets, such as enlarging the titlebar and
|
|
5319
|
+
* hiding titlebar buttons.
|
|
5320
|
+
*
|
|
5321
|
+
* This API returns whether the window is in tablet mode, and the `resize` event
|
|
5322
|
+
* can be be used to listen to changes to tablet mode.
|
|
5323
|
+
*
|
|
5324
|
+
* @platform win32
|
|
5325
|
+
*/
|
|
5326
|
+
isTabletMode(): boolean;
|
|
5327
|
+
/**
|
|
5328
|
+
* Whether the window is visible to the user in the foreground of the app.
|
|
5329
|
+
*/
|
|
5330
|
+
isVisible(): boolean;
|
|
5331
|
+
/**
|
|
5332
|
+
* Whether the window is visible on all workspaces.
|
|
5333
|
+
*
|
|
5334
|
+
* **Note:** This API always returns false on Windows.
|
|
5335
|
+
*
|
|
5336
|
+
* @platform darwin,linux
|
|
5337
|
+
*/
|
|
5338
|
+
isVisibleOnAllWorkspaces(): boolean;
|
|
5339
|
+
/**
|
|
5340
|
+
* `true` or `false` depending on whether the message is hooked.
|
|
5341
|
+
*
|
|
5342
|
+
* @platform win32
|
|
5343
|
+
*/
|
|
5344
|
+
isWindowMessageHooked(message: number): boolean;
|
|
5345
|
+
/**
|
|
5346
|
+
* the promise will resolve when the page has finished loading (see
|
|
5347
|
+
* `did-finish-load`), and rejects if the page fails to load (see `did-fail-load`).
|
|
5348
|
+
*
|
|
5349
|
+
* Same as `webContents.loadFile`, `filePath` should be a path to an HTML file
|
|
5350
|
+
* relative to the root of your application. See the `webContents` docs for more
|
|
5351
|
+
* information.
|
|
5352
|
+
*/
|
|
5353
|
+
loadFile(filePath: string, options?: LoadFileOptions): Promise<void>;
|
|
5354
|
+
/**
|
|
5355
|
+
* the promise will resolve when the page has finished loading (see
|
|
5356
|
+
* `did-finish-load`), and rejects if the page fails to load (see `did-fail-load`).
|
|
5357
|
+
*
|
|
5358
|
+
* Same as `webContents.loadURL(url[, options])`.
|
|
5359
|
+
*
|
|
5360
|
+
* The `url` can be a remote address (e.g. `http://`) or a path to a local HTML
|
|
5361
|
+
* file using the `file://` protocol.
|
|
5362
|
+
*
|
|
5363
|
+
* To ensure that file URLs are properly formatted, it is recommended to use Node's
|
|
5364
|
+
* `url.format` method:
|
|
5365
|
+
*
|
|
5366
|
+
* You can load a URL using a `POST` request with URL-encoded data by doing the
|
|
5367
|
+
* following:
|
|
5368
|
+
*/
|
|
5369
|
+
loadURL(url: string, options?: LoadURLOptions): Promise<void>;
|
|
5370
|
+
/**
|
|
5371
|
+
* Maximizes the window. This will also show (but not focus) the window if it isn't
|
|
5372
|
+
* being displayed already.
|
|
5373
|
+
*/
|
|
5374
|
+
maximize(): void;
|
|
5375
|
+
/**
|
|
5376
|
+
* Merges all windows into one window with multiple tabs when native tabs are
|
|
5377
|
+
* enabled and there is more than one open window.
|
|
5378
|
+
*
|
|
5379
|
+
* @platform darwin
|
|
5380
|
+
*/
|
|
5381
|
+
mergeAllWindows(): void;
|
|
5382
|
+
/**
|
|
5383
|
+
* Minimizes the window. On some platforms the minimized window will be shown in
|
|
5384
|
+
* the Dock.
|
|
5385
|
+
*/
|
|
5386
|
+
minimize(): void;
|
|
5387
|
+
/**
|
|
5388
|
+
* Moves window above the source window in the sense of z-order. If the
|
|
5389
|
+
* `mediaSourceId` is not of type window or if the window does not exist then this
|
|
5390
|
+
* method throws an error.
|
|
5391
|
+
*/
|
|
5392
|
+
moveAbove(mediaSourceId: string): void;
|
|
5393
|
+
/**
|
|
5394
|
+
* Moves the current tab into a new window if native tabs are enabled and there is
|
|
5395
|
+
* more than one tab in the current window.
|
|
5396
|
+
*
|
|
5397
|
+
* @platform darwin
|
|
5398
|
+
*/
|
|
5399
|
+
moveTabToNewWindow(): void;
|
|
5400
|
+
/**
|
|
5401
|
+
* Moves window to top(z-order) regardless of focus
|
|
5402
|
+
*/
|
|
5403
|
+
moveTop(): void;
|
|
5404
|
+
/**
|
|
5405
|
+
* Uses Quick Look to preview a file at a given path.
|
|
5406
|
+
*
|
|
5407
|
+
* @platform darwin
|
|
5408
|
+
*/
|
|
5409
|
+
previewFile(path: string, displayName?: string): void;
|
|
5410
|
+
/**
|
|
5411
|
+
* Same as `webContents.reload`.
|
|
5412
|
+
*/
|
|
5413
|
+
reload(): void;
|
|
5414
|
+
/**
|
|
5415
|
+
* > **Note** The `BrowserView` class is deprecated, and replaced by the new
|
|
5416
|
+
* `WebContentsView` class.
|
|
5417
|
+
*
|
|
5418
|
+
* @experimental
|
|
5419
|
+
* @deprecated
|
|
5420
|
+
*/
|
|
5421
|
+
removeBrowserView(browserView: BrowserView): void;
|
|
5422
|
+
/**
|
|
5423
|
+
* Remove the window's menu bar.
|
|
5424
|
+
*
|
|
5425
|
+
* @platform linux,win32
|
|
5426
|
+
*/
|
|
5427
|
+
removeMenu(): void;
|
|
5428
|
+
/**
|
|
5429
|
+
* Restores the window from minimized state to its previous state.
|
|
5430
|
+
*/
|
|
5431
|
+
restore(): void;
|
|
5432
|
+
/**
|
|
5433
|
+
* Selects the next tab when native tabs are enabled and there are other tabs in
|
|
5434
|
+
* the window.
|
|
5435
|
+
*
|
|
5436
|
+
* @platform darwin
|
|
5437
|
+
*/
|
|
5438
|
+
selectNextTab(): void;
|
|
5439
|
+
/**
|
|
5440
|
+
* Selects the previous tab when native tabs are enabled and there are other tabs
|
|
5441
|
+
* in the window.
|
|
5442
|
+
*
|
|
5443
|
+
* @platform darwin
|
|
5444
|
+
*/
|
|
5445
|
+
selectPreviousTab(): void;
|
|
5446
|
+
/**
|
|
5447
|
+
* Sets whether the window should show always on top of other windows. After
|
|
5448
|
+
* setting this, the window is still a normal window, not a toolbox window which
|
|
5449
|
+
* can not be focused on.
|
|
5450
|
+
*/
|
|
5451
|
+
setAlwaysOnTop(flag: boolean, level?: 'normal' | 'floating' | 'torn-off-menu' | 'modal-panel' | 'main-menu' | 'status' | 'pop-up-menu' | 'screen-saver', relativeLevel?: number): void;
|
|
5452
|
+
/**
|
|
5453
|
+
* Sets the properties for the window's taskbar button.
|
|
5454
|
+
*
|
|
5455
|
+
* **Note:** `relaunchCommand` and `relaunchDisplayName` must always be set
|
|
5456
|
+
* together. If one of those properties is not set, then neither will be used.
|
|
5457
|
+
*
|
|
5458
|
+
* @platform win32
|
|
5459
|
+
*/
|
|
5460
|
+
setAppDetails(options: AppDetailsOptions): void;
|
|
5461
|
+
/**
|
|
5462
|
+
* This will make a window maintain an aspect ratio. The extra size allows a
|
|
5463
|
+
* developer to have space, specified in pixels, not included within the aspect
|
|
5464
|
+
* ratio calculations. This API already takes into account the difference between a
|
|
5465
|
+
* window's size and its content size.
|
|
5466
|
+
*
|
|
5467
|
+
* Consider a normal window with an HD video player and associated controls.
|
|
5468
|
+
* Perhaps there are 15 pixels of controls on the left edge, 25 pixels of controls
|
|
5469
|
+
* on the right edge and 50 pixels of controls below the player. In order to
|
|
5470
|
+
* maintain a 16:9 aspect ratio (standard aspect ratio for HD @1920x1080) within
|
|
5471
|
+
* the player itself we would call this function with arguments of 16/9 and {
|
|
5472
|
+
* width: 40, height: 50 }. The second argument doesn't care where the extra width
|
|
5473
|
+
* and height are within the content view--only that they exist. Sum any extra
|
|
5474
|
+
* width and height areas you have within the overall content view.
|
|
5475
|
+
*
|
|
5476
|
+
* The aspect ratio is not respected when window is resized programmatically with
|
|
5477
|
+
* APIs like `win.setSize`.
|
|
5478
|
+
*
|
|
5479
|
+
* To reset an aspect ratio, pass 0 as the `aspectRatio` value:
|
|
5480
|
+
* `win.setAspectRatio(0)`.
|
|
5481
|
+
*/
|
|
5482
|
+
setAspectRatio(aspectRatio: number, extraSize?: Size): void;
|
|
5483
|
+
/**
|
|
5484
|
+
* Controls whether to hide cursor when typing.
|
|
5485
|
+
*
|
|
5486
|
+
* @platform darwin
|
|
5487
|
+
*/
|
|
5488
|
+
setAutoHideCursor(autoHide: boolean): void;
|
|
5489
|
+
/**
|
|
5490
|
+
* Sets whether the window menu bar should hide itself automatically. Once set the
|
|
5491
|
+
* menu bar will only show when users press the single `Alt` key.
|
|
5492
|
+
*
|
|
5493
|
+
* If the menu bar is already visible, calling `setAutoHideMenuBar(true)` won't
|
|
5494
|
+
* hide it immediately.
|
|
5495
|
+
*
|
|
5496
|
+
* @platform win32,linux
|
|
5497
|
+
*/
|
|
5498
|
+
setAutoHideMenuBar(hide: boolean): void;
|
|
5499
|
+
/**
|
|
5500
|
+
* Examples of valid `backgroundColor` values:
|
|
5501
|
+
*
|
|
5502
|
+
* * Hex
|
|
5503
|
+
* * #fff (shorthand RGB)
|
|
5504
|
+
* * #ffff (shorthand ARGB)
|
|
5505
|
+
* * #ffffff (RGB)
|
|
5506
|
+
* * #ffffffff (ARGB)
|
|
5507
|
+
* * RGB
|
|
5508
|
+
* * rgb(([\d]+),\s*([\d]+),\s*([\d]+))
|
|
5509
|
+
* * e.g. rgb(255, 255, 255)
|
|
5510
|
+
* * RGBA
|
|
5511
|
+
* * rgba(([\d]+),\s*([\d]+),\s*([\d]+),\s*([\d.]+))
|
|
5512
|
+
* * e.g. rgba(255, 255, 255, 1.0)
|
|
5513
|
+
* * HSL
|
|
5514
|
+
* * hsl((-?[\d.]+),\s*([\d.]+)%,\s*([\d.]+)%)
|
|
5515
|
+
* * e.g. hsl(200, 20%, 50%)
|
|
5516
|
+
* * HSLA
|
|
5517
|
+
* * hsla((-?[\d.]+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+))
|
|
5518
|
+
* * e.g. hsla(200, 20%, 50%, 0.5)
|
|
5519
|
+
* * Color name
|
|
5520
|
+
* * Options are listed in SkParseColor.cpp
|
|
5521
|
+
* * Similar to CSS Color Module Level 3 keywords, but case-sensitive.
|
|
5522
|
+
* * e.g. `blueviolet` or `red`
|
|
5523
|
+
*
|
|
5524
|
+
* Sets the background color of the window. See Setting `backgroundColor`.
|
|
5525
|
+
*/
|
|
5526
|
+
setBackgroundColor(backgroundColor: string): void;
|
|
5527
|
+
/**
|
|
5528
|
+
* This method sets the browser window's system-drawn background material,
|
|
5529
|
+
* including behind the non-client area.
|
|
5530
|
+
*
|
|
5531
|
+
* See the Windows documentation for more details.
|
|
5532
|
+
*
|
|
5533
|
+
* **Note:** This method is only supported on Windows 11 22H2 and up.
|
|
5534
|
+
*
|
|
5535
|
+
* @platform win32
|
|
5536
|
+
*/
|
|
5537
|
+
setBackgroundMaterial(material: 'auto' | 'none' | 'mica' | 'acrylic' | 'tabbed'): void;
|
|
5538
|
+
/**
|
|
5539
|
+
* Resizes and moves the window to the supplied bounds. Any properties that are not
|
|
5540
|
+
* supplied will default to their current values.
|
|
5541
|
+
*
|
|
5542
|
+
* **Note:** On macOS, the y-coordinate value cannot be smaller than the Tray
|
|
5543
|
+
* height. The tray height has changed over time and depends on the operating
|
|
5544
|
+
* system, but is between 20-40px. Passing a value lower than the tray height will
|
|
5545
|
+
* result in a window that is flush to the tray.
|
|
5546
|
+
*/
|
|
5547
|
+
setBounds(bounds: Partial<Rectangle>, animate?: boolean): void;
|
|
5548
|
+
/**
|
|
5549
|
+
* > **Note** The `BrowserView` class is deprecated, and replaced by the new
|
|
5550
|
+
* `WebContentsView` class.
|
|
5551
|
+
*
|
|
5552
|
+
* @experimental
|
|
5553
|
+
* @deprecated
|
|
5554
|
+
*/
|
|
5555
|
+
setBrowserView(browserView: (BrowserView) | (null)): void;
|
|
5556
|
+
/**
|
|
5557
|
+
* Sets whether the window can be manually closed by user. On Linux does nothing.
|
|
5558
|
+
*
|
|
5559
|
+
* @platform darwin,win32
|
|
5560
|
+
*/
|
|
5561
|
+
setClosable(closable: boolean): void;
|
|
5562
|
+
/**
|
|
5563
|
+
* Resizes and moves the window's client area (e.g. the web page) to the supplied
|
|
5564
|
+
* bounds.
|
|
5565
|
+
*/
|
|
5566
|
+
setContentBounds(bounds: Rectangle, animate?: boolean): void;
|
|
5567
|
+
/**
|
|
5568
|
+
* Prevents the window contents from being captured by other apps.
|
|
5569
|
+
*
|
|
5570
|
+
* On macOS it sets the NSWindow's sharingType to NSWindowSharingNone. On Windows
|
|
5571
|
+
* it calls SetWindowDisplayAffinity with `WDA_EXCLUDEFROMCAPTURE`. For Windows 10
|
|
5572
|
+
* version 2004 and up the window will be removed from capture entirely, older
|
|
5573
|
+
* Windows versions behave as if `WDA_MONITOR` is applied capturing a black window.
|
|
5574
|
+
*
|
|
5575
|
+
* @platform darwin,win32
|
|
5576
|
+
*/
|
|
5577
|
+
setContentProtection(enable: boolean): void;
|
|
5578
|
+
/**
|
|
5579
|
+
* Resizes the window's client area (e.g. the web page) to `width` and `height`.
|
|
5580
|
+
*/
|
|
5581
|
+
setContentSize(width: number, height: number, animate?: boolean): void;
|
|
5582
|
+
/**
|
|
5583
|
+
* Specifies whether the window’s document has been edited, and the icon in title
|
|
5584
|
+
* bar will become gray when set to `true`.
|
|
5585
|
+
*
|
|
5586
|
+
* @platform darwin
|
|
5587
|
+
*/
|
|
5588
|
+
setDocumentEdited(edited: boolean): void;
|
|
5589
|
+
/**
|
|
5590
|
+
* Disable or enable the window.
|
|
5591
|
+
*/
|
|
5592
|
+
setEnabled(enable: boolean): void;
|
|
5593
|
+
/**
|
|
5594
|
+
* Changes whether the window can be focused.
|
|
5595
|
+
*
|
|
5596
|
+
* On macOS it does not remove the focus from the window.
|
|
5597
|
+
*
|
|
5598
|
+
* @platform darwin,win32
|
|
5599
|
+
*/
|
|
5600
|
+
setFocusable(focusable: boolean): void;
|
|
5601
|
+
/**
|
|
5602
|
+
* Sets whether the window should be in fullscreen mode.
|
|
5603
|
+
*
|
|
5604
|
+
* **Note:** On macOS, fullscreen transitions take place asynchronously. If further
|
|
5605
|
+
* actions depend on the fullscreen state, use the 'enter-full-screen' or
|
|
5606
|
+
* 'leave-full-screen' events.
|
|
5607
|
+
*/
|
|
5608
|
+
setFullScreen(flag: boolean): void;
|
|
5609
|
+
/**
|
|
5610
|
+
* Sets whether the maximize/zoom window button toggles fullscreen mode or
|
|
5611
|
+
* maximizes the window.
|
|
5612
|
+
*/
|
|
5613
|
+
setFullScreenable(fullscreenable: boolean): void;
|
|
5614
|
+
/**
|
|
5615
|
+
* Sets whether the window should have a shadow.
|
|
5616
|
+
*/
|
|
5617
|
+
setHasShadow(hasShadow: boolean): void;
|
|
5618
|
+
/**
|
|
5619
|
+
* Sets whether the window will be hidden when the user toggles into mission
|
|
5620
|
+
* control.
|
|
5621
|
+
*
|
|
5622
|
+
* @platform darwin
|
|
5623
|
+
*/
|
|
5624
|
+
setHiddenInMissionControl(hidden: boolean): void;
|
|
5625
|
+
/**
|
|
5626
|
+
* Changes window icon.
|
|
5627
|
+
*
|
|
5628
|
+
* @platform win32,linux
|
|
5629
|
+
*/
|
|
5630
|
+
setIcon(icon: (NativeImage) | (string)): void;
|
|
5631
|
+
/**
|
|
5632
|
+
* Makes the window ignore all mouse events.
|
|
5633
|
+
*
|
|
5634
|
+
* All mouse events happened in this window will be passed to the window below this
|
|
5635
|
+
* window, but if this window has focus, it will still receive keyboard events.
|
|
5636
|
+
*/
|
|
5637
|
+
setIgnoreMouseEvents(ignore: boolean, options?: IgnoreMouseEventsOptions): void;
|
|
5638
|
+
/**
|
|
5639
|
+
* Enters or leaves kiosk mode.
|
|
5640
|
+
*/
|
|
5641
|
+
setKiosk(flag: boolean): void;
|
|
5642
|
+
/**
|
|
5643
|
+
* Sets whether the window can be manually maximized by user. On Linux does
|
|
5644
|
+
* nothing.
|
|
5645
|
+
*
|
|
5646
|
+
* @platform darwin,win32
|
|
5647
|
+
*/
|
|
5648
|
+
setMaximizable(maximizable: boolean): void;
|
|
5649
|
+
/**
|
|
5650
|
+
* Sets the maximum size of window to `width` and `height`.
|
|
5651
|
+
*/
|
|
5652
|
+
setMaximumSize(width: number, height: number): void;
|
|
5653
|
+
/**
|
|
5654
|
+
* Sets the `menu` as the window's menu bar.
|
|
5655
|
+
*
|
|
5656
|
+
* @platform linux,win32
|
|
5657
|
+
*/
|
|
5658
|
+
setMenu(menu: (Menu) | (null)): void;
|
|
5659
|
+
/**
|
|
5660
|
+
* Sets whether the menu bar should be visible. If the menu bar is auto-hide, users
|
|
5661
|
+
* can still bring up the menu bar by pressing the single `Alt` key.
|
|
5662
|
+
*
|
|
5663
|
+
* @platform win32,linux
|
|
5664
|
+
*/
|
|
5665
|
+
setMenuBarVisibility(visible: boolean): void;
|
|
5666
|
+
/**
|
|
5667
|
+
* Sets whether the window can be manually minimized by user. On Linux does
|
|
5668
|
+
* nothing.
|
|
5669
|
+
*
|
|
5670
|
+
* @platform darwin,win32
|
|
5671
|
+
*/
|
|
5672
|
+
setMinimizable(minimizable: boolean): void;
|
|
5673
|
+
/**
|
|
5674
|
+
* Sets the minimum size of window to `width` and `height`.
|
|
5675
|
+
*/
|
|
5676
|
+
setMinimumSize(width: number, height: number): void;
|
|
5677
|
+
/**
|
|
5678
|
+
* Sets whether the window can be moved by user. On Linux does nothing.
|
|
5679
|
+
*
|
|
5680
|
+
* @platform darwin,win32
|
|
5681
|
+
*/
|
|
5682
|
+
setMovable(movable: boolean): void;
|
|
5683
|
+
/**
|
|
5684
|
+
* Sets the opacity of the window. On Linux, does nothing. Out of bound number
|
|
5685
|
+
* values are clamped to the [0, 1] range.
|
|
5686
|
+
*
|
|
5687
|
+
* @platform win32,darwin
|
|
5688
|
+
*/
|
|
5689
|
+
setOpacity(opacity: number): void;
|
|
5690
|
+
/**
|
|
5691
|
+
* Sets a 16 x 16 pixel overlay onto the current taskbar icon, usually used to
|
|
5692
|
+
* convey some sort of application status or to passively notify the user.
|
|
5693
|
+
*
|
|
5694
|
+
* @platform win32
|
|
5695
|
+
*/
|
|
5696
|
+
setOverlayIcon(overlay: (NativeImage) | (null), description: string): void;
|
|
5697
|
+
/**
|
|
5698
|
+
* Sets `parent` as current window's parent window, passing `null` will turn
|
|
5699
|
+
* current window into a top-level window.
|
|
5700
|
+
*/
|
|
5701
|
+
setParentWindow(parent: (BrowserWindow) | (null)): void;
|
|
5702
|
+
/**
|
|
5703
|
+
* Moves window to `x` and `y`.
|
|
5704
|
+
*/
|
|
5705
|
+
setPosition(x: number, y: number, animate?: boolean): void;
|
|
5706
|
+
/**
|
|
5707
|
+
* Sets progress value in progress bar. Valid range is [0, 1.0].
|
|
5708
|
+
*
|
|
5709
|
+
* Remove progress bar when progress < 0; Change to indeterminate mode when
|
|
5710
|
+
* progress > 1.
|
|
5711
|
+
*
|
|
5712
|
+
* On Linux platform, only supports Unity desktop environment, you need to specify
|
|
5713
|
+
* the `*.desktop` file name to `desktopName` field in `package.json`. By default,
|
|
5714
|
+
* it will assume `{app.name}.desktop`.
|
|
5715
|
+
*
|
|
5716
|
+
* On Windows, a mode can be passed. Accepted values are `none`, `normal`,
|
|
5717
|
+
* `indeterminate`, `error`, and `paused`. If you call `setProgressBar` without a
|
|
5718
|
+
* mode set (but with a value within the valid range), `normal` will be assumed.
|
|
5719
|
+
*/
|
|
5720
|
+
setProgressBar(progress: number, options?: ProgressBarOptions): void;
|
|
5721
|
+
/**
|
|
5722
|
+
* Sets the pathname of the file the window represents, and the icon of the file
|
|
5723
|
+
* will show in window's title bar.
|
|
5724
|
+
*
|
|
5725
|
+
* @platform darwin
|
|
5726
|
+
*/
|
|
5727
|
+
setRepresentedFilename(filename: string): void;
|
|
5728
|
+
/**
|
|
5729
|
+
* Sets whether the window can be manually resized by the user.
|
|
5730
|
+
*/
|
|
5731
|
+
setResizable(resizable: boolean): void;
|
|
5732
|
+
/**
|
|
5733
|
+
* Setting a window shape determines the area within the window where the system
|
|
5734
|
+
* permits drawing and user interaction. Outside of the given region, no pixels
|
|
5735
|
+
* will be drawn and no mouse events will be registered. Mouse events outside of
|
|
5736
|
+
* the region will not be received by that window, but will fall through to
|
|
5737
|
+
* whatever is behind the window.
|
|
5738
|
+
*
|
|
5739
|
+
* @experimental
|
|
5740
|
+
* @platform win32,linux
|
|
5741
|
+
*/
|
|
5742
|
+
setShape(rects: Rectangle[]): void;
|
|
5743
|
+
/**
|
|
5744
|
+
* Changes the attachment point for sheets on macOS. By default, sheets are
|
|
5745
|
+
* attached just below the window frame, but you may want to display them beneath a
|
|
5746
|
+
* HTML-rendered toolbar. For example:
|
|
5747
|
+
*
|
|
5748
|
+
* @platform darwin
|
|
5749
|
+
*/
|
|
5750
|
+
setSheetOffset(offsetY: number, offsetX?: number): void;
|
|
5751
|
+
/**
|
|
5752
|
+
* Enters or leaves simple fullscreen mode.
|
|
5753
|
+
*
|
|
5754
|
+
* Simple fullscreen mode emulates the native fullscreen behavior found in versions
|
|
5755
|
+
* of macOS prior to Lion (10.7).
|
|
5756
|
+
*
|
|
5757
|
+
* @platform darwin
|
|
5758
|
+
*/
|
|
5759
|
+
setSimpleFullScreen(flag: boolean): void;
|
|
5760
|
+
/**
|
|
5761
|
+
* Resizes the window to `width` and `height`. If `width` or `height` are below any
|
|
5762
|
+
* set minimum size constraints the window will snap to its minimum size.
|
|
5763
|
+
*/
|
|
5764
|
+
setSize(width: number, height: number, animate?: boolean): void;
|
|
5765
|
+
/**
|
|
5766
|
+
* Makes the window not show in the taskbar.
|
|
5767
|
+
*
|
|
5768
|
+
* @platform darwin,win32
|
|
5769
|
+
*/
|
|
5770
|
+
setSkipTaskbar(skip: boolean): void;
|
|
5771
|
+
/**
|
|
5772
|
+
* Whether the buttons were added successfully
|
|
5773
|
+
*
|
|
5774
|
+
* Add a thumbnail toolbar with a specified set of buttons to the thumbnail image
|
|
5775
|
+
* of a window in a taskbar button layout. Returns a `boolean` object indicates
|
|
5776
|
+
* whether the thumbnail has been added successfully.
|
|
5777
|
+
*
|
|
5778
|
+
* The number of buttons in thumbnail toolbar should be no greater than 7 due to
|
|
5779
|
+
* the limited room. Once you setup the thumbnail toolbar, the toolbar cannot be
|
|
5780
|
+
* removed due to the platform's limitation. But you can call the API with an empty
|
|
5781
|
+
* array to clean the buttons.
|
|
5782
|
+
*
|
|
5783
|
+
* The `buttons` is an array of `Button` objects:
|
|
5784
|
+
*
|
|
5785
|
+
* * `Button` Object
|
|
5786
|
+
* * `icon` NativeImage - The icon showing in thumbnail toolbar.
|
|
5787
|
+
* * `click` Function
|
|
5788
|
+
* * `tooltip` string (optional) - The text of the button's tooltip.
|
|
5789
|
+
* * `flags` string[] (optional) - Control specific states and behaviors of the
|
|
5790
|
+
* button. By default, it is `['enabled']`.
|
|
5791
|
+
*
|
|
5792
|
+
* The `flags` is an array that can include following `string`s:
|
|
5793
|
+
*
|
|
5794
|
+
* * `enabled` - The button is active and available to the user.
|
|
5795
|
+
* * `disabled` - The button is disabled. It is present, but has a visual state
|
|
5796
|
+
* indicating it will not respond to user action.
|
|
5797
|
+
* * `dismissonclick` - When the button is clicked, the thumbnail window closes
|
|
5798
|
+
* immediately.
|
|
5799
|
+
* * `nobackground` - Do not draw a button border, use only the image.
|
|
5800
|
+
* * `hidden` - The button is not shown to the user.
|
|
5801
|
+
* * `noninteractive` - The button is enabled but not interactive; no pressed
|
|
5802
|
+
* button state is drawn. This value is intended for instances where the button is
|
|
5803
|
+
* used in a notification.
|
|
5804
|
+
*
|
|
5805
|
+
* @platform win32
|
|
5806
|
+
*/
|
|
5807
|
+
setThumbarButtons(buttons: ThumbarButton[]): boolean;
|
|
5808
|
+
/**
|
|
5809
|
+
* Sets the region of the window to show as the thumbnail image displayed when
|
|
5810
|
+
* hovering over the window in the taskbar. You can reset the thumbnail to be the
|
|
5811
|
+
* entire window by specifying an empty region: `{ x: 0, y: 0, width: 0, height: 0
|
|
5812
|
+
* }`.
|
|
5813
|
+
*
|
|
5814
|
+
* @platform win32
|
|
5815
|
+
*/
|
|
5816
|
+
setThumbnailClip(region: Rectangle): void;
|
|
5817
|
+
/**
|
|
5818
|
+
* Sets the toolTip that is displayed when hovering over the window thumbnail in
|
|
5819
|
+
* the taskbar.
|
|
5820
|
+
*
|
|
5821
|
+
* @platform win32
|
|
5822
|
+
*/
|
|
5823
|
+
setThumbnailToolTip(toolTip: string): void;
|
|
5824
|
+
/**
|
|
5825
|
+
* Changes the title of native window to `title`.
|
|
5826
|
+
*/
|
|
5827
|
+
setTitle(title: string): void;
|
|
5828
|
+
/**
|
|
5829
|
+
* On a Window with Window Controls Overlay already enabled, this method updates
|
|
5830
|
+
* the style of the title bar overlay.
|
|
5831
|
+
*
|
|
5832
|
+
* @platform win32
|
|
5833
|
+
*/
|
|
5834
|
+
setTitleBarOverlay(options: TitleBarOverlay): void;
|
|
5835
|
+
/**
|
|
5836
|
+
* Raises `browserView` above other `BrowserView`s attached to `win`. Throws an
|
|
5837
|
+
* error if `browserView` is not attached to `win`.
|
|
5838
|
+
*
|
|
5839
|
+
* > **Note** The `BrowserView` class is deprecated, and replaced by the new
|
|
5840
|
+
* `WebContentsView` class.
|
|
5841
|
+
*
|
|
5842
|
+
* @experimental
|
|
5843
|
+
* @deprecated
|
|
5844
|
+
*/
|
|
5845
|
+
setTopBrowserView(browserView: BrowserView): void;
|
|
5846
|
+
/**
|
|
5847
|
+
* Sets the touchBar layout for the current window. Specifying `null` or
|
|
5848
|
+
* `undefined` clears the touch bar. This method only has an effect if the machine
|
|
5849
|
+
* has a touch bar.
|
|
5850
|
+
*
|
|
5851
|
+
* **Note:** The TouchBar API is currently experimental and may change or be
|
|
5852
|
+
* removed in future Electron releases.
|
|
5853
|
+
*
|
|
5854
|
+
* @platform darwin
|
|
5855
|
+
*/
|
|
5856
|
+
setTouchBar(touchBar: (TouchBar) | (null)): void;
|
|
5857
|
+
/**
|
|
5858
|
+
* Adds a vibrancy effect to the browser window. Passing `null` or an empty string
|
|
5859
|
+
* will remove the vibrancy effect on the window.
|
|
5860
|
+
*
|
|
5861
|
+
* @platform darwin
|
|
5862
|
+
*/
|
|
5863
|
+
setVibrancy(type: (('titlebar' | 'selection' | 'menu' | 'popover' | 'sidebar' | 'header' | 'sheet' | 'window' | 'hud' | 'fullscreen-ui' | 'tooltip' | 'content' | 'under-window' | 'under-page')) | (null)): void;
|
|
5864
|
+
/**
|
|
5865
|
+
* Sets whether the window should be visible on all workspaces.
|
|
5866
|
+
*
|
|
5867
|
+
* **Note:** This API does nothing on Windows.
|
|
5868
|
+
*
|
|
5869
|
+
* @platform darwin,linux
|
|
5870
|
+
*/
|
|
5871
|
+
setVisibleOnAllWorkspaces(visible: boolean, options?: VisibleOnAllWorkspacesOptions): void;
|
|
5872
|
+
/**
|
|
5873
|
+
* Set a custom position for the traffic light buttons in frameless window. Passing
|
|
5874
|
+
* `null` will reset the position to default.
|
|
5875
|
+
*
|
|
5876
|
+
* @platform darwin
|
|
5877
|
+
*/
|
|
5878
|
+
setWindowButtonPosition(position: (Point) | (null)): void;
|
|
5879
|
+
/**
|
|
5880
|
+
* Sets whether the window traffic light buttons should be visible.
|
|
5881
|
+
*
|
|
5882
|
+
* @platform darwin
|
|
5883
|
+
*/
|
|
5884
|
+
setWindowButtonVisibility(visible: boolean): void;
|
|
5885
|
+
/**
|
|
5886
|
+
* Shows and gives focus to the window.
|
|
5887
|
+
*/
|
|
5888
|
+
show(): void;
|
|
5889
|
+
/**
|
|
5890
|
+
* Shows or hides the tab overview when native tabs are enabled.
|
|
5891
|
+
*
|
|
5892
|
+
* @platform darwin
|
|
5893
|
+
*/
|
|
5894
|
+
showAllTabs(): void;
|
|
5895
|
+
/**
|
|
5896
|
+
* Same as `webContents.showDefinitionForSelection()`.
|
|
5897
|
+
*
|
|
5898
|
+
* @platform darwin
|
|
5899
|
+
*/
|
|
5900
|
+
showDefinitionForSelection(): void;
|
|
5901
|
+
/**
|
|
5902
|
+
* Shows the window but doesn't focus on it.
|
|
5903
|
+
*/
|
|
5904
|
+
showInactive(): void;
|
|
5905
|
+
/**
|
|
5906
|
+
* Toggles the visibility of the tab bar if native tabs are enabled and there is
|
|
5907
|
+
* only one tab in the current window.
|
|
5908
|
+
*
|
|
5909
|
+
* @platform darwin
|
|
5910
|
+
*/
|
|
5911
|
+
toggleTabBar(): void;
|
|
5912
|
+
/**
|
|
5913
|
+
* Unhooks all of the window messages.
|
|
5914
|
+
*
|
|
5915
|
+
* @platform win32
|
|
5916
|
+
*/
|
|
5917
|
+
unhookAllWindowMessages(): void;
|
|
5918
|
+
/**
|
|
5919
|
+
* Unhook the window message.
|
|
5920
|
+
*
|
|
5921
|
+
* @platform win32
|
|
5922
|
+
*/
|
|
5923
|
+
unhookWindowMessage(message: number): void;
|
|
5924
|
+
/**
|
|
5925
|
+
* Unmaximizes the window.
|
|
5926
|
+
*/
|
|
5927
|
+
unmaximize(): void;
|
|
5928
|
+
/**
|
|
5929
|
+
* A `string` property that defines an alternative title provided only to
|
|
5930
|
+
* accessibility tools such as screen readers. This string is not directly visible
|
|
5931
|
+
* to users.
|
|
5932
|
+
*/
|
|
5933
|
+
accessibleTitle: string;
|
|
5934
|
+
/**
|
|
5935
|
+
* A `boolean` property that determines whether the window menu bar should hide
|
|
5936
|
+
* itself automatically. Once set, the menu bar will only show when users press the
|
|
5937
|
+
* single `Alt` key.
|
|
5938
|
+
*
|
|
5939
|
+
* If the menu bar is already visible, setting this property to `true` won't hide
|
|
5940
|
+
* it immediately.
|
|
5941
|
+
*/
|
|
5942
|
+
autoHideMenuBar: boolean;
|
|
5943
|
+
/**
|
|
5944
|
+
* A `boolean` property that determines whether the window can be manually closed
|
|
5945
|
+
* by user.
|
|
5946
|
+
*
|
|
5947
|
+
* On Linux the setter is a no-op, although the getter returns `true`.
|
|
5948
|
+
*
|
|
5949
|
+
* @platform darwin,win32
|
|
5950
|
+
*/
|
|
5951
|
+
closable: boolean;
|
|
5952
|
+
/**
|
|
5953
|
+
* A `boolean` property that specifies whether the window’s document has been
|
|
5954
|
+
* edited.
|
|
5955
|
+
*
|
|
5956
|
+
* The icon in title bar will become gray when set to `true`.
|
|
5957
|
+
*
|
|
5958
|
+
* @platform darwin
|
|
3851
5959
|
*/
|
|
3852
|
-
|
|
5960
|
+
documentEdited: boolean;
|
|
3853
5961
|
/**
|
|
3854
|
-
*
|
|
3855
|
-
*
|
|
5962
|
+
* A `boolean` property that determines whether the window is excluded from the
|
|
5963
|
+
* application’s Windows menu. `false` by default.
|
|
3856
5964
|
*
|
|
3857
|
-
* @platform darwin
|
|
5965
|
+
* @platform darwin
|
|
3858
5966
|
*/
|
|
3859
|
-
|
|
5967
|
+
excludedFromShownWindowsMenu: boolean;
|
|
3860
5968
|
/**
|
|
3861
|
-
*
|
|
3862
|
-
*
|
|
3863
|
-
*
|
|
3864
|
-
* `false` will cause the `ready-to-show` event to not fire. Default is `true`.
|
|
5969
|
+
* A `boolean` property that determines whether the window is focusable.
|
|
5970
|
+
*
|
|
5971
|
+
* @platform win32,darwin
|
|
3865
5972
|
*/
|
|
3866
|
-
|
|
5973
|
+
focusable: boolean;
|
|
3867
5974
|
/**
|
|
3868
|
-
*
|
|
5975
|
+
* A `boolean` property that determines whether the window is in fullscreen mode.
|
|
3869
5976
|
*/
|
|
3870
|
-
|
|
5977
|
+
fullScreen: boolean;
|
|
3871
5978
|
/**
|
|
3872
|
-
*
|
|
5979
|
+
* A `boolean` property that determines whether the maximize/zoom window button
|
|
5980
|
+
* toggles fullscreen mode or maximizes the window.
|
|
3873
5981
|
*/
|
|
3874
|
-
|
|
5982
|
+
fullScreenable: boolean;
|
|
3875
5983
|
/**
|
|
3876
|
-
*
|
|
3877
|
-
*
|
|
3878
|
-
* fullscreenable.
|
|
5984
|
+
* A `Integer` property representing the unique ID of the window. Each ID is unique
|
|
5985
|
+
* among all `BrowserWindow` instances of the entire Electron application.
|
|
3879
5986
|
*
|
|
3880
|
-
* @platform darwin
|
|
3881
5987
|
*/
|
|
3882
|
-
|
|
5988
|
+
readonly id: number;
|
|
3883
5989
|
/**
|
|
3884
|
-
*
|
|
5990
|
+
* A `boolean` property that determines whether the window is in kiosk mode.
|
|
3885
5991
|
*/
|
|
3886
|
-
|
|
5992
|
+
kiosk: boolean;
|
|
3887
5993
|
/**
|
|
3888
|
-
*
|
|
5994
|
+
* A `boolean` property that determines whether the window can be manually
|
|
5995
|
+
* maximized by user.
|
|
3889
5996
|
*
|
|
3890
|
-
*
|
|
3891
|
-
*/
|
|
3892
|
-
simpleFullscreen?: boolean;
|
|
3893
|
-
/**
|
|
3894
|
-
* Whether to show the window in taskbar. Default is `false`.
|
|
5997
|
+
* On Linux the setter is a no-op, although the getter returns `true`.
|
|
3895
5998
|
*
|
|
3896
5999
|
* @platform darwin,win32
|
|
3897
6000
|
*/
|
|
3898
|
-
|
|
6001
|
+
maximizable: boolean;
|
|
3899
6002
|
/**
|
|
3900
|
-
*
|
|
3901
|
-
* tabbing identifier will be grouped together. This also adds a native new tab
|
|
3902
|
-
* button to your window's tab bar and allows your `app` and window to receive the
|
|
3903
|
-
* `new-window-for-tab` event.
|
|
6003
|
+
* A `boolean` property that determines whether the menu bar should be visible.
|
|
3904
6004
|
*
|
|
3905
|
-
*
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
* Use `WS_THICKFRAME` style for frameless windows on Windows, which adds standard
|
|
3910
|
-
* window frame. Setting it to `false` will remove window shadow and window
|
|
3911
|
-
* animations. Default is `true`.
|
|
3912
|
-
*/
|
|
3913
|
-
thickFrame?: boolean;
|
|
3914
|
-
/**
|
|
3915
|
-
* Default window title. Default is `"Electron"`. If the HTML tag `<title>` is
|
|
3916
|
-
* defined in the HTML file loaded by `loadURL()`, this property will be ignored.
|
|
6005
|
+
* **Note:** If the menu bar is auto-hide, users can still bring up the menu bar by
|
|
6006
|
+
* pressing the single `Alt` key.
|
|
6007
|
+
*
|
|
6008
|
+
* @platform win32,linux
|
|
3917
6009
|
*/
|
|
3918
|
-
|
|
6010
|
+
menuBarVisible: boolean;
|
|
3919
6011
|
/**
|
|
3920
|
-
*
|
|
3921
|
-
*
|
|
3922
|
-
*
|
|
3923
|
-
*
|
|
3924
|
-
*
|
|
3925
|
-
*
|
|
6012
|
+
* A `boolean` property that determines whether the window can be manually
|
|
6013
|
+
* minimized by user.
|
|
6014
|
+
*
|
|
6015
|
+
* On Linux the setter is a no-op, although the getter returns `true`.
|
|
6016
|
+
*
|
|
6017
|
+
* @platform darwin,win32
|
|
3926
6018
|
*/
|
|
3927
|
-
|
|
6019
|
+
minimizable: boolean;
|
|
3928
6020
|
/**
|
|
3929
|
-
*
|
|
6021
|
+
* A `boolean` property that determines Whether the window can be moved by user.
|
|
6022
|
+
*
|
|
6023
|
+
* On Linux the setter is a no-op, although the getter returns `true`.
|
|
3930
6024
|
*
|
|
3931
6025
|
* @platform darwin,win32
|
|
3932
6026
|
*/
|
|
3933
|
-
|
|
6027
|
+
movable: boolean;
|
|
3934
6028
|
/**
|
|
3935
|
-
*
|
|
6029
|
+
* A `string` property that determines the pathname of the file the window
|
|
6030
|
+
* represents, and the icon of the file will show in window's title bar.
|
|
3936
6031
|
*
|
|
3937
6032
|
* @platform darwin
|
|
3938
6033
|
*/
|
|
3939
|
-
|
|
6034
|
+
representedFilename: string;
|
|
3940
6035
|
/**
|
|
3941
|
-
*
|
|
3942
|
-
*
|
|
6036
|
+
* A `boolean` property that determines whether the window can be manually resized
|
|
6037
|
+
* by user.
|
|
3943
6038
|
*/
|
|
3944
|
-
|
|
6039
|
+
resizable: boolean;
|
|
3945
6040
|
/**
|
|
3946
|
-
*
|
|
6041
|
+
* A `boolean` property that determines whether the window has a shadow.
|
|
3947
6042
|
*/
|
|
3948
|
-
|
|
6043
|
+
shadow: boolean;
|
|
3949
6044
|
/**
|
|
3950
|
-
*
|
|
3951
|
-
*
|
|
3952
|
-
* Default is `false`.
|
|
6045
|
+
* A `boolean` property that determines whether the window is in simple (pre-Lion)
|
|
6046
|
+
* fullscreen mode.
|
|
3953
6047
|
*/
|
|
3954
|
-
|
|
6048
|
+
simpleFullScreen: boolean;
|
|
3955
6049
|
/**
|
|
3956
|
-
*
|
|
3957
|
-
*
|
|
3958
|
-
* `header`, `sheet`, `window`, `hud`, `fullscreen-ui`, `tooltip`, `content`,
|
|
3959
|
-
* `under-window`, or `under-page`.
|
|
6050
|
+
* A `string` (optional) property that is equal to the `tabbingIdentifier` passed
|
|
6051
|
+
* to the `BrowserWindow` constructor or `undefined` if none was set.
|
|
3960
6052
|
*
|
|
3961
6053
|
* @platform darwin
|
|
3962
6054
|
*/
|
|
3963
|
-
|
|
6055
|
+
readonly tabbingIdentifier?: string;
|
|
3964
6056
|
/**
|
|
3965
|
-
*
|
|
3966
|
-
* macOS. Must be used with the `vibrancy` property. Possible values are:
|
|
6057
|
+
* A `string` property that determines the title of the native window.
|
|
3967
6058
|
*
|
|
3968
|
-
*
|
|
6059
|
+
* **Note:** The title of the web page can be different from the title of the
|
|
6060
|
+
* native window.
|
|
3969
6061
|
*/
|
|
3970
|
-
|
|
6062
|
+
title: string;
|
|
3971
6063
|
/**
|
|
3972
|
-
*
|
|
6064
|
+
* A `boolean` property that determines whether the window is visible on all
|
|
6065
|
+
* workspaces.
|
|
6066
|
+
*
|
|
6067
|
+
* **Note:** Always returns false on Windows.
|
|
6068
|
+
*
|
|
6069
|
+
* @platform darwin,linux
|
|
3973
6070
|
*/
|
|
3974
|
-
|
|
6071
|
+
visibleOnAllWorkspaces: boolean;
|
|
3975
6072
|
/**
|
|
3976
|
-
*
|
|
6073
|
+
* A `WebContents` object this window owns. All web page related events and
|
|
6074
|
+
* operations will be done via it.
|
|
6075
|
+
*
|
|
6076
|
+
* See the `webContents` documentation for its methods and events.
|
|
6077
|
+
*
|
|
3977
6078
|
*/
|
|
3978
|
-
|
|
6079
|
+
readonly webContents: WebContents;
|
|
6080
|
+
}
|
|
6081
|
+
|
|
6082
|
+
interface BrowserWindowConstructorOptions extends BaseWindowConstructorOptions {
|
|
6083
|
+
|
|
6084
|
+
// Docs: https://electronjs.org/docs/api/structures/browser-window-options
|
|
6085
|
+
|
|
3979
6086
|
/**
|
|
3980
|
-
*
|
|
3981
|
-
*
|
|
6087
|
+
* Whether the renderer should be active when `show` is `false` and it has just
|
|
6088
|
+
* been created. In order for `document.visibilityState` to work correctly on
|
|
6089
|
+
* first load with `show: false` you should set this to `false`. Setting this to
|
|
6090
|
+
* `false` will cause the `ready-to-show` event to not fire. Default is `true`.
|
|
3982
6091
|
*/
|
|
3983
|
-
|
|
6092
|
+
paintWhenInitiallyHidden?: boolean;
|
|
3984
6093
|
/**
|
|
3985
|
-
*
|
|
3986
|
-
*
|
|
6094
|
+
* When using a frameless window in conjunction with
|
|
6095
|
+
* `win.setWindowButtonVisibility(true)` on macOS or using a `titleBarStyle` so
|
|
6096
|
+
* that the standard window controls ("traffic lights" on macOS) are visible, this
|
|
6097
|
+
* property enables the Window Controls Overlay JavaScript APIs and CSS Environment
|
|
6098
|
+
* Variables. Specifying `true` will result in an overlay with default system
|
|
6099
|
+
* colors. Default is `false`.
|
|
3987
6100
|
*/
|
|
3988
|
-
|
|
6101
|
+
titleBarOverlay?: (TitleBarOverlay) | (boolean);
|
|
3989
6102
|
/**
|
|
3990
|
-
*
|
|
3991
|
-
* on the toolbar or by clicking the Window > Zoom menu item. If `true`, the window
|
|
3992
|
-
* will grow to the preferred width of the web page when zoomed, `false` will cause
|
|
3993
|
-
* it to zoom to the width of the screen. This will also affect the behavior when
|
|
3994
|
-
* calling `maximize()` directly. Default is `false`.
|
|
3995
|
-
*
|
|
3996
|
-
* @platform darwin
|
|
6103
|
+
* Settings of web page's features.
|
|
3997
6104
|
*/
|
|
3998
|
-
|
|
6105
|
+
webPreferences?: WebPreferences;
|
|
3999
6106
|
}
|
|
4000
6107
|
|
|
4001
6108
|
interface Certificate {
|
|
@@ -7023,6 +9130,8 @@ declare namespace Electron {
|
|
|
7023
9130
|
* protocol handlers will not be called for this request. This allows forwarding an
|
|
7024
9131
|
* intercepted request to the built-in handler. webRequest handlers will still be
|
|
7025
9132
|
* triggered when bypassing custom protocols.
|
|
9133
|
+
*
|
|
9134
|
+
* Note: in the utility process custom protocols are not supported.
|
|
7026
9135
|
*/
|
|
7027
9136
|
fetch(input: (string) | (GlobalRequest), init?: RequestInit & { bypassCustomProtocolHandlers?: boolean }): Promise<GlobalResponse>;
|
|
7028
9137
|
/**
|
|
@@ -11677,6 +13786,67 @@ declare namespace Electron {
|
|
|
11677
13786
|
stdout: (NodeJS.ReadableStream) | (null);
|
|
11678
13787
|
}
|
|
11679
13788
|
|
|
13789
|
+
class View extends NodeEventEmitter {
|
|
13790
|
+
|
|
13791
|
+
// Docs: https://electronjs.org/docs/api/view
|
|
13792
|
+
|
|
13793
|
+
/**
|
|
13794
|
+
* Emitted when the view's bounds have changed in response to being laid out. The
|
|
13795
|
+
* new bounds can be retrieved with `view.getBounds()`.
|
|
13796
|
+
*/
|
|
13797
|
+
on(event: 'bounds-changed', listener: Function): this;
|
|
13798
|
+
off(event: 'bounds-changed', listener: Function): this;
|
|
13799
|
+
once(event: 'bounds-changed', listener: Function): this;
|
|
13800
|
+
addListener(event: 'bounds-changed', listener: Function): this;
|
|
13801
|
+
removeListener(event: 'bounds-changed', listener: Function): this;
|
|
13802
|
+
/**
|
|
13803
|
+
* View
|
|
13804
|
+
*/
|
|
13805
|
+
constructor();
|
|
13806
|
+
addChildView(view: View, index?: number): void;
|
|
13807
|
+
/**
|
|
13808
|
+
* The bounds of this View, relative to its parent.
|
|
13809
|
+
*/
|
|
13810
|
+
getBounds(): Rectangle;
|
|
13811
|
+
removeChildView(view: View): void;
|
|
13812
|
+
/**
|
|
13813
|
+
* Examples of valid `color` values:
|
|
13814
|
+
*
|
|
13815
|
+
* * Hex
|
|
13816
|
+
* * `#fff` (RGB)
|
|
13817
|
+
* * `#ffff` (ARGB)
|
|
13818
|
+
* * `#ffffff` (RRGGBB)
|
|
13819
|
+
* * `#ffffffff` (AARRGGBB)
|
|
13820
|
+
* * RGB
|
|
13821
|
+
* * `rgb\(([\d]+),\s*([\d]+),\s*([\d]+)\)`
|
|
13822
|
+
* * e.g. `rgb(255, 255, 255)`
|
|
13823
|
+
* * RGBA
|
|
13824
|
+
* * `rgba\(([\d]+),\s*([\d]+),\s*([\d]+),\s*([\d.]+)\)`
|
|
13825
|
+
* * e.g. `rgba(255, 255, 255, 1.0)`
|
|
13826
|
+
* * HSL
|
|
13827
|
+
* * `hsl\((-?[\d.]+),\s*([\d.]+)%,\s*([\d.]+)%\)`
|
|
13828
|
+
* * e.g. `hsl(200, 20%, 50%)`
|
|
13829
|
+
* * HSLA
|
|
13830
|
+
* * `hsla\((-?[\d.]+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)`
|
|
13831
|
+
* * e.g. `hsla(200, 20%, 50%, 0.5)`
|
|
13832
|
+
* * Color name
|
|
13833
|
+
* * Options are listed in SkParseColor.cpp
|
|
13834
|
+
* * Similar to CSS Color Module Level 3 keywords, but case-sensitive.
|
|
13835
|
+
* * e.g. `blueviolet` or `red`
|
|
13836
|
+
*
|
|
13837
|
+
* **Note:** Hex format with alpha takes `AARRGGBB` or `ARGB`, _not_ `RRGGBBAA` or
|
|
13838
|
+
* `RGB`.
|
|
13839
|
+
*/
|
|
13840
|
+
setBackgroundColor(color: string): void;
|
|
13841
|
+
setBounds(bounds: Rectangle): void;
|
|
13842
|
+
setVisible(visible: boolean): void;
|
|
13843
|
+
/**
|
|
13844
|
+
* A `View[]` property representing the child views of this view.
|
|
13845
|
+
*
|
|
13846
|
+
*/
|
|
13847
|
+
readonly children: View[];
|
|
13848
|
+
}
|
|
13849
|
+
|
|
11680
13850
|
class WebContents extends NodeEventEmitter {
|
|
11681
13851
|
|
|
11682
13852
|
// Docs: https://electronjs.org/docs/api/web-contents
|
|
@@ -14227,6 +16397,31 @@ declare namespace Electron {
|
|
|
14227
16397
|
zoomLevel: number;
|
|
14228
16398
|
}
|
|
14229
16399
|
|
|
16400
|
+
class WebContentsView extends View {
|
|
16401
|
+
|
|
16402
|
+
// Docs: https://electronjs.org/docs/api/web-contents-view
|
|
16403
|
+
|
|
16404
|
+
/**
|
|
16405
|
+
* Emitted when the view's bounds have changed in response to being laid out. The
|
|
16406
|
+
* new bounds can be retrieved with `view.getBounds()`.
|
|
16407
|
+
*/
|
|
16408
|
+
on(event: 'bounds-changed', listener: Function): this;
|
|
16409
|
+
off(event: 'bounds-changed', listener: Function): this;
|
|
16410
|
+
once(event: 'bounds-changed', listener: Function): this;
|
|
16411
|
+
addListener(event: 'bounds-changed', listener: Function): this;
|
|
16412
|
+
removeListener(event: 'bounds-changed', listener: Function): this;
|
|
16413
|
+
/**
|
|
16414
|
+
* WebContentsView
|
|
16415
|
+
*/
|
|
16416
|
+
constructor(options?: WebContentsViewConstructorOptions);
|
|
16417
|
+
/**
|
|
16418
|
+
* A `WebContents` property containing a reference to the displayed `WebContents`.
|
|
16419
|
+
* Use this to interact with the `WebContents`, for instance to load a URL.
|
|
16420
|
+
*
|
|
16421
|
+
*/
|
|
16422
|
+
readonly webContents: WebContents;
|
|
16423
|
+
}
|
|
16424
|
+
|
|
14230
16425
|
interface WebFrame {
|
|
14231
16426
|
|
|
14232
16427
|
// Docs: https://electronjs.org/docs/api/web-frame
|
|
@@ -18474,6 +20669,27 @@ declare namespace Electron {
|
|
|
18474
20669
|
height?: number;
|
|
18475
20670
|
}
|
|
18476
20671
|
|
|
20672
|
+
interface TitleBarOverlayOptions {
|
|
20673
|
+
/**
|
|
20674
|
+
* The CSS color of the Window Controls Overlay when enabled.
|
|
20675
|
+
*
|
|
20676
|
+
* @platform win32
|
|
20677
|
+
*/
|
|
20678
|
+
color?: string;
|
|
20679
|
+
/**
|
|
20680
|
+
* The CSS color of the symbols on the Window Controls Overlay when enabled.
|
|
20681
|
+
*
|
|
20682
|
+
* @platform win32
|
|
20683
|
+
*/
|
|
20684
|
+
symbolColor?: string;
|
|
20685
|
+
/**
|
|
20686
|
+
* The height of the title bar and Window Controls Overlay in pixels.
|
|
20687
|
+
*
|
|
20688
|
+
* @platform win32
|
|
20689
|
+
*/
|
|
20690
|
+
height?: number;
|
|
20691
|
+
}
|
|
20692
|
+
|
|
18477
20693
|
interface TitleOptions {
|
|
18478
20694
|
/**
|
|
18479
20695
|
* The font family variant to display, can be `monospaced` or `monospacedDigit`.
|
|
@@ -18893,6 +21109,13 @@ declare namespace Electron {
|
|
|
18893
21109
|
pageSize?: (('A0' | 'A1' | 'A2' | 'A3' | 'A4' | 'A5' | 'A6' | 'Legal' | 'Letter' | 'Tabloid')) | (Size);
|
|
18894
21110
|
}
|
|
18895
21111
|
|
|
21112
|
+
interface WebContentsViewConstructorOptions {
|
|
21113
|
+
/**
|
|
21114
|
+
* Settings of web page's features.
|
|
21115
|
+
*/
|
|
21116
|
+
webPreferences?: WebPreferences;
|
|
21117
|
+
}
|
|
21118
|
+
|
|
18896
21119
|
interface WebContentsWillFrameNavigateEventParams {
|
|
18897
21120
|
/**
|
|
18898
21121
|
* The URL the frame is navigating to.
|
|
@@ -19541,6 +21764,7 @@ declare namespace Electron {
|
|
|
19541
21764
|
type Streams = Electron.Streams;
|
|
19542
21765
|
type SystemMemoryInfo = Electron.SystemMemoryInfo;
|
|
19543
21766
|
type TitleBarOverlay = Electron.TitleBarOverlay;
|
|
21767
|
+
type TitleBarOverlayOptions = Electron.TitleBarOverlayOptions;
|
|
19544
21768
|
type TitleOptions = Electron.TitleOptions;
|
|
19545
21769
|
type ToBitmapOptions = Electron.ToBitmapOptions;
|
|
19546
21770
|
type ToDataURLOptions = Electron.ToDataURLOptions;
|
|
@@ -19566,6 +21790,7 @@ declare namespace Electron {
|
|
|
19566
21790
|
type WebContentsDidRedirectNavigationEventParams = Electron.WebContentsDidRedirectNavigationEventParams;
|
|
19567
21791
|
type WebContentsDidStartNavigationEventParams = Electron.WebContentsDidStartNavigationEventParams;
|
|
19568
21792
|
type WebContentsPrintOptions = Electron.WebContentsPrintOptions;
|
|
21793
|
+
type WebContentsViewConstructorOptions = Electron.WebContentsViewConstructorOptions;
|
|
19569
21794
|
type WebContentsWillFrameNavigateEventParams = Electron.WebContentsWillFrameNavigateEventParams;
|
|
19570
21795
|
type WebContentsWillNavigateEventParams = Electron.WebContentsWillNavigateEventParams;
|
|
19571
21796
|
type WebContentsWillRedirectEventParams = Electron.WebContentsWillRedirectEventParams;
|
|
@@ -19583,6 +21808,7 @@ declare namespace Electron {
|
|
|
19583
21808
|
type PageRanges = Electron.PageRanges;
|
|
19584
21809
|
type Params = Electron.Params;
|
|
19585
21810
|
type Video = Electron.Video;
|
|
21811
|
+
type BaseWindowConstructorOptions = Electron.BaseWindowConstructorOptions;
|
|
19586
21812
|
type BrowserWindowConstructorOptions = Electron.BrowserWindowConstructorOptions;
|
|
19587
21813
|
type BluetoothDevice = Electron.BluetoothDevice;
|
|
19588
21814
|
type Certificate = Electron.Certificate;
|
|
@@ -19661,6 +21887,7 @@ declare namespace Electron {
|
|
|
19661
21887
|
type App = Electron.App;
|
|
19662
21888
|
const autoUpdater: AutoUpdater;
|
|
19663
21889
|
type AutoUpdater = Electron.AutoUpdater;
|
|
21890
|
+
class BaseWindow extends Electron.BaseWindow {}
|
|
19664
21891
|
class BrowserView extends Electron.BrowserView {}
|
|
19665
21892
|
class BrowserWindow extends Electron.BrowserWindow {}
|
|
19666
21893
|
type ClientRequest = Electron.ClientRequest;
|
|
@@ -19725,8 +21952,10 @@ declare namespace Electron {
|
|
|
19725
21952
|
class Tray extends Electron.Tray {}
|
|
19726
21953
|
const utilityProcess: typeof UtilityProcess;
|
|
19727
21954
|
type UtilityProcess = Electron.UtilityProcess;
|
|
21955
|
+
class View extends Electron.View {}
|
|
19728
21956
|
const webContents: typeof WebContents;
|
|
19729
21957
|
type WebContents = Electron.WebContents;
|
|
21958
|
+
class WebContentsView extends Electron.WebContentsView {}
|
|
19730
21959
|
const webFrameMain: typeof WebFrameMain;
|
|
19731
21960
|
type WebFrameMain = Electron.WebFrameMain;
|
|
19732
21961
|
type WebRequest = Electron.WebRequest;
|
|
@@ -19869,6 +22098,7 @@ declare namespace Electron {
|
|
|
19869
22098
|
type Streams = Electron.Streams;
|
|
19870
22099
|
type SystemMemoryInfo = Electron.SystemMemoryInfo;
|
|
19871
22100
|
type TitleBarOverlay = Electron.TitleBarOverlay;
|
|
22101
|
+
type TitleBarOverlayOptions = Electron.TitleBarOverlayOptions;
|
|
19872
22102
|
type TitleOptions = Electron.TitleOptions;
|
|
19873
22103
|
type ToBitmapOptions = Electron.ToBitmapOptions;
|
|
19874
22104
|
type ToDataURLOptions = Electron.ToDataURLOptions;
|
|
@@ -19894,6 +22124,7 @@ declare namespace Electron {
|
|
|
19894
22124
|
type WebContentsDidRedirectNavigationEventParams = Electron.WebContentsDidRedirectNavigationEventParams;
|
|
19895
22125
|
type WebContentsDidStartNavigationEventParams = Electron.WebContentsDidStartNavigationEventParams;
|
|
19896
22126
|
type WebContentsPrintOptions = Electron.WebContentsPrintOptions;
|
|
22127
|
+
type WebContentsViewConstructorOptions = Electron.WebContentsViewConstructorOptions;
|
|
19897
22128
|
type WebContentsWillFrameNavigateEventParams = Electron.WebContentsWillFrameNavigateEventParams;
|
|
19898
22129
|
type WebContentsWillNavigateEventParams = Electron.WebContentsWillNavigateEventParams;
|
|
19899
22130
|
type WebContentsWillRedirectEventParams = Electron.WebContentsWillRedirectEventParams;
|
|
@@ -19911,6 +22142,7 @@ declare namespace Electron {
|
|
|
19911
22142
|
type PageRanges = Electron.PageRanges;
|
|
19912
22143
|
type Params = Electron.Params;
|
|
19913
22144
|
type Video = Electron.Video;
|
|
22145
|
+
type BaseWindowConstructorOptions = Electron.BaseWindowConstructorOptions;
|
|
19914
22146
|
type BrowserWindowConstructorOptions = Electron.BrowserWindowConstructorOptions;
|
|
19915
22147
|
type BluetoothDevice = Electron.BluetoothDevice;
|
|
19916
22148
|
type Certificate = Electron.Certificate;
|
|
@@ -20133,6 +22365,7 @@ declare namespace Electron {
|
|
|
20133
22365
|
type Streams = Electron.Streams;
|
|
20134
22366
|
type SystemMemoryInfo = Electron.SystemMemoryInfo;
|
|
20135
22367
|
type TitleBarOverlay = Electron.TitleBarOverlay;
|
|
22368
|
+
type TitleBarOverlayOptions = Electron.TitleBarOverlayOptions;
|
|
20136
22369
|
type TitleOptions = Electron.TitleOptions;
|
|
20137
22370
|
type ToBitmapOptions = Electron.ToBitmapOptions;
|
|
20138
22371
|
type ToDataURLOptions = Electron.ToDataURLOptions;
|
|
@@ -20158,6 +22391,7 @@ declare namespace Electron {
|
|
|
20158
22391
|
type WebContentsDidRedirectNavigationEventParams = Electron.WebContentsDidRedirectNavigationEventParams;
|
|
20159
22392
|
type WebContentsDidStartNavigationEventParams = Electron.WebContentsDidStartNavigationEventParams;
|
|
20160
22393
|
type WebContentsPrintOptions = Electron.WebContentsPrintOptions;
|
|
22394
|
+
type WebContentsViewConstructorOptions = Electron.WebContentsViewConstructorOptions;
|
|
20161
22395
|
type WebContentsWillFrameNavigateEventParams = Electron.WebContentsWillFrameNavigateEventParams;
|
|
20162
22396
|
type WebContentsWillNavigateEventParams = Electron.WebContentsWillNavigateEventParams;
|
|
20163
22397
|
type WebContentsWillRedirectEventParams = Electron.WebContentsWillRedirectEventParams;
|
|
@@ -20175,6 +22409,7 @@ declare namespace Electron {
|
|
|
20175
22409
|
type PageRanges = Electron.PageRanges;
|
|
20176
22410
|
type Params = Electron.Params;
|
|
20177
22411
|
type Video = Electron.Video;
|
|
22412
|
+
type BaseWindowConstructorOptions = Electron.BaseWindowConstructorOptions;
|
|
20178
22413
|
type BrowserWindowConstructorOptions = Electron.BrowserWindowConstructorOptions;
|
|
20179
22414
|
type BluetoothDevice = Electron.BluetoothDevice;
|
|
20180
22415
|
type Certificate = Electron.Certificate;
|
|
@@ -20249,6 +22484,10 @@ declare namespace Electron {
|
|
|
20249
22484
|
|
|
20250
22485
|
namespace Utility {
|
|
20251
22486
|
type Event<Params extends object = {}> = Electron.Event<Params>;
|
|
22487
|
+
type ClientRequest = Electron.ClientRequest;
|
|
22488
|
+
type IncomingMessage = Electron.IncomingMessage;
|
|
22489
|
+
const net: Net;
|
|
22490
|
+
type Net = Electron.Net;
|
|
20252
22491
|
type AboutPanelOptionsOptions = Electron.AboutPanelOptionsOptions;
|
|
20253
22492
|
type AddRepresentationOptions = Electron.AddRepresentationOptions;
|
|
20254
22493
|
type AdjustSelectionOptions = Electron.AdjustSelectionOptions;
|
|
@@ -20388,6 +22627,7 @@ declare namespace Electron {
|
|
|
20388
22627
|
type Streams = Electron.Streams;
|
|
20389
22628
|
type SystemMemoryInfo = Electron.SystemMemoryInfo;
|
|
20390
22629
|
type TitleBarOverlay = Electron.TitleBarOverlay;
|
|
22630
|
+
type TitleBarOverlayOptions = Electron.TitleBarOverlayOptions;
|
|
20391
22631
|
type TitleOptions = Electron.TitleOptions;
|
|
20392
22632
|
type ToBitmapOptions = Electron.ToBitmapOptions;
|
|
20393
22633
|
type ToDataURLOptions = Electron.ToDataURLOptions;
|
|
@@ -20413,6 +22653,7 @@ declare namespace Electron {
|
|
|
20413
22653
|
type WebContentsDidRedirectNavigationEventParams = Electron.WebContentsDidRedirectNavigationEventParams;
|
|
20414
22654
|
type WebContentsDidStartNavigationEventParams = Electron.WebContentsDidStartNavigationEventParams;
|
|
20415
22655
|
type WebContentsPrintOptions = Electron.WebContentsPrintOptions;
|
|
22656
|
+
type WebContentsViewConstructorOptions = Electron.WebContentsViewConstructorOptions;
|
|
20416
22657
|
type WebContentsWillFrameNavigateEventParams = Electron.WebContentsWillFrameNavigateEventParams;
|
|
20417
22658
|
type WebContentsWillNavigateEventParams = Electron.WebContentsWillNavigateEventParams;
|
|
20418
22659
|
type WebContentsWillRedirectEventParams = Electron.WebContentsWillRedirectEventParams;
|
|
@@ -20430,6 +22671,7 @@ declare namespace Electron {
|
|
|
20430
22671
|
type PageRanges = Electron.PageRanges;
|
|
20431
22672
|
type Params = Electron.Params;
|
|
20432
22673
|
type Video = Electron.Video;
|
|
22674
|
+
type BaseWindowConstructorOptions = Electron.BaseWindowConstructorOptions;
|
|
20433
22675
|
type BrowserWindowConstructorOptions = Electron.BrowserWindowConstructorOptions;
|
|
20434
22676
|
type BluetoothDevice = Electron.BluetoothDevice;
|
|
20435
22677
|
type Certificate = Electron.Certificate;
|
|
@@ -20508,6 +22750,7 @@ declare namespace Electron {
|
|
|
20508
22750
|
type App = Electron.App;
|
|
20509
22751
|
const autoUpdater: AutoUpdater;
|
|
20510
22752
|
type AutoUpdater = Electron.AutoUpdater;
|
|
22753
|
+
class BaseWindow extends Electron.BaseWindow {}
|
|
20511
22754
|
class BrowserView extends Electron.BrowserView {}
|
|
20512
22755
|
class BrowserWindow extends Electron.BrowserWindow {}
|
|
20513
22756
|
type ClientRequest = Electron.ClientRequest;
|
|
@@ -20584,8 +22827,10 @@ declare namespace Electron {
|
|
|
20584
22827
|
class Tray extends Electron.Tray {}
|
|
20585
22828
|
const utilityProcess: typeof UtilityProcess;
|
|
20586
22829
|
type UtilityProcess = Electron.UtilityProcess;
|
|
22830
|
+
class View extends Electron.View {}
|
|
20587
22831
|
const webContents: typeof WebContents;
|
|
20588
22832
|
type WebContents = Electron.WebContents;
|
|
22833
|
+
class WebContentsView extends Electron.WebContentsView {}
|
|
20589
22834
|
const webFrame: WebFrame;
|
|
20590
22835
|
type WebFrame = Electron.WebFrame;
|
|
20591
22836
|
const webFrameMain: typeof WebFrameMain;
|
|
@@ -20733,6 +22978,7 @@ declare namespace Electron {
|
|
|
20733
22978
|
type Streams = Electron.Streams;
|
|
20734
22979
|
type SystemMemoryInfo = Electron.SystemMemoryInfo;
|
|
20735
22980
|
type TitleBarOverlay = Electron.TitleBarOverlay;
|
|
22981
|
+
type TitleBarOverlayOptions = Electron.TitleBarOverlayOptions;
|
|
20736
22982
|
type TitleOptions = Electron.TitleOptions;
|
|
20737
22983
|
type ToBitmapOptions = Electron.ToBitmapOptions;
|
|
20738
22984
|
type ToDataURLOptions = Electron.ToDataURLOptions;
|
|
@@ -20758,6 +23004,7 @@ declare namespace Electron {
|
|
|
20758
23004
|
type WebContentsDidRedirectNavigationEventParams = Electron.WebContentsDidRedirectNavigationEventParams;
|
|
20759
23005
|
type WebContentsDidStartNavigationEventParams = Electron.WebContentsDidStartNavigationEventParams;
|
|
20760
23006
|
type WebContentsPrintOptions = Electron.WebContentsPrintOptions;
|
|
23007
|
+
type WebContentsViewConstructorOptions = Electron.WebContentsViewConstructorOptions;
|
|
20761
23008
|
type WebContentsWillFrameNavigateEventParams = Electron.WebContentsWillFrameNavigateEventParams;
|
|
20762
23009
|
type WebContentsWillNavigateEventParams = Electron.WebContentsWillNavigateEventParams;
|
|
20763
23010
|
type WebContentsWillRedirectEventParams = Electron.WebContentsWillRedirectEventParams;
|
|
@@ -20775,6 +23022,7 @@ declare namespace Electron {
|
|
|
20775
23022
|
type PageRanges = Electron.PageRanges;
|
|
20776
23023
|
type Params = Electron.Params;
|
|
20777
23024
|
type Video = Electron.Video;
|
|
23025
|
+
type BaseWindowConstructorOptions = Electron.BaseWindowConstructorOptions;
|
|
20778
23026
|
type BrowserWindowConstructorOptions = Electron.BrowserWindowConstructorOptions;
|
|
20779
23027
|
type BluetoothDevice = Electron.BluetoothDevice;
|
|
20780
23028
|
type Certificate = Electron.Certificate;
|
|
@@ -20878,7 +23126,6 @@ declare namespace Electron {
|
|
|
20878
23126
|
const webFrame: WebFrame;
|
|
20879
23127
|
const webFrameMain: typeof WebFrameMain;
|
|
20880
23128
|
const webUtils: WebUtils;
|
|
20881
|
-
const Utility: {};
|
|
20882
23129
|
|
|
20883
23130
|
}
|
|
20884
23131
|
|