Class: ExternalWindow

ExternalWindow

An ExternalWindow is an OpenFin object representing a window that belongs to a non-openfin application.
While External Windows don't have the complete functionality of an OpenFin Window object, they can be used to tap into any application that is currently running in the OS.
External Windows are useful for grouping, moving and resizing non-openfin applications as well as listening to events that are dispatched by these applications.
They are also compatible with OpenFin's Layouts service to facilitate complete positional control over all running applications.
External Windows has the ability to listen for external window-specific events.

Methods

(async, static) wrap(identity) → {Promise.<ExternalWindow>}

EXPERIMENTAL

Asynchronously returns an external window object that represents an existing external window.
Note: This method is restricted by default and must be enabled via API security settings.

Parameters:
Name Type Description
identity Identity
Tutorials:
Returns:
Type
Promise.<ExternalWindow>

(async) bringToFront() → {Promise.<void>}

EXPERIMENTAL

Brings the external window to the front of the window stack.

Tutorials:
Returns:
Type
Promise.<void>

(async) close() → {Promise.<void>}

EXPERIMENTAL

Closes the external window.

Tutorials:
Returns:
Type
Promise.<void>

(async) flash() → {Promise.<void>}

EXPERIMENTAL

Flashes the external window’s frame and taskbar icon until stopFlashing is called.

Tutorials:
Returns:
Type
Promise.<void>

(async) focus() → {Promise.<void>}

EXPERIMENTAL

Gives focus to the external window.

Tutorials:
Fires:
  • ExternalWindow#event:focused
Returns:
Type
Promise.<void>

(async) getBounds() → {Promise.<Bounds>}

EXPERIMENTAL

Gets the current bounds (top, left, etc.) of the external window.

Tutorials:
Returns:
Type
Promise.<Bounds>

(async) getGroup() → {Promise.<Array.<(ExternalWindow|_Window)>>}

EXPERIMENTAL

Retrieves an array containing wrapped external windows that are grouped with this external window. If a window is not in a group an empty array is returned.

Tutorials:
Returns:
Type
Promise.<Array.<(ExternalWindow|_Window)>>

(async) getInfo() → {Promise.<any>}

EXPERIMENTAL

Gets an information object for the window.

Tutorials:
Returns:
Type
Promise.<any>

(async) getOptions() → {Promise.<any>}

EXPERIMENTAL

Gets an external window's options.

Tutorials:
Returns:
Type
Promise.<any>

(async) getState() → {Promise.<string>}

EXPERIMENTAL

Gets the current state ("minimized", "maximized", or "restored") of the external window.

Tutorials:
Returns:
Type
Promise.<string>

(async) hide() → {Promise.<void>}

EXPERIMENTAL

Hides the external window.

Tutorials:
Returns:
Type
Promise.<void>

(async) isShowing() → {Promise.<boolean>}

EXPERIMENTAL

Determines if the external window is currently showing.

Tutorials:
Returns:
Type
Promise.<boolean>

(async) joinGroup(target) → {Promise.<void>}

EXPERIMENTAL

Joins the same window group as the specified window. Currently unsupported (method will nack).

Parameters:
Name Type Description
target _Window | ExternalWindow

The window whose group is to be joined

Tutorials:
Returns:
Type
Promise.<void>

(async) leaveGroup() → {Promise.<void>}

EXPERIMENTAL

Leaves the current window group so that the window can be moved independently of those in the group.

Tutorials:
Returns:
Type
Promise.<void>

(async) maximize() → {Promise.<void>}

EXPERIMENTAL

Maximizes the external window.

Tutorials:
Returns:
Type
Promise.<void>

(async) mergeGroups(target) → {Promise.<void>}

EXPERIMENTAL

Merges the instance's window group with the same window group as the specified window

Parameters:
Name Type Description
target _Window | ExternalWindow

The window whose group is to be merged with

Tutorials:
Returns:
Type
Promise.<void>

(async) minimize() → {Promise.<void>}

EXPERIMENTAL

Minimizes the external window.

Tutorials:
Returns:
Type
Promise.<void>

(async) moveBy(deltaLeft, deltaTop) → {Promise.<void>}

EXPERIMENTAL

Moves the external window by a specified amount.

Parameters:
Name Type Description
deltaLeft number

The change in the left position of the window

deltaTop number

The change in the top position of the window

Tutorials:
Returns:
Type
Promise.<void>

(async) moveTo(left, top) → {Promise.<void>}

EXPERIMENTAL

Moves the external window to a specified location.

Parameters:
Name Type Description
left number

The left position of the window

top number

The top position of the window

Tutorials:
Returns:
Type
Promise.<void>

(async) resizeBy(deltaWidth, deltaHeight, anchor) → {Promise.<void>}

EXPERIMENTAL

Resizes the external window by a specified amount.

Parameters:
Name Type Description
deltaWidth number

The change in the width of the window

deltaHeight number

The change in the height of the window

anchor AnchorType

Specifies a corner to remain fixed during the resize. Can take the values: "top-left", "top-right", "bottom-left", or "bottom-right". If undefined, the default is "top-left".

Tutorials:
Returns:
Type
Promise.<void>

(async) resizeTo(width, height, anchor) → {Promise.<void>}

EXPERIMENTAL

Resizes the external window to the specified dimensions.

Parameters:
Name Type Description
width number

The change in the width of the window

height number

The change in the height of the window

anchor AnchorType

Specifies a corner to remain fixed during the resize. Can take the values: "top-left", "top-right", "bottom-left", or "bottom-right". If undefined, the default is "top-left".

Tutorials:
Returns:
Type
Promise.<void>

(async) restore() → {Promise.<void>}

EXPERIMENTAL

Restores the external window to its normal state (i.e. unminimized, unmaximized).

Tutorials:
Returns:
Type
Promise.<void>

(async) setAsForeground() → {Promise.<void>}

EXPERIMENTAL

Will bring the external window to the front of the entire stack and give it focus.

Tutorials:
Returns:
Type
Promise.<void>

(async) setBounds() → {Promise.<void>}

EXPERIMENTAL

Sets the external window's size and position.

Properties:
Name Type Description
bounds Bounds
Tutorials:
Returns:
Type
Promise.<void>

(async) show() → {Promise.<void>}

EXPERIMENTAL

Shows the external window if it is hidden.

Tutorials:
Returns:
Type
Promise.<void>

(async) showAt(left, top) → {Promise.<void>}

EXPERIMENTAL

Shows the external window, if it is hidden, at the specified location. If the toggle parameter is set to true, the external window will alternate between showing and hiding.

Parameters:
Name Type Description
left number

The left position of the window

top number

The top position of the window

Tutorials:
Returns:
Type
Promise.<void>

(async) stopFlashing() → {Promise.<void>}

EXPERIMENTAL

Stops the taskbar icon from flashing.

Tutorials:
Returns:
Type
Promise.<void>

(async) updateOptions(options) → {Promise.<void>}

EXPERIMENTAL

Updates the external window using the passed options

Parameters:
Name Type Description
options *

Changes an external window's options

Tutorials:
Returns:
Type
Promise.<void>