# screen

## Methods <a href="#z1a5y" id="z1a5y"></a>

## getCursorScreenPoint() <a href="#tkp0d" id="tkp0d"></a>

Absolute position x, y of the current mouse cursor.

* Returns `Promise<point: Object>`
  * `point` Object
    * `point.x`
    * `point.y`

```javascript
let point = await eagle.screen.getCursorScreenPoint();
```

***

## getPrimaryDisplay() <a href="#sskcn" id="sskcn"></a>

Returns primary display information.

* Returns `Promise<display: Display>`
  * `display` [Display](https://www.electronjs.org/docs/latest/api/structures/display) Object - Current display information.

```javascript
let display = await eagle.screen.getPrimaryDisplay();
```

***

## getAllDisplays() <a href="#eev58" id="eev58"></a>

Returns an array Display\[], representing currently available screens.

* Returns `Promise<displays: Display[]>`
  * `displays` [Display](https://www.electronjs.org/docs/latest/api/structures/display)\[]

```javascript
let displays = await eagle.screen.getAllDisplays();
```

***

## getDisplayNearestPoint(point) <a href="#ox9dk" id="ox9dk"></a>

Gets the plugin window coordinates x and y.

* `point` Object
  * `point.x` Integer type
  * `point.y` Integer type
* Returns `Promise<display: Display>`
  * `display` [Display](https://www.electronjs.org/docs/latest/api/structures/display) Object - Current display information.

```javascript
let display = await eagle.screen.getDisplayNearestPoint({ x: 100, y: 100 });
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.eagle.cool/plugin-api/api/screen.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
