- 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)
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}
Get status for "screen saver" window.
Returns:
possible values:
Value | Description |
---|---|
true | window exist |
false | window not found |
- Type
- boolean
(static) openWebCfgPortal()
- Deprecated:
- Yes
Open "Configuration Portal" window and run specified web application.
For this purpose please use gSTB.StartLocalCfg
.
(static) SetFocusedInputText(text)
Set text "text
" for currently focused HTML element.
Parameters:
Name | Type | Description |
---|---|---|
text |
string | string to set |
(static) setVirtualMouseMode(mode)
Set virtual mouse mode.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
mode |
boolean | possible values:
|
(static) windowInit(windowAttributes) → {number}
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}
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) → {string}
Get attributes for given window.
Example
{
"errCode": 0,
"errMsg": "",
"result": {stbWindowMgr~windowAttributes} // current parameters of the window
}
Parameters:
Name | Type | Description |
---|---|---|
windowId |
number | ID of target window |
Returns:
attributes of element in JSON format
- Type
- string
(static) windowShow(windowId) → {boolean}
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}
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}
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}
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}
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}
Get list of ID of currently existing windows.
Returns:
list of ID
(static) setBookmarkImplUrl(url)
- Deprecated:
- Yes
Set URL "url
" for "web favorites" web application.
Parameters:
Name | Type | Description |
---|---|---|
url |
string | URL to set |
(static) openDownloadManager(url)
- Deprecated:
- Yes
Open "download manager" dedicated web window using "url
".
Parameters:
Name | Type | Description |
---|---|---|
url |
string | URL to open |
(static) GetFocusedInputInfo() → {string}
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()
- Deprecated:
- Yes
Open "bookmark manager" web application and pass currently opened URL of "wild web browser" to application as parameter.
(static) closeWebWindow()
- Deprecated:
- Yes
Close "Wild Web" window.
(static) closeWindow(windowId) → {boolean}
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}
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}
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:
- Yes
Init web window for old browser realization.
(static) setWebFaceInitAttr(windowAttributes)
- See:
Set init window attributes for "Web Face" window.
Parameters:
Name | Type | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
windowAttributes |
stbWindowMgr~windowAttributes | initialization parameters to set Properties
|
(static) initWebWindow(url)
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}
Check if "Virtual Keyboard" dedicated window exists.
Returns:
operation status:
Value | Description |
---|---|
true | window existed |
false | window not found |
- Type
- boolean
(static) IsWebWindowExist() → {boolean}
Check if "Wild Web" dedicated window exists.
Returns:
operation status:
Value | Description |
---|---|
true | window existed |
false | window not found |
- Type
- boolean
(static) LoadUrl(url)
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()
- Deprecated:
- Yes
(static) openWebFavorites()
- Deprecated:
- Yes
(static) openWebFace(url) → {number}
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()
Make "Wild Web" window active.
Do nothing if window does not exist.
(static) raiseWebFaceWindow()
Make "Web Face" window active.
Do nothing if window does not exist.
(static) resizeWebWindow(x, y, w, h)
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, xPosopt, yPosopt)
Set manual position for "Virtual keyboard" window. This effectively override default behavior of stbWindowMgr.GetFocusedInputInfo
. Leads to stbEvent.onVkNeedReposition
.
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
hint |
string | defines the hint for positioning hint value depends on " (value is defined for web application level) recommended values:
|
|||||||||||||||||
xPos |
number |
<optional> |
set manual "X" coordinate of top-left corner for "Virtual keyboard" window -1 value cancel manual coordinates ( |
||||||||||||||||
yPos |
number |
<optional> |
set manual "Y" coordinate of top-left corner for "Virtual keyboard" window -1 value cancel manual coordinates ( |
(static) showBrowserBookmarks()
- Deprecated:
- Yes
Open "Web Favorites" window.
(static) showPortalWindow()
Make the "Internal Portal" window active.
(static) VkSetFocus(mode)
- Deprecated:
- Yes
Set focus mode for "Virtual keyboard" window.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
mode |
boolean | possible values:
|
(static) setVirtualKeyboardInitAttr(windowAttributes)
- 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"
}