electron/docs/api/screen.md

18 lines
452 B
Markdown
Raw Normal View History

2014-01-07 12:35:13 +00:00
# screen
Gets various info about screen size, displays, cursor position, etc.
2014-07-01 15:30:26 +00:00
```js
var Screen = require('screen');
var BrowserWindow = require('browser-window');
var size = Screen.getPrimaryDisplay().workAreaSize;
mainWindow = new BrowserWindow({ width: size.width, height: size.height });
```
2014-01-07 12:35:13 +00:00
## screen.getCursorScreenPoint()
Returns the current absolute position of the mouse pointer.
## screen.getPrimaryDisplay()
Returns the primary display.