electron 29.1.0 → 30.0.0-alpha.2
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 +2626 -362
- package/package.json +1 -1
package/electron.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Type definitions for Electron
|
|
1
|
+
// Type definitions for Electron 30.0.0-alpha.2
|
|
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
|
|
@@ -1930,80 +1930,9 @@ declare namespace Electron {
|
|
|
1930
1930
|
setFeedURL(options: FeedURLOptions): void;
|
|
1931
1931
|
}
|
|
1932
1932
|
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
// Docs: https://electronjs.org/docs/api/structures/bluetooth-device
|
|
1936
|
-
|
|
1937
|
-
deviceId: string;
|
|
1938
|
-
deviceName: string;
|
|
1939
|
-
}
|
|
1940
|
-
|
|
1941
|
-
class BrowserView {
|
|
1942
|
-
|
|
1943
|
-
// Docs: https://electronjs.org/docs/api/browser-view
|
|
1944
|
-
|
|
1945
|
-
/**
|
|
1946
|
-
* BrowserView
|
|
1947
|
-
*/
|
|
1948
|
-
constructor(options?: BrowserViewConstructorOptions);
|
|
1949
|
-
/**
|
|
1950
|
-
* The `bounds` of this BrowserView instance as `Object`.
|
|
1951
|
-
*
|
|
1952
|
-
* @experimental
|
|
1953
|
-
*/
|
|
1954
|
-
getBounds(): Rectangle;
|
|
1955
|
-
/**
|
|
1956
|
-
* @experimental
|
|
1957
|
-
*/
|
|
1958
|
-
setAutoResize(options: AutoResizeOptions): void;
|
|
1959
|
-
/**
|
|
1960
|
-
* Examples of valid `color` values:
|
|
1961
|
-
*
|
|
1962
|
-
* * Hex
|
|
1963
|
-
* * #fff (RGB)
|
|
1964
|
-
* * #ffff (ARGB)
|
|
1965
|
-
* * #ffffff (RRGGBB)
|
|
1966
|
-
* * #ffffffff (AARRGGBB)
|
|
1967
|
-
* * RGB
|
|
1968
|
-
* * rgb(([\d]+),\s*([\d]+),\s*([\d]+))
|
|
1969
|
-
* * e.g. rgb(255, 255, 255)
|
|
1970
|
-
* * RGBA
|
|
1971
|
-
* * rgba(([\d]+),\s*([\d]+),\s*([\d]+),\s*([\d.]+))
|
|
1972
|
-
* * e.g. rgba(255, 255, 255, 1.0)
|
|
1973
|
-
* * HSL
|
|
1974
|
-
* * hsl((-?[\d.]+),\s*([\d.]+)%,\s*([\d.]+)%)
|
|
1975
|
-
* * e.g. hsl(200, 20%, 50%)
|
|
1976
|
-
* * HSLA
|
|
1977
|
-
* * hsla((-?[\d.]+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+))
|
|
1978
|
-
* * e.g. hsla(200, 20%, 50%, 0.5)
|
|
1979
|
-
* * Color name
|
|
1980
|
-
* * Options are listed in SkParseColor.cpp
|
|
1981
|
-
* * Similar to CSS Color Module Level 3 keywords, but case-sensitive.
|
|
1982
|
-
* * e.g. `blueviolet` or `red`
|
|
1983
|
-
*
|
|
1984
|
-
* **Note:** Hex format with alpha takes `AARRGGBB` or `ARGB`, _not_ `RRGGBBA` or
|
|
1985
|
-
* `RGA`.
|
|
1986
|
-
*
|
|
1987
|
-
* @experimental
|
|
1988
|
-
*/
|
|
1989
|
-
setBackgroundColor(color: string): void;
|
|
1990
|
-
/**
|
|
1991
|
-
* Resizes and moves the view to the supplied bounds relative to the window.
|
|
1992
|
-
*
|
|
1993
|
-
* @experimental
|
|
1994
|
-
*/
|
|
1995
|
-
setBounds(bounds: Rectangle): void;
|
|
1996
|
-
/**
|
|
1997
|
-
* A `WebContents` object owned by this view.
|
|
1998
|
-
*
|
|
1999
|
-
* @experimental
|
|
2000
|
-
*/
|
|
2001
|
-
webContents: WebContents;
|
|
2002
|
-
}
|
|
1933
|
+
class BaseWindow extends NodeEventEmitter {
|
|
2003
1934
|
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
// Docs: https://electronjs.org/docs/api/browser-window
|
|
1935
|
+
// Docs: https://electronjs.org/docs/api/base-window
|
|
2007
1936
|
|
|
2008
1937
|
/**
|
|
2009
1938
|
* Emitted when the window is set or unset to show always on top of other windows.
|
|
@@ -2102,14 +2031,6 @@ declare namespace Electron {
|
|
|
2102
2031
|
once(event: 'enter-full-screen', listener: Function): this;
|
|
2103
2032
|
addListener(event: 'enter-full-screen', listener: Function): this;
|
|
2104
2033
|
removeListener(event: 'enter-full-screen', listener: Function): this;
|
|
2105
|
-
/**
|
|
2106
|
-
* Emitted when the window enters a full-screen state triggered by HTML API.
|
|
2107
|
-
*/
|
|
2108
|
-
on(event: 'enter-html-full-screen', listener: Function): this;
|
|
2109
|
-
off(event: 'enter-html-full-screen', listener: Function): this;
|
|
2110
|
-
once(event: 'enter-html-full-screen', listener: Function): this;
|
|
2111
|
-
addListener(event: 'enter-html-full-screen', listener: Function): this;
|
|
2112
|
-
removeListener(event: 'enter-html-full-screen', listener: Function): this;
|
|
2113
2034
|
/**
|
|
2114
2035
|
* Emitted when the window gains focus.
|
|
2115
2036
|
*/
|
|
@@ -2134,14 +2055,6 @@ declare namespace Electron {
|
|
|
2134
2055
|
once(event: 'leave-full-screen', listener: Function): this;
|
|
2135
2056
|
addListener(event: 'leave-full-screen', listener: Function): this;
|
|
2136
2057
|
removeListener(event: 'leave-full-screen', listener: Function): this;
|
|
2137
|
-
/**
|
|
2138
|
-
* Emitted when the window leaves a full-screen state triggered by HTML API.
|
|
2139
|
-
*/
|
|
2140
|
-
on(event: 'leave-html-full-screen', listener: Function): this;
|
|
2141
|
-
off(event: 'leave-html-full-screen', listener: Function): this;
|
|
2142
|
-
once(event: 'leave-html-full-screen', listener: Function): this;
|
|
2143
|
-
addListener(event: 'leave-html-full-screen', listener: Function): this;
|
|
2144
|
-
removeListener(event: 'leave-html-full-screen', listener: Function): this;
|
|
2145
2058
|
/**
|
|
2146
2059
|
* Emitted when window is maximized.
|
|
2147
2060
|
*/
|
|
@@ -2212,39 +2125,6 @@ declare namespace Electron {
|
|
|
2212
2125
|
* @platform darwin
|
|
2213
2126
|
*/
|
|
2214
2127
|
removeListener(event: 'new-window-for-tab', listener: Function): this;
|
|
2215
|
-
/**
|
|
2216
|
-
* Emitted when the document changed its title, calling `event.preventDefault()`
|
|
2217
|
-
* will prevent the native window's title from changing. `explicitSet` is false
|
|
2218
|
-
* when title is synthesized from file URL.
|
|
2219
|
-
*/
|
|
2220
|
-
on(event: 'page-title-updated', listener: (event: Event,
|
|
2221
|
-
title: string,
|
|
2222
|
-
explicitSet: boolean) => void): this;
|
|
2223
|
-
off(event: 'page-title-updated', listener: (event: Event,
|
|
2224
|
-
title: string,
|
|
2225
|
-
explicitSet: boolean) => void): this;
|
|
2226
|
-
once(event: 'page-title-updated', listener: (event: Event,
|
|
2227
|
-
title: string,
|
|
2228
|
-
explicitSet: boolean) => void): this;
|
|
2229
|
-
addListener(event: 'page-title-updated', listener: (event: Event,
|
|
2230
|
-
title: string,
|
|
2231
|
-
explicitSet: boolean) => void): this;
|
|
2232
|
-
removeListener(event: 'page-title-updated', listener: (event: Event,
|
|
2233
|
-
title: string,
|
|
2234
|
-
explicitSet: boolean) => void): this;
|
|
2235
|
-
/**
|
|
2236
|
-
* Emitted when the web page has been rendered (while not being shown) and window
|
|
2237
|
-
* can be displayed without a visual flash.
|
|
2238
|
-
*
|
|
2239
|
-
* Please note that using this event implies that the renderer will be considered
|
|
2240
|
-
* "visible" and paint even though `show` is false. This event will never fire if
|
|
2241
|
-
* you use `paintWhenInitiallyHidden: false`
|
|
2242
|
-
*/
|
|
2243
|
-
on(event: 'ready-to-show', listener: Function): this;
|
|
2244
|
-
off(event: 'ready-to-show', listener: Function): this;
|
|
2245
|
-
once(event: 'ready-to-show', listener: Function): this;
|
|
2246
|
-
addListener(event: 'ready-to-show', listener: Function): this;
|
|
2247
|
-
removeListener(event: 'ready-to-show', listener: Function): this;
|
|
2248
2128
|
/**
|
|
2249
2129
|
* Emitted after the window has been resized.
|
|
2250
2130
|
*/
|
|
@@ -2279,14 +2159,6 @@ declare namespace Electron {
|
|
|
2279
2159
|
* @platform darwin,win32
|
|
2280
2160
|
*/
|
|
2281
2161
|
removeListener(event: 'resized', listener: Function): this;
|
|
2282
|
-
/**
|
|
2283
|
-
* Emitted when the unresponsive web page becomes responsive again.
|
|
2284
|
-
*/
|
|
2285
|
-
on(event: 'responsive', listener: Function): this;
|
|
2286
|
-
off(event: 'responsive', listener: Function): this;
|
|
2287
|
-
once(event: 'responsive', listener: Function): this;
|
|
2288
|
-
addListener(event: 'responsive', listener: Function): this;
|
|
2289
|
-
removeListener(event: 'responsive', listener: Function): this;
|
|
2290
2162
|
/**
|
|
2291
2163
|
* Emitted when the window is restored from a minimized state.
|
|
2292
2164
|
*/
|
|
@@ -2491,14 +2363,6 @@ declare namespace Electron {
|
|
|
2491
2363
|
once(event: 'unmaximize', listener: Function): this;
|
|
2492
2364
|
addListener(event: 'unmaximize', listener: Function): this;
|
|
2493
2365
|
removeListener(event: 'unmaximize', listener: Function): this;
|
|
2494
|
-
/**
|
|
2495
|
-
* Emitted when the web page becomes unresponsive.
|
|
2496
|
-
*/
|
|
2497
|
-
on(event: 'unresponsive', listener: Function): this;
|
|
2498
|
-
off(event: 'unresponsive', listener: Function): this;
|
|
2499
|
-
once(event: 'unresponsive', listener: Function): this;
|
|
2500
|
-
addListener(event: 'unresponsive', listener: Function): this;
|
|
2501
|
-
removeListener(event: 'unresponsive', listener: Function): this;
|
|
2502
2366
|
/**
|
|
2503
2367
|
* Emitted before the window is moved. On Windows, calling `event.preventDefault()`
|
|
2504
2368
|
* will prevent the window from being moved.
|
|
@@ -2606,58 +2470,31 @@ declare namespace Electron {
|
|
|
2606
2470
|
newBounds: Rectangle,
|
|
2607
2471
|
details: WillResizeDetails) => void): this;
|
|
2608
2472
|
/**
|
|
2609
|
-
*
|
|
2610
|
-
*/
|
|
2611
|
-
constructor(options?: BrowserWindowConstructorOptions);
|
|
2612
|
-
/**
|
|
2613
|
-
* The window that owns the given `browserView`. If the given view is not attached
|
|
2614
|
-
* to any window, returns `null`.
|
|
2473
|
+
* BaseWindow
|
|
2615
2474
|
*/
|
|
2616
|
-
|
|
2475
|
+
constructor(options?: BaseWindowConstructorOptions);
|
|
2617
2476
|
/**
|
|
2618
2477
|
* The window with the given `id`.
|
|
2619
2478
|
*/
|
|
2620
|
-
static fromId(id: number): (
|
|
2621
|
-
/**
|
|
2622
|
-
* The window that owns the given `webContents` or `null` if the contents are not
|
|
2623
|
-
* owned by a window.
|
|
2624
|
-
*/
|
|
2625
|
-
static fromWebContents(webContents: WebContents): (BrowserWindow) | (null);
|
|
2479
|
+
static fromId(id: number): (BaseWindow) | (null);
|
|
2626
2480
|
/**
|
|
2627
2481
|
* An array of all opened browser windows.
|
|
2628
2482
|
*/
|
|
2629
|
-
static getAllWindows():
|
|
2483
|
+
static getAllWindows(): BaseWindow[];
|
|
2630
2484
|
/**
|
|
2631
2485
|
* The window that is focused in this application, otherwise returns `null`.
|
|
2632
2486
|
*/
|
|
2633
|
-
static getFocusedWindow(): (
|
|
2634
|
-
/**
|
|
2635
|
-
* Replacement API for setBrowserView supporting work with multi browser views.
|
|
2636
|
-
*
|
|
2637
|
-
* @experimental
|
|
2638
|
-
*/
|
|
2639
|
-
addBrowserView(browserView: BrowserView): void;
|
|
2487
|
+
static getFocusedWindow(): (BaseWindow) | (null);
|
|
2640
2488
|
/**
|
|
2641
2489
|
* Adds a window as a tab on this window, after the tab for the window instance.
|
|
2642
2490
|
*
|
|
2643
2491
|
* @platform darwin
|
|
2644
2492
|
*/
|
|
2645
|
-
addTabbedWindow(
|
|
2493
|
+
addTabbedWindow(baseWindow: BaseWindow): void;
|
|
2646
2494
|
/**
|
|
2647
2495
|
* Removes focus from the window.
|
|
2648
2496
|
*/
|
|
2649
2497
|
blur(): void;
|
|
2650
|
-
blurWebView(): void;
|
|
2651
|
-
/**
|
|
2652
|
-
* Resolves with a NativeImage
|
|
2653
|
-
*
|
|
2654
|
-
* Captures a snapshot of the page within `rect`. Omitting `rect` will capture the
|
|
2655
|
-
* whole visible page. If the page is not visible, `rect` may be empty. The page is
|
|
2656
|
-
* considered visible when its browser window is hidden and the capturer count is
|
|
2657
|
-
* non-zero. If you would like the page to stay hidden, you should ensure that
|
|
2658
|
-
* `stayHidden` is set to true.
|
|
2659
|
-
*/
|
|
2660
|
-
capturePage(rect?: Rectangle, opts?: Opts): Promise<Electron.NativeImage>;
|
|
2661
2498
|
/**
|
|
2662
2499
|
* Moves window to the center of the screen.
|
|
2663
2500
|
*/
|
|
@@ -2688,7 +2525,6 @@ declare namespace Electron {
|
|
|
2688
2525
|
* Focuses on the window.
|
|
2689
2526
|
*/
|
|
2690
2527
|
focus(): void;
|
|
2691
|
-
focusOnWebView(): void;
|
|
2692
2528
|
/**
|
|
2693
2529
|
* Gets the background color of the window in Hex (`#RRGGBB`) format.
|
|
2694
2530
|
*
|
|
@@ -2707,28 +2543,10 @@ declare namespace Electron {
|
|
|
2707
2543
|
* 25, y: 38, width: 800, height: 600 }`.
|
|
2708
2544
|
*/
|
|
2709
2545
|
getBounds(): Rectangle;
|
|
2710
|
-
/**
|
|
2711
|
-
* The `BrowserView` attached to `win`. Returns `null` if one is not attached.
|
|
2712
|
-
* Throws an error if multiple `BrowserView`s are attached.
|
|
2713
|
-
*
|
|
2714
|
-
* @experimental
|
|
2715
|
-
*/
|
|
2716
|
-
getBrowserView(): (BrowserView) | (null);
|
|
2717
|
-
/**
|
|
2718
|
-
* a sorted by z-index array of all BrowserViews that have been attached with
|
|
2719
|
-
* `addBrowserView` or `setBrowserView`. The top-most BrowserView is the last
|
|
2720
|
-
* element of the array.
|
|
2721
|
-
*
|
|
2722
|
-
* **Note:** The BrowserView API is currently experimental and may change or be
|
|
2723
|
-
* removed in future Electron releases.
|
|
2724
|
-
*
|
|
2725
|
-
* @experimental
|
|
2726
|
-
*/
|
|
2727
|
-
getBrowserViews(): BrowserView[];
|
|
2728
2546
|
/**
|
|
2729
2547
|
* All child windows.
|
|
2730
2548
|
*/
|
|
2731
|
-
getChildWindows():
|
|
2549
|
+
getChildWindows(): BaseWindow[];
|
|
2732
2550
|
/**
|
|
2733
2551
|
* The `bounds` of the window's client area as `Object`.
|
|
2734
2552
|
*/
|
|
@@ -2737,6 +2555,10 @@ declare namespace Electron {
|
|
|
2737
2555
|
* Contains the window's client area's width and height.
|
|
2738
2556
|
*/
|
|
2739
2557
|
getContentSize(): number[];
|
|
2558
|
+
/**
|
|
2559
|
+
* Returns View - The content view of the window.
|
|
2560
|
+
*/
|
|
2561
|
+
getContentView(): void;
|
|
2740
2562
|
/**
|
|
2741
2563
|
* Contains the window's maximum width and height.
|
|
2742
2564
|
*/
|
|
@@ -2779,7 +2601,7 @@ declare namespace Electron {
|
|
|
2779
2601
|
/**
|
|
2780
2602
|
* The parent window or `null` if there is no parent.
|
|
2781
2603
|
*/
|
|
2782
|
-
getParentWindow(): (
|
|
2604
|
+
getParentWindow(): (BaseWindow) | (null);
|
|
2783
2605
|
/**
|
|
2784
2606
|
* Contains the window's current position.
|
|
2785
2607
|
*/
|
|
@@ -2827,9 +2649,9 @@ declare namespace Electron {
|
|
|
2827
2649
|
* Invalidates the window shadow so that it is recomputed based on the current
|
|
2828
2650
|
* window shape.
|
|
2829
2651
|
*
|
|
2830
|
-
* `
|
|
2831
|
-
*
|
|
2832
|
-
*
|
|
2652
|
+
* `BaseWindow`s that are transparent can sometimes leave behind visual artifacts
|
|
2653
|
+
* on macOS. This method can be used to clear these artifacts when, for example,
|
|
2654
|
+
* performing an animation.
|
|
2833
2655
|
*
|
|
2834
2656
|
* @platform darwin
|
|
2835
2657
|
*/
|
|
@@ -2983,31 +2805,6 @@ declare namespace Electron {
|
|
|
2983
2805
|
* @platform win32
|
|
2984
2806
|
*/
|
|
2985
2807
|
isWindowMessageHooked(message: number): boolean;
|
|
2986
|
-
/**
|
|
2987
|
-
* the promise will resolve when the page has finished loading (see
|
|
2988
|
-
* `did-finish-load`), and rejects if the page fails to load (see `did-fail-load`).
|
|
2989
|
-
*
|
|
2990
|
-
* Same as `webContents.loadFile`, `filePath` should be a path to an HTML file
|
|
2991
|
-
* relative to the root of your application. See the `webContents` docs for more
|
|
2992
|
-
* information.
|
|
2993
|
-
*/
|
|
2994
|
-
loadFile(filePath: string, options?: LoadFileOptions): Promise<void>;
|
|
2995
|
-
/**
|
|
2996
|
-
* the promise will resolve when the page has finished loading (see
|
|
2997
|
-
* `did-finish-load`), and rejects if the page fails to load (see `did-fail-load`).
|
|
2998
|
-
*
|
|
2999
|
-
* Same as `webContents.loadURL(url[, options])`.
|
|
3000
|
-
*
|
|
3001
|
-
* The `url` can be a remote address (e.g. `http://`) or a path to a local HTML
|
|
3002
|
-
* file using the `file://` protocol.
|
|
3003
|
-
*
|
|
3004
|
-
* To ensure that file URLs are properly formatted, it is recommended to use Node's
|
|
3005
|
-
* `url.format` method:
|
|
3006
|
-
*
|
|
3007
|
-
* You can load a URL using a `POST` request with URL-encoded data by doing the
|
|
3008
|
-
* following:
|
|
3009
|
-
*/
|
|
3010
|
-
loadURL(url: string, options?: LoadURLOptions): Promise<void>;
|
|
3011
2808
|
/**
|
|
3012
2809
|
* Maximizes the window. This will also show (but not focus) the window if it isn't
|
|
3013
2810
|
* being displayed already.
|
|
@@ -3048,14 +2845,6 @@ declare namespace Electron {
|
|
|
3048
2845
|
* @platform darwin
|
|
3049
2846
|
*/
|
|
3050
2847
|
previewFile(path: string, displayName?: string): void;
|
|
3051
|
-
/**
|
|
3052
|
-
* Same as `webContents.reload`.
|
|
3053
|
-
*/
|
|
3054
|
-
reload(): void;
|
|
3055
|
-
/**
|
|
3056
|
-
* @experimental
|
|
3057
|
-
*/
|
|
3058
|
-
removeBrowserView(browserView: BrowserView): void;
|
|
3059
2848
|
/**
|
|
3060
2849
|
* Remove the window's menu bar.
|
|
3061
2850
|
*
|
|
@@ -3142,16 +2931,16 @@ declare namespace Electron {
|
|
|
3142
2931
|
* * #ffffff (RGB)
|
|
3143
2932
|
* * #ffffffff (ARGB)
|
|
3144
2933
|
* * RGB
|
|
3145
|
-
* * rgb(([\d]+),\s*([\d]+),\s*([\d]+))
|
|
2934
|
+
* * `rgb\(([\d]+),\s*([\d]+),\s*([\d]+)\)`
|
|
3146
2935
|
* * e.g. rgb(255, 255, 255)
|
|
3147
2936
|
* * RGBA
|
|
3148
|
-
* * rgba(([\d]+),\s*([\d]+),\s*([\d]+),\s*([\d.]+))
|
|
2937
|
+
* * `rgba\(([\d]+),\s*([\d]+),\s*([\d]+),\s*([\d.]+)\)`
|
|
3149
2938
|
* * e.g. rgba(255, 255, 255, 1.0)
|
|
3150
2939
|
* * HSL
|
|
3151
|
-
* * hsl((-?[\d.]+),\s*([\d.]+)%,\s*([\d.]+)
|
|
2940
|
+
* * `hsl\((-?[\d.]+),\s*([\d.]+)%,\s*([\d.]+)%\)`
|
|
3152
2941
|
* * e.g. hsl(200, 20%, 50%)
|
|
3153
2942
|
* * HSLA
|
|
3154
|
-
* * hsla((-?[\d.]+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+))
|
|
2943
|
+
* * `hsla\((-?[\d.]+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)`
|
|
3155
2944
|
* * e.g. hsla(200, 20%, 50%, 0.5)
|
|
3156
2945
|
* * Color name
|
|
3157
2946
|
* * Options are listed in SkParseColor.cpp
|
|
@@ -3182,10 +2971,6 @@ declare namespace Electron {
|
|
|
3182
2971
|
* result in a window that is flush to the tray.
|
|
3183
2972
|
*/
|
|
3184
2973
|
setBounds(bounds: Partial<Rectangle>, animate?: boolean): void;
|
|
3185
|
-
/**
|
|
3186
|
-
* @experimental
|
|
3187
|
-
*/
|
|
3188
|
-
setBrowserView(browserView: (BrowserView) | (null)): void;
|
|
3189
2974
|
/**
|
|
3190
2975
|
* Sets whether the window can be manually closed by user. On Linux does nothing.
|
|
3191
2976
|
*
|
|
@@ -3212,6 +2997,10 @@ declare namespace Electron {
|
|
|
3212
2997
|
* Resizes the window's client area (e.g. the web page) to `width` and `height`.
|
|
3213
2998
|
*/
|
|
3214
2999
|
setContentSize(width: number, height: number, animate?: boolean): void;
|
|
3000
|
+
/**
|
|
3001
|
+
* Sets the content view of the window.
|
|
3002
|
+
*/
|
|
3003
|
+
setContentView(view: View): void;
|
|
3215
3004
|
/**
|
|
3216
3005
|
* Specifies whether the window’s document has been edited, and the icon in title
|
|
3217
3006
|
* bar will become gray when set to `true`.
|
|
@@ -3331,7 +3120,7 @@ declare namespace Electron {
|
|
|
3331
3120
|
* Sets `parent` as current window's parent window, passing `null` will turn
|
|
3332
3121
|
* current window into a top-level window.
|
|
3333
3122
|
*/
|
|
3334
|
-
setParentWindow(parent: (
|
|
3123
|
+
setParentWindow(parent: (BaseWindow) | (null)): void;
|
|
3335
3124
|
/**
|
|
3336
3125
|
* Moves window to `x` and `y`.
|
|
3337
3126
|
*/
|
|
@@ -3464,14 +3253,7 @@ declare namespace Electron {
|
|
|
3464
3253
|
*
|
|
3465
3254
|
* @platform win32
|
|
3466
3255
|
*/
|
|
3467
|
-
setTitleBarOverlay(options:
|
|
3468
|
-
/**
|
|
3469
|
-
* Raises `browserView` above other `BrowserView`s attached to `win`. Throws an
|
|
3470
|
-
* error if `browserView` is not attached to `win`.
|
|
3471
|
-
*
|
|
3472
|
-
* @experimental
|
|
3473
|
-
*/
|
|
3474
|
-
setTopBrowserView(browserView: BrowserView): void;
|
|
3256
|
+
setTitleBarOverlay(options: TitleBarOverlayOptions): void;
|
|
3475
3257
|
/**
|
|
3476
3258
|
* Sets the touchBar layout for the current window. Specifying `null` or
|
|
3477
3259
|
* `undefined` clears the touch bar. This method only has an effect if the machine
|
|
@@ -3484,8 +3266,8 @@ declare namespace Electron {
|
|
|
3484
3266
|
*/
|
|
3485
3267
|
setTouchBar(touchBar: (TouchBar) | (null)): void;
|
|
3486
3268
|
/**
|
|
3487
|
-
* Adds a vibrancy effect to the
|
|
3488
|
-
*
|
|
3269
|
+
* Adds a vibrancy effect to the window. Passing `null` or an empty string will
|
|
3270
|
+
* remove the vibrancy effect on the window.
|
|
3489
3271
|
*
|
|
3490
3272
|
* @platform darwin
|
|
3491
3273
|
*/
|
|
@@ -3521,12 +3303,6 @@ declare namespace Electron {
|
|
|
3521
3303
|
* @platform darwin
|
|
3522
3304
|
*/
|
|
3523
3305
|
showAllTabs(): void;
|
|
3524
|
-
/**
|
|
3525
|
-
* Same as `webContents.showDefinitionForSelection()`.
|
|
3526
|
-
*
|
|
3527
|
-
* @platform darwin
|
|
3528
|
-
*/
|
|
3529
|
-
showDefinitionForSelection(): void;
|
|
3530
3306
|
/**
|
|
3531
3307
|
* Shows the window but doesn't focus on it.
|
|
3532
3308
|
*/
|
|
@@ -3578,6 +3354,10 @@ declare namespace Electron {
|
|
|
3578
3354
|
* @platform darwin,win32
|
|
3579
3355
|
*/
|
|
3580
3356
|
closable: boolean;
|
|
3357
|
+
/**
|
|
3358
|
+
* A `View` property for the content view of the window.
|
|
3359
|
+
*/
|
|
3360
|
+
contentView: View;
|
|
3581
3361
|
/**
|
|
3582
3362
|
* A `boolean` property that specifies whether the window’s document has been
|
|
3583
3363
|
* edited.
|
|
@@ -3611,7 +3391,7 @@ declare namespace Electron {
|
|
|
3611
3391
|
fullScreenable: boolean;
|
|
3612
3392
|
/**
|
|
3613
3393
|
* A `Integer` property representing the unique ID of the window. Each ID is unique
|
|
3614
|
-
* among all `
|
|
3394
|
+
* among all `BaseWindow` instances of the entire Electron application.
|
|
3615
3395
|
*
|
|
3616
3396
|
*/
|
|
3617
3397
|
readonly id: number;
|
|
@@ -3698,19 +3478,11 @@ declare namespace Electron {
|
|
|
3698
3478
|
* @platform darwin,linux
|
|
3699
3479
|
*/
|
|
3700
3480
|
visibleOnAllWorkspaces: boolean;
|
|
3701
|
-
/**
|
|
3702
|
-
* A `WebContents` object this window owns. All web page related events and
|
|
3703
|
-
* operations will be done via it.
|
|
3704
|
-
*
|
|
3705
|
-
* See the `webContents` documentation for its methods and events.
|
|
3706
|
-
*
|
|
3707
|
-
*/
|
|
3708
|
-
readonly webContents: WebContents;
|
|
3709
3481
|
}
|
|
3710
3482
|
|
|
3711
|
-
interface
|
|
3483
|
+
interface BaseWindowConstructorOptions {
|
|
3712
3484
|
|
|
3713
|
-
// Docs: https://electronjs.org/docs/api/structures/
|
|
3485
|
+
// Docs: https://electronjs.org/docs/api/structures/base-window-options
|
|
3714
3486
|
|
|
3715
3487
|
/**
|
|
3716
3488
|
* Whether clicking an inactive window will also click through to the web contents.
|
|
@@ -3851,157 +3623,2507 @@ declare namespace Electron {
|
|
|
3851
3623
|
*/
|
|
3852
3624
|
modal?: boolean;
|
|
3853
3625
|
/**
|
|
3854
|
-
* Whether window is movable. This is not implemented on Linux. Default is `true`.
|
|
3626
|
+
* Whether window is movable. This is not implemented on Linux. Default is `true`.
|
|
3627
|
+
*
|
|
3628
|
+
* @platform darwin,win32
|
|
3629
|
+
*/
|
|
3630
|
+
movable?: boolean;
|
|
3631
|
+
/**
|
|
3632
|
+
* Set the initial opacity of the window, between 0.0 (fully transparent) and 1.0
|
|
3633
|
+
* (fully opaque). This is only implemented on Windows and macOS.
|
|
3634
|
+
*
|
|
3635
|
+
* @platform darwin,win32
|
|
3636
|
+
*/
|
|
3637
|
+
opacity?: number;
|
|
3638
|
+
/**
|
|
3639
|
+
* Specify parent window. Default is `null`.
|
|
3640
|
+
*/
|
|
3641
|
+
parent?: BaseWindow;
|
|
3642
|
+
/**
|
|
3643
|
+
* Whether window is resizable. Default is `true`.
|
|
3644
|
+
*/
|
|
3645
|
+
resizable?: boolean;
|
|
3646
|
+
/**
|
|
3647
|
+
* Whether frameless window should have rounded corners on macOS. Default is
|
|
3648
|
+
* `true`. Setting this property to `false` will prevent the window from being
|
|
3649
|
+
* fullscreenable.
|
|
3650
|
+
*
|
|
3651
|
+
* @platform darwin
|
|
3652
|
+
*/
|
|
3653
|
+
roundedCorners?: boolean;
|
|
3654
|
+
/**
|
|
3655
|
+
* Whether window should be shown when created. Default is `true`.
|
|
3656
|
+
*/
|
|
3657
|
+
show?: boolean;
|
|
3658
|
+
/**
|
|
3659
|
+
* Use pre-Lion fullscreen on macOS. Default is `false`.
|
|
3660
|
+
*
|
|
3661
|
+
* @platform darwin
|
|
3662
|
+
*/
|
|
3663
|
+
simpleFullscreen?: boolean;
|
|
3664
|
+
/**
|
|
3665
|
+
* Whether to show the window in taskbar. Default is `false`.
|
|
3666
|
+
*
|
|
3667
|
+
* @platform darwin,win32
|
|
3668
|
+
*/
|
|
3669
|
+
skipTaskbar?: boolean;
|
|
3670
|
+
/**
|
|
3671
|
+
* Tab group name, allows opening the window as a native tab. Windows with the same
|
|
3672
|
+
* tabbing identifier will be grouped together. This also adds a native new tab
|
|
3673
|
+
* button to your window's tab bar and allows your `app` and window to receive the
|
|
3674
|
+
* `new-window-for-tab` event.
|
|
3675
|
+
*
|
|
3676
|
+
* @platform darwin
|
|
3677
|
+
*/
|
|
3678
|
+
tabbingIdentifier?: string;
|
|
3679
|
+
/**
|
|
3680
|
+
* Use `WS_THICKFRAME` style for frameless windows on Windows, which adds standard
|
|
3681
|
+
* window frame. Setting it to `false` will remove window shadow and window
|
|
3682
|
+
* animations. Default is `true`.
|
|
3683
|
+
*/
|
|
3684
|
+
thickFrame?: boolean;
|
|
3685
|
+
/**
|
|
3686
|
+
* Default window title. Default is `"Electron"`. If the HTML tag `<title>` is
|
|
3687
|
+
* defined in the HTML file loaded by `loadURL()`, this property will be ignored.
|
|
3688
|
+
*/
|
|
3689
|
+
title?: string;
|
|
3690
|
+
/**
|
|
3691
|
+
* The style of window title bar. Default is `default`. Possible values are:
|
|
3692
|
+
*
|
|
3693
|
+
* @platform darwin,win32
|
|
3694
|
+
*/
|
|
3695
|
+
titleBarStyle?: ('default' | 'hidden' | 'hiddenInset' | 'customButtonsOnHover');
|
|
3696
|
+
/**
|
|
3697
|
+
* Set a custom position for the traffic light buttons in frameless windows.
|
|
3698
|
+
*
|
|
3699
|
+
* @platform darwin
|
|
3700
|
+
*/
|
|
3701
|
+
trafficLightPosition?: Point;
|
|
3702
|
+
/**
|
|
3703
|
+
* Makes the window transparent. Default is `false`. On Windows, does not work
|
|
3704
|
+
* unless the window is frameless.
|
|
3705
|
+
*/
|
|
3706
|
+
transparent?: boolean;
|
|
3707
|
+
/**
|
|
3708
|
+
* The type of window, default is normal window. See more about this below.
|
|
3709
|
+
*/
|
|
3710
|
+
type?: string;
|
|
3711
|
+
/**
|
|
3712
|
+
* The `width` and `height` would be used as web page's size, which means the
|
|
3713
|
+
* actual window's size will include window frame's size and be slightly larger.
|
|
3714
|
+
* Default is `false`.
|
|
3715
|
+
*/
|
|
3716
|
+
useContentSize?: boolean;
|
|
3717
|
+
/**
|
|
3718
|
+
* Add a type of vibrancy effect to the window, only on macOS. Can be
|
|
3719
|
+
* `appearance-based`, `titlebar`, `selection`, `menu`, `popover`, `sidebar`,
|
|
3720
|
+
* `header`, `sheet`, `window`, `hud`, `fullscreen-ui`, `tooltip`, `content`,
|
|
3721
|
+
* `under-window`, or `under-page`.
|
|
3722
|
+
*
|
|
3723
|
+
* @platform darwin
|
|
3724
|
+
*/
|
|
3725
|
+
vibrancy?: ('appearance-based' | 'titlebar' | 'selection' | 'menu' | 'popover' | 'sidebar' | 'header' | 'sheet' | 'window' | 'hud' | 'fullscreen-ui' | 'tooltip' | 'content' | 'under-window' | 'under-page');
|
|
3726
|
+
/**
|
|
3727
|
+
* Specify how the material appearance should reflect window activity state on
|
|
3728
|
+
* macOS. Must be used with the `vibrancy` property. Possible values are:
|
|
3729
|
+
*
|
|
3730
|
+
* @platform darwin
|
|
3731
|
+
*/
|
|
3732
|
+
visualEffectState?: ('followWindow' | 'active' | 'inactive');
|
|
3733
|
+
/**
|
|
3734
|
+
* Window's width in pixels. Default is `800`.
|
|
3735
|
+
*/
|
|
3736
|
+
width?: number;
|
|
3737
|
+
/**
|
|
3738
|
+
* (**required** if y is used) Window's left offset from screen. Default is to
|
|
3739
|
+
* center the window.
|
|
3740
|
+
*/
|
|
3741
|
+
x?: number;
|
|
3742
|
+
/**
|
|
3743
|
+
* (**required** if x is used) Window's top offset from screen. Default is to
|
|
3744
|
+
* center the window.
|
|
3745
|
+
*/
|
|
3746
|
+
y?: number;
|
|
3747
|
+
/**
|
|
3748
|
+
* Controls the behavior on macOS when option-clicking the green stoplight button
|
|
3749
|
+
* on the toolbar or by clicking the Window > Zoom menu item. If `true`, the window
|
|
3750
|
+
* will grow to the preferred width of the web page when zoomed, `false` will cause
|
|
3751
|
+
* it to zoom to the width of the screen. This will also affect the behavior when
|
|
3752
|
+
* calling `maximize()` directly. Default is `false`.
|
|
3753
|
+
*
|
|
3754
|
+
* @platform darwin
|
|
3755
|
+
*/
|
|
3756
|
+
zoomToPageWidth?: boolean;
|
|
3757
|
+
}
|
|
3758
|
+
|
|
3759
|
+
interface BluetoothDevice {
|
|
3760
|
+
|
|
3761
|
+
// Docs: https://electronjs.org/docs/api/structures/bluetooth-device
|
|
3762
|
+
|
|
3763
|
+
deviceId: string;
|
|
3764
|
+
deviceName: string;
|
|
3765
|
+
}
|
|
3766
|
+
|
|
3767
|
+
class BrowserView {
|
|
3768
|
+
|
|
3769
|
+
// Docs: https://electronjs.org/docs/api/browser-view
|
|
3770
|
+
|
|
3771
|
+
/**
|
|
3772
|
+
* BrowserView
|
|
3773
|
+
*/
|
|
3774
|
+
constructor(options?: BrowserViewConstructorOptions);
|
|
3775
|
+
/**
|
|
3776
|
+
* The `bounds` of this BrowserView instance as `Object`.
|
|
3777
|
+
*
|
|
3778
|
+
* @experimental
|
|
3779
|
+
* @deprecated
|
|
3780
|
+
*/
|
|
3781
|
+
getBounds(): Rectangle;
|
|
3782
|
+
/**
|
|
3783
|
+
* @experimental
|
|
3784
|
+
* @deprecated
|
|
3785
|
+
*/
|
|
3786
|
+
setAutoResize(options: AutoResizeOptions): void;
|
|
3787
|
+
/**
|
|
3788
|
+
* Examples of valid `color` values:
|
|
3789
|
+
*
|
|
3790
|
+
* * Hex
|
|
3791
|
+
* * `#fff` (RGB)
|
|
3792
|
+
* * `#ffff` (ARGB)
|
|
3793
|
+
* * `#ffffff` (RRGGBB)
|
|
3794
|
+
* * `#ffffffff` (AARRGGBB)
|
|
3795
|
+
* * RGB
|
|
3796
|
+
* * `rgb\(([\d]+),\s*([\d]+),\s*([\d]+)\)`
|
|
3797
|
+
* * e.g. `rgb(255, 255, 255)`
|
|
3798
|
+
* * RGBA
|
|
3799
|
+
* * `rgba\(([\d]+),\s*([\d]+),\s*([\d]+),\s*([\d.]+)\)`
|
|
3800
|
+
* * e.g. `rgba(255, 255, 255, 1.0)`
|
|
3801
|
+
* * HSL
|
|
3802
|
+
* * `hsl\((-?[\d.]+),\s*([\d.]+)%,\s*([\d.]+)%\)`
|
|
3803
|
+
* * e.g. `hsl(200, 20%, 50%)`
|
|
3804
|
+
* * HSLA
|
|
3805
|
+
* * `hsla\((-?[\d.]+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)`
|
|
3806
|
+
* * e.g. `hsla(200, 20%, 50%, 0.5)`
|
|
3807
|
+
* * Color name
|
|
3808
|
+
* * Options are listed in SkParseColor.cpp
|
|
3809
|
+
* * Similar to CSS Color Module Level 3 keywords, but case-sensitive.
|
|
3810
|
+
* * e.g. `blueviolet` or `red`
|
|
3811
|
+
*
|
|
3812
|
+
* **Note:** Hex format with alpha takes `AARRGGBB` or `ARGB`, _not_ `RRGGBBAA` or
|
|
3813
|
+
* `RGB`.
|
|
3814
|
+
*
|
|
3815
|
+
* @experimental
|
|
3816
|
+
* @deprecated
|
|
3817
|
+
*/
|
|
3818
|
+
setBackgroundColor(color: string): void;
|
|
3819
|
+
/**
|
|
3820
|
+
* Resizes and moves the view to the supplied bounds relative to the window.
|
|
3821
|
+
*
|
|
3822
|
+
* @experimental
|
|
3823
|
+
* @deprecated
|
|
3824
|
+
*/
|
|
3825
|
+
setBounds(bounds: Rectangle): void;
|
|
3826
|
+
/**
|
|
3827
|
+
* A `WebContents` object owned by this view.
|
|
3828
|
+
*
|
|
3829
|
+
* @experimental
|
|
3830
|
+
* @deprecated
|
|
3831
|
+
*/
|
|
3832
|
+
webContents: WebContents;
|
|
3833
|
+
}
|
|
3834
|
+
|
|
3835
|
+
class BrowserWindow extends BaseWindow {
|
|
3836
|
+
|
|
3837
|
+
// Docs: https://electronjs.org/docs/api/browser-window
|
|
3838
|
+
|
|
3839
|
+
/**
|
|
3840
|
+
* Emitted when the window is set or unset to show always on top of other windows.
|
|
3841
|
+
*/
|
|
3842
|
+
on(event: 'always-on-top-changed', listener: (event: Event,
|
|
3843
|
+
isAlwaysOnTop: boolean) => void): this;
|
|
3844
|
+
off(event: 'always-on-top-changed', listener: (event: Event,
|
|
3845
|
+
isAlwaysOnTop: boolean) => void): this;
|
|
3846
|
+
once(event: 'always-on-top-changed', listener: (event: Event,
|
|
3847
|
+
isAlwaysOnTop: boolean) => void): this;
|
|
3848
|
+
addListener(event: 'always-on-top-changed', listener: (event: Event,
|
|
3849
|
+
isAlwaysOnTop: boolean) => void): this;
|
|
3850
|
+
removeListener(event: 'always-on-top-changed', listener: (event: Event,
|
|
3851
|
+
isAlwaysOnTop: boolean) => void): this;
|
|
3852
|
+
/**
|
|
3853
|
+
* Emitted when the window is set or unset to show always on top of other windows.
|
|
3854
|
+
*/
|
|
3855
|
+
on(event: 'always-on-top-changed', listener: (event: Event,
|
|
3856
|
+
isAlwaysOnTop: boolean) => void): this;
|
|
3857
|
+
off(event: 'always-on-top-changed', listener: (event: Event,
|
|
3858
|
+
isAlwaysOnTop: boolean) => void): this;
|
|
3859
|
+
once(event: 'always-on-top-changed', listener: (event: Event,
|
|
3860
|
+
isAlwaysOnTop: boolean) => void): this;
|
|
3861
|
+
addListener(event: 'always-on-top-changed', listener: (event: Event,
|
|
3862
|
+
isAlwaysOnTop: boolean) => void): this;
|
|
3863
|
+
removeListener(event: 'always-on-top-changed', listener: (event: Event,
|
|
3864
|
+
isAlwaysOnTop: boolean) => void): this;
|
|
3865
|
+
/**
|
|
3866
|
+
* Emitted when an App Command is invoked. These are typically related to keyboard
|
|
3867
|
+
* media keys or browser commands, as well as the "Back" button built into some
|
|
3868
|
+
* mice on Windows.
|
|
3869
|
+
*
|
|
3870
|
+
* Commands are lowercased, underscores are replaced with hyphens, and the
|
|
3871
|
+
* `APPCOMMAND_` prefix is stripped off. e.g. `APPCOMMAND_BROWSER_BACKWARD` is
|
|
3872
|
+
* emitted as `browser-backward`.
|
|
3873
|
+
*
|
|
3874
|
+
* The following app commands are explicitly supported on Linux:
|
|
3875
|
+
*
|
|
3876
|
+
* * `browser-backward`
|
|
3877
|
+
* * `browser-forward`
|
|
3878
|
+
*
|
|
3879
|
+
* @platform win32,linux
|
|
3880
|
+
*/
|
|
3881
|
+
on(event: 'app-command', listener: (event: Event,
|
|
3882
|
+
command: string) => void): this;
|
|
3883
|
+
/**
|
|
3884
|
+
* @platform win32,linux
|
|
3885
|
+
*/
|
|
3886
|
+
off(event: 'app-command', listener: (event: Event,
|
|
3887
|
+
command: string) => void): this;
|
|
3888
|
+
/**
|
|
3889
|
+
* @platform win32,linux
|
|
3890
|
+
*/
|
|
3891
|
+
once(event: 'app-command', listener: (event: Event,
|
|
3892
|
+
command: string) => void): this;
|
|
3893
|
+
/**
|
|
3894
|
+
* @platform win32,linux
|
|
3895
|
+
*/
|
|
3896
|
+
addListener(event: 'app-command', listener: (event: Event,
|
|
3897
|
+
command: string) => void): this;
|
|
3898
|
+
/**
|
|
3899
|
+
* @platform win32,linux
|
|
3900
|
+
*/
|
|
3901
|
+
removeListener(event: 'app-command', listener: (event: Event,
|
|
3902
|
+
command: string) => void): this;
|
|
3903
|
+
/**
|
|
3904
|
+
* Emitted when an App Command is invoked. These are typically related to keyboard
|
|
3905
|
+
* media keys or browser commands, as well as the "Back" button built into some
|
|
3906
|
+
* mice on Windows.
|
|
3907
|
+
*
|
|
3908
|
+
* Commands are lowercased, underscores are replaced with hyphens, and the
|
|
3909
|
+
* `APPCOMMAND_` prefix is stripped off. e.g. `APPCOMMAND_BROWSER_BACKWARD` is
|
|
3910
|
+
* emitted as `browser-backward`.
|
|
3911
|
+
*
|
|
3912
|
+
* The following app commands are explicitly supported on Linux:
|
|
3913
|
+
*
|
|
3914
|
+
* * `browser-backward`
|
|
3915
|
+
* * `browser-forward`
|
|
3916
|
+
*
|
|
3917
|
+
* @platform win32,linux
|
|
3918
|
+
*/
|
|
3919
|
+
on(event: 'app-command', listener: (event: Event,
|
|
3920
|
+
command: string) => void): this;
|
|
3921
|
+
/**
|
|
3922
|
+
* @platform win32,linux
|
|
3923
|
+
*/
|
|
3924
|
+
off(event: 'app-command', listener: (event: Event,
|
|
3925
|
+
command: string) => void): this;
|
|
3926
|
+
/**
|
|
3927
|
+
* @platform win32,linux
|
|
3928
|
+
*/
|
|
3929
|
+
once(event: 'app-command', listener: (event: Event,
|
|
3930
|
+
command: string) => void): this;
|
|
3931
|
+
/**
|
|
3932
|
+
* @platform win32,linux
|
|
3933
|
+
*/
|
|
3934
|
+
addListener(event: 'app-command', listener: (event: Event,
|
|
3935
|
+
command: string) => void): this;
|
|
3936
|
+
/**
|
|
3937
|
+
* @platform win32,linux
|
|
3938
|
+
*/
|
|
3939
|
+
removeListener(event: 'app-command', listener: (event: Event,
|
|
3940
|
+
command: string) => void): this;
|
|
3941
|
+
/**
|
|
3942
|
+
* Emitted when the window loses focus.
|
|
3943
|
+
*/
|
|
3944
|
+
on(event: 'blur', listener: Function): this;
|
|
3945
|
+
off(event: 'blur', listener: Function): this;
|
|
3946
|
+
once(event: 'blur', listener: Function): this;
|
|
3947
|
+
addListener(event: 'blur', listener: Function): this;
|
|
3948
|
+
removeListener(event: 'blur', listener: Function): this;
|
|
3949
|
+
/**
|
|
3950
|
+
* Emitted when the window loses focus.
|
|
3951
|
+
*/
|
|
3952
|
+
on(event: 'blur', listener: Function): this;
|
|
3953
|
+
off(event: 'blur', listener: Function): this;
|
|
3954
|
+
once(event: 'blur', listener: Function): this;
|
|
3955
|
+
addListener(event: 'blur', listener: Function): this;
|
|
3956
|
+
removeListener(event: 'blur', listener: Function): 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 going to be closed. It's emitted before the
|
|
3980
|
+
* `beforeunload` and `unload` event of the DOM. Calling `event.preventDefault()`
|
|
3981
|
+
* will cancel the close.
|
|
3982
|
+
*
|
|
3983
|
+
* Usually you would want to use the `beforeunload` handler to decide whether the
|
|
3984
|
+
* window should be closed, which will also be called when the window is reloaded.
|
|
3985
|
+
* In Electron, returning any value other than `undefined` would cancel the close.
|
|
3986
|
+
* For example:
|
|
3987
|
+
*
|
|
3988
|
+
* _**Note**: There is a subtle difference between the behaviors of
|
|
3989
|
+
* `window.onbeforeunload = handler` and `window.addEventListener('beforeunload',
|
|
3990
|
+
* handler)`. It is recommended to always set the `event.returnValue` explicitly,
|
|
3991
|
+
* instead of only returning a value, as the former works more consistently within
|
|
3992
|
+
* Electron._
|
|
3993
|
+
*/
|
|
3994
|
+
on(event: 'close', listener: (event: Event) => void): this;
|
|
3995
|
+
off(event: 'close', listener: (event: Event) => void): this;
|
|
3996
|
+
once(event: 'close', listener: (event: Event) => void): this;
|
|
3997
|
+
addListener(event: 'close', listener: (event: Event) => void): this;
|
|
3998
|
+
removeListener(event: 'close', listener: (event: Event) => void): this;
|
|
3999
|
+
/**
|
|
4000
|
+
* Emitted when the window is closed. After you have received this event you should
|
|
4001
|
+
* remove the reference to the window and avoid using it any more.
|
|
4002
|
+
*/
|
|
4003
|
+
on(event: 'closed', listener: Function): this;
|
|
4004
|
+
off(event: 'closed', listener: Function): this;
|
|
4005
|
+
once(event: 'closed', listener: Function): this;
|
|
4006
|
+
addListener(event: 'closed', listener: Function): this;
|
|
4007
|
+
removeListener(event: 'closed', listener: Function): this;
|
|
4008
|
+
/**
|
|
4009
|
+
* Emitted when the window is closed. After you have received this event you should
|
|
4010
|
+
* remove the reference to the window and avoid using it any more.
|
|
4011
|
+
*/
|
|
4012
|
+
on(event: 'closed', listener: Function): this;
|
|
4013
|
+
off(event: 'closed', listener: Function): this;
|
|
4014
|
+
once(event: 'closed', listener: Function): this;
|
|
4015
|
+
addListener(event: 'closed', listener: Function): this;
|
|
4016
|
+
removeListener(event: 'closed', listener: Function): this;
|
|
4017
|
+
/**
|
|
4018
|
+
* Emitted when the window enters a full-screen state.
|
|
4019
|
+
*/
|
|
4020
|
+
on(event: 'enter-full-screen', listener: Function): this;
|
|
4021
|
+
off(event: 'enter-full-screen', listener: Function): this;
|
|
4022
|
+
once(event: 'enter-full-screen', listener: Function): this;
|
|
4023
|
+
addListener(event: 'enter-full-screen', listener: Function): this;
|
|
4024
|
+
removeListener(event: 'enter-full-screen', listener: Function): this;
|
|
4025
|
+
/**
|
|
4026
|
+
* Emitted when the window enters a full-screen state.
|
|
4027
|
+
*/
|
|
4028
|
+
on(event: 'enter-full-screen', listener: Function): this;
|
|
4029
|
+
off(event: 'enter-full-screen', listener: Function): this;
|
|
4030
|
+
once(event: 'enter-full-screen', listener: Function): this;
|
|
4031
|
+
addListener(event: 'enter-full-screen', listener: Function): this;
|
|
4032
|
+
removeListener(event: 'enter-full-screen', listener: Function): this;
|
|
4033
|
+
/**
|
|
4034
|
+
* Emitted when the window enters a full-screen state triggered by HTML API.
|
|
4035
|
+
*/
|
|
4036
|
+
on(event: 'enter-html-full-screen', listener: Function): this;
|
|
4037
|
+
off(event: 'enter-html-full-screen', listener: Function): this;
|
|
4038
|
+
once(event: 'enter-html-full-screen', listener: Function): this;
|
|
4039
|
+
addListener(event: 'enter-html-full-screen', listener: Function): this;
|
|
4040
|
+
removeListener(event: 'enter-html-full-screen', listener: Function): this;
|
|
4041
|
+
/**
|
|
4042
|
+
* Emitted when the window gains focus.
|
|
4043
|
+
*/
|
|
4044
|
+
on(event: 'focus', listener: Function): this;
|
|
4045
|
+
off(event: 'focus', listener: Function): this;
|
|
4046
|
+
once(event: 'focus', listener: Function): this;
|
|
4047
|
+
addListener(event: 'focus', listener: Function): this;
|
|
4048
|
+
removeListener(event: 'focus', listener: Function): this;
|
|
4049
|
+
/**
|
|
4050
|
+
* Emitted when the window gains focus.
|
|
4051
|
+
*/
|
|
4052
|
+
on(event: 'focus', listener: Function): this;
|
|
4053
|
+
off(event: 'focus', listener: Function): this;
|
|
4054
|
+
once(event: 'focus', listener: Function): this;
|
|
4055
|
+
addListener(event: 'focus', listener: Function): this;
|
|
4056
|
+
removeListener(event: 'focus', listener: Function): this;
|
|
4057
|
+
/**
|
|
4058
|
+
* Emitted when the window is hidden.
|
|
4059
|
+
*/
|
|
4060
|
+
on(event: 'hide', listener: Function): this;
|
|
4061
|
+
off(event: 'hide', listener: Function): this;
|
|
4062
|
+
once(event: 'hide', listener: Function): this;
|
|
4063
|
+
addListener(event: 'hide', listener: Function): this;
|
|
4064
|
+
removeListener(event: 'hide', listener: Function): this;
|
|
4065
|
+
/**
|
|
4066
|
+
* Emitted when the window is hidden.
|
|
4067
|
+
*/
|
|
4068
|
+
on(event: 'hide', listener: Function): this;
|
|
4069
|
+
off(event: 'hide', listener: Function): this;
|
|
4070
|
+
once(event: 'hide', listener: Function): this;
|
|
4071
|
+
addListener(event: 'hide', listener: Function): this;
|
|
4072
|
+
removeListener(event: 'hide', listener: Function): this;
|
|
4073
|
+
/**
|
|
4074
|
+
* Emitted when the window leaves a full-screen state.
|
|
4075
|
+
*/
|
|
4076
|
+
on(event: 'leave-full-screen', listener: Function): this;
|
|
4077
|
+
off(event: 'leave-full-screen', listener: Function): this;
|
|
4078
|
+
once(event: 'leave-full-screen', listener: Function): this;
|
|
4079
|
+
addListener(event: 'leave-full-screen', listener: Function): this;
|
|
4080
|
+
removeListener(event: 'leave-full-screen', listener: Function): this;
|
|
4081
|
+
/**
|
|
4082
|
+
* Emitted when the window leaves a full-screen state.
|
|
4083
|
+
*/
|
|
4084
|
+
on(event: 'leave-full-screen', listener: Function): this;
|
|
4085
|
+
off(event: 'leave-full-screen', listener: Function): this;
|
|
4086
|
+
once(event: 'leave-full-screen', listener: Function): this;
|
|
4087
|
+
addListener(event: 'leave-full-screen', listener: Function): this;
|
|
4088
|
+
removeListener(event: 'leave-full-screen', listener: Function): this;
|
|
4089
|
+
/**
|
|
4090
|
+
* Emitted when the window leaves a full-screen state triggered by HTML API.
|
|
4091
|
+
*/
|
|
4092
|
+
on(event: 'leave-html-full-screen', listener: Function): this;
|
|
4093
|
+
off(event: 'leave-html-full-screen', listener: Function): this;
|
|
4094
|
+
once(event: 'leave-html-full-screen', listener: Function): this;
|
|
4095
|
+
addListener(event: 'leave-html-full-screen', listener: Function): this;
|
|
4096
|
+
removeListener(event: 'leave-html-full-screen', listener: Function): this;
|
|
4097
|
+
/**
|
|
4098
|
+
* Emitted when window is maximized.
|
|
4099
|
+
*/
|
|
4100
|
+
on(event: 'maximize', listener: Function): this;
|
|
4101
|
+
off(event: 'maximize', listener: Function): this;
|
|
4102
|
+
once(event: 'maximize', listener: Function): this;
|
|
4103
|
+
addListener(event: 'maximize', listener: Function): this;
|
|
4104
|
+
removeListener(event: 'maximize', listener: Function): this;
|
|
4105
|
+
/**
|
|
4106
|
+
* Emitted when window is maximized.
|
|
4107
|
+
*/
|
|
4108
|
+
on(event: 'maximize', listener: Function): this;
|
|
4109
|
+
off(event: 'maximize', listener: Function): this;
|
|
4110
|
+
once(event: 'maximize', listener: Function): this;
|
|
4111
|
+
addListener(event: 'maximize', listener: Function): this;
|
|
4112
|
+
removeListener(event: 'maximize', listener: Function): this;
|
|
4113
|
+
/**
|
|
4114
|
+
* Emitted when the window is minimized.
|
|
4115
|
+
*/
|
|
4116
|
+
on(event: 'minimize', listener: Function): this;
|
|
4117
|
+
off(event: 'minimize', listener: Function): this;
|
|
4118
|
+
once(event: 'minimize', listener: Function): this;
|
|
4119
|
+
addListener(event: 'minimize', listener: Function): this;
|
|
4120
|
+
removeListener(event: 'minimize', listener: Function): this;
|
|
4121
|
+
/**
|
|
4122
|
+
* Emitted when the window is minimized.
|
|
4123
|
+
*/
|
|
4124
|
+
on(event: 'minimize', listener: Function): this;
|
|
4125
|
+
off(event: 'minimize', listener: Function): this;
|
|
4126
|
+
once(event: 'minimize', listener: Function): this;
|
|
4127
|
+
addListener(event: 'minimize', listener: Function): this;
|
|
4128
|
+
removeListener(event: 'minimize', listener: Function): this;
|
|
4129
|
+
/**
|
|
4130
|
+
* Emitted when the window is being moved to a new position.
|
|
4131
|
+
*/
|
|
4132
|
+
on(event: 'move', listener: Function): this;
|
|
4133
|
+
off(event: 'move', listener: Function): this;
|
|
4134
|
+
once(event: 'move', listener: Function): this;
|
|
4135
|
+
addListener(event: 'move', listener: Function): this;
|
|
4136
|
+
removeListener(event: 'move', listener: Function): this;
|
|
4137
|
+
/**
|
|
4138
|
+
* Emitted when the window is being moved to a new position.
|
|
4139
|
+
*/
|
|
4140
|
+
on(event: 'move', listener: Function): this;
|
|
4141
|
+
off(event: 'move', listener: Function): this;
|
|
4142
|
+
once(event: 'move', listener: Function): this;
|
|
4143
|
+
addListener(event: 'move', listener: Function): this;
|
|
4144
|
+
removeListener(event: 'move', listener: Function): this;
|
|
4145
|
+
/**
|
|
4146
|
+
* Emitted once when the window is moved to a new position.
|
|
4147
|
+
*
|
|
4148
|
+
* **Note**: On macOS this event is an alias of `move`.
|
|
4149
|
+
*
|
|
4150
|
+
* @platform darwin,win32
|
|
4151
|
+
*/
|
|
4152
|
+
on(event: 'moved', listener: Function): this;
|
|
4153
|
+
/**
|
|
4154
|
+
* @platform darwin,win32
|
|
4155
|
+
*/
|
|
4156
|
+
off(event: 'moved', listener: Function): this;
|
|
4157
|
+
/**
|
|
4158
|
+
* @platform darwin,win32
|
|
4159
|
+
*/
|
|
4160
|
+
once(event: 'moved', listener: Function): this;
|
|
4161
|
+
/**
|
|
4162
|
+
* @platform darwin,win32
|
|
4163
|
+
*/
|
|
4164
|
+
addListener(event: 'moved', listener: Function): this;
|
|
4165
|
+
/**
|
|
4166
|
+
* @platform darwin,win32
|
|
4167
|
+
*/
|
|
4168
|
+
removeListener(event: 'moved', listener: Function): this;
|
|
4169
|
+
/**
|
|
4170
|
+
* Emitted once when the window is moved to a new position.
|
|
4171
|
+
*
|
|
4172
|
+
* **Note**: On macOS this event is an alias of `move`.
|
|
4173
|
+
*
|
|
4174
|
+
* @platform darwin,win32
|
|
4175
|
+
*/
|
|
4176
|
+
on(event: 'moved', listener: Function): this;
|
|
4177
|
+
/**
|
|
4178
|
+
* @platform darwin,win32
|
|
4179
|
+
*/
|
|
4180
|
+
off(event: 'moved', listener: Function): this;
|
|
4181
|
+
/**
|
|
4182
|
+
* @platform darwin,win32
|
|
4183
|
+
*/
|
|
4184
|
+
once(event: 'moved', listener: Function): this;
|
|
4185
|
+
/**
|
|
4186
|
+
* @platform darwin,win32
|
|
4187
|
+
*/
|
|
4188
|
+
addListener(event: 'moved', listener: Function): this;
|
|
4189
|
+
/**
|
|
4190
|
+
* @platform darwin,win32
|
|
4191
|
+
*/
|
|
4192
|
+
removeListener(event: 'moved', listener: Function): this;
|
|
4193
|
+
/**
|
|
4194
|
+
* Emitted when the native new tab button is clicked.
|
|
4195
|
+
*
|
|
4196
|
+
* @platform darwin
|
|
4197
|
+
*/
|
|
4198
|
+
on(event: 'new-window-for-tab', listener: Function): this;
|
|
4199
|
+
/**
|
|
4200
|
+
* @platform darwin
|
|
4201
|
+
*/
|
|
4202
|
+
off(event: 'new-window-for-tab', listener: Function): this;
|
|
4203
|
+
/**
|
|
4204
|
+
* @platform darwin
|
|
4205
|
+
*/
|
|
4206
|
+
once(event: 'new-window-for-tab', listener: Function): this;
|
|
4207
|
+
/**
|
|
4208
|
+
* @platform darwin
|
|
4209
|
+
*/
|
|
4210
|
+
addListener(event: 'new-window-for-tab', listener: Function): this;
|
|
4211
|
+
/**
|
|
4212
|
+
* @platform darwin
|
|
4213
|
+
*/
|
|
4214
|
+
removeListener(event: 'new-window-for-tab', listener: Function): this;
|
|
4215
|
+
/**
|
|
4216
|
+
* Emitted when the native new tab button is clicked.
|
|
4217
|
+
*
|
|
4218
|
+
* @platform darwin
|
|
4219
|
+
*/
|
|
4220
|
+
on(event: 'new-window-for-tab', listener: Function): this;
|
|
4221
|
+
/**
|
|
4222
|
+
* @platform darwin
|
|
4223
|
+
*/
|
|
4224
|
+
off(event: 'new-window-for-tab', listener: Function): this;
|
|
4225
|
+
/**
|
|
4226
|
+
* @platform darwin
|
|
4227
|
+
*/
|
|
4228
|
+
once(event: 'new-window-for-tab', listener: Function): this;
|
|
4229
|
+
/**
|
|
4230
|
+
* @platform darwin
|
|
4231
|
+
*/
|
|
4232
|
+
addListener(event: 'new-window-for-tab', listener: Function): this;
|
|
4233
|
+
/**
|
|
4234
|
+
* @platform darwin
|
|
4235
|
+
*/
|
|
4236
|
+
removeListener(event: 'new-window-for-tab', listener: Function): this;
|
|
4237
|
+
/**
|
|
4238
|
+
* Emitted when the document changed its title, calling `event.preventDefault()`
|
|
4239
|
+
* will prevent the native window's title from changing. `explicitSet` is false
|
|
4240
|
+
* when title is synthesized from file URL.
|
|
4241
|
+
*/
|
|
4242
|
+
on(event: 'page-title-updated', listener: (event: Event,
|
|
4243
|
+
title: string,
|
|
4244
|
+
explicitSet: boolean) => void): this;
|
|
4245
|
+
off(event: 'page-title-updated', listener: (event: Event,
|
|
4246
|
+
title: string,
|
|
4247
|
+
explicitSet: boolean) => void): this;
|
|
4248
|
+
once(event: 'page-title-updated', listener: (event: Event,
|
|
4249
|
+
title: string,
|
|
4250
|
+
explicitSet: boolean) => void): this;
|
|
4251
|
+
addListener(event: 'page-title-updated', listener: (event: Event,
|
|
4252
|
+
title: string,
|
|
4253
|
+
explicitSet: boolean) => void): this;
|
|
4254
|
+
removeListener(event: 'page-title-updated', listener: (event: Event,
|
|
4255
|
+
title: string,
|
|
4256
|
+
explicitSet: boolean) => void): this;
|
|
4257
|
+
/**
|
|
4258
|
+
* Emitted when the web page has been rendered (while not being shown) and window
|
|
4259
|
+
* can be displayed without a visual flash.
|
|
4260
|
+
*
|
|
4261
|
+
* Please note that using this event implies that the renderer will be considered
|
|
4262
|
+
* "visible" and paint even though `show` is false. This event will never fire if
|
|
4263
|
+
* you use `paintWhenInitiallyHidden: false`
|
|
4264
|
+
*/
|
|
4265
|
+
on(event: 'ready-to-show', listener: Function): this;
|
|
4266
|
+
off(event: 'ready-to-show', listener: Function): this;
|
|
4267
|
+
once(event: 'ready-to-show', listener: Function): this;
|
|
4268
|
+
addListener(event: 'ready-to-show', listener: Function): this;
|
|
4269
|
+
removeListener(event: 'ready-to-show', listener: Function): this;
|
|
4270
|
+
/**
|
|
4271
|
+
* Emitted after the window has been resized.
|
|
4272
|
+
*/
|
|
4273
|
+
on(event: 'resize', listener: Function): this;
|
|
4274
|
+
off(event: 'resize', listener: Function): this;
|
|
4275
|
+
once(event: 'resize', listener: Function): this;
|
|
4276
|
+
addListener(event: 'resize', listener: Function): this;
|
|
4277
|
+
removeListener(event: 'resize', listener: Function): this;
|
|
4278
|
+
/**
|
|
4279
|
+
* Emitted after the window has been resized.
|
|
4280
|
+
*/
|
|
4281
|
+
on(event: 'resize', listener: Function): this;
|
|
4282
|
+
off(event: 'resize', listener: Function): this;
|
|
4283
|
+
once(event: 'resize', listener: Function): this;
|
|
4284
|
+
addListener(event: 'resize', listener: Function): this;
|
|
4285
|
+
removeListener(event: 'resize', listener: Function): this;
|
|
4286
|
+
/**
|
|
4287
|
+
* Emitted once when the window has finished being resized.
|
|
4288
|
+
*
|
|
4289
|
+
* This is usually emitted when the window has been resized manually. On macOS,
|
|
4290
|
+
* resizing the window with `setBounds`/`setSize` and setting the `animate`
|
|
4291
|
+
* parameter to `true` will also emit this event once resizing has finished.
|
|
4292
|
+
*
|
|
4293
|
+
* @platform darwin,win32
|
|
4294
|
+
*/
|
|
4295
|
+
on(event: 'resized', listener: Function): this;
|
|
4296
|
+
/**
|
|
4297
|
+
* @platform darwin,win32
|
|
4298
|
+
*/
|
|
4299
|
+
off(event: 'resized', listener: Function): this;
|
|
4300
|
+
/**
|
|
4301
|
+
* @platform darwin,win32
|
|
4302
|
+
*/
|
|
4303
|
+
once(event: 'resized', listener: Function): this;
|
|
4304
|
+
/**
|
|
4305
|
+
* @platform darwin,win32
|
|
4306
|
+
*/
|
|
4307
|
+
addListener(event: 'resized', listener: Function): this;
|
|
4308
|
+
/**
|
|
4309
|
+
* @platform darwin,win32
|
|
4310
|
+
*/
|
|
4311
|
+
removeListener(event: 'resized', listener: Function): this;
|
|
4312
|
+
/**
|
|
4313
|
+
* Emitted once when the window has finished being resized.
|
|
4314
|
+
*
|
|
4315
|
+
* This is usually emitted when the window has been resized manually. On macOS,
|
|
4316
|
+
* resizing the window with `setBounds`/`setSize` and setting the `animate`
|
|
4317
|
+
* parameter to `true` will also emit this event once resizing has finished.
|
|
4318
|
+
*
|
|
4319
|
+
* @platform darwin,win32
|
|
4320
|
+
*/
|
|
4321
|
+
on(event: 'resized', listener: Function): this;
|
|
4322
|
+
/**
|
|
4323
|
+
* @platform darwin,win32
|
|
4324
|
+
*/
|
|
4325
|
+
off(event: 'resized', listener: Function): this;
|
|
4326
|
+
/**
|
|
4327
|
+
* @platform darwin,win32
|
|
4328
|
+
*/
|
|
4329
|
+
once(event: 'resized', listener: Function): this;
|
|
4330
|
+
/**
|
|
4331
|
+
* @platform darwin,win32
|
|
4332
|
+
*/
|
|
4333
|
+
addListener(event: 'resized', listener: Function): this;
|
|
4334
|
+
/**
|
|
4335
|
+
* @platform darwin,win32
|
|
4336
|
+
*/
|
|
4337
|
+
removeListener(event: 'resized', listener: Function): this;
|
|
4338
|
+
/**
|
|
4339
|
+
* Emitted when the unresponsive web page becomes responsive again.
|
|
4340
|
+
*/
|
|
4341
|
+
on(event: 'responsive', listener: Function): this;
|
|
4342
|
+
off(event: 'responsive', listener: Function): this;
|
|
4343
|
+
once(event: 'responsive', listener: Function): this;
|
|
4344
|
+
addListener(event: 'responsive', listener: Function): this;
|
|
4345
|
+
removeListener(event: 'responsive', listener: Function): this;
|
|
4346
|
+
/**
|
|
4347
|
+
* Emitted when the window is restored from a minimized state.
|
|
4348
|
+
*/
|
|
4349
|
+
on(event: 'restore', listener: Function): this;
|
|
4350
|
+
off(event: 'restore', listener: Function): this;
|
|
4351
|
+
once(event: 'restore', listener: Function): this;
|
|
4352
|
+
addListener(event: 'restore', listener: Function): this;
|
|
4353
|
+
removeListener(event: 'restore', listener: Function): this;
|
|
4354
|
+
/**
|
|
4355
|
+
* Emitted when the window is restored from a minimized state.
|
|
4356
|
+
*/
|
|
4357
|
+
on(event: 'restore', listener: Function): this;
|
|
4358
|
+
off(event: 'restore', listener: Function): this;
|
|
4359
|
+
once(event: 'restore', listener: Function): this;
|
|
4360
|
+
addListener(event: 'restore', listener: Function): this;
|
|
4361
|
+
removeListener(event: 'restore', listener: Function): this;
|
|
4362
|
+
/**
|
|
4363
|
+
* Emitted on trackpad rotation gesture. Continually emitted until rotation gesture
|
|
4364
|
+
* is ended. The `rotation` value on each emission is the angle in degrees rotated
|
|
4365
|
+
* since the last emission. The last emitted event upon a rotation gesture will
|
|
4366
|
+
* always be of value `0`. Counter-clockwise rotation values are positive, while
|
|
4367
|
+
* clockwise ones are negative.
|
|
4368
|
+
*
|
|
4369
|
+
* @platform darwin
|
|
4370
|
+
*/
|
|
4371
|
+
on(event: 'rotate-gesture', listener: (event: Event,
|
|
4372
|
+
rotation: number) => void): this;
|
|
4373
|
+
/**
|
|
4374
|
+
* @platform darwin
|
|
4375
|
+
*/
|
|
4376
|
+
off(event: 'rotate-gesture', listener: (event: Event,
|
|
4377
|
+
rotation: number) => void): this;
|
|
4378
|
+
/**
|
|
4379
|
+
* @platform darwin
|
|
4380
|
+
*/
|
|
4381
|
+
once(event: 'rotate-gesture', listener: (event: Event,
|
|
4382
|
+
rotation: number) => void): this;
|
|
4383
|
+
/**
|
|
4384
|
+
* @platform darwin
|
|
4385
|
+
*/
|
|
4386
|
+
addListener(event: 'rotate-gesture', listener: (event: Event,
|
|
4387
|
+
rotation: number) => void): this;
|
|
4388
|
+
/**
|
|
4389
|
+
* @platform darwin
|
|
4390
|
+
*/
|
|
4391
|
+
removeListener(event: 'rotate-gesture', listener: (event: Event,
|
|
4392
|
+
rotation: number) => void): this;
|
|
4393
|
+
/**
|
|
4394
|
+
* Emitted on trackpad rotation gesture. Continually emitted until rotation gesture
|
|
4395
|
+
* is ended. The `rotation` value on each emission is the angle in degrees rotated
|
|
4396
|
+
* since the last emission. The last emitted event upon a rotation gesture will
|
|
4397
|
+
* always be of value `0`. Counter-clockwise rotation values are positive, while
|
|
4398
|
+
* clockwise ones are negative.
|
|
4399
|
+
*
|
|
4400
|
+
* @platform darwin
|
|
4401
|
+
*/
|
|
4402
|
+
on(event: 'rotate-gesture', listener: (event: Event,
|
|
4403
|
+
rotation: number) => void): this;
|
|
4404
|
+
/**
|
|
4405
|
+
* @platform darwin
|
|
4406
|
+
*/
|
|
4407
|
+
off(event: 'rotate-gesture', listener: (event: Event,
|
|
4408
|
+
rotation: number) => void): this;
|
|
4409
|
+
/**
|
|
4410
|
+
* @platform darwin
|
|
4411
|
+
*/
|
|
4412
|
+
once(event: 'rotate-gesture', listener: (event: Event,
|
|
4413
|
+
rotation: number) => void): this;
|
|
4414
|
+
/**
|
|
4415
|
+
* @platform darwin
|
|
4416
|
+
*/
|
|
4417
|
+
addListener(event: 'rotate-gesture', listener: (event: Event,
|
|
4418
|
+
rotation: number) => void): this;
|
|
4419
|
+
/**
|
|
4420
|
+
* @platform darwin
|
|
4421
|
+
*/
|
|
4422
|
+
removeListener(event: 'rotate-gesture', listener: (event: Event,
|
|
4423
|
+
rotation: number) => void): this;
|
|
4424
|
+
/**
|
|
4425
|
+
* Emitted when window session is going to end due to force shutdown or machine
|
|
4426
|
+
* restart or session log off.
|
|
4427
|
+
*
|
|
4428
|
+
* @platform win32
|
|
4429
|
+
*/
|
|
4430
|
+
on(event: 'session-end', listener: Function): this;
|
|
4431
|
+
/**
|
|
4432
|
+
* @platform win32
|
|
4433
|
+
*/
|
|
4434
|
+
off(event: 'session-end', listener: Function): this;
|
|
4435
|
+
/**
|
|
4436
|
+
* @platform win32
|
|
4437
|
+
*/
|
|
4438
|
+
once(event: 'session-end', listener: Function): this;
|
|
4439
|
+
/**
|
|
4440
|
+
* @platform win32
|
|
4441
|
+
*/
|
|
4442
|
+
addListener(event: 'session-end', listener: Function): this;
|
|
4443
|
+
/**
|
|
4444
|
+
* @platform win32
|
|
4445
|
+
*/
|
|
4446
|
+
removeListener(event: 'session-end', listener: Function): this;
|
|
4447
|
+
/**
|
|
4448
|
+
* Emitted when window session is going to end due to force shutdown or machine
|
|
4449
|
+
* restart or session log off.
|
|
4450
|
+
*
|
|
4451
|
+
* @platform win32
|
|
4452
|
+
*/
|
|
4453
|
+
on(event: 'session-end', listener: Function): this;
|
|
4454
|
+
/**
|
|
4455
|
+
* @platform win32
|
|
4456
|
+
*/
|
|
4457
|
+
off(event: 'session-end', listener: Function): this;
|
|
4458
|
+
/**
|
|
4459
|
+
* @platform win32
|
|
4460
|
+
*/
|
|
4461
|
+
once(event: 'session-end', listener: Function): this;
|
|
4462
|
+
/**
|
|
4463
|
+
* @platform win32
|
|
4464
|
+
*/
|
|
4465
|
+
addListener(event: 'session-end', listener: Function): this;
|
|
4466
|
+
/**
|
|
4467
|
+
* @platform win32
|
|
4468
|
+
*/
|
|
4469
|
+
removeListener(event: 'session-end', listener: Function): this;
|
|
4470
|
+
/**
|
|
4471
|
+
* Emitted when the window opens a sheet.
|
|
4472
|
+
*
|
|
4473
|
+
* @platform darwin
|
|
4474
|
+
*/
|
|
4475
|
+
on(event: 'sheet-begin', listener: Function): this;
|
|
4476
|
+
/**
|
|
4477
|
+
* @platform darwin
|
|
4478
|
+
*/
|
|
4479
|
+
off(event: 'sheet-begin', listener: Function): this;
|
|
4480
|
+
/**
|
|
4481
|
+
* @platform darwin
|
|
4482
|
+
*/
|
|
4483
|
+
once(event: 'sheet-begin', listener: Function): this;
|
|
4484
|
+
/**
|
|
4485
|
+
* @platform darwin
|
|
4486
|
+
*/
|
|
4487
|
+
addListener(event: 'sheet-begin', listener: Function): this;
|
|
4488
|
+
/**
|
|
4489
|
+
* @platform darwin
|
|
4490
|
+
*/
|
|
4491
|
+
removeListener(event: 'sheet-begin', listener: Function): this;
|
|
4492
|
+
/**
|
|
4493
|
+
* Emitted when the window opens a sheet.
|
|
4494
|
+
*
|
|
4495
|
+
* @platform darwin
|
|
4496
|
+
*/
|
|
4497
|
+
on(event: 'sheet-begin', listener: Function): this;
|
|
4498
|
+
/**
|
|
4499
|
+
* @platform darwin
|
|
4500
|
+
*/
|
|
4501
|
+
off(event: 'sheet-begin', listener: Function): this;
|
|
4502
|
+
/**
|
|
4503
|
+
* @platform darwin
|
|
4504
|
+
*/
|
|
4505
|
+
once(event: 'sheet-begin', listener: Function): this;
|
|
4506
|
+
/**
|
|
4507
|
+
* @platform darwin
|
|
4508
|
+
*/
|
|
4509
|
+
addListener(event: 'sheet-begin', listener: Function): this;
|
|
4510
|
+
/**
|
|
4511
|
+
* @platform darwin
|
|
4512
|
+
*/
|
|
4513
|
+
removeListener(event: 'sheet-begin', listener: Function): this;
|
|
4514
|
+
/**
|
|
4515
|
+
* Emitted when the window has closed a sheet.
|
|
4516
|
+
*
|
|
4517
|
+
* @platform darwin
|
|
4518
|
+
*/
|
|
4519
|
+
on(event: 'sheet-end', listener: Function): this;
|
|
4520
|
+
/**
|
|
4521
|
+
* @platform darwin
|
|
4522
|
+
*/
|
|
4523
|
+
off(event: 'sheet-end', listener: Function): this;
|
|
4524
|
+
/**
|
|
4525
|
+
* @platform darwin
|
|
4526
|
+
*/
|
|
4527
|
+
once(event: 'sheet-end', listener: Function): this;
|
|
4528
|
+
/**
|
|
4529
|
+
* @platform darwin
|
|
4530
|
+
*/
|
|
4531
|
+
addListener(event: 'sheet-end', listener: Function): this;
|
|
4532
|
+
/**
|
|
4533
|
+
* @platform darwin
|
|
4534
|
+
*/
|
|
4535
|
+
removeListener(event: 'sheet-end', listener: Function): this;
|
|
4536
|
+
/**
|
|
4537
|
+
* Emitted when the window has closed a sheet.
|
|
4538
|
+
*
|
|
4539
|
+
* @platform darwin
|
|
4540
|
+
*/
|
|
4541
|
+
on(event: 'sheet-end', listener: Function): this;
|
|
4542
|
+
/**
|
|
4543
|
+
* @platform darwin
|
|
4544
|
+
*/
|
|
4545
|
+
off(event: 'sheet-end', listener: Function): this;
|
|
4546
|
+
/**
|
|
4547
|
+
* @platform darwin
|
|
4548
|
+
*/
|
|
4549
|
+
once(event: 'sheet-end', listener: Function): this;
|
|
4550
|
+
/**
|
|
4551
|
+
* @platform darwin
|
|
4552
|
+
*/
|
|
4553
|
+
addListener(event: 'sheet-end', listener: Function): this;
|
|
4554
|
+
/**
|
|
4555
|
+
* @platform darwin
|
|
4556
|
+
*/
|
|
4557
|
+
removeListener(event: 'sheet-end', listener: Function): this;
|
|
4558
|
+
/**
|
|
4559
|
+
* Emitted when the window is shown.
|
|
4560
|
+
*/
|
|
4561
|
+
on(event: 'show', listener: Function): this;
|
|
4562
|
+
off(event: 'show', listener: Function): this;
|
|
4563
|
+
once(event: 'show', listener: Function): this;
|
|
4564
|
+
addListener(event: 'show', listener: Function): this;
|
|
4565
|
+
removeListener(event: 'show', listener: Function): this;
|
|
4566
|
+
/**
|
|
4567
|
+
* Emitted when the window is shown.
|
|
4568
|
+
*/
|
|
4569
|
+
on(event: 'show', listener: Function): this;
|
|
4570
|
+
off(event: 'show', listener: Function): this;
|
|
4571
|
+
once(event: 'show', listener: Function): this;
|
|
4572
|
+
addListener(event: 'show', listener: Function): this;
|
|
4573
|
+
removeListener(event: 'show', listener: Function): this;
|
|
4574
|
+
/**
|
|
4575
|
+
* Emitted on 3-finger swipe. Possible directions are `up`, `right`, `down`,
|
|
4576
|
+
* `left`.
|
|
4577
|
+
*
|
|
4578
|
+
* The method underlying this event is built to handle older macOS-style trackpad
|
|
4579
|
+
* swiping, where the content on the screen doesn't move with the swipe. Most macOS
|
|
4580
|
+
* trackpads are not configured to allow this kind of swiping anymore, so in order
|
|
4581
|
+
* for it to emit properly the 'Swipe between pages' preference in `System
|
|
4582
|
+
* Preferences > Trackpad > More Gestures` must be set to 'Swipe with two or three
|
|
4583
|
+
* fingers'.
|
|
4584
|
+
*
|
|
4585
|
+
* @platform darwin
|
|
4586
|
+
*/
|
|
4587
|
+
on(event: 'swipe', listener: (event: Event,
|
|
4588
|
+
direction: string) => void): this;
|
|
4589
|
+
/**
|
|
4590
|
+
* @platform darwin
|
|
4591
|
+
*/
|
|
4592
|
+
off(event: 'swipe', listener: (event: Event,
|
|
4593
|
+
direction: string) => void): this;
|
|
4594
|
+
/**
|
|
4595
|
+
* @platform darwin
|
|
4596
|
+
*/
|
|
4597
|
+
once(event: 'swipe', listener: (event: Event,
|
|
4598
|
+
direction: string) => void): this;
|
|
4599
|
+
/**
|
|
4600
|
+
* @platform darwin
|
|
4601
|
+
*/
|
|
4602
|
+
addListener(event: 'swipe', listener: (event: Event,
|
|
4603
|
+
direction: string) => void): this;
|
|
4604
|
+
/**
|
|
4605
|
+
* @platform darwin
|
|
4606
|
+
*/
|
|
4607
|
+
removeListener(event: 'swipe', listener: (event: Event,
|
|
4608
|
+
direction: string) => void): this;
|
|
4609
|
+
/**
|
|
4610
|
+
* Emitted on 3-finger swipe. Possible directions are `up`, `right`, `down`,
|
|
4611
|
+
* `left`.
|
|
4612
|
+
*
|
|
4613
|
+
* The method underlying this event is built to handle older macOS-style trackpad
|
|
4614
|
+
* swiping, where the content on the screen doesn't move with the swipe. Most macOS
|
|
4615
|
+
* trackpads are not configured to allow this kind of swiping anymore, so in order
|
|
4616
|
+
* for it to emit properly the 'Swipe between pages' preference in `System
|
|
4617
|
+
* Preferences > Trackpad > More Gestures` must be set to 'Swipe with two or three
|
|
4618
|
+
* fingers'.
|
|
4619
|
+
*
|
|
4620
|
+
* @platform darwin
|
|
4621
|
+
*/
|
|
4622
|
+
on(event: 'swipe', listener: (event: Event,
|
|
4623
|
+
direction: string) => void): this;
|
|
4624
|
+
/**
|
|
4625
|
+
* @platform darwin
|
|
4626
|
+
*/
|
|
4627
|
+
off(event: 'swipe', listener: (event: Event,
|
|
4628
|
+
direction: string) => void): this;
|
|
4629
|
+
/**
|
|
4630
|
+
* @platform darwin
|
|
4631
|
+
*/
|
|
4632
|
+
once(event: 'swipe', listener: (event: Event,
|
|
4633
|
+
direction: string) => void): this;
|
|
4634
|
+
/**
|
|
4635
|
+
* @platform darwin
|
|
4636
|
+
*/
|
|
4637
|
+
addListener(event: 'swipe', listener: (event: Event,
|
|
4638
|
+
direction: string) => void): this;
|
|
4639
|
+
/**
|
|
4640
|
+
* @platform darwin
|
|
4641
|
+
*/
|
|
4642
|
+
removeListener(event: 'swipe', listener: (event: Event,
|
|
4643
|
+
direction: string) => void): this;
|
|
4644
|
+
/**
|
|
4645
|
+
* Emitted when the system context menu is triggered on the window, this is
|
|
4646
|
+
* normally only triggered when the user right clicks on the non-client area of
|
|
4647
|
+
* your window. This is the window titlebar or any area you have declared as
|
|
4648
|
+
* `-webkit-app-region: drag` in a frameless window.
|
|
4649
|
+
*
|
|
4650
|
+
* Calling `event.preventDefault()` will prevent the menu from being displayed.
|
|
4651
|
+
*
|
|
4652
|
+
* @platform win32
|
|
4653
|
+
*/
|
|
4654
|
+
on(event: 'system-context-menu', listener: (event: Event,
|
|
4655
|
+
/**
|
|
4656
|
+
* The screen coordinates the context menu was triggered at
|
|
4657
|
+
*/
|
|
4658
|
+
point: Point) => void): this;
|
|
4659
|
+
/**
|
|
4660
|
+
* @platform win32
|
|
4661
|
+
*/
|
|
4662
|
+
off(event: 'system-context-menu', listener: (event: Event,
|
|
4663
|
+
/**
|
|
4664
|
+
* The screen coordinates the context menu was triggered at
|
|
4665
|
+
*/
|
|
4666
|
+
point: Point) => void): this;
|
|
4667
|
+
/**
|
|
4668
|
+
* @platform win32
|
|
4669
|
+
*/
|
|
4670
|
+
once(event: 'system-context-menu', listener: (event: Event,
|
|
4671
|
+
/**
|
|
4672
|
+
* The screen coordinates the context menu was triggered at
|
|
4673
|
+
*/
|
|
4674
|
+
point: Point) => void): this;
|
|
4675
|
+
/**
|
|
4676
|
+
* @platform win32
|
|
4677
|
+
*/
|
|
4678
|
+
addListener(event: 'system-context-menu', listener: (event: Event,
|
|
4679
|
+
/**
|
|
4680
|
+
* The screen coordinates the context menu was triggered at
|
|
4681
|
+
*/
|
|
4682
|
+
point: Point) => void): this;
|
|
4683
|
+
/**
|
|
4684
|
+
* @platform win32
|
|
4685
|
+
*/
|
|
4686
|
+
removeListener(event: 'system-context-menu', listener: (event: Event,
|
|
4687
|
+
/**
|
|
4688
|
+
* The screen coordinates the context menu was triggered at
|
|
4689
|
+
*/
|
|
4690
|
+
point: Point) => void): this;
|
|
4691
|
+
/**
|
|
4692
|
+
* Emitted when the system context menu is triggered on the window, this is
|
|
4693
|
+
* normally only triggered when the user right clicks on the non-client area of
|
|
4694
|
+
* your window. This is the window titlebar or any area you have declared as
|
|
4695
|
+
* `-webkit-app-region: drag` in a frameless window.
|
|
4696
|
+
*
|
|
4697
|
+
* Calling `event.preventDefault()` will prevent the menu from being displayed.
|
|
4698
|
+
*
|
|
4699
|
+
* @platform win32
|
|
4700
|
+
*/
|
|
4701
|
+
on(event: 'system-context-menu', listener: (event: Event,
|
|
4702
|
+
/**
|
|
4703
|
+
* The screen coordinates the context menu was triggered at
|
|
4704
|
+
*/
|
|
4705
|
+
point: Point) => void): this;
|
|
4706
|
+
/**
|
|
4707
|
+
* @platform win32
|
|
4708
|
+
*/
|
|
4709
|
+
off(event: 'system-context-menu', listener: (event: Event,
|
|
4710
|
+
/**
|
|
4711
|
+
* The screen coordinates the context menu was triggered at
|
|
4712
|
+
*/
|
|
4713
|
+
point: Point) => void): this;
|
|
4714
|
+
/**
|
|
4715
|
+
* @platform win32
|
|
4716
|
+
*/
|
|
4717
|
+
once(event: 'system-context-menu', listener: (event: Event,
|
|
4718
|
+
/**
|
|
4719
|
+
* The screen coordinates the context menu was triggered at
|
|
4720
|
+
*/
|
|
4721
|
+
point: Point) => void): this;
|
|
4722
|
+
/**
|
|
4723
|
+
* @platform win32
|
|
4724
|
+
*/
|
|
4725
|
+
addListener(event: 'system-context-menu', listener: (event: Event,
|
|
4726
|
+
/**
|
|
4727
|
+
* The screen coordinates the context menu was triggered at
|
|
4728
|
+
*/
|
|
4729
|
+
point: Point) => void): this;
|
|
4730
|
+
/**
|
|
4731
|
+
* @platform win32
|
|
4732
|
+
*/
|
|
4733
|
+
removeListener(event: 'system-context-menu', listener: (event: Event,
|
|
4734
|
+
/**
|
|
4735
|
+
* The screen coordinates the context menu was triggered at
|
|
4736
|
+
*/
|
|
4737
|
+
point: Point) => void): this;
|
|
4738
|
+
/**
|
|
4739
|
+
* Emitted when the window exits from a maximized state.
|
|
4740
|
+
*/
|
|
4741
|
+
on(event: 'unmaximize', listener: Function): this;
|
|
4742
|
+
off(event: 'unmaximize', listener: Function): this;
|
|
4743
|
+
once(event: 'unmaximize', listener: Function): this;
|
|
4744
|
+
addListener(event: 'unmaximize', listener: Function): this;
|
|
4745
|
+
removeListener(event: 'unmaximize', listener: Function): this;
|
|
4746
|
+
/**
|
|
4747
|
+
* Emitted when the window exits from a maximized state.
|
|
4748
|
+
*/
|
|
4749
|
+
on(event: 'unmaximize', listener: Function): this;
|
|
4750
|
+
off(event: 'unmaximize', listener: Function): this;
|
|
4751
|
+
once(event: 'unmaximize', listener: Function): this;
|
|
4752
|
+
addListener(event: 'unmaximize', listener: Function): this;
|
|
4753
|
+
removeListener(event: 'unmaximize', listener: Function): this;
|
|
4754
|
+
/**
|
|
4755
|
+
* Emitted when the web page becomes unresponsive.
|
|
4756
|
+
*/
|
|
4757
|
+
on(event: 'unresponsive', listener: Function): this;
|
|
4758
|
+
off(event: 'unresponsive', listener: Function): this;
|
|
4759
|
+
once(event: 'unresponsive', listener: Function): this;
|
|
4760
|
+
addListener(event: 'unresponsive', listener: Function): this;
|
|
4761
|
+
removeListener(event: 'unresponsive', listener: Function): this;
|
|
4762
|
+
/**
|
|
4763
|
+
* Emitted before the window is moved. On Windows, calling `event.preventDefault()`
|
|
4764
|
+
* will prevent the window from being moved.
|
|
4765
|
+
*
|
|
4766
|
+
* Note that this is only emitted when the window is being moved manually. Moving
|
|
4767
|
+
* the window with `setPosition`/`setBounds`/`center` will not emit this event.
|
|
4768
|
+
*
|
|
4769
|
+
* @platform darwin,win32
|
|
4770
|
+
*/
|
|
4771
|
+
on(event: 'will-move', listener: (event: Event,
|
|
4772
|
+
/**
|
|
4773
|
+
* Location the window is being moved to.
|
|
4774
|
+
*/
|
|
4775
|
+
newBounds: Rectangle) => void): this;
|
|
4776
|
+
/**
|
|
4777
|
+
* @platform darwin,win32
|
|
4778
|
+
*/
|
|
4779
|
+
off(event: 'will-move', listener: (event: Event,
|
|
4780
|
+
/**
|
|
4781
|
+
* Location the window is being moved to.
|
|
4782
|
+
*/
|
|
4783
|
+
newBounds: Rectangle) => void): this;
|
|
4784
|
+
/**
|
|
4785
|
+
* @platform darwin,win32
|
|
4786
|
+
*/
|
|
4787
|
+
once(event: 'will-move', listener: (event: Event,
|
|
4788
|
+
/**
|
|
4789
|
+
* Location the window is being moved to.
|
|
4790
|
+
*/
|
|
4791
|
+
newBounds: Rectangle) => void): this;
|
|
4792
|
+
/**
|
|
4793
|
+
* @platform darwin,win32
|
|
4794
|
+
*/
|
|
4795
|
+
addListener(event: 'will-move', listener: (event: Event,
|
|
4796
|
+
/**
|
|
4797
|
+
* Location the window is being moved to.
|
|
4798
|
+
*/
|
|
4799
|
+
newBounds: Rectangle) => void): this;
|
|
4800
|
+
/**
|
|
4801
|
+
* @platform darwin,win32
|
|
4802
|
+
*/
|
|
4803
|
+
removeListener(event: 'will-move', listener: (event: Event,
|
|
4804
|
+
/**
|
|
4805
|
+
* Location the window is being moved to.
|
|
4806
|
+
*/
|
|
4807
|
+
newBounds: Rectangle) => void): this;
|
|
4808
|
+
/**
|
|
4809
|
+
* Emitted before the window is moved. On Windows, calling `event.preventDefault()`
|
|
4810
|
+
* will prevent the window from being moved.
|
|
4811
|
+
*
|
|
4812
|
+
* Note that this is only emitted when the window is being moved manually. Moving
|
|
4813
|
+
* the window with `setPosition`/`setBounds`/`center` will not emit this event.
|
|
4814
|
+
*
|
|
4815
|
+
* @platform darwin,win32
|
|
4816
|
+
*/
|
|
4817
|
+
on(event: 'will-move', listener: (event: Event,
|
|
4818
|
+
/**
|
|
4819
|
+
* Location the window is being moved to.
|
|
4820
|
+
*/
|
|
4821
|
+
newBounds: Rectangle) => void): this;
|
|
4822
|
+
/**
|
|
4823
|
+
* @platform darwin,win32
|
|
4824
|
+
*/
|
|
4825
|
+
off(event: 'will-move', listener: (event: Event,
|
|
4826
|
+
/**
|
|
4827
|
+
* Location the window is being moved to.
|
|
4828
|
+
*/
|
|
4829
|
+
newBounds: Rectangle) => void): this;
|
|
4830
|
+
/**
|
|
4831
|
+
* @platform darwin,win32
|
|
4832
|
+
*/
|
|
4833
|
+
once(event: 'will-move', listener: (event: Event,
|
|
4834
|
+
/**
|
|
4835
|
+
* Location the window is being moved to.
|
|
4836
|
+
*/
|
|
4837
|
+
newBounds: Rectangle) => void): this;
|
|
4838
|
+
/**
|
|
4839
|
+
* @platform darwin,win32
|
|
4840
|
+
*/
|
|
4841
|
+
addListener(event: 'will-move', listener: (event: Event,
|
|
4842
|
+
/**
|
|
4843
|
+
* Location the window is being moved to.
|
|
4844
|
+
*/
|
|
4845
|
+
newBounds: Rectangle) => void): this;
|
|
4846
|
+
/**
|
|
4847
|
+
* @platform darwin,win32
|
|
4848
|
+
*/
|
|
4849
|
+
removeListener(event: 'will-move', listener: (event: Event,
|
|
4850
|
+
/**
|
|
4851
|
+
* Location the window is being moved to.
|
|
4852
|
+
*/
|
|
4853
|
+
newBounds: Rectangle) => void): this;
|
|
4854
|
+
/**
|
|
4855
|
+
* Emitted before the window is resized. Calling `event.preventDefault()` will
|
|
4856
|
+
* prevent the window from being resized.
|
|
4857
|
+
*
|
|
4858
|
+
* Note that this is only emitted when the window is being resized manually.
|
|
4859
|
+
* Resizing the window with `setBounds`/`setSize` will not emit this event.
|
|
4860
|
+
*
|
|
4861
|
+
* The possible values and behaviors of the `edge` option are platform dependent.
|
|
4862
|
+
* Possible values are:
|
|
4863
|
+
*
|
|
4864
|
+
* * On Windows, possible values are `bottom`, `top`, `left`, `right`, `top-left`,
|
|
4865
|
+
* `top-right`, `bottom-left`, `bottom-right`.
|
|
4866
|
+
* * On macOS, possible values are `bottom` and `right`.
|
|
4867
|
+
* * The value `bottom` is used to denote vertical resizing.
|
|
4868
|
+
* * The value `right` is used to denote horizontal resizing.
|
|
4869
|
+
*
|
|
4870
|
+
* @platform darwin,win32
|
|
4871
|
+
*/
|
|
4872
|
+
on(event: 'will-resize', listener: (event: Event,
|
|
4873
|
+
/**
|
|
4874
|
+
* Size the window is being resized to.
|
|
4875
|
+
*/
|
|
4876
|
+
newBounds: Rectangle,
|
|
4877
|
+
details: WillResizeDetails) => void): this;
|
|
4878
|
+
/**
|
|
4879
|
+
* @platform darwin,win32
|
|
4880
|
+
*/
|
|
4881
|
+
off(event: 'will-resize', listener: (event: Event,
|
|
4882
|
+
/**
|
|
4883
|
+
* Size the window is being resized to.
|
|
4884
|
+
*/
|
|
4885
|
+
newBounds: Rectangle,
|
|
4886
|
+
details: WillResizeDetails) => void): this;
|
|
4887
|
+
/**
|
|
4888
|
+
* @platform darwin,win32
|
|
4889
|
+
*/
|
|
4890
|
+
once(event: 'will-resize', listener: (event: Event,
|
|
4891
|
+
/**
|
|
4892
|
+
* Size the window is being resized to.
|
|
4893
|
+
*/
|
|
4894
|
+
newBounds: Rectangle,
|
|
4895
|
+
details: WillResizeDetails) => void): this;
|
|
4896
|
+
/**
|
|
4897
|
+
* @platform darwin,win32
|
|
4898
|
+
*/
|
|
4899
|
+
addListener(event: 'will-resize', listener: (event: Event,
|
|
4900
|
+
/**
|
|
4901
|
+
* Size the window is being resized to.
|
|
4902
|
+
*/
|
|
4903
|
+
newBounds: Rectangle,
|
|
4904
|
+
details: WillResizeDetails) => void): this;
|
|
4905
|
+
/**
|
|
4906
|
+
* @platform darwin,win32
|
|
4907
|
+
*/
|
|
4908
|
+
removeListener(event: 'will-resize', listener: (event: Event,
|
|
4909
|
+
/**
|
|
4910
|
+
* Size the window is being resized to.
|
|
4911
|
+
*/
|
|
4912
|
+
newBounds: Rectangle,
|
|
4913
|
+
details: WillResizeDetails) => void): this;
|
|
4914
|
+
/**
|
|
4915
|
+
* Emitted before the window is resized. Calling `event.preventDefault()` will
|
|
4916
|
+
* prevent the window from being resized.
|
|
4917
|
+
*
|
|
4918
|
+
* Note that this is only emitted when the window is being resized manually.
|
|
4919
|
+
* Resizing the window with `setBounds`/`setSize` will not emit this event.
|
|
4920
|
+
*
|
|
4921
|
+
* The possible values and behaviors of the `edge` option are platform dependent.
|
|
4922
|
+
* Possible values are:
|
|
4923
|
+
*
|
|
4924
|
+
* * On Windows, possible values are `bottom`, `top`, `left`, `right`, `top-left`,
|
|
4925
|
+
* `top-right`, `bottom-left`, `bottom-right`.
|
|
4926
|
+
* * On macOS, possible values are `bottom` and `right`.
|
|
4927
|
+
* * The value `bottom` is used to denote vertical resizing.
|
|
4928
|
+
* * The value `right` is used to denote horizontal resizing.
|
|
4929
|
+
*
|
|
4930
|
+
* @platform darwin,win32
|
|
4931
|
+
*/
|
|
4932
|
+
on(event: 'will-resize', listener: (event: Event,
|
|
4933
|
+
/**
|
|
4934
|
+
* Size the window is being resized to.
|
|
4935
|
+
*/
|
|
4936
|
+
newBounds: Rectangle,
|
|
4937
|
+
details: WillResizeDetails) => void): this;
|
|
4938
|
+
/**
|
|
4939
|
+
* @platform darwin,win32
|
|
4940
|
+
*/
|
|
4941
|
+
off(event: 'will-resize', listener: (event: Event,
|
|
4942
|
+
/**
|
|
4943
|
+
* Size the window is being resized to.
|
|
4944
|
+
*/
|
|
4945
|
+
newBounds: Rectangle,
|
|
4946
|
+
details: WillResizeDetails) => void): this;
|
|
4947
|
+
/**
|
|
4948
|
+
* @platform darwin,win32
|
|
4949
|
+
*/
|
|
4950
|
+
once(event: 'will-resize', listener: (event: Event,
|
|
4951
|
+
/**
|
|
4952
|
+
* Size the window is being resized to.
|
|
4953
|
+
*/
|
|
4954
|
+
newBounds: Rectangle,
|
|
4955
|
+
details: WillResizeDetails) => void): this;
|
|
4956
|
+
/**
|
|
4957
|
+
* @platform darwin,win32
|
|
4958
|
+
*/
|
|
4959
|
+
addListener(event: 'will-resize', listener: (event: Event,
|
|
4960
|
+
/**
|
|
4961
|
+
* Size the window is being resized to.
|
|
4962
|
+
*/
|
|
4963
|
+
newBounds: Rectangle,
|
|
4964
|
+
details: WillResizeDetails) => void): this;
|
|
4965
|
+
/**
|
|
4966
|
+
* @platform darwin,win32
|
|
4967
|
+
*/
|
|
4968
|
+
removeListener(event: 'will-resize', listener: (event: Event,
|
|
4969
|
+
/**
|
|
4970
|
+
* Size the window is being resized to.
|
|
4971
|
+
*/
|
|
4972
|
+
newBounds: Rectangle,
|
|
4973
|
+
details: WillResizeDetails) => void): this;
|
|
4974
|
+
/**
|
|
4975
|
+
* BrowserWindow
|
|
4976
|
+
*/
|
|
4977
|
+
constructor(options?: BrowserWindowConstructorOptions);
|
|
4978
|
+
/**
|
|
4979
|
+
* > **Note** The `BrowserView` class is deprecated, and replaced by the new
|
|
4980
|
+
* `WebContentsView` class.
|
|
4981
|
+
*
|
|
4982
|
+
* The window that owns the given `browserView`. If the given view is not attached
|
|
4983
|
+
* to any window, returns `null`.
|
|
4984
|
+
*
|
|
4985
|
+
* @deprecated
|
|
4986
|
+
*/
|
|
4987
|
+
static fromBrowserView(browserView: BrowserView): (BrowserWindow) | (null);
|
|
4988
|
+
/**
|
|
4989
|
+
* The window with the given `id`.
|
|
4990
|
+
*/
|
|
4991
|
+
static fromId(id: number): (BrowserWindow) | (null);
|
|
4992
|
+
/**
|
|
4993
|
+
* The window that owns the given `webContents` or `null` if the contents are not
|
|
4994
|
+
* owned by a window.
|
|
4995
|
+
*/
|
|
4996
|
+
static fromWebContents(webContents: WebContents): (BrowserWindow) | (null);
|
|
4997
|
+
/**
|
|
4998
|
+
* An array of all opened browser windows.
|
|
4999
|
+
*/
|
|
5000
|
+
static getAllWindows(): BrowserWindow[];
|
|
5001
|
+
/**
|
|
5002
|
+
* The window that is focused in this application, otherwise returns `null`.
|
|
5003
|
+
*/
|
|
5004
|
+
static getFocusedWindow(): (BrowserWindow) | (null);
|
|
5005
|
+
/**
|
|
5006
|
+
* Replacement API for setBrowserView supporting work with multi browser views.
|
|
5007
|
+
*
|
|
5008
|
+
* > **Note** The `BrowserView` class is deprecated, and replaced by the new
|
|
5009
|
+
* `WebContentsView` class.
|
|
5010
|
+
*
|
|
5011
|
+
* @experimental
|
|
5012
|
+
* @deprecated
|
|
5013
|
+
*/
|
|
5014
|
+
addBrowserView(browserView: BrowserView): void;
|
|
5015
|
+
/**
|
|
5016
|
+
* Adds a window as a tab on this window, after the tab for the window instance.
|
|
5017
|
+
*
|
|
5018
|
+
* @platform darwin
|
|
5019
|
+
*/
|
|
5020
|
+
addTabbedWindow(browserWindow: BrowserWindow): void;
|
|
5021
|
+
/**
|
|
5022
|
+
* Removes focus from the window.
|
|
5023
|
+
*/
|
|
5024
|
+
blur(): void;
|
|
5025
|
+
blurWebView(): void;
|
|
5026
|
+
/**
|
|
5027
|
+
* Resolves with a NativeImage
|
|
5028
|
+
*
|
|
5029
|
+
* Captures a snapshot of the page within `rect`. Omitting `rect` will capture the
|
|
5030
|
+
* whole visible page. If the page is not visible, `rect` may be empty. The page is
|
|
5031
|
+
* considered visible when its browser window is hidden and the capturer count is
|
|
5032
|
+
* non-zero. If you would like the page to stay hidden, you should ensure that
|
|
5033
|
+
* `stayHidden` is set to true.
|
|
5034
|
+
*/
|
|
5035
|
+
capturePage(rect?: Rectangle, opts?: Opts): Promise<Electron.NativeImage>;
|
|
5036
|
+
/**
|
|
5037
|
+
* Moves window to the center of the screen.
|
|
5038
|
+
*/
|
|
5039
|
+
center(): void;
|
|
5040
|
+
/**
|
|
5041
|
+
* Try to close the window. This has the same effect as a user manually clicking
|
|
5042
|
+
* the close button of the window. The web page may cancel the close though. See
|
|
5043
|
+
* the close event.
|
|
5044
|
+
*/
|
|
5045
|
+
close(): void;
|
|
5046
|
+
/**
|
|
5047
|
+
* Closes the currently open Quick Look panel.
|
|
5048
|
+
*
|
|
5049
|
+
* @platform darwin
|
|
5050
|
+
*/
|
|
5051
|
+
closeFilePreview(): void;
|
|
5052
|
+
/**
|
|
5053
|
+
* Force closing the window, the `unload` and `beforeunload` event won't be emitted
|
|
5054
|
+
* for the web page, and `close` event will also not be emitted for this window,
|
|
5055
|
+
* but it guarantees the `closed` event will be emitted.
|
|
5056
|
+
*/
|
|
5057
|
+
destroy(): void;
|
|
5058
|
+
/**
|
|
5059
|
+
* Starts or stops flashing the window to attract user's attention.
|
|
5060
|
+
*/
|
|
5061
|
+
flashFrame(flag: boolean): void;
|
|
5062
|
+
/**
|
|
5063
|
+
* Focuses on the window.
|
|
5064
|
+
*/
|
|
5065
|
+
focus(): void;
|
|
5066
|
+
focusOnWebView(): void;
|
|
5067
|
+
/**
|
|
5068
|
+
* Gets the background color of the window in Hex (`#RRGGBB`) format.
|
|
5069
|
+
*
|
|
5070
|
+
* See Setting `backgroundColor`.
|
|
5071
|
+
*
|
|
5072
|
+
* **Note:** The alpha value is _not_ returned alongside the red, green, and blue
|
|
5073
|
+
* values.
|
|
5074
|
+
*/
|
|
5075
|
+
getBackgroundColor(): string;
|
|
5076
|
+
/**
|
|
5077
|
+
* The `bounds` of the window as `Object`.
|
|
5078
|
+
*
|
|
5079
|
+
* **Note:** On macOS, the y-coordinate value returned will be at minimum the Tray
|
|
5080
|
+
* height. For example, calling `win.setBounds({ x: 25, y: 20, width: 800, height:
|
|
5081
|
+
* 600 })` with a tray height of 38 means that `win.getBounds()` will return `{ x:
|
|
5082
|
+
* 25, y: 38, width: 800, height: 600 }`.
|
|
5083
|
+
*/
|
|
5084
|
+
getBounds(): Rectangle;
|
|
5085
|
+
/**
|
|
5086
|
+
* The `BrowserView` attached to `win`. Returns `null` if one is not attached.
|
|
5087
|
+
* Throws an error if multiple `BrowserView`s are attached.
|
|
5088
|
+
*
|
|
5089
|
+
* > **Note** The `BrowserView` class is deprecated, and replaced by the new
|
|
5090
|
+
* `WebContentsView` class.
|
|
5091
|
+
*
|
|
5092
|
+
* @experimental
|
|
5093
|
+
* @deprecated
|
|
5094
|
+
*/
|
|
5095
|
+
getBrowserView(): (BrowserView) | (null);
|
|
5096
|
+
/**
|
|
5097
|
+
* a sorted by z-index array of all BrowserViews that have been attached with
|
|
5098
|
+
* `addBrowserView` or `setBrowserView`. The top-most BrowserView is the last
|
|
5099
|
+
* element of the array.
|
|
5100
|
+
*
|
|
5101
|
+
* > **Note** The `BrowserView` class is deprecated, and replaced by the new
|
|
5102
|
+
* `WebContentsView` class.
|
|
5103
|
+
*
|
|
5104
|
+
* @experimental
|
|
5105
|
+
* @deprecated
|
|
5106
|
+
*/
|
|
5107
|
+
getBrowserViews(): BrowserView[];
|
|
5108
|
+
/**
|
|
5109
|
+
* All child windows.
|
|
5110
|
+
*/
|
|
5111
|
+
getChildWindows(): BrowserWindow[];
|
|
5112
|
+
/**
|
|
5113
|
+
* The `bounds` of the window's client area as `Object`.
|
|
5114
|
+
*/
|
|
5115
|
+
getContentBounds(): Rectangle;
|
|
5116
|
+
/**
|
|
5117
|
+
* Contains the window's client area's width and height.
|
|
5118
|
+
*/
|
|
5119
|
+
getContentSize(): number[];
|
|
5120
|
+
/**
|
|
5121
|
+
* Contains the window's maximum width and height.
|
|
5122
|
+
*/
|
|
5123
|
+
getMaximumSize(): number[];
|
|
5124
|
+
/**
|
|
5125
|
+
* Window id in the format of DesktopCapturerSource's id. For example
|
|
5126
|
+
* "window:1324:0".
|
|
5127
|
+
*
|
|
5128
|
+
* More precisely the format is `window:id:other_id` where `id` is `HWND` on
|
|
5129
|
+
* Windows, `CGWindowID` (`uint64_t`) on macOS and `Window` (`unsigned long`) on
|
|
5130
|
+
* Linux. `other_id` is used to identify web contents (tabs) so within the same top
|
|
5131
|
+
* level window.
|
|
5132
|
+
*/
|
|
5133
|
+
getMediaSourceId(): string;
|
|
5134
|
+
/**
|
|
5135
|
+
* Contains the window's minimum width and height.
|
|
5136
|
+
*/
|
|
5137
|
+
getMinimumSize(): number[];
|
|
5138
|
+
/**
|
|
5139
|
+
* The platform-specific handle of the window.
|
|
5140
|
+
*
|
|
5141
|
+
* The native type of the handle is `HWND` on Windows, `NSView*` on macOS, and
|
|
5142
|
+
* `Window` (`unsigned long`) on Linux.
|
|
5143
|
+
*/
|
|
5144
|
+
getNativeWindowHandle(): Buffer;
|
|
5145
|
+
/**
|
|
5146
|
+
* Contains the window bounds of the normal state
|
|
5147
|
+
*
|
|
5148
|
+
* **Note:** whatever the current state of the window : maximized, minimized or in
|
|
5149
|
+
* fullscreen, this function always returns the position and size of the window in
|
|
5150
|
+
* normal state. In normal state, getBounds and getNormalBounds returns the same
|
|
5151
|
+
* `Rectangle`.
|
|
5152
|
+
*/
|
|
5153
|
+
getNormalBounds(): Rectangle;
|
|
5154
|
+
/**
|
|
5155
|
+
* between 0.0 (fully transparent) and 1.0 (fully opaque). On Linux, always returns
|
|
5156
|
+
* 1.
|
|
5157
|
+
*/
|
|
5158
|
+
getOpacity(): number;
|
|
5159
|
+
/**
|
|
5160
|
+
* The parent window or `null` if there is no parent.
|
|
5161
|
+
*/
|
|
5162
|
+
getParentWindow(): (BrowserWindow) | (null);
|
|
5163
|
+
/**
|
|
5164
|
+
* Contains the window's current position.
|
|
5165
|
+
*/
|
|
5166
|
+
getPosition(): number[];
|
|
5167
|
+
/**
|
|
5168
|
+
* The pathname of the file the window represents.
|
|
5169
|
+
*
|
|
5170
|
+
* @platform darwin
|
|
5171
|
+
*/
|
|
5172
|
+
getRepresentedFilename(): string;
|
|
5173
|
+
/**
|
|
5174
|
+
* Contains the window's width and height.
|
|
5175
|
+
*/
|
|
5176
|
+
getSize(): number[];
|
|
5177
|
+
/**
|
|
5178
|
+
* The title of the native window.
|
|
5179
|
+
*
|
|
5180
|
+
* **Note:** The title of the web page can be different from the title of the
|
|
5181
|
+
* native window.
|
|
5182
|
+
*/
|
|
5183
|
+
getTitle(): string;
|
|
5184
|
+
/**
|
|
5185
|
+
* The custom position for the traffic light buttons in frameless window, `null`
|
|
5186
|
+
* will be returned when there is no custom position.
|
|
5187
|
+
*
|
|
5188
|
+
* @platform darwin
|
|
5189
|
+
*/
|
|
5190
|
+
getWindowButtonPosition(): (Point) | (null);
|
|
5191
|
+
/**
|
|
5192
|
+
* Whether the window has a shadow.
|
|
5193
|
+
*/
|
|
5194
|
+
hasShadow(): boolean;
|
|
5195
|
+
/**
|
|
5196
|
+
* Hides the window.
|
|
5197
|
+
*/
|
|
5198
|
+
hide(): void;
|
|
5199
|
+
/**
|
|
5200
|
+
* Hooks a windows message. The `callback` is called when the message is received
|
|
5201
|
+
* in the WndProc.
|
|
5202
|
+
*
|
|
5203
|
+
* @platform win32
|
|
5204
|
+
*/
|
|
5205
|
+
hookWindowMessage(message: number, callback: (wParam: Buffer, lParam: Buffer) => void): void;
|
|
5206
|
+
/**
|
|
5207
|
+
* Invalidates the window shadow so that it is recomputed based on the current
|
|
5208
|
+
* window shape.
|
|
5209
|
+
*
|
|
5210
|
+
* `BrowserWindows` that are transparent can sometimes leave behind visual
|
|
5211
|
+
* artifacts on macOS. This method can be used to clear these artifacts when, for
|
|
5212
|
+
* example, performing an animation.
|
|
5213
|
+
*
|
|
5214
|
+
* @platform darwin
|
|
5215
|
+
*/
|
|
5216
|
+
invalidateShadow(): void;
|
|
5217
|
+
/**
|
|
5218
|
+
* Whether the window is always on top of other windows.
|
|
5219
|
+
*/
|
|
5220
|
+
isAlwaysOnTop(): boolean;
|
|
5221
|
+
/**
|
|
5222
|
+
* Whether the window can be manually closed by user.
|
|
5223
|
+
*
|
|
5224
|
+
* On Linux always returns `true`.
|
|
5225
|
+
*
|
|
5226
|
+
* @platform darwin,win32
|
|
5227
|
+
*/
|
|
5228
|
+
isClosable(): boolean;
|
|
5229
|
+
/**
|
|
5230
|
+
* Whether the window is destroyed.
|
|
5231
|
+
*/
|
|
5232
|
+
isDestroyed(): boolean;
|
|
5233
|
+
/**
|
|
5234
|
+
* Whether the window's document has been edited.
|
|
5235
|
+
*
|
|
5236
|
+
* @platform darwin
|
|
5237
|
+
*/
|
|
5238
|
+
isDocumentEdited(): boolean;
|
|
5239
|
+
/**
|
|
5240
|
+
* whether the window is enabled.
|
|
5241
|
+
*/
|
|
5242
|
+
isEnabled(): boolean;
|
|
5243
|
+
/**
|
|
5244
|
+
* Whether the window can be focused.
|
|
5245
|
+
*
|
|
5246
|
+
* @platform darwin,win32
|
|
5247
|
+
*/
|
|
5248
|
+
isFocusable(): boolean;
|
|
5249
|
+
/**
|
|
5250
|
+
* Whether the window is focused.
|
|
5251
|
+
*/
|
|
5252
|
+
isFocused(): boolean;
|
|
5253
|
+
/**
|
|
5254
|
+
* Whether the window is in fullscreen mode.
|
|
5255
|
+
*/
|
|
5256
|
+
isFullScreen(): boolean;
|
|
5257
|
+
/**
|
|
5258
|
+
* Whether the maximize/zoom window button toggles fullscreen mode or maximizes the
|
|
5259
|
+
* window.
|
|
5260
|
+
*/
|
|
5261
|
+
isFullScreenable(): boolean;
|
|
5262
|
+
/**
|
|
5263
|
+
* Whether the window will be hidden when the user toggles into mission control.
|
|
5264
|
+
*
|
|
5265
|
+
* @platform darwin
|
|
5266
|
+
*/
|
|
5267
|
+
isHiddenInMissionControl(): boolean;
|
|
5268
|
+
/**
|
|
5269
|
+
* Whether the window is in kiosk mode.
|
|
5270
|
+
*/
|
|
5271
|
+
isKiosk(): boolean;
|
|
5272
|
+
/**
|
|
5273
|
+
* Whether the window can be manually maximized by user.
|
|
5274
|
+
*
|
|
5275
|
+
* On Linux always returns `true`.
|
|
5276
|
+
*
|
|
5277
|
+
* @platform darwin,win32
|
|
5278
|
+
*/
|
|
5279
|
+
isMaximizable(): boolean;
|
|
5280
|
+
/**
|
|
5281
|
+
* Whether the window is maximized.
|
|
5282
|
+
*/
|
|
5283
|
+
isMaximized(): boolean;
|
|
5284
|
+
/**
|
|
5285
|
+
* Whether menu bar automatically hides itself.
|
|
5286
|
+
*
|
|
5287
|
+
* @platform win32,linux
|
|
5288
|
+
*/
|
|
5289
|
+
isMenuBarAutoHide(): boolean;
|
|
5290
|
+
/**
|
|
5291
|
+
* Whether the menu bar is visible.
|
|
5292
|
+
*
|
|
5293
|
+
* @platform win32,linux
|
|
5294
|
+
*/
|
|
5295
|
+
isMenuBarVisible(): boolean;
|
|
5296
|
+
/**
|
|
5297
|
+
* Whether the window can be manually minimized by the user.
|
|
5298
|
+
*
|
|
5299
|
+
* On Linux always returns `true`.
|
|
5300
|
+
*
|
|
5301
|
+
* @platform darwin,win32
|
|
5302
|
+
*/
|
|
5303
|
+
isMinimizable(): boolean;
|
|
5304
|
+
/**
|
|
5305
|
+
* Whether the window is minimized.
|
|
5306
|
+
*/
|
|
5307
|
+
isMinimized(): boolean;
|
|
5308
|
+
/**
|
|
5309
|
+
* Whether current window is a modal window.
|
|
5310
|
+
*/
|
|
5311
|
+
isModal(): boolean;
|
|
5312
|
+
/**
|
|
5313
|
+
* Whether the window can be moved by user.
|
|
5314
|
+
*
|
|
5315
|
+
* On Linux always returns `true`.
|
|
5316
|
+
*
|
|
5317
|
+
* @platform darwin,win32
|
|
5318
|
+
*/
|
|
5319
|
+
isMovable(): boolean;
|
|
5320
|
+
/**
|
|
5321
|
+
* Whether the window is in normal state (not maximized, not minimized, not in
|
|
5322
|
+
* fullscreen mode).
|
|
5323
|
+
*/
|
|
5324
|
+
isNormal(): boolean;
|
|
5325
|
+
/**
|
|
5326
|
+
* Whether the window can be manually resized by the user.
|
|
5327
|
+
*/
|
|
5328
|
+
isResizable(): boolean;
|
|
5329
|
+
/**
|
|
5330
|
+
* Whether the window is in simple (pre-Lion) fullscreen mode.
|
|
5331
|
+
*
|
|
5332
|
+
* @platform darwin
|
|
5333
|
+
*/
|
|
5334
|
+
isSimpleFullScreen(): boolean;
|
|
5335
|
+
/**
|
|
5336
|
+
* Whether the window is in Windows 10 tablet mode.
|
|
5337
|
+
*
|
|
5338
|
+
* Since Windows 10 users can use their PC as tablet, under this mode apps can
|
|
5339
|
+
* choose to optimize their UI for tablets, such as enlarging the titlebar and
|
|
5340
|
+
* hiding titlebar buttons.
|
|
5341
|
+
*
|
|
5342
|
+
* This API returns whether the window is in tablet mode, and the `resize` event
|
|
5343
|
+
* can be be used to listen to changes to tablet mode.
|
|
5344
|
+
*
|
|
5345
|
+
* @platform win32
|
|
5346
|
+
*/
|
|
5347
|
+
isTabletMode(): boolean;
|
|
5348
|
+
/**
|
|
5349
|
+
* Whether the window is visible to the user in the foreground of the app.
|
|
5350
|
+
*/
|
|
5351
|
+
isVisible(): boolean;
|
|
5352
|
+
/**
|
|
5353
|
+
* Whether the window is visible on all workspaces.
|
|
5354
|
+
*
|
|
5355
|
+
* **Note:** This API always returns false on Windows.
|
|
5356
|
+
*
|
|
5357
|
+
* @platform darwin,linux
|
|
5358
|
+
*/
|
|
5359
|
+
isVisibleOnAllWorkspaces(): boolean;
|
|
5360
|
+
/**
|
|
5361
|
+
* `true` or `false` depending on whether the message is hooked.
|
|
5362
|
+
*
|
|
5363
|
+
* @platform win32
|
|
5364
|
+
*/
|
|
5365
|
+
isWindowMessageHooked(message: number): boolean;
|
|
5366
|
+
/**
|
|
5367
|
+
* the promise will resolve when the page has finished loading (see
|
|
5368
|
+
* `did-finish-load`), and rejects if the page fails to load (see `did-fail-load`).
|
|
5369
|
+
*
|
|
5370
|
+
* Same as `webContents.loadFile`, `filePath` should be a path to an HTML file
|
|
5371
|
+
* relative to the root of your application. See the `webContents` docs for more
|
|
5372
|
+
* information.
|
|
5373
|
+
*/
|
|
5374
|
+
loadFile(filePath: string, options?: LoadFileOptions): Promise<void>;
|
|
5375
|
+
/**
|
|
5376
|
+
* the promise will resolve when the page has finished loading (see
|
|
5377
|
+
* `did-finish-load`), and rejects if the page fails to load (see `did-fail-load`).
|
|
5378
|
+
*
|
|
5379
|
+
* Same as `webContents.loadURL(url[, options])`.
|
|
5380
|
+
*
|
|
5381
|
+
* The `url` can be a remote address (e.g. `http://`) or a path to a local HTML
|
|
5382
|
+
* file using the `file://` protocol.
|
|
5383
|
+
*
|
|
5384
|
+
* To ensure that file URLs are properly formatted, it is recommended to use Node's
|
|
5385
|
+
* `url.format` method:
|
|
5386
|
+
*
|
|
5387
|
+
* You can load a URL using a `POST` request with URL-encoded data by doing the
|
|
5388
|
+
* following:
|
|
5389
|
+
*/
|
|
5390
|
+
loadURL(url: string, options?: LoadURLOptions): Promise<void>;
|
|
5391
|
+
/**
|
|
5392
|
+
* Maximizes the window. This will also show (but not focus) the window if it isn't
|
|
5393
|
+
* being displayed already.
|
|
5394
|
+
*/
|
|
5395
|
+
maximize(): void;
|
|
5396
|
+
/**
|
|
5397
|
+
* Merges all windows into one window with multiple tabs when native tabs are
|
|
5398
|
+
* enabled and there is more than one open window.
|
|
5399
|
+
*
|
|
5400
|
+
* @platform darwin
|
|
5401
|
+
*/
|
|
5402
|
+
mergeAllWindows(): void;
|
|
5403
|
+
/**
|
|
5404
|
+
* Minimizes the window. On some platforms the minimized window will be shown in
|
|
5405
|
+
* the Dock.
|
|
5406
|
+
*/
|
|
5407
|
+
minimize(): void;
|
|
5408
|
+
/**
|
|
5409
|
+
* Moves window above the source window in the sense of z-order. If the
|
|
5410
|
+
* `mediaSourceId` is not of type window or if the window does not exist then this
|
|
5411
|
+
* method throws an error.
|
|
5412
|
+
*/
|
|
5413
|
+
moveAbove(mediaSourceId: string): void;
|
|
5414
|
+
/**
|
|
5415
|
+
* Moves the current tab into a new window if native tabs are enabled and there is
|
|
5416
|
+
* more than one tab in the current window.
|
|
5417
|
+
*
|
|
5418
|
+
* @platform darwin
|
|
5419
|
+
*/
|
|
5420
|
+
moveTabToNewWindow(): void;
|
|
5421
|
+
/**
|
|
5422
|
+
* Moves window to top(z-order) regardless of focus
|
|
5423
|
+
*/
|
|
5424
|
+
moveTop(): void;
|
|
5425
|
+
/**
|
|
5426
|
+
* Uses Quick Look to preview a file at a given path.
|
|
5427
|
+
*
|
|
5428
|
+
* @platform darwin
|
|
5429
|
+
*/
|
|
5430
|
+
previewFile(path: string, displayName?: string): void;
|
|
5431
|
+
/**
|
|
5432
|
+
* Same as `webContents.reload`.
|
|
5433
|
+
*/
|
|
5434
|
+
reload(): void;
|
|
5435
|
+
/**
|
|
5436
|
+
* > **Note** The `BrowserView` class is deprecated, and replaced by the new
|
|
5437
|
+
* `WebContentsView` class.
|
|
5438
|
+
*
|
|
5439
|
+
* @experimental
|
|
5440
|
+
* @deprecated
|
|
5441
|
+
*/
|
|
5442
|
+
removeBrowserView(browserView: BrowserView): void;
|
|
5443
|
+
/**
|
|
5444
|
+
* Remove the window's menu bar.
|
|
5445
|
+
*
|
|
5446
|
+
* @platform linux,win32
|
|
5447
|
+
*/
|
|
5448
|
+
removeMenu(): void;
|
|
5449
|
+
/**
|
|
5450
|
+
* Restores the window from minimized state to its previous state.
|
|
5451
|
+
*/
|
|
5452
|
+
restore(): void;
|
|
5453
|
+
/**
|
|
5454
|
+
* Selects the next tab when native tabs are enabled and there are other tabs in
|
|
5455
|
+
* the window.
|
|
5456
|
+
*
|
|
5457
|
+
* @platform darwin
|
|
5458
|
+
*/
|
|
5459
|
+
selectNextTab(): void;
|
|
5460
|
+
/**
|
|
5461
|
+
* Selects the previous tab when native tabs are enabled and there are other tabs
|
|
5462
|
+
* in the window.
|
|
5463
|
+
*
|
|
5464
|
+
* @platform darwin
|
|
5465
|
+
*/
|
|
5466
|
+
selectPreviousTab(): void;
|
|
5467
|
+
/**
|
|
5468
|
+
* Sets whether the window should show always on top of other windows. After
|
|
5469
|
+
* setting this, the window is still a normal window, not a toolbox window which
|
|
5470
|
+
* can not be focused on.
|
|
5471
|
+
*/
|
|
5472
|
+
setAlwaysOnTop(flag: boolean, level?: 'normal' | 'floating' | 'torn-off-menu' | 'modal-panel' | 'main-menu' | 'status' | 'pop-up-menu' | 'screen-saver', relativeLevel?: number): void;
|
|
5473
|
+
/**
|
|
5474
|
+
* Sets the properties for the window's taskbar button.
|
|
5475
|
+
*
|
|
5476
|
+
* **Note:** `relaunchCommand` and `relaunchDisplayName` must always be set
|
|
5477
|
+
* together. If one of those properties is not set, then neither will be used.
|
|
5478
|
+
*
|
|
5479
|
+
* @platform win32
|
|
5480
|
+
*/
|
|
5481
|
+
setAppDetails(options: AppDetailsOptions): void;
|
|
5482
|
+
/**
|
|
5483
|
+
* This will make a window maintain an aspect ratio. The extra size allows a
|
|
5484
|
+
* developer to have space, specified in pixels, not included within the aspect
|
|
5485
|
+
* ratio calculations. This API already takes into account the difference between a
|
|
5486
|
+
* window's size and its content size.
|
|
5487
|
+
*
|
|
5488
|
+
* Consider a normal window with an HD video player and associated controls.
|
|
5489
|
+
* Perhaps there are 15 pixels of controls on the left edge, 25 pixels of controls
|
|
5490
|
+
* on the right edge and 50 pixels of controls below the player. In order to
|
|
5491
|
+
* maintain a 16:9 aspect ratio (standard aspect ratio for HD @1920x1080) within
|
|
5492
|
+
* the player itself we would call this function with arguments of 16/9 and {
|
|
5493
|
+
* width: 40, height: 50 }. The second argument doesn't care where the extra width
|
|
5494
|
+
* and height are within the content view--only that they exist. Sum any extra
|
|
5495
|
+
* width and height areas you have within the overall content view.
|
|
5496
|
+
*
|
|
5497
|
+
* The aspect ratio is not respected when window is resized programmatically with
|
|
5498
|
+
* APIs like `win.setSize`.
|
|
5499
|
+
*
|
|
5500
|
+
* To reset an aspect ratio, pass 0 as the `aspectRatio` value:
|
|
5501
|
+
* `win.setAspectRatio(0)`.
|
|
5502
|
+
*/
|
|
5503
|
+
setAspectRatio(aspectRatio: number, extraSize?: Size): void;
|
|
5504
|
+
/**
|
|
5505
|
+
* Controls whether to hide cursor when typing.
|
|
5506
|
+
*
|
|
5507
|
+
* @platform darwin
|
|
5508
|
+
*/
|
|
5509
|
+
setAutoHideCursor(autoHide: boolean): void;
|
|
5510
|
+
/**
|
|
5511
|
+
* Sets whether the window menu bar should hide itself automatically. Once set the
|
|
5512
|
+
* menu bar will only show when users press the single `Alt` key.
|
|
5513
|
+
*
|
|
5514
|
+
* If the menu bar is already visible, calling `setAutoHideMenuBar(true)` won't
|
|
5515
|
+
* hide it immediately.
|
|
5516
|
+
*
|
|
5517
|
+
* @platform win32,linux
|
|
5518
|
+
*/
|
|
5519
|
+
setAutoHideMenuBar(hide: boolean): void;
|
|
5520
|
+
/**
|
|
5521
|
+
* Examples of valid `backgroundColor` values:
|
|
5522
|
+
*
|
|
5523
|
+
* * Hex
|
|
5524
|
+
* * #fff (shorthand RGB)
|
|
5525
|
+
* * #ffff (shorthand ARGB)
|
|
5526
|
+
* * #ffffff (RGB)
|
|
5527
|
+
* * #ffffffff (ARGB)
|
|
5528
|
+
* * RGB
|
|
5529
|
+
* * `rgb\(([\d]+),\s*([\d]+),\s*([\d]+)\)`
|
|
5530
|
+
* * e.g. rgb(255, 255, 255)
|
|
5531
|
+
* * RGBA
|
|
5532
|
+
* * `rgba\(([\d]+),\s*([\d]+),\s*([\d]+),\s*([\d.]+)\)`
|
|
5533
|
+
* * e.g. rgba(255, 255, 255, 1.0)
|
|
5534
|
+
* * HSL
|
|
5535
|
+
* * `hsl\((-?[\d.]+),\s*([\d.]+)%,\s*([\d.]+)%\)`
|
|
5536
|
+
* * e.g. hsl(200, 20%, 50%)
|
|
5537
|
+
* * HSLA
|
|
5538
|
+
* * `hsla\((-?[\d.]+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)`
|
|
5539
|
+
* * e.g. hsla(200, 20%, 50%, 0.5)
|
|
5540
|
+
* * Color name
|
|
5541
|
+
* * Options are listed in SkParseColor.cpp
|
|
5542
|
+
* * Similar to CSS Color Module Level 3 keywords, but case-sensitive.
|
|
5543
|
+
* * e.g. `blueviolet` or `red`
|
|
5544
|
+
*
|
|
5545
|
+
* Sets the background color of the window. See Setting `backgroundColor`.
|
|
5546
|
+
*/
|
|
5547
|
+
setBackgroundColor(backgroundColor: string): void;
|
|
5548
|
+
/**
|
|
5549
|
+
* This method sets the browser window's system-drawn background material,
|
|
5550
|
+
* including behind the non-client area.
|
|
5551
|
+
*
|
|
5552
|
+
* See the Windows documentation for more details.
|
|
5553
|
+
*
|
|
5554
|
+
* **Note:** This method is only supported on Windows 11 22H2 and up.
|
|
5555
|
+
*
|
|
5556
|
+
* @platform win32
|
|
5557
|
+
*/
|
|
5558
|
+
setBackgroundMaterial(material: 'auto' | 'none' | 'mica' | 'acrylic' | 'tabbed'): void;
|
|
5559
|
+
/**
|
|
5560
|
+
* Resizes and moves the window to the supplied bounds. Any properties that are not
|
|
5561
|
+
* supplied will default to their current values.
|
|
5562
|
+
*
|
|
5563
|
+
* **Note:** On macOS, the y-coordinate value cannot be smaller than the Tray
|
|
5564
|
+
* height. The tray height has changed over time and depends on the operating
|
|
5565
|
+
* system, but is between 20-40px. Passing a value lower than the tray height will
|
|
5566
|
+
* result in a window that is flush to the tray.
|
|
5567
|
+
*/
|
|
5568
|
+
setBounds(bounds: Partial<Rectangle>, animate?: boolean): void;
|
|
5569
|
+
/**
|
|
5570
|
+
* > **Note** The `BrowserView` class is deprecated, and replaced by the new
|
|
5571
|
+
* `WebContentsView` class.
|
|
5572
|
+
*
|
|
5573
|
+
* @experimental
|
|
5574
|
+
* @deprecated
|
|
5575
|
+
*/
|
|
5576
|
+
setBrowserView(browserView: (BrowserView) | (null)): void;
|
|
5577
|
+
/**
|
|
5578
|
+
* Sets whether the window can be manually closed by user. On Linux does nothing.
|
|
5579
|
+
*
|
|
5580
|
+
* @platform darwin,win32
|
|
5581
|
+
*/
|
|
5582
|
+
setClosable(closable: boolean): void;
|
|
5583
|
+
/**
|
|
5584
|
+
* Resizes and moves the window's client area (e.g. the web page) to the supplied
|
|
5585
|
+
* bounds.
|
|
5586
|
+
*/
|
|
5587
|
+
setContentBounds(bounds: Rectangle, animate?: boolean): void;
|
|
5588
|
+
/**
|
|
5589
|
+
* Prevents the window contents from being captured by other apps.
|
|
5590
|
+
*
|
|
5591
|
+
* On macOS it sets the NSWindow's sharingType to NSWindowSharingNone. On Windows
|
|
5592
|
+
* it calls SetWindowDisplayAffinity with `WDA_EXCLUDEFROMCAPTURE`. For Windows 10
|
|
5593
|
+
* version 2004 and up the window will be removed from capture entirely, older
|
|
5594
|
+
* Windows versions behave as if `WDA_MONITOR` is applied capturing a black window.
|
|
5595
|
+
*
|
|
5596
|
+
* @platform darwin,win32
|
|
5597
|
+
*/
|
|
5598
|
+
setContentProtection(enable: boolean): void;
|
|
5599
|
+
/**
|
|
5600
|
+
* Resizes the window's client area (e.g. the web page) to `width` and `height`.
|
|
5601
|
+
*/
|
|
5602
|
+
setContentSize(width: number, height: number, animate?: boolean): void;
|
|
5603
|
+
/**
|
|
5604
|
+
* Specifies whether the window’s document has been edited, and the icon in title
|
|
5605
|
+
* bar will become gray when set to `true`.
|
|
5606
|
+
*
|
|
5607
|
+
* @platform darwin
|
|
5608
|
+
*/
|
|
5609
|
+
setDocumentEdited(edited: boolean): void;
|
|
5610
|
+
/**
|
|
5611
|
+
* Disable or enable the window.
|
|
5612
|
+
*/
|
|
5613
|
+
setEnabled(enable: boolean): void;
|
|
5614
|
+
/**
|
|
5615
|
+
* Changes whether the window can be focused.
|
|
5616
|
+
*
|
|
5617
|
+
* On macOS it does not remove the focus from the window.
|
|
5618
|
+
*
|
|
5619
|
+
* @platform darwin,win32
|
|
5620
|
+
*/
|
|
5621
|
+
setFocusable(focusable: boolean): void;
|
|
5622
|
+
/**
|
|
5623
|
+
* Sets whether the window should be in fullscreen mode.
|
|
5624
|
+
*
|
|
5625
|
+
* **Note:** On macOS, fullscreen transitions take place asynchronously. If further
|
|
5626
|
+
* actions depend on the fullscreen state, use the 'enter-full-screen' or
|
|
5627
|
+
* 'leave-full-screen' events.
|
|
5628
|
+
*/
|
|
5629
|
+
setFullScreen(flag: boolean): void;
|
|
5630
|
+
/**
|
|
5631
|
+
* Sets whether the maximize/zoom window button toggles fullscreen mode or
|
|
5632
|
+
* maximizes the window.
|
|
5633
|
+
*/
|
|
5634
|
+
setFullScreenable(fullscreenable: boolean): void;
|
|
5635
|
+
/**
|
|
5636
|
+
* Sets whether the window should have a shadow.
|
|
5637
|
+
*/
|
|
5638
|
+
setHasShadow(hasShadow: boolean): void;
|
|
5639
|
+
/**
|
|
5640
|
+
* Sets whether the window will be hidden when the user toggles into mission
|
|
5641
|
+
* control.
|
|
5642
|
+
*
|
|
5643
|
+
* @platform darwin
|
|
5644
|
+
*/
|
|
5645
|
+
setHiddenInMissionControl(hidden: boolean): void;
|
|
5646
|
+
/**
|
|
5647
|
+
* Changes window icon.
|
|
5648
|
+
*
|
|
5649
|
+
* @platform win32,linux
|
|
5650
|
+
*/
|
|
5651
|
+
setIcon(icon: (NativeImage) | (string)): void;
|
|
5652
|
+
/**
|
|
5653
|
+
* Makes the window ignore all mouse events.
|
|
5654
|
+
*
|
|
5655
|
+
* All mouse events happened in this window will be passed to the window below this
|
|
5656
|
+
* window, but if this window has focus, it will still receive keyboard events.
|
|
5657
|
+
*/
|
|
5658
|
+
setIgnoreMouseEvents(ignore: boolean, options?: IgnoreMouseEventsOptions): void;
|
|
5659
|
+
/**
|
|
5660
|
+
* Enters or leaves kiosk mode.
|
|
5661
|
+
*/
|
|
5662
|
+
setKiosk(flag: boolean): void;
|
|
5663
|
+
/**
|
|
5664
|
+
* Sets whether the window can be manually maximized by user. On Linux does
|
|
5665
|
+
* nothing.
|
|
5666
|
+
*
|
|
5667
|
+
* @platform darwin,win32
|
|
5668
|
+
*/
|
|
5669
|
+
setMaximizable(maximizable: boolean): void;
|
|
5670
|
+
/**
|
|
5671
|
+
* Sets the maximum size of window to `width` and `height`.
|
|
5672
|
+
*/
|
|
5673
|
+
setMaximumSize(width: number, height: number): void;
|
|
5674
|
+
/**
|
|
5675
|
+
* Sets the `menu` as the window's menu bar.
|
|
5676
|
+
*
|
|
5677
|
+
* @platform linux,win32
|
|
5678
|
+
*/
|
|
5679
|
+
setMenu(menu: (Menu) | (null)): void;
|
|
5680
|
+
/**
|
|
5681
|
+
* Sets whether the menu bar should be visible. If the menu bar is auto-hide, users
|
|
5682
|
+
* can still bring up the menu bar by pressing the single `Alt` key.
|
|
5683
|
+
*
|
|
5684
|
+
* @platform win32,linux
|
|
5685
|
+
*/
|
|
5686
|
+
setMenuBarVisibility(visible: boolean): void;
|
|
5687
|
+
/**
|
|
5688
|
+
* Sets whether the window can be manually minimized by user. On Linux does
|
|
5689
|
+
* nothing.
|
|
5690
|
+
*
|
|
5691
|
+
* @platform darwin,win32
|
|
5692
|
+
*/
|
|
5693
|
+
setMinimizable(minimizable: boolean): void;
|
|
5694
|
+
/**
|
|
5695
|
+
* Sets the minimum size of window to `width` and `height`.
|
|
5696
|
+
*/
|
|
5697
|
+
setMinimumSize(width: number, height: number): void;
|
|
5698
|
+
/**
|
|
5699
|
+
* Sets whether the window can be moved by user. On Linux does nothing.
|
|
5700
|
+
*
|
|
5701
|
+
* @platform darwin,win32
|
|
5702
|
+
*/
|
|
5703
|
+
setMovable(movable: boolean): void;
|
|
5704
|
+
/**
|
|
5705
|
+
* Sets the opacity of the window. On Linux, does nothing. Out of bound number
|
|
5706
|
+
* values are clamped to the [0, 1] range.
|
|
5707
|
+
*
|
|
5708
|
+
* @platform win32,darwin
|
|
5709
|
+
*/
|
|
5710
|
+
setOpacity(opacity: number): void;
|
|
5711
|
+
/**
|
|
5712
|
+
* Sets a 16 x 16 pixel overlay onto the current taskbar icon, usually used to
|
|
5713
|
+
* convey some sort of application status or to passively notify the user.
|
|
5714
|
+
*
|
|
5715
|
+
* @platform win32
|
|
5716
|
+
*/
|
|
5717
|
+
setOverlayIcon(overlay: (NativeImage) | (null), description: string): void;
|
|
5718
|
+
/**
|
|
5719
|
+
* Sets `parent` as current window's parent window, passing `null` will turn
|
|
5720
|
+
* current window into a top-level window.
|
|
5721
|
+
*/
|
|
5722
|
+
setParentWindow(parent: (BrowserWindow) | (null)): void;
|
|
5723
|
+
/**
|
|
5724
|
+
* Moves window to `x` and `y`.
|
|
5725
|
+
*/
|
|
5726
|
+
setPosition(x: number, y: number, animate?: boolean): void;
|
|
5727
|
+
/**
|
|
5728
|
+
* Sets progress value in progress bar. Valid range is [0, 1.0].
|
|
5729
|
+
*
|
|
5730
|
+
* Remove progress bar when progress < 0; Change to indeterminate mode when
|
|
5731
|
+
* progress > 1.
|
|
5732
|
+
*
|
|
5733
|
+
* On Linux platform, only supports Unity desktop environment, you need to specify
|
|
5734
|
+
* the `*.desktop` file name to `desktopName` field in `package.json`. By default,
|
|
5735
|
+
* it will assume `{app.name}.desktop`.
|
|
5736
|
+
*
|
|
5737
|
+
* On Windows, a mode can be passed. Accepted values are `none`, `normal`,
|
|
5738
|
+
* `indeterminate`, `error`, and `paused`. If you call `setProgressBar` without a
|
|
5739
|
+
* mode set (but with a value within the valid range), `normal` will be assumed.
|
|
5740
|
+
*/
|
|
5741
|
+
setProgressBar(progress: number, options?: ProgressBarOptions): void;
|
|
5742
|
+
/**
|
|
5743
|
+
* Sets the pathname of the file the window represents, and the icon of the file
|
|
5744
|
+
* will show in window's title bar.
|
|
5745
|
+
*
|
|
5746
|
+
* @platform darwin
|
|
5747
|
+
*/
|
|
5748
|
+
setRepresentedFilename(filename: string): void;
|
|
5749
|
+
/**
|
|
5750
|
+
* Sets whether the window can be manually resized by the user.
|
|
5751
|
+
*/
|
|
5752
|
+
setResizable(resizable: boolean): void;
|
|
5753
|
+
/**
|
|
5754
|
+
* Setting a window shape determines the area within the window where the system
|
|
5755
|
+
* permits drawing and user interaction. Outside of the given region, no pixels
|
|
5756
|
+
* will be drawn and no mouse events will be registered. Mouse events outside of
|
|
5757
|
+
* the region will not be received by that window, but will fall through to
|
|
5758
|
+
* whatever is behind the window.
|
|
5759
|
+
*
|
|
5760
|
+
* @experimental
|
|
5761
|
+
* @platform win32,linux
|
|
5762
|
+
*/
|
|
5763
|
+
setShape(rects: Rectangle[]): void;
|
|
5764
|
+
/**
|
|
5765
|
+
* Changes the attachment point for sheets on macOS. By default, sheets are
|
|
5766
|
+
* attached just below the window frame, but you may want to display them beneath a
|
|
5767
|
+
* HTML-rendered toolbar. For example:
|
|
5768
|
+
*
|
|
5769
|
+
* @platform darwin
|
|
5770
|
+
*/
|
|
5771
|
+
setSheetOffset(offsetY: number, offsetX?: number): void;
|
|
5772
|
+
/**
|
|
5773
|
+
* Enters or leaves simple fullscreen mode.
|
|
5774
|
+
*
|
|
5775
|
+
* Simple fullscreen mode emulates the native fullscreen behavior found in versions
|
|
5776
|
+
* of macOS prior to Lion (10.7).
|
|
5777
|
+
*
|
|
5778
|
+
* @platform darwin
|
|
5779
|
+
*/
|
|
5780
|
+
setSimpleFullScreen(flag: boolean): void;
|
|
5781
|
+
/**
|
|
5782
|
+
* Resizes the window to `width` and `height`. If `width` or `height` are below any
|
|
5783
|
+
* set minimum size constraints the window will snap to its minimum size.
|
|
5784
|
+
*/
|
|
5785
|
+
setSize(width: number, height: number, animate?: boolean): void;
|
|
5786
|
+
/**
|
|
5787
|
+
* Makes the window not show in the taskbar.
|
|
5788
|
+
*
|
|
5789
|
+
* @platform darwin,win32
|
|
5790
|
+
*/
|
|
5791
|
+
setSkipTaskbar(skip: boolean): void;
|
|
5792
|
+
/**
|
|
5793
|
+
* Whether the buttons were added successfully
|
|
5794
|
+
*
|
|
5795
|
+
* Add a thumbnail toolbar with a specified set of buttons to the thumbnail image
|
|
5796
|
+
* of a window in a taskbar button layout. Returns a `boolean` object indicates
|
|
5797
|
+
* whether the thumbnail has been added successfully.
|
|
5798
|
+
*
|
|
5799
|
+
* The number of buttons in thumbnail toolbar should be no greater than 7 due to
|
|
5800
|
+
* the limited room. Once you setup the thumbnail toolbar, the toolbar cannot be
|
|
5801
|
+
* removed due to the platform's limitation. But you can call the API with an empty
|
|
5802
|
+
* array to clean the buttons.
|
|
5803
|
+
*
|
|
5804
|
+
* The `buttons` is an array of `Button` objects:
|
|
5805
|
+
*
|
|
5806
|
+
* * `Button` Object
|
|
5807
|
+
* * `icon` NativeImage - The icon showing in thumbnail toolbar.
|
|
5808
|
+
* * `click` Function
|
|
5809
|
+
* * `tooltip` string (optional) - The text of the button's tooltip.
|
|
5810
|
+
* * `flags` string[] (optional) - Control specific states and behaviors of the
|
|
5811
|
+
* button. By default, it is `['enabled']`.
|
|
5812
|
+
*
|
|
5813
|
+
* The `flags` is an array that can include following `string`s:
|
|
5814
|
+
*
|
|
5815
|
+
* * `enabled` - The button is active and available to the user.
|
|
5816
|
+
* * `disabled` - The button is disabled. It is present, but has a visual state
|
|
5817
|
+
* indicating it will not respond to user action.
|
|
5818
|
+
* * `dismissonclick` - When the button is clicked, the thumbnail window closes
|
|
5819
|
+
* immediately.
|
|
5820
|
+
* * `nobackground` - Do not draw a button border, use only the image.
|
|
5821
|
+
* * `hidden` - The button is not shown to the user.
|
|
5822
|
+
* * `noninteractive` - The button is enabled but not interactive; no pressed
|
|
5823
|
+
* button state is drawn. This value is intended for instances where the button is
|
|
5824
|
+
* used in a notification.
|
|
5825
|
+
*
|
|
5826
|
+
* @platform win32
|
|
5827
|
+
*/
|
|
5828
|
+
setThumbarButtons(buttons: ThumbarButton[]): boolean;
|
|
5829
|
+
/**
|
|
5830
|
+
* Sets the region of the window to show as the thumbnail image displayed when
|
|
5831
|
+
* hovering over the window in the taskbar. You can reset the thumbnail to be the
|
|
5832
|
+
* entire window by specifying an empty region: `{ x: 0, y: 0, width: 0, height: 0
|
|
5833
|
+
* }`.
|
|
5834
|
+
*
|
|
5835
|
+
* @platform win32
|
|
5836
|
+
*/
|
|
5837
|
+
setThumbnailClip(region: Rectangle): void;
|
|
5838
|
+
/**
|
|
5839
|
+
* Sets the toolTip that is displayed when hovering over the window thumbnail in
|
|
5840
|
+
* the taskbar.
|
|
5841
|
+
*
|
|
5842
|
+
* @platform win32
|
|
5843
|
+
*/
|
|
5844
|
+
setThumbnailToolTip(toolTip: string): void;
|
|
5845
|
+
/**
|
|
5846
|
+
* Changes the title of native window to `title`.
|
|
5847
|
+
*/
|
|
5848
|
+
setTitle(title: string): void;
|
|
5849
|
+
/**
|
|
5850
|
+
* On a Window with Window Controls Overlay already enabled, this method updates
|
|
5851
|
+
* the style of the title bar overlay.
|
|
5852
|
+
*
|
|
5853
|
+
* @platform win32
|
|
5854
|
+
*/
|
|
5855
|
+
setTitleBarOverlay(options: TitleBarOverlay): void;
|
|
5856
|
+
/**
|
|
5857
|
+
* Raises `browserView` above other `BrowserView`s attached to `win`. Throws an
|
|
5858
|
+
* error if `browserView` is not attached to `win`.
|
|
5859
|
+
*
|
|
5860
|
+
* > **Note** The `BrowserView` class is deprecated, and replaced by the new
|
|
5861
|
+
* `WebContentsView` class.
|
|
5862
|
+
*
|
|
5863
|
+
* @experimental
|
|
5864
|
+
* @deprecated
|
|
5865
|
+
*/
|
|
5866
|
+
setTopBrowserView(browserView: BrowserView): void;
|
|
5867
|
+
/**
|
|
5868
|
+
* Sets the touchBar layout for the current window. Specifying `null` or
|
|
5869
|
+
* `undefined` clears the touch bar. This method only has an effect if the machine
|
|
5870
|
+
* has a touch bar.
|
|
5871
|
+
*
|
|
5872
|
+
* **Note:** The TouchBar API is currently experimental and may change or be
|
|
5873
|
+
* removed in future Electron releases.
|
|
5874
|
+
*
|
|
5875
|
+
* @platform darwin
|
|
5876
|
+
*/
|
|
5877
|
+
setTouchBar(touchBar: (TouchBar) | (null)): void;
|
|
5878
|
+
/**
|
|
5879
|
+
* Adds a vibrancy effect to the browser window. Passing `null` or an empty string
|
|
5880
|
+
* will remove the vibrancy effect on the window.
|
|
5881
|
+
*
|
|
5882
|
+
* @platform darwin
|
|
5883
|
+
*/
|
|
5884
|
+
setVibrancy(type: (('titlebar' | 'selection' | 'menu' | 'popover' | 'sidebar' | 'header' | 'sheet' | 'window' | 'hud' | 'fullscreen-ui' | 'tooltip' | 'content' | 'under-window' | 'under-page')) | (null)): void;
|
|
5885
|
+
/**
|
|
5886
|
+
* Sets whether the window should be visible on all workspaces.
|
|
5887
|
+
*
|
|
5888
|
+
* **Note:** This API does nothing on Windows.
|
|
5889
|
+
*
|
|
5890
|
+
* @platform darwin,linux
|
|
5891
|
+
*/
|
|
5892
|
+
setVisibleOnAllWorkspaces(visible: boolean, options?: VisibleOnAllWorkspacesOptions): void;
|
|
5893
|
+
/**
|
|
5894
|
+
* Set a custom position for the traffic light buttons in frameless window. Passing
|
|
5895
|
+
* `null` will reset the position to default.
|
|
5896
|
+
*
|
|
5897
|
+
* @platform darwin
|
|
5898
|
+
*/
|
|
5899
|
+
setWindowButtonPosition(position: (Point) | (null)): void;
|
|
5900
|
+
/**
|
|
5901
|
+
* Sets whether the window traffic light buttons should be visible.
|
|
5902
|
+
*
|
|
5903
|
+
* @platform darwin
|
|
5904
|
+
*/
|
|
5905
|
+
setWindowButtonVisibility(visible: boolean): void;
|
|
5906
|
+
/**
|
|
5907
|
+
* Shows and gives focus to the window.
|
|
5908
|
+
*/
|
|
5909
|
+
show(): void;
|
|
5910
|
+
/**
|
|
5911
|
+
* Shows or hides the tab overview when native tabs are enabled.
|
|
5912
|
+
*
|
|
5913
|
+
* @platform darwin
|
|
5914
|
+
*/
|
|
5915
|
+
showAllTabs(): void;
|
|
5916
|
+
/**
|
|
5917
|
+
* Same as `webContents.showDefinitionForSelection()`.
|
|
5918
|
+
*
|
|
5919
|
+
* @platform darwin
|
|
5920
|
+
*/
|
|
5921
|
+
showDefinitionForSelection(): void;
|
|
5922
|
+
/**
|
|
5923
|
+
* Shows the window but doesn't focus on it.
|
|
5924
|
+
*/
|
|
5925
|
+
showInactive(): void;
|
|
5926
|
+
/**
|
|
5927
|
+
* Toggles the visibility of the tab bar if native tabs are enabled and there is
|
|
5928
|
+
* only one tab in the current window.
|
|
5929
|
+
*
|
|
5930
|
+
* @platform darwin
|
|
5931
|
+
*/
|
|
5932
|
+
toggleTabBar(): void;
|
|
5933
|
+
/**
|
|
5934
|
+
* Unhooks all of the window messages.
|
|
5935
|
+
*
|
|
5936
|
+
* @platform win32
|
|
5937
|
+
*/
|
|
5938
|
+
unhookAllWindowMessages(): void;
|
|
5939
|
+
/**
|
|
5940
|
+
* Unhook the window message.
|
|
5941
|
+
*
|
|
5942
|
+
* @platform win32
|
|
5943
|
+
*/
|
|
5944
|
+
unhookWindowMessage(message: number): void;
|
|
5945
|
+
/**
|
|
5946
|
+
* Unmaximizes the window.
|
|
5947
|
+
*/
|
|
5948
|
+
unmaximize(): void;
|
|
5949
|
+
/**
|
|
5950
|
+
* A `string` property that defines an alternative title provided only to
|
|
5951
|
+
* accessibility tools such as screen readers. This string is not directly visible
|
|
5952
|
+
* to users.
|
|
5953
|
+
*/
|
|
5954
|
+
accessibleTitle: string;
|
|
5955
|
+
/**
|
|
5956
|
+
* A `boolean` property that determines whether the window menu bar should hide
|
|
5957
|
+
* itself automatically. Once set, the menu bar will only show when users press the
|
|
5958
|
+
* single `Alt` key.
|
|
5959
|
+
*
|
|
5960
|
+
* If the menu bar is already visible, setting this property to `true` won't hide
|
|
5961
|
+
* it immediately.
|
|
5962
|
+
*/
|
|
5963
|
+
autoHideMenuBar: boolean;
|
|
5964
|
+
/**
|
|
5965
|
+
* A `boolean` property that determines whether the window can be manually closed
|
|
5966
|
+
* by user.
|
|
5967
|
+
*
|
|
5968
|
+
* On Linux the setter is a no-op, although the getter returns `true`.
|
|
5969
|
+
*
|
|
5970
|
+
* @platform darwin,win32
|
|
5971
|
+
*/
|
|
5972
|
+
closable: boolean;
|
|
5973
|
+
/**
|
|
5974
|
+
* A `boolean` property that specifies whether the window’s document has been
|
|
5975
|
+
* edited.
|
|
3855
5976
|
*
|
|
3856
|
-
*
|
|
5977
|
+
* The icon in title bar will become gray when set to `true`.
|
|
5978
|
+
*
|
|
5979
|
+
* @platform darwin
|
|
3857
5980
|
*/
|
|
3858
|
-
|
|
5981
|
+
documentEdited: boolean;
|
|
3859
5982
|
/**
|
|
3860
|
-
*
|
|
3861
|
-
*
|
|
5983
|
+
* A `boolean` property that determines whether the window is excluded from the
|
|
5984
|
+
* application’s Windows menu. `false` by default.
|
|
3862
5985
|
*
|
|
3863
|
-
* @platform darwin
|
|
5986
|
+
* @platform darwin
|
|
3864
5987
|
*/
|
|
3865
|
-
|
|
5988
|
+
excludedFromShownWindowsMenu: boolean;
|
|
3866
5989
|
/**
|
|
3867
|
-
*
|
|
3868
|
-
*
|
|
3869
|
-
*
|
|
3870
|
-
* `false` will cause the `ready-to-show` event to not fire. Default is `true`.
|
|
5990
|
+
* A `boolean` property that determines whether the window is focusable.
|
|
5991
|
+
*
|
|
5992
|
+
* @platform win32,darwin
|
|
3871
5993
|
*/
|
|
3872
|
-
|
|
5994
|
+
focusable: boolean;
|
|
3873
5995
|
/**
|
|
3874
|
-
*
|
|
5996
|
+
* A `boolean` property that determines whether the window is in fullscreen mode.
|
|
3875
5997
|
*/
|
|
3876
|
-
|
|
5998
|
+
fullScreen: boolean;
|
|
3877
5999
|
/**
|
|
3878
|
-
*
|
|
6000
|
+
* A `boolean` property that determines whether the maximize/zoom window button
|
|
6001
|
+
* toggles fullscreen mode or maximizes the window.
|
|
3879
6002
|
*/
|
|
3880
|
-
|
|
6003
|
+
fullScreenable: boolean;
|
|
3881
6004
|
/**
|
|
3882
|
-
*
|
|
3883
|
-
*
|
|
3884
|
-
* fullscreenable.
|
|
6005
|
+
* A `Integer` property representing the unique ID of the window. Each ID is unique
|
|
6006
|
+
* among all `BrowserWindow` instances of the entire Electron application.
|
|
3885
6007
|
*
|
|
3886
|
-
* @platform darwin
|
|
3887
6008
|
*/
|
|
3888
|
-
|
|
6009
|
+
readonly id: number;
|
|
3889
6010
|
/**
|
|
3890
|
-
*
|
|
6011
|
+
* A `boolean` property that determines whether the window is in kiosk mode.
|
|
3891
6012
|
*/
|
|
3892
|
-
|
|
6013
|
+
kiosk: boolean;
|
|
3893
6014
|
/**
|
|
3894
|
-
*
|
|
6015
|
+
* A `boolean` property that determines whether the window can be manually
|
|
6016
|
+
* maximized by user.
|
|
3895
6017
|
*
|
|
3896
|
-
*
|
|
3897
|
-
*/
|
|
3898
|
-
simpleFullscreen?: boolean;
|
|
3899
|
-
/**
|
|
3900
|
-
* Whether to show the window in taskbar. Default is `false`.
|
|
6018
|
+
* On Linux the setter is a no-op, although the getter returns `true`.
|
|
3901
6019
|
*
|
|
3902
6020
|
* @platform darwin,win32
|
|
3903
6021
|
*/
|
|
3904
|
-
|
|
6022
|
+
maximizable: boolean;
|
|
3905
6023
|
/**
|
|
3906
|
-
*
|
|
3907
|
-
* tabbing identifier will be grouped together. This also adds a native new tab
|
|
3908
|
-
* button to your window's tab bar and allows your `app` and window to receive the
|
|
3909
|
-
* `new-window-for-tab` event.
|
|
6024
|
+
* A `boolean` property that determines whether the menu bar should be visible.
|
|
3910
6025
|
*
|
|
3911
|
-
*
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
* Use `WS_THICKFRAME` style for frameless windows on Windows, which adds standard
|
|
3916
|
-
* window frame. Setting it to `false` will remove window shadow and window
|
|
3917
|
-
* animations. Default is `true`.
|
|
3918
|
-
*/
|
|
3919
|
-
thickFrame?: boolean;
|
|
3920
|
-
/**
|
|
3921
|
-
* Default window title. Default is `"Electron"`. If the HTML tag `<title>` is
|
|
3922
|
-
* defined in the HTML file loaded by `loadURL()`, this property will be ignored.
|
|
6026
|
+
* **Note:** If the menu bar is auto-hide, users can still bring up the menu bar by
|
|
6027
|
+
* pressing the single `Alt` key.
|
|
6028
|
+
*
|
|
6029
|
+
* @platform win32,linux
|
|
3923
6030
|
*/
|
|
3924
|
-
|
|
6031
|
+
menuBarVisible: boolean;
|
|
3925
6032
|
/**
|
|
3926
|
-
*
|
|
3927
|
-
*
|
|
3928
|
-
*
|
|
3929
|
-
*
|
|
3930
|
-
*
|
|
3931
|
-
*
|
|
6033
|
+
* A `boolean` property that determines whether the window can be manually
|
|
6034
|
+
* minimized by user.
|
|
6035
|
+
*
|
|
6036
|
+
* On Linux the setter is a no-op, although the getter returns `true`.
|
|
6037
|
+
*
|
|
6038
|
+
* @platform darwin,win32
|
|
3932
6039
|
*/
|
|
3933
|
-
|
|
6040
|
+
minimizable: boolean;
|
|
3934
6041
|
/**
|
|
3935
|
-
*
|
|
6042
|
+
* A `boolean` property that determines Whether the window can be moved by user.
|
|
6043
|
+
*
|
|
6044
|
+
* On Linux the setter is a no-op, although the getter returns `true`.
|
|
3936
6045
|
*
|
|
3937
6046
|
* @platform darwin,win32
|
|
3938
6047
|
*/
|
|
3939
|
-
|
|
6048
|
+
movable: boolean;
|
|
3940
6049
|
/**
|
|
3941
|
-
*
|
|
6050
|
+
* A `string` property that determines the pathname of the file the window
|
|
6051
|
+
* represents, and the icon of the file will show in window's title bar.
|
|
3942
6052
|
*
|
|
3943
6053
|
* @platform darwin
|
|
3944
6054
|
*/
|
|
3945
|
-
|
|
6055
|
+
representedFilename: string;
|
|
3946
6056
|
/**
|
|
3947
|
-
*
|
|
3948
|
-
*
|
|
6057
|
+
* A `boolean` property that determines whether the window can be manually resized
|
|
6058
|
+
* by user.
|
|
3949
6059
|
*/
|
|
3950
|
-
|
|
6060
|
+
resizable: boolean;
|
|
3951
6061
|
/**
|
|
3952
|
-
*
|
|
6062
|
+
* A `boolean` property that determines whether the window has a shadow.
|
|
3953
6063
|
*/
|
|
3954
|
-
|
|
6064
|
+
shadow: boolean;
|
|
3955
6065
|
/**
|
|
3956
|
-
*
|
|
3957
|
-
*
|
|
3958
|
-
* Default is `false`.
|
|
6066
|
+
* A `boolean` property that determines whether the window is in simple (pre-Lion)
|
|
6067
|
+
* fullscreen mode.
|
|
3959
6068
|
*/
|
|
3960
|
-
|
|
6069
|
+
simpleFullScreen: boolean;
|
|
3961
6070
|
/**
|
|
3962
|
-
*
|
|
3963
|
-
*
|
|
3964
|
-
* `header`, `sheet`, `window`, `hud`, `fullscreen-ui`, `tooltip`, `content`,
|
|
3965
|
-
* `under-window`, or `under-page`.
|
|
6071
|
+
* A `string` (optional) property that is equal to the `tabbingIdentifier` passed
|
|
6072
|
+
* to the `BrowserWindow` constructor or `undefined` if none was set.
|
|
3966
6073
|
*
|
|
3967
6074
|
* @platform darwin
|
|
3968
6075
|
*/
|
|
3969
|
-
|
|
6076
|
+
readonly tabbingIdentifier?: string;
|
|
3970
6077
|
/**
|
|
3971
|
-
*
|
|
3972
|
-
* macOS. Must be used with the `vibrancy` property. Possible values are:
|
|
6078
|
+
* A `string` property that determines the title of the native window.
|
|
3973
6079
|
*
|
|
3974
|
-
*
|
|
6080
|
+
* **Note:** The title of the web page can be different from the title of the
|
|
6081
|
+
* native window.
|
|
3975
6082
|
*/
|
|
3976
|
-
|
|
6083
|
+
title: string;
|
|
3977
6084
|
/**
|
|
3978
|
-
*
|
|
6085
|
+
* A `boolean` property that determines whether the window is visible on all
|
|
6086
|
+
* workspaces.
|
|
6087
|
+
*
|
|
6088
|
+
* **Note:** Always returns false on Windows.
|
|
6089
|
+
*
|
|
6090
|
+
* @platform darwin,linux
|
|
3979
6091
|
*/
|
|
3980
|
-
|
|
6092
|
+
visibleOnAllWorkspaces: boolean;
|
|
3981
6093
|
/**
|
|
3982
|
-
*
|
|
6094
|
+
* A `WebContents` object this window owns. All web page related events and
|
|
6095
|
+
* operations will be done via it.
|
|
6096
|
+
*
|
|
6097
|
+
* See the `webContents` documentation for its methods and events.
|
|
6098
|
+
*
|
|
3983
6099
|
*/
|
|
3984
|
-
|
|
6100
|
+
readonly webContents: WebContents;
|
|
6101
|
+
}
|
|
6102
|
+
|
|
6103
|
+
interface BrowserWindowConstructorOptions extends BaseWindowConstructorOptions {
|
|
6104
|
+
|
|
6105
|
+
// Docs: https://electronjs.org/docs/api/structures/browser-window-options
|
|
6106
|
+
|
|
3985
6107
|
/**
|
|
3986
|
-
*
|
|
3987
|
-
*
|
|
6108
|
+
* Whether the renderer should be active when `show` is `false` and it has just
|
|
6109
|
+
* been created. In order for `document.visibilityState` to work correctly on
|
|
6110
|
+
* first load with `show: false` you should set this to `false`. Setting this to
|
|
6111
|
+
* `false` will cause the `ready-to-show` event to not fire. Default is `true`.
|
|
3988
6112
|
*/
|
|
3989
|
-
|
|
6113
|
+
paintWhenInitiallyHidden?: boolean;
|
|
3990
6114
|
/**
|
|
3991
|
-
*
|
|
3992
|
-
*
|
|
6115
|
+
* When using a frameless window in conjunction with
|
|
6116
|
+
* `win.setWindowButtonVisibility(true)` on macOS or using a `titleBarStyle` so
|
|
6117
|
+
* that the standard window controls ("traffic lights" on macOS) are visible, this
|
|
6118
|
+
* property enables the Window Controls Overlay JavaScript APIs and CSS Environment
|
|
6119
|
+
* Variables. Specifying `true` will result in an overlay with default system
|
|
6120
|
+
* colors. Default is `false`.
|
|
3993
6121
|
*/
|
|
3994
|
-
|
|
6122
|
+
titleBarOverlay?: (TitleBarOverlay) | (boolean);
|
|
3995
6123
|
/**
|
|
3996
|
-
*
|
|
3997
|
-
* on the toolbar or by clicking the Window > Zoom menu item. If `true`, the window
|
|
3998
|
-
* will grow to the preferred width of the web page when zoomed, `false` will cause
|
|
3999
|
-
* it to zoom to the width of the screen. This will also affect the behavior when
|
|
4000
|
-
* calling `maximize()` directly. Default is `false`.
|
|
4001
|
-
*
|
|
4002
|
-
* @platform darwin
|
|
6124
|
+
* Settings of web page's features.
|
|
4003
6125
|
*/
|
|
4004
|
-
|
|
6126
|
+
webPreferences?: WebPreferences;
|
|
4005
6127
|
}
|
|
4006
6128
|
|
|
4007
6129
|
interface Certificate {
|
|
@@ -9574,7 +11696,7 @@ declare namespace Electron {
|
|
|
9574
11696
|
* `setPermissionCheckHandler` to get complete permission handling. Most web APIs
|
|
9575
11697
|
* do a permission check and then make a permission request if the check is denied.
|
|
9576
11698
|
*/
|
|
9577
|
-
setPermissionRequestHandler(handler: ((webContents: WebContents, permission: 'clipboard-read' | 'clipboard-sanitized-write' | 'display-capture' | 'fullscreen' | 'geolocation' | 'idle-detection' | 'media' | 'mediaKeySystem' | 'midi' | 'midiSysex' | 'notifications' | 'pointerLock' | 'keyboardLock' | 'openExternal' | 'window-management' | 'unknown', callback: (permissionGranted: boolean) => void, details: PermissionRequestHandlerHandlerDetails) => void) | (null)): void;
|
|
11699
|
+
setPermissionRequestHandler(handler: ((webContents: WebContents, permission: 'clipboard-read' | 'clipboard-sanitized-write' | 'display-capture' | 'fullscreen' | 'geolocation' | 'idle-detection' | 'media' | 'mediaKeySystem' | 'midi' | 'midiSysex' | 'notifications' | 'pointerLock' | 'keyboardLock' | 'openExternal' | 'speaker-selection' | 'window-management' | 'unknown', callback: (permissionGranted: boolean) => void, details: PermissionRequestHandlerHandlerDetails) => void) | (null)): void;
|
|
9578
11700
|
/**
|
|
9579
11701
|
* Adds scripts that will be executed on ALL web contents that are associated with
|
|
9580
11702
|
* this session just before normal `preload` scripts run.
|
|
@@ -11660,6 +13782,67 @@ declare namespace Electron {
|
|
|
11660
13782
|
stdout: (NodeJS.ReadableStream) | (null);
|
|
11661
13783
|
}
|
|
11662
13784
|
|
|
13785
|
+
class View extends NodeEventEmitter {
|
|
13786
|
+
|
|
13787
|
+
// Docs: https://electronjs.org/docs/api/view
|
|
13788
|
+
|
|
13789
|
+
/**
|
|
13790
|
+
* Emitted when the view's bounds have changed in response to being laid out. The
|
|
13791
|
+
* new bounds can be retrieved with `view.getBounds()`.
|
|
13792
|
+
*/
|
|
13793
|
+
on(event: 'bounds-changed', listener: Function): this;
|
|
13794
|
+
off(event: 'bounds-changed', listener: Function): this;
|
|
13795
|
+
once(event: 'bounds-changed', listener: Function): this;
|
|
13796
|
+
addListener(event: 'bounds-changed', listener: Function): this;
|
|
13797
|
+
removeListener(event: 'bounds-changed', listener: Function): this;
|
|
13798
|
+
/**
|
|
13799
|
+
* View
|
|
13800
|
+
*/
|
|
13801
|
+
constructor();
|
|
13802
|
+
addChildView(view: View, index?: number): void;
|
|
13803
|
+
/**
|
|
13804
|
+
* The bounds of this View, relative to its parent.
|
|
13805
|
+
*/
|
|
13806
|
+
getBounds(): Rectangle;
|
|
13807
|
+
removeChildView(view: View): void;
|
|
13808
|
+
/**
|
|
13809
|
+
* Examples of valid `color` values:
|
|
13810
|
+
*
|
|
13811
|
+
* * Hex
|
|
13812
|
+
* * `#fff` (RGB)
|
|
13813
|
+
* * `#ffff` (ARGB)
|
|
13814
|
+
* * `#ffffff` (RRGGBB)
|
|
13815
|
+
* * `#ffffffff` (AARRGGBB)
|
|
13816
|
+
* * RGB
|
|
13817
|
+
* * `rgb\(([\d]+),\s*([\d]+),\s*([\d]+)\)`
|
|
13818
|
+
* * e.g. `rgb(255, 255, 255)`
|
|
13819
|
+
* * RGBA
|
|
13820
|
+
* * `rgba\(([\d]+),\s*([\d]+),\s*([\d]+),\s*([\d.]+)\)`
|
|
13821
|
+
* * e.g. `rgba(255, 255, 255, 1.0)`
|
|
13822
|
+
* * HSL
|
|
13823
|
+
* * `hsl\((-?[\d.]+),\s*([\d.]+)%,\s*([\d.]+)%\)`
|
|
13824
|
+
* * e.g. `hsl(200, 20%, 50%)`
|
|
13825
|
+
* * HSLA
|
|
13826
|
+
* * `hsla\((-?[\d.]+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)`
|
|
13827
|
+
* * e.g. `hsla(200, 20%, 50%, 0.5)`
|
|
13828
|
+
* * Color name
|
|
13829
|
+
* * Options are listed in SkParseColor.cpp
|
|
13830
|
+
* * Similar to CSS Color Module Level 3 keywords, but case-sensitive.
|
|
13831
|
+
* * e.g. `blueviolet` or `red`
|
|
13832
|
+
*
|
|
13833
|
+
* **Note:** Hex format with alpha takes `AARRGGBB` or `ARGB`, _not_ `RRGGBBAA` or
|
|
13834
|
+
* `RGB`.
|
|
13835
|
+
*/
|
|
13836
|
+
setBackgroundColor(color: string): void;
|
|
13837
|
+
setBounds(bounds: Rectangle): void;
|
|
13838
|
+
setVisible(visible: boolean): void;
|
|
13839
|
+
/**
|
|
13840
|
+
* A `View[]` property representing the child views of this view.
|
|
13841
|
+
*
|
|
13842
|
+
*/
|
|
13843
|
+
readonly children: View[];
|
|
13844
|
+
}
|
|
13845
|
+
|
|
11663
13846
|
class WebContents extends NodeEventEmitter {
|
|
11664
13847
|
|
|
11665
13848
|
// Docs: https://electronjs.org/docs/api/web-contents
|
|
@@ -14210,6 +16393,31 @@ declare namespace Electron {
|
|
|
14210
16393
|
zoomLevel: number;
|
|
14211
16394
|
}
|
|
14212
16395
|
|
|
16396
|
+
class WebContentsView extends View {
|
|
16397
|
+
|
|
16398
|
+
// Docs: https://electronjs.org/docs/api/web-contents-view
|
|
16399
|
+
|
|
16400
|
+
/**
|
|
16401
|
+
* Emitted when the view's bounds have changed in response to being laid out. The
|
|
16402
|
+
* new bounds can be retrieved with `view.getBounds()`.
|
|
16403
|
+
*/
|
|
16404
|
+
on(event: 'bounds-changed', listener: Function): this;
|
|
16405
|
+
off(event: 'bounds-changed', listener: Function): this;
|
|
16406
|
+
once(event: 'bounds-changed', listener: Function): this;
|
|
16407
|
+
addListener(event: 'bounds-changed', listener: Function): this;
|
|
16408
|
+
removeListener(event: 'bounds-changed', listener: Function): this;
|
|
16409
|
+
/**
|
|
16410
|
+
* WebContentsView
|
|
16411
|
+
*/
|
|
16412
|
+
constructor(options?: WebContentsViewConstructorOptions);
|
|
16413
|
+
/**
|
|
16414
|
+
* A `WebContents` property containing a reference to the displayed `WebContents`.
|
|
16415
|
+
* Use this to interact with the `WebContents`, for instance to load a URL.
|
|
16416
|
+
*
|
|
16417
|
+
*/
|
|
16418
|
+
readonly webContents: WebContents;
|
|
16419
|
+
}
|
|
16420
|
+
|
|
14213
16421
|
interface WebFrame {
|
|
14214
16422
|
|
|
14215
16423
|
// Docs: https://electronjs.org/docs/api/web-frame
|
|
@@ -15591,7 +17799,14 @@ declare namespace Electron {
|
|
|
15591
17799
|
/**
|
|
15592
17800
|
* A `string` which is a comma separated list of strings which specifies the web
|
|
15593
17801
|
* preferences to be set on the webview. The full list of supported preference
|
|
15594
|
-
* strings can be found in BrowserWindow.
|
|
17802
|
+
* strings can be found in BrowserWindow. In addition, webview supports the
|
|
17803
|
+
* following preferences:
|
|
17804
|
+
*
|
|
17805
|
+
* * `transparent` boolean (optional) - Whether to enable background transparency
|
|
17806
|
+
* for the guest page. Default is `true`. **Note:** The guest page's text and
|
|
17807
|
+
* background colors are derived from the color scheme of its root element. When
|
|
17808
|
+
* transparency is enabled, the text color will still change accordingly but the
|
|
17809
|
+
* background will remain transparent.
|
|
15595
17810
|
*
|
|
15596
17811
|
* The string follows the same format as the features string in `window.open`. A
|
|
15597
17812
|
* name by itself is given a `true` boolean value. A preference can be set to
|
|
@@ -15599,7 +17814,7 @@ declare namespace Electron {
|
|
|
15599
17814
|
* and `1` are interpreted as `true`, while `no` and `0` are interpreted as
|
|
15600
17815
|
* `false`.
|
|
15601
17816
|
*/
|
|
15602
|
-
webpreferences
|
|
17817
|
+
webpreferences?: ('transparent');
|
|
15603
17818
|
}
|
|
15604
17819
|
|
|
15605
17820
|
interface AboutPanelOptionsOptions {
|
|
@@ -18443,6 +20658,27 @@ declare namespace Electron {
|
|
|
18443
20658
|
height?: number;
|
|
18444
20659
|
}
|
|
18445
20660
|
|
|
20661
|
+
interface TitleBarOverlayOptions {
|
|
20662
|
+
/**
|
|
20663
|
+
* The CSS color of the Window Controls Overlay when enabled.
|
|
20664
|
+
*
|
|
20665
|
+
* @platform win32
|
|
20666
|
+
*/
|
|
20667
|
+
color?: string;
|
|
20668
|
+
/**
|
|
20669
|
+
* The CSS color of the symbols on the Window Controls Overlay when enabled.
|
|
20670
|
+
*
|
|
20671
|
+
* @platform win32
|
|
20672
|
+
*/
|
|
20673
|
+
symbolColor?: string;
|
|
20674
|
+
/**
|
|
20675
|
+
* The height of the title bar and Window Controls Overlay in pixels.
|
|
20676
|
+
*
|
|
20677
|
+
* @platform win32
|
|
20678
|
+
*/
|
|
20679
|
+
height?: number;
|
|
20680
|
+
}
|
|
20681
|
+
|
|
18446
20682
|
interface TitleOptions {
|
|
18447
20683
|
/**
|
|
18448
20684
|
* The font family variant to display, can be `monospaced` or `monospacedDigit`.
|
|
@@ -18862,6 +21098,13 @@ declare namespace Electron {
|
|
|
18862
21098
|
pageSize?: (('A0' | 'A1' | 'A2' | 'A3' | 'A4' | 'A5' | 'A6' | 'Legal' | 'Letter' | 'Tabloid')) | (Size);
|
|
18863
21099
|
}
|
|
18864
21100
|
|
|
21101
|
+
interface WebContentsViewConstructorOptions {
|
|
21102
|
+
/**
|
|
21103
|
+
* Settings of web page's features.
|
|
21104
|
+
*/
|
|
21105
|
+
webPreferences?: WebPreferences;
|
|
21106
|
+
}
|
|
21107
|
+
|
|
18865
21108
|
interface WebContentsWillFrameNavigateEventParams {
|
|
18866
21109
|
/**
|
|
18867
21110
|
* The URL the frame is navigating to.
|
|
@@ -19509,6 +21752,7 @@ declare namespace Electron {
|
|
|
19509
21752
|
type Streams = Electron.Streams;
|
|
19510
21753
|
type SystemMemoryInfo = Electron.SystemMemoryInfo;
|
|
19511
21754
|
type TitleBarOverlay = Electron.TitleBarOverlay;
|
|
21755
|
+
type TitleBarOverlayOptions = Electron.TitleBarOverlayOptions;
|
|
19512
21756
|
type TitleOptions = Electron.TitleOptions;
|
|
19513
21757
|
type ToBitmapOptions = Electron.ToBitmapOptions;
|
|
19514
21758
|
type ToDataURLOptions = Electron.ToDataURLOptions;
|
|
@@ -19534,6 +21778,7 @@ declare namespace Electron {
|
|
|
19534
21778
|
type WebContentsDidRedirectNavigationEventParams = Electron.WebContentsDidRedirectNavigationEventParams;
|
|
19535
21779
|
type WebContentsDidStartNavigationEventParams = Electron.WebContentsDidStartNavigationEventParams;
|
|
19536
21780
|
type WebContentsPrintOptions = Electron.WebContentsPrintOptions;
|
|
21781
|
+
type WebContentsViewConstructorOptions = Electron.WebContentsViewConstructorOptions;
|
|
19537
21782
|
type WebContentsWillFrameNavigateEventParams = Electron.WebContentsWillFrameNavigateEventParams;
|
|
19538
21783
|
type WebContentsWillNavigateEventParams = Electron.WebContentsWillNavigateEventParams;
|
|
19539
21784
|
type WebContentsWillRedirectEventParams = Electron.WebContentsWillRedirectEventParams;
|
|
@@ -19551,6 +21796,7 @@ declare namespace Electron {
|
|
|
19551
21796
|
type PageRanges = Electron.PageRanges;
|
|
19552
21797
|
type Params = Electron.Params;
|
|
19553
21798
|
type Video = Electron.Video;
|
|
21799
|
+
type BaseWindowConstructorOptions = Electron.BaseWindowConstructorOptions;
|
|
19554
21800
|
type BrowserWindowConstructorOptions = Electron.BrowserWindowConstructorOptions;
|
|
19555
21801
|
type BluetoothDevice = Electron.BluetoothDevice;
|
|
19556
21802
|
type Certificate = Electron.Certificate;
|
|
@@ -19630,6 +21876,7 @@ declare namespace Electron {
|
|
|
19630
21876
|
type App = Electron.App;
|
|
19631
21877
|
const autoUpdater: AutoUpdater;
|
|
19632
21878
|
type AutoUpdater = Electron.AutoUpdater;
|
|
21879
|
+
class BaseWindow extends Electron.BaseWindow {}
|
|
19633
21880
|
class BrowserView extends Electron.BrowserView {}
|
|
19634
21881
|
class BrowserWindow extends Electron.BrowserWindow {}
|
|
19635
21882
|
type ClientRequest = Electron.ClientRequest;
|
|
@@ -19694,8 +21941,10 @@ declare namespace Electron {
|
|
|
19694
21941
|
class Tray extends Electron.Tray {}
|
|
19695
21942
|
const utilityProcess: typeof UtilityProcess;
|
|
19696
21943
|
type UtilityProcess = Electron.UtilityProcess;
|
|
21944
|
+
class View extends Electron.View {}
|
|
19697
21945
|
const webContents: typeof WebContents;
|
|
19698
21946
|
type WebContents = Electron.WebContents;
|
|
21947
|
+
class WebContentsView extends Electron.WebContentsView {}
|
|
19699
21948
|
const webFrameMain: typeof WebFrameMain;
|
|
19700
21949
|
type WebFrameMain = Electron.WebFrameMain;
|
|
19701
21950
|
type WebRequest = Electron.WebRequest;
|
|
@@ -19837,6 +22086,7 @@ declare namespace Electron {
|
|
|
19837
22086
|
type Streams = Electron.Streams;
|
|
19838
22087
|
type SystemMemoryInfo = Electron.SystemMemoryInfo;
|
|
19839
22088
|
type TitleBarOverlay = Electron.TitleBarOverlay;
|
|
22089
|
+
type TitleBarOverlayOptions = Electron.TitleBarOverlayOptions;
|
|
19840
22090
|
type TitleOptions = Electron.TitleOptions;
|
|
19841
22091
|
type ToBitmapOptions = Electron.ToBitmapOptions;
|
|
19842
22092
|
type ToDataURLOptions = Electron.ToDataURLOptions;
|
|
@@ -19862,6 +22112,7 @@ declare namespace Electron {
|
|
|
19862
22112
|
type WebContentsDidRedirectNavigationEventParams = Electron.WebContentsDidRedirectNavigationEventParams;
|
|
19863
22113
|
type WebContentsDidStartNavigationEventParams = Electron.WebContentsDidStartNavigationEventParams;
|
|
19864
22114
|
type WebContentsPrintOptions = Electron.WebContentsPrintOptions;
|
|
22115
|
+
type WebContentsViewConstructorOptions = Electron.WebContentsViewConstructorOptions;
|
|
19865
22116
|
type WebContentsWillFrameNavigateEventParams = Electron.WebContentsWillFrameNavigateEventParams;
|
|
19866
22117
|
type WebContentsWillNavigateEventParams = Electron.WebContentsWillNavigateEventParams;
|
|
19867
22118
|
type WebContentsWillRedirectEventParams = Electron.WebContentsWillRedirectEventParams;
|
|
@@ -19879,6 +22130,7 @@ declare namespace Electron {
|
|
|
19879
22130
|
type PageRanges = Electron.PageRanges;
|
|
19880
22131
|
type Params = Electron.Params;
|
|
19881
22132
|
type Video = Electron.Video;
|
|
22133
|
+
type BaseWindowConstructorOptions = Electron.BaseWindowConstructorOptions;
|
|
19882
22134
|
type BrowserWindowConstructorOptions = Electron.BrowserWindowConstructorOptions;
|
|
19883
22135
|
type BluetoothDevice = Electron.BluetoothDevice;
|
|
19884
22136
|
type Certificate = Electron.Certificate;
|
|
@@ -20101,6 +22353,7 @@ declare namespace Electron {
|
|
|
20101
22353
|
type Streams = Electron.Streams;
|
|
20102
22354
|
type SystemMemoryInfo = Electron.SystemMemoryInfo;
|
|
20103
22355
|
type TitleBarOverlay = Electron.TitleBarOverlay;
|
|
22356
|
+
type TitleBarOverlayOptions = Electron.TitleBarOverlayOptions;
|
|
20104
22357
|
type TitleOptions = Electron.TitleOptions;
|
|
20105
22358
|
type ToBitmapOptions = Electron.ToBitmapOptions;
|
|
20106
22359
|
type ToDataURLOptions = Electron.ToDataURLOptions;
|
|
@@ -20126,6 +22379,7 @@ declare namespace Electron {
|
|
|
20126
22379
|
type WebContentsDidRedirectNavigationEventParams = Electron.WebContentsDidRedirectNavigationEventParams;
|
|
20127
22380
|
type WebContentsDidStartNavigationEventParams = Electron.WebContentsDidStartNavigationEventParams;
|
|
20128
22381
|
type WebContentsPrintOptions = Electron.WebContentsPrintOptions;
|
|
22382
|
+
type WebContentsViewConstructorOptions = Electron.WebContentsViewConstructorOptions;
|
|
20129
22383
|
type WebContentsWillFrameNavigateEventParams = Electron.WebContentsWillFrameNavigateEventParams;
|
|
20130
22384
|
type WebContentsWillNavigateEventParams = Electron.WebContentsWillNavigateEventParams;
|
|
20131
22385
|
type WebContentsWillRedirectEventParams = Electron.WebContentsWillRedirectEventParams;
|
|
@@ -20143,6 +22397,7 @@ declare namespace Electron {
|
|
|
20143
22397
|
type PageRanges = Electron.PageRanges;
|
|
20144
22398
|
type Params = Electron.Params;
|
|
20145
22399
|
type Video = Electron.Video;
|
|
22400
|
+
type BaseWindowConstructorOptions = Electron.BaseWindowConstructorOptions;
|
|
20146
22401
|
type BrowserWindowConstructorOptions = Electron.BrowserWindowConstructorOptions;
|
|
20147
22402
|
type BluetoothDevice = Electron.BluetoothDevice;
|
|
20148
22403
|
type Certificate = Electron.Certificate;
|
|
@@ -20360,6 +22615,7 @@ declare namespace Electron {
|
|
|
20360
22615
|
type Streams = Electron.Streams;
|
|
20361
22616
|
type SystemMemoryInfo = Electron.SystemMemoryInfo;
|
|
20362
22617
|
type TitleBarOverlay = Electron.TitleBarOverlay;
|
|
22618
|
+
type TitleBarOverlayOptions = Electron.TitleBarOverlayOptions;
|
|
20363
22619
|
type TitleOptions = Electron.TitleOptions;
|
|
20364
22620
|
type ToBitmapOptions = Electron.ToBitmapOptions;
|
|
20365
22621
|
type ToDataURLOptions = Electron.ToDataURLOptions;
|
|
@@ -20385,6 +22641,7 @@ declare namespace Electron {
|
|
|
20385
22641
|
type WebContentsDidRedirectNavigationEventParams = Electron.WebContentsDidRedirectNavigationEventParams;
|
|
20386
22642
|
type WebContentsDidStartNavigationEventParams = Electron.WebContentsDidStartNavigationEventParams;
|
|
20387
22643
|
type WebContentsPrintOptions = Electron.WebContentsPrintOptions;
|
|
22644
|
+
type WebContentsViewConstructorOptions = Electron.WebContentsViewConstructorOptions;
|
|
20388
22645
|
type WebContentsWillFrameNavigateEventParams = Electron.WebContentsWillFrameNavigateEventParams;
|
|
20389
22646
|
type WebContentsWillNavigateEventParams = Electron.WebContentsWillNavigateEventParams;
|
|
20390
22647
|
type WebContentsWillRedirectEventParams = Electron.WebContentsWillRedirectEventParams;
|
|
@@ -20402,6 +22659,7 @@ declare namespace Electron {
|
|
|
20402
22659
|
type PageRanges = Electron.PageRanges;
|
|
20403
22660
|
type Params = Electron.Params;
|
|
20404
22661
|
type Video = Electron.Video;
|
|
22662
|
+
type BaseWindowConstructorOptions = Electron.BaseWindowConstructorOptions;
|
|
20405
22663
|
type BrowserWindowConstructorOptions = Electron.BrowserWindowConstructorOptions;
|
|
20406
22664
|
type BluetoothDevice = Electron.BluetoothDevice;
|
|
20407
22665
|
type Certificate = Electron.Certificate;
|
|
@@ -20481,6 +22739,7 @@ declare namespace Electron {
|
|
|
20481
22739
|
type App = Electron.App;
|
|
20482
22740
|
const autoUpdater: AutoUpdater;
|
|
20483
22741
|
type AutoUpdater = Electron.AutoUpdater;
|
|
22742
|
+
class BaseWindow extends Electron.BaseWindow {}
|
|
20484
22743
|
class BrowserView extends Electron.BrowserView {}
|
|
20485
22744
|
class BrowserWindow extends Electron.BrowserWindow {}
|
|
20486
22745
|
type ClientRequest = Electron.ClientRequest;
|
|
@@ -20557,8 +22816,10 @@ declare namespace Electron {
|
|
|
20557
22816
|
class Tray extends Electron.Tray {}
|
|
20558
22817
|
const utilityProcess: typeof UtilityProcess;
|
|
20559
22818
|
type UtilityProcess = Electron.UtilityProcess;
|
|
22819
|
+
class View extends Electron.View {}
|
|
20560
22820
|
const webContents: typeof WebContents;
|
|
20561
22821
|
type WebContents = Electron.WebContents;
|
|
22822
|
+
class WebContentsView extends Electron.WebContentsView {}
|
|
20562
22823
|
const webFrame: WebFrame;
|
|
20563
22824
|
type WebFrame = Electron.WebFrame;
|
|
20564
22825
|
const webFrameMain: typeof WebFrameMain;
|
|
@@ -20705,6 +22966,7 @@ declare namespace Electron {
|
|
|
20705
22966
|
type Streams = Electron.Streams;
|
|
20706
22967
|
type SystemMemoryInfo = Electron.SystemMemoryInfo;
|
|
20707
22968
|
type TitleBarOverlay = Electron.TitleBarOverlay;
|
|
22969
|
+
type TitleBarOverlayOptions = Electron.TitleBarOverlayOptions;
|
|
20708
22970
|
type TitleOptions = Electron.TitleOptions;
|
|
20709
22971
|
type ToBitmapOptions = Electron.ToBitmapOptions;
|
|
20710
22972
|
type ToDataURLOptions = Electron.ToDataURLOptions;
|
|
@@ -20730,6 +22992,7 @@ declare namespace Electron {
|
|
|
20730
22992
|
type WebContentsDidRedirectNavigationEventParams = Electron.WebContentsDidRedirectNavigationEventParams;
|
|
20731
22993
|
type WebContentsDidStartNavigationEventParams = Electron.WebContentsDidStartNavigationEventParams;
|
|
20732
22994
|
type WebContentsPrintOptions = Electron.WebContentsPrintOptions;
|
|
22995
|
+
type WebContentsViewConstructorOptions = Electron.WebContentsViewConstructorOptions;
|
|
20733
22996
|
type WebContentsWillFrameNavigateEventParams = Electron.WebContentsWillFrameNavigateEventParams;
|
|
20734
22997
|
type WebContentsWillNavigateEventParams = Electron.WebContentsWillNavigateEventParams;
|
|
20735
22998
|
type WebContentsWillRedirectEventParams = Electron.WebContentsWillRedirectEventParams;
|
|
@@ -20747,6 +23010,7 @@ declare namespace Electron {
|
|
|
20747
23010
|
type PageRanges = Electron.PageRanges;
|
|
20748
23011
|
type Params = Electron.Params;
|
|
20749
23012
|
type Video = Electron.Video;
|
|
23013
|
+
type BaseWindowConstructorOptions = Electron.BaseWindowConstructorOptions;
|
|
20750
23014
|
type BrowserWindowConstructorOptions = Electron.BrowserWindowConstructorOptions;
|
|
20751
23015
|
type BluetoothDevice = Electron.BluetoothDevice;
|
|
20752
23016
|
type Certificate = Electron.Certificate;
|