1- // Type definitions for Electron 38.0.0-alpha.12 +wvcus
1+ // Type definitions for Electron 38.0.0-beta.11 +wvcus
22// Project: http://electronjs.org/
33// Definitions by: The Electron Team <https://github.com/electron/electron>
44// Definitions: https://github.com/electron/typescript-definitions
@@ -1219,7 +1219,7 @@ declare namespace Electron {
12191219 * called first, a default log directory will be created equivalent to calling
12201220 * `app.setAppLogsPath()` without a `path` parameter.
12211221 */
1222- getPath(name: 'home' | 'appData' | 'userData' | 'sessionData' | 'temp' | 'exe' | 'module' | 'desktop' | 'documents' | 'downloads' | 'music' | 'pictures' | 'videos' | 'recent' | 'logs' | 'crashDumps'): string;
1222+ getPath(name: 'home' | 'appData' | 'assets' | ' userData' | 'sessionData' | 'temp' | 'exe' | 'module' | 'desktop' | 'documents' | 'downloads' | 'music' | 'pictures' | 'videos' | 'recent' | 'logs' | 'crashDumps'): string;
12231223 /**
12241224 * The user's preferred system languages from most preferred to least preferred,
12251225 * including the country codes if applicable. A user can modify and add to this
@@ -1256,6 +1256,12 @@ declare namespace Electron {
12561256 * that do not have associated countries in the language name.
12571257 */
12581258 getPreferredSystemLanguages(): string[];
1259+ /**
1260+ * An array containing documents in the most recent documents list.
1261+ *
1262+ * @platform darwin,win32
1263+ */
1264+ getRecentDocuments(): string[];
12591265 /**
12601266 * The current system locale. On Windows and Linux, it is fetched using Chromium's
12611267 * `i18n` library. On macOS, `[NSLocale currentLocale]` is used instead. To get the
@@ -2575,6 +2581,19 @@ declare namespace Electron {
25752581 * Focuses on the window.
25762582 */
25772583 focus(): void;
2584+ /**
2585+ * the system accent color and highlighting of active window border in Hex RGB
2586+ * format.
2587+ *
2588+ * If a color has been set for the window that differs from the system accent
2589+ * color, the window accent color will be returned. Otherwise, a boolean will be
2590+ * returned, with `true` indicating that the window uses the global system accent
2591+ * color, and `false` indicating that accent color highlighting is disabled for
2592+ * this window.
2593+ *
2594+ * @platform win32
2595+ */
2596+ getAccentColor(): (string) | (boolean);
25782597 /**
25792598 * Gets the background color of the window in Hex (`#RRGGBB`) format.
25802599 *
@@ -2934,6 +2953,23 @@ declare namespace Electron {
29342953 * @platform darwin
29352954 */
29362955 selectPreviousTab(): void;
2956+ /**
2957+ * Sets the system accent color and highlighting of active window border.
2958+ *
2959+ * The `accentColor` parameter accepts the following values:
2960+ *
2961+ * * **Color string** - Sets a custom accent color using standard CSS color formats
2962+ * (Hex, RGB, RGBA, HSL, HSLA, or named colors). Alpha values in RGBA/HSLA formats
2963+ * are ignored and the color is treated as fully opaque.
2964+ * * **`true`** - Uses the system's default accent color from user preferences in
2965+ * System Settings.
2966+ * * **`false`** - Explicitly disables accent color highlighting for the window.
2967+ *
2968+ * Examples:
2969+ *
2970+ * @platform win32
2971+ */
2972+ setAccentColor(accentColor: (boolean) | (string)): void;
29372973 /**
29382974 * Sets whether the window should show always on top of other windows. After
29392975 * setting this, the window is still a normal window, not a toolbox window which
@@ -5216,6 +5252,19 @@ declare namespace Electron {
52165252 */
52175253 focus(): void;
52185254 focusOnWebView(): void;
5255+ /**
5256+ * the system accent color and highlighting of active window border in Hex RGB
5257+ * format.
5258+ *
5259+ * If a color has been set for the window that differs from the system accent
5260+ * color, the window accent color will be returned. Otherwise, a boolean will be
5261+ * returned, with `true` indicating that the window uses the global system accent
5262+ * color, and `false` indicating that accent color highlighting is disabled for
5263+ * this window.
5264+ *
5265+ * @platform win32
5266+ */
5267+ getAccentColor(): (string) | (boolean);
52195268 /**
52205269 * Gets the background color of the window in Hex (`#RRGGBB`) format.
52215270 *
@@ -5635,6 +5684,23 @@ declare namespace Electron {
56355684 * @platform darwin
56365685 */
56375686 selectPreviousTab(): void;
5687+ /**
5688+ * Sets the system accent color and highlighting of active window border.
5689+ *
5690+ * The `accentColor` parameter accepts the following values:
5691+ *
5692+ * * **Color string** - Sets a custom accent color using standard CSS color formats
5693+ * (Hex, RGB, RGBA, HSL, HSLA, or named colors). Alpha values in RGBA/HSLA formats
5694+ * are ignored and the color is treated as fully opaque.
5695+ * * **`true`** - Uses the system's default accent color from user preferences in
5696+ * System Settings.
5697+ * * **`false`** - Explicitly disables accent color highlighting for the window.
5698+ *
5699+ * Examples:
5700+ *
5701+ * @platform win32
5702+ */
5703+ setAccentColor(accentColor: (boolean) | (string)): void;
56385704 /**
56395705 * Sets whether the window should show always on top of other windows. After
56405706 * setting this, the window is still a normal window, not a toolbox window which
@@ -14597,6 +14663,13 @@ declare namespace Electron {
1459714663 * @platform darwin,win32
1459814664 */
1459914665 getBounds(): Rectangle;
14666+ /**
14667+ * The GUID used to uniquely identify the tray icon and allow it to retain its
14668+ * position between relaunches, or null if none is set.
14669+ *
14670+ * @platform darwin,win32
14671+ */
14672+ getGUID(): (string) | (null);
1460014673 /**
1460114674 * Whether double click events will be ignored.
1460214675 *
@@ -17820,23 +17893,25 @@ declare namespace Electron {
1782017893 * A child of `webFrame` with the supplied `name`, `null` would be returned if
1782117894 * there's no such frame or if the frame is not in the current renderer process.
1782217895 */
17823- findFrameByName(name: string): WebFrame;
17896+ findFrameByName(name: string): ( WebFrame) | (null) ;
1782417897 /**
1782517898 * that has the supplied `routingId`, `null` if not found.
1782617899 *
17900+ * **Deprecated:** Use the new `webFrame.findFrameByToken` API.
17901+ *
1782717902 * @deprecated
1782817903 */
17829- findFrameByRoutingId(routingId: number): WebFrame;
17904+ findFrameByRoutingId(routingId: number): ( WebFrame) | (null) ;
1783017905 /**
1783117906 * that has the supplied `frameToken`, `null` if not found.
1783217907 */
17833- findFrameByToken(frameToken: string): WebFrame;
17908+ findFrameByToken(frameToken: string): ( WebFrame) | (null) ;
1783417909 /**
1783517910 * The frame element in `webFrame's` document selected by `selector`, `null` would
1783617911 * be returned if `selector` does not select a frame or if the frame is not in the
1783717912 * current renderer process.
1783817913 */
17839- getFrameForSelector(selector: string): WebFrame;
17914+ getFrameForSelector(selector: string): ( WebFrame) | (null) ;
1784017915 /**
1784117916 * * `images` MemoryUsageDetails
1784217917 * * `scripts` MemoryUsageDetails
@@ -17974,6 +18049,8 @@ declare namespace Electron {
1797418049 * Distinct WebFrame instances that refer to the same underlying frame will have
1797518050 * the same `routingId`.
1797618051 *
18052+ * **Deprecated:** Use the new `webFrame.frameToken` API.
18053+ *
1797718054 * @deprecated
1797818055 */
1797918056 readonly routingId: number;
@@ -17990,6 +18067,11 @@ declare namespace Electron {
1799018067
1799118068 // Docs: https://electronjs.org/docs/api/web-frame-main
1799218069
18070+ /**
18071+ * A frame with the given process and frame token, or `null` if there is no
18072+ * WebFrameMain associated with the given IDs.
18073+ */
18074+ static fromFrameToken(processId: number, frameToken: string): (WebFrameMain) | (null);
1799318075 /**
1799418076 * A frame with the given process and routing IDs, or `undefined` if there is no
1799518077 * WebFrameMain associated with the given IDs.
@@ -22349,6 +22431,20 @@ declare namespace Electron {
2234922431 * The total amount of memory not being used by applications or disk cache.
2235022432 */
2235122433 free: number;
22434+ /**
22435+ * The amount of memory that currently has been paged out to storage. Includes
22436+ * memory for file caches, network buffers, and other system services.
22437+ *
22438+ * @platform darwin
22439+ */
22440+ fileBacked: number;
22441+ /**
22442+ * The amount of memory that is marked as "purgeable". The system can reclaim it if
22443+ * memory pressure increases.
22444+ *
22445+ * @platform darwin
22446+ */
22447+ purgeable: number;
2235222448 /**
2235322449 * The total amount of swap memory in Kilobytes available to the system.
2235422450 *
@@ -25338,6 +25434,11 @@ declare namespace NodeJS {
2533825434 * to the system.
2533925435 * * `free` Integer - The total amount of memory not being used by applications or
2534025436 * disk cache.
25437+ * * `fileBacked` Integer _macOS_ - The amount of memory that currently has been
25438+ * paged out to storage. Includes memory for file caches, network buffers, and
25439+ * other system services.
25440+ * * `purgeable` Integer _macOS_ - The amount of memory that is marked as
25441+ * "purgeable". The system can reclaim it if memory pressure increases.
2534125442 * * `swapTotal` Integer _Windows_ _Linux_ - The total amount of swap memory in
2534225443 * Kilobytes available to the system.
2534325444 * * `swapFree` Integer _Windows_ _Linux_ - The free amount of swap memory in
0 commit comments