import type * as OpenFin from '../../OpenFin'; import { Transport } from '../../transport/transport'; import { Base } from '../base'; import { LayoutModule } from './layout/index'; type Channel = OpenFin.Fin['InterApplicationBus']['Channel']; /** * @PORTED * InitPlatformOptions interface * @typedef { object } InitPlatformOptions * @property { OverrideCallback } [overrideCallback] a callback function that can be used to extend or replace default Provider behavior. */ /** * @PORTED * @typedef { same | different } ProcessAffinityStrategy * @summary Strategy to place views that share a domain into different process affinities or the same process affinity. * @property { string } same views in the same domain will have the same process affinity. * @property { string } different views in the same domain will have different process affinities. */ /** * @PORTED * @typedef { object } PlatformOptions * @summary The options object required by {@link Platform#start Platform.start} * Any {@link ApplicationOptions Application option} is also a valid platform option * @property {Array.} [commands] Configuration for keyboard commands. * For details and usage, see [Using Keyboard Commands]{@link https://developers.openfin.co/docs/platform-api#section-5-3-using-keyboard-commands}. * @property {DefaultWindowOptions} [defaultWindowOptions] Default window options apply to all platform windows. * @property {View~options} [defaultViewOptions] Default view options apply to all platform views. * @property {ProcessAffinityStrategy} [viewProcessAffinityStrategy] 'same' | 'different'. */ /** * @PORTED * @typedef { object } DefaultWindowOptions * @summary Default window options apply to all platform windows. * Any {@link Window~options 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. * @property {string} [stylesheetUrl] * 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. */ /** * @DELETED * Snapshot interface * @typedef { object } Snapshot * @property { WindowOption[] } windows The array of window options objects */ /** * @lends Platform */ export default class PlatformModule extends Base { private _channel; Layout: LayoutModule; constructor(wire: Transport, channel: Channel); /** * Initializes a Platform. Must be called from the Provider when using a custom provider. * @param { InitPlatformOptions } [options] - platform options including a callback function that can be used to extend or replace * default Provider behavior. * @return {Promise.} * @tutorial Platform.init * @experimental * @static */ init(options?: OpenFin.InitPlatformOptions): Promise; /** * Asynchronously returns a Platform object that represents an existing platform. * @param { Identity } identity * @return {Promise.} * @tutorial Platform.wrap * @static */ wrap(identity: OpenFin.ApplicationIdentity): Promise; /** * Synchronously returns a Platform object that represents an existing platform. * @param { Identity } identity * @return {Platform} * @tutorial Platform.wrapSync * @static */ wrapSync(identity: OpenFin.ApplicationIdentity): OpenFin.Platform; /** * Asynchronously returns a Platform object that represents the current platform. * @return {Promise.} * @tutorial Platform.getCurrent * @static */ getCurrent(): Promise; /** * Synchronously returns a Platform object that represents the current platform. * @return {Platform} * @tutorial Platform.getCurrentSync * @static */ getCurrentSync(): OpenFin.Platform; /** * Creates and starts a Platform and returns a wrapped and running Platform instance. The wrapped Platform methods can * be used to launch content into the platform. Promise will reject if the platform is already running. * @param { PlatformOptions } platformOptions * @return {Promise.} * @tutorial Platform.start * @static */ start(platformOptions: OpenFin.PlatformOptions): Promise; /** * Retrieves platforms's manifest and returns a wrapped and running Platform. If there is a snapshot in the manifest, * it will be launched into the platform. * @param {string} manifestUrl - The URL of platform's manifest. * @param {RvmLaunchOptions} [opts] - Parameters that the RVM will use. * @return {Promise.} * @tutorial Platform.startFromManifest * @static */ startFromManifest(manifestUrl: string, opts?: OpenFin.RvmLaunchOptions): Promise; } export {};