Updated on 2024-09-13 GMT+08:00

Obtaining Information About the Main Window

Function

This API is used to obtain information about the main window.

Function Prototype

getMainWindowInfo(onGetMainWindowInfoResult?: (ret: SDKERR, reason: string, mainWindowInfo: MainWindowInfo) => void): voidgetMainWindowInfo(onGetMainWindowInfoResult?: (ret: SDKERR, reason: string, mainWindowInfo: MainWindowInfo) => void): void

Request Parameters

Table 1 Input parameter description
Parameter Mandatory Type Description
onGetMainWindowInfoResult Yes (ret: SDKERR, reason: string, mainWindowInfo: MainWindowInfo) => void Main window information notification, which is returned when the main window information is obtained.

Return Values

void

Callback Method Parameters

(ret: SDKERR, reason: string, mainWindowInfo: MainWindowInfo) => void

Table 2 Input parameter description
Parameter Type Description
ret For details about SDKERR, see Error Code Reference. Error code.
reason string Error description.
mainWindowInfo MainWindowInfo Main window information.
Table 3 MainWindowInfo
Parameter Type Description
x number Offset of the window relative to the left side of the screen.
y number Offset of the window relative to the top of the screen.
width number Width of the window.
height number Height of the window.
handle number Window handle.