Rabbit Remote Control 0.0.30
Loading...
Searching...
No Matches
DesktopXLib.cpp
1#include "DesktopXLib.h"
2#include "ScreenXLib.h"
3#include "Display.h"
4
5CDesktopXLib::CDesktopXLib(QObject *parent) : CDesktop(parent)
6{
7}
8
9CDesktop* CDesktop::Instance()
10{
11 static CDesktop* p = nullptr;
12 if(!p) p = new CDesktopXLib();
13 return p;
14}
15
16int CDesktopXLib::Width()
17{
18 return CDisplay::Instance()->Width();
19}
20
21int CDesktopXLib::Height()
22{
23 return CDisplay::Instance()->Height();
24}
25
26QImage CDesktopXLib::GetDesktop()
27{
28 return CDisplay::Instance()->GetDisplay();
29}
30
31QImage CDesktopXLib::GetDesktop(int x, int y, int width, int height)
32{
33 return CDisplay::Instance()->GetDisplay(x, y, width, height);
34}
35
36QImage CDesktopXLib::GetCursor(QPoint &pos, QPoint &posHot)
37{
38 return CDisplay::Instance()->GetCursor(pos, posHot);
39}
40
41QPoint CDesktopXLib::GetCursorPosition()
42{
43 return CDisplay::Instance()->GetCursorPosition();
44}
45
46bool CDesktopXLib::GetHasCursor() const
47{
48 return CDisplay::Instance()->GetHasCursor();
49}
50
51void CDesktopXLib::SetHasCursor(bool hasCursor)
52{
53 return CDisplay::Instance()->SetHasCursor(hasCursor);
54}