Skip to content

Latest commit

 

History

History
1411 lines (1062 loc) · 29.7 KB

File metadata and controls

1411 lines (1062 loc) · 29.7 KB

RDKWindowManager Plugin

Version: 1.0.0

A RDKWindowManager plugin for Thunder framework.

Table of Contents

Abbreviation, Acronyms and Terms

[Refer to this link]

Description

The RDKWindowManager plugin provides an interface for RDKWindowManager.

The plugin is designed to be loaded and executed within the Thunder framework. For more information about the framework refer to [Thunder].

Configuration

The table below lists configuration options of the plugin.

Name Type Description
callsign string Plugin instance name (default: org.rdk.RDKWindowManager)
classname string Class name: RDKWindowManager
locator string Library name: libWPEFrameworkRDKWindowManager.so
autostart boolean Determines if the plugin shall be started automatically along with the framework

Methods

The following methods are provided by the RDKWindowManager plugin:

RDKWindowManager interface methods:

Method Description
addKeyIntercept Registers a key intercept for a specific key code and client
addKeyIntercepts Registers multiple key intercepts in a single operation.
addKeyListener Registers listeners for specific keys.
createDisplay Create the display window
enableDisplayRender Enable or disable the rendering of a Wayland display
enableInactivityReporting Enables the inactivity reporting
enableInputEvents Enables KeyInputEvents for list of clients specified
enableKeyRepeats Key repeats are enabled/disabled
generateKey Generates a key event for the specified keys and client.
getApps Get the list of Apps which are currently active and available
getKeyRepeatsEnabled Retrieves the flag determining whether keyRepeat true/false
getLastKeyInfo Retrieves information about the most recent key press event, including the key code, modifier flags, and the timestamp in seconds when the key was pressed.
ignoreKeyInputs Ignore key inputs
injectKey Simulates a key press event with optional modifiers.
keyRepeatConfig Enables KeyInputEvents for list of clients specified
removeKeyIntercept Removes a key intercept for a specific key code and client.
removeKeyListener Removes listeners for specific keys.
renderReady To get the status of first frame is rendered or not
resetInactivityTime Resets inactivity interval if EnableUserInactivity feature is enabled
setFocus Sets the focus to the app with the app id
setInactivityInterval Sets inactivity interval if EnableUserInactivity feature is enabled
setVisible Sets the visibility of the given client or appInstanceId

addKeyIntercept

Registers a key intercept for a specific key code and client

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.intercept string JSON String format with the client/callSign, keyCode, modifiers

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 0,
    "method": "org.rdk.RDKWindowManager.addKeyIntercept",
    "params": {
        "intercept": ""
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 0, "method": "org.rdk.RDKWindowManager.addKeyIntercept", "params": {"intercept": ""}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 0,
    "result": null
}

addKeyIntercepts

Registers multiple key intercepts in a single operation.

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.intercepts string JSON String format containing the array of key intercept(client/callSign, keyCode, modifiers) configuration

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 1,
    "method": "org.rdk.RDKWindowManager.addKeyIntercepts",
    "params": {
        "intercepts": ""
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 1, "method": "org.rdk.RDKWindowManager.addKeyIntercepts", "params": {"intercepts": ""}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 1,
    "result": null
}

addKeyListener

Registers listeners for specific keys.

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.keyListeners string JSON String format containing the keylisteneres with keys(keyCode,nativekeyCode,modifiers,activate,propagate) and client/callSign

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 2,
    "method": "org.rdk.RDKWindowManager.addKeyListener",
    "params": {
        "keyListeners": ""
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 2, "method": "org.rdk.RDKWindowManager.addKeyListener", "params": {"keyListeners": ""}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 2,
    "result": null
}

createDisplay

Create the display window

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.displayParams string JSON String format with client,displayName,displayWidth,displayHeight,virtualDisplay,virtualWidth,virtualHeight,topmost,focus

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 3,
    "method": "org.rdk.RDKWindowManager.createDisplay",
    "params": {
        "displayParams": ""
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 3, "method": "org.rdk.RDKWindowManager.createDisplay", "params": {"displayParams": ""}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 3,
    "result": null
}

enableDisplayRender

Enable or disable the rendering of a Wayland display

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.client string the identifier of the disconnected application
params.enable bool flag to true/false the feature

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 4,
    "method": "org.rdk.RDKWindowManager.enableDisplayRender",
    "params": {
        "client": "",
        "enable": true
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 4, "method": "org.rdk.RDKWindowManager.enableDisplayRender", "params": {"client": "", "enable": true}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 4,
    "result": null
}

enableInactivityReporting

Enables the inactivity reporting

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.enable bool flag to true/false the feature

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 5,
    "method": "org.rdk.RDKWindowManager.enableInactivityReporting",
    "params": {
        "enable": true
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 5, "method": "org.rdk.RDKWindowManager.enableInactivityReporting", "params": {"enable": true}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 5,
    "result": null
}

enableInputEvents

Enables KeyInputEvents for list of clients specified

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.clients string JSON String format with number of clients, enable:Flag to enable input events
params.enable bool flag to true/false the feature

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 6,
    "method": "org.rdk.RDKWindowManager.enableInputEvents",
    "params": {
        "clients": "",
        "enable": true
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 6, "method": "org.rdk.RDKWindowManager.enableInputEvents", "params": {"clients": "", "enable": true}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 6,
    "result": null
}

enableKeyRepeats

Key repeats are enabled/disabled

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.enable bool flag to true/false the feature

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 7,
    "method": "org.rdk.RDKWindowManager.enableKeyRepeats",
    "params": {
        "enable": true
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 7, "method": "org.rdk.RDKWindowManager.enableKeyRepeats", "params": {"enable": true}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 7,
    "result": null
}

generateKey

Generates a key event for the specified keys and client.

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.keys string JSON String format representing the key(s)(keyCode,modifiers,delay,client/callSign) to generate
params.client string the identifier of the disconnected application

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 8,
    "method": "org.rdk.RDKWindowManager.generateKey",
    "params": {
        "keys": "",
        "client": ""
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 8, "method": "org.rdk.RDKWindowManager.generateKey", "params": {"keys": "", "client": ""}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 8,
    "result": null
}

getApps

Get the list of Apps which are currently active and available

Events

Event details will be updated soon.

Parameters

This method takes no parameters.

Results

Name Type Description
result object
result.appsIds string Returns the list of app IDs as a JSON string.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 9,
    "method": "org.rdk.RDKWindowManager.getApps"
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 9, "method": "org.rdk.RDKWindowManager.getApps"}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 9,
    "result": {
        "appsIds": ""
    }
}

getKeyRepeatsEnabled

Retrieves the flag determining whether keyRepeat true/false

Events

Event details will be updated soon.

Parameters

This method takes no parameters.

Results

Name Type Description
result object
result.keyRepeat bool flag stating whether keyRepeat true/false

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 10,
    "method": "org.rdk.RDKWindowManager.getKeyRepeatsEnabled"
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 10, "method": "org.rdk.RDKWindowManager.getKeyRepeatsEnabled"}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 10,
    "result": {
        "keyRepeat": true
    }
}

getLastKeyInfo

Retrieves information about the most recent key press event, including the key code, modifier flags, and the timestamp in seconds when the key was pressed.

Events

Event details will be updated soon.

Parameters

This method takes no parameters.

Results

Name Type Description
result object
result.keyCode integer Key code to be injected, modifiers : JSON String format with one or more modifiers
result.modifiers integer Output parameter. The modifier flags (e.g., Shift, Ctrl) active during the last key press.
result.timestampInSeconds integer Output parameter. The timestamp (in seconds) when the last key press occurred. @retval Core::ERROR_NONE: Successfully retrieved the last key press information. @retval Core::ERROR_UNAVAILABLE: No key press information is available.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 11,
    "method": "org.rdk.RDKWindowManager.getLastKeyInfo"
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 11, "method": "org.rdk.RDKWindowManager.getLastKeyInfo"}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 11,
    "result": {
        "keyCode": 0,
        "modifiers": 0,
        "timestampInSeconds": 0
    }
}

ignoreKeyInputs

Ignore key inputs

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.ignore bool flag stating whether key inputs ignored

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 12,
    "method": "org.rdk.RDKWindowManager.ignoreKeyInputs",
    "params": {
        "ignore": true
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 12, "method": "org.rdk.RDKWindowManager.ignoreKeyInputs", "params": {"ignore": true}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 12,
    "result": null
}

injectKey

Simulates a key press event with optional modifiers.

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.keyCode integer Key code to be injected, modifiers : JSON String format with one or more modifiers
params.modifiers string

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 13,
    "method": "org.rdk.RDKWindowManager.injectKey",
    "params": {
        "keyCode": 0,
        "modifiers": ""
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 13, "method": "org.rdk.RDKWindowManager.injectKey", "params": {"keyCode": 0, "modifiers": ""}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 13,
    "result": null
}

keyRepeatConfig

Enables KeyInputEvents for list of clients specified

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.input string input type (default/keyboard)
params.keyConfig string JSON String format with enabled, initialDelay and repeatInterval

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 14,
    "method": "org.rdk.RDKWindowManager.keyRepeatConfig",
    "params": {
        "input": "",
        "keyConfig": ""
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 14, "method": "org.rdk.RDKWindowManager.keyRepeatConfig", "params": {"input": "", "keyConfig": ""}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 14,
    "result": null
}

removeKeyIntercept

Removes a key intercept for a specific key code and client.

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.intercept string JSON String format with the client/callSign, keyCode, modifiers

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 15,
    "method": "org.rdk.RDKWindowManager.removeKeyIntercept",
    "params": {
        "intercept": ""
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 15, "method": "org.rdk.RDKWindowManager.removeKeyIntercept", "params": {"intercept": ""}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 15,
    "result": null
}

removeKeyListener

Removes listeners for specific keys.

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.keyListeners string JSON String format containing the keylisteneres with keys(keyCode,nativekeyCode,modifiers,activate,propagate) and client/callSign

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 16,
    "method": "org.rdk.RDKWindowManager.removeKeyListener",
    "params": {
        "keyListeners": ""
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 16, "method": "org.rdk.RDKWindowManager.removeKeyListener", "params": {"keyListeners": ""}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 16,
    "result": null
}

renderReady

To get the status of first frame is rendered or not

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.client string the identifier of the disconnected application

Results

Name Type Description
result object
result.status bool Returns true if the application has rendered first frame, false if it has not yet.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 17,
    "method": "org.rdk.RDKWindowManager.renderReady",
    "params": {
        "client": ""
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 17, "method": "org.rdk.RDKWindowManager.renderReady", "params": {"client": ""}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 17,
    "result": {
        "status": true
    }
}

resetInactivityTime

Resets inactivity interval if EnableUserInactivity feature is enabled

Events

Event details will be updated soon.

Parameters

This method takes no parameters.

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 18,
    "method": "org.rdk.RDKWindowManager.resetInactivityTime"
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 18, "method": "org.rdk.RDKWindowManager.resetInactivityTime"}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 18,
    "result": null
}

setFocus

Sets the focus to the app with the app id

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.client string the identifier of the disconnected application

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 19,
    "method": "org.rdk.RDKWindowManager.setFocus",
    "params": {
        "client": ""
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 19, "method": "org.rdk.RDKWindowManager.setFocus", "params": {"client": ""}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 19,
    "result": null
}

setInactivityInterval

Sets inactivity interval if EnableUserInactivity feature is enabled

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.interval integer time interval set for inactivity

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 20,
    "method": "org.rdk.RDKWindowManager.setInactivityInterval",
    "params": {
        "interval": 0
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 20, "method": "org.rdk.RDKWindowManager.setInactivityInterval", "params": {"interval": 0}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 20,
    "result": null
}

setVisible

Sets the visibility of the given client or appInstanceId

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.client string the identifier of the disconnected application
params.visible bool boolean indicating the visibility status: true for visible, false for hide.

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 21,
    "method": "org.rdk.RDKWindowManager.setVisible",
    "params": {
        "client": "",
        "visible": true
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 21, "method": "org.rdk.RDKWindowManager.setVisible", "params": {"client": "", "visible": true}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 21,
    "result": null
}

Notifications

Notifications are autonomous events, triggered by the internals of the implementation, and broadcasted via JSON-RPC to all registered observers. Refer to [Thunder] for information on how to register for a notification.

The following events are provided by the RDKWindowManager plugin:

RDKWindowManager interface events:

Event Description
onBlur Notifies when an application is blurred
onConnected Notifies when an application is connected
onDisconnected Notifies when an application is disconnected
onFocus Notifies when an application is in focus
onHidden Notifies when an application is hidden
onReady Posting the client for first frame ready.
onUserInactivity Posting the client is inactive state
onVisible Notifies when an application is visible

onBlur

Notifies when an application is blurred

Parameters

Name Type Description
params object
params.appInstanceId string the identifier of the connected application

Examples

{
    "jsonrpc": 2.0,
    "id": 22,
    "method": "org.rdk.RDKWindowManager.onBlur",
    "params": {
        "appInstanceId": ""
    }
}

onConnected

Notifies when an application is connected

Parameters

Name Type Description
params object
params.appInstanceId string the identifier of the connected application

Examples

{
    "jsonrpc": 2.0,
    "id": 23,
    "method": "org.rdk.RDKWindowManager.onConnected",
    "params": {
        "appInstanceId": ""
    }
}

onDisconnected

Notifies when an application is disconnected

Parameters

Name Type Description
params object
params.client string the identifier of the disconnected application

Examples

{
    "jsonrpc": 2.0,
    "id": 24,
    "method": "org.rdk.RDKWindowManager.onDisconnected",
    "params": {
        "client": ""
    }
}

onFocus

Notifies when an application is in focus

Parameters

Name Type Description
params object
params.appInstanceId string the identifier of the connected application

Examples

{
    "jsonrpc": 2.0,
    "id": 25,
    "method": "org.rdk.RDKWindowManager.onFocus",
    "params": {
        "appInstanceId": ""
    }
}

onHidden

Notifies when an application is hidden

Parameters

Name Type Description
params object
params.appInstanceId string the identifier of the connected application

Examples

{
    "jsonrpc": 2.0,
    "id": 26,
    "method": "org.rdk.RDKWindowManager.onHidden",
    "params": {
        "appInstanceId": ""
    }
}

onReady

Posting the client for first frame ready.

Parameters

Name Type Description
params object
params.client string the identifier of the disconnected application

Examples

{
    "jsonrpc": 2.0,
    "id": 27,
    "method": "org.rdk.RDKWindowManager.onReady",
    "params": {
        "client": ""
    }
}

onUserInactivity

Posting the client is inactive state

Parameters

Name Type Description
params object
params.minutes double notify how long user is inactive state

Examples

{
    "jsonrpc": 2.0,
    "id": 28,
    "method": "org.rdk.RDKWindowManager.onUserInactivity",
    "params": {
        "minutes": 0.0
    }
}

onVisible

Notifies when an application is visible

Parameters

Name Type Description
params object
params.appInstanceId string the identifier of the connected application

Examples

{
    "jsonrpc": 2.0,
    "id": 29,
    "method": "org.rdk.RDKWindowManager.onVisible",
    "params": {
        "appInstanceId": ""
    }
}