- Tutorials:
stbWindowMgr provides API to the window manager functionality.
Some methods require windowId field which can be achieved either from stbWindowMgr.windowInit
or from stbWebWindow.windowId
.
Methods
(static) hideWindow(windowId)
- Since:
- 0.2.18
Make specified window invisible.
If there other windows exist on window stack then most upper window will became active (be visible and has input focus).
Parameters:
Name | Type | Description |
---|---|---|
windowId |
number | window ID to hide |
(static) IsScreenSaverWindowExist() → {boolean}
- Since:
- 0.2.18
Get status for "screen saver" window.
Returns:
possible values:
Value | Description |
---|---|
true | window exist |
false | window not found |
- Type
- boolean
(static) openWebCfgPortal(windowAttributes)
- Since:
- 0.2.18
Open "Configuration Portal" window and run specified web application.
Parameters:
Name | Type | Description |
---|---|---|
windowAttributes |
stbWindowMgr~windowAttributes | initialization parameters to set |
(static) SetFocusedInputText(text)
- Since:
- 0.2.18
Set text "text
" for currently focused HTML element.
Parameters:
Name | Type | Description |
---|---|---|
text |
string | string to set |
(static) setVirtualMouseMode(mode)
- Since:
- 0.2.16
Set virtual mouse mode.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
mode |
boolean | possible values:
|
(static) windowInit(windowAttributes) → {number}
- Since:
- 0.2.18
Create new window with specified attributes.
Parameters:
Name | Type | Description |
---|---|---|
windowAttributes |
stbWindowMgr~windowAttributes | created window initialization parameters |
Returns:
window ID for created window (-1 if window was not created)
- Type
- number
(static) windowAttr(windowId, windowAttributes) → {boolean}
- Since:
- 0.2.18
Set window attributes.
Parameters:
Name | Type | Description |
---|---|---|
windowId |
number | ID of target window |
windowAttributes |
stbWindowMgr~windowAttributes | new parameters to set |
Returns:
operation status:
Value | Description |
---|---|
true | executed correctly |
false | failed to execute |
- Type
- boolean
(static) windowInfo(windowId) → {stbWindowMgr~windowAttributes}
- Since:
- 0.2.18
Get attributes for given window.
Parameters:
Name | Type | Description |
---|---|---|
windowId |
number | ID of target window |
Returns:
current parameters of the window
(static) windowShow(windowId) → {boolean}
- Since:
- 0.2.18
Make given window visible.
Operation have the same effect as stbWindowMgr.windowAttr(id, '{"visible":true}')
.
Parameters:
Name | Type | Description |
---|---|---|
windowId |
number | ID of target window |
Returns:
operation status:
Value | Description |
---|---|
true | executed correctly |
false | failed to execute |
- Type
- boolean
(static) windowHide(windowId) → {boolean}
- Since:
- 0.2.18
Make given window invisible.
Operation have the same effect as stbWindowMgr.windowAttr(id, '{"visible":false}')
.
Parameters:
Name | Type | Description |
---|---|---|
windowId |
number | ID of target window |
Returns:
operation status:
Value | Description |
---|---|
true | executed correctly |
false | failed to execute |
- Type
- boolean
(static) windowClose(windowId) → {boolean}
- Since:
- 0.2.18
Close given window.
Parameters:
Name | Type | Description |
---|---|---|
windowId |
number | ID of target window |
Returns:
operation status:
Value | Description |
---|---|
true | executed correctly |
false | failed to execute |
- Type
- boolean
(static) windowLoad(windowId, url) → {boolean}
- Since:
- 0.2.16
Load new web document into given window "windowId
" using URL "url
".
Parameters:
Name | Type | Description |
---|---|---|
windowId |
number | ID of target window |
url |
string | address to load |
Returns:
operation status:
Value | Description |
---|---|
true | executed correctly |
false | failed to execute |
- Type
- boolean
(static) windowActive() → {number}
- Since:
- 0.2.18
Get ID of currently active window.
Returns:
ID of the window. May return -1 if there is no proper candidates
- Type
- number
(static) windowList() → {stbWindowMgr.windowList}
- Since:
- 0.2.18
Get list of ID of currently existing windows.
Returns:
list of ID
(static) setBookmarkImplUrl(url)
- Deprecated:
- since 0.2.18
Set URL "url
" for "web favorites" web application.
Parameters:
Name | Type | Description |
---|---|---|
url |
string | URL to set |
(static) openDownloadManager(url)
- Deprecated:
- since 0.2.18
Open "download manager" dedicated web window using "url
".
Parameters:
Name | Type | Description |
---|---|---|
url |
string | URL to open |
(static) GetFocusedInputInfo() → {string}
- Since:
- 0.2.18
Get information for currently focused user interface element (HTML inputs etc...).
Example
{
"errCode": 0,
"errMsg": "",
"result": {
"h": "22",
"isTextInput": "1",
"positionHint": "none",
"text": "2222",
"w": "347",
"x": "458",
"y": "248"
}
}
Returns:
attributes of element in JSON format
- Type
- string
(static) addBrowserBookmark()
- Since:
- 0.2.16
- Deprecated:
- since 0.2.18
Open "bookmark manager" web application and pass currently opened URL of "wild web browser" to application as parameter.
(static) closeWebWindow()
- Deprecated:
- since 0.2.18
Close "Wild Web" window.
(static) closeWindow(windowId) → {boolean}
- Since:
- 0.2.18
Close window "windowId
".
Parameters:
Name | Type | Description |
---|---|---|
windowId |
number | ID of window to close |
Returns:
operation status:
Value | Description |
---|---|
true | executed correctly |
false | failed to execute |
- Type
- boolean
(static) getCurrWebUrl() → {string}
- Since:
- 0.2.18
Get currently loaded URL of "Wild Web" window.
If there is no "Wild Web" window opened then returns empty string.
Returns:
URL
- Type
- string
(static) getCurrentTitle() → {string}
- Since:
- 0.2.16
Get title of currently opened "Wild Web" window.
If there is no "Wild Web" window opened then return empty string.
Returns:
title
- Type
- string
(static) InitWebWindow()
- Deprecated:
- since 0.2.18
(static) setWebFaceInitAttr(windowAttributes)
- Since:
- 0.2.18
- See:
Set init window attributes for "Web Face" window.
Parameters:
Name | Type | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
windowAttributes |
stbWindowMgr~windowAttributes | initialization parameters to set Properties
|
(static) initWebWindow(url)
- Since:
- 0.2.18
Create and initialize the "Wild Web" window using URL "url
".
Created window will be invisible by default.
Parameters:
Name | Type | Description |
---|---|---|
url |
string | URL to load into newly created window |
(static) IsWebVkWindowExist() → {boolean}
- Since:
- 0.2.18
Check if "Virtual Keyboard" dedicated window exists.
Returns:
operation status:
Value | Description |
---|---|
true | window existed |
false | window not found |
- Type
- boolean
(static) IsWebWindowExist() → {boolean}
- Since:
- 0.2.16
Check if "Wild Web" dedicated window exists.
Returns:
operation status:
Value | Description |
---|---|
true | window existed |
false | window not found |
- Type
- boolean
(static) LoadUrl(url)
- Since:
- 0.2.16
Load URL "url
" to "Wild Web" dedicated window.
Parameters:
Name | Type | Description |
---|---|---|
url |
string | URL to load (if string is empty then load |
(static) openMediaPlayer()
- Since:
- 0.2.16
- Deprecated:
- since 0.2.18
(static) openWebFavorites()
- Since:
- 0.2.16
- Deprecated:
- since 0.2.18
(static) openWebFace(url) → {number}
- Since:
- 0.2.18
Create "Web Face" dedicated window and load address "url
".
Parameters:
Name | Type | Description |
---|---|---|
url |
string | address to load |
Returns:
ID of the created window
- Type
- number
(static) raiseWebWindow()
- Since:
- 0.2.18
Make "Wild Web" window active.
Do nothing if window does not exist.
(static) raiseWebFaceWindow()
- Since:
- 0.2.18
Make "Web Face" window active.
Do nothing if window does not exist.
(static) resizeWebWindow(x, y, w, h)
- Since:
- 0.2.18
Resize "Wild Web" window using given coordinates.
"x
","y
" - top left corner, "w
","h
" - width and height of the new window.
Parameters:
Name | Type | Description |
---|---|---|
x |
number | X |
y |
number | Y |
w |
number | width |
h |
number | height |
(static) SetVirtualKeyboardCoord(hint, xPos, yPos)
- Since:
- 0.2.18
Set manual position for "Virtual keyboard" window. This effectively override default behavior of stbWindowMgr.GetFocusedInputInfo
.
Parameters:
Name | Type | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
hint |
string | defines the hint for positioning hint value depends on " (value is defined for web application level) recommended values:
|
||||||||||||||||
xPos |
number | set manual "X" coordinate of top-left corner for "Virtual keyboard" window -1 value cancel manual coordinates ( |
||||||||||||||||
yPos |
number | set manual "Y" coordinate of top-left corner for "Virtual keyboard" window -1 value cancel manual coordinates ( |
(static) showBrowserBookmarks()
- Since:
- 0.2.16
- Deprecated:
- since 0.2.18
Open "Web Favorites" window.
(static) showPortalWindow()
- Since:
- 0.2.16
Make the "Internal Portal" window active.
(static) VkSetFocus(mode)
- Since:
- 0.2.18
- Deprecated:
- since 0.2.18
Set focus mode for "Virtual keyboard" window.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
mode |
boolean | possible values:
|
(static) setVirtualKeyboardInitAttr(windowAttributes)
- Since:
- 0.2.18
- See:
Set window init attributes for "Virtual keyboard" window.
Parameters:
Name | Type | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
windowAttributes |
stbWindowMgr~windowAttributes | initialization parameters to set Properties
|
(static) getVirtualKeyboardImplUrl()
- To Do:
-
- add description
Type Definitions
windowAttributes
- See:
Properties:
Name | Type | Description |
---|---|---|
url |
string | web document (application) address to load |
x |
number | X-coordinate of the window (relative to screen) |
y |
number | Y-coordinate of the window (relative to screen) |
width |
number | width of the window |
height |
number | height of the window |
visible |
boolean | visibility |
backgroundColor |
string | background color |
Represents window attributes in JSON format.
Type:
- string
Example
// parsed JSON data
{
url: "http://google.com", x: 100, y: 100, visible: true, backgroundColor: "#00ff00"
}
windowList
Properties:
Name | Type | Description |
---|---|---|
errCode |
number | 0 in case of success or -1 in case of general error |
errMsg |
string | error message. Non empty string indicate error |
result |
Array.<number> | Array (list of windows) of window unique identifiers |
Represents window list in JSON format.
Type:
- string
Example
// parsed JSON data
{
errCode: 0, errMsg: "", result: Array[2]
}
uiElementInfo
Properties:
Name | Type | Description |
---|---|---|
x |
string | |
y |
string | |
w |
string | |
h |
string | |
isTextInput |
string | |
text |
string | |
positionHint |
string |
Represents window list in JSON format.
Type:
- string
Example
// parsed JSON data
{
h: "100",
isTextInput: "0",
positionHint: "top",
text: "some text",
w: "100",
x: "100",
y: "100"
}