Skip to content

Commit

Permalink
typedef: add Window.controls
Browse files Browse the repository at this point in the history
  • Loading branch information
CanadaHonk committed Jan 3, 2023
1 parent 50d60b2 commit 419050b
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions gluon.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,20 @@ type BrowserVersions = {
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 = {
/** API for accessing the window itself. */
window: WindowApi,
Expand All @@ -138,6 +152,9 @@ type Window = {
/** Browser version info of the window: product (browser), engine (Chromium/Firefox), and JS engine (V8/SpiderMonkey). */
versions: BrowserVersions,

/** Control (minimize, maximize, etc) the browser window. */
controls: ControlsApi,

/** Close the Gluon window. */
close(): void
};
Expand Down

0 comments on commit 419050b

Please sign in to comment.