Rabbit Remote Control 0.0.30
Loading...
Searching...
No Matches
Display.h
1// Author: Kang Lin <kl222@126.com>
2
3#ifndef CDISPLAY_H
4#define CDISPLAY_H
5
6#pragma once
7
8#include "service_export.h"
9
10#include <QImage>
11
12class SERVICE_EXPORT CDisplay
13{
14public:
15 explicit CDisplay(){m_bHasCursor = true;};
16 virtual ~CDisplay(){};
17
18 static CDisplay* Instance();
19
20 virtual int Width() = 0;
21 virtual int Height() = 0;
22 virtual int GetScreenCount() = 0;
23 virtual QImage::Format GetFormat() = 0;
24
25 virtual QImage GetDisplay() = 0;
26 virtual QImage GetDisplay(int x, int y, int width, int height) = 0;
27 virtual QImage GetCursor(QPoint &pos, QPoint &posHot) = 0;
28 virtual QPoint GetCursorPosition() = 0;
29 bool GetHasCursor() const
30 {
31 return m_bHasCursor;
32 }
33 void SetHasCursor(bool newHasCursor)
34 {
35 m_bHasCursor = newHasCursor;
36 }
37
38protected:
39 virtual int Open() = 0;
40 virtual int Close() = 0;
41
42private:
43 bool m_bHasCursor;
44};
45
46#endif // CDISPLAY_H