forked from EasyScreenCast/EasyScreenCast
-
Notifications
You must be signed in to change notification settings - Fork 4
/
display_module.js
40 lines (36 loc) · 838 Bytes
/
display_module.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
const ExtensionUtils = imports.misc.extensionUtils;
const Me = ExtensionUtils.getCurrentExtension();
/**
* @type {{_display(): Meta_Display, number_of_displays(): int}}
*/
var display_api = {
/**
* Returns the Wayland display or
*
* @return {Meta_Display}
*/
_display() {
return global.display || global.screen;
},
/**
* @return {int}
* @public
*/
number_displays() {
return this._display().get_n_monitors();
},
/**
* @param {int} display_index
* @returns {*}
*/
display_geometry_for_index(display_index) {
return this._display().get_monitor_geometry(display_index);
},
/**
* @param {string} cursor
* @returns {*}
*/
set_cursor(cursor) {
return this._display().set_cursor(cursor);
},
};