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
13QT_BEGIN_NAMESPACE
14
15namespace QtWaylandClient {
16
17class QWaylandWindow;
18class QWaylandDisplay;
19class QWaylandIviController;
20
21class Q_WAYLANDCLIENT_EXPORT QWaylandIviShellIntegration
22 : public QWaylandShellIntegrationTemplate<QWaylandIviShellIntegration>,
23 public QtWayland::ivi_application
24{
25public:
26 QWaylandIviShellIntegration();
27
28 bool initialize(QWaylandDisplay *display) override;
29 QWaylandShellSurface *createShellSurface(QWaylandWindow *window) override;
30
31private:
32 uint32_t getNextUniqueSurfaceId();
33
34private:
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
44QT_END_NAMESPACE
45
46#endif // QWAYLANDIVIINTEGRATION_H
47

source code of qtwayland/src/plugins/shellintegration/ivi-shell/qwaylandivishellintegration.h