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