@openfin/core 25.68.26
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 +13 -0
- package/NOTICE +16 -0
- package/OpenFin.d.ts +1340 -0
- package/README.md +41 -0
- package/docs.README(OLD).md +82 -0
- package/fin.d.ts +4 -0
- package/package.json +33 -0
- package/resources/win/OpenFinRVM.exe +0 -0
- package/src/api/application/Factory.d.ts +145 -0
- package/src/api/application/Factory.js +229 -0
- package/src/api/application/Instance.d.ts +302 -0
- package/src/api/application/Instance.js +412 -0
- package/src/api/application/index.d.ts +3 -0
- package/src/api/application/index.js +15 -0
- package/src/api/base.d.ts +43 -0
- package/src/api/base.js +177 -0
- package/src/api/clipboard/index.d.ts +69 -0
- package/src/api/clipboard/index.js +88 -0
- package/src/api/events/application.d.ts +69 -0
- package/src/api/events/application.js +2 -0
- package/src/api/events/base.d.ts +17 -0
- package/src/api/events/base.js +2 -0
- package/src/api/events/channel.d.ts +10 -0
- package/src/api/events/channel.js +2 -0
- package/src/api/events/emitterMap.d.ts +11 -0
- package/src/api/events/emitterMap.js +35 -0
- package/src/api/events/eventAggregator.d.ts +5 -0
- package/src/api/events/eventAggregator.js +43 -0
- package/src/api/events/externalApplication.d.ts +5 -0
- package/src/api/events/externalApplication.js +2 -0
- package/src/api/events/frame.d.ts +9 -0
- package/src/api/events/frame.js +2 -0
- package/src/api/events/globalHotkey.d.ts +10 -0
- package/src/api/events/globalHotkey.js +2 -0
- package/src/api/events/platform.d.ts +18 -0
- package/src/api/events/platform.js +2 -0
- package/src/api/events/system.d.ts +22 -0
- package/src/api/events/system.js +2 -0
- package/src/api/events/view.d.ts +56 -0
- package/src/api/events/view.js +2 -0
- package/src/api/events/webcontents.d.ts +48 -0
- package/src/api/events/webcontents.js +2 -0
- package/src/api/events/window.d.ts +169 -0
- package/src/api/events/window.js +2 -0
- package/src/api/external-application/Factory.d.ts +26 -0
- package/src/api/external-application/Factory.js +40 -0
- package/src/api/external-application/Instance.d.ts +102 -0
- package/src/api/external-application/Instance.js +109 -0
- package/src/api/external-application/index.d.ts +3 -0
- package/src/api/external-application/index.js +15 -0
- package/src/api/fin.d.ts +49 -0
- package/src/api/fin.js +43 -0
- package/src/api/frame/Factory.d.ts +36 -0
- package/src/api/frame/Factory.js +69 -0
- package/src/api/frame/Instance.d.ts +121 -0
- package/src/api/frame/Instance.js +130 -0
- package/src/api/frame/index.d.ts +3 -0
- package/src/api/frame/index.js +15 -0
- package/src/api/global-hotkey/index.d.ts +38 -0
- package/src/api/global-hotkey/index.js +58 -0
- package/src/api/interappbus/channel/channel.d.ts +26 -0
- package/src/api/interappbus/channel/channel.js +77 -0
- package/src/api/interappbus/channel/channels-docs.d.ts +318 -0
- package/src/api/interappbus/channel/channels-docs.js +376 -0
- package/src/api/interappbus/channel/client.d.ts +22 -0
- package/src/api/interappbus/channel/client.js +84 -0
- package/src/api/interappbus/channel/connection-manager.d.ts +28 -0
- package/src/api/interappbus/channel/connection-manager.js +244 -0
- package/src/api/interappbus/channel/index.d.ts +22 -0
- package/src/api/interappbus/channel/index.js +121 -0
- package/src/api/interappbus/channel/protocols/classic/message-receiver.d.ts +13 -0
- package/src/api/interappbus/channel/protocols/classic/message-receiver.js +73 -0
- package/src/api/interappbus/channel/protocols/classic/strategy.d.ts +22 -0
- package/src/api/interappbus/channel/protocols/classic/strategy.js +84 -0
- package/src/api/interappbus/channel/protocols/combined/strategy.d.ts +20 -0
- package/src/api/interappbus/channel/protocols/combined/strategy.js +58 -0
- package/src/api/interappbus/channel/protocols/index.d.ts +44 -0
- package/src/api/interappbus/channel/protocols/index.js +2 -0
- package/src/api/interappbus/channel/protocols/protocol-manager.d.ts +10 -0
- package/src/api/interappbus/channel/protocols/protocol-manager.js +43 -0
- package/src/api/interappbus/channel/protocols/rtc/endpoint.d.ts +23 -0
- package/src/api/interappbus/channel/protocols/rtc/endpoint.js +135 -0
- package/src/api/interappbus/channel/protocols/rtc/ice-manager.d.ts +30 -0
- package/src/api/interappbus/channel/protocols/rtc/ice-manager.js +131 -0
- package/src/api/interappbus/channel/protocols/rtc/strategy.d.ts +22 -0
- package/src/api/interappbus/channel/protocols/rtc/strategy.js +87 -0
- package/src/api/interappbus/channel/protocols/strategy-types.d.ts +13 -0
- package/src/api/interappbus/channel/protocols/strategy-types.js +2 -0
- package/src/api/interappbus/channel/protocols/strategy.d.ts +15 -0
- package/src/api/interappbus/channel/protocols/strategy.js +2 -0
- package/src/api/interappbus/channel/provider.d.ts +31 -0
- package/src/api/interappbus/channel/provider.js +165 -0
- package/src/api/interappbus/index.d.ts +85 -0
- package/src/api/interappbus/index.js +175 -0
- package/src/api/interop/Factory.d.ts +37 -0
- package/src/api/interop/Factory.js +54 -0
- package/src/api/interop/InteropBroker.d.ts +363 -0
- package/src/api/interop/InteropBroker.js +914 -0
- package/src/api/interop/InteropClient.d.ts +268 -0
- package/src/api/interop/InteropClient.js +450 -0
- package/src/api/interop/SessionContextGroupBroker.d.ts +26 -0
- package/src/api/interop/SessionContextGroupBroker.js +107 -0
- package/src/api/interop/SessionContextGroupClient.d.ts +20 -0
- package/src/api/interop/SessionContextGroupClient.js +85 -0
- package/src/api/interop/fdc3/fdc3-1.2.d.ts +187 -0
- package/src/api/interop/fdc3/fdc3-1.2.js +385 -0
- package/src/api/interop/fdc3/fdc3.js +17 -0
- package/src/api/interop/fdc3/utils.d.ts +6 -0
- package/src/api/interop/fdc3/utils.js +17 -0
- package/src/api/interop/index.d.ts +4 -0
- package/src/api/interop/index.js +16 -0
- package/src/api/interop/utils.d.ts +11 -0
- package/src/api/interop/utils.js +36 -0
- package/src/api/me.d.ts +35 -0
- package/src/api/me.js +60 -0
- package/src/api/platform/Factory.d.ts +109 -0
- package/src/api/platform/Factory.js +188 -0
- package/src/api/platform/Instance.d.ts +122 -0
- package/src/api/platform/Instance.js +299 -0
- package/src/api/platform/common-utils.d.ts +6 -0
- package/src/api/platform/common-utils.js +16 -0
- package/src/api/platform/index.d.ts +3 -0
- package/src/api/platform/index.js +15 -0
- package/src/api/platform/layout/Factory.d.ts +108 -0
- package/src/api/platform/layout/Factory.js +189 -0
- package/src/api/platform/layout/Instance.d.ts +48 -0
- package/src/api/platform/layout/Instance.js +99 -0
- package/src/api/platform/layout/index.d.ts +3 -0
- package/src/api/platform/layout/index.js +15 -0
- package/src/api/platform/layout/shapes.d.ts +11 -0
- package/src/api/platform/layout/shapes.js +2 -0
- package/src/api/snapshot-source/Factory.d.ts +36 -0
- package/src/api/snapshot-source/Factory.js +65 -0
- package/src/api/snapshot-source/Instance.d.ts +30 -0
- package/src/api/snapshot-source/Instance.js +134 -0
- package/src/api/snapshot-source/index.d.ts +3 -0
- package/src/api/snapshot-source/index.js +15 -0
- package/src/api/snapshot-source/utils.d.ts +1 -0
- package/src/api/snapshot-source/utils.js +5 -0
- package/src/api/system/application.d.ts +6 -0
- package/src/api/system/application.js +2 -0
- package/src/api/system/entity.d.ts +11 -0
- package/src/api/system/entity.js +2 -0
- package/src/api/system/index.d.ts +957 -0
- package/src/api/system/index.js +1241 -0
- package/src/api/system/installedApps.d.ts +6 -0
- package/src/api/system/installedApps.js +2 -0
- package/src/api/system/log.d.ts +11 -0
- package/src/api/system/log.js +2 -0
- package/src/api/system/process.d.ts +15 -0
- package/src/api/system/process.js +2 -0
- package/src/api/system/proxy.d.ts +15 -0
- package/src/api/system/proxy.js +2 -0
- package/src/api/system/queryPermissionTypes.d.ts +1 -0
- package/src/api/system/queryPermissionTypes.js +2 -0
- package/src/api/system/registry-info.d.ts +7 -0
- package/src/api/system/registry-info.js +2 -0
- package/src/api/system/window.d.ts +16 -0
- package/src/api/system/window.js +2 -0
- package/src/api/view/Factory.d.ts +49 -0
- package/src/api/view/Factory.js +103 -0
- package/src/api/view/Instance.d.ts +379 -0
- package/src/api/view/Instance.js +415 -0
- package/src/api/view/index.d.ts +3 -0
- package/src/api/view/index.js +15 -0
- package/src/api/webcontents/main.d.ts +36 -0
- package/src/api/webcontents/main.js +82 -0
- package/src/api/window/Factory.d.ts +44 -0
- package/src/api/window/Factory.js +91 -0
- package/src/api/window/Instance.d.ts +966 -0
- package/src/api/window/Instance.js +1202 -0
- package/src/api/window/bounds-changed.d.ts +10 -0
- package/src/api/window/bounds-changed.js +6 -0
- package/src/api/window/index.d.ts +5 -0
- package/src/api/window/index.js +17 -0
- package/src/api/window/shapes.d.ts +13 -0
- package/src/api/window/shapes.js +2 -0
- package/src/environment/environment.d.ts +28 -0
- package/src/environment/environment.js +4 -0
- package/src/environment/node-env.d.ts +25 -0
- package/src/environment/node-env.js +64 -0
- package/src/environment/openfin-env.d.ts +29 -0
- package/src/environment/openfin-env.js +105 -0
- package/src/mock.d.ts +4 -0
- package/src/mock.js +91 -0
- package/src/shapes/ERROR_BOX_TYPES.d.ts +6 -0
- package/src/shapes/ERROR_BOX_TYPES.js +10 -0
- package/src/shapes/EntityType.d.ts +1 -0
- package/src/shapes/EntityType.js +2 -0
- package/src/shapes/LayoutPresetType.d.ts +1 -0
- package/src/shapes/LayoutPresetType.js +2 -0
- package/src/shapes/Platform.d.ts +112 -0
- package/src/shapes/Platform.js +16 -0
- package/src/shapes/WebOptions.d.ts +12 -0
- package/src/shapes/WebOptions.js +2 -0
- package/src/shapes/WindowOptions.d.ts +42 -0
- package/src/shapes/WindowOptions.js +2 -0
- package/src/shapes/protocol.d.ts +178 -0
- package/src/shapes/protocol.js +2 -0
- package/src/transport/fin_store.d.ts +4 -0
- package/src/transport/fin_store.js +16 -0
- package/src/transport/transport-errors.d.ts +17 -0
- package/src/transport/transport-errors.js +39 -0
- package/src/transport/transport.d.ts +57 -0
- package/src/transport/transport.js +195 -0
- package/src/transport/wire.d.ts +76 -0
- package/src/transport/wire.js +39 -0
- package/src/util/asyncFilter.d.ts +1 -0
- package/src/util/asyncFilter.js +7 -0
- package/src/util/errors.d.ts +9 -0
- package/src/util/errors.js +14 -0
- package/src/util/exhaustive.d.ts +1 -0
- package/src/util/exhaustive.js +7 -0
- package/src/util/http.d.ts +11 -0
- package/src/util/http.js +83 -0
- package/src/util/normalize-config.d.ts +3 -0
- package/src/util/normalize-config.js +47 -0
- package/src/util/promises.d.ts +5 -0
- package/src/util/promises.js +27 -0
- package/src/util/ref-counter.d.ts +7 -0
- package/src/util/ref-counter.js +51 -0
- package/src/util/runtimeVersioning.d.ts +3 -0
- package/src/util/runtimeVersioning.js +25 -0
- package/src/util/utilTypes.d.ts +8 -0
- package/src/util/utilTypes.js +2 -0
- package/src/util/validate.d.ts +3 -0
- package/src/util/validate.js +11 -0
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { CrashedEvent } from './application';
|
|
2
|
+
import { WindowEvent, BaseEventMap } from './base';
|
|
3
|
+
import { WebContentsEventMapping, WindowResourceLoadFailedEvent, WindowResourceResponseReceivedEvent, CertificateSelectionShownEvent } from './webcontents';
|
|
4
|
+
import { PropagatedViewEventMapping, InputEvent } from './view';
|
|
5
|
+
export interface WindowAlertRequestedEvent<Topic, Type> extends WindowEvent<Topic, Type> {
|
|
6
|
+
message: string;
|
|
7
|
+
url: string;
|
|
8
|
+
}
|
|
9
|
+
export interface WindowAuthRequestedEvent<Topic, Type> extends WindowEvent<Topic, Type> {
|
|
10
|
+
authInfo: {
|
|
11
|
+
host: string;
|
|
12
|
+
isProxy: boolean;
|
|
13
|
+
port: number;
|
|
14
|
+
realm: string;
|
|
15
|
+
scheme: string;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export interface WindowEndLoadEvent<Topic, Type> extends WindowEvent<Topic, Type> {
|
|
19
|
+
documentName: string;
|
|
20
|
+
isMain: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface WindowNavigationRejectedEvent<Topic, Type> extends WindowEvent<Topic, Type> {
|
|
23
|
+
sourceName?: string;
|
|
24
|
+
url: string;
|
|
25
|
+
}
|
|
26
|
+
export interface WindowReloadedEvent<Topic, Type> extends WindowEvent<Topic, Type> {
|
|
27
|
+
url: string;
|
|
28
|
+
}
|
|
29
|
+
export interface WindowOptionsChangedEvent<Topic, Type> extends WindowEvent<Topic, Type> {
|
|
30
|
+
options: OpenFin.WindowOptions;
|
|
31
|
+
diff: OpenFin.WindowOptionDiff;
|
|
32
|
+
}
|
|
33
|
+
export interface WindowExternalProcessExitedEvent<Topic, Type> extends WindowEvent<Topic, Type> {
|
|
34
|
+
processUuid: string;
|
|
35
|
+
exitCode: number;
|
|
36
|
+
}
|
|
37
|
+
export interface WindowExternalProcessStartedEvent<Topic, Type> extends WindowEvent<Topic, Type> {
|
|
38
|
+
processUuid: string;
|
|
39
|
+
}
|
|
40
|
+
export interface WindowHiddenEvent<Topic, Type> extends WindowEvent<Topic, Type> {
|
|
41
|
+
reason: 'closing' | 'hide' | 'hide-on-close';
|
|
42
|
+
}
|
|
43
|
+
export interface PreloadScriptInfoRunning {
|
|
44
|
+
state: 'load-started' | 'load-failed' | 'load-succeeded' | 'failed' | 'succeeded';
|
|
45
|
+
}
|
|
46
|
+
export interface PreloadScriptInfo {
|
|
47
|
+
state: 'load-failed' | 'failed' | 'succeeded';
|
|
48
|
+
}
|
|
49
|
+
export interface WindowPreloadScriptsStateChangeEvent<Topic, Type> extends WindowEvent<Topic, Type> {
|
|
50
|
+
preloadScripts: (PreloadScriptInfoRunning & any)[];
|
|
51
|
+
}
|
|
52
|
+
export interface WindowPreloadScriptsStateChangedEvent<Topic, Type> extends WindowEvent<Topic, Type> {
|
|
53
|
+
preloadScripts: (PreloadScriptInfoRunning & any)[];
|
|
54
|
+
}
|
|
55
|
+
export interface WindowBeginBoundsChangingEvent<Topic, Type> extends WindowEvent<Topic, Type> {
|
|
56
|
+
height: number;
|
|
57
|
+
left: number;
|
|
58
|
+
top: number;
|
|
59
|
+
width: number;
|
|
60
|
+
windowState: 'minimized' | 'normal' | 'maximized';
|
|
61
|
+
}
|
|
62
|
+
export interface WindowEndBoundsChangingEvent<Topic, Type> extends WindowEvent<Topic, Type> {
|
|
63
|
+
height: number;
|
|
64
|
+
left: number;
|
|
65
|
+
top: number;
|
|
66
|
+
width: number;
|
|
67
|
+
windowState: 'minimized' | 'normal' | 'maximized';
|
|
68
|
+
}
|
|
69
|
+
export interface WindowBoundsChange<Topic, Type> extends WindowEvent<Topic, Type> {
|
|
70
|
+
changeType: 0 | 1 | 2;
|
|
71
|
+
deferred: boolean;
|
|
72
|
+
height: number;
|
|
73
|
+
left: number;
|
|
74
|
+
top: number;
|
|
75
|
+
width: number;
|
|
76
|
+
}
|
|
77
|
+
export interface WillMoveOrResize<Topic, Type> extends WindowEvent<Topic, Type> {
|
|
78
|
+
height: number;
|
|
79
|
+
left: number;
|
|
80
|
+
top: number;
|
|
81
|
+
width: number;
|
|
82
|
+
monitorScaleFactor: number;
|
|
83
|
+
}
|
|
84
|
+
export declare type WindowPerformanceReport<Topic, Type> = Performance & WindowEvent<Topic, Type>;
|
|
85
|
+
export interface ViewDetached<Topic, Type> extends WindowEvent<Topic, Type> {
|
|
86
|
+
previousTarget: OpenFin.Identity;
|
|
87
|
+
target: OpenFin.Identity;
|
|
88
|
+
viewIdentity: OpenFin.Identity;
|
|
89
|
+
}
|
|
90
|
+
export interface WindowEventMapping<Topic = string, Type = string> extends WebContentsEventMapping {
|
|
91
|
+
'auth-requested': WindowAuthRequestedEvent<Topic, Type>;
|
|
92
|
+
'begin-user-bounds-changing': WindowBeginBoundsChangingEvent<Topic, Type>;
|
|
93
|
+
'bounds-changed': WindowBoundsChange<Topic, Type>;
|
|
94
|
+
'bounds-changing': WindowBoundsChange<Topic, Type>;
|
|
95
|
+
'close-requested': WindowEvent<Topic, Type>;
|
|
96
|
+
'closed': WindowEvent<Topic, Type>;
|
|
97
|
+
'closing': WindowEvent<Topic, Type>;
|
|
98
|
+
'disabled-movement-bounds-changed': WindowBoundsChange<Topic, Type>;
|
|
99
|
+
'disabled-movement-bounds-changing': WindowBoundsChange<Topic, Type>;
|
|
100
|
+
'embedded': WindowEvent<Topic, Type>;
|
|
101
|
+
'end-user-bounds-changing': WindowEndBoundsChangingEvent<Topic, Type>;
|
|
102
|
+
'external-process-exited': WindowExternalProcessExitedEvent<Topic, Type>;
|
|
103
|
+
'external-process-started': WindowExternalProcessStartedEvent<Topic, Type>;
|
|
104
|
+
'hidden': WindowHiddenEvent<Topic, Type>;
|
|
105
|
+
'hotkey': InputEvent & WindowEvent<Topic, Type>;
|
|
106
|
+
'initialized': WindowEvent<Topic, Type>;
|
|
107
|
+
'layout-initialized': WindowEvent<Topic, Type>;
|
|
108
|
+
'layout-ready': WindowEvent<Topic, Type>;
|
|
109
|
+
'maximized': WindowEvent<Topic, Type>;
|
|
110
|
+
'minimized': WindowEvent<Topic, Type>;
|
|
111
|
+
'options-changed': WindowOptionsChangedEvent<Topic, Type>;
|
|
112
|
+
'performance-report': WindowPerformanceReport<Topic, Type>;
|
|
113
|
+
'preload-scripts-state-changed': WindowPreloadScriptsStateChangeEvent<Topic, Type>;
|
|
114
|
+
'preload-scripts-state-changing': WindowPreloadScriptsStateChangeEvent<Topic, Type>;
|
|
115
|
+
'reloaded': WindowReloadedEvent<Topic, Type>;
|
|
116
|
+
'restored': WindowEvent<Topic, Type>;
|
|
117
|
+
'show-requested': WindowEvent<Topic, Type>;
|
|
118
|
+
'shown': WindowEvent<Topic, Type>;
|
|
119
|
+
'user-movement-disabled': WindowEvent<Topic, Type>;
|
|
120
|
+
'user-movement-enabled': WindowEvent<Topic, Type>;
|
|
121
|
+
'view-attached': WindowEvent<Topic, Type>;
|
|
122
|
+
'view-detached': ViewDetached<Topic, Type>;
|
|
123
|
+
'will-move': WillMoveOrResize<Topic, Type>;
|
|
124
|
+
'will-resize': WillMoveOrResize<Topic, Type>;
|
|
125
|
+
}
|
|
126
|
+
export interface PropagatedWindowEventMapping<Topic = string, Type = string> extends BaseEventMap {
|
|
127
|
+
'window-begin-user-bounds-changing': WindowBeginBoundsChangingEvent<Topic, Type>;
|
|
128
|
+
'window-blurred': WindowEvent<Topic, Type>;
|
|
129
|
+
'window-bounds-changed': WindowBoundsChange<Topic, Type>;
|
|
130
|
+
'window-bounds-changing': WindowBoundsChange<Topic, Type>;
|
|
131
|
+
'window-certificate-selection-shown': CertificateSelectionShownEvent<Topic, Type>;
|
|
132
|
+
'window-closed': WindowEvent<Topic, Type>;
|
|
133
|
+
'window-closing': WindowEvent<Topic, Type>;
|
|
134
|
+
'window-crashed': CrashedEvent & WindowEvent<Topic, Type>;
|
|
135
|
+
'window-disabled-movement-bounds-changed': WindowBoundsChange<Topic, Type>;
|
|
136
|
+
'window-disabled-movement-bounds-changing': WindowBoundsChange<Topic, Type>;
|
|
137
|
+
'window-embedded': WindowEvent<Topic, Type>;
|
|
138
|
+
'window-end-user-bounds-changing': WindowBeginBoundsChangingEvent<Topic, Type>;
|
|
139
|
+
'window-external-process-exited': WindowExternalProcessExitedEvent<Topic, Type>;
|
|
140
|
+
'window-external-process-started': WindowExternalProcessStartedEvent<Topic, Type>;
|
|
141
|
+
'window-focused': WindowEvent<Topic, Type>;
|
|
142
|
+
'window-hidden': WindowHiddenEvent<Topic, Type>;
|
|
143
|
+
'window-hotkey': InputEvent & WindowEvent<Topic, Type>;
|
|
144
|
+
'window-initialized': WindowEvent<Topic, Type>;
|
|
145
|
+
'window-layout-initialized': WindowEvent<Topic, Type>;
|
|
146
|
+
'window-layout-ready': WindowEvent<Topic, Type>;
|
|
147
|
+
'window-maximized': WindowEvent<Topic, Type>;
|
|
148
|
+
'window-minimized': WindowEvent<Topic, Type>;
|
|
149
|
+
'window-navigation-rejected': WindowNavigationRejectedEvent<Topic, Type>;
|
|
150
|
+
'window-options-changed': WindowOptionsChangedEvent<Topic, Type>;
|
|
151
|
+
'window-performance-report': WindowPerformanceReport<Topic, Type>;
|
|
152
|
+
'window-preload-scripts-state-changed': WindowPreloadScriptsStateChangeEvent<Topic, Type>;
|
|
153
|
+
'window-preload-scripts-state-changing': WindowPreloadScriptsStateChangedEvent<Topic, Type>;
|
|
154
|
+
'window-resource-load-failed': WindowResourceLoadFailedEvent<Topic, Type>;
|
|
155
|
+
'window-resource-response-received': WindowResourceResponseReceivedEvent<Topic, Type>;
|
|
156
|
+
'window-reloaded': WindowReloadedEvent<Topic, Type>;
|
|
157
|
+
'window-restored': WindowEvent<Topic, Type>;
|
|
158
|
+
'window-shown': WindowEvent<Topic, Type>;
|
|
159
|
+
'window-user-movement-disabled': WindowEvent<Topic, Type>;
|
|
160
|
+
'window-user-movement-enabled': WindowEvent<Topic, Type>;
|
|
161
|
+
'window-will-move': WillMoveOrResize<Topic, Type>;
|
|
162
|
+
'window-will-resize': WillMoveOrResize<Topic, Type>;
|
|
163
|
+
}
|
|
164
|
+
export declare type WindowEvents = PropagatedViewEventMapping<'window'> & {
|
|
165
|
+
[Type in keyof WindowEventMapping]: WindowEventMapping<'window', Type>[Type];
|
|
166
|
+
};
|
|
167
|
+
export declare type PropagatedWindowEvents<Topic> = {
|
|
168
|
+
[Type in keyof PropagatedWindowEventMapping]: PropagatedWindowEventMapping<Topic, Type>[Type];
|
|
169
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Base } from '../base';
|
|
2
|
+
/**
|
|
3
|
+
* @lends ExternalApplication
|
|
4
|
+
*/
|
|
5
|
+
export default class ExternalApplicationModule extends Base {
|
|
6
|
+
/**
|
|
7
|
+
* Asynchronously returns an External Application object that represents an external application.
|
|
8
|
+
* <br>It is possible to wrap a process that does not yet exist, (for example, to listen for startup-related events)
|
|
9
|
+
* provided its uuid is already known.
|
|
10
|
+
* @param {string} uuid The UUID of the external application to be wrapped
|
|
11
|
+
* @return {Promise.<ExternalApplication>}
|
|
12
|
+
* @tutorial ExternalApplication.wrap
|
|
13
|
+
* @static
|
|
14
|
+
*/
|
|
15
|
+
wrap(uuid: string): Promise<OpenFin.ExternalApplication>;
|
|
16
|
+
/**
|
|
17
|
+
* Synchronously returns an External Application object that represents an external application.
|
|
18
|
+
* <br>It is possible to wrap a process that does not yet exist, (for example, to listen for startup-related events)
|
|
19
|
+
* provided its uuid is already known.
|
|
20
|
+
* @param {string} uuid The UUID of the external application to be wrapped
|
|
21
|
+
* @return {ExternalApplication}
|
|
22
|
+
* @tutorial ExternalApplication.wrapSync
|
|
23
|
+
* @static
|
|
24
|
+
*/
|
|
25
|
+
wrapSync(uuid: string): OpenFin.ExternalApplication;
|
|
26
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const base_1 = require("../base");
|
|
4
|
+
const Instance_1 = require("./Instance");
|
|
5
|
+
/**
|
|
6
|
+
* @lends ExternalApplication
|
|
7
|
+
*/
|
|
8
|
+
class ExternalApplicationModule extends base_1.Base {
|
|
9
|
+
/**
|
|
10
|
+
* Asynchronously returns an External Application object that represents an external application.
|
|
11
|
+
* <br>It is possible to wrap a process that does not yet exist, (for example, to listen for startup-related events)
|
|
12
|
+
* provided its uuid is already known.
|
|
13
|
+
* @param {string} uuid The UUID of the external application to be wrapped
|
|
14
|
+
* @return {Promise.<ExternalApplication>}
|
|
15
|
+
* @tutorial ExternalApplication.wrap
|
|
16
|
+
* @static
|
|
17
|
+
*/
|
|
18
|
+
wrap(uuid) {
|
|
19
|
+
this.wire.sendAction('external-application-wrap').catch((e) => {
|
|
20
|
+
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
21
|
+
});
|
|
22
|
+
return Promise.resolve(new Instance_1.ExternalApplication(this.wire, { uuid }));
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Synchronously returns an External Application object that represents an external application.
|
|
26
|
+
* <br>It is possible to wrap a process that does not yet exist, (for example, to listen for startup-related events)
|
|
27
|
+
* provided its uuid is already known.
|
|
28
|
+
* @param {string} uuid The UUID of the external application to be wrapped
|
|
29
|
+
* @return {ExternalApplication}
|
|
30
|
+
* @tutorial ExternalApplication.wrapSync
|
|
31
|
+
* @static
|
|
32
|
+
*/
|
|
33
|
+
wrapSync(uuid) {
|
|
34
|
+
this.wire.sendAction('external-application-wrap-sync').catch((e) => {
|
|
35
|
+
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
36
|
+
});
|
|
37
|
+
return new Instance_1.ExternalApplication(this.wire, { uuid });
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.default = ExternalApplicationModule;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { EmitterBase } from '../base';
|
|
2
|
+
import Transport from '../../transport/transport';
|
|
3
|
+
import { ExternalApplicationEvents } from '../events/externalApplication';
|
|
4
|
+
/**
|
|
5
|
+
* @classdesc An ExternalApplication object representing native language adapter connections to the runtime. Allows
|
|
6
|
+
* the developer to listen to <a href="tutorial-ExternalApplication.EventEmitter.html">application events.</a>
|
|
7
|
+
* Discovery of connections is provided by <a href="tutorial-System.getAllExternalApplications.html">getAllExternalApplications.</a>
|
|
8
|
+
*
|
|
9
|
+
* Processes that can be wrapped as `ExternalApplication`s include the following:
|
|
10
|
+
* - Processes which have connected to an OpenFin runtime via an adapter
|
|
11
|
+
* - Processes started via `System.launchExternalApplication`
|
|
12
|
+
* - Processes monitored via `System.monitorExternalProcess`
|
|
13
|
+
* @class
|
|
14
|
+
* @hideconstructor
|
|
15
|
+
*/
|
|
16
|
+
export declare class ExternalApplication extends EmitterBase<ExternalApplicationEvents> {
|
|
17
|
+
identity: OpenFin.ApplicationIdentity;
|
|
18
|
+
constructor(wire: Transport, identity: OpenFin.ApplicationIdentity);
|
|
19
|
+
/**
|
|
20
|
+
* Adds a listener to the end of the listeners array for the specified event.
|
|
21
|
+
* @param { string | symbol } eventType - The type of the event.
|
|
22
|
+
* @param { Function } listener - Called whenever an event of the specified type occurs.
|
|
23
|
+
* @param { SubOptions } [options] - Option to support event timestamps.
|
|
24
|
+
* @return {Promise.<this>}
|
|
25
|
+
* @function addListener
|
|
26
|
+
* @memberof ExternalApplication
|
|
27
|
+
* @instance
|
|
28
|
+
* @tutorial ExternalApplication.EventEmitter
|
|
29
|
+
*/
|
|
30
|
+
/**
|
|
31
|
+
* Adds a listener to the end of the listeners array for the specified event.
|
|
32
|
+
* @param { string | symbol } eventType - The type of the event.
|
|
33
|
+
* @param { Function } listener - Called whenever an event of the specified type occurs.
|
|
34
|
+
* @param { SubOptions } [options] - Option to support event timestamps.
|
|
35
|
+
* @return {Promise.<this>}
|
|
36
|
+
* @function on
|
|
37
|
+
* @memberof ExternalApplication
|
|
38
|
+
* @instance
|
|
39
|
+
* @tutorial ExternalApplication.EventEmitter
|
|
40
|
+
*/
|
|
41
|
+
/**
|
|
42
|
+
* Adds a one time listener for the event. The listener is invoked only the first time the event is fired, after which it is removed.
|
|
43
|
+
* @param { string | symbol } eventType - The type of the event.
|
|
44
|
+
* @param { Function } listener - The callback function.
|
|
45
|
+
* @param { SubOptions } [options] - Option to support event timestamps.
|
|
46
|
+
* @return {Promise.<this>}
|
|
47
|
+
* @function once
|
|
48
|
+
* @memberof ExternalApplication
|
|
49
|
+
* @instance
|
|
50
|
+
* @tutorial ExternalApplication.EventEmitter
|
|
51
|
+
*/
|
|
52
|
+
/**
|
|
53
|
+
* Adds a listener to the beginning of the listeners array for the specified event.
|
|
54
|
+
* @param { string | symbol } eventType - The type of the event.
|
|
55
|
+
* @param { Function } listener - The callback function.
|
|
56
|
+
* @param { SubOptions } [options] - Option to support event timestamps.
|
|
57
|
+
* @return {Promise.<this>}
|
|
58
|
+
* @function prependListener
|
|
59
|
+
* @memberof ExternalApplication
|
|
60
|
+
* @instance
|
|
61
|
+
* @tutorial ExternalApplication.EventEmitter
|
|
62
|
+
*/
|
|
63
|
+
/**
|
|
64
|
+
* Adds a one time listener for the event. The listener is invoked only the first time the event is fired, after which it is removed.
|
|
65
|
+
* The listener is added to the beginning of the listeners array.
|
|
66
|
+
* @param { string | symbol } eventType - The type of the event.
|
|
67
|
+
* @param { Function } listener - The callback function.
|
|
68
|
+
* @param { SubOptions } [options] - Option to support event timestamps.
|
|
69
|
+
* @return {Promise.<this>}
|
|
70
|
+
* @function prependOnceListener
|
|
71
|
+
* @memberof ExternalApplication
|
|
72
|
+
* @instance
|
|
73
|
+
* @tutorial ExternalApplication.EventEmitter
|
|
74
|
+
*/
|
|
75
|
+
/**
|
|
76
|
+
* Remove a listener from the listener array for the specified event.
|
|
77
|
+
* Caution: Calling this method changes the array indices in the listener array behind the listener.
|
|
78
|
+
* @param { string | symbol } eventType - The type of the event.
|
|
79
|
+
* @param { Function } listener - The callback function.
|
|
80
|
+
* @param { SubOptions } [options] - Option to support event timestamps.
|
|
81
|
+
* @return {Promise.<this>}
|
|
82
|
+
* @function removeListener
|
|
83
|
+
* @memberof ExternalApplication
|
|
84
|
+
* @instance
|
|
85
|
+
* @tutorial ExternalApplication.EventEmitter
|
|
86
|
+
*/
|
|
87
|
+
/**
|
|
88
|
+
* Removes all listeners, or those of the specified event.
|
|
89
|
+
* @param { string | symbol } [eventType] - The type of the event.
|
|
90
|
+
* @return {Promise.<this>}
|
|
91
|
+
* @function removeAllListeners
|
|
92
|
+
* @memberof ExternalApplication
|
|
93
|
+
* @instance
|
|
94
|
+
* @tutorial ExternalApplication.EventEmitter
|
|
95
|
+
*/
|
|
96
|
+
/**
|
|
97
|
+
* Retrieves information about the external application.
|
|
98
|
+
* @return {Promise.<ExternalApplicationInfo>}
|
|
99
|
+
* @tutorial ExternalApplication.getInfo
|
|
100
|
+
*/
|
|
101
|
+
getInfo(): Promise<OpenFin.ExternalApplicationInfo>;
|
|
102
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExternalApplication = void 0;
|
|
4
|
+
/* eslint-disable import/prefer-default-export */
|
|
5
|
+
const base_1 = require("../base");
|
|
6
|
+
/**
|
|
7
|
+
* @classdesc An ExternalApplication object representing native language adapter connections to the runtime. Allows
|
|
8
|
+
* the developer to listen to <a href="tutorial-ExternalApplication.EventEmitter.html">application events.</a>
|
|
9
|
+
* Discovery of connections is provided by <a href="tutorial-System.getAllExternalApplications.html">getAllExternalApplications.</a>
|
|
10
|
+
*
|
|
11
|
+
* Processes that can be wrapped as `ExternalApplication`s include the following:
|
|
12
|
+
* - Processes which have connected to an OpenFin runtime via an adapter
|
|
13
|
+
* - Processes started via `System.launchExternalApplication`
|
|
14
|
+
* - Processes monitored via `System.monitorExternalProcess`
|
|
15
|
+
* @class
|
|
16
|
+
* @hideconstructor
|
|
17
|
+
*/
|
|
18
|
+
class ExternalApplication extends base_1.EmitterBase {
|
|
19
|
+
constructor(wire, identity) {
|
|
20
|
+
super(wire, 'external-application', identity.uuid);
|
|
21
|
+
this.identity = identity;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Adds a listener to the end of the listeners array for the specified event.
|
|
25
|
+
* @param { string | symbol } eventType - The type of the event.
|
|
26
|
+
* @param { Function } listener - Called whenever an event of the specified type occurs.
|
|
27
|
+
* @param { SubOptions } [options] - Option to support event timestamps.
|
|
28
|
+
* @return {Promise.<this>}
|
|
29
|
+
* @function addListener
|
|
30
|
+
* @memberof ExternalApplication
|
|
31
|
+
* @instance
|
|
32
|
+
* @tutorial ExternalApplication.EventEmitter
|
|
33
|
+
*/
|
|
34
|
+
/**
|
|
35
|
+
* Adds a listener to the end of the listeners array for the specified event.
|
|
36
|
+
* @param { string | symbol } eventType - The type of the event.
|
|
37
|
+
* @param { Function } listener - Called whenever an event of the specified type occurs.
|
|
38
|
+
* @param { SubOptions } [options] - Option to support event timestamps.
|
|
39
|
+
* @return {Promise.<this>}
|
|
40
|
+
* @function on
|
|
41
|
+
* @memberof ExternalApplication
|
|
42
|
+
* @instance
|
|
43
|
+
* @tutorial ExternalApplication.EventEmitter
|
|
44
|
+
*/
|
|
45
|
+
/**
|
|
46
|
+
* Adds a one time listener for the event. The listener is invoked only the first time the event is fired, after which it is removed.
|
|
47
|
+
* @param { string | symbol } eventType - The type of the event.
|
|
48
|
+
* @param { Function } listener - The callback function.
|
|
49
|
+
* @param { SubOptions } [options] - Option to support event timestamps.
|
|
50
|
+
* @return {Promise.<this>}
|
|
51
|
+
* @function once
|
|
52
|
+
* @memberof ExternalApplication
|
|
53
|
+
* @instance
|
|
54
|
+
* @tutorial ExternalApplication.EventEmitter
|
|
55
|
+
*/
|
|
56
|
+
/**
|
|
57
|
+
* Adds a listener to the beginning of the listeners array for the specified event.
|
|
58
|
+
* @param { string | symbol } eventType - The type of the event.
|
|
59
|
+
* @param { Function } listener - The callback function.
|
|
60
|
+
* @param { SubOptions } [options] - Option to support event timestamps.
|
|
61
|
+
* @return {Promise.<this>}
|
|
62
|
+
* @function prependListener
|
|
63
|
+
* @memberof ExternalApplication
|
|
64
|
+
* @instance
|
|
65
|
+
* @tutorial ExternalApplication.EventEmitter
|
|
66
|
+
*/
|
|
67
|
+
/**
|
|
68
|
+
* Adds a one time listener for the event. The listener is invoked only the first time the event is fired, after which it is removed.
|
|
69
|
+
* The listener is added to the beginning of the listeners array.
|
|
70
|
+
* @param { string | symbol } eventType - The type of the event.
|
|
71
|
+
* @param { Function } listener - The callback function.
|
|
72
|
+
* @param { SubOptions } [options] - Option to support event timestamps.
|
|
73
|
+
* @return {Promise.<this>}
|
|
74
|
+
* @function prependOnceListener
|
|
75
|
+
* @memberof ExternalApplication
|
|
76
|
+
* @instance
|
|
77
|
+
* @tutorial ExternalApplication.EventEmitter
|
|
78
|
+
*/
|
|
79
|
+
/**
|
|
80
|
+
* Remove a listener from the listener array for the specified event.
|
|
81
|
+
* Caution: Calling this method changes the array indices in the listener array behind the listener.
|
|
82
|
+
* @param { string | symbol } eventType - The type of the event.
|
|
83
|
+
* @param { Function } listener - The callback function.
|
|
84
|
+
* @param { SubOptions } [options] - Option to support event timestamps.
|
|
85
|
+
* @return {Promise.<this>}
|
|
86
|
+
* @function removeListener
|
|
87
|
+
* @memberof ExternalApplication
|
|
88
|
+
* @instance
|
|
89
|
+
* @tutorial ExternalApplication.EventEmitter
|
|
90
|
+
*/
|
|
91
|
+
/**
|
|
92
|
+
* Removes all listeners, or those of the specified event.
|
|
93
|
+
* @param { string | symbol } [eventType] - The type of the event.
|
|
94
|
+
* @return {Promise.<this>}
|
|
95
|
+
* @function removeAllListeners
|
|
96
|
+
* @memberof ExternalApplication
|
|
97
|
+
* @instance
|
|
98
|
+
* @tutorial ExternalApplication.EventEmitter
|
|
99
|
+
*/
|
|
100
|
+
/**
|
|
101
|
+
* Retrieves information about the external application.
|
|
102
|
+
* @return {Promise.<ExternalApplicationInfo>}
|
|
103
|
+
* @tutorial ExternalApplication.getInfo
|
|
104
|
+
*/
|
|
105
|
+
getInfo() {
|
|
106
|
+
return this.wire.sendAction('get-external-application-info', this.identity).then(({ payload }) => payload.data);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
exports.ExternalApplication = ExternalApplication;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
const Factory_1 = require("./Factory");
|
|
14
|
+
exports.default = Factory_1.default;
|
|
15
|
+
__exportStar(require("./Instance"), exports);
|
package/src/api/fin.d.ts
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { EventEmitter } from 'events';
|
|
3
|
+
import Transport from '../transport/transport';
|
|
4
|
+
import System from './system/index';
|
|
5
|
+
import _WindowModule from './window/index';
|
|
6
|
+
import ApplicationModule from './application/index';
|
|
7
|
+
import InterApplicationBus from './interappbus/index';
|
|
8
|
+
import Clipboard from './clipboard/index';
|
|
9
|
+
import ExternalApplicationModule from './external-application/index';
|
|
10
|
+
import _FrameModule from './frame/index';
|
|
11
|
+
import GlobalHotkey from './global-hotkey/index';
|
|
12
|
+
import ViewModule from './view/index';
|
|
13
|
+
import PlatformModule from './platform/index';
|
|
14
|
+
import { EntityType } from '../shapes/EntityType';
|
|
15
|
+
import { Me } from './me';
|
|
16
|
+
import InteropModule from './interop';
|
|
17
|
+
import SnapshotSourceModule from './snapshot-source';
|
|
18
|
+
export interface FinApi<MeType extends EntityType> {
|
|
19
|
+
readonly System: System;
|
|
20
|
+
readonly Window: _WindowModule;
|
|
21
|
+
readonly Application: ApplicationModule;
|
|
22
|
+
readonly InterApplicationBus: InterApplicationBus;
|
|
23
|
+
readonly Clipboard: Clipboard;
|
|
24
|
+
readonly ExternalApplication: ExternalApplicationModule;
|
|
25
|
+
readonly Frame: _FrameModule;
|
|
26
|
+
readonly GlobalHotkey: GlobalHotkey;
|
|
27
|
+
readonly View: ViewModule;
|
|
28
|
+
readonly Platform: PlatformModule;
|
|
29
|
+
readonly Interop: InteropModule;
|
|
30
|
+
readonly SnapshotSource: SnapshotSourceModule;
|
|
31
|
+
readonly me: Me<MeType>;
|
|
32
|
+
}
|
|
33
|
+
export default class Fin<MeType extends EntityType = EntityType> extends EventEmitter implements FinApi<MeType> {
|
|
34
|
+
private wire;
|
|
35
|
+
System: System;
|
|
36
|
+
Window: _WindowModule;
|
|
37
|
+
Application: ApplicationModule;
|
|
38
|
+
InterApplicationBus: InterApplicationBus;
|
|
39
|
+
Clipboard: Clipboard;
|
|
40
|
+
ExternalApplication: ExternalApplicationModule;
|
|
41
|
+
Frame: _FrameModule;
|
|
42
|
+
GlobalHotkey: GlobalHotkey;
|
|
43
|
+
View: ViewModule;
|
|
44
|
+
Platform: PlatformModule;
|
|
45
|
+
Interop: InteropModule;
|
|
46
|
+
SnapshotSource: SnapshotSourceModule;
|
|
47
|
+
readonly me: Me<MeType>;
|
|
48
|
+
constructor(wire: Transport<MeType>);
|
|
49
|
+
}
|
package/src/api/fin.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const events_1 = require("events");
|
|
4
|
+
// Import from the file rather than the directory in case someone consuming types is using module resolution other than "node"
|
|
5
|
+
const index_1 = require("./system/index");
|
|
6
|
+
const index_2 = require("./window/index");
|
|
7
|
+
const index_3 = require("./application/index");
|
|
8
|
+
const index_4 = require("./interappbus/index");
|
|
9
|
+
const index_5 = require("./clipboard/index");
|
|
10
|
+
const index_6 = require("./external-application/index");
|
|
11
|
+
const index_7 = require("./frame/index");
|
|
12
|
+
const index_8 = require("./global-hotkey/index");
|
|
13
|
+
const index_9 = require("./view/index");
|
|
14
|
+
const index_10 = require("./platform/index");
|
|
15
|
+
const me_1 = require("./me");
|
|
16
|
+
const fin_store_1 = require("../transport/fin_store");
|
|
17
|
+
const interop_1 = require("./interop");
|
|
18
|
+
const snapshot_source_1 = require("./snapshot-source");
|
|
19
|
+
class Fin extends events_1.EventEmitter {
|
|
20
|
+
constructor(wire) {
|
|
21
|
+
super();
|
|
22
|
+
fin_store_1.registerFin(wire, this);
|
|
23
|
+
this.wire = wire;
|
|
24
|
+
this.System = new index_1.default(wire);
|
|
25
|
+
this.Window = new index_2.default(wire);
|
|
26
|
+
this.Application = new index_3.default(wire);
|
|
27
|
+
this.InterApplicationBus = new index_4.default(wire);
|
|
28
|
+
this.Clipboard = new index_5.default(wire);
|
|
29
|
+
this.ExternalApplication = new index_6.default(wire);
|
|
30
|
+
this.Frame = new index_7.default(wire);
|
|
31
|
+
this.GlobalHotkey = new index_8.default(wire);
|
|
32
|
+
this.Platform = new index_10.default(wire, this.InterApplicationBus.Channel);
|
|
33
|
+
this.View = new index_9.default(wire);
|
|
34
|
+
this.Interop = new interop_1.default(wire);
|
|
35
|
+
this.SnapshotSource = new snapshot_source_1.default(wire);
|
|
36
|
+
this.me = me_1.getMe(wire);
|
|
37
|
+
// Handle disconnect events
|
|
38
|
+
wire.on('disconnected', () => {
|
|
39
|
+
this.emit('disconnected');
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.default = Fin;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Base } from '../base';
|
|
2
|
+
/**
|
|
3
|
+
* @lends Frame
|
|
4
|
+
*/
|
|
5
|
+
export default class _FrameModule extends Base {
|
|
6
|
+
/**
|
|
7
|
+
* Asynchronously returns a reference to the specified frame. The frame does not have to exist
|
|
8
|
+
* @param {Identity} identity - the identity of the frame you want to wrap
|
|
9
|
+
* @return {Promise.<_Frame>}
|
|
10
|
+
* @tutorial Frame.wrap
|
|
11
|
+
* @static
|
|
12
|
+
*/
|
|
13
|
+
wrap(identity: OpenFin.Identity): Promise<OpenFin.Frame>;
|
|
14
|
+
/**
|
|
15
|
+
* Synchronously returns a reference to the specified frame. The frame does not have to exist
|
|
16
|
+
* @param {Identity} identity - the identity of the frame you want to wrap
|
|
17
|
+
* @return {_Frame}
|
|
18
|
+
* @tutorial Frame.wrapSync
|
|
19
|
+
* @static
|
|
20
|
+
*/
|
|
21
|
+
wrapSync(identity: OpenFin.Identity): OpenFin.Frame;
|
|
22
|
+
/**
|
|
23
|
+
* Asynchronously returns a reference to the current frame
|
|
24
|
+
* @return {Promise.<_Frame>}
|
|
25
|
+
* @tutorial Frame.getCurrent
|
|
26
|
+
* @static
|
|
27
|
+
*/
|
|
28
|
+
getCurrent(): Promise<OpenFin.Frame>;
|
|
29
|
+
/**
|
|
30
|
+
* Synchronously returns a reference to the current frame
|
|
31
|
+
* @return {_Frame}
|
|
32
|
+
* @tutorial Frame.getCurrentSync
|
|
33
|
+
* @static
|
|
34
|
+
*/
|
|
35
|
+
getCurrentSync(): OpenFin.Frame;
|
|
36
|
+
}
|