-
Notifications
You must be signed in to change notification settings - Fork 732
/
cinnamon-screen-grabber.h
44 lines (35 loc) · 2.11 KB
/
cinnamon-screen-grabber.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
#ifndef __CINNAMON_SCREEN_GRABBER_H__
#define __CINNAMON_SCREEN_GRABBER_H__
#include <glib-object.h>
G_BEGIN_DECLS
/**
* SECTION:cinnamon-screen-grabber
* @short_description: Grab pixel data from the screen
*
* The #CinnamonScreenGrabber object is used to download previous drawn
* content to the screen. It internally uses pixel-buffer objects if
* available, otherwise falls back to cogl_read_pixels().
*
* If you are repeatedly grabbing images of the same size from the
* screen, it makes sense to create one #CinnamonScreenGrabber and keep
* it around. Otherwise, it's fine to simply create one as needed and
* then get rid of it.
*/
typedef struct _CinnamonScreenGrabber CinnamonScreenGrabber;
typedef struct _CinnamonScreenGrabberClass CinnamonScreenGrabberClass;
#define CINNAMON_TYPE_SCREEN_GRABBER (cinnamon_screen_grabber_get_type ())
#define CINNAMON_SCREEN_GRABBER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), CINNAMON_TYPE_SCREEN_GRABBER, CinnamonScreenGrabber))
#define CINNAMON_SCREEN_GRABBER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CINNAMON_TYPE_SCREEN_GRABBER, CinnamonScreenGrabberClass))
#define CINNAMON_IS_SCREEN_GRABBER(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), CINNAMON_TYPE_SCREEN_GRABBER))
#define CINNAMON_IS_SCREEN_GRABBER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CINNAMON_TYPE_SCREEN_GRABBER))
#define CINNAMON_SCREEN_GRABBER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CINNAMON_TYPE_SCREEN_GRABBER, CinnamonScreenGrabberClass))
GType cinnamon_screen_grabber_get_type (void) G_GNUC_CONST;
CinnamonScreenGrabber *cinnamon_screen_grabber_new (void);
guchar * cinnamon_screen_grabber_grab (CinnamonScreenGrabber *grabber,
int x,
int y,
int width,
int height);
G_END_DECLS
#endif /* __CINNAMON_SCREEN_GRABBER_H__ */