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 QVNCINTEGRATION_H
5#define QVNCINTEGRATION_H
6
7#include <qpa/qplatformintegration.h>
8#include <qpa/qplatformnativeinterface.h>
9
10QT_BEGIN_NAMESPACE
11
12class QAbstractEventDispatcher;
13class QVncScreen;
14class QVncServer;
15
16class QVncIntegration : public QPlatformIntegration, public QPlatformNativeInterface
17{
18public:
19 QVncIntegration(const QStringList &paramList);
20 ~QVncIntegration();
21
22 void initialize() override;
23 bool hasCapability(QPlatformIntegration::Capability cap) const override;
24
25 QPlatformWindow *createPlatformWindow(QWindow *window) const override;
26 QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const override;
27
28 QAbstractEventDispatcher *createEventDispatcher() const override;
29
30 QPlatformFontDatabase *fontDatabase() const override;
31 QPlatformServices *services() const override;
32 QPlatformInputContext *inputContext() const override { return m_inputContext; }
33
34 QPlatformNativeInterface *nativeInterface() const override;
35
36 QList<QPlatformScreen *> screens() const;
37
38private:
39 mutable QVncServer *m_server;
40 QVncScreen *m_primaryScreen;
41 QPlatformInputContext *m_inputContext;
42 QScopedPointer<QPlatformFontDatabase> m_fontDb;
43 QScopedPointer<QPlatformServices> m_services;
44 QScopedPointer<QPlatformNativeInterface> m_nativeInterface;
45};
46
47QT_END_NAMESPACE
48
49#endif // QVNCINTEGRATION_H
50

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