id | image | title | sidebar_custom_props | ||||
---|---|---|---|---|---|---|---|
windows |
/img/embed/api-docs.jpg |
overwolf.windows API |
|
Use this API to create, interact with and modify your app’s windows.
:::important Please make sure to read our guide on how to use Overwolf windows, to learn everything about Overwolf app windows, and how to use them properly and efficiently in your app. :::
- overwolf.windows.getMainWindow()
- overwolf.windows.getCurrentWindow()
- overwolf.windows.obtainDeclaredWindow()
- overwolf.windows.obtainDeclaredWindow()
- overwolf.windows.obtainDeclaredWindow()
- overwolf.windows.getWindow()
- overwolf.windows.dragMove()
- overwolf.windows.dragResize()
- overwolf.windows.dragResize()
- overwolf.windows.dragResize()
- overwolf.windows.changeSize()
- overwolf.windows.changeSize()
- overwolf.windows.changePosition()
- overwolf.windows.close()
- overwolf.windows.minimize()
- overwolf.windows.maximize()
- overwolf.windows.restore()
- overwolf.windows.restore()
- overwolf.windows.hide()
- overwolf.windows.getWindowState()
- overwolf.windows.getWindowsStates()
- overwolf.windows.openOptionsPage()
- overwolf.windows.setDesktopOnly()
- overwolf.windows.setRestoreAnimationsEnabled()
- overwolf.windows.setTopmost()
- overwolf.windows.sendToBack()
- overwolf.windows.sendMessage()
- overwolf.windows.setWindowStyle()
- overwolf.windows.removeWindowStyle()
- overwolf.windows.getOpenWindows()
- overwolf.windows.setMute()
- overwolf.windows.muteAll()
- overwolf.windows.isMuted()
- overwolf.windows.isWindowVisibleToUser()
- overwolf.windows.bringToFront()
- overwolf.windows.bringToFront()
- overwolf.windows.bringToFront()
- overwolf.windows.bringToFront()
- overwolf.windows.setPosition()
- overwolf.windows.setPosition()
- overwolf.windows.displayMessageBox()
- overwolf.windows.isAccelreatedOSR()
- overwolf.windows.setMinSize()
- overwolf.windows.flash()
- overwolf.windows.setZoom()
- overwolf.windows.onMainWindowRestored
- overwolf.windows.onStateChanged
- overwolf.windows.onMessageReceived
- overwolf.windows.onAltF4Blocked
- overwolf.windows.onScreenPropertyChanged
- overwolf.windows.WindowProperties Object
- overwolf.windows.RelativeTo Object
- overwolf.windows.SetWindowPositionProperties Object
- overwolf.windows.MessageBoxParams Object
- overwolf.windows.ODKRect Object
- overwolf.windows.enums.MessagePromptIcon Enum
- overwolf.windows.enums.WindowDragEdge Enum
- overwolf.windows.enums.WindowStyle Enum
- overwolf.windows.enums.FlashBehavior Enum
- overwolf.windows.onScreenPropertyChangedEvent Object
- overwolf.windows.WindowStateChangedEvent Object
- overwolf.windows.WindowResult Object
- overwolf.windows.WindowInfo Object
- overwolf.windows.enums.WindowStateEx Enum
- overwolf.windows.DragMovedResult Object
- overwolf.windows.DragResizeResult Object
- overwolf.windows.WindowIdResult Object
- overwolf.windows.GetWindowStateResult Object
- overwolf.windows.GetWindowStatesResult Object
- overwolf.windows.IsMutedResult Object
- overwolf.windows.IsWindowVisibleToUserResult Object
- overwolf.windows.DisplayMessageBoxResult Object
- overwolf.windows.MessageReceivedEvent Object
- overwolf.windows.AltF4BlockedEvent Object
Returns a window object of the index page.
This function allows you to get direct access to your main index page (which should be a controller/background page) and it’s HTML Window object (and thus any JS function or DOM element), which is also guaranteed to exist when calling this method from any other window (unlike the getOpenWindows()).
If you hold one global "manager" object in your background, then all other windows have a single object to interact with. This is why we recommend the getMainWindow() approach.
overwolf.windows.sendMessage performs object copying, so it might be a bit less efficient - depending on your use-case
Read more in the "Communication between windows" section.
Calls the given callback function with the current window object as a parameter.
Parameter | Type | Description |
---|---|---|
callback | (Result: WindowResult) => void | A callback function which will be called with the current window object as a parameter |
- The sizes returned in the callback already consider the DPI scaling (to be fixed by version 0.170).
Creates an instance of your window (the window’s name has to be declared in the manifest.json) or returns a window by the window name.
Parameter | Type | Description |
---|---|---|
windowName | string | The name of the window that was declared in the data.windows section in the manifest |
callback | (Result: WindowResult) => void | A callback function which will be called with the current window object as a parameter |
- If the window does not exist - the function return null in the sizes.
- If the window exists - the sizes returned in the callback already consider the DPI scaling (to be fixed by version 0.170).
Creates an instance of your window (the window’s name has to be declared in the manifest.json) or returns a window by the window name.
Parameter | Type | Description |
---|---|---|
windowName | string | The name of the window that was declared in the data.windows section in the manifest |
overrideSetting | WindowProperties Object | Override manifest settings |
callback | (Result: WindowResult) => void | A callback function which will be called with the current window object as a parameter |
- If the window does not exist - the function return null in the sizes.
- If the window exists - the sizes returned in the callback already consider the DPI scaling (to be fixed by version 0.170).
Creates an instance of your window (the window’s name has to be declared in the manifest.json) or returns a window by the window name.
Parameter | Type | Description |
---|---|---|
windowName | string | The name of the window that was declared in the data.windows section in the manifest |
useDefaultSizeAndLocation | DefaultSizeAndLocation Object | Enable the manifest size and position settings |
callback | (Result: WindowResult) => void | A callback function which will be called with the current window object as a parameter |
overwolf.windows.obtainDeclaredWindow("main", {useDefaultSizeAndLocation: true}, console.log)
- If the window does not exist - the function return null in the sizes.
- If the window exists - the sizes returned in the callback already consider the DPI scaling (to be fixed by version 0.170).
Returns WindowResult object for a specific open window.
Parameter | Type | Description |
---|---|---|
windowName | string | The name of the window that was declared in the data.windows section in the manifest |
callback | (Result: WindowResult) => void | Callback will be invoked with the WindowResult object. |
overwolf.windows.getWindow("main", console.log)
- If the window does not exist - returns an error.
Start dragging a window.
Parameter | Type | Description |
---|---|---|
windowId | string | The id or name of the window to drag |
callback (Optional) | function | A callback which is called when the drag is completed |
callback (Optional) | (Result: DragMovedResult) => void | A callback which is called when the drag is completed |
- When you dragMove a native window between monitors with different DPIs, the window will automatically resize according to the new DPI.
- When you quickly Click / DoubleClick a window that has dragMove(), without moving it at all - a "Left mouse released" error is thrown.
Start resizing the window from a specific edge or corner.
Parameter | Type | Description |
---|---|---|
windowId | string | The id or name of the window to resize |
edge | WindowDragEdge Enum | The edge or corner from which to resize the window |
Start resizing the window from a specific edge or corner.
Parameter | Type | Description |
---|---|---|
windowId | string | The id or name of the window to resize |
edge | WindowDragEdge Enum | The edge or corner from which to resize the window |
contentRect | ODKRect Object | The real content of the window (for the ingame drawing resizing white area) |
Start resizing the window from a specific edge or corner.
Parameter | Type | Description |
---|---|---|
windowId | string | The id or name of the window to resize |
edge | WindowDragEdge Enum | The edge or corner from which to resize the window |
rect | ODKRect Object | The real content of the window (for the ingame drawing resizing white area) |
callback | (Result: DragResizeResult) => void | A callback which is called when the resizing process is completed |
Changes the window size to the new width and height, in pixels.
:::warning OBSOLETE This function is obsolete and doesn't calculate DPI - so you need to pre-calculate DPI before calling it, or, use this signature of that calculates DPI - so you don't need to calculate it yourself. :::
Parameter | Type | Description |
---|---|---|
windowId | string | The id or name of the window to resize |
width | int | The new width to resize the window to |
height | int | The new height to resize the window to |
callback (Optional) | (Result) => void | Reports success or failure when the size change is completed. |
Changes the window size to the new width and height, in pixels, including DPI scale when resizing.
- This function calculates DPI, so you don't need to calculate it yourself.
- This function works for all the window types.
Parameter | Type | Description |
---|---|---|
ChangeWindowSizeParams | ChangeWindowSizeParams Object | Container for the window settings |
callback (Optional) | (Result) => void | Reports success or failure when the size change is completed. |
let sizeSettings = {
"window_id":"Window_Extension_nhmkaollkcmjiecdnnjmgfifjgkfegkljnjjbipp",
"width":1000,
"height":1000,
"auto_dpi_resize":true //relevant only for native windows
};
overwolf.windows.changeSize(sizeSettings ,console.log);
Changes the window position in pixels from the top left corner.
Note: changePosition() calculates DPI before changing position (so you should pass coordinates without calculating their DPI).
Parameter | Type | Description |
---|---|---|
windowId | string | The id or name of the window for which to change the position |
left | int | The new window position on the X axis in pixels from the left |
top | int | The new window position on the Y axis in pixels from the top |
callback (Optional) | (Result) => void | Reports success or failure when the position change is completed. |
Closes the window.
Parameter | Type | Description |
---|---|---|
windowId | string | The id or name of the window to close |
callback (Optional) | (Result: WindowIdResult) => void | Called after the window is closed |
Minimizes the window.
Parameter | Type | Description |
---|---|---|
windowId | string | The id or name of the window to minimize |
callback (Optional) | (Result: WindowIdResult) => void | Called after the window is minimized |
Notes
minimize()
will minimize the targeted window even when the manifest resizable flag is set tofalse
.- When minimizing a native window, the window object values for
top
,left
,width
andheight
are unexpected and shouldn't be regarded.
Maximize the window.
Parameter | Type | Description |
---|---|---|
windowId | string | The id or name of the window to maximize |
callback (Optional) | (Result: WindowIdResult) => void | Called after the window is maximized |
-
maximize()
will maximize the targeted window even when the manifest resizable flag is set tofalse
. -
In order to restore a maximized window to its previous state, call window.restore().
Restores a minimized/maximized/hidden window.
Parameter | Type | Description |
---|---|---|
windowId | string | The id of the window to restore |
callback (Optional) | (Result: WindowIdResult) => void | Called after the window is restored |
- When restoring a minimized/maximized window, it restores the window to the previous size/position.
- When restoring a (non-desktop) window that is partly out of the game bounds, it repositions the window so that it fully fits inside the game bounds
- Read some usage tips here.
Restores a minimized/maximize/hidden window.
Parameter | Type | Description |
---|---|---|
windowName | string | The id of the window to restore |
callback (Optional) | (Result: WindowIdResult) => void | Called after the window is restored |
- When restoring a minimized/maximized window, it restores the window to the previous size/position.
- When restoring a (non-desktop) window that is partly out of the game bounds, it repositions the window so that it fully fits inside the game bounds
- Read some usage tips here.
Hides the window from screen and taskbar.
Note that the tray icon (if defined) visibility is not affected by calling this function.
Parameter | Type | Description |
---|---|---|
windowId | string | The id or name of the window to hide |
callback | (Result: WindowIdResult) => void | Called after the window was hidden |
Returns the state of the window (normal/minimized/maximized/closed).
Parameter | Type | Description |
---|---|---|
windowId | string | The id or name of the window to restore |
callback | (Result: GetWindowStateResult) => void | Called with the window state |
Returns the state of all windows owned by the app (normal/minimized/maximized/closed).
Parameter | Type | Description |
---|---|---|
callback | (Result: GetWindowsStatesResult) => void | Called with an array containing the states of the windows |
Opens the options page specified in the manifest file. Does nothing if no such page has been specified.
Parameter | Type | Description |
---|---|---|
callback | (Result) => void | Reports success or failure |
Sets whether the window should be injected to games or not.
:::warning OBSOLETE This function is obsolete. :::
If you are using this function on an in-game window while you are in a game, the window will hide, but it will not appear on the desktop automatically. Nevertheless, we are always recommending to use different windows for in-game and desktop.
Parameter | Type | Description |
---|---|---|
windowId | string | The id or name of the window to set |
shouldBeDesktopOnly | bool | |
callback | (Result: WindowIdResult) => void | Called after the window was hidden |
Sets whether the window should have minimize/restore animations while in game.
Parameter | Type | Description |
---|---|---|
windowId | string | The id or name of the window to set |
shouldEnableAnimations | bool | |
callback | (Result: WindowIdResult) => void | Called after the window was hidden |
Change the window’s topmost status. Handle with care as topmost windows can negatively impact user experience.
Parameter | Type | Description |
---|---|---|
windowId | string | The id or name of the window to set |
shouldBeTopmost | bool | |
callback | (Result) => void | Reports success or failure |
Sends the window to the back.
Parameter | Type | Description |
---|---|---|
windowId | string | The id or name of the window to set |
shouldBeTopmost | bool | |
callback | (Result) => void | Reports success or failure |
Sends a message to an open window.
The window receiving the message needs to listen on the onMessageReceived event.
:::warning
Using sendMessage performs object copying, so it might be a bit less efficient - depending on your use-case. (edited) is not our suggested choice for communication between windows since it might not work on some occasions (for example, when sending extremely big messages).
Read more in the Windows Communication guide.
:::
Parameter | Type | Description |
---|---|---|
windowId | string | The id or name of the window to send the message to |
messageId | string | A message id |
messageContent | Object | The content of the message |
callback | (Result) => void | Reports success or failure |
overwolf.windows.sendMessage('secondWindow', '1', 'hello second window', ()=>{console.log('Message sent to window "secondWindow"')})
Add Window In Game styling (for example, allowing mouse clicks to be passed through the window into the game)
Parameter | Type | Description |
---|---|---|
windowId | string | The id or name of the window to style |
style | WindowStyle Enum | The style to be added |
callback | (Result) => void | Reports success or failure |
Remove window style.
Parameter | Type | Description |
---|---|---|
windowId | string | The id or name of the window to style |
style | WindowStyle Enum | The style to be remvoed |
callback | (Result) => void | Reports success or failure |
Returns an array of all open windows as objects. The objects can be manipulated like any other window.
:::warning
we highly recommend not to use getOpenWindows() for windows communication.
Please read the "Communicating between windows" section for more info.
:::
Parameter | Type | Description |
---|---|---|
callback | function | A callback function which will be called with a map object of (window-name, Window Object) items |
Set the current window mute state (on/off).
Parameter | Type | Description |
---|---|---|
mute | bool | Window mute state (true - mute is on, false - mute is off) |
callback | (Result) => void | Reports success or failure |
Mutes all sound sources for the current window.
Parameter | Type | Description |
---|---|---|
callback | (Result) => void | Called with the result of the request |
Get the window’s mute state (true/false).
Parameter | Type | Description |
---|---|---|
callback | (Result: IsMutedResult) => void | Called with the result of the request {"muted": true/false} |
Get the Visibility state of the window.
:::warning Used only with windows without a transparent border. :::
Parameter | Type | Description |
---|---|---|
callback | (Result: IsWindowVisibleToUserResult) => void | Called with the result of the request {"visible": hidden/fully/partial} |
Brings the requested window to the front.
Parameter | Type | Description |
---|---|---|
windowId | string | The id or name of the window |
callback | (Result) => void | Called with the result of the request |
- For in-game windows, calling this function will always bring the window to the front.
- For desktop/native windows, the behavior depends on the game mode:
- Fullscreen game: The window will stay in the background behind the game. If you want to take focus, use the grabFocus version.
- Windowed game: The window will move to the foreground. The game window will not be changed.
Brings this window to the front.
- For in-game windows, calling this function will always bring the window to the front.
- For desktop/native windows, the behavior depends on the game mode:
- Fullscreen game: The window will stay in the background behind the game. If you want to take focus, use the grabFocus version.
- Windowed game: The window will move to the foreground. The game window will not be changed.
Parameter | Type | Description |
---|---|---|
callback | (Result) => void | Called with the result of the request |
Brings this window to the front.
- For in-game windows, calling this function will always bring the window to the front.
- For desktop/native windows, the behavior depends on the game mode AND the grabFocus param:
- Fullscreen game + grabFocus:false - The window will stay in the background behind the game.
- Fullscreen game + grabFocus:true - The window will move to the foreground and take the focus. The game window will be minimized (use with caution, usually it's a bad UX).
- Windowed game + grabFocus:true/false - The window will move to the foreground. The game window will not be changed.
Parameter | Type | Description |
---|---|---|
grabFocus | bool | window will take system focus |
callback | (Result) => void | Called with the result of the request |
Brings a window to the front.
- For in-game windows, calling this function will always bring the window to the front.
- For desktop/native windows, the behavior depends on the game mode AND the grabFocus param:
- Fullscreen game + grabFocus:false - The window will stay in the background behind the game.
- Fullscreen game + grabFocus:true - The window will move to the foreground and take the focus. The game window will be minimized (use with caution, usually it's a bad UX).
- Windowed game + grabFocus:true/false - The window will move to the foreground. The game window will not be changed.
Parameter | Type | Description |
---|---|---|
windowId | string | The id or name of the window |
grabFocus | bool | window will take system focus |
callback | (Result) => void | Called with the result of the request |
Change this window location in the opened windows stack.
Parameter | Type | Description |
---|---|---|
properties | SetWindowPositionProperties Object | The desired location in the windows stack |
callback | (Result) => void | Called with the result of the request |
Using the following code will place your app window in front of League of Legends’ client window:
overwolf.windows.setPosition({
"relativeTo": {
"processName": "LeagueClientUx",
"windowTitle": "League of Legends"
},
"insertAbove": true,
},
console.log);
Change a window location in the opened windows stack.
Parameter | Type | Description |
---|---|---|
windowId | string | The id or name of the window |
properties | SetWindowPositionProperties Object | The desired location in the windows stack |
callback | (Result) => void | Called with the result of the request |
Displays a customized popup message prompt.
Parameter | Type | Description |
---|---|---|
messageParams | MessageBoxParams Object | The type and texts that the message prompt will have |
callback | (Result: DisplayMessageBoxResult) => void | Returns the user's action (confirmed = true / false) |
Using the following code will create a pop up message for your app:
overwolf.windows.displayMessageBox({
message_title: "title_text",
message_body: "body_text",
confirm_button_text: "Confirm",
cancel_button_text: "Cancel",
message_box_icon: overwolf.windows.enums.MessagePromptIcon.ExclamationMark
},console.log)
Is the current window accelerated and is OSR |GPU| acceleration is supported for this machine.
Note that the function name is misspelled. It is kept this way for backwards compatibility.
:::warning OBSOLETE The OSR acceleration feature is is no longer supported and maintained. :::
Parameter | Type | Description |
---|---|---|
callback | (Result) => void | Called with the result of the request |
A callback function which will be called with the status of the request
{
"success": true,
"status": "success", //for backward compatibility
"accelerated":false,
"supported":true,
"optimized": true
}
Overrides the window's defined minimum size.
Parameter | Type | Description |
---|---|---|
windowId | string | The id of the window |
width | int | The new minimum width |
height | int | The new minimum height |
callback | (Result) => void | Called with the result of the request |
Flashes a window.
Parameter | Type | Description |
---|---|---|
windowId | string | The id of the window to flash |
behavior | FlashBehavior enum | Defines window flashing behavior |
callback | (Result) => void | Called with the result of the request |
Set window zoom level (0.0 for reset).
Parameter | Type | Description |
---|---|---|
zoomFactor | double | The new zoom factor. A value of 0 sets the window to its current default zoom factor. Values greater than 0 specify a (possibly non-default) zoom factor for the window. |
windowId | string | The window id, empty for current window |
Fired when the main window is restored.
Fired when the state of a window is changed, with the following structure: WindowStateChangedEvent Object
The event is being fired for all the declared windows (background,in-game,desktop, etc). If your app has multiple windows listening to this event - you also need to test the window name/id arguments that are passed to the event to see if it is relevant for your window.
- If your app displays an ad, you must add some checking in the event handler to make sure that the window with the state change is the window with the ad, and to avoid unnecessary wrong calls to the refreshAd() and removeAd().
- For in-game windows only, onStateChanged event is not fired when using Win+D for minimizing all windows. So in that case you can't hide/refresh ads. If you want to handle that scenario you can listen to onGameInfoUpdated event and stop the ad if gameInfo.isInFocus is false.
Fired when this window received a message, with the following structure: MessageReceivedEvent Object
overwolf.windows.onMessageReceived.addListener((message)=>{
if(message.id === '1'){
console.log('Message received', message.content)
}
})
Fired on all app windows when the user was prevented from closing a window using Alt+F4, with the following structure: AltF4BlockedEvent Object
Fired when native window (or OSR on desktop) moved to other monitor when current monitor resolution changed, with the following structure: onScreenPropertyChangedEvent Object
- Currently, only the relevant window gets this event - so your background page or other windows doesn't.
- From OW v0.156 we are going to fix it: The event is being fired for all the declared windows (background,in-game,desktop, etc). If your app has multiple windows listening to this event - you also need to test the window name/id arguments that are passed to the event to see if it is relevant for your window.
An object that allows to override the manifest.json requested window settings.
Parameter | Type | Description |
---|---|---|
nativeWindow | bool | |
enablePopupBlocker | bool | |
isBottomMost | bool | Indicates whether the window will be on bottom of other Overwolf windows |
An object that Enable the manifest size and position settings (default is false).
Parameter | Type | Description |
---|---|---|
useDefaultSizeAndLocation | bool |
The default behaviour of OW is to "remember" the last size and position of a window, before it closes.
When useDefaultSizeAndLocation
is set to true, the window will be created using the default (manifest) size and location, rather than the saved setting (if one exists).
If there is no "start_position" property (size and position) for a window in the manifest, it will default to 0,0.
Defines parameters required for displaying a message box.
Parameter | Type | Description |
---|---|---|
message_title | string | The message prompt title text |
message_body | string | The message prompt body text |
confirm_button_text | string | The left (confirmation) button’s text |
cancel_button_text | string | The right (cancellation) button’s text |
message_box_icon | MessagePromptIcon enum | The icon of the message prompt |
Data to find OS relative window.
Parameter | Type | Description |
---|---|---|
processName | string | Relative window process name |
windowTitle | string | The window title |
Data to find OS relative window.
Parameter | Type | Description |
---|---|---|
relativeTo | RelativeTo Object | Relative window data to search for |
windowTitle | string | The window title |
An object that holds information about the real content of the window (for the ingame drawing resizing white area).
Parameter | Type | Description |
---|---|---|
top | int | |
left | int | |
width | int | |
height | int |
An object which specifies the window style.
Option | Description |
---|---|
InputPassThrough | Mouse and keyboard input will pass to the window AND to the game (no input blocking). |
BottomMost | When set true to a window, it's not possible to drag it over other app's windows. |
Note: the manifest clickthrough flag has a different behavior - when it's set to true
, the input passes through the window to the game.
Message prompt icon.
Option | Description |
---|---|
None | No Icon |
QuestionMark | Question mark |
ExclamationMark | Exclamation mark |
Message prompt icon.
Option | Description |
---|---|
None | No window edge or corner to drag |
Left | Drag the left window edge in order to resize it |
Right | Drag the right window edge in order to resize it |
Top | Drag the top window edge in order to resize it |
Bottom | Drag the bottom window edge in order to resize it |
TopLeft | Drag the top-left window edge in order to resize it |
TopRight | Drag the top-right window edge in order to resize it |
BottomLeft | Drag the bottom-left window edge in order to resize it |
BottomRight | Drag the bottom-right window edge in order to resize it |
Window flashing behavior.
Option | Description |
---|---|
automatic | Turns off automatically when the window regains focus. Does not turn on if window is already in focus. |
on | Turns flashing on |
off | Turns flashing off |
Window Type
Option | Description |
---|---|
Background | Background window |
Desktop | Desktop window |
OffScreen | Offscreen (in-game) window |
Parameter | Type | Description |
---|---|---|
id | string | the window ID |
name | string | the window name |
monitor | overwolf.utils.Display object | Display info |
{
"id": "Window_Extension_anoahjhemlbnmhkljlgbmnfflpnhgjpmfjnhdfoe_desktop",
"name": "desktop",
"monitor": {"name": "DELL P2319H", "id": "DISPLAY4", "x": 0, "y": 0, "width": 1920, "height": 1080, "is_primary": true}
}
Parameter | Type | Description | Notes |
---|---|---|---|
window_id | string | the window ID | See notes. |
window_state | string | the window state | Deprecated. See notes. |
window_state_ex | string | the window state | See notes. |
window_previous_state | string | the window previous state | Deprecated. See notes. |
window_previous_state_ex | string | the window previous state | See notes. |
app_id | string | the app ID | See notes. |
{
"window_id": "Window_Extension_cghphpbjeabdkomiphingnegihoigeggcfphdofo_index",
"window_state_ex": "normal", //use this
"window_state": "normal",
"window_previous_state_ex": "closed", //use this
"window_previous_state": "minimized",
"app_id": "cghphpbjeabdkomiphingnegihoigeggcfphdofo",
"window_name": "index"
}
- Use window_state_ex and window_previous_state_ex that are more accurate than the old window_state and window_previous_state, left for backward comparability.
- window_state_ex returns one of these states: [closed | minimized | hidden | normal | maximized].
Container for the window settings.
Parameter | Type | Description |
---|---|---|
window_id | string | |
width | int | |
height | int | |
auto_dpi_resize | boolean | relevant only for native windows. Overwrite the disable_auto_dpi_sizing manifest flag |
{
"window_id":"Window_Extension_nhmkaollkcmjiecdnnjmgfifjgkfegkljnjjbipp",
"width":1000,
"height":1000,
"auto_dpi_resize":true
}
Container for the currrent window object.
Parameter | Type | Description |
---|---|---|
window | WindowInfo object |
{
"success": true,
"window": { ... }
}
The current window object.
Parameter | Type | Description |
---|---|---|
id | string | |
dpiScale | number | 1 = 100%, 1.25 = 125%, ... |
name | string | |
width | number | with DPI conversion |
height | number | with DPI conversion |
top | number | with DPI conversion |
left | number | with DPI conversion |
monitorId | string | |
isVisible | boolean | |
state | string | deprecated and kept only for backward compatibility |
stateEx | WindowStateEx enum | always use this param to get the state of the window |
monitorId | string | return monitorId (If the Window is not opened already) - allowing one window (background) to know on which monitor another window exists. |
Parent | string | The parent window id |
type | string | WindowType object (version added: 0.191) |
{
"success": true,
"window": {
"id": "Window_Extension_hffhbjnafafjnehejohpkfhjdenpifhihebpkhni",
"name": "index",
"width": 600,
"height": 600,
"top": 153,
"left": 417,
"monitorId": "\\.\DISPLAY4",
"isVisible": true,
"state": "Minimized", //deprecated
"stateEx": "hidden", //the state of the window
"Parent": null
}
Possible windows states.
Option | Description |
---|---|
closed | |
minimized | |
hidden | |
normal | |
maximized |
Container for the horizontal and vertical changes after an OW app window dragged or moved.
Parameter | Type | Description |
---|---|---|
horizontalChange | number | |
verticalChange | number |
{
"success": true,
"horizontalChange": -51,
"verticalChange": 6
}
Container for the width and height changes after an OW app window resized.
Parameter | Type | Description |
---|---|---|
id | string | |
width | number | |
height | number |
{
"success": true,
"id": "Window_Extension_nhmkaollkcmjiecdnnjmgfifjgkfegkljnjjbipp",
"width": 600,
"height": 800
}
Container for the width and height changes after an OW app window resized.
Parameter | Type | Description |
---|---|---|
window_id | string |
{
"success": true,
"window_id": "Window_Extension_nhmkaollkcmjiecdnnjmgfifjgkfegkljnjjbipp"
}
Container for the window states.
Parameter | Type | Description |
---|---|---|
window_id | string | |
window_state | string | |
window_state_ex | WindowStateEx enum |
{
"success": true,
"status": "success", //deprecated and kept only for backward compatibility
"window_id": "Window_Extension_onemchifcjibofkgemelmnjeialamgnigfpomeih",
"window_state": "minimized", //deprecated and kept only for backward compatibility
"window_state_ex": "hidden" //always use this param to get the state of the window.
}
Container for the windows states array.
Parameter | Type | Description |
---|---|---|
result | Dictionary< string > | |
resultV2 | Dictionary<WindowStateEx> |
{
"success": true,
"result": "{background:`minimized`, desktop:`normal`, overlay:`normal`}",
"resultV2": "{background:`hidden`, desktop:`normal`, overlay:`normal`}"
}
Container for the mute state.
Parameter | Type | Description |
---|---|---|
muted | boolean |
{
"success": true,
"status": "success", //deprecated and kept only for backward compatibility
"muted": true
}
Container for the window visibility states.
Parameter | Type | Description |
---|---|---|
visible | string |
- "hidden" – The window is completely hidden.
- "fully" – The window is fully visible to the user.
- "partial" – The window is partially visible to the user (and partially covered by other window/s).
{
"success": true,
"status": "success", //deprecated and kept only for backward compatibility
"hidden": true
}
Container for the window visibility states.
Parameter | Type | Description |
---|---|---|
confirmed | boolean |
{
"success": true,
"status": "success", //deprecated and kept only for backward compatibility
"confirmed": true
}
Parameter | Type | Description | Notes |
---|---|---|---|
id | string | the window ID | |
content | string | the message content |
{
"id": "1",
"content": "hello"
}
Parameter | Type | Description | Notes |
---|---|---|---|
id | string | the window ID | |
name | string | the window name |
{
"id": "1",
"name": "index"
}