Control open windows.
We try to keep this class similar to Electron's known BrowserWindow
class, to keep it simple to use.
id
number
id
numberprocessId
number - process id associated with the windowpath
string - path to executable associated with the window
Returns Rectangle
Resizes and moves the window to the supplied bounds. Any properties that are not supplied will default to their current values.
window.setBounds({ height: 50 });
Returns string
Shows the window.
Hides the window.
Minimizes the window.
Restores the window.
Maximizes the window.
Brings the window to top and focuses it.
opacity
- a value between 0 and 1.
Sets the window opacity.
Gets the window opacity
Returns number
between 0 and 1.
NOTE: on macOS this method returns an
EmptyMonitor
object for compatibility.
Gets monitor which the window belongs to.
Returns Monitor
Returns boolean
- whether the window is a valid window.
Returns boolean
- whether the window is visible or not.
Returns Window
win
Window | number | null- pass null to unset window owner.
size
number - can be16
,32
,64
or256
. By default it's64
.
Returns a png Buffer