- add support for getting a subimage of the window
[imager-screenshot.git] / Screenshot.xs
1 #include "EXTERN.h"
2 #include "perl.h"
3 #include "XSUB.h"
4 #include "imext.h"
5 #include "imperl.h"
6 #include "imss.h"
7
8 DEFINE_IMAGER_CALLBACKS;
9
10 #define imss__x11_open imss_x11_open
11
12 MODULE = Imager::Screenshot  PACKAGE = Imager::Screenshot PREFIX = imss
13
14 PROTOTYPES: DISABLE
15
16 #ifdef SS_WIN32
17
18 Imager
19 imss_win32(hwnd, include_decor = 0, left = 0, top = 0, right = 0, bottom = 0)
20         unsigned hwnd
21         int include_decor
22         int left
23         int top
24         int right
25         int bottom
26
27 #endif
28
29 #ifdef SS_X11
30
31 Imager
32 imss_x11(display, window_id, left = 0, top = 0, right = 0, bottom = 0)
33         unsigned long display
34         int window_id
35         int left
36         int top
37         int right
38         int bottom
39
40 unsigned long
41 imss_x11_open(display_name = NULL)
42         const char *display_name
43
44 void
45 imss_x11_close(display)
46         unsigned long display
47
48 #endif
49
50 BOOT:
51         PERL_INITIALIZE_IMAGER_CALLBACKS;