-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathscreen_shooter.h
49 lines (38 loc) · 1.07 KB
/
screen_shooter.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
45
46
47
48
49
/*
* screen_shooter.h
* Max Lahey, 3/20/13
*/
#ifndef _SCREEN_SHOOTER_H_
#define _SCREEN_SHOOTER_H_
#include "screen_shot.h"
struct SimplePoint {
int x;
int y;
};
BOOL CALLBACK monitor_count_enum_proc(HMONITOR hMonitor, HDC hdcMonitor, LPRECT lprcMonitor, LPARAM dwData);
BOOL CALLBACK monitor_info_enum_proc(HMONITOR hMonitor, HDC hdcMonitor, LPRECT lprcMonitor, LPARAM dwData);
/**
* A ScreenShooter provides a facility to take one of more screenshots where a screenshot
* includes a large image of ALL active displays on a computer.
*
*/
class ScreenShooter {
public:
ScreenShooter();
~ScreenShooter();
// Allocate and take a new screenshot of all active screens. The caller
// is responsible for its deletion.
void take_single_screenshot();
Screenshot* take_screenshot();
public:
static RECT* _display_rects;
private:
void calculate_bounds();
void init_displays();
int monitor_count();
private:
int _dsp_count;
SimplePoint _top_left;
SimplePoint _bottom_right;
};
#endif // _SCREEN_SHOOTER_H_