screenshot: Split into separate file / class

Split the screenshot functionality from ShellGlobal into its own class.

https://bugzilla.gnome.org/show_bug.cgi?id=670086
This commit is contained in:
Adel Gadllah
2012-02-14 20:33:56 +01:00
parent b2ec340f9e
commit 4516e4cc3b
7 changed files with 475 additions and 382 deletions

View File

@ -146,8 +146,9 @@ const GnomeShell = new Lang.Class({
*/
ScreenshotAreaAsync : function (params, invocation) {
let [x, y, width, height, flash, filename, callback] = params;
global.screenshot_area (x, y, width, height, filename,
Lang.bind(this, this._onScreenshotComplete,
let screenshot = new Shell.Screenshot();
screenshot.screenshot_area (x, y, width, height, filename,
Lang.bind(this, this._onScreenshotComplete,
flash, invocation));
},
@ -165,8 +166,9 @@ const GnomeShell = new Lang.Class({
*/
ScreenshotWindowAsync : function (params, invocation) {
let [include_frame, include_cursor, flash, filename] = params;
global.screenshot_window (include_frame, include_cursor, filename,
Lang.bind(this, this._onScreenshotComplete,
let screenshot = new Shell.Screenshot();
screenshot.screenshot_window (include_frame, include_cursor, filename,
Lang.bind(this, this._onScreenshotComplete,
flash, invocation));
},
@ -183,8 +185,9 @@ const GnomeShell = new Lang.Class({
*/
ScreenshotAsync : function (params, invocation) {
let [include_cursor, flash, filename] = params;
global.screenshot(include_cursor, filename,
Lang.bind(this, this._onScreenshotComplete,
let screenshot = new Shell.Screenshot();
screenshot.screenshot(include_cursor, filename,
Lang.bind(this, this._onScreenshotComplete,
flash, invocation));
},