Global

Methods

observeBounds(element, onChange)

Observes the bounding client box rectangle of the given element for changes.

This solution only works for 2 scenarios, though could be updated to support more (e.g. via polling).

MutationObserver will only pick up changes to bounds if they are specified via fixed style rules in the element's attribtues.

ResizeObserver will pick up all changes to an element's width and height but will not capture any changes to position.

Parameters:
Name Type Description
element

The element to observe the bounding box for (i.e. position, width, height)

onChange

Called every time the bounding box changes.

Returns:

Function which disposes the observers when invoked.

Type Definitions

AddClientToContextGroupOptions

AddClientToContextGroupOptions interface

Type:
  • object
Properties:
Name Type Description
contextGroupId string

Name of the context group.

addContextHandler(contextHandler, contextTypeopt) → {Promise.<void>}

A SessionContextGroup instance method for adding a handler for context change.

Parameters:
Name Type Attributes Description
contextHandler ContextHandler

The callback to be invoked. Is invoked when (a) the context changes or (b) immediately after getting created if the context is already set.

contextType string <optional>

The context type this handler should listen to. If not specified, a global handler for all context types will get created. Only one global handler is allowed per SessionContextGroup.

Returns:
Type
Promise.<void>

AppAssetInfo

AppAssetInfo interface

Type:
  • object
Properties:
Name Type Description
src string

The URL to a zip file containing the package files (executables, dlls, etc…)

alias string

The name of the asset

version string

The version of the package

target string

Specify default executable to launch. This option can be overridden in launchExternalProcess

args string

The default command line arguments for the aforementioned target.

mandatory boolean

When set to true, the app will fail to load if the asset cannot be downloaded. When set to false, the app will continue to load if the asset cannot be downloaded. (Default: true)

AppAssetRequest

AppAssetRequest interface

Type:
  • object
Properties:
Name Type Description
alias string

The name of the asset

AppIntent

An interface that represents the binding of an intent to apps.

Type:
  • object
Properties:
Name Type Description
intent Intent
apps Array.<AppMetadata>

ApplicationOptions

Application creation options.

This is the options object required by Application.start.

The following options are required:

  • uuid is required in the app manifest as well as by Application.start
  • name is optional in the app manifest but required by Application.start
  • url is optional in both the app manifest Application.start and but is usually given (defaults to "about:blank" when omitted).

This jsdoc typedef mirrors the ApplicationOption TypeScript interface in @types/openfin.

IMPORTANT NOTE: This object inherits all the properties of the window creation options object, which will take priority over those of the same name that may be provided in mainWindowOptions.

Type:
  • object
Properties:
Name Type Attributes Default Description
disableIabSecureLogging boolean <optional>
false

When set to true it will disable IAB secure logging for the app.

loadErrorMessage string <optional>
"There was an error loading the application."

An error message to display when the application (launched via manifest) fails to load. A dialog box will be launched with the error message just before the runtime exits. Load fails such as failed DNS resolutions or aborted connections as well as cancellations, e.g., window.stop(), will trigger this dialog. Client response codes such as 404 Not Found are not treated as fails as they are valid server responses.

mainWindowOptions Window~options <optional>

The options of the main window of the application. For a description of these options, click the link (in the Type column).

maxViewPoolSize number <optional>
1000

Platforms Only. The maximum number of "detached" or "pooled" Views that can exist in the Platform before being closed. If you do not wish for views to be pooled on your platform, set this property to zero.

preventQuitOnLastWindowClosed boolean <optional>
false

Platforms Only. Prevent the Platform Provider from quitting automatically when the last Platform Window is closed. Note: if the Platform Provider is showing, it won't close automatically. If you want a hidden Platform Provider to remain open after the last Platform Window has been closed, set this property to true.

name string <optional>

The name of the application (and the application's main window).

If provided, must match uuid.

nonPersistent boolean <optional>
false

A flag to configure the application as non-persistent. Runtime exits when there are no persistent apps running.

plugins boolean <optional>
false

Enable Flash at the application level.

spellCheck boolean <optional>
false

Enable spell check at the application level.

url string <optional>
"about:blank"

The url to the application (specifically the application's main window).

enableJumpList boolean <optional>
false

Enables the use of the Jumplists API and the 'pin to taskbar' functionality. Only relevant in Windows.

uuid string

The Unique Universal Identifier (UUID) of the application, unique within the set of all other applications running in the OpenFin Runtime.

Note that name and uuid must match.

webSecurity boolean <optional>
true

When set to false it will disable the same-origin policy for the app.

ApplicationState

ApplicationState interface

Type:
  • object
Properties:
Name Type Description
isPlatform boolean

true when the application is a Platform controller

isRunning boolean

true when the application is running

uuid string

uuid of the application

parentUuid string

uuid of the application that launches this application

ApplicationType

ApplicationType interface

Type:
  • object
Properties:
Name Type Description
type string

The type of the entity

uuid string

The uuid of the entity

ApplicationWindowInfo

ApplicationWindowInfo interface

Type:
  • object
Properties:
Name Type Description
childWindows Array.<WindowDetail>

The array of child windows details

mainWindow WindowDetail

The main window detail

uuid string

The uuid of the application

ApplySnapshotOptions

ApplySnapshotOptions interface

Type:
  • object
Properties:
Name Type Attributes Default Description
closeExistingWindows boolean <optional>
false

When true, applySnapshot will close existing windows, replacing current Platform state with the given snapshot.

closeSnapshotWindows boolean <optional>
false

When true, applySnapshot will close existing includeInSnapshots: true windows, replacing current Platform state with the given snapshot.

skipOutOfBoundsCheck boolean <optional>
false

When true, applySnapshot will not check whether any windows in a snapshot are off-screen. By default, such windows will be repositioned to be on-screen, as defined by PlatformProvider.positionOutOfBoundsWindows.

ApplySnapshotPayload

Payload sent to Platform Provider when Platform.applySnapshot is called.

Type:
  • object
Properties:
Name Type Attributes Description
snapshot Snapshot

The snapshot to be applied.

options ApplySnapshotOptions <optional>

Options to customize snapshot application.

AppMetadata

App metadata is provided by the FDC3 App Directory.

Type:
  • object
Properties:
Name Type Attributes Description
name string
appId string <optional>
version string <optional>
title string <optional>
tooltip string <optional>
description string <optional>
icons Array.<string> <optional>
images Array.<string> <optional>

AppProcessInfo

AppProcessInfo interface

Type:
  • object
Properties:
Name Type Description
uuid string

The uuid of the application

entities Array.<EntityProcessDetails>

Array of process info for each window and view for the application

Area

Type:
  • object
Properties:
Name Type Description
height number

Area's height

width number

Area's width

x number

X coordinate of area's starting point

y number

Y coordinate of area's starting point

BeforeUnloadUserDecision

Type:
  • object
Properties:
Name Type Description
windowShouldClose boolean

Specifies if the Window should close

viewsToClose Array.<Identity>

Array of views that will close

Bounds

Bounds is a interface that has the properties of height, width, left, top which are all numbers

Type:
  • object
Properties:
Name Type Description
height number

Get the application height bound

width number

Get the application width bound

top number

Get the application top bound

left number

Get the application left bound

right number

Get the application right bound

bottom number

Get the application bottom bound

CapturePageOptions

Type:
  • object
Properties:
Name Type Attributes Default Description
area Area <optional>

The area of the window to be captured.

format string <optional>
'png'

The format of the captured image. Can be 'png', 'jpg', or 'bmp'.

quality number <optional>
100

Number representing quality of JPEG image only. Between 0 - 100.

CertifiedAppInfo

CertifiedAppInfo interface

Type:
  • object
Properties:
Name Type Attributes Description
isRunning boolean

true if the app is running

isOptedIntoCertfiedApp boolean <optional>

true if the app has opted into certification

isCertified boolean <optional>

true if the app is certified

isSSLCertified boolean <optional>

true if the app manifest's SSL certificate is valid

isPresentInAppDirectory boolean <optional>

true if the app is present in the OpenFin app directory

Channel

Information for a Context Group. Contains metadata for displaying the group properly.

Type:
  • object
Properties:
Name Type Description
id string

Name of the context group

displayMetadata DisplayMetadata

Metadata for the Context Group. Contains the group's human-readable name, color, and an image, as defined by the Interop Broker.

type string

Defaults to system.

broadcast function

Broadcasts a context for the channel.

addContextListener function

Add a context handler for incoming context.

getCurrentContext function

Gets the current context for the channel.

ClearCacheOption

Clear cache options.

These are the options required by the clearCache function.

Type:
  • object
Properties:
Name Type Description
appcache boolean

html5 application cache

cache boolean

browser data cache for html files and images

cookies boolean

browser cookies

localStorage boolean

browser data that can be used across sessions

ClientIdentity

The Identity for a Channel Client. Includes endpointId to differentiate between different connections for an entity.

Type:
  • object
Properties:
Name Type Description
uuid string

GUID of an application.

name string

Name of an entity in an application.

endpointId string

Unique differentiator for different Channel connections for an entity.

CloseViewPayload

CloseViewPayload interface

Type:
  • object
Properties:
Name Type Description
target Identity

View to be closed.

CloseWindowOptions

closeWindow options

Type:
  • object
Properties:
Name Type Attributes Default Description
skipBeforeUnload boolean <optional>
false

When set to true skips any before handler set on views that are part of the window

CloseWindowPayload

Type:
  • object
Properties:
Name Type Description
winId Identity

Identity of the Window

options CloseWindowOptions

ContentCreationRule

ContentCreationRule interface

Type:
  • object
Properties:
Name Type Description
behavior string

'view' | 'window' | 'browser' | 'block'

match Array.<string>

List of match patterns.

options object

Window creation options or View creation options.

Context

Data passed between entities and applications.

Type:
  • object
Properties:
Name Type Attributes Description
id object <optional>

An object containing string key-value pairs for the bulk of the data for the context. Differs between context types.

name string <optional>

User-readable name for the incoming context.

type string

Conserved type for the context (e.g. instrument or country)

ContextForIntent

Data passed between entities and applications, including an optional metadata.

Type:
  • object
Properties:
Name Type Attributes Description
id object <optional>

An object containing string key-value pairs for the bulk of the data for the context. Differs between context types.

name string <optional>

User-readable name for the incoming context.

type string

Conserved type for the context (e.g. instrument or country)

metadata any <optional>

ContextGroupInfo

Information for a Context Group. Contains metadata for displaying the group properly.

Type:
  • object
Properties:
Name Type Description
id string

Name of the context group

displayMetadata DisplayMetadata

Metadata for the Context Group. Contains the group's human-readable name, color, and an image, as defined by the Interop Broker.

ContextHandler()

Subscription function for addContextHandler.

CookieInfo

CookieInfo interface

Type:
  • object
Properties:
Name Type Description
name string

The name of the cookie

domain string

The domain of the cookie

path string

The path of the cookie

CookieOption

CookieOption interface

Type:
  • object
Properties:
Name Type Description
name string

The name of the cookie

CpuInfo

CpuInfo interface

Type:
  • object
Properties:
Name Type Description
model string

The model of the cpu

speed number

The number in MHz

times Time

The numbers of milliseconds the CPU has spent in different modes.

CrashReporterOptions

CrashReporterOptions interface

Type:
  • object
Properties:
Name Type Description
diagnosticsMode boolean

In diagnostics mode the crash reporter will send diagnostic logs to the OpenFin reporting service on runtime shutdown

CrashReporterState

CrashReporterState interface

Type:
  • object
Properties:
Name Type Description
diagnosticsMode boolean

In diagnostics mode the crash reporter will send diagnostic logs to the OpenFin reporting service on runtime shutdown

isRunning boolean

check if it's running

CreateViewPayload

CreateViewPayload interface

Type:
  • object
Properties:
Name Type Attributes Description
opts View~options

Options for the view to be added.

target Identity <optional>

Window the view will be added to. If no target is provided, a new window will be created.

DefaultWindowOptions

Default window options apply to all platform windows. Any Window option is also a valid Default Window option used by default in any window that is created in the current platform's scope. Individual window options will override these defaults.

Type:
  • object
Properties:
Name Type Attributes Description
stylesheetUrl string <optional>

Specify a path of a custom CSS file to be injected to all of the platform's windows. note: this option is only applied to windows that use the Default OpenFin Window. Windows with a specified url (Custom Windows) will not be affected by this option.

DipRect

DipRect interface

Type:
  • object
Properties:
Name Type Description
dipRect Rect

The DIP coordinates

scaledRect Rect

The scale coordinates

DipScaleRects

DipScaleRects interface

Type:
  • object
Properties:
Name Type Description
dipRect Rect

The DIP coordinates

scaledRect Rect

The scale coordinates

DisplayMetadata

The display data for a Context Group.

Type:
  • object
Properties:
Name Type Attributes Description
name string

A user-readable name for this context group, e.g: "Red"

color string <optional>

The color that should be associated within this context group when displaying this context group in a UI, e.g: 0xFF0000.

glyph string <optional>

A URL of an image that can be used to display this context group

DownloadPreloadInfo

downloadPreloadScripts function return value

Type:
  • object
Properties:
Name Type Description
url string

url to the preload script

error string

error during preload script acquisition

succeess boolean

download operation success

DownloadPreloadOption

These are the options object required by the downloadPreloadScripts function

Type:
  • object
Properties:
Name Type Description
url string

url to the preload script

Dpi

Type:
  • object
Properties:
Name Type Attributes Description
horizontal number <optional>

The horizontal dpi

vertical number <optional>

The vertical dpi

EntityInfo

EntityInfo interface

Type:
  • object
Properties:
Name Type Description
name string

The name of the entity

uuid string

The uuid of the entity

parent Identity

The parent of the entity

entityType string

The type of the entity

EntityProcessDetails

EntityProcessDetails interface

Type:
  • object
Properties:
Name Type Description
uuid string

The uuid for the entity

name string

The name for the entity

url string

URL associated with the entity

entityType string

Type for the entity: window or view

cpuUsage number

The percentage of total CPU usage

nonPagedPoolUsage number

The current nonpaged pool usage in bytes

pageFaultCount number

The number of page faults

pagedPoolUsage number

The current paged pool usage in bytes

pagefileUsage number

The total amount of memory in bytes that the memory manager has committed

peakNonPagedPoolUsage number

The peak nonpaged pool usage in bytes

peakPagedPoolUsage number

The peak paged pool usage in bytes

peakPagefileUsage number

The peak value in bytes of pagefileUsage during the lifetime of this process

peakWorkingSetSize number

The peak working set size in bytes

privateSetSize number

The current working set size (not shared)

workingSetSize number

The current working set size (both shared and private data) in bytes

pid number

The native process identifier

frames Array.<FrameProcessDetails>

Array of process info for each iframe corresponeding to the entity

ExternalApplicationInfo

ExternalApplicationInfo interface

Type:
  • object
Properties:
Name Type Description
parent Identity

The parent identity

ExternalConnection

ExternalConnection interface

Type:
  • object
Properties:
Name Type Description
token string

The token to broker an external connection

uuid string

The uuid of the external connection

ExternalProcessRequestType

ExternalProcessRequestType interface

Type:
  • object
Properties:
Name Type Description
path string

The file path to where the running application resides

arguments string

The argument passed to the running application

listener LaunchExternalProcessListener

This is described in the {LaunchExternalProcessListner} type definition

initialWindowState string

Initial window state after launching: 'normal' (default), 'minimized', 'maximized'

cwd string

current working directory

FetchManifestPayload

FetchManifestPayload interface

Type:
  • object
Properties:
Name Type Description
manifestUrl string

The URL of the manifest to fetch.

FindInPageOptions

Type:
  • object
Properties:
Name Type Attributes Default Description
forward boolean <optional>
true

Whether to search forward or backward.

findNext boolean <optional>
false

Whether to begin a new text finding session. Should be true for first requests, and false for subsequent requests. Defaults to false.

matchCase boolean <optional>
false

Whether search should be case-sensitive.

wordStart boolean <optional>
false

Whether to look only at the start of words.

medialCapitalAsWordStart boolean <optional>
false

When combined with wordStart, accepts a match in the middle of a word if the match begins with an uppercase letter followed by a
lowercase or non-letter. Accepts several other intra-word matches.

FrameInfo

FrameInfo interface

Type:
  • object
Properties:
Name Type Description
name string

The name of the frame

uuid string

The uuid of the frame

entityType EntityType

The entity type, could be 'window', 'iframe', 'external connection' or 'unknown'

parent Identity

The parent identity

FrameProcessDetails

FrameProcessDetails interface

Type:
  • object
Properties:
Name Type Description
url string

Current URL associated with the process

entityType string

Type for the frame

cpuUsage number

The percentage of total CPU usage

nonPagedPoolUsage number

The current nonpaged pool usage in bytes

pageFaultCount number

The number of page faults

pagedPoolUsage number

The current paged pool usage in bytes

pagefileUsage number

The total amount of memory in bytes that the memory manager has committed

peakNonPagedPoolUsage number

The peak nonpaged pool usage in bytes

peakPagedPoolUsage number

The peak paged pool usage in bytes

peakPagefileUsage number

The peak value in bytes of pagefileUsage during the lifetime of this process

peakWorkingSetSize number

The peak working set size in bytes

workingSetSize number

The current working set size (both shared and private data) in bytes

pid number

The native process identifier

GetAllClientsInContextGroupOptions

GetAllClientsInContextGroupOptions interface

Type:
  • object
Properties:
Name Type Description
contextGroupId string

Name of the context group to get info for.

GetContextOptions

GetContextOptions interface

Type:
  • object
Properties:
Name Type Attributes Description
contextType string <optional>

Context Type

getCurrentContext(contextTypeopt) → {Promise.<Context>}

A SessionContextGroup instance method for getting the current context of a certain type.

Parameters:
Name Type Attributes Description
contextType string <optional>

The Context Type to get. If not specified the last contextType set would get used.

Returns:
Type
Promise.<Context>

GetInfoForContextGroupOptions

GetInfoForContextGroupOptions interface

Type:
  • object
Properties:
Name Type Description
contextGroupId string

Name of the context group to get info for.

GetLogRequestType

GetLogRequestType interface

Type:
  • object
Properties:
Name Type Description
name string

The name of the running application

endFile number

The file length of the log file

sizeLimit number

The set size limit of the log file

GetWindowContextPayload

GetWindowContextPayload interface

Type:
  • object
Properties:
Name Type Description
entityType EntityType

Entity type of the target of the context update ('view' or 'window').

target Identity

Identity of the entity targeted by the call to Platform.getWindowContext.

GpuInfo

GpuInfo interface

Type:
  • object
Properties:
Name Type Description
name string

The graphics card name

HostContextChangedPayload

HostContextChangedPayload interface

Type:
  • object
Properties:
Name Type Description
context any

The new context object

reason string

The reason for the update: 'updated' or 'reparented'

HostSpecs

HostSpecs interface

Type:
  • object
Properties:
Name Type Description
aeroGlassEnabled boolean

Value to check if Aero Glass theme is supported on Windows platforms

arch string

"x86" for 32-bit or "x86_64" for 64-bit

cpus Array.<CpuInfo>

The same payload as Node's os.cpus()

gpu GpuInfo

The graphics card name

memory number

The same payload as Node's os.totalmem()

name string

The OS name and version/edition

screenSaver boolean

Value to check if screensaver is running. Supported on Windows only

Identity

Identity interface

Type:
  • object
Properties:
Name Type Description
name string

Optional - the name of the component

uuid string

Universally unique identifier of the application

ImplementationMetadata

An interface that represents FDC3 implementation meta data.

Type:
  • object
Properties:
Name Type Attributes Description
fdc3Version string

The FDC3 version

provider string

The provider uuid with prepend 'openfin'

providerVersion string <optional>

The provider runtime version

InfoForIntentOptions

InfoForIntentOptions interface

Type:
  • object
Properties:
Name Type Attributes Description
name string

Name of the intent to get info for.

context Context <optional>

Optional context.

InitLayoutOptions

InitLayoutOptions interface

Type:
  • object
Properties:
Name Type Attributes Description
containerId string <optional>

The id attribute of the container where the window's Layout should be initialized. If not provided then an element with id layout-container is used. We recommend using a div element.

InitPlatformOptions

InitPlatformOptions interface

Type:
  • object
Properties:
Name Type Attributes Description
overrideCallback OverrideCallback <optional>

a callback function that can be used to extend or replace default Provider behavior.

Intent

The combination of an action and a context that is passed to an application for resolution.

Type:
  • object
Properties:
Name Type Description
name string

Name of the intent.

context Context

Data associated with the intent

IntentHandler()

Subscription function for registerIntentHandler

IntentResolution

IntentResolution provides a standard format for data returned upon resolving an Intent.

Type:
  • object
Properties:
Name Type Attributes Description
source TargetApp

identifier for the Application resolving the Intent (null if the Intent could not be resolved)

data string <optional>

Return data structure - if one is provided for the given Intent.

version string

The version number of the Intents schema being used

InteropConfig

Information relevant to the Interop Broker.

Type:
  • object
Properties:
Name Type Attributes Description
currentContextGroup string <optional>

Context Group for the client. (green, yellow, red, etc.)

providerId string <optional>

When provided, automatically connects the client to the specified provider uuid

JoinContextGroupOptions

JoinContextGroupOptions interface

Type:
  • object
Properties:
Name Type Attributes Description
contextGroupId string

Id of the context group.

target Identity | ClientIdentity <optional>

Identity of the entity you wish to join to a context group.

JumpListCategory

JumpListCategory interface

Type:
  • object
Properties:
Name Type Description
name string

The display title for the category. If omitted, items in this category will be placed into the standard 'Tasks' category. There can be only one such category, and it will always be displayed at the bottom of the JumpList.

items Array.<JumpListItem>

Array of JumpListItem objects

JumpListItem

JumpListItem interface

Type:
  • object
Properties:
Name Type Description
type string

One of the following: "task" or "separator". Defaults to task.

title string

The text to be displayed for the JumpList Item. Should only be set if type is "task".

description string

Description of the task (displayed in a tooltip). Should only be set if type is "task".

deepLink string

Deep link to a manifest, i.e: fins://path.to/manifest.json?$$param1=value1. See deep-linking for more information.

iconPath string

The absolute path to an icon to be displayed for the item, which can be an arbitrary resource file that contains an icon (e.g. .ico, .exe, .dll).

iconIndex number

The index of the icon in the resource file. If a resource file contains multiple icons this value can be used to specify the zero-based index of the icon that should be displayed for this task. If a resource file contains only one icon, this property should be set to zero.

LayoutConfig

LayoutConfig interface

Type:
  • object
Properties:
Name Type Description
content Array.<LayoutItem>

Content of the layout. There can only be one top-level LayoutItem in the content array. We do not recommend trying to build Layouts or LayoutItems by hand and instead use calls such as getSnapshot or our Layout Config Generation Tool .

settings LayoutSettings

Configuration for certain Layout behaviors. See the LayoutSettings interface.

LayoutItem

LayoutItem Interface

Type:
  • object
Properties:
Name Type Attributes Description
type string

The type of the item. Possible values are 'row', 'column', 'stack', and 'component'.

content Array.<LayoutItem> <optional>

An array of configurations for items that will be created as children of this item.

componentName string <optional>

Only a component type will have this property and it should be set to view.

componentState View~options <optional>

Only a component type will have this property and it represents the view options of a given component.

LayoutSettings

LayoutSettings Interface

Type:
  • object
Properties:
Name Type Attributes Default Description
constrainDragToHeaders boolean <optional>
false

Limits the area to which tabs can be dragged. If true, stack headers are the only areas where tabs can be dropped.

hasHeaders boolean <optional>
true

Turns tab headers on or off. If false, the layout will be displayed with splitters only.

newTabButton object <optional>

Configuration of the Plus button that appears on each tabstrip. Upon pressing, a new tab will be added to the tabstrip with the specified url.

Properties
Name Type Attributes Description
url string <optional>

Specifies the url that opens in the tab created upon pressing the button.

popoutWholeStack boolean <optional>
false

Whether the popout button will only act on the entire stack, as opposed to only the active tab.

preventDragIn boolean <optional>
false

If true, tabs can't be dragged into the window.

preventDragOut boolean <optional>
false

If true, tabs can't be dragged out of the window.

preventSplitterResize boolean <optional>
false

If true, tab contents can't be resized by the user.

reorderEnabled boolean <optional>
true

If true, the user can re-arrange the layout by dragging items by their tabs to the desired location.

showCloseIcon boolean <optional>
false

Whether to show the close button on stack header (not to be confused with close button on every tab).

showMaximiseIcon boolean <optional>
false

Whether to show the maximize button on stack header. The button will maximize the current tab to fill the entire window.

showPopoutIcon boolean <optional>
false

Whether to show the popout button on stack header. The button will create a new window with current tab as its content. In case popoutWholeStack is set to true, all tabs in the stack will be in the new window.

Listener

Listener object returned by addContextListener and addIntentListener

Type:
  • object
Properties:
Name Type Description
unsubscribe function

function for addContextListener and addIntentListener.

LogInfo

LogInfo interface

Type:
  • object
Properties:
Name Type Description
name string

The filename of the log

size number

The size of the log in bytes

date string

The unix time at which the log was created "Thu Jan 08 2015 14:40:30 GMT-0500 (Eastern Standard Time)"

LogLevel

Log verbosity levels.

Describes the minimum level (inclusive) above which logs will be written

Type:
  • verbose | info | warning | error | fatal
Properties:
Name Type Description
verbose string

all logs written

info string

info and above

warning string

warning and above

error string

error and above

fatal string

fatal only, indicates a crash is imminent

ManifestInfo

ManifestInfo interface

Type:
  • object
Properties:
Name Type Description
uuid string

The uuid of the application

manifestUrl string

The runtime manifest URL

Margins

Type:
  • object
Properties:
Name Type Attributes Description
marginType string <optional>

Can be default, none, printableArea, or custom. If custom is chosen, you will also need to specify top, bottom, left, and right.

top number <optional>

The top margin of the printed web page, in pixels.

bottom number <optional>

The bottom margin of the printed web page, in pixels.

left number <optional>

The left margin of the printed web page, in pixels.

right number <optional>

The right margin of the printed web page, in pixels.

Type:
  • object
Properties:
Name Type Attributes Description
data *

Data to be returned if the user selects the element. Must be serializable. Large objects can have a performance impact.

type 'normal' | 'separator' | 'submenu' | 'checkbox' <optional>

Defaults to 'normal' unless a 'submenu' key exists

label string <optional>

The text to show on the menu item. Should be left undefined for type: 'separator'

enabled boolean <optional>

If false, the menu item will be greyed out and unclickable.

visible boolean <optional>

If false, the menu item will be entirely hidden.

checked boolean <optional>

Should only be specified for checkbox type menu items.

submenu Array.<MenuItemTemplate> <optional>

Should be specified for submenu type menu items. If submenu is specified, the type: 'submenu' can be omitted.

Type:
  • object
Properties:
Name Type Attributes Description
result 'clicked' | 'closed'

Whether the user clicked on a menu item or the menu was closed (user clicked elsewhere).

data * | undefined <optional>

The data property of the menu item clicked by the user. Only defined if result was clicked.

MonitorDetails

MonitorDetails interface

Type:
  • object
Properties:
Name Type Description
available DipScaleRects

The available DIP scale coordinates

availableRect Rect

The available monitor coordinates

deviceId string

The device id of the display

displayDeviceActive boolean

true if the display is active

deviceScaleFactor number

The device scale factor

monitorRect Rect

The monitor coordinates

name string

The name of the display

dpi Point

The dots per inch

monitor DipScaleRects

The monitor coordinates

MonitorInfo

MonitorInfo interface

Type:
  • object
Properties:
Name Type Description
deviceScaleFactor number

The device scale factor

dpi Point

The dots per inch

nonPrimaryMonitors Array.<MonitorDetails>

The array of monitor details

primaryMonitor MonitorDetails

The monitor details

reason string

always "api-query"

taskBar TaskBar

The taskbar on monitor

virtualScreen DipRect

The virtual display screen coordinates

Opacity

Type:
  • object
Properties:
Name Type Description
duration number

The total time in milliseconds this transition should take.

relative boolean

Treat 'opacity' as absolute or as a delta. Defaults to false.

opacity number

This value is clamped from 0.0 to 1.0.

PlatformOptions

The options object required by Platform.start Any Application option is also a valid platform option

Type:
  • object
Properties:
Name Type Attributes Description
commands Array.<Object> <optional>

Configuration for keyboard commands. For details and usage, see Using Keyboard Commands.

defaultWindowOptions DefaultWindowOptions <optional>

Default window options apply to all platform windows.

defaultViewOptions View~options <optional>

Default view options apply to all platform views.

viewProcessAffinityStrategy ProcessAffinityStrategy <optional>

'same' | 'different'.

Point

Point interface

Type:
  • object
Properties:
Name Type Description
x number

The mouse x position

y number

The mouse y position

PointTopLeft

PointTopLeft interface

Type:
  • object
Properties:
Name Type Description
top number

The mouse top position in virtual screen coordinates

left number

The mouse left position in virtual screen coordinates

PopupOptions

Type:
  • object
Properties:
Name Type Attributes Description
name string <optional>

If a window with this name exists, it will be shown as a popup. Otherwise, a new window with this name will be created. If this name is undefined, initialOptions.name will be used. If this name and intialOptions.name are both undefined, a name will be generated.

url string <optional>

Navigates to this url if showing an existing window as a popup, otherwise the newly created window will load this url.

initialOptions Window~options <optional>

Window creation options when using showPopupWindow to create a new window.

additionalOptions Window~options <optional>

Updatable window options applied to new and existing windows when shown as popups.

onPopupResult function <optional>

Executed when this window's popup calls dispatchPopupResult. Note: if this is defined, showPopupWindow will not return a PopupResult.

onPopupReady function <optional>

Executed when the popup window is shown. Provides the popup window to the provided function, and allows for easy access the popup window for additional behavior customization.

height number <optional>

Height of the popup window (takes priority over intialOptions size properties).

width number <optional>

Width of the popup window (takes priority over intialOptions size properties).

x number <optional>

Left position where the popup window will be shown (relative to the window calling showPopupWindow).

y number <optional>

Top position where the popup window will be shown (relative to the window calling showPopupWindow).

blurBehavior 'modal' | 'hide' | 'close' <optional>

Determines what happens if the popup window is blurred. 'modal' restricts resizing and positioning in the caller, 'hide' hides the popup window on blur and 'close' closes the popup window on blur.

resultDispatchBehavior 'none' | 'hide' | 'close' <optional>

Determines what happens when the popup window calls dispatchPopupResult. 'none' will do nothing, 'hide' hides the popup window on dispatchPopupResult and 'close' closes the popup window on dispatchPopupResult.

focus boolean <optional>

Determines if the popup window should or should not be focused when it is shown.

hideOnClose boolean <optional>

Hide the popup window instead of closing whenever close is called on it. Note: if this is true and blurBehavior and/or resultDispatchBehavior are set to close, the window will be hidden.

PopupResult

Type:
  • object
Properties:
Name Type Attributes Description
identity Identity

name and uuid of the popup window that called dispatched this result.

result 'clicked' | 'dismissed'

Result of the user interaction with the popup window.

data * | undefined <optional>

Data passed to dispatchPopupResult.

Position

Type:
  • object
Properties:
Name Type Description
duration number

The total time in milliseconds this transition should take.

relative boolean

Treat 'opacity' as absolute or as a delta. Defaults to false.

left number

Defaults to the window's current left position in virtual screen coordinates.

top number

Defaults to the window's current top position in virtual screen coordinates.

PresetLayoutOptions

PresetLayoutOptions interface

Type:
  • object
Properties:
Name Type Description
presetType LayoutPresetTypes

Which preset layout arrangement to use. The preset options are columns, grid, rows, and tabs.

PrinterInfo

PrinterInfo interface

Type:
  • object
Properties:
Name Type Description
name string

Printer Name

description string

Printer Description

status number

Printer Status

isDefault boolean

Indicates that system's default printer

PrintOptions

Type:
  • object
Properties:
Name Type Attributes Default Description
silent boolean <optional>
false

Don't ask user for print settings.

printBackground boolean <optional>
false

Prints the background color and image of the web page.

deviceName string <optional>
''

Set the printer device name to use.

color boolean <optional>
true

Set whether the printed web page will be in color or grayscale.

margins Margins <optional>

Set margins for the printed web page

landscape boolean <optional>
false

Whether the web page should be printed in landscape mode.

scaleFactor number <optional>

The scale factor of the web page.

pagesPerSheet number <optional>

The number of pages to print per page sheet.

collate boolean <optional>

Whether the web page should be collated.

copies number <optional>

The number of copies of the web page to print.

pageRanges Record.<string, number> <optional>

The page range to print. Should have two keys: from and to.

duplexMode string <optional>

Set the duplex mode of the printed web page. Can be simplex, shortEdge, or longEdge.

dpi Dpi <optional>

Set dpi for the printed web page

ProcessAffinityStrategy

Strategy to place views that share a domain into different process affinities or the same process affinity.

Type:
  • same | different
Properties:
Name Type Description
same string

views in the same domain will have the same process affinity.

different string

views in the same domain will have different process affinities.

ProcessDetails

ProcessDetails interface

Type:
  • object
Properties:
Name Type Description
cpuUsage number

The percentage of total CPU usage

nonPagedPoolUsage number

The current nonpaged pool usage in bytes

pageFaultCount number

The number of page faults

pagedPoolUsage number

The current paged pool usage in bytes

pagefileUsage number

The total amount of memory in bytes that the memory manager has committed

peakNonPagedPoolUsage number

The peak nonpaged pool usage in bytes

peakPagedPoolUsage number

The peak paged pool usage in bytes

peakPagefileUsage number

The peak value in bytes of pagefileUsage during the lifetime of this process

peakWorkingSetSize number

The peak working set size in bytes

workingSetSize number

The current working set size (both shared and private data) in bytes

pid number

The native process identifier

ProcessInfo

ProcessInfo interface

Type:
  • object
Properties:
Name Type Description
cpuUsage number

The percentage of total CPU usage

name string

The application name

nonPagedPoolUsage number

The current nonpaged pool usage in bytes

pageFaultCount number

The number of page faults

pagedPoolUsage number

The current paged pool usage in bytes

pagefileUsage number

The total amount of memory in bytes that the memory manager has committed

peakNonPagedPoolUsage number

The peak nonpaged pool usage in bytes

peakPagedPoolUsage number

The peak paged pool usage in bytes

peakPagefileUsage number

The peak value in bytes of pagefileUsage during the lifetime of this process

peakWorkingSetSize number

The peak working set size in bytes

processId number

The native process identifier

uuid string

The application UUID

workingSetSize number

The current working set size (both shared and private data) in bytes

ProxyConfig

ProxyConfig interface

Type:
  • object
Properties:
Name Type Description
proxyAddress string

The configured proxy address

proxyPort number

The configured proxy port

type string

The proxy Type

ProxyInfo

ProxyInfo interface

Type:
  • object
Properties:
Name Type Description
config ProxyConfig

The proxy config

system ProxySystemInfo

The proxy system info

ProxySystemInfo

ProxySystemInfo interface

Type:
  • object
Properties:
Name Type Description
autoConfigUrl string

The auto configuration url

bypass string

The proxy bypass info

enabled boolean

Value to check if a proxy is enabled

proxy string

The proxy info

QueryPermissionResult

QueryPermissionResult interface

Type:
  • object
Properties:
Name Type Attributes Description
permission string

The full name of a secured API

state string

'granted' | 'denied' | 'unavailable'

granted boolean

true if permission is granted

rawValue object <optional>

The value of permission

Rect

Rect interface

Type:
  • object
Properties:
Name Type Description
bottom number

The bottom-most coordinate

left number

The left-most coordinate

right number

The right-most coordinate

top number

The top-most coordinate

RegistryInfo

RegistryInfo interface

Type:
  • object
Properties:
Name Type Description
data any

The registry data

rootKey string

The registry root key

subkey string

The registry key

type string

The registry type

value string

The registry value name

RemoveFromContextGroupOptions

RemoveFromContextGroupOptions interface

Type:
  • object
Properties:
Name Type Description
target Identity | ClientIdentity

Identity of the entity you wish to join to a context group.

ReplaceLayoutOpts

ReplaceLayoutOpts interface

Type:
  • object
Properties:
Name Type Description
layout LayoutConfig

Layout config to be applied.

ReplaceLayoutPayload

ReplaceLayoutPayload interface

Type:
  • object
Properties:
Name Type Description
opts ReplaceLayoutOpts

Object containing the layout to be applied.

target Identity

Identity of the window whose layout will be replace.

RuntimeDownloadOptions

These are the options object required by the downloadRuntime function.

Type:
  • object
Properties:
Name Type Description
version string

The given version to download

RuntimeInfo

RuntimeInfo interface

Type:
  • object
Properties:
Name Type Description
architecture string

The runtime build architecture

manifestUrl string

The runtime manifest URL

port number

The runtime websocket port

securityRealm string

The runtime security realm

version string

The runtime version

args object

the command line argument used to start the Runtime

chromeVersion string

The chrome version

electronVersion string

The electron version

RVMInfo

RVMInfo interface

Type:
  • object
Properties:
Name Type Description
action string

The name of action: "get-rvm-info"

appLogDirectory string

The app log directory

path string

The path of OpenfinRVM.exe

'start-time' string

The start time of RVM

version string

The version of RVM

'working-dir' string

The working directory

RvmLaunchOptions

RvmLaunchOptions interface

Type:
  • object
Properties:
Name Type Attributes Description
noUi boolean <optional>

true if no UI when launching

userAppConfigArgs object <optional>

The user app configuration args

timeToLive number <optional>

Timeout in seconds until RVM launch request expires

ServiceConfiguration

ServiceConfiguration interface

Type:
  • object
Properties:
Name Type Description
config object

The service configuration

name string

The name of the service

ServiceIdentifier

ServiceIdentifier interface

Type:
  • object
Properties:
Name Type Description
name string

The name of the service

SessionContextGroup

An instance of a SessionContextGroup

Type:
  • object
Properties:
Name Type Description
id string

The SessionContextGroup's id.

setContext setContext

Sets a context of a certain type

getCurrentContext getCurrentContext

Gets the currently set context of a certain type

addContextHandler addContextHandler

Adds a handler for context change.

setContext(context) → {Promise.<void>}

A SessionContextGroup instance method for setting a context in the SessionContextGroup.

Parameters:
Name Type Description
context Context

The Context to be set.

Returns:
Type
Promise.<void>

SetContextOptions

SetContextOptions interface

Type:
  • object
Properties:
Name Type Description
{context} Context

New context to set.

SetWindowContextPayload

SetWindowContextPayload interface

Type:
  • object
Properties:
Name Type Description
context any

The requested context update.

entityType EntityType

Entity type of the target of the context update ('view' or 'window').

target Identity

Identity of the entity targeted by the call to Platform.setWindowContext.

SetWindowContextPayload

SetWindowContextPayload interface

Type:
  • object
Properties:
Name Type Description
context any

The requested context update.

entityType EntityType

Entity type of the target of the context update ('view' or 'window').

target Identity

Identity of the entity targetted by the call to Platform.setWindowContext.

SharedWorkerInfo

SharedWorkerInfo interface

Type:
  • object
Properties:
Name Type Description
id string

The unique id of the shared worker.

url string

The url of the shared worker.

ShortCutConfig

ShortCutConfig interface

Type:
  • object
Properties:
Name Type Description
desktop boolean

true if application has a shortcut on the desktop

startMenu boolean

true if application has shortcut in the start menu

systemStartup boolean

true if application will be launched on system startup

ShowPopupMenuOptions

Type:
  • object
Properties:
Name Type Attributes Description
template Array.<MenuItemTemplate>

An array describing the menu to show.

x number <optional>

The window x coordinate where to show the menu. Defaults to mouse position. If using must also use y.

y number <optional>

The window y coordinate where to show the menu. Defaults to mouse position. If using must also use x

ShowViewsOnSplitterDrag

Platform Windows Only. Allows views to be shown when they are resized by the user dragging the splitter between layout stacks.

Type:
  • Object
Properties:
Name Type Attributes Default Description
enabled boolean <optional>
false

Enables or disables showing views when the layout splitter is being dragged.

ShowViewsOnWindowResize

Platform Windows Only. Enables views to be shown when a Platform Window is being resized by the user.

Type:
  • Object
Properties:
Name Type Attributes Default Description
enabled boolean <optional>
false

Enables or disables showing Views when a Platform Window is being resized.

paintIntervalMs number <optional>
0

Number of miliseconds to wait between view repaints.

Size

Type:
  • object
Properties:
Name Type Description
duration number

The total time in milliseconds this transition should take.

relative boolean

Treat 'opacity' as absolute or as a delta. Defaults to false.

width number

Optional if height is present. Defaults to the window's current width.

height number

Optional if width is present. Defaults to the window's current height.

Snapshot

Snapshot interface

Type:
  • object
Properties:
Name Type Description
windows Array.<WindowOption>

The array of window options objects

SnapshotProvider

Type:
  • object
Properties:
Name Type Attributes Description
getSnapshot getSnapshot <optional>
applySnapshot applySnapshot <optional>

SubOptions

SubOptions interface

Type:
  • Object
Properties:
Name Type Description
timestamp number

The event timestamp

Subscription

Object returned when subscribing a handler.

Type:
  • object
Properties:
Name Type Description
unsubscribe function

Function to unsubscribe the handler.

SystemProcessInfo

SystemProcessInfo interface

Type:
  • object
Properties:
Name Type Description
browserProcess ProcessDetails

Info on browser process

apps Array.<AppProcessInfo>

Array of apps and their process info

TargetApp

Some operations can identify an app just by its name, or pass full app metadata.

Type:

TaskBar

TaskBar interface

Type:
  • object
Properties:
Name Type Description
edge string

which edge of a monitor the taskbar is on

rect Rect

The taskbar coordinates

TerminateExternalRequestType

TerminateExternalRequestType interface

Type:
  • object
Properties:
Name Type Description
uuid string

The uuid of the running application

timeout number

Time out period before the running application terminates

killtree boolean

Value to terminate the running application

Time

Time interface

Type:
  • object
Properties:
Name Type Description
user number

The number of milliseconds the CPU has spent in user mode

nice number

The number of milliseconds the CPU has spent in nice mode

sys number

The number of milliseconds the CPU has spent in sys mode

idle number

The number of milliseconds the CPU has spent in idle mode

irq number

The number of milliseconds the CPU has spent in irq mode

Transition

Type:
  • object
Properties:
Name Type Description
opacity Opacity

The Opacity transition

position Position

The Position transition

size Size

The Size transition

TransitionOptions

Type:
  • object
Properties:
Name Type Description
interrupt boolean

This option interrupts the current animation. When false it pushes this animation onto the end of the animation queue.

relative boolean

Treat 'opacity' as absolute or as a delta. Defaults to false.

TrayInfo

TrayInfo interface

Type:
  • object
Properties:
Name Type Description
bounds Bounds

The bound of tray icon in virtual screen pixels

monitorInfo MonitorInfo

Please see fin.System.getMonitorInfo for more information

x number

copy of bounds.x

y number

copy of bounds.y

ViewsPreventingUnloadPayload

ViewsPreventingUnloadPayload interface

Type:
  • object
Properties:
Name Type Description
windowClose boolean

Specifies if the Window should close

windowId Identity

Identity of the Window

viewsPreventingUnload Array.<Identity>

Array of identities for the Views that are preventing an unload

viewsNotPreventingUnload Array.<Identity>

Array of identities for the Views that are not preventing an unload

closeType 'view' | 'window'

If the close action came from the Window or a single View

ViewStatuses

Type:
  • object
Properties:
Name Type Description
viewsPreventingUnload Array.<Identity>

Array of identities for the Views that are preventing an unload

viewsNotPreventingUnload Array.<Identity>

Array of identities for the Views that are not preventing an unload

ViewVisibility

Platform Windows Only. Controls behavior for showing views when they are being resized by the user.

Type:
  • Object
Properties:
Name Type Attributes Description
showViewsOnWindowResize ShowViewsOnWindowResize <optional>

Enables views to be shown when a Platform Window is being resized by the user.

showViewsOnSplitterDrag ShowViewsOnSplitterDrag <optional>

Allows views to be shown when they are resized by the user dragging the splitter between layout stacks.

WindowDetail

WindowDetail interface

Type:
  • object
Properties:
Name Type Description
bottom number

The bottom-most coordinate of the window

height number

The height of the window

isShowing boolean

Value to check if the window is showing

left number

The left-most coordinate of the window

name string

The name of the window

right number

The right-most coordinate of the window

state string

The window state

top number

The top-most coordinate of the window

width number

The width of the window

WriteRequestType

WriteRequestType interface

Type:
  • object
Properties:
Name Type Attributes Description
data string

Data to be written

type string <optional>

Clipboard Type