Rabbit Remote Control 0.1.0-bate14
Loading...
Searching...
No Matches
CursorFreeRDP.h
1// Author: Kang Lin <kl222@126.com>
2
3#pragma once
4
5#include <QImage>
6#include <QRect>
7#include <QObject>
8#include "freerdp/version.h"
9#include "freerdp/freerdp.h"
10
11class CBackendFreeRDP;
12class CCursorFreeRDP : public QObject
13{
14 Q_OBJECT
15public:
16 explicit CCursorFreeRDP(CBackendFreeRDP *parent = nullptr);
17
18 int RegisterPointer(rdpGraphics* graphics);
19 struct _Pointer{
20 rdpPointer pointer;
21 CCursorFreeRDP* pThis;
22 };
23
24 static BOOL CbPointerNew(rdpContext* context, rdpPointer* pointer);
25 static void CbPointerFree(rdpContext* context, rdpPointer* pointer);
26 static BOOL CbPointerSet(rdpContext* context,
27 #if FREERDP_VERSION_MAJOR >= 3
28 rdpPointer* pointer
29 #else
30 const rdpPointer* pointer
31 #endif
32 );
33 static BOOL CbPointerSetNull(rdpContext* context);
34 static BOOL CbPointerSetDefault(rdpContext* context);
35 static BOOL CbPointerSetPosition(rdpContext* context, UINT32 x, UINT32 y);
36
37 BOOL OnNew(rdpContext* context, rdpPointer* pointer);
38 void OnFree(rdpContext* context, rdpPointer* pointer);
39 BOOL OnSet(rdpContext* context, const rdpPointer* pointer);
40 BOOL OnSetNull(rdpContext* context);
41 BOOL OnSetDefault(rdpContext* context);
42 BOOL OnSetPosition(rdpContext* context, UINT32 x, UINT32 y);
43
44private:
45 CBackendFreeRDP* m_pConnect;
46
47 QImage m_Cursor;
48};
BOOL OnNew(rdpContext *context, rdpPointer *pointer)
BOOL OnSet(rdpContext *context, const rdpPointer *pointer)