@openfin/core 30.73.23 → 30.73.24
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 +1678 -188
- 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 +16 -14
- package/src/api/base.js +2 -2
- package/src/api/clipboard/index.d.ts +1 -0
- package/src/api/clipboard/index.js +1 -0
- package/src/api/events/application.d.ts +65 -56
- package/src/api/events/base.d.ts +33 -15
- package/src/api/events/channel.d.ts +13 -8
- package/src/api/events/eventAggregator.js +1 -9
- package/src/api/events/externalApplication.d.ts +10 -5
- package/src/api/events/frame.d.ts +13 -7
- package/src/api/events/globalHotkey.d.ts +11 -12
- package/src/api/events/platform.d.ts +10 -16
- package/src/api/events/system.d.ts +41 -29
- package/src/api/events/typedEventEmitter.d.ts +15 -8
- package/src/api/events/view.d.ts +37 -54
- package/src/api/events/webcontents.d.ts +74 -28
- package/src/api/events/window.d.ts +147 -134
- package/src/api/external-application/Instance.d.ts +1 -1
- package/src/api/frame/Instance.d.ts +1 -1
- package/src/api/global-hotkey/index.d.ts +1 -3
- package/src/api/global-hotkey/index.js +6 -0
- 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 +2 -1
- package/src/api/interappbus/channel/client.js +12 -5
- package/src/api/interappbus/channel/index.d.ts +2 -2
- package/src/api/interappbus/channel/index.js +7 -7
- 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/strategy.js +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 +33 -47
- package/src/api/interop/InteropClient.d.ts +9 -8
- package/src/api/interop/InteropClient.js +9 -8
- package/src/api/interop/fdc3/fdc3-1.2.js +8 -8
- package/src/api/interop/fdc3/fdc3-2.0.d.ts +1 -1
- package/src/api/interop/fdc3/fdc3-2.0.js +15 -7
- package/src/api/interop/fdc3/fdc3.d.ts +3 -4
- 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/platform/Factory.d.ts +5 -0
- package/src/api/platform/Factory.js +9 -0
- package/src/api/platform/Instance.d.ts +7 -6
- package/src/api/platform/Instance.js +6 -3
- package/src/api/platform/layout/Factory.d.ts +4 -0
- package/src/api/platform/layout/Factory.js +4 -0
- 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/system/index.d.ts +1 -2
- package/src/api/system/index.js +22 -6
- package/src/api/view/Instance.d.ts +8 -4
- package/src/api/view/Instance.js +7 -4
- package/src/api/webcontents/main.d.ts +19 -5
- package/src/api/webcontents/main.js +10 -0
- package/src/api/window/Instance.d.ts +21 -3
- package/src/api/window/Instance.js +22 -0
- package/src/namespaces.d.ts +21 -0
- package/src/namespaces.js +24 -0
- package/src/transport/transport-errors.d.ts +6 -1
- package/src/transport/transport-errors.js +1 -2
- package/src/transport/transport.d.ts +10 -7
- package/src/transport/transport.js +9 -1
- package/src/util/inaccessibleObject.d.ts +2 -0
- package/src/util/inaccessibleObject.js +49 -0
package/src/OpenFin.d.ts
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import type { Application } from './api/application';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { FrameEvents } from './api/events/frame';
|
|
5
|
-
import { GlobalHotkeyEvents } from './api/events/globalHotkey';
|
|
6
|
-
import { PlatformEvents } from './api/events/platform';
|
|
7
|
-
import { SystemEvents } from './api/events/system';
|
|
8
|
-
import { ViewEvents } from './api/events/view';
|
|
9
|
-
import { WindowEvents, WindowOptionsChangedEvent } from './api/events/window';
|
|
2
|
+
import { AppVersionEvent } from './api/events/system';
|
|
3
|
+
import { TypedEventEmitter } from './api/events/typedEventEmitter';
|
|
10
4
|
import type { ExternalApplication } from './api/external-application';
|
|
11
5
|
import { FinApi } from './api/fin';
|
|
12
6
|
import type { _Frame } from './api/frame';
|
|
@@ -16,27 +10,48 @@ import type { ChannelProvider } from './api/interappbus/channel/provider';
|
|
|
16
10
|
import type { InteropBroker, InteropClient } from './api/interop';
|
|
17
11
|
import type { Platform } from './api/platform';
|
|
18
12
|
import type { Layout } from './api/platform/layout';
|
|
13
|
+
import { PlatformProvider } from './api/platform/provider';
|
|
19
14
|
import { SnapshotSource } from './api/snapshot-source';
|
|
20
15
|
import type { View } from './api/view';
|
|
21
16
|
import { _Window } from './api/window';
|
|
22
17
|
export declare type Fin<MeType extends EntityType = 'window' | 'view'> = FinApi<MeType>;
|
|
23
18
|
export type { Application, ExternalApplication, _Frame as Frame, ChannelClient, ChannelProvider, Platform, Layout, View, _Window as Window, InteropClient, InteropBroker, SnapshotSource };
|
|
24
19
|
export declare type WebContent = View | _Window;
|
|
20
|
+
export type { PlatformProvider };
|
|
25
21
|
export declare type ApplicationIdentity = {
|
|
26
22
|
uuid: string;
|
|
27
23
|
};
|
|
28
24
|
export declare type Identity = {
|
|
25
|
+
/**
|
|
26
|
+
* Universally unique identifier of the compenent
|
|
27
|
+
*/
|
|
29
28
|
uuid: string;
|
|
29
|
+
/**
|
|
30
|
+
* The name of the component
|
|
31
|
+
*/
|
|
30
32
|
name: string;
|
|
31
33
|
};
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
+
*/
|
|
35
41
|
endpointId: string;
|
|
36
42
|
isLocalEndpointId: boolean;
|
|
37
43
|
};
|
|
44
|
+
/**
|
|
45
|
+
* Extended channel client information
|
|
46
|
+
*/
|
|
38
47
|
export declare type ClientInfo = Omit<ClientIdentity, 'isLocalEndpointId'> & {
|
|
48
|
+
/**
|
|
49
|
+
* Indicates if the client belongs to a Window or View
|
|
50
|
+
*/
|
|
39
51
|
entityType: EntityType;
|
|
52
|
+
/**
|
|
53
|
+
* URL of the View or Window at the time of connection to the Channel Provider.
|
|
54
|
+
*/
|
|
40
55
|
connectionUrl: string;
|
|
41
56
|
};
|
|
42
57
|
export declare type ClientIdentityMultiRuntime = ClientIdentity & {
|
|
@@ -61,48 +76,160 @@ export declare type WindowBounds = Bounds & {
|
|
|
61
76
|
bottom: number;
|
|
62
77
|
right: number;
|
|
63
78
|
};
|
|
79
|
+
/**
|
|
80
|
+
* A rectangular area on the screen.
|
|
81
|
+
*/
|
|
64
82
|
export declare type Rectangle = {
|
|
83
|
+
/**
|
|
84
|
+
* The x coordinate of the rectangle's origin in pixels
|
|
85
|
+
*/
|
|
65
86
|
x: number;
|
|
87
|
+
/**
|
|
88
|
+
* The y coordinate of the rectangle's origin in pixels
|
|
89
|
+
*/
|
|
66
90
|
y: number;
|
|
91
|
+
/**
|
|
92
|
+
* The width of the rectangle in pixels
|
|
93
|
+
*/
|
|
67
94
|
width: number;
|
|
95
|
+
/**
|
|
96
|
+
* The height of the rectangle in pixels
|
|
97
|
+
*/
|
|
68
98
|
height: number;
|
|
69
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
|
+
*/
|
|
70
115
|
export declare type ApplicationCreationOptions = Partial<ApplicationOptions> & {
|
|
71
116
|
name: string;
|
|
72
117
|
uuid: string;
|
|
73
118
|
};
|
|
119
|
+
/**
|
|
120
|
+
* The complete set of options for an application.
|
|
121
|
+
*/
|
|
74
122
|
export declare type ApplicationOptions = LegacyWinOptionsInAppOptions & {
|
|
123
|
+
/**
|
|
124
|
+
* @defaultValue false
|
|
125
|
+
*
|
|
126
|
+
* Disables IAB secure logging for the app.
|
|
127
|
+
*/
|
|
75
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
|
+
*/
|
|
76
138
|
loadErrorMessage: string;
|
|
139
|
+
/**
|
|
140
|
+
* The options of the main window of the application.
|
|
141
|
+
*/
|
|
77
142
|
mainWindowOptions: WindowCreationOptions;
|
|
143
|
+
/**
|
|
144
|
+
* The name of the application (and the application's main window).
|
|
145
|
+
*
|
|
146
|
+
* If provided, _must_ match `uuid`.
|
|
147
|
+
*/
|
|
78
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
|
+
*/
|
|
79
155
|
nonPersistent: boolean;
|
|
156
|
+
/**
|
|
157
|
+
* @defaultValue false
|
|
158
|
+
*
|
|
159
|
+
* Enable Flash at the application level.
|
|
160
|
+
*/
|
|
80
161
|
plugins: boolean;
|
|
162
|
+
/**
|
|
163
|
+
* @defaultValue false
|
|
164
|
+
* Enable spell check at the application level.
|
|
165
|
+
*/
|
|
81
166
|
spellCheck: boolean;
|
|
167
|
+
/**
|
|
168
|
+
* @defaultValue 'about:blank'
|
|
169
|
+
* The url to the application (specifically the application's main window).
|
|
170
|
+
*/
|
|
82
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
|
+
*/
|
|
83
178
|
uuid: string;
|
|
179
|
+
/**
|
|
180
|
+
* @defaultValue true
|
|
181
|
+
*
|
|
182
|
+
* When set to `false` it will disable the same-origin policy for the app.
|
|
183
|
+
*/
|
|
84
184
|
webSecurity: boolean;
|
|
85
185
|
commands: ShortcutOverride[];
|
|
86
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
|
+
*/
|
|
87
193
|
maxViewPoolSize: number;
|
|
88
194
|
defaultWindowOptions: Partial<WindowOptions>;
|
|
89
195
|
defaultViewOptions: Partial<ViewOptions>;
|
|
90
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
|
+
*/
|
|
91
204
|
preventQuitOnLastWindowClosed: boolean;
|
|
92
205
|
interopBrokerConfiguration: InteropBrokerOptions;
|
|
93
206
|
apiDiagnostics: boolean;
|
|
94
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
|
+
*/
|
|
95
213
|
enableJumpList: boolean;
|
|
96
214
|
enableBeforeUnload: boolean;
|
|
97
215
|
};
|
|
98
|
-
declare type InteropBrokerOptions = {
|
|
216
|
+
export declare type InteropBrokerOptions = {
|
|
99
217
|
contextGroups?: ContextGroupInfo;
|
|
100
218
|
logging?: InteropLoggingOptions;
|
|
101
219
|
};
|
|
102
220
|
export declare type ContextGroupInfo = {
|
|
221
|
+
/**
|
|
222
|
+
* Name of the context group.
|
|
223
|
+
*/
|
|
103
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
|
+
*/
|
|
104
228
|
displayMetadata?: DisplayMetadata;
|
|
105
229
|
};
|
|
230
|
+
/**
|
|
231
|
+
* The display data for a context group.
|
|
232
|
+
*/
|
|
106
233
|
export declare type DisplayMetadata = {
|
|
107
234
|
/**
|
|
108
235
|
* A user-readable name for this context group, e.g: `"Red"`
|
|
@@ -117,7 +244,7 @@ export declare type DisplayMetadata = {
|
|
|
117
244
|
*/
|
|
118
245
|
readonly glyph?: string;
|
|
119
246
|
};
|
|
120
|
-
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'>;
|
|
121
248
|
export declare type Snapshot = {
|
|
122
249
|
windows: WindowCreationOptions[];
|
|
123
250
|
snapshotDetails?: {
|
|
@@ -134,28 +261,61 @@ export declare type ContextGroupStates = {
|
|
|
134
261
|
[key: string]: Context;
|
|
135
262
|
};
|
|
136
263
|
};
|
|
264
|
+
/**
|
|
265
|
+
* Data passed between entities and applications.
|
|
266
|
+
*/
|
|
137
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
|
+
*/
|
|
138
271
|
id?: {
|
|
139
272
|
[key: string]: string;
|
|
140
273
|
};
|
|
274
|
+
/**
|
|
275
|
+
* User-readable name for the incoming context.
|
|
276
|
+
*/
|
|
141
277
|
name?: string;
|
|
278
|
+
/**
|
|
279
|
+
* Conserved type for the context (e.g. `instrument` or `country`).
|
|
280
|
+
*/
|
|
142
281
|
type: string;
|
|
143
282
|
};
|
|
144
283
|
export declare type MonitorInfo = {
|
|
284
|
+
/**
|
|
285
|
+
* The device scale factor.
|
|
286
|
+
*/
|
|
145
287
|
deviceScaleFactor: number;
|
|
146
288
|
dpi: Point;
|
|
147
289
|
nonPrimaryMonitors: MonitorDetails[];
|
|
148
290
|
primaryMonitor: MonitorDetails;
|
|
291
|
+
/**
|
|
292
|
+
* Always "api-query".
|
|
293
|
+
*/
|
|
149
294
|
reason: string;
|
|
150
295
|
taskbar: TaskBar;
|
|
296
|
+
/**
|
|
297
|
+
* The virtual display screen coordinates.
|
|
298
|
+
*/
|
|
151
299
|
virtualScreen: DipRect;
|
|
152
300
|
};
|
|
153
301
|
export declare type Point = {
|
|
302
|
+
/**
|
|
303
|
+
* The mouse x position
|
|
304
|
+
*/
|
|
154
305
|
x: number;
|
|
306
|
+
/**
|
|
307
|
+
* The mouse y position
|
|
308
|
+
*/
|
|
155
309
|
y: number;
|
|
156
310
|
};
|
|
157
311
|
export declare type PointTopLeft = {
|
|
312
|
+
/**
|
|
313
|
+
* The mouse top position in virtual screen coordinates
|
|
314
|
+
*/
|
|
158
315
|
top: number;
|
|
316
|
+
/**
|
|
317
|
+
* The mouse left position in virtual screen coordinates
|
|
318
|
+
*/
|
|
159
319
|
left: number;
|
|
160
320
|
};
|
|
161
321
|
export declare type RectangleByEdgePositions = {
|
|
@@ -165,14 +325,38 @@ export declare type RectangleByEdgePositions = {
|
|
|
165
325
|
right: number;
|
|
166
326
|
};
|
|
167
327
|
export declare type MonitorDetails = {
|
|
328
|
+
/**
|
|
329
|
+
* The available DIP scale coordinates.
|
|
330
|
+
*/
|
|
168
331
|
available: DipScaleRects;
|
|
332
|
+
/**
|
|
333
|
+
* The available monitor coordinates.
|
|
334
|
+
*/
|
|
169
335
|
availableRect: RectangleByEdgePositions;
|
|
336
|
+
/**
|
|
337
|
+
* The device id of the display.
|
|
338
|
+
*/
|
|
170
339
|
deviceId: string | number;
|
|
340
|
+
/**
|
|
341
|
+
* True if the display is active.
|
|
342
|
+
*/
|
|
171
343
|
displayDeviceActive: boolean;
|
|
344
|
+
/**
|
|
345
|
+
* The device scale factor.
|
|
346
|
+
*/
|
|
172
347
|
deviceScaleFactor: number;
|
|
348
|
+
/**
|
|
349
|
+
* The monitor coordinates.
|
|
350
|
+
*/
|
|
173
351
|
monitorRect: RectangleByEdgePositions;
|
|
352
|
+
/**
|
|
353
|
+
* The name of the display.
|
|
354
|
+
*/
|
|
174
355
|
name: string | number;
|
|
175
356
|
dpi: Point;
|
|
357
|
+
/**
|
|
358
|
+
* The monitor coordinates.
|
|
359
|
+
*/
|
|
176
360
|
monitor: DipScaleRects;
|
|
177
361
|
};
|
|
178
362
|
export declare type DipRect = RectangleByEdgePositions & {
|
|
@@ -184,91 +368,428 @@ export declare type DipScaleRects = {
|
|
|
184
368
|
scaledRect: RectangleByEdgePositions;
|
|
185
369
|
};
|
|
186
370
|
export declare type TaskBar = DipScaleRects & {
|
|
371
|
+
/**
|
|
372
|
+
* Which edge of a monitor the taskbar is on
|
|
373
|
+
*/
|
|
187
374
|
edge: string;
|
|
375
|
+
/**
|
|
376
|
+
* The taskbar coordinates.
|
|
377
|
+
*/
|
|
188
378
|
rect: RectangleByEdgePositions;
|
|
189
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
|
+
*/
|
|
190
386
|
export declare type WindowCreationOptions = Partial<WindowOptions> & {
|
|
191
387
|
name: string;
|
|
192
388
|
};
|
|
193
389
|
export declare type UpdatableWindowOptions = Partial<MutableWindowOptions>;
|
|
194
390
|
export declare type WindowOptions = MutableWindowOptions & ConstWindowOptions;
|
|
391
|
+
/**
|
|
392
|
+
* Configuration for view visibility settings
|
|
393
|
+
*/
|
|
195
394
|
export declare type ViewVisibilityOption = {
|
|
196
395
|
enabled?: boolean;
|
|
197
396
|
};
|
|
397
|
+
/**
|
|
398
|
+
* _Platform Windows Only_. Enables views to be shown when a Platform Window is being resized by the user.
|
|
399
|
+
*/
|
|
198
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
|
+
*/
|
|
199
412
|
paintIntervalMs?: number;
|
|
200
413
|
};
|
|
414
|
+
/**
|
|
415
|
+
* _Platform Windows Only_. Controls behavior for showing views when they are being resized by the user.
|
|
416
|
+
*/
|
|
201
417
|
export declare type ViewVisibilityOptions = {
|
|
418
|
+
/**
|
|
419
|
+
* Enables views to be shown when a Platform Window is being resized by the user.
|
|
420
|
+
*/
|
|
202
421
|
showViewsOnWindowResize?: ShowViewOnWindowResizeOptions;
|
|
422
|
+
/**
|
|
423
|
+
* Allows views to be shown when they are resized by the user dragging the splitter between layout stacks.
|
|
424
|
+
*/
|
|
203
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
|
+
*/
|
|
204
429
|
showViewsOnTabDrag?: ViewVisibilityOption;
|
|
205
430
|
};
|
|
431
|
+
/**
|
|
432
|
+
* Visibility state of a window.
|
|
433
|
+
*/
|
|
206
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
|
+
*/
|
|
207
439
|
export declare type ConstWindowOptions = {
|
|
440
|
+
/**
|
|
441
|
+
* Enable keyboard shortcuts for devtools, zoom, reload, and reload ignoring cache.
|
|
442
|
+
*/
|
|
208
443
|
accelerator: Partial<Accelerator>;
|
|
444
|
+
/**
|
|
445
|
+
* Configurations for API injection.
|
|
446
|
+
*/
|
|
209
447
|
api: Api;
|
|
448
|
+
/**
|
|
449
|
+
* @deprecated use `icon` instead.
|
|
450
|
+
*/
|
|
210
451
|
applicationIcon: string;
|
|
452
|
+
autoplayPolicy: AutoplayPolicyOptions;
|
|
453
|
+
/**
|
|
454
|
+
* Automatically show the window when it is created.
|
|
455
|
+
*/
|
|
211
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
|
+
*/
|
|
212
465
|
backgroundColor: string;
|
|
466
|
+
/**
|
|
467
|
+
* Configures how new content (e,g, from `window.open` or a link) is opened.
|
|
468
|
+
*/
|
|
213
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
|
+
*/
|
|
214
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
|
+
*/
|
|
215
481
|
contentRedirect: Partial<ContentRedirect>;
|
|
482
|
+
/**
|
|
483
|
+
* Custom headers for requests sent by the window.
|
|
484
|
+
*/
|
|
216
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
|
+
*/
|
|
217
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
|
+
*/
|
|
218
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
|
+
*/
|
|
219
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
|
+
*/
|
|
220
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
|
+
*/
|
|
221
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
|
+
*/
|
|
222
529
|
defaultWidth: number;
|
|
223
530
|
height: number;
|
|
224
531
|
layout: any;
|
|
532
|
+
/**
|
|
533
|
+
* Parent identity of a modal window. It will create a modal child window when this option is set.
|
|
534
|
+
*/
|
|
225
535
|
modalParentIdentity: Identity;
|
|
536
|
+
/**
|
|
537
|
+
* The name of the window.
|
|
538
|
+
*/
|
|
226
539
|
name: string;
|
|
227
540
|
permissions: Partial<Permissions>;
|
|
541
|
+
/**
|
|
542
|
+
* Scripts that run before page load. When omitted, inherits from the parent application.
|
|
543
|
+
*/
|
|
228
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
|
+
*/
|
|
229
548
|
processAffinity: string;
|
|
230
|
-
|
|
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
|
+
*/
|
|
231
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
|
+
*/
|
|
232
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
|
+
*/
|
|
233
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
|
+
*/
|
|
234
586
|
state: WindowState;
|
|
587
|
+
/**
|
|
588
|
+
* @Deprecated - use `icon` instead.
|
|
589
|
+
*/
|
|
235
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
|
+
*/
|
|
236
595
|
taskbarIconGroup: string;
|
|
596
|
+
/**
|
|
597
|
+
* @defaultValue "about:blank"
|
|
598
|
+
*
|
|
599
|
+
* The URL of the window
|
|
600
|
+
*/
|
|
237
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
|
+
*/
|
|
238
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
|
+
*/
|
|
239
618
|
waitForPageLoad: boolean;
|
|
240
619
|
width: number;
|
|
241
620
|
x: number;
|
|
242
621
|
y: number;
|
|
243
622
|
experimental?: any;
|
|
244
623
|
fdc3InteropApi?: string;
|
|
624
|
+
/**
|
|
625
|
+
* _Platform Windows Only_. Controls behavior for showing views when they are being resized by the user.
|
|
626
|
+
*/
|
|
245
627
|
viewVisibility?: ViewVisibilityOptions;
|
|
246
628
|
};
|
|
629
|
+
/**
|
|
630
|
+
* Window options that can be changed after window creation.
|
|
631
|
+
*/
|
|
247
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
|
+
*/
|
|
248
644
|
alphaMask: RGB;
|
|
645
|
+
/**
|
|
646
|
+
* @defaultValue false
|
|
647
|
+
*
|
|
648
|
+
* Always position the window at the top of the window stack.
|
|
649
|
+
*/
|
|
249
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
|
+
*/
|
|
250
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
|
+
*/
|
|
251
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
|
+
*/
|
|
252
672
|
contextMenuSettings: ContextMenuSettings;
|
|
673
|
+
/**
|
|
674
|
+
* Configure the context menu when right-clicking on a window.
|
|
675
|
+
*/
|
|
253
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
|
+
*/
|
|
254
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
|
+
*/
|
|
255
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
|
+
*/
|
|
256
694
|
customData: any;
|
|
695
|
+
/**
|
|
696
|
+
* @defaultValue true
|
|
697
|
+
*
|
|
698
|
+
* Show the window's frame.
|
|
699
|
+
*/
|
|
257
700
|
frame: boolean;
|
|
701
|
+
/**
|
|
702
|
+
* @defaultValue false
|
|
703
|
+
*
|
|
704
|
+
* Hides the window instead of closing it when the close button is pressed.
|
|
705
|
+
*/
|
|
258
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
|
+
*/
|
|
259
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
|
+
*/
|
|
260
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
|
+
*/
|
|
261
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
|
+
*/
|
|
262
732
|
maxHeight: number;
|
|
733
|
+
/**
|
|
734
|
+
* @defaultValue true
|
|
735
|
+
*
|
|
736
|
+
* Allows the window to be maximized.
|
|
737
|
+
*/
|
|
263
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
|
+
*/
|
|
264
744
|
maxWidth: number;
|
|
745
|
+
/**
|
|
746
|
+
* @defaultValue 0
|
|
747
|
+
*
|
|
748
|
+
* The minimum height of the window.
|
|
749
|
+
*/
|
|
265
750
|
minHeight: number;
|
|
751
|
+
/**
|
|
752
|
+
* @defaultValue true
|
|
753
|
+
*
|
|
754
|
+
* Allows the window to be minimized.
|
|
755
|
+
*/
|
|
266
756
|
minimizable: boolean;
|
|
757
|
+
/**
|
|
758
|
+
* @defaultValue true
|
|
759
|
+
*
|
|
760
|
+
* The minimum width of the window.
|
|
761
|
+
*/
|
|
267
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
|
+
*/
|
|
268
770
|
opacity: number;
|
|
771
|
+
/**
|
|
772
|
+
* @defaultValue true
|
|
773
|
+
*
|
|
774
|
+
* A flag to allow the user to resize the window.
|
|
775
|
+
*/
|
|
269
776
|
resizable: boolean;
|
|
777
|
+
/**
|
|
778
|
+
* Defines a region in pixels that will respond to user mouse interaction for resizing a frameless window.
|
|
779
|
+
*/
|
|
270
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
|
+
*/
|
|
271
787
|
showBackgroundImages: boolean;
|
|
788
|
+
/**
|
|
789
|
+
* @defaultValue true
|
|
790
|
+
*
|
|
791
|
+
* Shows the window's icon in the taskbar.
|
|
792
|
+
*/
|
|
272
793
|
showTaskbarIcon: boolean;
|
|
273
794
|
interop: InteropConfig;
|
|
274
795
|
workspacePlatform: WorkspacePlatformOptions;
|
|
@@ -277,11 +798,25 @@ export declare type WorkspacePlatformOptions = {
|
|
|
277
798
|
/** Leaving this as any for now until we figure out what the shape should look like in Workspace */
|
|
278
799
|
[key: string]: any;
|
|
279
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
|
+
*/
|
|
280
805
|
export declare type WebRequestHeader = {
|
|
281
806
|
[key: string]: string;
|
|
282
807
|
};
|
|
808
|
+
/**
|
|
809
|
+
* Custom headers for requests sent by the window.
|
|
810
|
+
*/
|
|
283
811
|
export declare type CustomRequestHeaders = {
|
|
812
|
+
/**
|
|
813
|
+
* The URL patterns for which the headers will be applied.
|
|
814
|
+
*/
|
|
284
815
|
urlPatterns: string[];
|
|
816
|
+
/**
|
|
817
|
+
* Headers for requests sent by window; {key: value} results
|
|
818
|
+
* in a header of `key=value`.
|
|
819
|
+
*/
|
|
285
820
|
headers: WebRequestHeader[];
|
|
286
821
|
};
|
|
287
822
|
export declare type WindowOptionDiff = {
|
|
@@ -290,47 +825,180 @@ export declare type WindowOptionDiff = {
|
|
|
290
825
|
newVal: WindowOptions[key];
|
|
291
826
|
};
|
|
292
827
|
};
|
|
828
|
+
/**
|
|
829
|
+
* Defines a region in pixels that will respond to user mouse interaction for resizing a frameless window.
|
|
830
|
+
*/
|
|
293
831
|
export declare type ResizeRegion = {
|
|
832
|
+
/**
|
|
833
|
+
* @defaultValue 7
|
|
834
|
+
*
|
|
835
|
+
* The size of the resize region in pixels.
|
|
836
|
+
*/
|
|
294
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
|
+
*/
|
|
295
843
|
bottomRightCorner?: number;
|
|
844
|
+
/**
|
|
845
|
+
* Enables resizing interaction for each side of the window.
|
|
846
|
+
*/
|
|
296
847
|
sides?: {
|
|
848
|
+
/**
|
|
849
|
+
* @defaultValue true
|
|
850
|
+
*
|
|
851
|
+
* Enables resizing from the top of the window.
|
|
852
|
+
*/
|
|
297
853
|
top?: boolean;
|
|
854
|
+
/**
|
|
855
|
+
* @defaultValue true
|
|
856
|
+
*
|
|
857
|
+
* Enables resizing from the bottom of the window.
|
|
858
|
+
*/
|
|
298
859
|
bottom?: boolean;
|
|
860
|
+
/**
|
|
861
|
+
* @defaultValue true
|
|
862
|
+
*
|
|
863
|
+
* Enables resizing from the left side of the window.
|
|
864
|
+
*/
|
|
299
865
|
left?: boolean;
|
|
866
|
+
/**
|
|
867
|
+
* @defaultValue true
|
|
868
|
+
*
|
|
869
|
+
* Enables resizing from the right side of the window.
|
|
870
|
+
*/
|
|
300
871
|
right?: boolean;
|
|
301
872
|
};
|
|
302
873
|
};
|
|
874
|
+
/**
|
|
875
|
+
* Enable keyboard shortcuts for devtools, zoom, reload, and reload ignoring cache.
|
|
876
|
+
*/
|
|
303
877
|
export declare type Accelerator = {
|
|
878
|
+
/**
|
|
879
|
+
* If `true`, enables the devtools keyboard shortcut:<br>
|
|
880
|
+
* `Ctrl` + `Shift` + `I` _(Toggles Devtools)_
|
|
881
|
+
*/
|
|
304
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
|
+
*/
|
|
305
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
|
+
*/
|
|
306
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
|
+
*/
|
|
307
909
|
zoom: boolean;
|
|
308
910
|
};
|
|
911
|
+
/**
|
|
912
|
+
* Configurations for API injection.
|
|
913
|
+
*/
|
|
309
914
|
export declare type Api = {
|
|
915
|
+
/**
|
|
916
|
+
* Configure injection of OpenFin API into iframes based on domain
|
|
917
|
+
*/
|
|
310
918
|
iframe?: {
|
|
919
|
+
/**
|
|
920
|
+
* Inject OpenFin API into cross-origin iframes
|
|
921
|
+
*/
|
|
311
922
|
crossOriginInjection?: boolean;
|
|
923
|
+
/**
|
|
924
|
+
* Inject OpenFin API into same-origin iframes
|
|
925
|
+
*/
|
|
312
926
|
sameOriginInjection?: boolean;
|
|
313
927
|
enableDeprecatedSharedName?: boolean;
|
|
314
928
|
};
|
|
315
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
|
+
*/
|
|
316
935
|
export declare type ContentNavigation = {
|
|
936
|
+
/**
|
|
937
|
+
* Allowed URLs for navigation.
|
|
938
|
+
*/
|
|
317
939
|
whitelist?: string[];
|
|
940
|
+
/**
|
|
941
|
+
* Forbidden URLs for navigation.
|
|
942
|
+
*/
|
|
318
943
|
blacklist?: string[];
|
|
319
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
|
+
*/
|
|
320
950
|
export declare type ContentRedirect = {
|
|
951
|
+
/**
|
|
952
|
+
* Allowed URLs for redirects.
|
|
953
|
+
*/
|
|
321
954
|
whitelist: string[];
|
|
955
|
+
/**
|
|
956
|
+
* Forbidden URLs for redirects.
|
|
957
|
+
*/
|
|
322
958
|
blacklist: string[];
|
|
323
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
|
+
*/
|
|
324
964
|
export declare type CornerRounding = {
|
|
965
|
+
/**
|
|
966
|
+
* @defaultValue 0
|
|
967
|
+
*
|
|
968
|
+
* The height in pixels.
|
|
969
|
+
*/
|
|
325
970
|
height: number;
|
|
971
|
+
/**
|
|
972
|
+
* @defaultValue 0
|
|
973
|
+
*
|
|
974
|
+
* The width in pixels.
|
|
975
|
+
*/
|
|
326
976
|
width: number;
|
|
327
977
|
};
|
|
978
|
+
/**
|
|
979
|
+
* Options for downloading a preload script.
|
|
980
|
+
*/
|
|
328
981
|
export declare type DownloadPreloadOption = {
|
|
982
|
+
/**
|
|
983
|
+
* URL from which to download the preload script.
|
|
984
|
+
*/
|
|
329
985
|
url: string;
|
|
330
986
|
};
|
|
987
|
+
/**
|
|
988
|
+
* Metadata returned from a preload script download request.
|
|
989
|
+
*/
|
|
331
990
|
export declare type DownloadPreloadInfo = {
|
|
991
|
+
/**
|
|
992
|
+
* Whether the download was successful.
|
|
993
|
+
*/
|
|
332
994
|
success: boolean;
|
|
995
|
+
/**
|
|
996
|
+
* URL from which the preload script should be downloaded.
|
|
997
|
+
*/
|
|
333
998
|
url?: string;
|
|
999
|
+
/**
|
|
1000
|
+
* Error during preload script download.
|
|
1001
|
+
*/
|
|
334
1002
|
error: string;
|
|
335
1003
|
};
|
|
336
1004
|
export declare type RGB = {
|
|
@@ -338,21 +1006,59 @@ export declare type RGB = {
|
|
|
338
1006
|
blue: number;
|
|
339
1007
|
green: number;
|
|
340
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
|
+
*/
|
|
341
1013
|
export declare type ContextMenuSettings = {
|
|
1014
|
+
/**
|
|
1015
|
+
* Should the context menu display on right click.
|
|
1016
|
+
*/
|
|
342
1017
|
enable: boolean;
|
|
1018
|
+
/**
|
|
1019
|
+
* Should the context menu contain a button for opening devtools.
|
|
1020
|
+
*/
|
|
343
1021
|
devtools?: boolean;
|
|
1022
|
+
/**
|
|
1023
|
+
* Should the context menu contain a button for reloading the page.
|
|
1024
|
+
*/
|
|
344
1025
|
reload?: boolean;
|
|
345
1026
|
};
|
|
1027
|
+
/**
|
|
1028
|
+
* A hotkey binding.
|
|
1029
|
+
*/
|
|
346
1030
|
export declare type Hotkey = {
|
|
1031
|
+
/**
|
|
1032
|
+
* The key combination of the hotkey, i.e. "Ctrl+T".
|
|
1033
|
+
*/
|
|
347
1034
|
keys: string;
|
|
1035
|
+
/**
|
|
1036
|
+
* @defaultValue false
|
|
1037
|
+
*
|
|
1038
|
+
* Prevent default key handling before emitting the event.
|
|
1039
|
+
*/
|
|
348
1040
|
preventDefault?: boolean;
|
|
349
1041
|
};
|
|
350
1042
|
export declare type ShortcutOverride = Hotkey & {
|
|
351
1043
|
command: string;
|
|
352
1044
|
};
|
|
1045
|
+
/**
|
|
1046
|
+
* A script that is run before page load.
|
|
1047
|
+
*/
|
|
353
1048
|
export declare type PreloadScript = {
|
|
1049
|
+
/**
|
|
1050
|
+
* @defaultValue false
|
|
1051
|
+
*
|
|
1052
|
+
* Fail to load the window if this preload script fails
|
|
1053
|
+
*/
|
|
354
1054
|
mandatory?: boolean;
|
|
1055
|
+
/**
|
|
1056
|
+
* Preload script execution state.
|
|
1057
|
+
*/
|
|
355
1058
|
state?: 'load-started' | 'load-failed' | 'load-succeeded' | 'failed' | 'succeeded';
|
|
1059
|
+
/**
|
|
1060
|
+
* The URL from which the script was loaded.
|
|
1061
|
+
*/
|
|
356
1062
|
url: string;
|
|
357
1063
|
};
|
|
358
1064
|
export declare type AutoResizeOptions = {
|
|
@@ -378,7 +1084,13 @@ export declare type AutoResizeOptions = {
|
|
|
378
1084
|
vertical?: boolean;
|
|
379
1085
|
};
|
|
380
1086
|
export declare type InteropConfig = {
|
|
1087
|
+
/**
|
|
1088
|
+
* Context Group for the client. (green, yellow, red, etc.).
|
|
1089
|
+
*/
|
|
381
1090
|
currentContextGroup?: string | null;
|
|
1091
|
+
/**
|
|
1092
|
+
* When provided, automatically connects the client to the specified provider uuid.
|
|
1093
|
+
*/
|
|
382
1094
|
providerId?: string;
|
|
383
1095
|
};
|
|
384
1096
|
export declare type ViewInfo = {
|
|
@@ -389,7 +1101,16 @@ export declare type ViewInfo = {
|
|
|
389
1101
|
url: string;
|
|
390
1102
|
favicons: string[];
|
|
391
1103
|
};
|
|
1104
|
+
/**
|
|
1105
|
+
* View options that can be updated after creation.
|
|
1106
|
+
*/
|
|
392
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
|
+
*/
|
|
393
1114
|
export declare type ViewCreationOptions = Partial<ViewOptions> & {
|
|
394
1115
|
name: string;
|
|
395
1116
|
url: string;
|
|
@@ -397,37 +1118,144 @@ export declare type ViewCreationOptions = Partial<ViewOptions> & {
|
|
|
397
1118
|
};
|
|
398
1119
|
export declare type MutableViewOptions = {
|
|
399
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
|
+
*/
|
|
400
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
|
+
*/
|
|
401
1135
|
contextMenuSettings: ContextMenuSettings;
|
|
1136
|
+
/**
|
|
1137
|
+
* Configure the context menu when right-clicking on a window.
|
|
1138
|
+
*/
|
|
402
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
|
+
*/
|
|
403
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
|
+
*/
|
|
404
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
|
+
*/
|
|
405
1161
|
customContext: any;
|
|
1162
|
+
/**
|
|
1163
|
+
* Configurations for API injection.
|
|
1164
|
+
*/
|
|
406
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
|
+
*/
|
|
407
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
|
+
*/
|
|
408
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
|
+
*/
|
|
409
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
|
+
*/
|
|
410
1192
|
preventDragOut: boolean;
|
|
411
1193
|
interop?: InteropConfig;
|
|
412
1194
|
};
|
|
1195
|
+
/**
|
|
1196
|
+
* User-facing options for a view.
|
|
1197
|
+
*/
|
|
413
1198
|
export declare type ViewOptions = ConstViewOptions & MutableViewOptions;
|
|
1199
|
+
/**
|
|
1200
|
+
* View options that cannot be updated after creation.
|
|
1201
|
+
*/
|
|
414
1202
|
export declare type ConstViewOptions = {
|
|
1203
|
+
/**
|
|
1204
|
+
* The name of the view.
|
|
1205
|
+
*/
|
|
415
1206
|
name: string;
|
|
1207
|
+
/**
|
|
1208
|
+
* @defaultValue "about:blank"
|
|
1209
|
+
*
|
|
1210
|
+
* The URL of the window
|
|
1211
|
+
*/
|
|
416
1212
|
url: string;
|
|
1213
|
+
/**
|
|
1214
|
+
* The identity of the window this view should be attached to.
|
|
1215
|
+
*/
|
|
417
1216
|
target: Identity;
|
|
1217
|
+
/**
|
|
1218
|
+
* Configures how new content (e,g, from `window.open` or a link) is opened.
|
|
1219
|
+
*/
|
|
418
1220
|
contentCreation: ContentCreationOptions;
|
|
1221
|
+
/**
|
|
1222
|
+
* Custom headers for requests sent by the view.
|
|
1223
|
+
*/
|
|
419
1224
|
customRequestHeaders: CustomRequestHeaders[];
|
|
1225
|
+
/**
|
|
1226
|
+
* Initial bounds given relative to the window.
|
|
1227
|
+
*/
|
|
420
1228
|
bounds: Bounds;
|
|
421
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
|
+
*/
|
|
422
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
|
+
*/
|
|
423
1240
|
hotkeys: Hotkey[];
|
|
1241
|
+
/**
|
|
1242
|
+
* Scripts that run before page load. When omitted, inherits from the parent application.
|
|
1243
|
+
*/
|
|
424
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
|
+
*/
|
|
425
1249
|
manifestUrl: string;
|
|
426
1250
|
zoomLevel: number;
|
|
427
1251
|
experimental: any;
|
|
428
1252
|
fdc3InteropApi?: string;
|
|
429
1253
|
enableBeforeUnload: boolean;
|
|
1254
|
+
/**
|
|
1255
|
+
* Enable keyboard shortcuts for devtools, zoom, reload, and reload ignoring cache.
|
|
1256
|
+
*/
|
|
430
1257
|
accelerator?: Partial<Accelerator>;
|
|
1258
|
+
autoplayPolicy: AutoplayPolicyOptions;
|
|
431
1259
|
};
|
|
432
1260
|
export declare type ViewState = ViewCreationOptions & {
|
|
433
1261
|
backgroundThrottling: boolean;
|
|
@@ -456,20 +1284,60 @@ declare type CertificatePrincipal = {
|
|
|
456
1284
|
state: string;
|
|
457
1285
|
};
|
|
458
1286
|
export declare type HostContextChangedPayload = {
|
|
1287
|
+
/**
|
|
1288
|
+
* The new context object
|
|
1289
|
+
*/
|
|
459
1290
|
context: any;
|
|
1291
|
+
/**
|
|
1292
|
+
* The reason for the update.
|
|
1293
|
+
*/
|
|
460
1294
|
reason: HostContextChangedReasons;
|
|
461
1295
|
};
|
|
462
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
|
+
*/
|
|
463
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
|
+
*/
|
|
464
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
|
+
*/
|
|
465
1318
|
skipOutOfBoundsCheck?: boolean;
|
|
466
1319
|
};
|
|
1320
|
+
/**
|
|
1321
|
+
* Payload sent to Platform Provider when {@link Platform#applySnapshot Platform.applySnapshot} is called.
|
|
1322
|
+
*/
|
|
467
1323
|
export declare type ApplySnapshotPayload = {
|
|
1324
|
+
/**
|
|
1325
|
+
* TThe snapshot to be applied.
|
|
1326
|
+
*/
|
|
468
1327
|
snapshot: Snapshot;
|
|
1328
|
+
/**
|
|
1329
|
+
* Options to customize snapshot application.
|
|
1330
|
+
*/
|
|
469
1331
|
options?: ApplySnapshotOptions;
|
|
470
1332
|
};
|
|
471
1333
|
export declare type CreateViewPayload = {
|
|
1334
|
+
/**
|
|
1335
|
+
* Options for the view to be added.
|
|
1336
|
+
*/
|
|
472
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
|
+
*/
|
|
473
1341
|
target: Identity;
|
|
474
1342
|
targetView?: Identity;
|
|
475
1343
|
};
|
|
@@ -481,28 +1349,58 @@ export declare type ReplaceViewPayload = {
|
|
|
481
1349
|
target: Identity;
|
|
482
1350
|
};
|
|
483
1351
|
export declare type CloseViewPayload = {
|
|
1352
|
+
/**
|
|
1353
|
+
*View to be closed.
|
|
1354
|
+
*/
|
|
484
1355
|
view: Identity;
|
|
485
1356
|
};
|
|
486
1357
|
export declare type FetchManifestPayload = {
|
|
1358
|
+
/**
|
|
1359
|
+
* The URL of the manifest to fetch.
|
|
1360
|
+
*/
|
|
487
1361
|
manifestUrl: string;
|
|
488
1362
|
};
|
|
489
1363
|
export declare type ReplaceLayoutOpts = {
|
|
1364
|
+
/**
|
|
1365
|
+
* Layout config to be applied.
|
|
1366
|
+
*/
|
|
490
1367
|
layout: LayoutOptions;
|
|
491
1368
|
};
|
|
492
1369
|
export declare type ReplaceLayoutPayload = {
|
|
1370
|
+
/**
|
|
1371
|
+
* Object containing the layout to be applied.
|
|
1372
|
+
*/
|
|
493
1373
|
opts: ReplaceLayoutOpts;
|
|
1374
|
+
/**
|
|
1375
|
+
* Identity of the window whose layout will be replace.
|
|
1376
|
+
*/
|
|
494
1377
|
target: Identity;
|
|
495
1378
|
};
|
|
496
1379
|
export declare type SetWindowContextPayload = {
|
|
1380
|
+
/**
|
|
1381
|
+
* The requested context update.
|
|
1382
|
+
*/
|
|
497
1383
|
context: any;
|
|
1384
|
+
/**
|
|
1385
|
+
* Entity type of the target of the context update ('view' or 'window').
|
|
1386
|
+
*/
|
|
498
1387
|
entityType: EntityType;
|
|
1388
|
+
/**
|
|
1389
|
+
* Identity of the entity targeted by the call to {@link Platform#setWindowContext Platform.setWindowContext}.
|
|
1390
|
+
*/
|
|
499
1391
|
target: Identity;
|
|
500
1392
|
};
|
|
501
1393
|
export declare type LaunchIntoPlatformPayload = {
|
|
502
1394
|
manifest: any;
|
|
503
1395
|
};
|
|
504
1396
|
export declare type GetWindowContextPayload = {
|
|
1397
|
+
/**
|
|
1398
|
+
* Entity type of the target of the context update ('view' or 'window').
|
|
1399
|
+
*/
|
|
505
1400
|
entityType: EntityType;
|
|
1401
|
+
/**
|
|
1402
|
+
* Identity of the entity targeted by the call to {@link Platform#setWindowContext Platform.setWindowContext}.
|
|
1403
|
+
*/
|
|
506
1404
|
target: Identity;
|
|
507
1405
|
};
|
|
508
1406
|
export declare type ApplicationPermissions = {
|
|
@@ -515,14 +1413,15 @@ export declare type LaunchExternalProcessRule = {
|
|
|
515
1413
|
export declare type SystemPermissions = {
|
|
516
1414
|
getAllExternalWindows: boolean;
|
|
517
1415
|
launchExternalProcess: boolean | {
|
|
518
|
-
|
|
1416
|
+
enabled: boolean;
|
|
1417
|
+
assets?: {
|
|
519
1418
|
enabled: boolean;
|
|
520
1419
|
srcRules?: LaunchExternalProcessRule[];
|
|
521
1420
|
};
|
|
522
|
-
downloads
|
|
1421
|
+
downloads?: {
|
|
523
1422
|
enabled: boolean;
|
|
524
1423
|
};
|
|
525
|
-
executables
|
|
1424
|
+
executables?: {
|
|
526
1425
|
enabled: boolean;
|
|
527
1426
|
pathRules?: LaunchExternalProcessRule[];
|
|
528
1427
|
};
|
|
@@ -547,18 +1446,48 @@ export declare type PlatformWindowCreationOptions = Partial<WindowCreationOption
|
|
|
547
1446
|
updateStateIfExists?: boolean;
|
|
548
1447
|
reason?: WindowCreationReason;
|
|
549
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
|
+
*/
|
|
550
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
|
+
*/
|
|
551
1461
|
stylesheetUrl: string;
|
|
552
1462
|
};
|
|
553
1463
|
export declare type PlatformViewCreationOptions = Partial<ViewOptions> & {
|
|
554
1464
|
url: string;
|
|
555
1465
|
target: Identity;
|
|
556
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
|
+
*/
|
|
557
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
|
+
*/
|
|
558
1478
|
export declare type PlatformOptions = ApplicationCreationOptions & {
|
|
1479
|
+
/**
|
|
1480
|
+
* Default window options apply to all platform windows.
|
|
1481
|
+
*/
|
|
559
1482
|
defaultWindowOptions?: Partial<PlatformWindowOptions>;
|
|
1483
|
+
/**
|
|
1484
|
+
* Default view options apply to all platform views.
|
|
1485
|
+
*/
|
|
560
1486
|
defaultViewOptions?: Partial<PlatformViewCreationOptions>;
|
|
561
1487
|
disableDefaultCommands?: boolean;
|
|
1488
|
+
/**
|
|
1489
|
+
* Strategy to assign views to process affinity by domain.
|
|
1490
|
+
*/
|
|
562
1491
|
viewProcessAffinityStrategy?: ProcessAffinityStrategy;
|
|
563
1492
|
providerUrl?: string;
|
|
564
1493
|
permissions?: Partial<Permissions>;
|
|
@@ -619,9 +1548,20 @@ export declare type Manifest = {
|
|
|
619
1548
|
};
|
|
620
1549
|
interopBrokerConfiguration: InteropBrokerOptions;
|
|
621
1550
|
};
|
|
622
|
-
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
|
+
*/
|
|
623
1557
|
export declare type LayoutItemConfig = {
|
|
1558
|
+
/**
|
|
1559
|
+
* The type of the item. Possible values are 'row', 'column', 'stack', and 'component'.
|
|
1560
|
+
*/
|
|
624
1561
|
type: string;
|
|
1562
|
+
/**
|
|
1563
|
+
* Array of configurations for items that will be created as children of this item.
|
|
1564
|
+
*/
|
|
625
1565
|
content?: LayoutContent;
|
|
626
1566
|
width?: number;
|
|
627
1567
|
height?: number;
|
|
@@ -640,16 +1580,72 @@ export interface LayoutComponent extends LayoutItemConfig {
|
|
|
640
1580
|
componentState?: Partial<ViewCreationOptions>;
|
|
641
1581
|
}
|
|
642
1582
|
export declare type LayoutOptions = {
|
|
1583
|
+
/**
|
|
1584
|
+
* Represents a potential ways to customize behavior of your Layout
|
|
1585
|
+
*/
|
|
643
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
|
+
*/
|
|
644
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
|
+
*/
|
|
645
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
|
+
*/
|
|
646
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
|
+
*/
|
|
647
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
|
+
*/
|
|
648
1622
|
showCloseIcon?: boolean;
|
|
649
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
|
+
*/
|
|
650
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
|
+
*/
|
|
651
1637
|
reorderEnabled?: boolean;
|
|
1638
|
+
/**
|
|
1639
|
+
* @defaultValue false
|
|
1640
|
+
*
|
|
1641
|
+
* If true, tabs can't be dragged out of the window.
|
|
1642
|
+
*/
|
|
652
1643
|
preventDragOut?: boolean;
|
|
1644
|
+
/**
|
|
1645
|
+
* @defaultValue=false
|
|
1646
|
+
*
|
|
1647
|
+
* If true, tabs can't be dragged into the window.
|
|
1648
|
+
*/
|
|
653
1649
|
preventDragIn?: boolean;
|
|
654
1650
|
};
|
|
655
1651
|
content?: LayoutContent;
|
|
@@ -660,179 +1656,69 @@ export declare type LayoutOptions = {
|
|
|
660
1656
|
headerHeight?: number;
|
|
661
1657
|
};
|
|
662
1658
|
};
|
|
663
|
-
export declare type OverrideCallback<T extends any = PlatformProvider, U extends T = T> = (arg: Constructor<T
|
|
664
|
-
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;
|
|
665
1661
|
export declare type HostContextChangedReasons = 'updated' | 'reparented';
|
|
666
1662
|
export declare type WindowCreationReason = 'tearout' | 'create-view-without-target' | 'api-call' | 'app-creation' | 'restore' | 'apply-snapshot';
|
|
667
|
-
export declare type PlatformProvider = {
|
|
668
|
-
/**
|
|
669
|
-
* Handles requests to create a window in the current platform.
|
|
670
|
-
* @param { WindowOption } payload Window options for the window to be created.
|
|
671
|
-
* @param { Identity } [identity] If {@link Platform#createWindow Platform.createWindow} was called, the identity of the caller will be here.
|
|
672
|
-
* If `createWindow` was called as part of applying a snapshot or creating a view without a target window, `identity` will be undefined.
|
|
673
|
-
*/
|
|
674
|
-
createWindow(options: PlatformWindowCreationOptions, identity?: Identity): Promise<_Window>;
|
|
675
|
-
/**
|
|
676
|
-
* Gets the current state of windows and their views and returns a snapshot object containing that info.
|
|
677
|
-
* @param { undefined } payload Undefined unless you've defined a custom `getSnapshot` protocol.
|
|
678
|
-
* @param { Identity } identity Identity of the entity that called {@link Platform#getSnapshot Platform.getSnapshot}.
|
|
679
|
-
* @return { Promise<Snapshot> } Snapshot of current platform state.
|
|
680
|
-
*/
|
|
681
|
-
getSnapshot(payload: undefined, identity: Identity): Promise<Snapshot>;
|
|
682
|
-
/**
|
|
683
|
-
* 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.
|
|
684
|
-
* @param { Identity } payload Identity of the view.
|
|
685
|
-
* @return { Promise<ViewState> }
|
|
686
|
-
*/
|
|
687
|
-
getViewSnapshot(payload: {
|
|
688
|
-
viewIdentity: Identity;
|
|
689
|
-
}): Promise<ViewState>;
|
|
690
|
-
/**
|
|
691
|
-
* Called when a snapshot is being applied and some windows in that snapshot would be fully or partially off-screen.
|
|
692
|
-
* Returns an array of windows with modified positions, such that any off-screen windows are positioned in the top left
|
|
693
|
-
* corner of the main monitor.
|
|
694
|
-
* @param { Snapshot } snapshot The snapshot to be applied.
|
|
695
|
-
* @param { WindowOptions[] } outOfBoundsWindows An array of WindowOptions for any windows that would be off-screen.
|
|
696
|
-
* @return { Promise<WindowOptions[]> } An array of WindowOptions with their position modified to fit on screen.
|
|
697
|
-
*/
|
|
698
|
-
positionOutOfBoundsWindows(snapshot: Snapshot, outOfBoundsWindows: WindowCreationOptions[]): Promise<WindowCreationOptions[]>;
|
|
699
|
-
/**
|
|
700
|
-
* Handles requests to apply a snapshot to the current Platform.
|
|
701
|
-
* @param { ApplySnapshotPayload } payload Payload containing the snapshot to be applied, as well as any options.
|
|
702
|
-
* @param { Identity } [identity] Identity of the entity that called {@link Platform#applySnapshot Platform.applySnapshot}.
|
|
703
|
-
* Undefined if called internally (e.g. when opening the initial snapshot).
|
|
704
|
-
* @return { Promise<void> }
|
|
705
|
-
*/
|
|
706
|
-
applySnapshot(payload: ApplySnapshotPayload, identity?: Identity): Promise<void>;
|
|
707
|
-
/**
|
|
708
|
-
* Closes the current Platform and all child windows and views.
|
|
709
|
-
* @param { undefined } payload Undefined unless you have implemented a custom quite protocol.
|
|
710
|
-
* @param { Identity } identity Identity of the entity that called {@link Platform#quit Platform.quit}.
|
|
711
|
-
* @return { Promise<void> }
|
|
712
|
-
*/
|
|
713
|
-
quit(payload: undefined, identity: Identity): Promise<void>;
|
|
714
|
-
/**
|
|
715
|
-
* Closes a view
|
|
716
|
-
* @param { CloseViewPayload } payload Specifies the `target` view to be closed.
|
|
717
|
-
* @param { Identity } identity Identity of the entity that called {@link Platform#closeView Platform.closeView}.
|
|
718
|
-
*/
|
|
719
|
-
closeView(payload: CloseViewPayload, identity?: Identity): Promise<any>;
|
|
720
|
-
/**
|
|
721
|
-
* Creates a new view and attaches it to a specified target window.
|
|
722
|
-
* @param { CreateViewPayload } payload Creation options for the new view.
|
|
723
|
-
* @param { Identity } identity Identity of the entity that called {@link Platform#createView Platform.createView}.
|
|
724
|
-
* @return { Promise<void> }
|
|
725
|
-
*/
|
|
726
|
-
createView(payload: CreateViewPayload, identity: Identity): Promise<View>;
|
|
727
|
-
/** Handles requests to fetch manifests in the current platform.
|
|
728
|
-
* @param { FetchManifestPayload } payload Payload containing the manifestUrl to be fetched.
|
|
729
|
-
* @param { Identity } callerIdentity If {@link Platform#fetchManifest Platform.fetchManifest}
|
|
730
|
-
* was called, the identity of the caller will be here.
|
|
731
|
-
* If `fetchManifest` was called internally, `callerIdentity` will be the provider's identity.
|
|
732
|
-
*/
|
|
733
|
-
fetchManifest(payload: FetchManifestPayload, callerIdentity: Identity): Promise<any>;
|
|
734
|
-
/**
|
|
735
|
-
* 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.
|
|
736
|
-
* @param { ReplaceLayoutPayload } payload Contains the `target` window and an `opts` object with a `layout` property to apply.
|
|
737
|
-
* @param { Identity } [identity] Identity of the entity that called {@link Platform#replaceLayout Platform.replaceLayout}.
|
|
738
|
-
* Undefined if `replaceLayout` is called internally (e.g. while applying a snapshot).
|
|
739
|
-
* @return { Promise<void> }
|
|
740
|
-
*/
|
|
741
|
-
replaceLayout(payload: ReplaceLayoutPayload, identity?: Identity): Promise<void>;
|
|
742
|
-
replaceView(payload: ReplaceViewPayload, identity?: Identity): Promise<void>;
|
|
743
|
-
launchIntoPlatform(payload: LaunchIntoPlatformPayload): Promise<void>;
|
|
744
|
-
/**
|
|
745
|
-
* Handles requests to set a window's context. `target` may be a window or a view.
|
|
746
|
-
* If it is a window, that window's `customContext` will be updated.
|
|
747
|
-
* If it is a view, the `customContext` of that view's current host window will be updated.
|
|
748
|
-
* @param { SetWindowContextPayload } payload Object containing the requested `context` update,
|
|
749
|
-
* the `target`'s identity, and the target's `entityType`.
|
|
750
|
-
* @param { Identity } [identity] Identity of the entity that called {@link Platform#setWindowContext Platform.setWindowContext}.
|
|
751
|
-
* Undefined if `setWindowContext` is called internally (e.g. while applying a snapshot).
|
|
752
|
-
* @return { Promise<any> } The new context.
|
|
753
|
-
*/
|
|
754
|
-
setWindowContext(payload: SetWindowContextPayload, identity?: Identity): Promise<any>;
|
|
755
|
-
/**
|
|
756
|
-
* Handles requests to get a window's context. `target` may be a window or a view.
|
|
757
|
-
* If it is a window, that window's `customContext` will be returned.
|
|
758
|
-
* If it is a view, the `customContext` of that view's current host window will be returned.
|
|
759
|
-
* @param { GetWindowContextPayload } payload Object containing the requested `context` update,
|
|
760
|
-
* the `target`'s identity, and the target's `entityType`.
|
|
761
|
-
* @param { Identity } [identity] Identity of the entity that called {@link Platform#getWindowContext Platform.getWindowContext}.
|
|
762
|
-
* Undefined when `getWindowContext` is called internally
|
|
763
|
-
* (e.g. when getting a window's context for the purpose of raising a "host-context-changed" event on a reparented view).
|
|
764
|
-
* @return { Promise<any> } The new context.
|
|
765
|
-
*/
|
|
766
|
-
getWindowContext(payload: GetWindowContextPayload, identity?: Identity): Promise<any>;
|
|
767
|
-
/**
|
|
768
|
-
* Called when a window's `customContext` is updated. Responsible for raising the `host-context-updated` event on that window's child views.
|
|
769
|
-
* @param { WindowOptionsChangedEvent<'window', 'options-changed'> } payload The event payload for the window whose context has changed.
|
|
770
|
-
* The new context will be contained as `payload.diff.customContext.newVal`.
|
|
771
|
-
* @return { Promise<HostContextChangedPayload> } The event that it raised.
|
|
772
|
-
*/
|
|
773
|
-
onWindowContextUpdated(payload: WindowOptionsChangedEvent<'window', 'options-changed'>): Promise<HostContextChangedPayload | undefined>;
|
|
774
|
-
/**
|
|
775
|
-
* Closes a Window.
|
|
776
|
-
* By default it will fire any before unload handler set by a View in the Window.
|
|
777
|
-
* This can be disabled by setting skipBeforeUnload in the options object of the payload.
|
|
778
|
-
* This method is called by {@link Platform#closeWindow Platform.closeWindow}.
|
|
779
|
-
* @param {CloseWindowPayload} payload Object that contains the Window Identity and related options.
|
|
780
|
-
* @param {Identity} callerIdentity
|
|
781
|
-
* @returns {Promise<void>}
|
|
782
|
-
*/
|
|
783
|
-
closeWindow(payload: CloseWindowPayload, callerIdentity: Identity): Promise<void>;
|
|
784
|
-
/**
|
|
785
|
-
* Gets all the Views attached to a Window that should close along with it. This is meant to be overridable
|
|
786
|
-
* in the case where you want to return other Views that may not be attached to the Window that is closing.
|
|
787
|
-
* @param winId Identity of the Window that is closing
|
|
788
|
-
* @returns { Promise<View> }
|
|
789
|
-
*/
|
|
790
|
-
getViewsForWindowClose(windowId: Identity): Promise<View[]>;
|
|
791
|
-
/**
|
|
792
|
-
* 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.
|
|
793
|
-
* @param {View[]} views Array of Views
|
|
794
|
-
* @returns { Promise<ViewStatuses> }
|
|
795
|
-
*/
|
|
796
|
-
checkViewsForPreventUnload(views: View[]): Promise<ViewStatuses>;
|
|
797
|
-
/**
|
|
798
|
-
* Handle the decision of whether a Window or specific View should close when trying to prevent an unload. This is meant to be overridden.
|
|
799
|
-
* Called in {@link PlatformProvider#closeWindow PlatformProvider.closeWindow}.
|
|
800
|
-
* Normally you would use this method to show a dialog indicating that there are Views that are trying to prevent an unload.
|
|
801
|
-
* By default it will always return all Views passed into it as meaning to close.
|
|
802
|
-
* @param {ViewsPreventingUnloadPayload} payload
|
|
803
|
-
* @tutorial PlatformProvider.getUserDecisionForBeforeUnload
|
|
804
|
-
* @returns {Promise<BeforeUnloadUserDecision>}
|
|
805
|
-
*/
|
|
806
|
-
getUserDecisionForBeforeUnload(payload: ViewsPreventingUnloadPayload): Promise<BeforeUnloadUserDecision>;
|
|
807
|
-
/**
|
|
808
|
-
* Handles the closing of a Window and/or its Views. Called in {@link PlatformProvider#closeWindow PlatformProvider.closeWindow}.
|
|
809
|
-
* The return of {@link PlatformProvider#getUserDecisionForBeforeUnload PlatformProvider.getUserDecisionForBeforeUnload} is passed into this method.
|
|
810
|
-
* @param {Identity} winId Identity of the Window
|
|
811
|
-
* @param {BeforeUnloadUserDecision} userDecision Decision object
|
|
812
|
-
* @returns {Promise<void>}
|
|
813
|
-
*/
|
|
814
|
-
handleViewsAndWindowClose(windowId: Identity, userDecision: BeforeUnloadUserDecision): Promise<void>;
|
|
815
|
-
};
|
|
816
1663
|
export declare type InitPlatformOptions = {
|
|
817
1664
|
overrideCallback?: OverrideCallback<PlatformProvider>;
|
|
1665
|
+
/**
|
|
1666
|
+
* A callback function that can be used to extend or replace default Provider behavior.
|
|
1667
|
+
*/
|
|
818
1668
|
interopOverride?: OverrideCallback<InteropBroker>;
|
|
819
1669
|
};
|
|
820
1670
|
export declare type ProcessDetails = {
|
|
1671
|
+
/**
|
|
1672
|
+
* The percentage of total CPU usage.
|
|
1673
|
+
*/
|
|
821
1674
|
cpuUsage: number;
|
|
1675
|
+
/**
|
|
1676
|
+
* The current nonpaged pool usage in bytes.
|
|
1677
|
+
*/
|
|
822
1678
|
nonPagedPoolUsage: number;
|
|
823
1679
|
pageFaultCount: number;
|
|
1680
|
+
/**
|
|
1681
|
+
* The current paged pool usage in bytes.
|
|
1682
|
+
*/
|
|
824
1683
|
pagedPoolUsage: number;
|
|
1684
|
+
/**
|
|
1685
|
+
* The total amount of memory in bytes that the memory manager has committed
|
|
1686
|
+
*/
|
|
825
1687
|
pagefileUsage: number;
|
|
1688
|
+
/**
|
|
1689
|
+
* The peak nonpaged pool usage in bytes.
|
|
1690
|
+
*/
|
|
826
1691
|
peakNonPagedPoolUsage: number;
|
|
1692
|
+
/**
|
|
1693
|
+
* The peak paged pool usage in bytes.
|
|
1694
|
+
*/
|
|
827
1695
|
peakPagedPoolUsage: number;
|
|
1696
|
+
/**
|
|
1697
|
+
* The peak value in bytes of pagefileUsage during the lifetime of this process.
|
|
1698
|
+
*/
|
|
828
1699
|
peakPagefileUsage: number;
|
|
1700
|
+
/**
|
|
1701
|
+
* The peak working set size in bytes.
|
|
1702
|
+
*/
|
|
829
1703
|
peakWorkingSetSize: number;
|
|
1704
|
+
/**
|
|
1705
|
+
* The current working set size (both shared and private data) in bytes.
|
|
1706
|
+
*/
|
|
830
1707
|
workingSetSize: number;
|
|
831
1708
|
privateSetSize: number;
|
|
1709
|
+
/**
|
|
1710
|
+
* The native process identifier.
|
|
1711
|
+
*/
|
|
832
1712
|
pid: number;
|
|
833
1713
|
};
|
|
834
1714
|
export declare type FrameProcessDetails = ProcessDetails & {
|
|
1715
|
+
/**
|
|
1716
|
+
* Current URL associated with the process.
|
|
1717
|
+
*/
|
|
835
1718
|
url: string;
|
|
1719
|
+
/**
|
|
1720
|
+
* Type for the frame.
|
|
1721
|
+
*/
|
|
836
1722
|
entityType: string;
|
|
837
1723
|
};
|
|
838
1724
|
export declare type EntityProcessDetails = FrameProcessDetails & {
|
|
@@ -841,7 +1727,13 @@ export declare type EntityProcessDetails = FrameProcessDetails & {
|
|
|
841
1727
|
iframes: FrameProcessDetails[];
|
|
842
1728
|
};
|
|
843
1729
|
export declare type AppProcessInfo = {
|
|
1730
|
+
/**
|
|
1731
|
+
* The uuid of the application.
|
|
1732
|
+
*/
|
|
844
1733
|
uuid: string;
|
|
1734
|
+
/**
|
|
1735
|
+
* Process info for each window and view for the application.
|
|
1736
|
+
*/
|
|
845
1737
|
entities: EntityProcessDetails[];
|
|
846
1738
|
};
|
|
847
1739
|
export declare type NonAppProcessDetails = ProcessDetails & {
|
|
@@ -853,9 +1745,21 @@ export declare type SystemProcessInfo = {
|
|
|
853
1745
|
nonApps: NonAppProcessDetails[];
|
|
854
1746
|
};
|
|
855
1747
|
export declare type ClearCacheOption = {
|
|
1748
|
+
/**
|
|
1749
|
+
* html5 application cache
|
|
1750
|
+
*/
|
|
856
1751
|
appcache?: boolean;
|
|
1752
|
+
/**
|
|
1753
|
+
* browser data cache for html files and images
|
|
1754
|
+
*/
|
|
857
1755
|
cache?: boolean;
|
|
1756
|
+
/**
|
|
1757
|
+
* browser cookies
|
|
1758
|
+
*/
|
|
858
1759
|
cookies?: boolean;
|
|
1760
|
+
/**
|
|
1761
|
+
* browser data that can be used across sessions
|
|
1762
|
+
*/
|
|
859
1763
|
localStorage?: boolean;
|
|
860
1764
|
};
|
|
861
1765
|
export declare type CookieInfo = {
|
|
@@ -867,34 +1771,86 @@ export declare type CookieOption = {
|
|
|
867
1771
|
name: string;
|
|
868
1772
|
};
|
|
869
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
|
+
*/
|
|
870
1778
|
diagnosticsMode: boolean;
|
|
871
1779
|
};
|
|
872
1780
|
export declare type CrashReporterState = CrashReporterOptions & {
|
|
1781
|
+
/**
|
|
1782
|
+
* Whether the crash reporter is running
|
|
1783
|
+
*/
|
|
873
1784
|
isRunning: boolean;
|
|
874
1785
|
diagnosticMode: boolean;
|
|
875
1786
|
};
|
|
876
1787
|
export declare type Time = {
|
|
1788
|
+
/**
|
|
1789
|
+
* The number of milliseconds the CPU has spent in user mode.
|
|
1790
|
+
*/
|
|
877
1791
|
user: number;
|
|
1792
|
+
/**
|
|
1793
|
+
* The number of milliseconds the CPU has spent in nice mode.
|
|
1794
|
+
*/
|
|
878
1795
|
nice: number;
|
|
1796
|
+
/**
|
|
1797
|
+
* The number of milliseconds the CPU has spent in sys mode.
|
|
1798
|
+
*/
|
|
879
1799
|
sys: number;
|
|
1800
|
+
/**
|
|
1801
|
+
* The number of milliseconds the CPU has spent in idle mode.
|
|
1802
|
+
*/
|
|
880
1803
|
idle: number;
|
|
1804
|
+
/**
|
|
1805
|
+
* The number of milliseconds the CPU has spent in irq mode.
|
|
1806
|
+
*/
|
|
881
1807
|
irq: number;
|
|
882
1808
|
};
|
|
883
1809
|
export declare type CpuInfo = {
|
|
1810
|
+
/**
|
|
1811
|
+
* The model of the cpu
|
|
1812
|
+
*/
|
|
884
1813
|
model: string;
|
|
1814
|
+
/**
|
|
1815
|
+
* The CPU clock speed in MHz
|
|
1816
|
+
*/
|
|
885
1817
|
speed: number;
|
|
1818
|
+
/**
|
|
1819
|
+
* The numbers of milliseconds the CPU has spent in different modes.
|
|
1820
|
+
*/
|
|
886
1821
|
times: Time;
|
|
887
1822
|
};
|
|
888
1823
|
export declare type GpuInfo = {
|
|
889
1824
|
name: string;
|
|
890
1825
|
};
|
|
891
1826
|
export declare type HostSpecs = {
|
|
1827
|
+
/**
|
|
1828
|
+
* True if Aero Glass theme is supported on Windows platforms
|
|
1829
|
+
*/
|
|
892
1830
|
aeroGlassEnabled?: boolean;
|
|
1831
|
+
/**
|
|
1832
|
+
* "x86" for 32-bit or "x86_64" for 64-bit
|
|
1833
|
+
*/
|
|
893
1834
|
arch: string;
|
|
1835
|
+
/**
|
|
1836
|
+
* The same payload as Node's os.cpus()
|
|
1837
|
+
*/
|
|
894
1838
|
cpus: CpuInfo[];
|
|
1839
|
+
/**
|
|
1840
|
+
* The graphics card name
|
|
1841
|
+
*/
|
|
895
1842
|
gpu: GpuInfo;
|
|
1843
|
+
/**
|
|
1844
|
+
* The same payload as Node's os.totalmem()
|
|
1845
|
+
*/
|
|
896
1846
|
memory: number;
|
|
1847
|
+
/**
|
|
1848
|
+
* The OS name and version/edition
|
|
1849
|
+
*/
|
|
897
1850
|
name: string;
|
|
1851
|
+
/**
|
|
1852
|
+
* True if screensaver is running. Supported on Windows only.
|
|
1853
|
+
*/
|
|
898
1854
|
screenSaver?: boolean;
|
|
899
1855
|
};
|
|
900
1856
|
export declare type PrinterInfo = {
|
|
@@ -903,34 +1859,109 @@ export declare type PrinterInfo = {
|
|
|
903
1859
|
status: number;
|
|
904
1860
|
isDefault: boolean;
|
|
905
1861
|
};
|
|
1862
|
+
/**
|
|
1863
|
+
* DPI (dots per inch) configuration for printing.
|
|
1864
|
+
*/
|
|
906
1865
|
export declare type Dpi = {
|
|
1866
|
+
/**
|
|
1867
|
+
* DPI (dots per inch) in the horizontal direction.
|
|
1868
|
+
*/
|
|
907
1869
|
horizontal?: number;
|
|
1870
|
+
/**
|
|
1871
|
+
* DPI (dots per inch) in the vertical direction.
|
|
1872
|
+
*/
|
|
908
1873
|
vertical?: number;
|
|
909
1874
|
};
|
|
1875
|
+
/**
|
|
1876
|
+
* Margins configuration for printing.
|
|
1877
|
+
*/
|
|
910
1878
|
export declare type Margins = {
|
|
911
1879
|
marginType?: 'default' | 'none' | 'printableArea' | 'custom';
|
|
1880
|
+
/**
|
|
1881
|
+
* The top margin of the printed webpage, in pixels.
|
|
1882
|
+
*/
|
|
912
1883
|
top?: number;
|
|
1884
|
+
/**
|
|
1885
|
+
* The bottom margin of the printed webpage, in pixels.
|
|
1886
|
+
*/
|
|
913
1887
|
bottom?: number;
|
|
1888
|
+
/**
|
|
1889
|
+
* The left margin of the printed webpage, in pixels.
|
|
1890
|
+
*/
|
|
914
1891
|
left?: number;
|
|
1892
|
+
/**
|
|
1893
|
+
* The right margin of the printed webpage, in pixels.
|
|
1894
|
+
*/
|
|
915
1895
|
right?: number;
|
|
916
1896
|
};
|
|
1897
|
+
/**
|
|
1898
|
+
* Options for printing a webpage in OpenFin.
|
|
1899
|
+
*/
|
|
917
1900
|
export declare type PrintOptions = {
|
|
1901
|
+
/**
|
|
1902
|
+
* Disables prompting the user for print settings.
|
|
1903
|
+
*/
|
|
918
1904
|
silent?: boolean;
|
|
1905
|
+
/**
|
|
1906
|
+
* Includes the webpage background color and image when printing.
|
|
1907
|
+
*/
|
|
919
1908
|
printBackground?: boolean;
|
|
1909
|
+
/**
|
|
1910
|
+
* Name of the printer device to use.
|
|
1911
|
+
*/
|
|
920
1912
|
deviceName?: string;
|
|
1913
|
+
/**
|
|
1914
|
+
* Prints in full color (greyscale otherwise).
|
|
1915
|
+
*/
|
|
921
1916
|
color?: boolean;
|
|
1917
|
+
/**
|
|
1918
|
+
* Margins for printed webpage.
|
|
1919
|
+
*/
|
|
922
1920
|
margins?: Margins;
|
|
1921
|
+
/**
|
|
1922
|
+
* Prints in landscape mode (portrait otherwise).
|
|
1923
|
+
*/
|
|
923
1924
|
landscape?: boolean;
|
|
1925
|
+
/**
|
|
1926
|
+
* Scale factor of the printer webpage.
|
|
1927
|
+
*/
|
|
924
1928
|
scaleFactor?: number;
|
|
1929
|
+
/**
|
|
1930
|
+
* Number of webpage pages to print per printer sheet.
|
|
1931
|
+
*/
|
|
925
1932
|
pagesPerSheet?: number;
|
|
1933
|
+
/**
|
|
1934
|
+
* Collates the webpage before printing.
|
|
1935
|
+
*/
|
|
926
1936
|
collate?: boolean;
|
|
1937
|
+
/**
|
|
1938
|
+
* Number of copies to be printed.
|
|
1939
|
+
*/
|
|
927
1940
|
copies?: number;
|
|
928
|
-
|
|
1941
|
+
/**
|
|
1942
|
+
* Page range to print.
|
|
1943
|
+
*/
|
|
1944
|
+
pageRanges?: Record<'from' | 'to', number>;
|
|
1945
|
+
/**
|
|
1946
|
+
* Duplex mode of the printed webpage.
|
|
1947
|
+
*/
|
|
929
1948
|
duplexMode?: 'simplex' | 'shortEdge' | 'longEdge';
|
|
1949
|
+
/**
|
|
1950
|
+
* Dots per inch of the printed webpage.
|
|
1951
|
+
*/
|
|
930
1952
|
dpi?: Dpi;
|
|
931
1953
|
};
|
|
1954
|
+
/**
|
|
1955
|
+
* A request to write data to the clipboard.
|
|
1956
|
+
*/
|
|
932
1957
|
export declare type WriteRequestType = {
|
|
1958
|
+
/**
|
|
1959
|
+
* Data to write to the clipboard.
|
|
1960
|
+
*/
|
|
933
1961
|
data: string;
|
|
1962
|
+
/**
|
|
1963
|
+
* The type of clipboard to write to.
|
|
1964
|
+
*/
|
|
934
1965
|
type?: string;
|
|
935
1966
|
};
|
|
936
1967
|
export declare type WriteAnyRequestType = {
|
|
@@ -942,6 +1973,9 @@ export declare type WriteAnyRequestType = {
|
|
|
942
1973
|
type?: string;
|
|
943
1974
|
};
|
|
944
1975
|
export declare type SubscriptionOptions = {
|
|
1976
|
+
/**
|
|
1977
|
+
* The event timestamp.
|
|
1978
|
+
*/
|
|
945
1979
|
timestamp?: number;
|
|
946
1980
|
};
|
|
947
1981
|
export declare type SharedWorkerInfo = {
|
|
@@ -949,18 +1983,42 @@ export declare type SharedWorkerInfo = {
|
|
|
949
1983
|
url: string;
|
|
950
1984
|
};
|
|
951
1985
|
export declare type ServiceIdentifier = {
|
|
1986
|
+
/**
|
|
1987
|
+
* The name of the service.
|
|
1988
|
+
*/
|
|
952
1989
|
name: string;
|
|
953
1990
|
};
|
|
954
1991
|
export declare type ServiceConfiguration = {
|
|
955
1992
|
config: object;
|
|
1993
|
+
/**
|
|
1994
|
+
* The name of the service.
|
|
1995
|
+
*/
|
|
956
1996
|
name: string;
|
|
957
1997
|
};
|
|
958
1998
|
export declare type RVMInfo = {
|
|
1999
|
+
/**
|
|
2000
|
+
* The name of action: "get-rvm-info".
|
|
2001
|
+
*/
|
|
959
2002
|
'action': string;
|
|
2003
|
+
/**
|
|
2004
|
+
* The app log directory.
|
|
2005
|
+
*/
|
|
960
2006
|
'appLogDirectory': string;
|
|
2007
|
+
/**
|
|
2008
|
+
* The path of OpenfinRVM.exe.
|
|
2009
|
+
*/
|
|
961
2010
|
'path': string;
|
|
2011
|
+
/**
|
|
2012
|
+
* The start time of RVM.
|
|
2013
|
+
*/
|
|
962
2014
|
'start-time': string;
|
|
2015
|
+
/**
|
|
2016
|
+
* The version of RVM.
|
|
2017
|
+
*/
|
|
963
2018
|
'version': string;
|
|
2019
|
+
/**
|
|
2020
|
+
* The path to the working directory.
|
|
2021
|
+
*/
|
|
964
2022
|
'working-dir': string;
|
|
965
2023
|
};
|
|
966
2024
|
export declare type AppVersionProgress = {
|
|
@@ -979,41 +2037,66 @@ export declare type AppVersionRuntimeInfo = {
|
|
|
979
2037
|
healthCheck: boolean | null;
|
|
980
2038
|
error: string | null;
|
|
981
2039
|
};
|
|
982
|
-
export declare type
|
|
983
|
-
type: 'app-version-progress';
|
|
984
|
-
} & AppVersionProgress;
|
|
985
|
-
export declare type AppVersionErrorEvent = {
|
|
986
|
-
type: 'app-version-error';
|
|
987
|
-
} & AppVersionError;
|
|
988
|
-
export declare type AppVersionCompleteEvent = {
|
|
989
|
-
type: 'app-version-complete';
|
|
990
|
-
} & AppVersionProgress;
|
|
991
|
-
export declare type AppVersionRuntimeStatusEvent = {
|
|
992
|
-
type: 'runtime-status';
|
|
993
|
-
} & AppVersionRuntimeInfo;
|
|
994
|
-
export declare type AppVersionEvents = AppVersionProgressEvent | AppVersionRuntimeStatusEvent | AppVersionCompleteEvent | AppVersionErrorEvent;
|
|
995
|
-
export declare type AppVersionEventNames = AppVersionEvents['type'];
|
|
996
|
-
export declare type LaunchEmitter = import('./api/events/typedEventEmitter').TypedEventEmitter<AppVersionEvents>;
|
|
2040
|
+
export declare type LaunchEmitter = TypedEventEmitter<AppVersionEvent>;
|
|
997
2041
|
export declare type RvmLaunchOptions = {
|
|
2042
|
+
/**
|
|
2043
|
+
* True if no UI when launching
|
|
2044
|
+
*/
|
|
998
2045
|
noUi?: boolean;
|
|
999
2046
|
userAppConfigArgs?: object;
|
|
2047
|
+
/**
|
|
2048
|
+
* Timeout in seconds until RVM launch request expires.
|
|
2049
|
+
*/
|
|
1000
2050
|
timeToLive?: number;
|
|
2051
|
+
/**
|
|
2052
|
+
* Called whenever app version resolver events occur.
|
|
2053
|
+
*/
|
|
1001
2054
|
subscribe?: (launch: LaunchEmitter) => void;
|
|
1002
2055
|
};
|
|
1003
2056
|
export declare type ShortCutConfig = {
|
|
2057
|
+
/**
|
|
2058
|
+
* True if application has a shortcut on the desktop.
|
|
2059
|
+
*/
|
|
1004
2060
|
desktop?: boolean;
|
|
2061
|
+
/**
|
|
2062
|
+
* True if application has shortcut in the start menu.
|
|
2063
|
+
*/
|
|
1005
2064
|
startMenu?: boolean;
|
|
2065
|
+
/**
|
|
2066
|
+
* True if application will be launched on system startup.
|
|
2067
|
+
*/
|
|
1006
2068
|
systemStartup?: boolean;
|
|
1007
2069
|
};
|
|
1008
2070
|
export declare type TerminateExternalRequestType = {
|
|
2071
|
+
/**
|
|
2072
|
+
* The uuid of the running application.
|
|
2073
|
+
*/
|
|
1009
2074
|
uuid: string;
|
|
2075
|
+
/**
|
|
2076
|
+
* Time out period before the running application terminates.
|
|
2077
|
+
*/
|
|
1010
2078
|
timeout: number;
|
|
2079
|
+
/**
|
|
2080
|
+
* Value to terminate the running application.
|
|
2081
|
+
*/
|
|
1011
2082
|
killTree: boolean;
|
|
1012
2083
|
};
|
|
1013
2084
|
export declare type TrayInfo = {
|
|
2085
|
+
/**
|
|
2086
|
+
* The bound of tray icon in virtual screen pixels.
|
|
2087
|
+
*/
|
|
1014
2088
|
bounds: Rectangle;
|
|
2089
|
+
/**
|
|
2090
|
+
* Please see fin.System.getMonitorInfo for more information.
|
|
2091
|
+
*/
|
|
1015
2092
|
monitorInfo: MonitorInfo;
|
|
2093
|
+
/**
|
|
2094
|
+
* Copy of `bounds.x`.
|
|
2095
|
+
*/
|
|
1016
2096
|
x: number;
|
|
2097
|
+
/**
|
|
2098
|
+
* Copy of `bounds.y`.
|
|
2099
|
+
*/
|
|
1017
2100
|
y: number;
|
|
1018
2101
|
};
|
|
1019
2102
|
export declare type Transition = {
|
|
@@ -1022,31 +2105,98 @@ export declare type Transition = {
|
|
|
1022
2105
|
size?: Size;
|
|
1023
2106
|
};
|
|
1024
2107
|
export declare type Size = TransitionBase & {
|
|
2108
|
+
/**
|
|
2109
|
+
* Optional if height is present. Defaults to the window's current width.
|
|
2110
|
+
*/
|
|
1025
2111
|
width: number;
|
|
2112
|
+
/**
|
|
2113
|
+
* Optional if width is present. Defaults to the window's current height.
|
|
2114
|
+
*/
|
|
1026
2115
|
height: number;
|
|
1027
2116
|
};
|
|
1028
2117
|
export declare type Opacity = TransitionBase & {
|
|
2118
|
+
/**
|
|
2119
|
+
* The opacity from 0.0 (transparent) to 1.0 (normal).
|
|
2120
|
+
*/
|
|
1029
2121
|
opacity: number;
|
|
1030
2122
|
};
|
|
2123
|
+
/**
|
|
2124
|
+
* Base configuration options needed for all types of transitions.
|
|
2125
|
+
*/
|
|
1031
2126
|
export declare type TransitionBase = {
|
|
2127
|
+
/**
|
|
2128
|
+
* The total time in milliseconds this transition should take.
|
|
2129
|
+
*/
|
|
1032
2130
|
duration: number;
|
|
2131
|
+
/**
|
|
2132
|
+
* @defaultValue false
|
|
2133
|
+
*
|
|
2134
|
+
* Treats 'opacity' as absolute or as a delta. Defaults to false.
|
|
2135
|
+
*/
|
|
1033
2136
|
relative?: boolean;
|
|
1034
2137
|
};
|
|
1035
2138
|
export declare type Position = TransitionBase & {
|
|
2139
|
+
/**
|
|
2140
|
+
* Defaults to the window's current left position in virtual screen coordinates.
|
|
2141
|
+
*/
|
|
1036
2142
|
left: number;
|
|
2143
|
+
/**
|
|
2144
|
+
* Defaults to the window's current top position in virtual screen coordinates.
|
|
2145
|
+
*/
|
|
1037
2146
|
top: number;
|
|
1038
2147
|
};
|
|
1039
2148
|
export declare type AnchorType = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
2149
|
+
/**
|
|
2150
|
+
* Configuration for transition between windows.
|
|
2151
|
+
*/
|
|
1040
2152
|
export declare type TransitionOptions = {
|
|
2153
|
+
/**
|
|
2154
|
+
* Interrupts the current animation (otherwise, the animation is added to the end of the queue).
|
|
2155
|
+
*/
|
|
1041
2156
|
interrupt: boolean;
|
|
2157
|
+
/**
|
|
2158
|
+
* @defaultValue false
|
|
2159
|
+
*
|
|
2160
|
+
* Treats 'opacity' as absolute or as a delta. Defaults to false.
|
|
2161
|
+
*/
|
|
2162
|
+
relative?: boolean;
|
|
1042
2163
|
tween?: tween;
|
|
1043
2164
|
};
|
|
1044
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
|
+
*/
|
|
1045
2169
|
export declare type FindInPageOptions = {
|
|
2170
|
+
/**
|
|
2171
|
+
* @defaultValue true
|
|
2172
|
+
*
|
|
2173
|
+
* Searches in the forward direction (backward otherwise)
|
|
2174
|
+
*/
|
|
1046
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
|
+
*/
|
|
1047
2181
|
findNext?: boolean;
|
|
2182
|
+
/**
|
|
2183
|
+
* @defaultValue false
|
|
2184
|
+
*
|
|
2185
|
+
* Enables case-sensitive searching.
|
|
2186
|
+
*/
|
|
1048
2187
|
matchCase?: boolean;
|
|
2188
|
+
/**
|
|
2189
|
+
* @defaultValue false
|
|
2190
|
+
*
|
|
2191
|
+
* Only searches from the start of words.
|
|
2192
|
+
*/
|
|
1049
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
|
+
*/
|
|
1050
2200
|
medialCapitalAsWordStart?: boolean;
|
|
1051
2201
|
};
|
|
1052
2202
|
export declare type FrameInfo = {
|
|
@@ -1059,18 +2209,36 @@ export declare type ExternalApplicationInfo = {
|
|
|
1059
2209
|
parent: Identity;
|
|
1060
2210
|
};
|
|
1061
2211
|
export declare type ExternalConnection = {
|
|
2212
|
+
/**
|
|
2213
|
+
* The token to broker an external connection.
|
|
2214
|
+
*/
|
|
1062
2215
|
token: string;
|
|
2216
|
+
/**
|
|
2217
|
+
* Unique identifier for the connection.
|
|
2218
|
+
*/
|
|
1063
2219
|
uuid: string;
|
|
1064
2220
|
};
|
|
1065
2221
|
export declare type ExternalProcessRequestType = {
|
|
2222
|
+
/**
|
|
2223
|
+
* The file path to where the running application resides.
|
|
2224
|
+
*/
|
|
1066
2225
|
path?: string;
|
|
1067
2226
|
alias?: string;
|
|
2227
|
+
/**
|
|
2228
|
+
* The arguments to pass to the application.
|
|
2229
|
+
*/
|
|
1068
2230
|
arguments?: string;
|
|
1069
2231
|
listener?: LaunchExternalProcessListener;
|
|
1070
2232
|
lifetime?: string;
|
|
1071
2233
|
certificate?: CertificationInfo;
|
|
1072
2234
|
uuid?: string;
|
|
2235
|
+
/**
|
|
2236
|
+
* Initial window state after launching: 'normal' (default), 'minimized', 'maximized'.
|
|
2237
|
+
*/
|
|
1073
2238
|
initialWindowState?: string;
|
|
2239
|
+
/**
|
|
2240
|
+
* Current working directory.
|
|
2241
|
+
*/
|
|
1074
2242
|
cwd?: string;
|
|
1075
2243
|
};
|
|
1076
2244
|
export declare type CertificationInfo = {
|
|
@@ -1093,20 +2261,48 @@ export declare type ExternalProcessInfo = {
|
|
|
1093
2261
|
listener?: LaunchExternalProcessListener;
|
|
1094
2262
|
};
|
|
1095
2263
|
export declare type AppAssetInfo = {
|
|
2264
|
+
/**
|
|
2265
|
+
* The URL to a zip file containing the package files (executables, dlls, etc…)
|
|
2266
|
+
*/
|
|
1096
2267
|
src: string;
|
|
2268
|
+
/**
|
|
2269
|
+
* The name of the asset
|
|
2270
|
+
*/
|
|
1097
2271
|
alias: string;
|
|
2272
|
+
/**
|
|
2273
|
+
* The version of the package
|
|
2274
|
+
*/
|
|
1098
2275
|
version: string;
|
|
2276
|
+
/**
|
|
2277
|
+
* Specify default executable to launch. This option can be overridden in launchExternalProcess
|
|
2278
|
+
*/
|
|
1099
2279
|
target?: string;
|
|
2280
|
+
/**
|
|
2281
|
+
* The default command line arguments for the aforementioned target.
|
|
2282
|
+
*/
|
|
1100
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
|
+
*/
|
|
1101
2288
|
mandatory?: boolean;
|
|
1102
2289
|
};
|
|
2290
|
+
/**
|
|
2291
|
+
* The options object required by the downloadRuntime function.
|
|
2292
|
+
*/
|
|
1103
2293
|
export declare type RuntimeDownloadOptions = {
|
|
2294
|
+
/**
|
|
2295
|
+
* The given version to download.
|
|
2296
|
+
*/
|
|
1104
2297
|
version: string;
|
|
1105
2298
|
};
|
|
1106
2299
|
export declare type AppAssetRequest = {
|
|
1107
2300
|
alias: string;
|
|
1108
2301
|
};
|
|
1109
2302
|
export declare type RuntimeDownloadProgress = {
|
|
2303
|
+
/**
|
|
2304
|
+
* @property { string } alias The name of the asset
|
|
2305
|
+
*/
|
|
1110
2306
|
downloadedBytes: number;
|
|
1111
2307
|
totalBytes: number;
|
|
1112
2308
|
};
|
|
@@ -1118,16 +2314,44 @@ export declare type CertifiedAppInfo = {
|
|
|
1118
2314
|
isPresentInAppDirectory?: boolean;
|
|
1119
2315
|
};
|
|
1120
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
|
+
*/
|
|
1121
2323
|
name?: string;
|
|
2324
|
+
/**
|
|
2325
|
+
* The set of tasks that will populate the JumpList.
|
|
2326
|
+
*/
|
|
1122
2327
|
items: Array<JumpListTask | JumpListSeparator>;
|
|
1123
2328
|
};
|
|
1124
2329
|
export declare type JumpListItem = JumpListTask | JumpListSeparator;
|
|
1125
2330
|
export declare type JumpListTask = {
|
|
1126
2331
|
type: 'task';
|
|
2332
|
+
/**
|
|
2333
|
+
* The text to be displayed for the JumpList Item.
|
|
2334
|
+
*/
|
|
1127
2335
|
title: string;
|
|
2336
|
+
/**
|
|
2337
|
+
* Tooltip description of the task (displayed in a tooltip).
|
|
2338
|
+
*/
|
|
1128
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
|
+
*/
|
|
1129
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
|
+
*/
|
|
1130
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
|
+
*/
|
|
1131
2355
|
iconIndex?: number;
|
|
1132
2356
|
};
|
|
1133
2357
|
export declare type JumpListSeparator = {
|
|
@@ -1146,7 +2370,13 @@ export declare type ApplicationInfo = {
|
|
|
1146
2370
|
};
|
|
1147
2371
|
};
|
|
1148
2372
|
export declare type ManifestInfo = {
|
|
2373
|
+
/**
|
|
2374
|
+
* The uuid of the application.
|
|
2375
|
+
*/
|
|
1149
2376
|
uuid: string;
|
|
2377
|
+
/**
|
|
2378
|
+
* The runtime manifest URL.
|
|
2379
|
+
*/
|
|
1150
2380
|
manifestUrl: string;
|
|
1151
2381
|
};
|
|
1152
2382
|
export declare type ClickedMenuResult = {
|
|
@@ -1200,11 +2430,29 @@ export declare type NativeWindowIntegrationProviderAuthorization = {
|
|
|
1200
2430
|
authorizedUuid: string;
|
|
1201
2431
|
};
|
|
1202
2432
|
export declare type RuntimeInfo = {
|
|
2433
|
+
/**
|
|
2434
|
+
* The runtime build architecture.
|
|
2435
|
+
*/
|
|
1203
2436
|
architecture: string;
|
|
2437
|
+
/**
|
|
2438
|
+
* The runtime manifest URL.
|
|
2439
|
+
*/
|
|
1204
2440
|
manifestUrl: string;
|
|
2441
|
+
/**
|
|
2442
|
+
* The runtime websocket port.
|
|
2443
|
+
*/
|
|
1205
2444
|
port: number;
|
|
2445
|
+
/**
|
|
2446
|
+
* The runtime security realm.
|
|
2447
|
+
*/
|
|
1206
2448
|
securityRealm?: string;
|
|
2449
|
+
/**
|
|
2450
|
+
* The runtime version.
|
|
2451
|
+
*/
|
|
1207
2452
|
version: string;
|
|
2453
|
+
/**
|
|
2454
|
+
* the command line argument used to start the Runtime.
|
|
2455
|
+
*/
|
|
1208
2456
|
args: object;
|
|
1209
2457
|
chromeVersion: string;
|
|
1210
2458
|
electronVersion: string;
|
|
@@ -1228,8 +2476,17 @@ export declare type DownloadRule = {
|
|
|
1228
2476
|
match: string[];
|
|
1229
2477
|
};
|
|
1230
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
|
+
*/
|
|
1231
2482
|
export declare type Intent<MetadataType = IntentMetadata> = {
|
|
2483
|
+
/**
|
|
2484
|
+
* Name of the intent.
|
|
2485
|
+
*/
|
|
1232
2486
|
name: string;
|
|
2487
|
+
/**
|
|
2488
|
+
* Data associated with the intent.
|
|
2489
|
+
*/
|
|
1233
2490
|
context: Context;
|
|
1234
2491
|
metadata?: MetadataType;
|
|
1235
2492
|
};
|
|
@@ -1240,13 +2497,37 @@ export declare type IntentMetadata<TargetType = any> = {
|
|
|
1240
2497
|
};
|
|
1241
2498
|
export declare type IntentHandler = (intent: Intent) => void;
|
|
1242
2499
|
export declare type ContentCreationBehaviorNames = 'window' | 'view' | 'block' | 'browser';
|
|
1243
|
-
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
|
+
*/
|
|
1244
2509
|
export declare type ContentCreationRule<T = ContentCreationBehaviorNames> = {
|
|
2510
|
+
/**
|
|
2511
|
+
* Behavior to use when opening matched content.
|
|
2512
|
+
*/
|
|
1245
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
|
+
*/
|
|
1246
2518
|
match: MatchPattern[];
|
|
2519
|
+
/**
|
|
2520
|
+
* Options for newly-created view or window (if applicable).
|
|
2521
|
+
*/
|
|
1247
2522
|
options?: T extends 'window' ? Partial<WindowOptions> : T extends 'view' ? Partial<ViewOptions> : never;
|
|
1248
2523
|
};
|
|
2524
|
+
/**
|
|
2525
|
+
* Configures how new content (e,g, from `window.open` or a link) is opened.
|
|
2526
|
+
*/
|
|
1249
2527
|
export declare type ContentCreationOptions = {
|
|
2528
|
+
/**
|
|
2529
|
+
* List of rules for creation of new content.
|
|
2530
|
+
*/
|
|
1250
2531
|
rules: ContentCreationRule[];
|
|
1251
2532
|
};
|
|
1252
2533
|
export declare type SnapshotProvider<T> = {
|
|
@@ -1254,9 +2535,18 @@ export declare type SnapshotProvider<T> = {
|
|
|
1254
2535
|
applySnapshot: (snapshot: T) => Promise<void>;
|
|
1255
2536
|
};
|
|
1256
2537
|
export declare type QueryPermissionResult = {
|
|
2538
|
+
/**
|
|
2539
|
+
* The full name of a secured API.
|
|
2540
|
+
*/
|
|
1257
2541
|
permission: string;
|
|
1258
2542
|
state: PermissionState;
|
|
2543
|
+
/**
|
|
2544
|
+
* True if permission is granted.
|
|
2545
|
+
*/
|
|
1259
2546
|
granted: boolean;
|
|
2547
|
+
/**
|
|
2548
|
+
* The value of permission.
|
|
2549
|
+
*/
|
|
1260
2550
|
rawValue?: unknown;
|
|
1261
2551
|
};
|
|
1262
2552
|
export declare type SessionContextGroup = {
|
|
@@ -1268,17 +2558,38 @@ export declare type SessionContextGroup = {
|
|
|
1268
2558
|
}>;
|
|
1269
2559
|
};
|
|
1270
2560
|
export type { MessagingProtocols };
|
|
2561
|
+
/**
|
|
2562
|
+
* Channel provider creation options.
|
|
2563
|
+
*/
|
|
1271
2564
|
export declare type ChannelCreateOptions = {
|
|
2565
|
+
/**
|
|
2566
|
+
* EXPERIMENTAL: Messaging protocols supported by the channel provider.
|
|
2567
|
+
*/
|
|
1272
2568
|
protocols?: MessagingProtocols[];
|
|
1273
2569
|
};
|
|
2570
|
+
/**
|
|
2571
|
+
* Options provided on a client connection to a channel.
|
|
2572
|
+
*
|
|
2573
|
+
*/
|
|
1274
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
|
+
*/
|
|
1275
2580
|
wait?: boolean;
|
|
2581
|
+
/**
|
|
2582
|
+
* Payload to pass to ChannelProvider onConnection action.
|
|
2583
|
+
*/
|
|
1276
2584
|
payload?: any;
|
|
1277
2585
|
};
|
|
1278
2586
|
export declare type ContextForIntent<MetadataType = any> = Context & {
|
|
1279
2587
|
metadata?: MetadataType;
|
|
1280
2588
|
};
|
|
1281
2589
|
export declare type InfoForIntentOptions<MetadataType = IntentMetadata> = {
|
|
2590
|
+
/**
|
|
2591
|
+
* Name of the intent to get info for.
|
|
2592
|
+
*/
|
|
1282
2593
|
name: string;
|
|
1283
2594
|
context?: Context;
|
|
1284
2595
|
metadata?: MetadataType;
|
|
@@ -1287,8 +2598,17 @@ export declare type FindIntentsByContextOptions<MetadataType = IntentMetadata> =
|
|
|
1287
2598
|
context: Context;
|
|
1288
2599
|
metadata?: MetadataType;
|
|
1289
2600
|
};
|
|
2601
|
+
/**
|
|
2602
|
+
* Identity of a channel provider.
|
|
2603
|
+
*/
|
|
1290
2604
|
export declare type ProviderIdentity = Identity & {
|
|
2605
|
+
/**
|
|
2606
|
+
* Identifier of the channel.
|
|
2607
|
+
*/
|
|
1291
2608
|
channelId: string;
|
|
2609
|
+
/**
|
|
2610
|
+
* Channel provider name.
|
|
2611
|
+
*/
|
|
1292
2612
|
channelName: string;
|
|
1293
2613
|
};
|
|
1294
2614
|
export declare type RegisterUsageData = {
|
|
@@ -1296,23 +2616,59 @@ export declare type RegisterUsageData = {
|
|
|
1296
2616
|
type: string;
|
|
1297
2617
|
};
|
|
1298
2618
|
export interface ViewsPreventingUnloadPayload {
|
|
2619
|
+
/**
|
|
2620
|
+
* Specifies if the Window should close.
|
|
2621
|
+
*/
|
|
1299
2622
|
windowShouldClose: boolean;
|
|
2623
|
+
/**
|
|
2624
|
+
* Identity of the Window.
|
|
2625
|
+
*/
|
|
1300
2626
|
windowId: Identity;
|
|
2627
|
+
/**
|
|
2628
|
+
* Identities of the Views that are preventing an unload
|
|
2629
|
+
*/
|
|
1301
2630
|
viewsPreventingUnload: Identity[];
|
|
2631
|
+
/**
|
|
2632
|
+
* Identities of the Views that are not preventing an unload
|
|
2633
|
+
*/
|
|
1302
2634
|
viewsNotPreventingUnload: Identity[];
|
|
2635
|
+
/**
|
|
2636
|
+
* Source of the close action.
|
|
2637
|
+
*/
|
|
1303
2638
|
closeType: 'view' | 'window';
|
|
1304
2639
|
}
|
|
1305
2640
|
export interface BeforeUnloadUserDecision {
|
|
2641
|
+
/**
|
|
2642
|
+
* Specifies if the Window should close.
|
|
2643
|
+
*/
|
|
1306
2644
|
windowShouldClose: boolean;
|
|
2645
|
+
/**
|
|
2646
|
+
* Array of views that will close.
|
|
2647
|
+
*/
|
|
1307
2648
|
viewsToClose: Identity[];
|
|
1308
2649
|
}
|
|
1309
2650
|
export interface ViewStatuses {
|
|
2651
|
+
/**
|
|
2652
|
+
* Identities of the Views that are preventing an unload.
|
|
2653
|
+
*/
|
|
1310
2654
|
viewsPreventingUnload: Identity[];
|
|
2655
|
+
/**
|
|
2656
|
+
* Identities of the Views that are not preventing an unload.
|
|
2657
|
+
*/
|
|
1311
2658
|
viewsNotPreventingUnload: Identity[];
|
|
1312
2659
|
}
|
|
1313
2660
|
export interface CloseWindowPayload {
|
|
2661
|
+
/**
|
|
2662
|
+
*
|
|
2663
|
+
* Identity of the Window
|
|
2664
|
+
*/
|
|
1314
2665
|
windowId: Identity;
|
|
1315
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
|
+
*/
|
|
1316
2672
|
skipBeforeUnload?: boolean;
|
|
1317
2673
|
};
|
|
1318
2674
|
}
|
|
@@ -1321,23 +2677,53 @@ export declare type ProxyInfo = {
|
|
|
1321
2677
|
system: ProxySystemInfo;
|
|
1322
2678
|
};
|
|
1323
2679
|
export declare type ProxyConfig = {
|
|
2680
|
+
/**
|
|
2681
|
+
* The configured proxy address.
|
|
2682
|
+
*/
|
|
1324
2683
|
proxyAddress: string;
|
|
2684
|
+
/**
|
|
2685
|
+
* The configured proxy port.
|
|
2686
|
+
*/
|
|
1325
2687
|
proxyPort: number;
|
|
1326
2688
|
type: string;
|
|
1327
2689
|
};
|
|
1328
2690
|
export declare type ProxySystemInfo = {
|
|
2691
|
+
/**
|
|
2692
|
+
* The auto configuration url.
|
|
2693
|
+
*/
|
|
1329
2694
|
autoConfigUrl: string;
|
|
2695
|
+
/**
|
|
2696
|
+
* The proxy bypass info.
|
|
2697
|
+
*/
|
|
1330
2698
|
bypass: string;
|
|
2699
|
+
/**
|
|
2700
|
+
* Value to check if a proxy is enabled.
|
|
2701
|
+
*/
|
|
1331
2702
|
enabled: boolean;
|
|
2703
|
+
/**
|
|
2704
|
+
* The proxy info.
|
|
2705
|
+
*/
|
|
1332
2706
|
proxy: string;
|
|
1333
2707
|
};
|
|
1334
2708
|
export declare type ChannelAction = (payload: unknown, id: ProviderIdentity | ClientIdentity) => unknown;
|
|
1335
2709
|
export declare type ChannelMiddleware = (topic: string, payload: unknown, senderIdentity: ProviderIdentity | ClientIdentity) => Promise<unknown> | unknown;
|
|
1336
2710
|
export declare type ErrorMiddleware = (topic: string, error: Error, id: ProviderIdentity | ClientIdentity) => unknown;
|
|
1337
2711
|
export declare type ApplicationState = {
|
|
2712
|
+
/**
|
|
2713
|
+
* True when the application is a Platform controller
|
|
2714
|
+
*/
|
|
1338
2715
|
isPlatform: boolean;
|
|
2716
|
+
/**
|
|
2717
|
+
* True when the application is running
|
|
2718
|
+
*/
|
|
1339
2719
|
isRunning: boolean;
|
|
2720
|
+
/**
|
|
2721
|
+
* uuid of the application
|
|
2722
|
+
*/
|
|
1340
2723
|
uuid: string;
|
|
2724
|
+
/**
|
|
2725
|
+
* uuid of the application that launches this application
|
|
2726
|
+
*/
|
|
1341
2727
|
parentUuid?: string;
|
|
1342
2728
|
};
|
|
1343
2729
|
export declare type InstalledApps = {
|
|
@@ -1347,18 +2733,45 @@ export declare type InstallationInfo = {
|
|
|
1347
2733
|
cachedManifest: any;
|
|
1348
2734
|
};
|
|
1349
2735
|
export declare type GetLogRequestType = {
|
|
2736
|
+
/**
|
|
2737
|
+
* The name of the running application
|
|
2738
|
+
*/
|
|
1350
2739
|
name: string;
|
|
2740
|
+
/**
|
|
2741
|
+
* The file length of the log file
|
|
2742
|
+
*/
|
|
1351
2743
|
endFile?: string;
|
|
2744
|
+
/**
|
|
2745
|
+
* The size limit of the log file.
|
|
2746
|
+
*/
|
|
1352
2747
|
sizeLimit?: number;
|
|
1353
2748
|
};
|
|
1354
2749
|
export declare type LogInfo = {
|
|
2750
|
+
/**
|
|
2751
|
+
* The filename of the log
|
|
2752
|
+
*/
|
|
1355
2753
|
name: string;
|
|
2754
|
+
/**
|
|
2755
|
+
* The size of the log in bytes
|
|
2756
|
+
*/
|
|
1356
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
|
+
*/
|
|
1357
2761
|
date: string;
|
|
1358
2762
|
};
|
|
1359
2763
|
export declare type SendApplicationLogResponse = {
|
|
1360
2764
|
logId: string;
|
|
1361
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
|
+
*/
|
|
1362
2775
|
export declare type LogLevel = 'verbose' | 'info' | 'warning' | 'error' | 'fatal';
|
|
1363
2776
|
export declare type PermissionState = 'granted' | 'denied' | 'unavailable';
|
|
1364
2777
|
export declare type RegistryInfo = {
|
|
@@ -1382,31 +2795,63 @@ export declare type WindowInfo = {
|
|
|
1382
2795
|
export declare type ApplicationWindowInfo = {
|
|
1383
2796
|
childWindows: Array<WindowDetail>;
|
|
1384
2797
|
mainWindow: WindowDetail;
|
|
2798
|
+
/**
|
|
2799
|
+
* @property { string } uuid The uuid of the application
|
|
2800
|
+
*/
|
|
1385
2801
|
uuid: string;
|
|
1386
2802
|
};
|
|
1387
2803
|
export declare type WindowDetail = {
|
|
2804
|
+
/**
|
|
2805
|
+
* The bottom-most coordinate of the window.
|
|
2806
|
+
*/
|
|
1388
2807
|
bottom: number;
|
|
2808
|
+
/**
|
|
2809
|
+
* The height of the window.
|
|
2810
|
+
*/
|
|
1389
2811
|
height: number;
|
|
1390
2812
|
isShowing: boolean;
|
|
2813
|
+
/**
|
|
2814
|
+
* The left-most coordinate of the window.
|
|
2815
|
+
*/
|
|
1391
2816
|
left: number;
|
|
2817
|
+
/**
|
|
2818
|
+
* The name of the window.
|
|
2819
|
+
*/
|
|
1392
2820
|
name: string;
|
|
2821
|
+
/**
|
|
2822
|
+
* The right-most coordinate of the window
|
|
2823
|
+
*/
|
|
1393
2824
|
right: number;
|
|
1394
2825
|
state: string;
|
|
2826
|
+
/**
|
|
2827
|
+
* The top-most coordinate of the window.
|
|
2828
|
+
*/
|
|
1395
2829
|
top: number;
|
|
2830
|
+
/**
|
|
2831
|
+
* The width of the window.
|
|
2832
|
+
*/
|
|
1396
2833
|
width: number;
|
|
1397
2834
|
};
|
|
1398
2835
|
export declare type LayoutPresetType = 'columns' | 'grid' | 'rows' | 'tabs';
|
|
1399
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
|
+
*/
|
|
1400
2841
|
containerId?: string;
|
|
1401
2842
|
};
|
|
1402
2843
|
export declare type PresetLayoutOptions = {
|
|
2844
|
+
/**
|
|
2845
|
+
* Which preset layout arrangement to use.
|
|
2846
|
+
* The preset options are `columns`, `grid`, `rows`, and `tabs`.
|
|
2847
|
+
*/
|
|
1403
2848
|
presetType: LayoutPresetType;
|
|
1404
2849
|
};
|
|
1405
2850
|
export declare type ResultBehavior = 'close' | 'hide' | 'none';
|
|
1406
2851
|
export declare type PopupBaseBehavior = 'close' | 'hide';
|
|
1407
2852
|
export declare type PopupResultBehavior = 'none' | PopupBaseBehavior;
|
|
1408
2853
|
export declare type PopupBlurBehavior = 'modal' | PopupBaseBehavior;
|
|
1409
|
-
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>;
|
|
1410
2855
|
export interface PopupOptions {
|
|
1411
2856
|
initialOptions?: Optional<WindowCreationOptions, 'name'>;
|
|
1412
2857
|
additionalOptions?: UpdatableWindowOptions;
|
|
@@ -1433,11 +2878,55 @@ export interface PopupResult<T = any> {
|
|
|
1433
2878
|
data?: T;
|
|
1434
2879
|
lastDispatchResult?: PopupResult;
|
|
1435
2880
|
}
|
|
1436
|
-
export type
|
|
2881
|
+
export declare type AppVersionProgressEvent = {
|
|
2882
|
+
type: 'app-version-progress';
|
|
2883
|
+
} & AppVersionProgress;
|
|
2884
|
+
export declare type AppVersionErrorEvent = {
|
|
2885
|
+
type: 'app-version-error';
|
|
2886
|
+
} & AppVersionError;
|
|
2887
|
+
export declare type AppVersionCompleteEvent = {
|
|
2888
|
+
type: 'app-version-complete';
|
|
2889
|
+
} & AppVersionProgress;
|
|
2890
|
+
export declare type AppVersionRuntimeStatusEvent = {
|
|
2891
|
+
type: 'runtime-status';
|
|
2892
|
+
} & AppVersionRuntimeInfo;
|
|
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
|
+
*/
|
|
1437
2917
|
export declare type ContextMenuOptions = {
|
|
2918
|
+
/**
|
|
2919
|
+
* Context menu items to display on right-click.
|
|
2920
|
+
*/
|
|
1438
2921
|
template?: Array<PrebuiltContextMenuItem>;
|
|
2922
|
+
/**
|
|
2923
|
+
* Displays the context menu on right click.
|
|
2924
|
+
*/
|
|
1439
2925
|
enabled?: boolean;
|
|
1440
2926
|
};
|
|
2927
|
+
/**
|
|
2928
|
+
* Context menu item with an implementation provided by OpenFin.
|
|
2929
|
+
*/
|
|
1441
2930
|
export declare type PrebuiltContextMenuItem = 'separator' | 'undo' | 'redo' | 'cut' | 'copy' | 'paste' | 'selectAll' | 'spellCheck' | 'inspect' | 'reload' | 'navigateForward' | 'navigateBack' | 'print';
|
|
1442
2931
|
export declare type InteropBrokerDisconnectionEvent = {
|
|
1443
2932
|
type: string;
|
|
@@ -1450,3 +2939,4 @@ export interface InteropActionLoggingOption {
|
|
|
1450
2939
|
}
|
|
1451
2940
|
export declare type InteropLoggingActions = 'beforeAction' | 'afterAction';
|
|
1452
2941
|
export declare type InteropLoggingOptions = Record<InteropLoggingActions, InteropActionLoggingOption>;
|
|
2942
|
+
export type { Me } from './api/me';
|