获取主窗口信息
接口功能
该接口用于获取主窗口信息
函数原型
getMainWindowInfo(onGetMainWindowInfoResult?: (ret: SDKERR, reason: string, mainWindowInfo: MainWindowInfo) => void): void
请求参数
| 参数名称 | 是否必选 | 参数类型 | 参数说明 |
|---|---|---|---|
| onGetMainWindowInfoResult | Y | (ret: SDKERR, reason: string, mainWindowInfo: MainWindowInfo) => void | 主窗口信息通知,获取主窗口信息请求返回 |
返回值
void
回调方法参数说明:
(ret: SDKERR, reason: string, mainWindowInfo: MainWindowInfo) => void
| 参数名称 | 参数类型 | 参数说明 |
|---|---|---|
| ret | SDKERR 请参考错误码参考 | 错误码 |
| reason | string | 错误描述 |
| mainWindowInfo | MainWindowInfo | 主窗口信息 |
| 参数名称 | 参数类型 | 参数说明 |
|---|---|---|
| x | number | 窗口相对于屏幕左侧的偏移量。 |
| y | number | 窗口相对于屏幕顶端的偏移量。 |
| width | number | 窗口的宽度。 |
| height | number | 窗口的高度。 |
| handle | number | 窗口句柄 |