|
1 | | -// Type definitions for Electron 37.2.5+wvcus |
| 1 | +// Type definitions for Electron 37.4.0+wvcus |
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 |
@@ -1219,7 +1219,7 @@ declare namespace Electron { |
1219 | 1219 | * called first, a default log directory will be created equivalent to calling |
1220 | 1220 | * `app.setAppLogsPath()` without a `path` parameter. |
1221 | 1221 | */ |
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; |
1223 | 1223 | /** |
1224 | 1224 | * The user's preferred system languages from most preferred to least preferred, |
1225 | 1225 | * including the country codes if applicable. A user can modify and add to this |
@@ -1256,6 +1256,12 @@ declare namespace Electron { |
1256 | 1256 | * that do not have associated countries in the language name. |
1257 | 1257 | */ |
1258 | 1258 | getPreferredSystemLanguages(): string[]; |
| 1259 | + /** |
| 1260 | + * An array containing documents in the most recent documents list. |
| 1261 | + * |
| 1262 | + * @platform darwin,win32 |
| 1263 | + */ |
| 1264 | + getRecentDocuments(): string[]; |
1259 | 1265 | /** |
1260 | 1266 | * The current system locale. On Windows and Linux, it is fetched using Chromium's |
1261 | 1267 | * `i18n` library. On macOS, `[NSLocale currentLocale]` is used instead. To get the |
@@ -2575,6 +2581,19 @@ declare namespace Electron { |
2575 | 2581 | * Focuses on the window. |
2576 | 2582 | */ |
2577 | 2583 | 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); |
2578 | 2597 | /** |
2579 | 2598 | * Gets the background color of the window in Hex (`#RRGGBB`) format. |
2580 | 2599 | * |
@@ -2934,6 +2953,23 @@ declare namespace Electron { |
2934 | 2953 | * @platform darwin |
2935 | 2954 | */ |
2936 | 2955 | 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; |
2937 | 2973 | /** |
2938 | 2974 | * Sets whether the window should show always on top of other windows. After |
2939 | 2975 | * setting this, the window is still a normal window, not a toolbox window which |
@@ -5216,6 +5252,19 @@ declare namespace Electron { |
5216 | 5252 | */ |
5217 | 5253 | focus(): void; |
5218 | 5254 | 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); |
5219 | 5268 | /** |
5220 | 5269 | * Gets the background color of the window in Hex (`#RRGGBB`) format. |
5221 | 5270 | * |
@@ -5635,6 +5684,23 @@ declare namespace Electron { |
5635 | 5684 | * @platform darwin |
5636 | 5685 | */ |
5637 | 5686 | 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; |
5638 | 5704 | /** |
5639 | 5705 | * Sets whether the window should show always on top of other windows. After |
5640 | 5706 | * setting this, the window is still a normal window, not a toolbox window which |
@@ -14592,6 +14658,13 @@ declare namespace Electron { |
14592 | 14658 | * @platform darwin,win32 |
14593 | 14659 | */ |
14594 | 14660 | getBounds(): Rectangle; |
| 14661 | + /** |
| 14662 | + * The GUID used to uniquely identify the tray icon and allow it to retain its |
| 14663 | + * position between relaunches, or null if none is set. |
| 14664 | + * |
| 14665 | + * @platform darwin,win32 |
| 14666 | + */ |
| 14667 | + getGUID(): (string) | (null); |
14595 | 14668 | /** |
14596 | 14669 | * Whether double click events will be ignored. |
14597 | 14670 | * |
|
0 commit comments