RDK Resources

[*RDK Preferred*]

Code Management Facility

Code Releases

RDK Forums

[RDK Conferences]

RDK Support

Archives

Papers & Presentations Archive

In the News!

Skip to end of metadata
Go to start of metadata


Versions

org.rdk.RDKShell.1

RDKShell controls the management of composition, layout, Z order, and key handling

Methods


moveToFront (v1)

Description:  moves the client to the front or top of the Z order

Arguments:

  • client - the name of the client to move to the front

Returns: none

Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.moveToFront", "params":{ "client": "org.rdk.Netflix"}}

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



moveToBack (v1)

Description:

Arguments:

  • client - the name of the client to move to the back or bottom of the Z order

Returns: none

Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.moveToBack", "params":{ "client": "org.rdk.Netflix" }}

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



moveBehind (v1)

Description:  Moves the client behind the specified target

Arguments:

  • client - the client to move
  • target - the target in which the client will move behind

Returns: none

Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.moveBehind", "params":{ "client": "org.rdk.Netflix", "target": "org.rdk.RDKBrowser2"}}

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


setFocus (v1)

Description:  Sets focus to the specified client

Arguments:

  • client - the client to move

Returns: none

Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.setFocus", "params":{ "client": "org.rdk.Netflix" }}

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



kill (v1)

Description: Kills the client

Arguments:

  • client - name of the client to kill

Returns: none

Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.kill", "params":{ "client": "org.rdk.Netflix" }}

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



addKeyIntercept (v1)

Description:  Adds a key intercept to the client application specified.  The keys are specified by key code and a set of modifiers.  Regardless of the application that has focus, key presses that match the key code and modifiers will be sent to the client application

Arguments:

  • keyCode - the key code of the key to intercept
  • modifiers - list of modifiers that need to be present to intercept
  • client - the client to receive the key presses

Returns: none

Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.addKeyIntercept", "params":{ 
              "keyCode": 10, 
              "modifiers": ["alt", "shift"], 
              "client": "org.rdk.Netflix" }}

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



removeKeyIntercept (v1)

Description:  Removes the key intercept

Arguments:

  • keyCode - the key code of the key to intercept
  • modifiers - list of modifiers that need to be present to intercept
  • client - the client to receive the key presses

Returns: none

Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.removeKeyIntercept", "params":{"keyCode": 10, "modifiers": ["alt", "shift"], "client": "org.rdk.Netflix"}}

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



getScreenResolution (v1)

Description:  gets the screen resolution

Arguments:  none

Returns:

  • w - width
  • h - height
Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.getScreenResolution", "params":{ }}

Response: {"jsonrpc":"2.0", "id":3, "result": {"w": 1920, "h": 1080} }



setScreenResolution (v1)

Description:  Sets the screen resolution

Arguments:

  • w - width
  • h - height

Returns: none

Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.setScreenResolution", "params":{ "w": 1920, "h": 1080 }}

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



getClients (v1)

Description:  Gets a list of clients

Arguments:  none

Returns:

  • clients: array
Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.getClients", "params":{ }}

Response: {"jsonrpc":"2.0", "id":3, "result": { "clients": ["org.rdk.Netflix", "org.rdk.RDKBrowser2"]} }



getZOrder (v1)

Description:  returns an array of clients in Z order, starting with the top most application client first

Arguments:  none

Returns:

  • clients:  array
Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.getZOrder", "params":{ }}

Response: {"jsonrpc":"2.0", "id":3, "result": { "clients": ["org.rdk.Netflix", "org.rdk.RDKBrowser2"]} }



getBounds (v1)

Description:  gets the bounds of the specified client

Arguments: 

  • client

Returns:

  • x - the x location
  • y - the y location
  • w - width
  • h - height

Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.getBounds", "params":{ "client": "org.rdk.RDKBrowser2"}}

Response: {"jsonrpc":"2.0", "id":3, "result": {
             "x": 0,
             "y": 0,
             "w": 600,
             "h": 400} }



setBounds (v1)

Description: sets the bounds of the specified client

Arguments:

  • client
  • x - the x location
  • y - the y location
  • w - width
  • h - height

Returns: none

Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.setBounds", "params":{ 
             "client": "org.rdk.RDKBrowser2",
             "x": 0,
             "y": 0,
             "w": 600,
             "h": 400
}}

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



getVisibility (v1)

Description: gets the visibility of the specified client

Arguments:

  • client

Returns:

  • visible
Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.getVisibility", "params":{ "client": "org.rdk.Netflix" }}

Response: {"jsonrpc":"2.0", "id":3, "result": {"visible": true} }



setVisibility (v1)

Description:

Arguments:

  • client
  • visible

Returns: none

Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.setVisibility", "params":{ "client": "org.rdk.Netflix", "visible": true }}

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



getOpacity (v1)

Description:  gets the opacity of the specified client

Arguments:

  • client

Returns:

  • opacity
Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.getOpacity", "params":{ "client": "org.rdk.Netflix"}}

Response: {"jsonrpc":"2.0", "id":3, "result": { "opacity" : 100} }



setOpacity (v1)

Description: Sets the opacity of the given client

Arguments:

  • client
  • opacity

Returns: none

Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.setOpacity", "params":{ "client": "org.rdk.Netflix", "opacity": 100}}

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


addKeyListener (v2)

Description: Adds a key listener to an app.  The keys are bubbled up based on their z-order


Arguments:

  • keyCode - the key code of the key to intercept (integer)
  • modifiers - list of modifiers that need to be present to intercept
  • client - the client to receive the key presses (string)
  • activate - activate app on key event.  default is false (boolean)
  • propagate - propagate to the next app in the z-order.  default is true (boolean)

Returns: none

Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.addKeyListener", "params":{
              keys: [{
              "keyCode": 49,
              "modifiers": [],
             "activate":false,
             "propagate":true
              }, {
              "keyCode": 50,
              "modifiers": [],
             "activate":false,
             "propagate":true
              }],
              "client": "org.rdk.Netflix" }}}

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



removeKeyListener (v2)

Description: Removes a key listener for an app


Arguments:

  • keyCode - the key code of the key to intercept (integer)
  • modifiers - list of modifiers that need to be present to intercept
  • client - the client to receive the key presses (string)

Returns: none

Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.removeKeyListener", "params":{keys: [{
              "keyCode": 49,
              "modifiers": []
              }, {
              "keyCode": 50,
              "modifiers": []
              }],
              "client": "org.rdk.Netflix" }}}

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


animateTo (v2)

Description: Performs a set of animations


Arguments:

  • animations - list of animations to perform
  • client - the of the client to animate (in list) (string)
  • x - the x location
  • y - the y location
  • w - width
  • h – height
  • sx - x scale factor (double)
  • sy - y scale factor (double)
  • a - alpha/opacity level to animate to (between 0 and 100)
  • duration - duration of animation in seconds (double)
  • tween - the animation tween type.  supported tweens are: linear, exp1, exp2, exp3, inquad, incubic, inback, inelastic, outelastic, outbounce.  the default is linear (string)

Returns: none

Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.animateTo", "params":{"animations": [{
         "client": "HtmlApp",
         "x":0, "y":0, "w":1920, "h":1080
         }, 
		 {
           "client": "ResidentApp",
           "x":0, "y":0, "w":0, "h":0, "sx":0.5, "sy":0.5
		 }
         ]}}

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


setScale (v2)

Description: Scale an application


Arguments:

  • client - the client to scale (string)
  • sx - x scale factor (double)
  • sy - y scale factor (double)

Returns: none

Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.setScale", "params":{"client": "ResidentApp", "sx":1.5, "sy":1.5}}

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


getScale (v2)

Description: Scale an application


Arguments:

  • client - the client to scale (string)

Returns: none

Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.getScale", "params":{"client": "ResidentApp"}}

Response: {"jsonrpc":"2.0", "id":3, "result": {"sx":1.5, "sy":1.5} }



generateKey (v2)

Description: Triggers key events (key press and release)


Arguments:

  • keys - list of keys to simulate
  • keyCode - the key code of the key to intercept (integer)
  • modifiers - list of modifiers that need to be present to intercept
  • delay – the amount of time to wait (in seconds) before sending the key event (double)

Returns: none

Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.generateKey", "params":{
   "keys":[ {
               "keyCode": 49,
               "modifiers": [],
               "delay":1.0
             },
             {
               "keyCode": 50,
               "modifiers": [],
               "delay":2.0
             }
          ]
}}

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



launchApplication (v2)

Description: Launches an application


Arguments:

  • client - the client to attach application to (string)
  • uri - the url/uri for the application (string)
  • mimeType - the application’s mime type (string)

Returns: none

Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.launchApplication", "params":{"client": "appName", "uri":"testapp", "mimeType":"application/native"}}

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


suspendApplication (v2)

Description: Suspend an application


Arguments:

  • client - the client to suspend (string)

Returns: none

Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.suspendApplication", "params":{"client": "Cobalt"}}

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


resumeApplication (v2)

Description: Resumes an application


Arguments:

  • client - the client to resume (string)

Returns: none

Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.resumeApplication", "params":{"client": "Cobalt"}}

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


Events

This API has no events.



  • No labels