@openfin/core 30.73.28 → 31.74.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +4 -0
- package/package.json +2 -2
- package/src/OpenFin.d.ts +1664 -173
- package/src/api/application/Factory.d.ts +1 -0
- package/src/api/application/Factory.js +1 -0
- package/src/api/application/Instance.d.ts +2 -1
- package/src/api/application/Instance.js +1 -0
- package/src/api/base.d.ts +2 -2
- package/src/api/clipboard/index.d.ts +1 -0
- package/src/api/clipboard/index.js +1 -0
- package/src/api/events/platform.d.ts +4 -5
- package/src/api/events/system.d.ts +5 -6
- package/src/api/events/webcontents.d.ts +23 -3
- package/src/api/external-application/Instance.d.ts +1 -1
- package/src/api/fin.d.ts +1 -1
- package/src/api/frame/Instance.d.ts +1 -1
- package/src/api/global-hotkey/index.d.ts +1 -1
- package/src/api/interappbus/channel/channel.d.ts +1 -1
- package/src/api/interappbus/channel/channels-docs.d.ts +7 -0
- package/src/api/interappbus/channel/channels-docs.js +7 -0
- package/src/api/interappbus/channel/client.d.ts +3 -2
- package/src/api/interappbus/channel/client.js +12 -5
- package/src/api/interappbus/channel/connection-manager.d.ts +1 -1
- package/src/api/interappbus/channel/index.d.ts +1 -1
- package/src/api/interappbus/channel/index.js +5 -7
- package/src/api/interappbus/channel/protocols/classic/message-receiver.d.ts +1 -1
- package/src/api/interappbus/channel/protocols/classic/strategy.d.ts +1 -1
- package/src/api/interappbus/channel/protocols/index.d.ts +3 -0
- package/src/api/interappbus/channel/protocols/rtc/endpoint.js +10 -2
- package/src/api/interappbus/channel/protocols/rtc/ice-manager.d.ts +1 -1
- package/src/api/interappbus/channel/protocols/rtc/strategy.js +1 -1
- package/src/api/interappbus/channel/provider.d.ts +1 -1
- package/src/api/interappbus/index.d.ts +1 -1
- package/src/api/interop/Factory.d.ts +1 -2
- package/src/api/interop/Factory.js +20 -4
- package/src/api/interop/InteropBroker.d.ts +15 -47
- package/src/api/interop/InteropBroker.js +32 -46
- package/src/api/interop/InteropClient.d.ts +10 -9
- package/src/api/interop/InteropClient.js +9 -8
- package/src/api/interop/SessionContextGroupClient.d.ts +1 -1
- package/src/api/interop/fdc3/fdc3-1.2.js +8 -8
- package/src/api/interop/fdc3/fdc3-2.0.d.ts +2 -2
- package/src/api/interop/fdc3/fdc3-2.0.js +15 -7
- package/src/api/interop/fdc3/fdc3.d.ts +4 -5
- package/src/api/interop/fdc3/overrideCheck.d.ts +4 -0
- package/src/api/interop/fdc3/overrideCheck.js +32 -0
- package/src/api/interop/fdc3/versions.d.ts +1 -0
- package/src/api/interop/fdc3/versions.js +2 -0
- package/src/api/me.d.ts +1 -1
- package/src/api/platform/Factory.d.ts +6 -1
- package/src/api/platform/Factory.js +5 -0
- package/src/api/platform/Instance.d.ts +4 -2
- package/src/api/platform/Instance.js +4 -2
- package/src/api/platform/layout/Factory.d.ts +4 -0
- package/src/api/platform/layout/Factory.js +4 -0
- package/src/api/platform/layout/Instance.d.ts +1 -1
- package/src/api/platform/layout/utils/view-overlay.d.ts +1 -1
- package/src/api/platform/provider.d.ts +162 -0
- package/src/api/platform/provider.js +2 -0
- package/src/api/snapshot-source/Factory.d.ts +1 -0
- package/src/api/snapshot-source/Factory.js +1 -0
- package/src/api/snapshot-source/Instance.d.ts +1 -1
- package/src/api/system/index.d.ts +1 -471
- package/src/api/system/index.js +6 -476
- package/src/api/view/Instance.d.ts +7 -3
- package/src/api/view/Instance.js +7 -4
- package/src/api/webcontents/main.d.ts +18 -4
- package/src/api/window/Instance.d.ts +21 -1
- package/src/api/window/Instance.js +20 -0
- package/src/browser.js +1 -1
- package/src/mock.js +1 -1
- package/src/namespaces.d.ts +21 -0
- package/src/namespaces.js +24 -0
- package/src/transport/fin_store.d.ts +1 -1
- package/src/transport/transport-errors.d.ts +6 -1
- package/src/transport/transport-errors.js +1 -2
- package/src/transport/transport.d.ts +9 -6
- package/src/transport/transport.js +11 -2
- package/src/util/inaccessibleObject.d.ts +2 -0
- package/src/util/inaccessibleObject.js +49 -0
package/src/OpenFin.d.ts
CHANGED
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
import type { Application } from './api/application';
|
|
2
|
-
import {
|
|
3
|
-
import { ExternalApplicationEvent } from './api/events/externalApplication';
|
|
4
|
-
import { FrameEvent } from './api/events/frame';
|
|
5
|
-
import { GlobalHotkeyEvent } from './api/events/globalHotkey';
|
|
6
|
-
import { PlatformEvent } from './api/events/platform';
|
|
7
|
-
import { AppVersionEvent, SystemEvent } from './api/events/system';
|
|
2
|
+
import { AppVersionEvent } from './api/events/system';
|
|
8
3
|
import { TypedEventEmitter } from './api/events/typedEventEmitter';
|
|
9
|
-
import { ViewEvent } from './api/events/view';
|
|
10
|
-
import { WindowEvent, WindowOptionsChangedEvent } from './api/events/window';
|
|
11
4
|
import type { ExternalApplication } from './api/external-application';
|
|
12
5
|
import { FinApi } from './api/fin';
|
|
13
6
|
import type { _Frame } from './api/frame';
|
|
@@ -17,27 +10,48 @@ import type { ChannelProvider } from './api/interappbus/channel/provider';
|
|
|
17
10
|
import type { InteropBroker, InteropClient } from './api/interop';
|
|
18
11
|
import type { Platform } from './api/platform';
|
|
19
12
|
import type { Layout } from './api/platform/layout';
|
|
13
|
+
import { PlatformProvider } from './api/platform/provider';
|
|
20
14
|
import { SnapshotSource } from './api/snapshot-source';
|
|
21
15
|
import type { View } from './api/view';
|
|
22
16
|
import { _Window } from './api/window';
|
|
23
17
|
export declare type Fin<MeType extends EntityType = 'window' | 'view'> = FinApi<MeType>;
|
|
24
18
|
export type { Application, ExternalApplication, _Frame as Frame, ChannelClient, ChannelProvider, Platform, Layout, View, _Window as Window, InteropClient, InteropBroker, SnapshotSource };
|
|
25
19
|
export declare type WebContent = View | _Window;
|
|
20
|
+
export type { PlatformProvider };
|
|
26
21
|
export declare type ApplicationIdentity = {
|
|
27
22
|
uuid: string;
|
|
28
23
|
};
|
|
29
24
|
export declare type Identity = {
|
|
25
|
+
/**
|
|
26
|
+
* Universally unique identifier of the compenent
|
|
27
|
+
*/
|
|
30
28
|
uuid: string;
|
|
29
|
+
/**
|
|
30
|
+
* The name of the component
|
|
31
|
+
*/
|
|
31
32
|
name: string;
|
|
32
33
|
};
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
/**
|
|
35
|
+
* Identity of a channel client
|
|
36
|
+
*/
|
|
37
|
+
export declare type ClientIdentity = Identity & {
|
|
38
|
+
/**
|
|
39
|
+
* Unique identifier for a client, because there can be multiple clients at one name/uuid entity.
|
|
40
|
+
*/
|
|
36
41
|
endpointId: string;
|
|
37
42
|
isLocalEndpointId: boolean;
|
|
38
43
|
};
|
|
44
|
+
/**
|
|
45
|
+
* Extended channel client information
|
|
46
|
+
*/
|
|
39
47
|
export declare type ClientInfo = Omit<ClientIdentity, 'isLocalEndpointId'> & {
|
|
48
|
+
/**
|
|
49
|
+
* Indicates if the client belongs to a Window or View
|
|
50
|
+
*/
|
|
40
51
|
entityType: EntityType;
|
|
52
|
+
/**
|
|
53
|
+
* URL of the View or Window at the time of connection to the Channel Provider.
|
|
54
|
+
*/
|
|
41
55
|
connectionUrl: string;
|
|
42
56
|
};
|
|
43
57
|
export declare type ClientIdentityMultiRuntime = ClientIdentity & {
|
|
@@ -62,48 +76,160 @@ export declare type WindowBounds = Bounds & {
|
|
|
62
76
|
bottom: number;
|
|
63
77
|
right: number;
|
|
64
78
|
};
|
|
79
|
+
/**
|
|
80
|
+
* A rectangular area on the screen.
|
|
81
|
+
*/
|
|
65
82
|
export declare type Rectangle = {
|
|
83
|
+
/**
|
|
84
|
+
* The x coordinate of the rectangle's origin in pixels
|
|
85
|
+
*/
|
|
66
86
|
x: number;
|
|
87
|
+
/**
|
|
88
|
+
* The y coordinate of the rectangle's origin in pixels
|
|
89
|
+
*/
|
|
67
90
|
y: number;
|
|
91
|
+
/**
|
|
92
|
+
* The width of the rectangle in pixels
|
|
93
|
+
*/
|
|
68
94
|
width: number;
|
|
95
|
+
/**
|
|
96
|
+
* The height of the rectangle in pixels
|
|
97
|
+
*/
|
|
69
98
|
height: number;
|
|
70
99
|
};
|
|
100
|
+
/**
|
|
101
|
+
* The options object required by {@link Application.start Application.start}.
|
|
102
|
+
*
|
|
103
|
+
* The following options are required:
|
|
104
|
+
* * `uuid` is required in the app manifest as well as by {@link Application.start Application.start}
|
|
105
|
+
* * `name` is optional in the app manifest but required by {@link Application.start Application.start}
|
|
106
|
+
* * `url` is optional in both the app manifest {@link Application.start Application.start} and but is usually given
|
|
107
|
+
* (defaults to `"about:blank"` when omitted).
|
|
108
|
+
*
|
|
109
|
+
* _This jsdoc typedef mirrors the `ApplicationOption` TypeScript interface in `@types/openfin`._
|
|
110
|
+
*
|
|
111
|
+
* **IMPORTANT NOTE:**
|
|
112
|
+
* This object inherits all the properties of the window creation {@link Window~options options} object,
|
|
113
|
+
* which will take priority over those of the same name that may be provided in `mainWindowOptions`.
|
|
114
|
+
*/
|
|
71
115
|
export declare type ApplicationCreationOptions = Partial<ApplicationOptions> & {
|
|
72
116
|
name: string;
|
|
73
117
|
uuid: string;
|
|
74
118
|
};
|
|
119
|
+
/**
|
|
120
|
+
* The complete set of options for an application.
|
|
121
|
+
*/
|
|
75
122
|
export declare type ApplicationOptions = LegacyWinOptionsInAppOptions & {
|
|
123
|
+
/**
|
|
124
|
+
* @defaultValue false
|
|
125
|
+
*
|
|
126
|
+
* Disables IAB secure logging for the app.
|
|
127
|
+
*/
|
|
76
128
|
disableIabSecureLogging: boolean;
|
|
129
|
+
/**
|
|
130
|
+
* @defaultValue 'There was an error loading the application.'
|
|
131
|
+
*
|
|
132
|
+
* An error message to display when the application (launched via manifest) fails to load.
|
|
133
|
+
* A dialog box will be launched with the error message just before the runtime exits.
|
|
134
|
+
* Load fails such as failed DNS resolutions or aborted connections as well as cancellations, _e.g.,_ `window.stop()`,
|
|
135
|
+
* will trigger this dialog.
|
|
136
|
+
* Client response codes such as `404 Not Found` are not treated as fails as they are valid server responses.
|
|
137
|
+
*/
|
|
77
138
|
loadErrorMessage: string;
|
|
139
|
+
/**
|
|
140
|
+
* The options of the main window of the application.
|
|
141
|
+
*/
|
|
78
142
|
mainWindowOptions: WindowCreationOptions;
|
|
143
|
+
/**
|
|
144
|
+
* The name of the application (and the application's main window).
|
|
145
|
+
*
|
|
146
|
+
* If provided, _must_ match `uuid`.
|
|
147
|
+
*/
|
|
79
148
|
name: string;
|
|
149
|
+
/**
|
|
150
|
+
* @defaultValue false
|
|
151
|
+
*
|
|
152
|
+
* A flag to configure the application as non-persistent.
|
|
153
|
+
* Runtime exits when there are no persistent apps running.
|
|
154
|
+
*/
|
|
80
155
|
nonPersistent: boolean;
|
|
156
|
+
/**
|
|
157
|
+
* @defaultValue false
|
|
158
|
+
*
|
|
159
|
+
* Enable Flash at the application level.
|
|
160
|
+
*/
|
|
81
161
|
plugins: boolean;
|
|
162
|
+
/**
|
|
163
|
+
* @defaultValue false
|
|
164
|
+
* Enable spell check at the application level.
|
|
165
|
+
*/
|
|
82
166
|
spellCheck: boolean;
|
|
167
|
+
/**
|
|
168
|
+
* @defaultValue 'about:blank'
|
|
169
|
+
* The url to the application (specifically the application's main window).
|
|
170
|
+
*/
|
|
83
171
|
url: string;
|
|
172
|
+
/**
|
|
173
|
+
* The _Unique Universal Identifier_ (UUID) of the application, unique within the set of all other applications
|
|
174
|
+
* running in the OpenFin Runtime.
|
|
175
|
+
*
|
|
176
|
+
* Note that `name` and `uuid` must match.
|
|
177
|
+
*/
|
|
84
178
|
uuid: string;
|
|
179
|
+
/**
|
|
180
|
+
* @defaultValue true
|
|
181
|
+
*
|
|
182
|
+
* When set to `false` it will disable the same-origin policy for the app.
|
|
183
|
+
*/
|
|
85
184
|
webSecurity: boolean;
|
|
86
185
|
commands: ShortcutOverride[];
|
|
87
186
|
isPlatformController: boolean;
|
|
187
|
+
/**
|
|
188
|
+
* @defaultValue 1000
|
|
189
|
+
*
|
|
190
|
+
* Platforms Only. The maximum number of "detached" or "pooled" Views that can exist in the Platform before being closed.
|
|
191
|
+
* If you do not wish for views to be pooled on your platform, set this property to zero.
|
|
192
|
+
*/
|
|
88
193
|
maxViewPoolSize: number;
|
|
89
194
|
defaultWindowOptions: Partial<WindowOptions>;
|
|
90
195
|
defaultViewOptions: Partial<ViewOptions>;
|
|
91
196
|
snapshot: Snapshot;
|
|
197
|
+
/**
|
|
198
|
+
* @defaultValue false
|
|
199
|
+
*
|
|
200
|
+
* Platforms Only. Prevent the Platform Provider from quitting automatically when the last Platform Window is closed.
|
|
201
|
+
* Note: if the Platform Provider is showing, it won't close automatically.
|
|
202
|
+
* If you want a hidden Platform Provider to remain open after the last Platform Window has been closed, set this property to true.
|
|
203
|
+
*/
|
|
92
204
|
preventQuitOnLastWindowClosed: boolean;
|
|
93
205
|
interopBrokerConfiguration: InteropBrokerOptions;
|
|
94
206
|
apiDiagnostics: boolean;
|
|
95
207
|
defaultDomainSettings: DefaultDomainSettings;
|
|
208
|
+
/**
|
|
209
|
+
* @defaultValue false
|
|
210
|
+
* Enables the use of the Jumplists API and the 'pin to taskbar' functionality.
|
|
211
|
+
* Only relevant in Windows.
|
|
212
|
+
*/
|
|
96
213
|
enableJumpList: boolean;
|
|
97
214
|
enableBeforeUnload: boolean;
|
|
98
215
|
};
|
|
99
|
-
declare type InteropBrokerOptions = {
|
|
216
|
+
export declare type InteropBrokerOptions = {
|
|
100
217
|
contextGroups?: ContextGroupInfo;
|
|
101
218
|
logging?: InteropLoggingOptions;
|
|
102
219
|
};
|
|
103
220
|
export declare type ContextGroupInfo = {
|
|
221
|
+
/**
|
|
222
|
+
* Name of the context group.
|
|
223
|
+
*/
|
|
104
224
|
id: string;
|
|
225
|
+
/**
|
|
226
|
+
* Metadata for the Context Group. Contains the group's human-readable name, color, and an image, as defined by the Interop Broker.
|
|
227
|
+
*/
|
|
105
228
|
displayMetadata?: DisplayMetadata;
|
|
106
229
|
};
|
|
230
|
+
/**
|
|
231
|
+
* The display data for a context group.
|
|
232
|
+
*/
|
|
107
233
|
export declare type DisplayMetadata = {
|
|
108
234
|
/**
|
|
109
235
|
* A user-readable name for this context group, e.g: `"Red"`
|
|
@@ -118,7 +244,7 @@ export declare type DisplayMetadata = {
|
|
|
118
244
|
*/
|
|
119
245
|
readonly glyph?: string;
|
|
120
246
|
};
|
|
121
|
-
export declare type LegacyWinOptionsInAppOptions = Pick<WindowCreationOptions, 'accelerator' | 'alwaysOnTop' | 'api' | 'aspectRatio' | 'autoShow' | 'backgroundColor' | 'contentNavigation' | 'contextMenu' | 'cornerRounding' | 'customData' | 'customRequestHeaders' | 'defaultCentered' | 'defaultHeight' | 'defaultLeft' | 'defaultTop' | 'defaultWidth' | 'frame' | 'hideOnClose' | 'icon' | 'maxHeight' | 'maximizable' | 'maxWidth' | 'minHeight' | 'minimizable' | 'minWidth' | 'opacity' | 'preloadScripts' | 'resizable' | 'resizeRegion' | 'saveWindowState' | 'ignoreSavedWindowState' | 'shadow' | 'showTaskbarIcon' | 'smallWindow' | 'state' | 'taskbarIconGroup' | 'waitForPageLoad'>;
|
|
247
|
+
export declare type LegacyWinOptionsInAppOptions = Pick<WindowCreationOptions, 'accelerator' | 'alwaysOnTop' | 'api' | 'aspectRatio' | 'autoplayPolicy' | 'autoShow' | 'backgroundColor' | 'contentNavigation' | 'contextMenu' | 'cornerRounding' | 'customData' | 'customRequestHeaders' | 'defaultCentered' | 'defaultHeight' | 'defaultLeft' | 'defaultTop' | 'defaultWidth' | 'frame' | 'hideOnClose' | 'icon' | 'maxHeight' | 'maximizable' | 'maxWidth' | 'minHeight' | 'minimizable' | 'minWidth' | 'opacity' | 'preloadScripts' | 'resizable' | 'resizeRegion' | 'saveWindowState' | 'ignoreSavedWindowState' | 'shadow' | 'showTaskbarIcon' | 'smallWindow' | 'state' | 'taskbarIconGroup' | 'waitForPageLoad'>;
|
|
122
248
|
export declare type Snapshot = {
|
|
123
249
|
windows: WindowCreationOptions[];
|
|
124
250
|
snapshotDetails?: {
|
|
@@ -135,28 +261,61 @@ export declare type ContextGroupStates = {
|
|
|
135
261
|
[key: string]: Context;
|
|
136
262
|
};
|
|
137
263
|
};
|
|
264
|
+
/**
|
|
265
|
+
* Data passed between entities and applications.
|
|
266
|
+
*/
|
|
138
267
|
export declare type Context = {
|
|
268
|
+
/**
|
|
269
|
+
* An object containing string key-value pairs for the bulk of the data for the context. Differs between context types.
|
|
270
|
+
*/
|
|
139
271
|
id?: {
|
|
140
272
|
[key: string]: string;
|
|
141
273
|
};
|
|
274
|
+
/**
|
|
275
|
+
* User-readable name for the incoming context.
|
|
276
|
+
*/
|
|
142
277
|
name?: string;
|
|
278
|
+
/**
|
|
279
|
+
* Conserved type for the context (e.g. `instrument` or `country`).
|
|
280
|
+
*/
|
|
143
281
|
type: string;
|
|
144
282
|
};
|
|
145
283
|
export declare type MonitorInfo = {
|
|
284
|
+
/**
|
|
285
|
+
* The device scale factor.
|
|
286
|
+
*/
|
|
146
287
|
deviceScaleFactor: number;
|
|
147
288
|
dpi: Point;
|
|
148
289
|
nonPrimaryMonitors: MonitorDetails[];
|
|
149
290
|
primaryMonitor: MonitorDetails;
|
|
291
|
+
/**
|
|
292
|
+
* Always "api-query".
|
|
293
|
+
*/
|
|
150
294
|
reason: string;
|
|
151
295
|
taskbar: TaskBar;
|
|
296
|
+
/**
|
|
297
|
+
* The virtual display screen coordinates.
|
|
298
|
+
*/
|
|
152
299
|
virtualScreen: DipRect;
|
|
153
300
|
};
|
|
154
301
|
export declare type Point = {
|
|
302
|
+
/**
|
|
303
|
+
* The mouse x position
|
|
304
|
+
*/
|
|
155
305
|
x: number;
|
|
306
|
+
/**
|
|
307
|
+
* The mouse y position
|
|
308
|
+
*/
|
|
156
309
|
y: number;
|
|
157
310
|
};
|
|
158
311
|
export declare type PointTopLeft = {
|
|
312
|
+
/**
|
|
313
|
+
* The mouse top position in virtual screen coordinates
|
|
314
|
+
*/
|
|
159
315
|
top: number;
|
|
316
|
+
/**
|
|
317
|
+
* The mouse left position in virtual screen coordinates
|
|
318
|
+
*/
|
|
160
319
|
left: number;
|
|
161
320
|
};
|
|
162
321
|
export declare type RectangleByEdgePositions = {
|
|
@@ -166,14 +325,38 @@ export declare type RectangleByEdgePositions = {
|
|
|
166
325
|
right: number;
|
|
167
326
|
};
|
|
168
327
|
export declare type MonitorDetails = {
|
|
328
|
+
/**
|
|
329
|
+
* The available DIP scale coordinates.
|
|
330
|
+
*/
|
|
169
331
|
available: DipScaleRects;
|
|
332
|
+
/**
|
|
333
|
+
* The available monitor coordinates.
|
|
334
|
+
*/
|
|
170
335
|
availableRect: RectangleByEdgePositions;
|
|
336
|
+
/**
|
|
337
|
+
* The device id of the display.
|
|
338
|
+
*/
|
|
171
339
|
deviceId: string | number;
|
|
340
|
+
/**
|
|
341
|
+
* True if the display is active.
|
|
342
|
+
*/
|
|
172
343
|
displayDeviceActive: boolean;
|
|
344
|
+
/**
|
|
345
|
+
* The device scale factor.
|
|
346
|
+
*/
|
|
173
347
|
deviceScaleFactor: number;
|
|
348
|
+
/**
|
|
349
|
+
* The monitor coordinates.
|
|
350
|
+
*/
|
|
174
351
|
monitorRect: RectangleByEdgePositions;
|
|
352
|
+
/**
|
|
353
|
+
* The name of the display.
|
|
354
|
+
*/
|
|
175
355
|
name: string | number;
|
|
176
356
|
dpi: Point;
|
|
357
|
+
/**
|
|
358
|
+
* The monitor coordinates.
|
|
359
|
+
*/
|
|
177
360
|
monitor: DipScaleRects;
|
|
178
361
|
};
|
|
179
362
|
export declare type DipRect = RectangleByEdgePositions & {
|
|
@@ -185,91 +368,428 @@ export declare type DipScaleRects = {
|
|
|
185
368
|
scaledRect: RectangleByEdgePositions;
|
|
186
369
|
};
|
|
187
370
|
export declare type TaskBar = DipScaleRects & {
|
|
371
|
+
/**
|
|
372
|
+
* Which edge of a monitor the taskbar is on
|
|
373
|
+
*/
|
|
188
374
|
edge: string;
|
|
375
|
+
/**
|
|
376
|
+
* The taskbar coordinates.
|
|
377
|
+
*/
|
|
189
378
|
rect: RectangleByEdgePositions;
|
|
190
379
|
};
|
|
380
|
+
/**
|
|
381
|
+
* Options required to create a new window with {@link Window.create Window.create}.
|
|
382
|
+
*
|
|
383
|
+
* Note that `name` is the only required property — albeit the `url` property is usually provided as well
|
|
384
|
+
* (defaults to `"about:blank"` when omitted).
|
|
385
|
+
*/
|
|
191
386
|
export declare type WindowCreationOptions = Partial<WindowOptions> & {
|
|
192
387
|
name: string;
|
|
193
388
|
};
|
|
194
389
|
export declare type UpdatableWindowOptions = Partial<MutableWindowOptions>;
|
|
195
390
|
export declare type WindowOptions = MutableWindowOptions & ConstWindowOptions;
|
|
391
|
+
/**
|
|
392
|
+
* Configuration for view visibility settings
|
|
393
|
+
*/
|
|
196
394
|
export declare type ViewVisibilityOption = {
|
|
197
395
|
enabled?: boolean;
|
|
198
396
|
};
|
|
397
|
+
/**
|
|
398
|
+
* _Platform Windows Only_. Enables views to be shown when a Platform Window is being resized by the user.
|
|
399
|
+
*/
|
|
199
400
|
export declare type ShowViewOnWindowResizeOptions = ViewVisibilityOption & {
|
|
401
|
+
/**
|
|
402
|
+
* @defaultValue false
|
|
403
|
+
*
|
|
404
|
+
* Enables showing Views when a Platform Window is being resized.
|
|
405
|
+
*/
|
|
406
|
+
enabled?: boolean;
|
|
407
|
+
/**
|
|
408
|
+
* @defaultValue 0
|
|
409
|
+
*
|
|
410
|
+
* Number of milliseconds to wait between view repaints.
|
|
411
|
+
*/
|
|
200
412
|
paintIntervalMs?: number;
|
|
201
413
|
};
|
|
414
|
+
/**
|
|
415
|
+
* _Platform Windows Only_. Controls behavior for showing views when they are being resized by the user.
|
|
416
|
+
*/
|
|
202
417
|
export declare type ViewVisibilityOptions = {
|
|
418
|
+
/**
|
|
419
|
+
* Enables views to be shown when a Platform Window is being resized by the user.
|
|
420
|
+
*/
|
|
203
421
|
showViewsOnWindowResize?: ShowViewOnWindowResizeOptions;
|
|
422
|
+
/**
|
|
423
|
+
* Allows views to be shown when they are resized by the user dragging the splitter between layout stacks.
|
|
424
|
+
*/
|
|
204
425
|
showViewsOnSplitterDrag?: ViewVisibilityOption;
|
|
426
|
+
/**
|
|
427
|
+
* _Supported on Windows Operating Systems only_. Allows views to be shown when the user is dragging a tab around a layout.
|
|
428
|
+
*/
|
|
205
429
|
showViewsOnTabDrag?: ViewVisibilityOption;
|
|
206
430
|
};
|
|
431
|
+
/**
|
|
432
|
+
* Visibility state of a window.
|
|
433
|
+
*/
|
|
207
434
|
export declare type WindowState = 'maximized' | 'minimized' | 'normal';
|
|
435
|
+
export declare type AutoplayPolicyOptions = 'no-user-gesture-required' | 'user-gesture-required' | 'document-user-activation-required';
|
|
436
|
+
/**
|
|
437
|
+
* Window options that cannot be changed after creation.
|
|
438
|
+
*/
|
|
208
439
|
export declare type ConstWindowOptions = {
|
|
440
|
+
/**
|
|
441
|
+
* Enable keyboard shortcuts for devtools, zoom, reload, and reload ignoring cache.
|
|
442
|
+
*/
|
|
209
443
|
accelerator: Partial<Accelerator>;
|
|
444
|
+
/**
|
|
445
|
+
* Configurations for API injection.
|
|
446
|
+
*/
|
|
210
447
|
api: Api;
|
|
448
|
+
/**
|
|
449
|
+
* @deprecated use `icon` instead.
|
|
450
|
+
*/
|
|
211
451
|
applicationIcon: string;
|
|
452
|
+
autoplayPolicy: AutoplayPolicyOptions;
|
|
453
|
+
/**
|
|
454
|
+
* Automatically show the window when it is created.
|
|
455
|
+
*/
|
|
212
456
|
autoShow: boolean;
|
|
457
|
+
/**
|
|
458
|
+
* The window’s _backfill_ color as a hexadecimal value. Not to be confused with the content background color
|
|
459
|
+
* (`document.body.style.backgroundColor`),
|
|
460
|
+
* this color briefly fills a window’s (a) content area before its content is loaded as well as (b) newly exposed
|
|
461
|
+
* areas when growing a window. Setting
|
|
462
|
+
* this value to the anticipated content background color can help improve user experience.
|
|
463
|
+
* Default is white.
|
|
464
|
+
*/
|
|
213
465
|
backgroundColor: string;
|
|
466
|
+
/**
|
|
467
|
+
* Configures how new content (e,g, from `window.open` or a link) is opened.
|
|
468
|
+
*/
|
|
214
469
|
contentCreation: ContentCreationOptions;
|
|
470
|
+
/**
|
|
471
|
+
* Restrict navigation to URLs that match a whitelisted pattern.
|
|
472
|
+
* In the lack of a whitelist, navigation to URLs that match a blacklisted pattern would be prohibited.
|
|
473
|
+
* See [here](https://developer.chrome.com/extensions/match_patterns) for more details.
|
|
474
|
+
*/
|
|
215
475
|
contentNavigation: ContentNavigation;
|
|
476
|
+
/**
|
|
477
|
+
* Restrict redirects to URLs that match a whitelisted pattern.
|
|
478
|
+
* In the lack of a whitelist, redirects to URLs that match a blacklisted pattern would be prohibited.
|
|
479
|
+
* See [here](https://developer.chrome.com/extensions/match_patterns) for more details.
|
|
480
|
+
*/
|
|
216
481
|
contentRedirect: Partial<ContentRedirect>;
|
|
482
|
+
/**
|
|
483
|
+
* Custom headers for requests sent by the window.
|
|
484
|
+
*/
|
|
217
485
|
customRequestHeaders: CustomRequestHeaders[];
|
|
486
|
+
/**
|
|
487
|
+
* @defaultValue true
|
|
488
|
+
*
|
|
489
|
+
* Toggling off would keep the Window alive even if all its Views were closed.
|
|
490
|
+
* This is meant for advanced users and should be used with caution.
|
|
491
|
+
* Limitations - Once a Layout has been emptied out of all views it's not usable anymore, and certain API calls will fail.
|
|
492
|
+
* Use `layout.replace` to create a fresh Layout instance in case you want to populate it with Views again.
|
|
493
|
+
* ** note ** - This option is ignored in non-Platforms apps.
|
|
494
|
+
*/
|
|
218
495
|
closeOnLastViewRemoved: boolean;
|
|
496
|
+
/**
|
|
497
|
+
* Centers the window in the primary monitor. This option overrides `defaultLeft` and `defaultTop`. When `saveWindowState` is `true`,
|
|
498
|
+
* this value will be ignored for subsequent launches in favor of the cached value. **NOTE:** On macOS _defaultCenter_ is
|
|
499
|
+
* somewhat above center vertically.
|
|
500
|
+
*/
|
|
219
501
|
defaultCentered: boolean;
|
|
502
|
+
/**
|
|
503
|
+
* @defaultValue 500
|
|
504
|
+
*
|
|
505
|
+
* The default height of the window. When `saveWindowState` is `true`, this value will be ignored for subsequent launches
|
|
506
|
+
* in favor of the cached value.
|
|
507
|
+
*/
|
|
220
508
|
defaultHeight: number;
|
|
509
|
+
/**
|
|
510
|
+
* @defaultValue 100
|
|
511
|
+
*
|
|
512
|
+
* The default left position of the window. When `saveWindowState` is `true`, this value will be ignored for subsequent
|
|
513
|
+
* launches in favor of the cached value.
|
|
514
|
+
*/
|
|
221
515
|
defaultLeft: number;
|
|
516
|
+
/**
|
|
517
|
+
* @defaultValue 100
|
|
518
|
+
*
|
|
519
|
+
* The default top position of the window. When `saveWindowState` is `true`, this value will be ignored for subsequent
|
|
520
|
+
* launches in favor of the cached value.
|
|
521
|
+
*/
|
|
222
522
|
defaultTop: number;
|
|
523
|
+
/**
|
|
524
|
+
* @defaultValue 800
|
|
525
|
+
*
|
|
526
|
+
* The default width of the window. When `saveWindowState` is `true`, this value will be ignored for subsequent
|
|
527
|
+
* launches in favor of the cached value.
|
|
528
|
+
*/
|
|
223
529
|
defaultWidth: number;
|
|
224
530
|
height: number;
|
|
225
531
|
layout: any;
|
|
532
|
+
/**
|
|
533
|
+
* Parent identity of a modal window. It will create a modal child window when this option is set.
|
|
534
|
+
*/
|
|
226
535
|
modalParentIdentity: Identity;
|
|
536
|
+
/**
|
|
537
|
+
* The name of the window.
|
|
538
|
+
*/
|
|
227
539
|
name: string;
|
|
228
540
|
permissions: Partial<Permissions>;
|
|
541
|
+
/**
|
|
542
|
+
* Scripts that run before page load. When omitted, inherits from the parent application.
|
|
543
|
+
*/
|
|
229
544
|
preloadScripts: PreloadScript[];
|
|
545
|
+
/**
|
|
546
|
+
* String tag that attempts to group like-tagged renderers together. Will only be used if pages are on the same origin.
|
|
547
|
+
*/
|
|
230
548
|
processAffinity: string;
|
|
231
|
-
|
|
549
|
+
/**
|
|
550
|
+
* @defaultValue false
|
|
551
|
+
*
|
|
552
|
+
* Displays a shadow on frameless windows.
|
|
553
|
+
* `shadow` and `cornerRounding` are mutually exclusive.
|
|
554
|
+
* On Windows 7, Aero theme is required.
|
|
555
|
+
*/
|
|
232
556
|
shadow: boolean;
|
|
557
|
+
/**
|
|
558
|
+
* @defaultValue true
|
|
559
|
+
*
|
|
560
|
+
* Caches the location of the window.
|
|
561
|
+
* Note: this option is ignored in Platforms as it would cause inconsistent {@link Platform#applySnapshot applySnapshot} behavior.
|
|
562
|
+
*/
|
|
563
|
+
saveWindowState: boolean;
|
|
564
|
+
/**
|
|
565
|
+
* Ignores the cached state of the window.
|
|
566
|
+
* Defaults the opposite value of `saveWindowState` to maintain backwards compatibility.
|
|
567
|
+
*/
|
|
233
568
|
ignoreSavedWindowState: boolean;
|
|
569
|
+
/**
|
|
570
|
+
* @defaultValue false
|
|
571
|
+
*
|
|
572
|
+
* Makes this window a frameless window that can be created and resized to less than 41x36 px (width x height).
|
|
573
|
+
* _Note: Caveats of small windows are no Aero Snap and drag to/from maximize._
|
|
574
|
+
* _Windows 10: Requires `maximizable` to be false. Resizing with the mouse is only possible down to 38x39 px._
|
|
575
|
+
*/
|
|
234
576
|
smallWindow: boolean;
|
|
577
|
+
/**
|
|
578
|
+
* @defaultValue "normal"
|
|
579
|
+
*
|
|
580
|
+
* The visible state of the window on creation.
|
|
581
|
+
* One of:
|
|
582
|
+
* * `"maximized"`
|
|
583
|
+
* * `"minimized"`
|
|
584
|
+
* * `"normal"`
|
|
585
|
+
*/
|
|
235
586
|
state: WindowState;
|
|
587
|
+
/**
|
|
588
|
+
* @Deprecated - use `icon` instead.
|
|
589
|
+
*/
|
|
236
590
|
taskbarIcon: string;
|
|
591
|
+
/**
|
|
592
|
+
* Specify a taskbar group for the window.
|
|
593
|
+
* _If omitted, defaults to app's uuid (`fin.Application.getCurrentSync().identity.uuid`)._
|
|
594
|
+
*/
|
|
237
595
|
taskbarIconGroup: string;
|
|
596
|
+
/**
|
|
597
|
+
* @defaultValue "about:blank"
|
|
598
|
+
*
|
|
599
|
+
* The URL of the window
|
|
600
|
+
*/
|
|
238
601
|
url: string;
|
|
602
|
+
/**
|
|
603
|
+
* @defaultValue <application UUID>
|
|
604
|
+
*
|
|
605
|
+
* The `uuid` of the application, unique within the set of all `Application`s running in OpenFin Runtime.
|
|
606
|
+
* If omitted, defaults to the `uuid` of the application spawning the window.
|
|
607
|
+
* If given, must match the `uuid` of the application spawning the window.
|
|
608
|
+
* In other words, the application's `uuid` is the only acceptable value, but is the default, so there's
|
|
609
|
+
* really no need to provide it.
|
|
610
|
+
*/
|
|
239
611
|
uuid: string;
|
|
612
|
+
/**
|
|
613
|
+
* @defaultValue false
|
|
614
|
+
*
|
|
615
|
+
* When set to `true`, the window will not appear until the `window` object's `load` event fires.
|
|
616
|
+
* When set to `false`, the window will appear immediately without waiting for content to be loaded.
|
|
617
|
+
*/
|
|
240
618
|
waitForPageLoad: boolean;
|
|
241
619
|
width: number;
|
|
242
620
|
x: number;
|
|
243
621
|
y: number;
|
|
244
622
|
experimental?: any;
|
|
245
623
|
fdc3InteropApi?: string;
|
|
624
|
+
/**
|
|
625
|
+
* _Platform Windows Only_. Controls behavior for showing views when they are being resized by the user.
|
|
626
|
+
*/
|
|
246
627
|
viewVisibility?: ViewVisibilityOptions;
|
|
247
628
|
};
|
|
629
|
+
/**
|
|
630
|
+
* Window options that can be changed after window creation.
|
|
631
|
+
*/
|
|
248
632
|
export declare type MutableWindowOptions = {
|
|
633
|
+
/**
|
|
634
|
+
* Turns anything of matching RGB value transparent.
|
|
635
|
+
*
|
|
636
|
+
* Caveats:
|
|
637
|
+
* * runtime key --disable-gpu is required. Note: Unclear behavior on remote Desktop support
|
|
638
|
+
* * User cannot click-through transparent regions
|
|
639
|
+
* * Not supported on Mac
|
|
640
|
+
* * Windows Aero must be enabled
|
|
641
|
+
* * Won't make visual sense on Pixel-pushed environments such as Citrix
|
|
642
|
+
* * Not supported on rounded corner windows
|
|
643
|
+
*/
|
|
249
644
|
alphaMask: RGB;
|
|
645
|
+
/**
|
|
646
|
+
* @defaultValue false
|
|
647
|
+
*
|
|
648
|
+
* Always position the window at the top of the window stack.
|
|
649
|
+
*/
|
|
250
650
|
alwaysOnTop: boolean;
|
|
651
|
+
/**
|
|
652
|
+
* @defaultValue 0
|
|
653
|
+
*
|
|
654
|
+
* The aspect ratio of width to height to enforce for the window. If this value is equal to or less than zero,
|
|
655
|
+
* an aspect ratio will not be enforced.
|
|
656
|
+
*/
|
|
251
657
|
aspectRatio: number;
|
|
658
|
+
/**
|
|
659
|
+
* @deprecated Superseded by {@link contextMenuOptions}, which offers a larger feature-set and cleaner syntax.
|
|
660
|
+
*
|
|
661
|
+
* @defaultValue true
|
|
662
|
+
*
|
|
663
|
+
* Show the context menu when right-clicking on the window.
|
|
664
|
+
* Gives access to the devtools for the window.
|
|
665
|
+
*/
|
|
252
666
|
contextMenu: boolean;
|
|
667
|
+
/**
|
|
668
|
+
* @deprecated Superseded by {@link contextMenuOptions}, which offers a larger feature-set and cleaner syntax.
|
|
669
|
+
*
|
|
670
|
+
* Configure the context menu when right-clicking on a window.
|
|
671
|
+
*/
|
|
253
672
|
contextMenuSettings: ContextMenuSettings;
|
|
673
|
+
/**
|
|
674
|
+
* Configure the context menu when right-clicking on a window.
|
|
675
|
+
*/
|
|
254
676
|
contextMenuOptions: ContextMenuOptions;
|
|
677
|
+
/**
|
|
678
|
+
* Defines and applies rounded corners for a frameless window. **NOTE:** On macOS corner is not ellipse but circle rounded by the
|
|
679
|
+
* average of _height_ and _width_.
|
|
680
|
+
*/
|
|
255
681
|
cornerRounding: Partial<CornerRounding>;
|
|
682
|
+
/**
|
|
683
|
+
* A field that the user can use to attach serializable data that will be saved when {@link Platform#getSnapshot Platform.getSnapshot}
|
|
684
|
+
* is called. If a window in a Platform is trying to update or retrieve its own context, it can use the
|
|
685
|
+
* {@link Platform#setWindowContext Platform.setWindowContext} and {@link Platform#getWindowContext Platform.getWindowContext} calls.
|
|
686
|
+
* _When omitted, _inherits_ from the parent application._
|
|
687
|
+
* As opposed to customData, this is meant for frequent updates and sharing with other contexts. [Example]{@tutorial customContext}
|
|
688
|
+
*/
|
|
256
689
|
customContext: any;
|
|
690
|
+
/**
|
|
691
|
+
* A field that the user can attach serializable data to be ferried around with the window options.
|
|
692
|
+
* _When omitted, _inherits_ from the parent application._
|
|
693
|
+
*/
|
|
257
694
|
customData: any;
|
|
695
|
+
/**
|
|
696
|
+
* @defaultValue true
|
|
697
|
+
*
|
|
698
|
+
* Show the window's frame.
|
|
699
|
+
*/
|
|
258
700
|
frame: boolean;
|
|
701
|
+
/**
|
|
702
|
+
* @defaultValue false
|
|
703
|
+
*
|
|
704
|
+
* Hides the window instead of closing it when the close button is pressed.
|
|
705
|
+
*/
|
|
259
706
|
hideOnClose: boolean;
|
|
707
|
+
/**
|
|
708
|
+
* Defines the hotkeys that will be emitted as a `hotkey` event on the window. For usage example see [example]{@tutorial hotkeys}.
|
|
709
|
+
* Within Platform, OpenFin also implements a set of pre-defined actions called
|
|
710
|
+
* [keyboard commands]{@link https://developers.openfin.co/docs/platform-api#section-5-3-using-keyboard-commands}
|
|
711
|
+
* that can be assigned to a specific hotkey in the platform manifest.
|
|
712
|
+
*/
|
|
260
713
|
hotkeys: Hotkey[];
|
|
714
|
+
/**
|
|
715
|
+
* A URL for the icon to be shown in the window title bar and the taskbar.
|
|
716
|
+
* When omitted, inherits from the parent application._
|
|
717
|
+
* note: Window OS caches taskbar icons, therefore an icon change might only be visible after the cache is removed or the uuid is changed.
|
|
718
|
+
*/
|
|
261
719
|
icon: string;
|
|
720
|
+
/**
|
|
721
|
+
* @defaultValue true
|
|
722
|
+
*
|
|
723
|
+
* Include window in snapshots returned by Platform.getSnapshot(). Turning this off may be desirable when dealing with
|
|
724
|
+
* inherently temporary windows whose state shouldn't be preserved, such as modals, menus, or popups.
|
|
725
|
+
*/
|
|
262
726
|
includeInSnapshots: boolean;
|
|
727
|
+
/**
|
|
728
|
+
* @defaultValue -1
|
|
729
|
+
*
|
|
730
|
+
* The maximum height of a window. Will default to the OS defined value if set to -1.
|
|
731
|
+
*/
|
|
263
732
|
maxHeight: number;
|
|
733
|
+
/**
|
|
734
|
+
* @defaultValue true
|
|
735
|
+
*
|
|
736
|
+
* Allows the window to be maximized.
|
|
737
|
+
*/
|
|
264
738
|
maximizable: boolean;
|
|
739
|
+
/**
|
|
740
|
+
* @defaultValue -1
|
|
741
|
+
*
|
|
742
|
+
* The maximum width of a window. Will default to the OS defined value if set to -1.
|
|
743
|
+
*/
|
|
265
744
|
maxWidth: number;
|
|
745
|
+
/**
|
|
746
|
+
* @defaultValue 0
|
|
747
|
+
*
|
|
748
|
+
* The minimum height of the window.
|
|
749
|
+
*/
|
|
266
750
|
minHeight: number;
|
|
751
|
+
/**
|
|
752
|
+
* @defaultValue true
|
|
753
|
+
*
|
|
754
|
+
* Allows the window to be minimized.
|
|
755
|
+
*/
|
|
267
756
|
minimizable: boolean;
|
|
757
|
+
/**
|
|
758
|
+
* @defaultValue true
|
|
759
|
+
*
|
|
760
|
+
* The minimum width of the window.
|
|
761
|
+
*/
|
|
268
762
|
minWidth: number;
|
|
763
|
+
/**
|
|
764
|
+
* @defaultValue 1
|
|
765
|
+
*
|
|
766
|
+
* A flag that specifies how transparent the window will be.
|
|
767
|
+
* Changing opacity doesn't work on Windows 7 without Aero so setting this value will have no effect there.
|
|
768
|
+
* This value is clamped between `0.0` and `1.0`.
|
|
769
|
+
*/
|
|
269
770
|
opacity: number;
|
|
771
|
+
/**
|
|
772
|
+
* @defaultValue true
|
|
773
|
+
*
|
|
774
|
+
* A flag to allow the user to resize the window.
|
|
775
|
+
*/
|
|
270
776
|
resizable: boolean;
|
|
777
|
+
/**
|
|
778
|
+
* Defines a region in pixels that will respond to user mouse interaction for resizing a frameless window.
|
|
779
|
+
*/
|
|
271
780
|
resizeRegion: ResizeRegion;
|
|
781
|
+
/**
|
|
782
|
+
* @defaultValue false
|
|
783
|
+
*
|
|
784
|
+
* Platforms Only. If true, will show background images in the layout when the Views are hidden.
|
|
785
|
+
* This occurs when the window is resizing or a tab is being dragged within the layout.
|
|
786
|
+
*/
|
|
272
787
|
showBackgroundImages: boolean;
|
|
788
|
+
/**
|
|
789
|
+
* @defaultValue true
|
|
790
|
+
*
|
|
791
|
+
* Shows the window's icon in the taskbar.
|
|
792
|
+
*/
|
|
273
793
|
showTaskbarIcon: boolean;
|
|
274
794
|
interop: InteropConfig;
|
|
275
795
|
workspacePlatform: WorkspacePlatformOptions;
|
|
@@ -278,11 +798,25 @@ export declare type WorkspacePlatformOptions = {
|
|
|
278
798
|
/** Leaving this as any for now until we figure out what the shape should look like in Workspace */
|
|
279
799
|
[key: string]: any;
|
|
280
800
|
};
|
|
801
|
+
/**
|
|
802
|
+
* Object representing headers and their values, where the
|
|
803
|
+
* object key is the name of header and value key is the value of the header
|
|
804
|
+
*/
|
|
281
805
|
export declare type WebRequestHeader = {
|
|
282
806
|
[key: string]: string;
|
|
283
807
|
};
|
|
808
|
+
/**
|
|
809
|
+
* Custom headers for requests sent by the window.
|
|
810
|
+
*/
|
|
284
811
|
export declare type CustomRequestHeaders = {
|
|
812
|
+
/**
|
|
813
|
+
* The URL patterns for which the headers will be applied.
|
|
814
|
+
*/
|
|
285
815
|
urlPatterns: string[];
|
|
816
|
+
/**
|
|
817
|
+
* Headers for requests sent by window; {key: value} results
|
|
818
|
+
* in a header of `key=value`.
|
|
819
|
+
*/
|
|
286
820
|
headers: WebRequestHeader[];
|
|
287
821
|
};
|
|
288
822
|
export declare type WindowOptionDiff = {
|
|
@@ -291,47 +825,180 @@ export declare type WindowOptionDiff = {
|
|
|
291
825
|
newVal: WindowOptions[key];
|
|
292
826
|
};
|
|
293
827
|
};
|
|
828
|
+
/**
|
|
829
|
+
* Defines a region in pixels that will respond to user mouse interaction for resizing a frameless window.
|
|
830
|
+
*/
|
|
294
831
|
export declare type ResizeRegion = {
|
|
832
|
+
/**
|
|
833
|
+
* @defaultValue 7
|
|
834
|
+
*
|
|
835
|
+
* The size of the resize region in pixels.
|
|
836
|
+
*/
|
|
295
837
|
size?: number;
|
|
838
|
+
/**
|
|
839
|
+
* @defaultValue 9
|
|
840
|
+
*
|
|
841
|
+
* The size in pixels of an additional square resizable region located at the bottom right corner of a frameless window.
|
|
842
|
+
*/
|
|
296
843
|
bottomRightCorner?: number;
|
|
844
|
+
/**
|
|
845
|
+
* Enables resizing interaction for each side of the window.
|
|
846
|
+
*/
|
|
297
847
|
sides?: {
|
|
848
|
+
/**
|
|
849
|
+
* @defaultValue true
|
|
850
|
+
*
|
|
851
|
+
* Enables resizing from the top of the window.
|
|
852
|
+
*/
|
|
298
853
|
top?: boolean;
|
|
854
|
+
/**
|
|
855
|
+
* @defaultValue true
|
|
856
|
+
*
|
|
857
|
+
* Enables resizing from the bottom of the window.
|
|
858
|
+
*/
|
|
299
859
|
bottom?: boolean;
|
|
860
|
+
/**
|
|
861
|
+
* @defaultValue true
|
|
862
|
+
*
|
|
863
|
+
* Enables resizing from the left side of the window.
|
|
864
|
+
*/
|
|
300
865
|
left?: boolean;
|
|
866
|
+
/**
|
|
867
|
+
* @defaultValue true
|
|
868
|
+
*
|
|
869
|
+
* Enables resizing from the right side of the window.
|
|
870
|
+
*/
|
|
301
871
|
right?: boolean;
|
|
302
872
|
};
|
|
303
873
|
};
|
|
874
|
+
/**
|
|
875
|
+
* Enable keyboard shortcuts for devtools, zoom, reload, and reload ignoring cache.
|
|
876
|
+
*/
|
|
304
877
|
export declare type Accelerator = {
|
|
878
|
+
/**
|
|
879
|
+
* If `true`, enables the devtools keyboard shortcut:<br>
|
|
880
|
+
* `Ctrl` + `Shift` + `I` _(Toggles Devtools)_
|
|
881
|
+
*/
|
|
305
882
|
devtools: boolean;
|
|
883
|
+
/**
|
|
884
|
+
* If `true`, enables the reload keyboard shortcuts:<br>
|
|
885
|
+
* `Ctrl` + `R` _(Windows)_<br>
|
|
886
|
+
* `F5` _(Windows)_<br>
|
|
887
|
+
* `Command` + `R` _(Mac)_
|
|
888
|
+
*/
|
|
306
889
|
reload: boolean;
|
|
890
|
+
/**
|
|
891
|
+
* If `true`, enables the reload-from-source keyboard shortcuts:<br>
|
|
892
|
+
* `Ctrl` + `Shift` + `R` _(Windows)_<br>
|
|
893
|
+
* `Shift` + `F5` _(Windows)_<br>
|
|
894
|
+
* `Command` + `Shift` + `R` _(Mac)_
|
|
895
|
+
*/
|
|
307
896
|
reloadIgnoringCache: boolean;
|
|
897
|
+
/**
|
|
898
|
+
* NOTE: It is not recommended to set this value to true for Windows in Platforms as that may lead to unexpected visual shifts in layout.
|
|
899
|
+
* If `true`, enables the zoom keyboard shortcuts:<br>
|
|
900
|
+
* `Ctrl` + `+` _(Zoom In)_<br>
|
|
901
|
+
* `Ctrl` + `Shift` + `+` _(Zoom In)_<br>
|
|
902
|
+
* `Ctrl` + `NumPad+` _(Zoom In)_<br>
|
|
903
|
+
* `Ctrl` + `-` _(Zoom Out)_<br>
|
|
904
|
+
* `Ctrl` + `Shift` + `-` _(Zoom Out)_<br>
|
|
905
|
+
* `Ctrl` + `NumPad-` _(Zoom Out)_<br>
|
|
906
|
+
* `Ctrl` + `Scroll` _(Zoom In & Out)_<br>
|
|
907
|
+
* `Ctrl` + `0` _(Restore to 100%)_
|
|
908
|
+
*/
|
|
308
909
|
zoom: boolean;
|
|
309
910
|
};
|
|
911
|
+
/**
|
|
912
|
+
* Configurations for API injection.
|
|
913
|
+
*/
|
|
310
914
|
export declare type Api = {
|
|
915
|
+
/**
|
|
916
|
+
* Configure injection of OpenFin API into iframes based on domain
|
|
917
|
+
*/
|
|
311
918
|
iframe?: {
|
|
919
|
+
/**
|
|
920
|
+
* Inject OpenFin API into cross-origin iframes
|
|
921
|
+
*/
|
|
312
922
|
crossOriginInjection?: boolean;
|
|
923
|
+
/**
|
|
924
|
+
* Inject OpenFin API into same-origin iframes
|
|
925
|
+
*/
|
|
313
926
|
sameOriginInjection?: boolean;
|
|
314
927
|
enableDeprecatedSharedName?: boolean;
|
|
315
928
|
};
|
|
316
929
|
};
|
|
930
|
+
/**
|
|
931
|
+
* Restrict navigation to URLs that match a whitelisted pattern.
|
|
932
|
+
* In the lack of a whitelist, navigation to URLs that match a blacklisted pattern would be prohibited.
|
|
933
|
+
* See [here](https://developer.chrome.com/extensions/match_patterns) for more details.
|
|
934
|
+
*/
|
|
317
935
|
export declare type ContentNavigation = {
|
|
936
|
+
/**
|
|
937
|
+
* Allowed URLs for navigation.
|
|
938
|
+
*/
|
|
318
939
|
whitelist?: string[];
|
|
940
|
+
/**
|
|
941
|
+
* Forbidden URLs for navigation.
|
|
942
|
+
*/
|
|
319
943
|
blacklist?: string[];
|
|
320
944
|
};
|
|
945
|
+
/**
|
|
946
|
+
* Restrict redirects to URLs that match a whitelisted pattern.
|
|
947
|
+
* In the lack of a whitelist, redirects to URLs that match a blacklisted pattern would be prohibited.
|
|
948
|
+
* See [here](https://developer.chrome.com/extensions/match_patterns) for more details.
|
|
949
|
+
*/
|
|
321
950
|
export declare type ContentRedirect = {
|
|
951
|
+
/**
|
|
952
|
+
* Allowed URLs for redirects.
|
|
953
|
+
*/
|
|
322
954
|
whitelist: string[];
|
|
955
|
+
/**
|
|
956
|
+
* Forbidden URLs for redirects.
|
|
957
|
+
*/
|
|
323
958
|
blacklist: string[];
|
|
324
959
|
};
|
|
960
|
+
/**
|
|
961
|
+
* Defines and applies rounded corners for a frameless window. **NOTE:** On macOS corner is not ellipse but circle rounded by the
|
|
962
|
+
* average of _height_ and _width_.
|
|
963
|
+
*/
|
|
325
964
|
export declare type CornerRounding = {
|
|
965
|
+
/**
|
|
966
|
+
* @defaultValue 0
|
|
967
|
+
*
|
|
968
|
+
* The height in pixels.
|
|
969
|
+
*/
|
|
326
970
|
height: number;
|
|
971
|
+
/**
|
|
972
|
+
* @defaultValue 0
|
|
973
|
+
*
|
|
974
|
+
* The width in pixels.
|
|
975
|
+
*/
|
|
327
976
|
width: number;
|
|
328
977
|
};
|
|
978
|
+
/**
|
|
979
|
+
* Options for downloading a preload script.
|
|
980
|
+
*/
|
|
329
981
|
export declare type DownloadPreloadOption = {
|
|
982
|
+
/**
|
|
983
|
+
* URL from which to download the preload script.
|
|
984
|
+
*/
|
|
330
985
|
url: string;
|
|
331
986
|
};
|
|
987
|
+
/**
|
|
988
|
+
* Metadata returned from a preload script download request.
|
|
989
|
+
*/
|
|
332
990
|
export declare type DownloadPreloadInfo = {
|
|
991
|
+
/**
|
|
992
|
+
* Whether the download was successful.
|
|
993
|
+
*/
|
|
333
994
|
success: boolean;
|
|
995
|
+
/**
|
|
996
|
+
* URL from which the preload script should be downloaded.
|
|
997
|
+
*/
|
|
334
998
|
url?: string;
|
|
999
|
+
/**
|
|
1000
|
+
* Error during preload script download.
|
|
1001
|
+
*/
|
|
335
1002
|
error: string;
|
|
336
1003
|
};
|
|
337
1004
|
export declare type RGB = {
|
|
@@ -339,21 +1006,59 @@ export declare type RGB = {
|
|
|
339
1006
|
blue: number;
|
|
340
1007
|
green: number;
|
|
341
1008
|
};
|
|
1009
|
+
/**
|
|
1010
|
+
* @deprecated Superseded by {@link contextMenuOptions}, which offers a larger feature-set and cleaner syntax.
|
|
1011
|
+
* Configure the context menu when right-clicking on a window.
|
|
1012
|
+
*/
|
|
342
1013
|
export declare type ContextMenuSettings = {
|
|
1014
|
+
/**
|
|
1015
|
+
* Should the context menu display on right click.
|
|
1016
|
+
*/
|
|
343
1017
|
enable: boolean;
|
|
1018
|
+
/**
|
|
1019
|
+
* Should the context menu contain a button for opening devtools.
|
|
1020
|
+
*/
|
|
344
1021
|
devtools?: boolean;
|
|
1022
|
+
/**
|
|
1023
|
+
* Should the context menu contain a button for reloading the page.
|
|
1024
|
+
*/
|
|
345
1025
|
reload?: boolean;
|
|
346
1026
|
};
|
|
1027
|
+
/**
|
|
1028
|
+
* A hotkey binding.
|
|
1029
|
+
*/
|
|
347
1030
|
export declare type Hotkey = {
|
|
1031
|
+
/**
|
|
1032
|
+
* The key combination of the hotkey, i.e. "Ctrl+T".
|
|
1033
|
+
*/
|
|
348
1034
|
keys: string;
|
|
1035
|
+
/**
|
|
1036
|
+
* @defaultValue false
|
|
1037
|
+
*
|
|
1038
|
+
* Prevent default key handling before emitting the event.
|
|
1039
|
+
*/
|
|
349
1040
|
preventDefault?: boolean;
|
|
350
1041
|
};
|
|
351
1042
|
export declare type ShortcutOverride = Hotkey & {
|
|
352
1043
|
command: string;
|
|
353
1044
|
};
|
|
1045
|
+
/**
|
|
1046
|
+
* A script that is run before page load.
|
|
1047
|
+
*/
|
|
354
1048
|
export declare type PreloadScript = {
|
|
1049
|
+
/**
|
|
1050
|
+
* @defaultValue false
|
|
1051
|
+
*
|
|
1052
|
+
* Fail to load the window if this preload script fails
|
|
1053
|
+
*/
|
|
355
1054
|
mandatory?: boolean;
|
|
1055
|
+
/**
|
|
1056
|
+
* Preload script execution state.
|
|
1057
|
+
*/
|
|
356
1058
|
state?: 'load-started' | 'load-failed' | 'load-succeeded' | 'failed' | 'succeeded';
|
|
1059
|
+
/**
|
|
1060
|
+
* The URL from which the script was loaded.
|
|
1061
|
+
*/
|
|
357
1062
|
url: string;
|
|
358
1063
|
};
|
|
359
1064
|
export declare type AutoResizeOptions = {
|
|
@@ -379,7 +1084,13 @@ export declare type AutoResizeOptions = {
|
|
|
379
1084
|
vertical?: boolean;
|
|
380
1085
|
};
|
|
381
1086
|
export declare type InteropConfig = {
|
|
1087
|
+
/**
|
|
1088
|
+
* Context Group for the client. (green, yellow, red, etc.).
|
|
1089
|
+
*/
|
|
382
1090
|
currentContextGroup?: string | null;
|
|
1091
|
+
/**
|
|
1092
|
+
* When provided, automatically connects the client to the specified provider uuid.
|
|
1093
|
+
*/
|
|
383
1094
|
providerId?: string;
|
|
384
1095
|
};
|
|
385
1096
|
export declare type ViewInfo = {
|
|
@@ -390,7 +1101,16 @@ export declare type ViewInfo = {
|
|
|
390
1101
|
url: string;
|
|
391
1102
|
favicons: string[];
|
|
392
1103
|
};
|
|
1104
|
+
/**
|
|
1105
|
+
* View options that can be updated after creation.
|
|
1106
|
+
*/
|
|
393
1107
|
export declare type UpdatableViewOptions = Partial<MutableViewOptions>;
|
|
1108
|
+
/**
|
|
1109
|
+
* The options object required by {@link View.create View.create}.
|
|
1110
|
+
*
|
|
1111
|
+
* Note that `name` and `target` are the only required properties — albeit the `url` property is usually provided as well
|
|
1112
|
+
* (defaults to `"about:blank"` when omitted).
|
|
1113
|
+
*/
|
|
394
1114
|
export declare type ViewCreationOptions = Partial<ViewOptions> & {
|
|
395
1115
|
name: string;
|
|
396
1116
|
url: string;
|
|
@@ -398,37 +1118,144 @@ export declare type ViewCreationOptions = Partial<ViewOptions> & {
|
|
|
398
1118
|
};
|
|
399
1119
|
export declare type MutableViewOptions = {
|
|
400
1120
|
autoResize: AutoResizeOptions;
|
|
1121
|
+
/**
|
|
1122
|
+
* @deprecated Superseded by {@link contextMenuOptions}, which offers a larger feature-set and cleaner syntax.
|
|
1123
|
+
*
|
|
1124
|
+
* @defaultValue true
|
|
1125
|
+
*
|
|
1126
|
+
* Show the context menu when right-clicking on the view.
|
|
1127
|
+
* Gives access to the devtools for the view.
|
|
1128
|
+
*/
|
|
401
1129
|
contextMenu: boolean;
|
|
1130
|
+
/**
|
|
1131
|
+
* @deprecated Superseded by {@link contextMenuOptions}, which offers a larger feature-set and cleaner syntax.
|
|
1132
|
+
*
|
|
1133
|
+
* Configure the context menu when right-clicking on a window.
|
|
1134
|
+
*/
|
|
402
1135
|
contextMenuSettings: ContextMenuSettings;
|
|
1136
|
+
/**
|
|
1137
|
+
* Configure the context menu when right-clicking on a window.
|
|
1138
|
+
*/
|
|
403
1139
|
contextMenuOptions: ContextMenuOptions;
|
|
1140
|
+
/**
|
|
1141
|
+
* The view’s _backfill_ color as a hexadecimal value. Not to be confused with the content background color
|
|
1142
|
+
* (`document.body.style.backgroundColor`),
|
|
1143
|
+
* this color briefly fills a view’s (a) content area before its content is loaded as well as (b) newly exposed
|
|
1144
|
+
* areas when growing a view. Setting
|
|
1145
|
+
* this value to the anticipated content background color can help improve user experience.
|
|
1146
|
+
* Default is white.
|
|
1147
|
+
*/
|
|
404
1148
|
backgroundColor: string;
|
|
1149
|
+
/**
|
|
1150
|
+
* A field that the user can attach serializable data to be ferried around with the window options.
|
|
1151
|
+
* _When omitted, _inherits_ from the parent application._
|
|
1152
|
+
*/
|
|
405
1153
|
customData: any;
|
|
1154
|
+
/**
|
|
1155
|
+
* A field that the user can use to attach serializable data that will be saved when {@link Platform#getSnapshot Platform.getSnapshot}
|
|
1156
|
+
* is called. If a window in a Platform is trying to update or retrieve its own context, it can use the
|
|
1157
|
+
* {@link Platform#setWindowContext Platform.setWindowContext} and {@link Platform#getWindowContext Platform.getWindowContext} calls.
|
|
1158
|
+
* _When omitted, _inherits_ from the parent application._
|
|
1159
|
+
* As opposed to customData, this is meant for frequent updates and sharing with other contexts. [Example]{@tutorial customContext}
|
|
1160
|
+
*/
|
|
406
1161
|
customContext: any;
|
|
1162
|
+
/**
|
|
1163
|
+
* Configurations for API injection.
|
|
1164
|
+
*/
|
|
407
1165
|
api: Api;
|
|
1166
|
+
/**
|
|
1167
|
+
* Restrict navigation to URLs that match a whitelisted pattern.
|
|
1168
|
+
* In the lack of a whitelist, navigation to URLs that match a blacklisted pattern would be prohibited.
|
|
1169
|
+
* See [here](https://developer.chrome.com/extensions/match_patterns) for more details.
|
|
1170
|
+
*/
|
|
408
1171
|
contentNavigation: ContentNavigation;
|
|
1172
|
+
/**
|
|
1173
|
+
* @defaultValue false
|
|
1174
|
+
*
|
|
1175
|
+
* Platforms Only. If true, will hide and detach the View from the window for later use instead of closing,
|
|
1176
|
+
* allowing the state of the View to be saved and the View to be immediately shown in a new Layout.
|
|
1177
|
+
*/
|
|
409
1178
|
detachOnClose: boolean;
|
|
1179
|
+
/**
|
|
1180
|
+
* @defaultValue true
|
|
1181
|
+
*
|
|
1182
|
+
* **Platforms Only.** If false, the view will be persistent and can't be closed through
|
|
1183
|
+
* either UI or `Platform.closeView`. Note that the view will still be closed if the host window is closed or
|
|
1184
|
+
* if the view isn't part of the new layout when running `Layout.replace`.
|
|
1185
|
+
*/
|
|
410
1186
|
isClosable: boolean;
|
|
1187
|
+
/**
|
|
1188
|
+
* @defaultValue false
|
|
1189
|
+
*
|
|
1190
|
+
* @property {boolean} [preventDragOut=false] **Platforms Only.** If true, the tab of the view can't be dragged out of its host window.
|
|
1191
|
+
*/
|
|
411
1192
|
preventDragOut: boolean;
|
|
412
1193
|
interop?: InteropConfig;
|
|
413
1194
|
};
|
|
1195
|
+
/**
|
|
1196
|
+
* User-facing options for a view.
|
|
1197
|
+
*/
|
|
414
1198
|
export declare type ViewOptions = ConstViewOptions & MutableViewOptions;
|
|
1199
|
+
/**
|
|
1200
|
+
* View options that cannot be updated after creation.
|
|
1201
|
+
*/
|
|
415
1202
|
export declare type ConstViewOptions = {
|
|
1203
|
+
/**
|
|
1204
|
+
* The name of the view.
|
|
1205
|
+
*/
|
|
416
1206
|
name: string;
|
|
1207
|
+
/**
|
|
1208
|
+
* @defaultValue "about:blank"
|
|
1209
|
+
*
|
|
1210
|
+
* The URL of the window
|
|
1211
|
+
*/
|
|
417
1212
|
url: string;
|
|
1213
|
+
/**
|
|
1214
|
+
* The identity of the window this view should be attached to.
|
|
1215
|
+
*/
|
|
418
1216
|
target: Identity;
|
|
1217
|
+
/**
|
|
1218
|
+
* Configures how new content (e,g, from `window.open` or a link) is opened.
|
|
1219
|
+
*/
|
|
419
1220
|
contentCreation: ContentCreationOptions;
|
|
1221
|
+
/**
|
|
1222
|
+
* Custom headers for requests sent by the view.
|
|
1223
|
+
*/
|
|
420
1224
|
customRequestHeaders: CustomRequestHeaders[];
|
|
1225
|
+
/**
|
|
1226
|
+
* Initial bounds given relative to the window.
|
|
1227
|
+
*/
|
|
421
1228
|
bounds: Bounds;
|
|
422
1229
|
permissions: Partial<Permissions>;
|
|
1230
|
+
/**
|
|
1231
|
+
* String tag that attempts to group like-tagged renderers together. Will only be used if pages are on the same origin.
|
|
1232
|
+
*/
|
|
423
1233
|
processAffinity: string;
|
|
1234
|
+
/**
|
|
1235
|
+
* Defines the hotkeys that will be emitted as a `hotkey` event on the view. For usage example see [example]{@tutorial hotkeys}.
|
|
1236
|
+
* Within Platform, OpenFin also implements a set of pre-defined actions called
|
|
1237
|
+
* [keyboard commands]{@link https://developers.openfin.co/docs/platform-api#section-5-3-using-keyboard-commands}
|
|
1238
|
+
* that can be assigned to a specific hotkey in the platform manifest.
|
|
1239
|
+
*/
|
|
424
1240
|
hotkeys: Hotkey[];
|
|
1241
|
+
/**
|
|
1242
|
+
* Scripts that run before page load. When omitted, inherits from the parent application.
|
|
1243
|
+
*/
|
|
425
1244
|
preloadScripts: PreloadScript[];
|
|
1245
|
+
/**
|
|
1246
|
+
* **Platforms Only.** Url to a manifest that contains View Options. Properties other than manifestUrl can still be used
|
|
1247
|
+
* but the properties in the manifest will take precedence if there is any collision.
|
|
1248
|
+
*/
|
|
426
1249
|
manifestUrl: string;
|
|
427
1250
|
zoomLevel: number;
|
|
428
1251
|
experimental: any;
|
|
429
1252
|
fdc3InteropApi?: string;
|
|
430
1253
|
enableBeforeUnload: boolean;
|
|
1254
|
+
/**
|
|
1255
|
+
* Enable keyboard shortcuts for devtools, zoom, reload, and reload ignoring cache.
|
|
1256
|
+
*/
|
|
431
1257
|
accelerator?: Partial<Accelerator>;
|
|
1258
|
+
autoplayPolicy: AutoplayPolicyOptions;
|
|
432
1259
|
};
|
|
433
1260
|
export declare type ViewState = ViewCreationOptions & {
|
|
434
1261
|
backgroundThrottling: boolean;
|
|
@@ -457,20 +1284,60 @@ declare type CertificatePrincipal = {
|
|
|
457
1284
|
state: string;
|
|
458
1285
|
};
|
|
459
1286
|
export declare type HostContextChangedPayload = {
|
|
1287
|
+
/**
|
|
1288
|
+
* The new context object
|
|
1289
|
+
*/
|
|
460
1290
|
context: any;
|
|
1291
|
+
/**
|
|
1292
|
+
* The reason for the update.
|
|
1293
|
+
*/
|
|
461
1294
|
reason: HostContextChangedReasons;
|
|
462
1295
|
};
|
|
463
1296
|
export declare type ApplySnapshotOptions = {
|
|
1297
|
+
/**
|
|
1298
|
+
* @defaultValue false
|
|
1299
|
+
*
|
|
1300
|
+
* When true, applySnapshot will close existing windows,
|
|
1301
|
+
* replacing current Platform state with the given snapshot.
|
|
1302
|
+
*/
|
|
464
1303
|
closeExistingWindows?: boolean;
|
|
1304
|
+
/**
|
|
1305
|
+
* @defaultValue false
|
|
1306
|
+
*
|
|
1307
|
+
* When true, applySnapshot will close existing includeInSnapshots: true windows,
|
|
1308
|
+
* replacing current Platform state with the given snapshot.
|
|
1309
|
+
*/
|
|
465
1310
|
closeSnapshotWindows?: boolean;
|
|
1311
|
+
/**
|
|
1312
|
+
* @defaultValue false
|
|
1313
|
+
*
|
|
1314
|
+
* When true, applySnapshot will not check whether any windows in a
|
|
1315
|
+
* snapshot are off-screen. By default, such windows will be repositioned to be on-screen,
|
|
1316
|
+
* as defined by {@link PlatformProvider#positionOutOfBoundsWindows PlatformProvider.positionOutOfBoundsWindows}.
|
|
1317
|
+
*/
|
|
466
1318
|
skipOutOfBoundsCheck?: boolean;
|
|
467
1319
|
};
|
|
1320
|
+
/**
|
|
1321
|
+
* Payload sent to Platform Provider when {@link Platform#applySnapshot Platform.applySnapshot} is called.
|
|
1322
|
+
*/
|
|
468
1323
|
export declare type ApplySnapshotPayload = {
|
|
1324
|
+
/**
|
|
1325
|
+
* TThe snapshot to be applied.
|
|
1326
|
+
*/
|
|
469
1327
|
snapshot: Snapshot;
|
|
1328
|
+
/**
|
|
1329
|
+
* Options to customize snapshot application.
|
|
1330
|
+
*/
|
|
470
1331
|
options?: ApplySnapshotOptions;
|
|
471
1332
|
};
|
|
472
1333
|
export declare type CreateViewPayload = {
|
|
1334
|
+
/**
|
|
1335
|
+
* Options for the view to be added.
|
|
1336
|
+
*/
|
|
473
1337
|
opts: Partial<ViewOptions>;
|
|
1338
|
+
/**
|
|
1339
|
+
* Window the view will be added to. If no target is provided, a new window will be created.
|
|
1340
|
+
*/
|
|
474
1341
|
target: Identity;
|
|
475
1342
|
targetView?: Identity;
|
|
476
1343
|
};
|
|
@@ -482,28 +1349,58 @@ export declare type ReplaceViewPayload = {
|
|
|
482
1349
|
target: Identity;
|
|
483
1350
|
};
|
|
484
1351
|
export declare type CloseViewPayload = {
|
|
1352
|
+
/**
|
|
1353
|
+
*View to be closed.
|
|
1354
|
+
*/
|
|
485
1355
|
view: Identity;
|
|
486
1356
|
};
|
|
487
1357
|
export declare type FetchManifestPayload = {
|
|
1358
|
+
/**
|
|
1359
|
+
* The URL of the manifest to fetch.
|
|
1360
|
+
*/
|
|
488
1361
|
manifestUrl: string;
|
|
489
1362
|
};
|
|
490
1363
|
export declare type ReplaceLayoutOpts = {
|
|
1364
|
+
/**
|
|
1365
|
+
* Layout config to be applied.
|
|
1366
|
+
*/
|
|
491
1367
|
layout: LayoutOptions;
|
|
492
1368
|
};
|
|
493
1369
|
export declare type ReplaceLayoutPayload = {
|
|
1370
|
+
/**
|
|
1371
|
+
* Object containing the layout to be applied.
|
|
1372
|
+
*/
|
|
494
1373
|
opts: ReplaceLayoutOpts;
|
|
1374
|
+
/**
|
|
1375
|
+
* Identity of the window whose layout will be replace.
|
|
1376
|
+
*/
|
|
495
1377
|
target: Identity;
|
|
496
1378
|
};
|
|
497
1379
|
export declare type SetWindowContextPayload = {
|
|
1380
|
+
/**
|
|
1381
|
+
* The requested context update.
|
|
1382
|
+
*/
|
|
498
1383
|
context: any;
|
|
1384
|
+
/**
|
|
1385
|
+
* Entity type of the target of the context update ('view' or 'window').
|
|
1386
|
+
*/
|
|
499
1387
|
entityType: EntityType;
|
|
1388
|
+
/**
|
|
1389
|
+
* Identity of the entity targeted by the call to {@link Platform#setWindowContext Platform.setWindowContext}.
|
|
1390
|
+
*/
|
|
500
1391
|
target: Identity;
|
|
501
1392
|
};
|
|
502
1393
|
export declare type LaunchIntoPlatformPayload = {
|
|
503
1394
|
manifest: any;
|
|
504
1395
|
};
|
|
505
1396
|
export declare type GetWindowContextPayload = {
|
|
1397
|
+
/**
|
|
1398
|
+
* Entity type of the target of the context update ('view' or 'window').
|
|
1399
|
+
*/
|
|
506
1400
|
entityType: EntityType;
|
|
1401
|
+
/**
|
|
1402
|
+
* Identity of the entity targeted by the call to {@link Platform#setWindowContext Platform.setWindowContext}.
|
|
1403
|
+
*/
|
|
507
1404
|
target: Identity;
|
|
508
1405
|
};
|
|
509
1406
|
export declare type ApplicationPermissions = {
|
|
@@ -516,14 +1413,15 @@ export declare type LaunchExternalProcessRule = {
|
|
|
516
1413
|
export declare type SystemPermissions = {
|
|
517
1414
|
getAllExternalWindows: boolean;
|
|
518
1415
|
launchExternalProcess: boolean | {
|
|
519
|
-
|
|
1416
|
+
enabled: boolean;
|
|
1417
|
+
assets?: {
|
|
520
1418
|
enabled: boolean;
|
|
521
1419
|
srcRules?: LaunchExternalProcessRule[];
|
|
522
1420
|
};
|
|
523
|
-
downloads
|
|
1421
|
+
downloads?: {
|
|
524
1422
|
enabled: boolean;
|
|
525
1423
|
};
|
|
526
|
-
executables
|
|
1424
|
+
executables?: {
|
|
527
1425
|
enabled: boolean;
|
|
528
1426
|
pathRules?: LaunchExternalProcessRule[];
|
|
529
1427
|
};
|
|
@@ -548,18 +1446,48 @@ export declare type PlatformWindowCreationOptions = Partial<WindowCreationOption
|
|
|
548
1446
|
updateStateIfExists?: boolean;
|
|
549
1447
|
reason?: WindowCreationReason;
|
|
550
1448
|
};
|
|
1449
|
+
/**
|
|
1450
|
+
* Window options apply to all platform windows.
|
|
1451
|
+
* Any {@link Window~options Window option} is also a valid Default Window option
|
|
1452
|
+
* used by default in any window that is created in the current platform's scope.
|
|
1453
|
+
* Individual window options will override these defaults.
|
|
1454
|
+
*/
|
|
551
1455
|
export declare type PlatformWindowOptions = WindowCreationOptions & {
|
|
1456
|
+
/**
|
|
1457
|
+
* Specify a path of a custom CSS file to be injected to all of the platform's windows.
|
|
1458
|
+
* _note_: this option is only applied to windows that use the Default OpenFin Window.
|
|
1459
|
+
* Windows with a specified url (Custom Windows) will not be affected by this option.
|
|
1460
|
+
*/
|
|
552
1461
|
stylesheetUrl: string;
|
|
553
1462
|
};
|
|
554
1463
|
export declare type PlatformViewCreationOptions = Partial<ViewOptions> & {
|
|
555
1464
|
url: string;
|
|
556
1465
|
target: Identity;
|
|
557
1466
|
};
|
|
1467
|
+
/**
|
|
1468
|
+
* Strategy to assign views to process affinity by domain.
|
|
1469
|
+
*
|
|
1470
|
+
* `same`: views in the same domain will have the same process affinity.
|
|
1471
|
+
* `different`: views in the same domain will have different process affinities.
|
|
1472
|
+
*/
|
|
558
1473
|
export declare type ProcessAffinityStrategy = 'same' | 'different';
|
|
1474
|
+
/**
|
|
1475
|
+
* The options object required by {@link Platform#start Platform.start}
|
|
1476
|
+
* Any {@link ApplicationOptions Application option} is also a valid platform option
|
|
1477
|
+
*/
|
|
559
1478
|
export declare type PlatformOptions = ApplicationCreationOptions & {
|
|
1479
|
+
/**
|
|
1480
|
+
* Default window options apply to all platform windows.
|
|
1481
|
+
*/
|
|
560
1482
|
defaultWindowOptions?: Partial<PlatformWindowOptions>;
|
|
1483
|
+
/**
|
|
1484
|
+
* Default view options apply to all platform views.
|
|
1485
|
+
*/
|
|
561
1486
|
defaultViewOptions?: Partial<PlatformViewCreationOptions>;
|
|
562
1487
|
disableDefaultCommands?: boolean;
|
|
1488
|
+
/**
|
|
1489
|
+
* Strategy to assign views to process affinity by domain.
|
|
1490
|
+
*/
|
|
563
1491
|
viewProcessAffinityStrategy?: ProcessAffinityStrategy;
|
|
564
1492
|
providerUrl?: string;
|
|
565
1493
|
permissions?: Partial<Permissions>;
|
|
@@ -620,9 +1548,20 @@ export declare type Manifest = {
|
|
|
620
1548
|
};
|
|
621
1549
|
interopBrokerConfiguration: InteropBrokerOptions;
|
|
622
1550
|
};
|
|
623
|
-
export declare type LayoutContent =
|
|
1551
|
+
export declare type LayoutContent = Array<LayoutItemConfig | LayoutRow | LayoutColumn | LayoutComponent>;
|
|
1552
|
+
/**
|
|
1553
|
+
* Represents the arrangement of Views within a Platform window's Layout. We do not recommend trying
|
|
1554
|
+
* to build Layouts or LayoutItems by hand and instead use calls such as {@link Platform#getSnapshot getSnapshot} or our
|
|
1555
|
+
* {@link https://openfin.github.io/golden-prototype/config-gen Layout Config Generation Tool }..
|
|
1556
|
+
*/
|
|
624
1557
|
export declare type LayoutItemConfig = {
|
|
1558
|
+
/**
|
|
1559
|
+
* The type of the item. Possible values are 'row', 'column', 'stack', and 'component'.
|
|
1560
|
+
*/
|
|
625
1561
|
type: string;
|
|
1562
|
+
/**
|
|
1563
|
+
* Array of configurations for items that will be created as children of this item.
|
|
1564
|
+
*/
|
|
626
1565
|
content?: LayoutContent;
|
|
627
1566
|
width?: number;
|
|
628
1567
|
height?: number;
|
|
@@ -641,16 +1580,72 @@ export interface LayoutComponent extends LayoutItemConfig {
|
|
|
641
1580
|
componentState?: Partial<ViewCreationOptions>;
|
|
642
1581
|
}
|
|
643
1582
|
export declare type LayoutOptions = {
|
|
1583
|
+
/**
|
|
1584
|
+
* Represents a potential ways to customize behavior of your Layout
|
|
1585
|
+
*/
|
|
644
1586
|
settings?: {
|
|
1587
|
+
/**
|
|
1588
|
+
* @defaultValue false
|
|
1589
|
+
*
|
|
1590
|
+
* Whether the popout button will only act on the entire stack,
|
|
1591
|
+
* as opposed to only the active tab.
|
|
1592
|
+
*/
|
|
645
1593
|
popoutWholeStack?: boolean;
|
|
1594
|
+
/**
|
|
1595
|
+
* @defaultValue false
|
|
1596
|
+
*
|
|
1597
|
+
* Limits the area to which tabs can be dragged.
|
|
1598
|
+
* If true, stack headers are the only areas where tabs can be dropped.
|
|
1599
|
+
*/
|
|
646
1600
|
constrainDragToContainer?: boolean;
|
|
1601
|
+
/**
|
|
1602
|
+
* @defaultValue false
|
|
1603
|
+
*
|
|
1604
|
+
* Whether to show the popout button on stack header.
|
|
1605
|
+
* The button will create a new window with current tab as its content.
|
|
1606
|
+
* In case `popoutWholeStack` is set to true, all tabs in the stack will be in the new window.
|
|
1607
|
+
*/
|
|
647
1608
|
showPopoutIcon?: boolean;
|
|
1609
|
+
/**
|
|
1610
|
+
* @defaultValue false
|
|
1611
|
+
*
|
|
1612
|
+
* Whether to show the maximize button on stack header.
|
|
1613
|
+
* The button will maximize the current tab to fill the entire window.
|
|
1614
|
+
*/
|
|
648
1615
|
showMaximiseIcon?: boolean;
|
|
1616
|
+
/**
|
|
1617
|
+
* @defaultValue false
|
|
1618
|
+
*
|
|
1619
|
+
* Whether to show the close button on stack header
|
|
1620
|
+
* (not to be confused with close button on every tab).
|
|
1621
|
+
*/
|
|
649
1622
|
showCloseIcon?: boolean;
|
|
650
1623
|
constrainDragToHeaders?: boolean;
|
|
1624
|
+
/**
|
|
1625
|
+
* @defaultValue true
|
|
1626
|
+
*
|
|
1627
|
+
* Turns tab headers on or off.
|
|
1628
|
+
* If false, the layout will be displayed with splitters only.
|
|
1629
|
+
*/
|
|
651
1630
|
hasHeaders?: boolean;
|
|
1631
|
+
/**
|
|
1632
|
+
* @defaultValue true
|
|
1633
|
+
*
|
|
1634
|
+
* If true, the user can re-arrange the layout by
|
|
1635
|
+
* dragging items by their tabs to the desired location.
|
|
1636
|
+
*/
|
|
652
1637
|
reorderEnabled?: boolean;
|
|
1638
|
+
/**
|
|
1639
|
+
* @defaultValue false
|
|
1640
|
+
*
|
|
1641
|
+
* If true, tabs can't be dragged out of the window.
|
|
1642
|
+
*/
|
|
653
1643
|
preventDragOut?: boolean;
|
|
1644
|
+
/**
|
|
1645
|
+
* @defaultValue=false
|
|
1646
|
+
*
|
|
1647
|
+
* If true, tabs can't be dragged into the window.
|
|
1648
|
+
*/
|
|
654
1649
|
preventDragIn?: boolean;
|
|
655
1650
|
};
|
|
656
1651
|
content?: LayoutContent;
|
|
@@ -661,179 +1656,69 @@ export declare type LayoutOptions = {
|
|
|
661
1656
|
headerHeight?: number;
|
|
662
1657
|
};
|
|
663
1658
|
};
|
|
664
|
-
export declare type OverrideCallback<T extends any = PlatformProvider, U extends T = T> = (arg: Constructor<T
|
|
665
|
-
export declare type Constructor<T = {}> = new (
|
|
1659
|
+
export declare type OverrideCallback<T extends any = PlatformProvider, U extends T = T> = (arg: Constructor<T>) => U | Promise<U>;
|
|
1660
|
+
export declare type Constructor<T = {}> = new () => T;
|
|
666
1661
|
export declare type HostContextChangedReasons = 'updated' | 'reparented';
|
|
667
1662
|
export declare type WindowCreationReason = 'tearout' | 'create-view-without-target' | 'api-call' | 'app-creation' | 'restore' | 'apply-snapshot';
|
|
668
|
-
export declare type PlatformProvider = {
|
|
669
|
-
/**
|
|
670
|
-
* Handles requests to create a window in the current platform.
|
|
671
|
-
* @param { WindowOption } payload Window options for the window to be created.
|
|
672
|
-
* @param { Identity } [identity] If {@link Platform#createWindow Platform.createWindow} was called, the identity of the caller will be here.
|
|
673
|
-
* If `createWindow` was called as part of applying a snapshot or creating a view without a target window, `identity` will be undefined.
|
|
674
|
-
*/
|
|
675
|
-
createWindow(options: PlatformWindowCreationOptions, identity?: Identity): Promise<_Window>;
|
|
676
|
-
/**
|
|
677
|
-
* Gets the current state of windows and their views and returns a snapshot object containing that info.
|
|
678
|
-
* @param { undefined } payload Undefined unless you've defined a custom `getSnapshot` protocol.
|
|
679
|
-
* @param { Identity } identity Identity of the entity that called {@link Platform#getSnapshot Platform.getSnapshot}.
|
|
680
|
-
* @return { Promise<Snapshot> } Snapshot of current platform state.
|
|
681
|
-
*/
|
|
682
|
-
getSnapshot(payload: undefined, identity: Identity): Promise<Snapshot>;
|
|
683
|
-
/**
|
|
684
|
-
* Gets the current state of a single view and returns an object with the options needed to restore that view as part of a snapshot.
|
|
685
|
-
* @param { Identity } payload Identity of the view.
|
|
686
|
-
* @return { Promise<ViewState> }
|
|
687
|
-
*/
|
|
688
|
-
getViewSnapshot(payload: {
|
|
689
|
-
viewIdentity: Identity;
|
|
690
|
-
}): Promise<ViewState>;
|
|
691
|
-
/**
|
|
692
|
-
* Called when a snapshot is being applied and some windows in that snapshot would be fully or partially off-screen.
|
|
693
|
-
* Returns an array of windows with modified positions, such that any off-screen windows are positioned in the top left
|
|
694
|
-
* corner of the main monitor.
|
|
695
|
-
* @param { Snapshot } snapshot The snapshot to be applied.
|
|
696
|
-
* @param { WindowOptions[] } outOfBoundsWindows An array of WindowOptions for any windows that would be off-screen.
|
|
697
|
-
* @return { Promise<WindowOptions[]> } An array of WindowOptions with their position modified to fit on screen.
|
|
698
|
-
*/
|
|
699
|
-
positionOutOfBoundsWindows(snapshot: Snapshot, outOfBoundsWindows: WindowCreationOptions[]): Promise<WindowCreationOptions[]>;
|
|
700
|
-
/**
|
|
701
|
-
* Handles requests to apply a snapshot to the current Platform.
|
|
702
|
-
* @param { ApplySnapshotPayload } payload Payload containing the snapshot to be applied, as well as any options.
|
|
703
|
-
* @param { Identity } [identity] Identity of the entity that called {@link Platform#applySnapshot Platform.applySnapshot}.
|
|
704
|
-
* Undefined if called internally (e.g. when opening the initial snapshot).
|
|
705
|
-
* @return { Promise<void> }
|
|
706
|
-
*/
|
|
707
|
-
applySnapshot(payload: ApplySnapshotPayload, identity?: Identity): Promise<void>;
|
|
708
|
-
/**
|
|
709
|
-
* Closes the current Platform and all child windows and views.
|
|
710
|
-
* @param { undefined } payload Undefined unless you have implemented a custom quite protocol.
|
|
711
|
-
* @param { Identity } identity Identity of the entity that called {@link Platform#quit Platform.quit}.
|
|
712
|
-
* @return { Promise<void> }
|
|
713
|
-
*/
|
|
714
|
-
quit(payload: undefined, identity: Identity): Promise<void>;
|
|
715
|
-
/**
|
|
716
|
-
* Closes a view
|
|
717
|
-
* @param { CloseViewPayload } payload Specifies the `target` view to be closed.
|
|
718
|
-
* @param { Identity } identity Identity of the entity that called {@link Platform#closeView Platform.closeView}.
|
|
719
|
-
*/
|
|
720
|
-
closeView(payload: CloseViewPayload, identity?: Identity): Promise<any>;
|
|
721
|
-
/**
|
|
722
|
-
* Creates a new view and attaches it to a specified target window.
|
|
723
|
-
* @param { CreateViewPayload } payload Creation options for the new view.
|
|
724
|
-
* @param { Identity } identity Identity of the entity that called {@link Platform#createView Platform.createView}.
|
|
725
|
-
* @return { Promise<void> }
|
|
726
|
-
*/
|
|
727
|
-
createView(payload: CreateViewPayload, identity: Identity): Promise<View>;
|
|
728
|
-
/** Handles requests to fetch manifests in the current platform.
|
|
729
|
-
* @param { FetchManifestPayload } payload Payload containing the manifestUrl to be fetched.
|
|
730
|
-
* @param { Identity } callerIdentity If {@link Platform#fetchManifest Platform.fetchManifest}
|
|
731
|
-
* was called, the identity of the caller will be here.
|
|
732
|
-
* If `fetchManifest` was called internally, `callerIdentity` will be the provider's identity.
|
|
733
|
-
*/
|
|
734
|
-
fetchManifest(payload: FetchManifestPayload, callerIdentity: Identity): Promise<any>;
|
|
735
|
-
/**
|
|
736
|
-
* Replaces a Platform window's layout with a new layout. Any views that were in the old layout but not the new layout will be destroyed.
|
|
737
|
-
* @param { ReplaceLayoutPayload } payload Contains the `target` window and an `opts` object with a `layout` property to apply.
|
|
738
|
-
* @param { Identity } [identity] Identity of the entity that called {@link Platform#replaceLayout Platform.replaceLayout}.
|
|
739
|
-
* Undefined if `replaceLayout` is called internally (e.g. while applying a snapshot).
|
|
740
|
-
* @return { Promise<void> }
|
|
741
|
-
*/
|
|
742
|
-
replaceLayout(payload: ReplaceLayoutPayload, identity?: Identity): Promise<void>;
|
|
743
|
-
replaceView(payload: ReplaceViewPayload, identity?: Identity): Promise<void>;
|
|
744
|
-
launchIntoPlatform(payload: LaunchIntoPlatformPayload): Promise<void>;
|
|
745
|
-
/**
|
|
746
|
-
* Handles requests to set a window's context. `target` may be a window or a view.
|
|
747
|
-
* If it is a window, that window's `customContext` will be updated.
|
|
748
|
-
* If it is a view, the `customContext` of that view's current host window will be updated.
|
|
749
|
-
* @param { SetWindowContextPayload } payload Object containing the requested `context` update,
|
|
750
|
-
* the `target`'s identity, and the target's `entityType`.
|
|
751
|
-
* @param { Identity } [identity] Identity of the entity that called {@link Platform#setWindowContext Platform.setWindowContext}.
|
|
752
|
-
* Undefined if `setWindowContext` is called internally (e.g. while applying a snapshot).
|
|
753
|
-
* @return { Promise<any> } The new context.
|
|
754
|
-
*/
|
|
755
|
-
setWindowContext(payload: SetWindowContextPayload, identity?: Identity): Promise<any>;
|
|
756
|
-
/**
|
|
757
|
-
* Handles requests to get a window's context. `target` may be a window or a view.
|
|
758
|
-
* If it is a window, that window's `customContext` will be returned.
|
|
759
|
-
* If it is a view, the `customContext` of that view's current host window will be returned.
|
|
760
|
-
* @param { GetWindowContextPayload } payload Object containing the requested `context` update,
|
|
761
|
-
* the `target`'s identity, and the target's `entityType`.
|
|
762
|
-
* @param { Identity } [identity] Identity of the entity that called {@link Platform#getWindowContext Platform.getWindowContext}.
|
|
763
|
-
* Undefined when `getWindowContext` is called internally
|
|
764
|
-
* (e.g. when getting a window's context for the purpose of raising a "host-context-changed" event on a reparented view).
|
|
765
|
-
* @return { Promise<any> } The new context.
|
|
766
|
-
*/
|
|
767
|
-
getWindowContext(payload: GetWindowContextPayload, identity?: Identity): Promise<any>;
|
|
768
|
-
/**
|
|
769
|
-
* Called when a window's `customContext` is updated. Responsible for raising the `host-context-updated` event on that window's child views.
|
|
770
|
-
* @param { WindowOptionsChangedEvent<'window', 'options-changed'> } payload The event payload for the window whose context has changed.
|
|
771
|
-
* The new context will be contained as `payload.diff.customContext.newVal`.
|
|
772
|
-
* @return { Promise<HostContextChangedPayload> } The event that it raised.
|
|
773
|
-
*/
|
|
774
|
-
onWindowContextUpdated(payload: WindowOptionsChangedEvent): Promise<HostContextChangedPayload | undefined>;
|
|
775
|
-
/**
|
|
776
|
-
* Closes a Window.
|
|
777
|
-
* By default it will fire any before unload handler set by a View in the Window.
|
|
778
|
-
* This can be disabled by setting skipBeforeUnload in the options object of the payload.
|
|
779
|
-
* This method is called by {@link Platform#closeWindow Platform.closeWindow}.
|
|
780
|
-
* @param {CloseWindowPayload} payload Object that contains the Window Identity and related options.
|
|
781
|
-
* @param {Identity} callerIdentity
|
|
782
|
-
* @returns {Promise<void>}
|
|
783
|
-
*/
|
|
784
|
-
closeWindow(payload: CloseWindowPayload, callerIdentity: Identity): Promise<void>;
|
|
785
|
-
/**
|
|
786
|
-
* Gets all the Views attached to a Window that should close along with it. This is meant to be overridable
|
|
787
|
-
* in the case where you want to return other Views that may not be attached to the Window that is closing.
|
|
788
|
-
* @param winId Identity of the Window that is closing
|
|
789
|
-
* @returns { Promise<View> }
|
|
790
|
-
*/
|
|
791
|
-
getViewsForWindowClose(windowId: Identity): Promise<View[]>;
|
|
792
|
-
/**
|
|
793
|
-
* It takes in an array of Views and returns an object specifying which of them are trying to prevent an unload and which are not.
|
|
794
|
-
* @param {View[]} views Array of Views
|
|
795
|
-
* @returns { Promise<ViewStatuses> }
|
|
796
|
-
*/
|
|
797
|
-
checkViewsForPreventUnload(views: View[]): Promise<ViewStatuses>;
|
|
798
|
-
/**
|
|
799
|
-
* Handle the decision of whether a Window or specific View should close when trying to prevent an unload. This is meant to be overridden.
|
|
800
|
-
* Called in {@link PlatformProvider#closeWindow PlatformProvider.closeWindow}.
|
|
801
|
-
* Normally you would use this method to show a dialog indicating that there are Views that are trying to prevent an unload.
|
|
802
|
-
* By default it will always return all Views passed into it as meaning to close.
|
|
803
|
-
* @param {ViewsPreventingUnloadPayload} payload
|
|
804
|
-
* @tutorial PlatformProvider.getUserDecisionForBeforeUnload
|
|
805
|
-
* @returns {Promise<BeforeUnloadUserDecision>}
|
|
806
|
-
*/
|
|
807
|
-
getUserDecisionForBeforeUnload(payload: ViewsPreventingUnloadPayload): Promise<BeforeUnloadUserDecision>;
|
|
808
|
-
/**
|
|
809
|
-
* Handles the closing of a Window and/or its Views. Called in {@link PlatformProvider#closeWindow PlatformProvider.closeWindow}.
|
|
810
|
-
* The return of {@link PlatformProvider#getUserDecisionForBeforeUnload PlatformProvider.getUserDecisionForBeforeUnload} is passed into this method.
|
|
811
|
-
* @param {Identity} winId Identity of the Window
|
|
812
|
-
* @param {BeforeUnloadUserDecision} userDecision Decision object
|
|
813
|
-
* @returns {Promise<void>}
|
|
814
|
-
*/
|
|
815
|
-
handleViewsAndWindowClose(windowId: Identity, userDecision: BeforeUnloadUserDecision): Promise<void>;
|
|
816
|
-
};
|
|
817
1663
|
export declare type InitPlatformOptions = {
|
|
818
1664
|
overrideCallback?: OverrideCallback<PlatformProvider>;
|
|
1665
|
+
/**
|
|
1666
|
+
* A callback function that can be used to extend or replace default Provider behavior.
|
|
1667
|
+
*/
|
|
819
1668
|
interopOverride?: OverrideCallback<InteropBroker>;
|
|
820
1669
|
};
|
|
821
1670
|
export declare type ProcessDetails = {
|
|
1671
|
+
/**
|
|
1672
|
+
* The percentage of total CPU usage.
|
|
1673
|
+
*/
|
|
822
1674
|
cpuUsage: number;
|
|
1675
|
+
/**
|
|
1676
|
+
* The current nonpaged pool usage in bytes.
|
|
1677
|
+
*/
|
|
823
1678
|
nonPagedPoolUsage: number;
|
|
824
1679
|
pageFaultCount: number;
|
|
1680
|
+
/**
|
|
1681
|
+
* The current paged pool usage in bytes.
|
|
1682
|
+
*/
|
|
825
1683
|
pagedPoolUsage: number;
|
|
1684
|
+
/**
|
|
1685
|
+
* The total amount of memory in bytes that the memory manager has committed
|
|
1686
|
+
*/
|
|
826
1687
|
pagefileUsage: number;
|
|
1688
|
+
/**
|
|
1689
|
+
* The peak nonpaged pool usage in bytes.
|
|
1690
|
+
*/
|
|
827
1691
|
peakNonPagedPoolUsage: number;
|
|
1692
|
+
/**
|
|
1693
|
+
* The peak paged pool usage in bytes.
|
|
1694
|
+
*/
|
|
828
1695
|
peakPagedPoolUsage: number;
|
|
1696
|
+
/**
|
|
1697
|
+
* The peak value in bytes of pagefileUsage during the lifetime of this process.
|
|
1698
|
+
*/
|
|
829
1699
|
peakPagefileUsage: number;
|
|
1700
|
+
/**
|
|
1701
|
+
* The peak working set size in bytes.
|
|
1702
|
+
*/
|
|
830
1703
|
peakWorkingSetSize: number;
|
|
1704
|
+
/**
|
|
1705
|
+
* The current working set size (both shared and private data) in bytes.
|
|
1706
|
+
*/
|
|
831
1707
|
workingSetSize: number;
|
|
832
1708
|
privateSetSize: number;
|
|
1709
|
+
/**
|
|
1710
|
+
* The native process identifier.
|
|
1711
|
+
*/
|
|
833
1712
|
pid: number;
|
|
834
1713
|
};
|
|
835
1714
|
export declare type FrameProcessDetails = ProcessDetails & {
|
|
1715
|
+
/**
|
|
1716
|
+
* Current URL associated with the process.
|
|
1717
|
+
*/
|
|
836
1718
|
url: string;
|
|
1719
|
+
/**
|
|
1720
|
+
* Type for the frame.
|
|
1721
|
+
*/
|
|
837
1722
|
entityType: string;
|
|
838
1723
|
};
|
|
839
1724
|
export declare type EntityProcessDetails = FrameProcessDetails & {
|
|
@@ -842,7 +1727,13 @@ export declare type EntityProcessDetails = FrameProcessDetails & {
|
|
|
842
1727
|
iframes: FrameProcessDetails[];
|
|
843
1728
|
};
|
|
844
1729
|
export declare type AppProcessInfo = {
|
|
1730
|
+
/**
|
|
1731
|
+
* The uuid of the application.
|
|
1732
|
+
*/
|
|
845
1733
|
uuid: string;
|
|
1734
|
+
/**
|
|
1735
|
+
* Process info for each window and view for the application.
|
|
1736
|
+
*/
|
|
846
1737
|
entities: EntityProcessDetails[];
|
|
847
1738
|
};
|
|
848
1739
|
export declare type NonAppProcessDetails = ProcessDetails & {
|
|
@@ -854,9 +1745,21 @@ export declare type SystemProcessInfo = {
|
|
|
854
1745
|
nonApps: NonAppProcessDetails[];
|
|
855
1746
|
};
|
|
856
1747
|
export declare type ClearCacheOption = {
|
|
1748
|
+
/**
|
|
1749
|
+
* html5 application cache
|
|
1750
|
+
*/
|
|
857
1751
|
appcache?: boolean;
|
|
1752
|
+
/**
|
|
1753
|
+
* browser data cache for html files and images
|
|
1754
|
+
*/
|
|
858
1755
|
cache?: boolean;
|
|
1756
|
+
/**
|
|
1757
|
+
* browser cookies
|
|
1758
|
+
*/
|
|
859
1759
|
cookies?: boolean;
|
|
1760
|
+
/**
|
|
1761
|
+
* browser data that can be used across sessions
|
|
1762
|
+
*/
|
|
860
1763
|
localStorage?: boolean;
|
|
861
1764
|
};
|
|
862
1765
|
export declare type CookieInfo = {
|
|
@@ -868,34 +1771,86 @@ export declare type CookieOption = {
|
|
|
868
1771
|
name: string;
|
|
869
1772
|
};
|
|
870
1773
|
export declare type CrashReporterOptions = {
|
|
1774
|
+
/**
|
|
1775
|
+
* In diagnostics mode the crash reporter will send diagnostic logs to
|
|
1776
|
+
* the OpenFin reporting service on runtime shutdown
|
|
1777
|
+
*/
|
|
871
1778
|
diagnosticsMode: boolean;
|
|
872
1779
|
};
|
|
873
1780
|
export declare type CrashReporterState = CrashReporterOptions & {
|
|
1781
|
+
/**
|
|
1782
|
+
* Whether the crash reporter is running
|
|
1783
|
+
*/
|
|
874
1784
|
isRunning: boolean;
|
|
875
1785
|
diagnosticMode: boolean;
|
|
876
1786
|
};
|
|
877
1787
|
export declare type Time = {
|
|
1788
|
+
/**
|
|
1789
|
+
* The number of milliseconds the CPU has spent in user mode.
|
|
1790
|
+
*/
|
|
878
1791
|
user: number;
|
|
1792
|
+
/**
|
|
1793
|
+
* The number of milliseconds the CPU has spent in nice mode.
|
|
1794
|
+
*/
|
|
879
1795
|
nice: number;
|
|
1796
|
+
/**
|
|
1797
|
+
* The number of milliseconds the CPU has spent in sys mode.
|
|
1798
|
+
*/
|
|
880
1799
|
sys: number;
|
|
1800
|
+
/**
|
|
1801
|
+
* The number of milliseconds the CPU has spent in idle mode.
|
|
1802
|
+
*/
|
|
881
1803
|
idle: number;
|
|
1804
|
+
/**
|
|
1805
|
+
* The number of milliseconds the CPU has spent in irq mode.
|
|
1806
|
+
*/
|
|
882
1807
|
irq: number;
|
|
883
1808
|
};
|
|
884
1809
|
export declare type CpuInfo = {
|
|
1810
|
+
/**
|
|
1811
|
+
* The model of the cpu
|
|
1812
|
+
*/
|
|
885
1813
|
model: string;
|
|
1814
|
+
/**
|
|
1815
|
+
* The CPU clock speed in MHz
|
|
1816
|
+
*/
|
|
886
1817
|
speed: number;
|
|
1818
|
+
/**
|
|
1819
|
+
* The numbers of milliseconds the CPU has spent in different modes.
|
|
1820
|
+
*/
|
|
887
1821
|
times: Time;
|
|
888
1822
|
};
|
|
889
1823
|
export declare type GpuInfo = {
|
|
890
1824
|
name: string;
|
|
891
1825
|
};
|
|
892
1826
|
export declare type HostSpecs = {
|
|
1827
|
+
/**
|
|
1828
|
+
* True if Aero Glass theme is supported on Windows platforms
|
|
1829
|
+
*/
|
|
893
1830
|
aeroGlassEnabled?: boolean;
|
|
1831
|
+
/**
|
|
1832
|
+
* "x86" for 32-bit or "x86_64" for 64-bit
|
|
1833
|
+
*/
|
|
894
1834
|
arch: string;
|
|
1835
|
+
/**
|
|
1836
|
+
* The same payload as Node's os.cpus()
|
|
1837
|
+
*/
|
|
895
1838
|
cpus: CpuInfo[];
|
|
1839
|
+
/**
|
|
1840
|
+
* The graphics card name
|
|
1841
|
+
*/
|
|
896
1842
|
gpu: GpuInfo;
|
|
1843
|
+
/**
|
|
1844
|
+
* The same payload as Node's os.totalmem()
|
|
1845
|
+
*/
|
|
897
1846
|
memory: number;
|
|
1847
|
+
/**
|
|
1848
|
+
* The OS name and version/edition
|
|
1849
|
+
*/
|
|
898
1850
|
name: string;
|
|
1851
|
+
/**
|
|
1852
|
+
* True if screensaver is running. Supported on Windows only.
|
|
1853
|
+
*/
|
|
899
1854
|
screenSaver?: boolean;
|
|
900
1855
|
};
|
|
901
1856
|
export declare type PrinterInfo = {
|
|
@@ -904,34 +1859,109 @@ export declare type PrinterInfo = {
|
|
|
904
1859
|
status: number;
|
|
905
1860
|
isDefault: boolean;
|
|
906
1861
|
};
|
|
1862
|
+
/**
|
|
1863
|
+
* DPI (dots per inch) configuration for printing.
|
|
1864
|
+
*/
|
|
907
1865
|
export declare type Dpi = {
|
|
1866
|
+
/**
|
|
1867
|
+
* DPI (dots per inch) in the horizontal direction.
|
|
1868
|
+
*/
|
|
908
1869
|
horizontal?: number;
|
|
1870
|
+
/**
|
|
1871
|
+
* DPI (dots per inch) in the vertical direction.
|
|
1872
|
+
*/
|
|
909
1873
|
vertical?: number;
|
|
910
1874
|
};
|
|
1875
|
+
/**
|
|
1876
|
+
* Margins configuration for printing.
|
|
1877
|
+
*/
|
|
911
1878
|
export declare type Margins = {
|
|
912
1879
|
marginType?: 'default' | 'none' | 'printableArea' | 'custom';
|
|
1880
|
+
/**
|
|
1881
|
+
* The top margin of the printed webpage, in pixels.
|
|
1882
|
+
*/
|
|
913
1883
|
top?: number;
|
|
1884
|
+
/**
|
|
1885
|
+
* The bottom margin of the printed webpage, in pixels.
|
|
1886
|
+
*/
|
|
914
1887
|
bottom?: number;
|
|
1888
|
+
/**
|
|
1889
|
+
* The left margin of the printed webpage, in pixels.
|
|
1890
|
+
*/
|
|
915
1891
|
left?: number;
|
|
1892
|
+
/**
|
|
1893
|
+
* The right margin of the printed webpage, in pixels.
|
|
1894
|
+
*/
|
|
916
1895
|
right?: number;
|
|
917
1896
|
};
|
|
1897
|
+
/**
|
|
1898
|
+
* Options for printing a webpage in OpenFin.
|
|
1899
|
+
*/
|
|
918
1900
|
export declare type PrintOptions = {
|
|
1901
|
+
/**
|
|
1902
|
+
* Disables prompting the user for print settings.
|
|
1903
|
+
*/
|
|
919
1904
|
silent?: boolean;
|
|
1905
|
+
/**
|
|
1906
|
+
* Includes the webpage background color and image when printing.
|
|
1907
|
+
*/
|
|
920
1908
|
printBackground?: boolean;
|
|
1909
|
+
/**
|
|
1910
|
+
* Name of the printer device to use.
|
|
1911
|
+
*/
|
|
921
1912
|
deviceName?: string;
|
|
1913
|
+
/**
|
|
1914
|
+
* Prints in full color (greyscale otherwise).
|
|
1915
|
+
*/
|
|
922
1916
|
color?: boolean;
|
|
1917
|
+
/**
|
|
1918
|
+
* Margins for printed webpage.
|
|
1919
|
+
*/
|
|
923
1920
|
margins?: Margins;
|
|
1921
|
+
/**
|
|
1922
|
+
* Prints in landscape mode (portrait otherwise).
|
|
1923
|
+
*/
|
|
924
1924
|
landscape?: boolean;
|
|
1925
|
+
/**
|
|
1926
|
+
* Scale factor of the printer webpage.
|
|
1927
|
+
*/
|
|
925
1928
|
scaleFactor?: number;
|
|
1929
|
+
/**
|
|
1930
|
+
* Number of webpage pages to print per printer sheet.
|
|
1931
|
+
*/
|
|
926
1932
|
pagesPerSheet?: number;
|
|
1933
|
+
/**
|
|
1934
|
+
* Collates the webpage before printing.
|
|
1935
|
+
*/
|
|
927
1936
|
collate?: boolean;
|
|
1937
|
+
/**
|
|
1938
|
+
* Number of copies to be printed.
|
|
1939
|
+
*/
|
|
928
1940
|
copies?: number;
|
|
929
|
-
|
|
1941
|
+
/**
|
|
1942
|
+
* Page range to print.
|
|
1943
|
+
*/
|
|
1944
|
+
pageRanges?: Record<'from' | 'to', number>;
|
|
1945
|
+
/**
|
|
1946
|
+
* Duplex mode of the printed webpage.
|
|
1947
|
+
*/
|
|
930
1948
|
duplexMode?: 'simplex' | 'shortEdge' | 'longEdge';
|
|
1949
|
+
/**
|
|
1950
|
+
* Dots per inch of the printed webpage.
|
|
1951
|
+
*/
|
|
931
1952
|
dpi?: Dpi;
|
|
932
1953
|
};
|
|
1954
|
+
/**
|
|
1955
|
+
* A request to write data to the clipboard.
|
|
1956
|
+
*/
|
|
933
1957
|
export declare type WriteRequestType = {
|
|
1958
|
+
/**
|
|
1959
|
+
* Data to write to the clipboard.
|
|
1960
|
+
*/
|
|
934
1961
|
data: string;
|
|
1962
|
+
/**
|
|
1963
|
+
* The type of clipboard to write to.
|
|
1964
|
+
*/
|
|
935
1965
|
type?: string;
|
|
936
1966
|
};
|
|
937
1967
|
export declare type WriteAnyRequestType = {
|
|
@@ -943,6 +1973,9 @@ export declare type WriteAnyRequestType = {
|
|
|
943
1973
|
type?: string;
|
|
944
1974
|
};
|
|
945
1975
|
export declare type SubscriptionOptions = {
|
|
1976
|
+
/**
|
|
1977
|
+
* The event timestamp.
|
|
1978
|
+
*/
|
|
946
1979
|
timestamp?: number;
|
|
947
1980
|
};
|
|
948
1981
|
export declare type SharedWorkerInfo = {
|
|
@@ -950,18 +1983,42 @@ export declare type SharedWorkerInfo = {
|
|
|
950
1983
|
url: string;
|
|
951
1984
|
};
|
|
952
1985
|
export declare type ServiceIdentifier = {
|
|
1986
|
+
/**
|
|
1987
|
+
* The name of the service.
|
|
1988
|
+
*/
|
|
953
1989
|
name: string;
|
|
954
1990
|
};
|
|
955
1991
|
export declare type ServiceConfiguration = {
|
|
956
1992
|
config: object;
|
|
1993
|
+
/**
|
|
1994
|
+
* The name of the service.
|
|
1995
|
+
*/
|
|
957
1996
|
name: string;
|
|
958
1997
|
};
|
|
959
1998
|
export declare type RVMInfo = {
|
|
1999
|
+
/**
|
|
2000
|
+
* The name of action: "get-rvm-info".
|
|
2001
|
+
*/
|
|
960
2002
|
'action': string;
|
|
2003
|
+
/**
|
|
2004
|
+
* The app log directory.
|
|
2005
|
+
*/
|
|
961
2006
|
'appLogDirectory': string;
|
|
2007
|
+
/**
|
|
2008
|
+
* The path of OpenfinRVM.exe.
|
|
2009
|
+
*/
|
|
962
2010
|
'path': string;
|
|
2011
|
+
/**
|
|
2012
|
+
* The start time of RVM.
|
|
2013
|
+
*/
|
|
963
2014
|
'start-time': string;
|
|
2015
|
+
/**
|
|
2016
|
+
* The version of RVM.
|
|
2017
|
+
*/
|
|
964
2018
|
'version': string;
|
|
2019
|
+
/**
|
|
2020
|
+
* The path to the working directory.
|
|
2021
|
+
*/
|
|
965
2022
|
'working-dir': string;
|
|
966
2023
|
};
|
|
967
2024
|
export declare type AppVersionProgress = {
|
|
@@ -982,25 +2039,64 @@ export declare type AppVersionRuntimeInfo = {
|
|
|
982
2039
|
};
|
|
983
2040
|
export declare type LaunchEmitter = TypedEventEmitter<AppVersionEvent>;
|
|
984
2041
|
export declare type RvmLaunchOptions = {
|
|
2042
|
+
/**
|
|
2043
|
+
* True if no UI when launching
|
|
2044
|
+
*/
|
|
985
2045
|
noUi?: boolean;
|
|
986
2046
|
userAppConfigArgs?: object;
|
|
2047
|
+
/**
|
|
2048
|
+
* Timeout in seconds until RVM launch request expires.
|
|
2049
|
+
*/
|
|
987
2050
|
timeToLive?: number;
|
|
2051
|
+
/**
|
|
2052
|
+
* Called whenever app version resolver events occur.
|
|
2053
|
+
*/
|
|
988
2054
|
subscribe?: (launch: LaunchEmitter) => void;
|
|
989
2055
|
};
|
|
990
2056
|
export declare type ShortCutConfig = {
|
|
2057
|
+
/**
|
|
2058
|
+
* True if application has a shortcut on the desktop.
|
|
2059
|
+
*/
|
|
991
2060
|
desktop?: boolean;
|
|
2061
|
+
/**
|
|
2062
|
+
* True if application has shortcut in the start menu.
|
|
2063
|
+
*/
|
|
992
2064
|
startMenu?: boolean;
|
|
2065
|
+
/**
|
|
2066
|
+
* True if application will be launched on system startup.
|
|
2067
|
+
*/
|
|
993
2068
|
systemStartup?: boolean;
|
|
994
2069
|
};
|
|
995
2070
|
export declare type TerminateExternalRequestType = {
|
|
2071
|
+
/**
|
|
2072
|
+
* The uuid of the running application.
|
|
2073
|
+
*/
|
|
996
2074
|
uuid: string;
|
|
2075
|
+
/**
|
|
2076
|
+
* Time out period before the running application terminates.
|
|
2077
|
+
*/
|
|
997
2078
|
timeout: number;
|
|
2079
|
+
/**
|
|
2080
|
+
* Value to terminate the running application.
|
|
2081
|
+
*/
|
|
998
2082
|
killTree: boolean;
|
|
999
2083
|
};
|
|
1000
2084
|
export declare type TrayInfo = {
|
|
2085
|
+
/**
|
|
2086
|
+
* The bound of tray icon in virtual screen pixels.
|
|
2087
|
+
*/
|
|
1001
2088
|
bounds: Rectangle;
|
|
2089
|
+
/**
|
|
2090
|
+
* Please see fin.System.getMonitorInfo for more information.
|
|
2091
|
+
*/
|
|
1002
2092
|
monitorInfo: MonitorInfo;
|
|
2093
|
+
/**
|
|
2094
|
+
* Copy of `bounds.x`.
|
|
2095
|
+
*/
|
|
1003
2096
|
x: number;
|
|
2097
|
+
/**
|
|
2098
|
+
* Copy of `bounds.y`.
|
|
2099
|
+
*/
|
|
1004
2100
|
y: number;
|
|
1005
2101
|
};
|
|
1006
2102
|
export declare type Transition = {
|
|
@@ -1009,31 +2105,98 @@ export declare type Transition = {
|
|
|
1009
2105
|
size?: Size;
|
|
1010
2106
|
};
|
|
1011
2107
|
export declare type Size = TransitionBase & {
|
|
2108
|
+
/**
|
|
2109
|
+
* Optional if height is present. Defaults to the window's current width.
|
|
2110
|
+
*/
|
|
1012
2111
|
width: number;
|
|
2112
|
+
/**
|
|
2113
|
+
* Optional if width is present. Defaults to the window's current height.
|
|
2114
|
+
*/
|
|
1013
2115
|
height: number;
|
|
1014
2116
|
};
|
|
1015
2117
|
export declare type Opacity = TransitionBase & {
|
|
2118
|
+
/**
|
|
2119
|
+
* The opacity from 0.0 (transparent) to 1.0 (normal).
|
|
2120
|
+
*/
|
|
1016
2121
|
opacity: number;
|
|
1017
2122
|
};
|
|
2123
|
+
/**
|
|
2124
|
+
* Base configuration options needed for all types of transitions.
|
|
2125
|
+
*/
|
|
1018
2126
|
export declare type TransitionBase = {
|
|
2127
|
+
/**
|
|
2128
|
+
* The total time in milliseconds this transition should take.
|
|
2129
|
+
*/
|
|
1019
2130
|
duration: number;
|
|
2131
|
+
/**
|
|
2132
|
+
* @defaultValue false
|
|
2133
|
+
*
|
|
2134
|
+
* Treats 'opacity' as absolute or as a delta. Defaults to false.
|
|
2135
|
+
*/
|
|
1020
2136
|
relative?: boolean;
|
|
1021
2137
|
};
|
|
1022
2138
|
export declare type Position = TransitionBase & {
|
|
2139
|
+
/**
|
|
2140
|
+
* Defaults to the window's current left position in virtual screen coordinates.
|
|
2141
|
+
*/
|
|
1023
2142
|
left: number;
|
|
2143
|
+
/**
|
|
2144
|
+
* Defaults to the window's current top position in virtual screen coordinates.
|
|
2145
|
+
*/
|
|
1024
2146
|
top: number;
|
|
1025
2147
|
};
|
|
1026
2148
|
export declare type AnchorType = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
2149
|
+
/**
|
|
2150
|
+
* Configuration for transition between windows.
|
|
2151
|
+
*/
|
|
1027
2152
|
export declare type TransitionOptions = {
|
|
2153
|
+
/**
|
|
2154
|
+
* Interrupts the current animation (otherwise, the animation is added to the end of the queue).
|
|
2155
|
+
*/
|
|
1028
2156
|
interrupt: boolean;
|
|
2157
|
+
/**
|
|
2158
|
+
* @defaultValue false
|
|
2159
|
+
*
|
|
2160
|
+
* Treats 'opacity' as absolute or as a delta. Defaults to false.
|
|
2161
|
+
*/
|
|
2162
|
+
relative?: boolean;
|
|
1029
2163
|
tween?: tween;
|
|
1030
2164
|
};
|
|
1031
2165
|
export declare type tween = 'linear' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'ease-in-quad' | 'ease-out-quad' | 'ease-in-out-quad' | 'ease-in-cubic' | 'ease-out-cubic' | 'ease-in-out-cubic' | 'ease-out-bounce' | 'ease-in-back' | 'ease-out-back' | 'ease-in-out-back' | 'ease-in-elastic' | 'ease-out-elastic' | 'ease-in-out-elastic';
|
|
2166
|
+
/**
|
|
2167
|
+
* Configuration for find-in-page requests.
|
|
2168
|
+
*/
|
|
1032
2169
|
export declare type FindInPageOptions = {
|
|
2170
|
+
/**
|
|
2171
|
+
* @defaultValue true
|
|
2172
|
+
*
|
|
2173
|
+
* Searches in the forward direction (backward otherwise)
|
|
2174
|
+
*/
|
|
1033
2175
|
forward?: boolean;
|
|
2176
|
+
/**
|
|
2177
|
+
* @defaultValue false
|
|
2178
|
+
*
|
|
2179
|
+
* Begins a new text-finding session; should be true for first request only, and false on subsequent requests.
|
|
2180
|
+
*/
|
|
1034
2181
|
findNext?: boolean;
|
|
2182
|
+
/**
|
|
2183
|
+
* @defaultValue false
|
|
2184
|
+
*
|
|
2185
|
+
* Enables case-sensitive searching.
|
|
2186
|
+
*/
|
|
1035
2187
|
matchCase?: boolean;
|
|
2188
|
+
/**
|
|
2189
|
+
* @defaultValue false
|
|
2190
|
+
*
|
|
2191
|
+
* Only searches from the start of words.
|
|
2192
|
+
*/
|
|
1036
2193
|
wordStart?: boolean;
|
|
2194
|
+
/**
|
|
2195
|
+
* @defaultValue false
|
|
2196
|
+
*
|
|
2197
|
+
* When combined with wordStart, accepts a match in the middle of a word if the match begins with an uppercase letter followed by a<br>
|
|
2198
|
+
* lowercase or non-letter. Accepts several other intra-word matches.
|
|
2199
|
+
*/
|
|
1037
2200
|
medialCapitalAsWordStart?: boolean;
|
|
1038
2201
|
};
|
|
1039
2202
|
export declare type FrameInfo = {
|
|
@@ -1046,18 +2209,36 @@ export declare type ExternalApplicationInfo = {
|
|
|
1046
2209
|
parent: Identity;
|
|
1047
2210
|
};
|
|
1048
2211
|
export declare type ExternalConnection = {
|
|
2212
|
+
/**
|
|
2213
|
+
* The token to broker an external connection.
|
|
2214
|
+
*/
|
|
1049
2215
|
token: string;
|
|
2216
|
+
/**
|
|
2217
|
+
* Unique identifier for the connection.
|
|
2218
|
+
*/
|
|
1050
2219
|
uuid: string;
|
|
1051
2220
|
};
|
|
1052
2221
|
export declare type ExternalProcessRequestType = {
|
|
2222
|
+
/**
|
|
2223
|
+
* The file path to where the running application resides.
|
|
2224
|
+
*/
|
|
1053
2225
|
path?: string;
|
|
1054
2226
|
alias?: string;
|
|
2227
|
+
/**
|
|
2228
|
+
* The arguments to pass to the application.
|
|
2229
|
+
*/
|
|
1055
2230
|
arguments?: string;
|
|
1056
2231
|
listener?: LaunchExternalProcessListener;
|
|
1057
2232
|
lifetime?: string;
|
|
1058
2233
|
certificate?: CertificationInfo;
|
|
1059
2234
|
uuid?: string;
|
|
2235
|
+
/**
|
|
2236
|
+
* Initial window state after launching: 'normal' (default), 'minimized', 'maximized'.
|
|
2237
|
+
*/
|
|
1060
2238
|
initialWindowState?: string;
|
|
2239
|
+
/**
|
|
2240
|
+
* Current working directory.
|
|
2241
|
+
*/
|
|
1061
2242
|
cwd?: string;
|
|
1062
2243
|
};
|
|
1063
2244
|
export declare type CertificationInfo = {
|
|
@@ -1080,20 +2261,48 @@ export declare type ExternalProcessInfo = {
|
|
|
1080
2261
|
listener?: LaunchExternalProcessListener;
|
|
1081
2262
|
};
|
|
1082
2263
|
export declare type AppAssetInfo = {
|
|
2264
|
+
/**
|
|
2265
|
+
* The URL to a zip file containing the package files (executables, dlls, etc…)
|
|
2266
|
+
*/
|
|
1083
2267
|
src: string;
|
|
2268
|
+
/**
|
|
2269
|
+
* The name of the asset
|
|
2270
|
+
*/
|
|
1084
2271
|
alias: string;
|
|
2272
|
+
/**
|
|
2273
|
+
* The version of the package
|
|
2274
|
+
*/
|
|
1085
2275
|
version: string;
|
|
2276
|
+
/**
|
|
2277
|
+
* Specify default executable to launch. This option can be overridden in launchExternalProcess
|
|
2278
|
+
*/
|
|
1086
2279
|
target?: string;
|
|
2280
|
+
/**
|
|
2281
|
+
* The default command line arguments for the aforementioned target.
|
|
2282
|
+
*/
|
|
1087
2283
|
args?: string;
|
|
2284
|
+
/**
|
|
2285
|
+
* When set to true, the app will fail to load if the asset cannot be downloaded.
|
|
2286
|
+
* When set to false, the app will continue to load if the asset cannot be downloaded. (Default: true)
|
|
2287
|
+
*/
|
|
1088
2288
|
mandatory?: boolean;
|
|
1089
2289
|
};
|
|
2290
|
+
/**
|
|
2291
|
+
* The options object required by the downloadRuntime function.
|
|
2292
|
+
*/
|
|
1090
2293
|
export declare type RuntimeDownloadOptions = {
|
|
2294
|
+
/**
|
|
2295
|
+
* The given version to download.
|
|
2296
|
+
*/
|
|
1091
2297
|
version: string;
|
|
1092
2298
|
};
|
|
1093
2299
|
export declare type AppAssetRequest = {
|
|
1094
2300
|
alias: string;
|
|
1095
2301
|
};
|
|
1096
2302
|
export declare type RuntimeDownloadProgress = {
|
|
2303
|
+
/**
|
|
2304
|
+
* @property { string } alias The name of the asset
|
|
2305
|
+
*/
|
|
1097
2306
|
downloadedBytes: number;
|
|
1098
2307
|
totalBytes: number;
|
|
1099
2308
|
};
|
|
@@ -1105,16 +2314,44 @@ export declare type CertifiedAppInfo = {
|
|
|
1105
2314
|
isPresentInAppDirectory?: boolean;
|
|
1106
2315
|
};
|
|
1107
2316
|
export declare type JumpListCategory = {
|
|
2317
|
+
/**
|
|
2318
|
+
* The display title for the category.
|
|
2319
|
+
*
|
|
2320
|
+
* If omitted, items in this category will be placed into the standard 'Tasks' category.
|
|
2321
|
+
* There can be only one such category, and it will always be displayed at the bottom of the JumpList.
|
|
2322
|
+
*/
|
|
1108
2323
|
name?: string;
|
|
2324
|
+
/**
|
|
2325
|
+
* The set of tasks that will populate the JumpList.
|
|
2326
|
+
*/
|
|
1109
2327
|
items: Array<JumpListTask | JumpListSeparator>;
|
|
1110
2328
|
};
|
|
1111
2329
|
export declare type JumpListItem = JumpListTask | JumpListSeparator;
|
|
1112
2330
|
export declare type JumpListTask = {
|
|
1113
2331
|
type: 'task';
|
|
2332
|
+
/**
|
|
2333
|
+
* The text to be displayed for the JumpList Item.
|
|
2334
|
+
*/
|
|
1114
2335
|
title: string;
|
|
2336
|
+
/**
|
|
2337
|
+
* Tooltip description of the task (displayed in a tooltip).
|
|
2338
|
+
*/
|
|
1115
2339
|
description: string;
|
|
2340
|
+
/**
|
|
2341
|
+
* @property Deep link to a manifest, i.e: fins://path.to/manifest.json?$$param1=value1.
|
|
2342
|
+
* See {@link https://developers.openfin.co/docs/deep-linking deep-linking} for more information.
|
|
2343
|
+
*/
|
|
1116
2344
|
deepLink: string;
|
|
2345
|
+
/**
|
|
2346
|
+
* 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).
|
|
2347
|
+
*/
|
|
1117
2348
|
iconPath?: string;
|
|
2349
|
+
/**
|
|
2350
|
+
* The index of the icon in the resource file.
|
|
2351
|
+
*
|
|
2352
|
+
* 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.
|
|
2353
|
+
* If a resource file contains only one icon, this property should be set to zero.
|
|
2354
|
+
*/
|
|
1118
2355
|
iconIndex?: number;
|
|
1119
2356
|
};
|
|
1120
2357
|
export declare type JumpListSeparator = {
|
|
@@ -1133,7 +2370,13 @@ export declare type ApplicationInfo = {
|
|
|
1133
2370
|
};
|
|
1134
2371
|
};
|
|
1135
2372
|
export declare type ManifestInfo = {
|
|
2373
|
+
/**
|
|
2374
|
+
* The uuid of the application.
|
|
2375
|
+
*/
|
|
1136
2376
|
uuid: string;
|
|
2377
|
+
/**
|
|
2378
|
+
* The runtime manifest URL.
|
|
2379
|
+
*/
|
|
1137
2380
|
manifestUrl: string;
|
|
1138
2381
|
};
|
|
1139
2382
|
export declare type ClickedMenuResult = {
|
|
@@ -1187,11 +2430,29 @@ export declare type NativeWindowIntegrationProviderAuthorization = {
|
|
|
1187
2430
|
authorizedUuid: string;
|
|
1188
2431
|
};
|
|
1189
2432
|
export declare type RuntimeInfo = {
|
|
2433
|
+
/**
|
|
2434
|
+
* The runtime build architecture.
|
|
2435
|
+
*/
|
|
1190
2436
|
architecture: string;
|
|
2437
|
+
/**
|
|
2438
|
+
* The runtime manifest URL.
|
|
2439
|
+
*/
|
|
1191
2440
|
manifestUrl: string;
|
|
2441
|
+
/**
|
|
2442
|
+
* The runtime websocket port.
|
|
2443
|
+
*/
|
|
1192
2444
|
port: number;
|
|
2445
|
+
/**
|
|
2446
|
+
* The runtime security realm.
|
|
2447
|
+
*/
|
|
1193
2448
|
securityRealm?: string;
|
|
2449
|
+
/**
|
|
2450
|
+
* The runtime version.
|
|
2451
|
+
*/
|
|
1194
2452
|
version: string;
|
|
2453
|
+
/**
|
|
2454
|
+
* the command line argument used to start the Runtime.
|
|
2455
|
+
*/
|
|
1195
2456
|
args: object;
|
|
1196
2457
|
chromeVersion: string;
|
|
1197
2458
|
electronVersion: string;
|
|
@@ -1215,8 +2476,17 @@ export declare type DownloadRule = {
|
|
|
1215
2476
|
match: string[];
|
|
1216
2477
|
};
|
|
1217
2478
|
export declare type ContextHandler = (context: Context) => void;
|
|
2479
|
+
/**
|
|
2480
|
+
* Combination of an action and a context that is passed to an application for resolution.
|
|
2481
|
+
*/
|
|
1218
2482
|
export declare type Intent<MetadataType = IntentMetadata> = {
|
|
2483
|
+
/**
|
|
2484
|
+
* Name of the intent.
|
|
2485
|
+
*/
|
|
1219
2486
|
name: string;
|
|
2487
|
+
/**
|
|
2488
|
+
* Data associated with the intent.
|
|
2489
|
+
*/
|
|
1220
2490
|
context: Context;
|
|
1221
2491
|
metadata?: MetadataType;
|
|
1222
2492
|
};
|
|
@@ -1227,13 +2497,37 @@ export declare type IntentMetadata<TargetType = any> = {
|
|
|
1227
2497
|
};
|
|
1228
2498
|
export declare type IntentHandler = (intent: Intent) => void;
|
|
1229
2499
|
export declare type ContentCreationBehaviorNames = 'window' | 'view' | 'block' | 'browser';
|
|
1230
|
-
declare type MatchPattern = string;
|
|
2500
|
+
export declare type MatchPattern = string;
|
|
2501
|
+
/**
|
|
2502
|
+
* A rule for creating content in OpenFin; maps a content type to the way in which
|
|
2503
|
+
* newly-opened content of that type will be handled.
|
|
2504
|
+
*
|
|
2505
|
+
* @property { string } behavior 'view' | 'window' | 'browser' | 'block'
|
|
2506
|
+
* @property { string[] } match List of [match patterns](https://developer.chrome.com/extensions/match_patterns).
|
|
2507
|
+
* @property { object } options Window creation options or View creation options.
|
|
2508
|
+
*/
|
|
1231
2509
|
export declare type ContentCreationRule<T = ContentCreationBehaviorNames> = {
|
|
2510
|
+
/**
|
|
2511
|
+
* Behavior to use when opening matched content.
|
|
2512
|
+
*/
|
|
1232
2513
|
behavior: T;
|
|
2514
|
+
/**
|
|
2515
|
+
* List of [match patterns](https://developer.chrome.com/extensions/match_patterns) that indicate the specified
|
|
2516
|
+
* behavior should be used
|
|
2517
|
+
*/
|
|
1233
2518
|
match: MatchPattern[];
|
|
2519
|
+
/**
|
|
2520
|
+
* Options for newly-created view or window (if applicable).
|
|
2521
|
+
*/
|
|
1234
2522
|
options?: T extends 'window' ? Partial<WindowOptions> : T extends 'view' ? Partial<ViewOptions> : never;
|
|
1235
2523
|
};
|
|
2524
|
+
/**
|
|
2525
|
+
* Configures how new content (e,g, from `window.open` or a link) is opened.
|
|
2526
|
+
*/
|
|
1236
2527
|
export declare type ContentCreationOptions = {
|
|
2528
|
+
/**
|
|
2529
|
+
* List of rules for creation of new content.
|
|
2530
|
+
*/
|
|
1237
2531
|
rules: ContentCreationRule[];
|
|
1238
2532
|
};
|
|
1239
2533
|
export declare type SnapshotProvider<T> = {
|
|
@@ -1241,9 +2535,18 @@ export declare type SnapshotProvider<T> = {
|
|
|
1241
2535
|
applySnapshot: (snapshot: T) => Promise<void>;
|
|
1242
2536
|
};
|
|
1243
2537
|
export declare type QueryPermissionResult = {
|
|
2538
|
+
/**
|
|
2539
|
+
* The full name of a secured API.
|
|
2540
|
+
*/
|
|
1244
2541
|
permission: string;
|
|
1245
2542
|
state: PermissionState;
|
|
2543
|
+
/**
|
|
2544
|
+
* True if permission is granted.
|
|
2545
|
+
*/
|
|
1246
2546
|
granted: boolean;
|
|
2547
|
+
/**
|
|
2548
|
+
* The value of permission.
|
|
2549
|
+
*/
|
|
1247
2550
|
rawValue?: unknown;
|
|
1248
2551
|
};
|
|
1249
2552
|
export declare type SessionContextGroup = {
|
|
@@ -1255,17 +2558,38 @@ export declare type SessionContextGroup = {
|
|
|
1255
2558
|
}>;
|
|
1256
2559
|
};
|
|
1257
2560
|
export type { MessagingProtocols };
|
|
2561
|
+
/**
|
|
2562
|
+
* Channel provider creation options.
|
|
2563
|
+
*/
|
|
1258
2564
|
export declare type ChannelCreateOptions = {
|
|
2565
|
+
/**
|
|
2566
|
+
* EXPERIMENTAL: Messaging protocols supported by the channel provider.
|
|
2567
|
+
*/
|
|
1259
2568
|
protocols?: MessagingProtocols[];
|
|
1260
2569
|
};
|
|
2570
|
+
/**
|
|
2571
|
+
* Options provided on a client connection to a channel.
|
|
2572
|
+
*
|
|
2573
|
+
*/
|
|
1261
2574
|
export declare type ChannelConnectOptions = ChannelCreateOptions & {
|
|
2575
|
+
/**
|
|
2576
|
+
* @defaultValue true
|
|
2577
|
+
*
|
|
2578
|
+
* If true will wait for ChannelProvider to connect. If false will fail if ChannelProvider is not found.
|
|
2579
|
+
*/
|
|
1262
2580
|
wait?: boolean;
|
|
2581
|
+
/**
|
|
2582
|
+
* Payload to pass to ChannelProvider onConnection action.
|
|
2583
|
+
*/
|
|
1263
2584
|
payload?: any;
|
|
1264
2585
|
};
|
|
1265
2586
|
export declare type ContextForIntent<MetadataType = any> = Context & {
|
|
1266
2587
|
metadata?: MetadataType;
|
|
1267
2588
|
};
|
|
1268
2589
|
export declare type InfoForIntentOptions<MetadataType = IntentMetadata> = {
|
|
2590
|
+
/**
|
|
2591
|
+
* Name of the intent to get info for.
|
|
2592
|
+
*/
|
|
1269
2593
|
name: string;
|
|
1270
2594
|
context?: Context;
|
|
1271
2595
|
metadata?: MetadataType;
|
|
@@ -1274,8 +2598,17 @@ export declare type FindIntentsByContextOptions<MetadataType = IntentMetadata> =
|
|
|
1274
2598
|
context: Context;
|
|
1275
2599
|
metadata?: MetadataType;
|
|
1276
2600
|
};
|
|
2601
|
+
/**
|
|
2602
|
+
* Identity of a channel provider.
|
|
2603
|
+
*/
|
|
1277
2604
|
export declare type ProviderIdentity = Identity & {
|
|
2605
|
+
/**
|
|
2606
|
+
* Identifier of the channel.
|
|
2607
|
+
*/
|
|
1278
2608
|
channelId: string;
|
|
2609
|
+
/**
|
|
2610
|
+
* Channel provider name.
|
|
2611
|
+
*/
|
|
1279
2612
|
channelName: string;
|
|
1280
2613
|
};
|
|
1281
2614
|
export declare type RegisterUsageData = {
|
|
@@ -1283,23 +2616,59 @@ export declare type RegisterUsageData = {
|
|
|
1283
2616
|
type: string;
|
|
1284
2617
|
};
|
|
1285
2618
|
export interface ViewsPreventingUnloadPayload {
|
|
2619
|
+
/**
|
|
2620
|
+
* Specifies if the Window should close.
|
|
2621
|
+
*/
|
|
1286
2622
|
windowShouldClose: boolean;
|
|
2623
|
+
/**
|
|
2624
|
+
* Identity of the Window.
|
|
2625
|
+
*/
|
|
1287
2626
|
windowId: Identity;
|
|
2627
|
+
/**
|
|
2628
|
+
* Identities of the Views that are preventing an unload
|
|
2629
|
+
*/
|
|
1288
2630
|
viewsPreventingUnload: Identity[];
|
|
2631
|
+
/**
|
|
2632
|
+
* Identities of the Views that are not preventing an unload
|
|
2633
|
+
*/
|
|
1289
2634
|
viewsNotPreventingUnload: Identity[];
|
|
2635
|
+
/**
|
|
2636
|
+
* Source of the close action.
|
|
2637
|
+
*/
|
|
1290
2638
|
closeType: 'view' | 'window';
|
|
1291
2639
|
}
|
|
1292
2640
|
export interface BeforeUnloadUserDecision {
|
|
2641
|
+
/**
|
|
2642
|
+
* Specifies if the Window should close.
|
|
2643
|
+
*/
|
|
1293
2644
|
windowShouldClose: boolean;
|
|
2645
|
+
/**
|
|
2646
|
+
* Array of views that will close.
|
|
2647
|
+
*/
|
|
1294
2648
|
viewsToClose: Identity[];
|
|
1295
2649
|
}
|
|
1296
2650
|
export interface ViewStatuses {
|
|
2651
|
+
/**
|
|
2652
|
+
* Identities of the Views that are preventing an unload.
|
|
2653
|
+
*/
|
|
1297
2654
|
viewsPreventingUnload: Identity[];
|
|
2655
|
+
/**
|
|
2656
|
+
* Identities of the Views that are not preventing an unload.
|
|
2657
|
+
*/
|
|
1298
2658
|
viewsNotPreventingUnload: Identity[];
|
|
1299
2659
|
}
|
|
1300
2660
|
export interface CloseWindowPayload {
|
|
2661
|
+
/**
|
|
2662
|
+
*
|
|
2663
|
+
* Identity of the Window
|
|
2664
|
+
*/
|
|
1301
2665
|
windowId: Identity;
|
|
1302
2666
|
options: {
|
|
2667
|
+
/**
|
|
2668
|
+
* @defaultValue false
|
|
2669
|
+
*
|
|
2670
|
+
* When set to true skips any before handler set on views that are part of the window
|
|
2671
|
+
*/
|
|
1303
2672
|
skipBeforeUnload?: boolean;
|
|
1304
2673
|
};
|
|
1305
2674
|
}
|
|
@@ -1308,23 +2677,53 @@ export declare type ProxyInfo = {
|
|
|
1308
2677
|
system: ProxySystemInfo;
|
|
1309
2678
|
};
|
|
1310
2679
|
export declare type ProxyConfig = {
|
|
2680
|
+
/**
|
|
2681
|
+
* The configured proxy address.
|
|
2682
|
+
*/
|
|
1311
2683
|
proxyAddress: string;
|
|
2684
|
+
/**
|
|
2685
|
+
* The configured proxy port.
|
|
2686
|
+
*/
|
|
1312
2687
|
proxyPort: number;
|
|
1313
2688
|
type: string;
|
|
1314
2689
|
};
|
|
1315
2690
|
export declare type ProxySystemInfo = {
|
|
2691
|
+
/**
|
|
2692
|
+
* The auto configuration url.
|
|
2693
|
+
*/
|
|
1316
2694
|
autoConfigUrl: string;
|
|
2695
|
+
/**
|
|
2696
|
+
* The proxy bypass info.
|
|
2697
|
+
*/
|
|
1317
2698
|
bypass: string;
|
|
2699
|
+
/**
|
|
2700
|
+
* Value to check if a proxy is enabled.
|
|
2701
|
+
*/
|
|
1318
2702
|
enabled: boolean;
|
|
2703
|
+
/**
|
|
2704
|
+
* The proxy info.
|
|
2705
|
+
*/
|
|
1319
2706
|
proxy: string;
|
|
1320
2707
|
};
|
|
1321
2708
|
export declare type ChannelAction = (payload: unknown, id: ProviderIdentity | ClientIdentity) => unknown;
|
|
1322
2709
|
export declare type ChannelMiddleware = (topic: string, payload: unknown, senderIdentity: ProviderIdentity | ClientIdentity) => Promise<unknown> | unknown;
|
|
1323
2710
|
export declare type ErrorMiddleware = (topic: string, error: Error, id: ProviderIdentity | ClientIdentity) => unknown;
|
|
1324
2711
|
export declare type ApplicationState = {
|
|
2712
|
+
/**
|
|
2713
|
+
* True when the application is a Platform controller
|
|
2714
|
+
*/
|
|
1325
2715
|
isPlatform: boolean;
|
|
2716
|
+
/**
|
|
2717
|
+
* True when the application is running
|
|
2718
|
+
*/
|
|
1326
2719
|
isRunning: boolean;
|
|
2720
|
+
/**
|
|
2721
|
+
* uuid of the application
|
|
2722
|
+
*/
|
|
1327
2723
|
uuid: string;
|
|
2724
|
+
/**
|
|
2725
|
+
* uuid of the application that launches this application
|
|
2726
|
+
*/
|
|
1328
2727
|
parentUuid?: string;
|
|
1329
2728
|
};
|
|
1330
2729
|
export declare type InstalledApps = {
|
|
@@ -1334,18 +2733,45 @@ export declare type InstallationInfo = {
|
|
|
1334
2733
|
cachedManifest: any;
|
|
1335
2734
|
};
|
|
1336
2735
|
export declare type GetLogRequestType = {
|
|
2736
|
+
/**
|
|
2737
|
+
* The name of the running application
|
|
2738
|
+
*/
|
|
1337
2739
|
name: string;
|
|
2740
|
+
/**
|
|
2741
|
+
* The file length of the log file
|
|
2742
|
+
*/
|
|
1338
2743
|
endFile?: string;
|
|
2744
|
+
/**
|
|
2745
|
+
* The size limit of the log file.
|
|
2746
|
+
*/
|
|
1339
2747
|
sizeLimit?: number;
|
|
1340
2748
|
};
|
|
1341
2749
|
export declare type LogInfo = {
|
|
2750
|
+
/**
|
|
2751
|
+
* The filename of the log
|
|
2752
|
+
*/
|
|
1342
2753
|
name: string;
|
|
2754
|
+
/**
|
|
2755
|
+
* The size of the log in bytes
|
|
2756
|
+
*/
|
|
1343
2757
|
size: number;
|
|
2758
|
+
/**
|
|
2759
|
+
* The unix time at which the log was created "Thu Jan 08 2015 14:40:30 GMT-0500 (Eastern Standard Time)"
|
|
2760
|
+
*/
|
|
1344
2761
|
date: string;
|
|
1345
2762
|
};
|
|
1346
2763
|
export declare type SendApplicationLogResponse = {
|
|
1347
2764
|
logId: string;
|
|
1348
2765
|
};
|
|
2766
|
+
/**
|
|
2767
|
+
* Describes the minimum level (inclusive) above which logs will be written.
|
|
2768
|
+
*
|
|
2769
|
+
* `verbose`: all logs written
|
|
2770
|
+
* `info`: info and above
|
|
2771
|
+
* `warning` warning and above
|
|
2772
|
+
* `error` and above
|
|
2773
|
+
* `fatal`: fatal only, indicates a crash is imminent
|
|
2774
|
+
*/
|
|
1349
2775
|
export declare type LogLevel = 'verbose' | 'info' | 'warning' | 'error' | 'fatal';
|
|
1350
2776
|
export declare type PermissionState = 'granted' | 'denied' | 'unavailable';
|
|
1351
2777
|
export declare type RegistryInfo = {
|
|
@@ -1369,31 +2795,63 @@ export declare type WindowInfo = {
|
|
|
1369
2795
|
export declare type ApplicationWindowInfo = {
|
|
1370
2796
|
childWindows: Array<WindowDetail>;
|
|
1371
2797
|
mainWindow: WindowDetail;
|
|
2798
|
+
/**
|
|
2799
|
+
* @property { string } uuid The uuid of the application
|
|
2800
|
+
*/
|
|
1372
2801
|
uuid: string;
|
|
1373
2802
|
};
|
|
1374
2803
|
export declare type WindowDetail = {
|
|
2804
|
+
/**
|
|
2805
|
+
* The bottom-most coordinate of the window.
|
|
2806
|
+
*/
|
|
1375
2807
|
bottom: number;
|
|
2808
|
+
/**
|
|
2809
|
+
* The height of the window.
|
|
2810
|
+
*/
|
|
1376
2811
|
height: number;
|
|
1377
2812
|
isShowing: boolean;
|
|
2813
|
+
/**
|
|
2814
|
+
* The left-most coordinate of the window.
|
|
2815
|
+
*/
|
|
1378
2816
|
left: number;
|
|
2817
|
+
/**
|
|
2818
|
+
* The name of the window.
|
|
2819
|
+
*/
|
|
1379
2820
|
name: string;
|
|
2821
|
+
/**
|
|
2822
|
+
* The right-most coordinate of the window
|
|
2823
|
+
*/
|
|
1380
2824
|
right: number;
|
|
1381
2825
|
state: string;
|
|
2826
|
+
/**
|
|
2827
|
+
* The top-most coordinate of the window.
|
|
2828
|
+
*/
|
|
1382
2829
|
top: number;
|
|
2830
|
+
/**
|
|
2831
|
+
* The width of the window.
|
|
2832
|
+
*/
|
|
1383
2833
|
width: number;
|
|
1384
2834
|
};
|
|
1385
2835
|
export declare type LayoutPresetType = 'columns' | 'grid' | 'rows' | 'tabs';
|
|
1386
2836
|
export declare type InitLayoutOptions = {
|
|
2837
|
+
/**
|
|
2838
|
+
* The id attribute of the container where the window's Layout should be initialized. If not provided
|
|
2839
|
+
* then an element with id `layout-container` is used. We recommend using a div element.
|
|
2840
|
+
*/
|
|
1387
2841
|
containerId?: string;
|
|
1388
2842
|
};
|
|
1389
2843
|
export declare type PresetLayoutOptions = {
|
|
2844
|
+
/**
|
|
2845
|
+
* Which preset layout arrangement to use.
|
|
2846
|
+
* The preset options are `columns`, `grid`, `rows`, and `tabs`.
|
|
2847
|
+
*/
|
|
1390
2848
|
presetType: LayoutPresetType;
|
|
1391
2849
|
};
|
|
1392
2850
|
export declare type ResultBehavior = 'close' | 'hide' | 'none';
|
|
1393
2851
|
export declare type PopupBaseBehavior = 'close' | 'hide';
|
|
1394
2852
|
export declare type PopupResultBehavior = 'none' | PopupBaseBehavior;
|
|
1395
2853
|
export declare type PopupBlurBehavior = 'modal' | PopupBaseBehavior;
|
|
1396
|
-
declare type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
|
|
2854
|
+
export declare type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
|
|
1397
2855
|
export interface PopupOptions {
|
|
1398
2856
|
initialOptions?: Optional<WindowCreationOptions, 'name'>;
|
|
1399
2857
|
additionalOptions?: UpdatableWindowOptions;
|
|
@@ -1432,11 +2890,43 @@ export declare type AppVersionCompleteEvent = {
|
|
|
1432
2890
|
export declare type AppVersionRuntimeStatusEvent = {
|
|
1433
2891
|
type: 'runtime-status';
|
|
1434
2892
|
} & AppVersionRuntimeInfo;
|
|
1435
|
-
|
|
2893
|
+
import type * as BaseEvents from './api/events/base';
|
|
2894
|
+
import type * as WebContentsEvents from './api/events/webcontents';
|
|
2895
|
+
import type * as SystemEvents from './api/events/system';
|
|
2896
|
+
import type * as ApplicationEvents from './api/events/application';
|
|
2897
|
+
import type * as WindowEvents from './api/events/window';
|
|
2898
|
+
import type * as ViewEvents from './api/events/view';
|
|
2899
|
+
import type * as GlobalHotkeyEvents from './api/events/globalHotkey';
|
|
2900
|
+
import type * as FrameEvents from './api/events/frame';
|
|
2901
|
+
import type * as PlatformEvents from './api/events/platform';
|
|
2902
|
+
import type * as ExternalApplicationEvents from './api/events/externalApplication';
|
|
2903
|
+
export type { BaseEvents, WebContentsEvents, SystemEvents, ApplicationEvents, WindowEvents, ViewEvents, GlobalHotkeyEvents, FrameEvents, PlatformEvents, ExternalApplicationEvents };
|
|
2904
|
+
export declare type BaseEvent = BaseEvents.BaseEvent;
|
|
2905
|
+
export declare type WebContentsEvent = WebContentsEvents.WebContentsEvent;
|
|
2906
|
+
export declare type SystemEvent = SystemEvents.SystemEvent;
|
|
2907
|
+
export declare type ApplicationEvent = ApplicationEvents.ApplicationEvent;
|
|
2908
|
+
export declare type WindowEvent = WindowEvents.WindowEvent;
|
|
2909
|
+
export declare type ViewEvent = ViewEvents.ViewEvent;
|
|
2910
|
+
export declare type GlobalHotkeyEvent = GlobalHotkeyEvents.GlobalHotkeyEvent;
|
|
2911
|
+
export declare type FrameEvent = FrameEvents.FrameEvent;
|
|
2912
|
+
export declare type PlatformEvent = PlatformEvents.PlatformEvent;
|
|
2913
|
+
export declare type ExternalApplicationEvent = ExternalApplicationEvents.ExternalApplicationEvent;
|
|
2914
|
+
/**
|
|
2915
|
+
* Configure the context menu when right-clicking on a window.
|
|
2916
|
+
*/
|
|
1436
2917
|
export declare type ContextMenuOptions = {
|
|
2918
|
+
/**
|
|
2919
|
+
* Context menu items to display on right-click.
|
|
2920
|
+
*/
|
|
1437
2921
|
template?: Array<PrebuiltContextMenuItem>;
|
|
2922
|
+
/**
|
|
2923
|
+
* Displays the context menu on right click.
|
|
2924
|
+
*/
|
|
1438
2925
|
enabled?: boolean;
|
|
1439
2926
|
};
|
|
2927
|
+
/**
|
|
2928
|
+
* Context menu item with an implementation provided by OpenFin.
|
|
2929
|
+
*/
|
|
1440
2930
|
export declare type PrebuiltContextMenuItem = 'separator' | 'undo' | 'redo' | 'cut' | 'copy' | 'paste' | 'selectAll' | 'spellCheck' | 'inspect' | 'reload' | 'navigateForward' | 'navigateBack' | 'print';
|
|
1441
2931
|
export declare type InteropBrokerDisconnectionEvent = {
|
|
1442
2932
|
type: string;
|
|
@@ -1449,3 +2939,4 @@ export interface InteropActionLoggingOption {
|
|
|
1449
2939
|
}
|
|
1450
2940
|
export declare type InteropLoggingActions = 'beforeAction' | 'afterAction';
|
|
1451
2941
|
export declare type InteropLoggingOptions = Record<InteropLoggingActions, InteropActionLoggingOption>;
|
|
2942
|
+
export type { Me } from './api/me';
|