File tree 1 file changed +34
-0
lines changed
resources/views/docs/1/the-basics 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ title : Screens
3
+ order : 850
4
+ ---
5
+ # Screens
6
+
7
+ The ` Screen ` facade lets you get information about the screens currently connected to the computer.
8
+
9
+ ``` php
10
+ use Native\Laravel\Facades\Screen;
11
+ ```
12
+
13
+ ## Displays
14
+
15
+ The ` displays ` method gives you an array of information about all the displays actually used.
16
+
17
+ If you use an external display with your laptop screen closed, the internal screen of your laptop will not be part of the array.
18
+
19
+ See [ Display object] ( https://www.electronjs.org/docs/latest/api/structures/display ) documentation.
20
+
21
+ ``` php
22
+ $screens = Screen::displays();
23
+ ```
24
+
25
+ ## Cursor position
26
+
27
+ The ` cursorPosition ` method gives you the coordinates of the current absolute position of the mouse cursor.
28
+
29
+ ``` php
30
+ $position = Screen::cursorPosition();
31
+
32
+ $position->x
33
+ $position->y
34
+ ```
You can’t perform that action at this time.
0 commit comments