2012-02-14 19:33:56 +00:00
|
|
|
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
|
|
|
#ifndef __SHELL_SCREENSHOT_H__
|
|
|
|
#define __SHELL_SCREENSHOT_H__
|
|
|
|
|
|
|
|
/**
|
|
|
|
* SECTION:shell-screenshot
|
|
|
|
* @short_description: Grabs screenshots of areas and/or windows
|
|
|
|
*
|
|
|
|
* The #ShellScreenshot object is used to take screenshots of screen
|
|
|
|
* areas or windows and write them out as png files.
|
|
|
|
*
|
|
|
|
*/
|
2015-09-24 18:07:44 +00:00
|
|
|
#define SHELL_TYPE_SCREENSHOT (shell_screenshot_get_type ())
|
|
|
|
G_DECLARE_FINAL_TYPE (ShellScreenshot, shell_screenshot,
|
|
|
|
SHELL, SCREENSHOT, GObject)
|
2012-02-14 19:33:56 +00:00
|
|
|
|
2012-02-14 20:57:34 +00:00
|
|
|
ShellScreenshot *shell_screenshot_new (void);
|
2012-02-14 19:33:56 +00:00
|
|
|
|
2018-07-19 13:54:33 +00:00
|
|
|
void shell_screenshot_screenshot_area (ShellScreenshot *screenshot,
|
|
|
|
int x,
|
|
|
|
int y,
|
|
|
|
int width,
|
|
|
|
int height,
|
2019-11-05 23:46:41 +00:00
|
|
|
GOutputStream *stream,
|
2018-07-19 13:54:33 +00:00
|
|
|
GAsyncReadyCallback callback,
|
|
|
|
gpointer user_data);
|
|
|
|
gboolean shell_screenshot_screenshot_area_finish (ShellScreenshot *screenshot,
|
|
|
|
GAsyncResult *result,
|
|
|
|
cairo_rectangle_int_t **area,
|
|
|
|
GError **error);
|
2012-02-14 19:33:56 +00:00
|
|
|
|
2018-07-19 13:54:33 +00:00
|
|
|
void shell_screenshot_screenshot_window (ShellScreenshot *screenshot,
|
|
|
|
gboolean include_frame,
|
|
|
|
gboolean include_cursor,
|
2019-11-05 23:46:41 +00:00
|
|
|
GOutputStream *stream,
|
2018-07-19 13:54:33 +00:00
|
|
|
GAsyncReadyCallback callback,
|
|
|
|
gpointer user_data);
|
|
|
|
gboolean shell_screenshot_screenshot_window_finish (ShellScreenshot *screenshot,
|
|
|
|
GAsyncResult *result,
|
|
|
|
cairo_rectangle_int_t **area,
|
|
|
|
GError **error);
|
2012-02-14 19:33:56 +00:00
|
|
|
|
2018-07-19 13:54:33 +00:00
|
|
|
void shell_screenshot_screenshot (ShellScreenshot *screenshot,
|
|
|
|
gboolean include_cursor,
|
2019-11-05 23:46:41 +00:00
|
|
|
GOutputStream *stream,
|
2018-07-19 13:54:33 +00:00
|
|
|
GAsyncReadyCallback callback,
|
|
|
|
gpointer user_data);
|
|
|
|
gboolean shell_screenshot_screenshot_finish (ShellScreenshot *screenshot,
|
|
|
|
GAsyncResult *result,
|
|
|
|
cairo_rectangle_int_t **area,
|
|
|
|
GError **error);
|
2012-02-14 19:33:56 +00:00
|
|
|
|
2022-01-15 15:22:44 +00:00
|
|
|
void shell_screenshot_screenshot_stage_to_content (ShellScreenshot *screenshot,
|
|
|
|
GAsyncReadyCallback callback,
|
|
|
|
gpointer user_data);
|
2021-08-16 15:12:05 +00:00
|
|
|
ClutterContent *shell_screenshot_screenshot_stage_to_content_finish (ShellScreenshot *screenshot,
|
|
|
|
GAsyncResult *result,
|
|
|
|
float *scale,
|
|
|
|
ClutterContent **cursor_content,
|
|
|
|
graphene_point_t *cursor_point,
|
|
|
|
float *cursor_scale,
|
|
|
|
GError **error);
|
2022-01-15 15:22:44 +00:00
|
|
|
|
2018-07-19 12:50:49 +00:00
|
|
|
void shell_screenshot_pick_color (ShellScreenshot *screenshot,
|
|
|
|
int x,
|
|
|
|
int y,
|
|
|
|
GAsyncReadyCallback callback,
|
|
|
|
gpointer user_data);
|
|
|
|
gboolean shell_screenshot_pick_color_finish (ShellScreenshot *screenshot,
|
|
|
|
GAsyncResult *result,
|
|
|
|
ClutterColor *color,
|
|
|
|
GError **error);
|
|
|
|
|
2022-01-15 15:20:51 +00:00
|
|
|
void shell_screenshot_composite_to_stream (CoglTexture *texture,
|
|
|
|
int x,
|
|
|
|
int y,
|
|
|
|
int width,
|
|
|
|
int height,
|
2021-08-16 15:12:05 +00:00
|
|
|
float scale,
|
|
|
|
CoglTexture *cursor,
|
|
|
|
int cursor_x,
|
|
|
|
int cursor_y,
|
|
|
|
float cursor_scale,
|
2022-01-15 15:20:51 +00:00
|
|
|
GOutputStream *stream,
|
|
|
|
GAsyncReadyCallback callback,
|
|
|
|
gpointer user_data);
|
2021-11-26 17:06:36 +00:00
|
|
|
GdkPixbuf *shell_screenshot_composite_to_stream_finish (GAsyncResult *result,
|
|
|
|
GError **error);
|
2022-01-15 15:20:51 +00:00
|
|
|
|
2012-02-14 19:33:56 +00:00
|
|
|
#endif /* ___SHELL_SCREENSHOT_H__ */
|