| 1 | // Copyright (C) 2017 ITAGE Corporation, author: <yusuke.binsaki@itage.co.jp> |
|---|---|
| 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 QWAYLANDIVIINTEGRATION_H |
| 5 | #define QWAYLANDIVIINTEGRATION_H |
| 6 | |
| 7 | #include <QtCore/qmutex.h> |
| 8 | |
| 9 | #include <QtWaylandClient/private/qwaylandshellintegration_p.h> |
| 10 | #include "qwayland-ivi-application.h" |
| 11 | #include "qwayland-ivi-controller.h" |
| 12 | |
| 13 | QT_BEGIN_NAMESPACE |
| 14 | |
| 15 | namespace QtWaylandClient { |
| 16 | |
| 17 | class QWaylandWindow; |
| 18 | class QWaylandDisplay; |
| 19 | class QWaylandIviController; |
| 20 | |
| 21 | class Q_WAYLANDCLIENT_EXPORT QWaylandIviShellIntegration |
| 22 | : public QWaylandShellIntegrationTemplate<QWaylandIviShellIntegration>, |
| 23 | public QtWayland::ivi_application |
| 24 | { |
| 25 | public: |
| 26 | QWaylandIviShellIntegration(); |
| 27 | |
| 28 | bool initialize(QWaylandDisplay *display) override; |
| 29 | QWaylandShellSurface *createShellSurface(QWaylandWindow *window) override; |
| 30 | |
| 31 | private: |
| 32 | uint32_t getNextUniqueSurfaceId(); |
| 33 | |
| 34 | private: |
| 35 | QScopedPointer<QWaylandIviController> m_iviController; |
| 36 | uint32_t m_lastSurfaceId = 0; |
| 37 | uint32_t m_surfaceNumber = 0; |
| 38 | bool m_useEnvSurfaceId = false; |
| 39 | QRecursiveMutex m_mutex; |
| 40 | }; |
| 41 | |
| 42 | } |
| 43 | |
| 44 | QT_END_NAMESPACE |
| 45 | |
| 46 | #endif // QWAYLANDIVIINTEGRATION_H |
| 47 |
