-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathutil.h
48 lines (43 loc) · 961 Bytes
/
util.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
#ifndef UTIL_H
#define UTIL_H
#define _WIN32_WINNT 0x0404
#include <QList>
#include <QByteArray>
#include <windows.h>
#include <QPixmap>
#include <QMutex>
#include <QImage>
#include <QMouseEvent>
#include <QKeyEvent>
#include <QWheelEvent>
class QWidget;
namespace DG{
class Rect;
class Resolution;
}
namespace DG{
/**
* Does the System dependent Jobs
*/
class Util{
private:
static WId winId;
static QWidget* _desktopWidget;
public:
static void _init();
private:
static DISPLAY_DEVICE GetPrimaryDevice();
static QMutex mutex;
public:
static Resolution* currentResolution();
static QList<Resolution*> SupportedResolutions();
static bool setResolution(Resolution* res);
static QPixmap grabScreen(const DG::Rect* rect);
static bool compare(const QImage& l, const QImage& r);
public:
static void fireEvent(QMouseEvent* ev);
static void fireEvent(QWheelEvent* ev);
static void fireEvent(QKeyEvent* ev);
};
}
#endif // UTIL_H