1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QVncScreen_H
5#define QVncScreen_H
6
7#include <QtFbSupport/private/qfbscreen_p.h>
8
9QT_BEGIN_NAMESPACE
10
11class QPainter;
12class QFbCursor;
13class QTcpSocket;
14class QVncServer;
15class QVncDirtyMap;
16class QVncClientCursor;
17class QVncClient;
18
19class QVncScreen : public QFbScreen
20{
21 Q_OBJECT
22public:
23 QVncScreen(const QStringList &args);
24 ~QVncScreen();
25
26 bool initialize() override;
27
28 QPixmap grabWindow(WId wid, int x, int y, int width, int height) const override;
29
30 QRegion doRedraw() override;
31 QImage *image() { return &mScreenImage; }
32
33 void enableClientCursor(QVncClient *client);
34 void disableClientCursor(QVncClient *client);
35 QPlatformCursor *cursor() const override;
36
37 Flags flags() const override;
38
39 void clearDirty() { dirtyRegion = QRegion(); }
40
41#if Q_BYTE_ORDER == Q_BIG_ENDIAN
42 bool swapBytes() const;
43#endif
44
45 QStringList mArgs;
46
47 qreal dpiX = 96;
48 qreal dpiY = 96;
49 QVncDirtyMap *dirty = nullptr;
50 QRegion dirtyRegion;
51 int refreshRate = 30;
52 QVncServer *vncServer = nullptr;
53#if QT_CONFIG(cursor)
54 QVncClientCursor *clientCursor = nullptr;
55#endif
56};
57
58QT_END_NAMESPACE
59
60#endif // QVncScreen_H
61
62

source code of qtbase/src/plugins/platforms/vnc/qvncscreen.h