typedef: add Window.controls
This commit is contained in:
parent
50d60b27a8
commit
419050bf6b
17
gluon.d.ts
vendored
17
gluon.d.ts
vendored
@ -119,6 +119,20 @@ type BrowserVersions = {
|
|||||||
jsEngine: VersionInfo
|
jsEngine: VersionInfo
|
||||||
};
|
};
|
||||||
|
|
||||||
|
type ControlsApi = {
|
||||||
|
/** Minimize the browser window. */
|
||||||
|
minimize(): Promise<void>,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Maximize the browser window.
|
||||||
|
* Doesn't make the window appear (use show() before as well).
|
||||||
|
*/
|
||||||
|
maximize(): Promise<void>,
|
||||||
|
|
||||||
|
/** Show (unminimize) the browser window. */
|
||||||
|
show(): Promise<void>
|
||||||
|
}
|
||||||
|
|
||||||
type Window = {
|
type Window = {
|
||||||
/** API for accessing the window itself. */
|
/** API for accessing the window itself. */
|
||||||
window: WindowApi,
|
window: WindowApi,
|
||||||
@ -138,6 +152,9 @@ type Window = {
|
|||||||
/** Browser version info of the window: product (browser), engine (Chromium/Firefox), and JS engine (V8/SpiderMonkey). */
|
/** Browser version info of the window: product (browser), engine (Chromium/Firefox), and JS engine (V8/SpiderMonkey). */
|
||||||
versions: BrowserVersions,
|
versions: BrowserVersions,
|
||||||
|
|
||||||
|
/** Control (minimize, maximize, etc) the browser window. */
|
||||||
|
controls: ControlsApi,
|
||||||
|
|
||||||
/** Close the Gluon window. */
|
/** Close the Gluon window. */
|
||||||
close(): void
|
close(): void
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user