Skip to content

Commit

Permalink
chore(api): document new options from #6665
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed May 26, 2023
1 parent 000104b commit 6d08c66
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 16 deletions.
2 changes: 1 addition & 1 deletion tooling/api/docs/js-api.json

Large diffs are not rendered by default.

42 changes: 27 additions & 15 deletions tooling/api/src/window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1459,12 +1459,12 @@ class WindowManager extends WebviewWindowHandle {
type: 'setMinSize',
payload: size
? {
type: size.type,
data: {
width: size.width,
height: size.height
}
type: size.type,
data: {
width: size.width,
height: size.height
}
}
: null
}
}
Expand Down Expand Up @@ -1501,12 +1501,12 @@ class WindowManager extends WebviewWindowHandle {
type: 'setMaxSize',
payload: size
? {
type: size.type,
data: {
width: size.width,
height: size.height
}
type: size.type,
data: {
width: size.width,
height: size.height
}
}
: null
}
}
Expand Down Expand Up @@ -2391,17 +2391,29 @@ interface WindowOptions {
* The user agent for the webview.
*/
userAgent?: string
/**
* Whether the window's native maximize button is enabled or not. Defaults to `true`.
*/
maximizable?: boolean
/**
* Whether the window's native minimize button is enabled or not. Defaults to `true`.
*/
minimizable?: boolean
/**
* Whether the window's native close button is enabled or not. Defaults to `true`.
*/
closable?: boolean
}

function mapMonitor(m: Monitor | null): Monitor | null {
return m === null
? null
: {
name: m.name,
scaleFactor: m.scaleFactor,
position: mapPhysicalPosition(m.position),
size: mapPhysicalSize(m.size)
}
name: m.name,
scaleFactor: m.scaleFactor,
position: mapPhysicalPosition(m.position),
size: mapPhysicalSize(m.size)
}
}

function mapPhysicalPosition(m: PhysicalPosition): PhysicalPosition {
Expand Down

0 comments on commit 6d08c66

Please sign in to comment.