> For the complete documentation index, see [llms.txt](https://developer.eagle.cool/plugin-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.eagle.cool/plugin-api/zh-cn/api/screen.md).

# screen（屏幕）

## 方法 <a href="#z1a5y" id="z1a5y"></a>

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

当前鼠标的绝对位置 x, y。

* 返回 `Promise<point: Object>`
  * `point` Object
    * `point.x`
    * `point.y`

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

***

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

返回主屏幕信息

* 返回 `Promise<display: Display>`
  * `display` [Display](https://www.electronjs.org/zh/docs/latest/api/structures/display) 对象 - 当前屏幕信息

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

***

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

返回一个数组Display\[]，表示当前可用的屏幕。

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

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

***

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

取得插件窗口座标 x 和 y。

* `point` Object
  * `point.x` Interger 类型
  * `point.y` Interger 类型
* 返回 `Promise<display: Display>`
  * `display` [Display](https://www.electronjs.org/zh/docs/latest/api/structures/display) 对象 - 当前屏幕信息

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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/zh-cn/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.
