@types/openfin
Advanced tools
Comparing version
@@ -65,2 +65,3 @@ // Type definitions for OpenFin API 37.0 | ||
type RegistryInfo = import('./_v2/api/system/registry-info').RegistryInfo; | ||
type RuntimeInfo = import('./_v2/api/system/runtime-info').RuntimeInfo; | ||
type RVMInfo = import('./_v2/api/system/rvm').RVMInfo; | ||
@@ -81,2 +82,3 @@ type WindowDetail = import('./_v2/api/system/window').WindowDetail; | ||
ExternalApp: OpenFinExternalApplicationStatic; | ||
GlobalHotkey: OpenFinGlobalHotkey; | ||
InterApplicationBus: OpenFinInterApplicationBus; | ||
@@ -316,2 +318,41 @@ Notification: OpenFinNotificationStatic; | ||
/** | ||
* GlobalHotkey | ||
* The Global Hotkey allows the registration and unregistration of given hotkeys at the OS level, meaning a Window/Application will receive the events regardless of focused state. | ||
*/ | ||
interface OpenFinGlobalHotkey { | ||
/** | ||
* Registers an event listener on the specified event. | ||
*/ | ||
addEventListener( | ||
type: OpenFinGlobalHotkeyEventType, | ||
listener: (event: GlobalHotkeyEvent) => void, | ||
callback?: () => void, | ||
errorCallback?: (reason: string, error: ErrorInfo) => void): void; | ||
/** | ||
* Checks if a given hotkey has been registered | ||
*/ | ||
isRegistered(hotkey: string, callback?: (registered: boolean) => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; | ||
/** | ||
* Registers a global hotkey with the operating system. | ||
*/ | ||
register(hotkey: string, listener: () => void, callback?: () => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; | ||
/** | ||
* Removes a previously registered event listener from the specified event. | ||
*/ | ||
removeEventListener( | ||
type: OpenFinGlobalHotkeyEventType, | ||
listener: (event: GlobalHotkeyEvent) => void, | ||
callback?: () => void, | ||
errorCallback?: (reason: string, error: ErrorInfo) => void): void; | ||
/** | ||
* Unregisters a global hotkey with the operating system. | ||
*/ | ||
unregister(hotkey: string, callback?: () => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; | ||
/** | ||
* Unregisters all global hotkeys for the current application. | ||
*/ | ||
unregisterAll(callback?: () => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; | ||
} | ||
/** | ||
@@ -588,2 +629,6 @@ * InterApplicationBus | ||
/** | ||
* Returns information about the running Runtime in an object. | ||
*/ | ||
getRuntimeInfo(callback?: (rvmInfo: RuntimeInfo) => void, errorCallback?: (reason: string) => void): void; | ||
/** | ||
* Returns information about the running RVM in an object. | ||
@@ -984,2 +1029,17 @@ */ | ||
interface GlobalHotkeyEvent { | ||
topic: string; | ||
type: OpenFinGlobalHotkeyEventType; | ||
/** | ||
* The Identity that has just registered the hotkey | ||
*/ | ||
identity: { | ||
name: string; | ||
uuid: string; | ||
parentFrame: string; | ||
entityType: string; | ||
}, | ||
hotkey: string; | ||
} | ||
interface DesktopIconClickedEvent { | ||
@@ -1214,2 +1274,5 @@ mouse: { | ||
type OpenFinGlobalHotkeyEventType = "registered" | ||
| "unregistered"; | ||
type OpenFinSystemEventType = "application-closed" | ||
@@ -1216,0 +1279,0 @@ | "application-crashed" |
{ | ||
"name": "@types/openfin", | ||
"version": "37.0.2", | ||
"version": "37.0.3", | ||
"description": "TypeScript definitions for OpenFin API", | ||
@@ -39,4 +39,4 @@ "license": "MIT", | ||
}, | ||
"typesPublisherContentHash": "f1e9369ed8270b10a604bbe2e53bf809d129474e5693a56b2b92fc5476781a5e", | ||
"typesPublisherContentHash": "c53a8fd3cb6be5c982884e78ef4eaa0fa34da884e61250b83a562834f6232d00", | ||
"typeScriptVersion": "2.9" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
Additional Details | ||
* Last updated: Mon, 03 Dec 2018 23:59:13 GMT | ||
* Last updated: Tue, 22 Jan 2019 21:58:14 GMT | ||
* Dependencies: @types/node, @types/ws | ||
@@ -14,0 +14,0 @@ * Global values: fin |
184690
1.43%4428
1.37%