Global

Type Definitions

Action(payload, identity)

Action callback signature

Parameters:
Name Type Description
payload *
identity Identity

ConnectionListener(identity, payload)

Callback for the service onConnection. If it errors connection will be rejected.

Parameters:
Name Type Description
identity Identity
payload *

ConnectOptions

Connect Options

Type:
  • Object
Properties:
Name Type Attributes Default Description
uuid string

Service uuid

payload * <optional>

payload to pass to Provider onConnection action

wait boolean <optional>
true

If true will wait for Provider to connect. If false will fail if Provider is not found

customRequestHeaders

An element of the customRequestHeaders list.

If URL matches any of the patterns, headers are added to the http request.

Type:
  • object
Properties:
Name Type Description
urlPatterns Array.<string>

List of URL patterns. See here for more details.

headers Array.<object>

List of headers (key:value)

errorCallback(reason, errorObj)

Called if there was an error during object instantiation.

Parameters:
Name Type Description
reason string

The reason of the error.

errorObj networkError

See errorCallbackPayload.

Identity

Service Identity

Type:
  • Object
Properties:
Name Type Description
uuid string

Application uuid

Middleware(actionName, payload, senderIdentity)

Middleware function signature

Parameters:
Name Type Description
actionName string
payload *
senderIdentity Identity

networkError

Type:
  • Object
Properties:
Name Type Description
networkErrorCode number

The network error code from Chromium.

stack string

Stack trace for the error.

message string

The message string from the error.

preloadScript

An element of the preloadScripts list.

Type:
  • object
Properties:
Name Type Attributes Default Description
url string

full URL to the script

mandatory boolean <optional>
true

if set to false, other scripts will run if this one fails to load

rect

Type:
  • object
Properties:
Name Type Description
x number
y number
width number
height number

successCallback(successObj)

Called if object instantiation was successful.

Parameters:
Name Type Description
successObj successPayload

See successCallbackPayload.

successPayload

Type:
  • Object
Properties:
Name Type Description
httpResponseCode number

HTTP response code

trayIconClickEvent

Notes:

  1. Coordinate units are virtual screen pixels.
  2. x === bounds.x and y === bounds.y
Type:
  • object
Properties:
Name Type Description
x number

Horizontal coordinate of left edge of icon receiving the click.

y number

Vertical coordinate of top edge of icon receiving the click.

button number

Mouse button clicked where 0==left, 1==middle, 2==right.

bounds rect

Position and dimensions of icon rectangle.

monitorInfo object

trayIconClickEventListener()

A handler set by calling fin.desktop.Application#setTrayIcon.

Parameters:
Type Description
trayIconClickEvent

The event object.

trayIconHoverEvent

Notes:

  1. Coordinate units are virtual screen pixels.
  2. x === bounds.x and y === bounds.y
Type:
  • object
Properties:
Name Type Description
x number

Horizontal coordinate of left edge of icon under the mouse pointer.

y number

Vertical coordinate of top edge of icon under the mouse pointer.

bounds rect

Position and dimensions of icon rectangle.

monitorInfo object

trayIconHoverEventListener()

A handler set by calling fin.desktop.Application#setTrayIcon.

Parameters:
Type Description
trayIconHoverEvent

The event object.