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