Add screenshot interface

Adds methods to shell_global to allow taking screenshots
save the result into a specified png image.

It exposes three methods via shellDBus applications like
gnome-screenshot:

*) Screenshot (screenshots the whole screen)
*) ScreenshotWindow (screenshots the focused window)
*) ScreenshotArea (screenshots a specific area)

https://bugzilla.gnome.org/show_bug.cgi?id=652952
This commit is contained in:
Adel Gadllah
2011-08-24 16:06:13 +02:00
parent a2e6b3167b
commit b7fd78b254
4 changed files with 319 additions and 0 deletions

View File

@ -142,6 +142,25 @@ void shell_global_reexec_self (ShellGlobal *global);
void shell_global_launch_calendar_server (ShellGlobal *global);
typedef void (*ShellGlobalScreenshotCallback) (ShellGlobal *global, gboolean success);
void shell_global_screenshot_area (ShellGlobal *global,
int x,
int y,
int width,
int height,
const char *filename,
ShellGlobalScreenshotCallback callback);
gboolean shell_global_screenshot_window (ShellGlobal *global,
gboolean include_frame,
const char *filename);
void shell_global_screenshot (ShellGlobal *global,
const char *filename,
ShellGlobalScreenshotCallback callback);
G_END_DECLS
#endif /* __SHELL_GLOBAL_H__ */