Added missing AppWindow events.

This commit is contained in:
Alexander Shutov
2015-05-13 16:46:45 +03:00
parent 846a250e0a
commit b0d1fa0b58
2 changed files with 14 additions and 0 deletions

View File

@@ -28,6 +28,14 @@ var currentWindow: cwindow.AppWindow = chrome.app.window.current();
var otherWindow: cwindow.AppWindow = chrome.app.window.get('some-string');
var allWindows: cwindow.AppWindow[] = chrome.app.window.getAll();
// listening to window events
currentWindow.onBoundsChanged.addListener(function () { return; });
currentWindow.onClosed.addListener(function () { return; });
currentWindow.onFullscreened.addListener(function () { return; });
currentWindow.onMaximized.addListener(function () { return; });
currentWindow.onMinimized.addListener(function () { return; });
currentWindow.onRestored.addListener(function () { return; });
// check platform capabilities
var visibleEverywhere: boolean = chrome.app.window.canSetVisibleOnAllWorkspaces();

View File

@@ -122,6 +122,12 @@ declare module chrome.app.window {
id: string;
innerBounds: Bounds;
outerBounds: Bounds;
onBoundsChanged: WindowEvent;
onClosed: WindowEvent;
onFullscreened: WindowEvent;
onMaximized: WindowEvent;
onMinimized: WindowEvent;
onRestored: WindowEvent;
}
export function create(url: string, options?: CreateWindowOptions, callback?: (created_window: AppWindow) => void): void;