From f144f0f71f1b75df9216c36747513444c7941c09 Mon Sep 17 00:00:00 2001 From: Yusuke Binsaki Date: Wed, 10 Feb 2016 18:52:59 +0900 Subject: Implement initial IVI-shell support with shell integration. IVI-shell provides a shell interface for Weston, which maps the GENIVI API (http://www.genivi.org) for In-Vehicle Infotainment as Wayland-Ivi-Extension (http://wiki.projects.genivi.org/index.php/Wayland_IVI_Extension_Design). This patch is included in two protocol. The first is ivi-application protocol which provided by weston. Next is ivi-controller protocol which provided by Genivi's wayland-ivi-extension. In IVI use case, the client create and destroy surface with the unique ID by using ivi-application protocol. On the other hand, the controller such as HMI Controller control some properties, which are visibility, position, size, etc, with created the unique ID by using ivi-controller protocol. It means the unique ID is necessary to create and control the ivi-surface and the the ivi-layer. However Qt has no API to set the some surface or layer ID. In this ivi-shell plugin, the unique ID can be set via the environment parameter so that we can control the ivi-surface and ivi-layer. The name of environment parameter is QT_IVI_SURFACE_ID. QT_IVI_SURFACE_ID will be used as ivi-surface and ivi-layer. If application needs more than two surfaces, ivi-surface IDs will be incremented. When QT_IVI_SURFACE_ID isn't set, ivi-surface and ivi-layer ID will be generated internally. The ID consists of the process ID and the surface ID which is incremented in ivi-shell plugin. The process ID is used as lower 22 bit per 32bit. 23 to 32 bit is used as the surface IDs in a process. e.g. When the process ID is 0x765 and create two surfaces, ivi-layer ID is 0x765 and ivi-surface IDs are 0x765 and 0x00400765. +------------+---------------------------+ |31 23|22 0| +------------+---------------------------+ |0000 0000 00|00 0000 0000 0000 0000 0000| |<- ID ->|<- process ID ->| +------------+---------------------------+ We can set QT_WAYLAND_SHELL_INTEGRATION of the environment parameter to "ivi-shell" to use IVI-shell. Change-Id: Iddcfb3de89dc022530c0285524cf6bbf640147b6 Reviewed-by: Giulio Camuffo --- src/plugins/plugins.pro | 3 +- src/plugins/shellintegration/ivi-shell/README | 33 ++++ .../shellintegration/ivi-shell/ivi-shell.json | 3 + .../shellintegration/ivi-shell/ivi-shell.pro | 38 +++++ src/plugins/shellintegration/ivi-shell/main.cpp | 61 ++++++++ .../ivi-shell/qwaylandivishellintegration.cpp | 173 +++++++++++++++++++++ .../ivi-shell/qwaylandivishellintegration.h | 77 +++++++++ .../ivi-shell/qwaylandivisurface.cpp | 87 +++++++++++ .../ivi-shell/qwaylandivisurface_p.h | 71 +++++++++ src/plugins/shellintegration/shellintegration.pro | 3 + 10 files changed, 548 insertions(+), 1 deletion(-) create mode 100644 src/plugins/shellintegration/ivi-shell/README create mode 100644 src/plugins/shellintegration/ivi-shell/ivi-shell.json create mode 100644 src/plugins/shellintegration/ivi-shell/ivi-shell.pro create mode 100644 src/plugins/shellintegration/ivi-shell/main.cpp create mode 100644 src/plugins/shellintegration/ivi-shell/qwaylandivishellintegration.cpp create mode 100644 src/plugins/shellintegration/ivi-shell/qwaylandivishellintegration.h create mode 100644 src/plugins/shellintegration/ivi-shell/qwaylandivisurface.cpp create mode 100644 src/plugins/shellintegration/ivi-shell/qwaylandivisurface_p.h create mode 100644 src/plugins/shellintegration/shellintegration.pro (limited to 'src/plugins') diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro index a1a8a5b7d..9b66b851e 100644 --- a/src/plugins/plugins.pro +++ b/src/plugins/plugins.pro @@ -2,4 +2,5 @@ TEMPLATE=subdirs SUBDIRS += \ platforms \ hardwareintegration \ - decorations + decorations \ + shellintegration diff --git a/src/plugins/shellintegration/ivi-shell/README b/src/plugins/shellintegration/ivi-shell/README new file mode 100644 index 000000000..244458650 --- /dev/null +++ b/src/plugins/shellintegration/ivi-shell/README @@ -0,0 +1,33 @@ +IVI-shell +========= + +IVI-shell provides a shell interface for Weston, which maps the GENIVI +API (http://www.genivi.org) for In-Vehicle Infotainment as Wayland-Ivi-Extension +(http://wiki.projects.genivi.org/index.php/Wayland_IVI_Extension_Design). + +This module includes two protocols: ivi-application (provided by weston), and +ivi-controller (provided by GENIVI's wayland-ivi-extension). +In IVI use case, the client creates and destroys a surface using a +unique ID acquired from the ivi-application protocol. +On the other hand, a controller (such as the HMI Controller) manages a set of +properties (visibility, position, size, etc.), +created using unique IDs provided by the ivi-controller protocol. +A Unique ID is necessary to create and control both the ivi-surface and +the ivi-layer, however Qt has no API for setting these IDs. + +The ivi-shell plugin works around this limitation by setting the unique ID via +the environment variable QT_IVI_SURFACE_ID, used for both ivi-surface and +ivi-layer. If an application needs more than two surfaces, +ivi-surface IDs will be incremented automatically. If QT_IVI_SURFACE_ID is +not set, ivi-surface and ivi-layer IDs will be generated internally. +QT_IVI_SURFACE_ID is a 32 bit value composed of the process ID and the +surface ID. Bits 0 to 22 represent the process ID, and bits 23 to 32 represent +the surface ID in a process. +For example, when the process ID is 0x765 and there are two surfaces, +ivi-layer ID is 0x765 and ivi-surface IDs are 0x765 and 0x00400765. + +------------+---------------------------+ + |31 23|22 0| + +------------+---------------------------+ + |0000 0000 00|00 0000 0000 0000 0000 0000| + |<- ID ->|<- process ID ->| + +------------+---------------------------+ diff --git a/src/plugins/shellintegration/ivi-shell/ivi-shell.json b/src/plugins/shellintegration/ivi-shell/ivi-shell.json new file mode 100644 index 000000000..c48528e36 --- /dev/null +++ b/src/plugins/shellintegration/ivi-shell/ivi-shell.json @@ -0,0 +1,3 @@ +{ + "Keys":[ "ivi-shell" ] +} diff --git a/src/plugins/shellintegration/ivi-shell/ivi-shell.pro b/src/plugins/shellintegration/ivi-shell/ivi-shell.pro new file mode 100644 index 000000000..8fd774736 --- /dev/null +++ b/src/plugins/shellintegration/ivi-shell/ivi-shell.pro @@ -0,0 +1,38 @@ +PLUGIN_TYPE = wayland-shell-integration +load(qt_plugin) + +QT += waylandclient-private +CONFIG += wayland-scanner + +!contains(QT_CONFIG, no-pkg-config) { + PKGCONFIG += wayland-client wayland-cursor + CONFIG += link_pkgconfig +} else { + LIBS += -lwayland-client -lwayland-cursor +} + +config_xkbcommon { + !contains(QT_CONFIG, no-pkg-config) { + PKGCONFIG += xkbcommon + } else { + LIBS += -lxkbcommon + } +} else { + DEFINES += QT_NO_WAYLAND_XKB +} + +WAYLANDCLIENTSOURCES += \ + ../../../3rdparty/protocol/ivi-application.xml \ + ../../../3rdparty/protocol/ivi-controller.xml + +HEADERS += \ + qwaylandivishellintegration.h \ + qwaylandivisurface_p.h + +SOURCES += \ + main.cpp \ + qwaylandivishellintegration.cpp \ + qwaylandivisurface.cpp + +OTHER_FILES += \ + ivi-shell.json diff --git a/src/plugins/shellintegration/ivi-shell/main.cpp b/src/plugins/shellintegration/ivi-shell/main.cpp new file mode 100644 index 000000000..c7af9b157 --- /dev/null +++ b/src/plugins/shellintegration/ivi-shell/main.cpp @@ -0,0 +1,61 @@ +/**************************************************************************** +** +** Copyright (C) 2015 ITAGE Corporation, author: +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include "qwaylandivishellintegration.h" + +QT_BEGIN_NAMESPACE + +namespace QtWaylandClient { + +class QWaylandIviShellIntegrationPlugin : public QWaylandShellIntegrationPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID QWaylandShellIntegrationFactoryInterface_iid FILE "ivi-shell.json") + +public: + virtual QWaylandShellIntegration *create(const QString &key, const QStringList ¶mList) Q_DECL_OVERRIDE; +}; + +QWaylandShellIntegration *QWaylandIviShellIntegrationPlugin::create(const QString &key, const QStringList ¶mList) +{ + Q_UNUSED(key); + Q_UNUSED(paramList); + return new QWaylandIviShellIntegration(); +} + +} + +QT_END_NAMESPACE + +#include "main.moc" diff --git a/src/plugins/shellintegration/ivi-shell/qwaylandivishellintegration.cpp b/src/plugins/shellintegration/ivi-shell/qwaylandivishellintegration.cpp new file mode 100644 index 000000000..6876385b8 --- /dev/null +++ b/src/plugins/shellintegration/ivi-shell/qwaylandivishellintegration.cpp @@ -0,0 +1,173 @@ +/**************************************************************************** +** +** Copyright (C) 2015 ITAGE Corporation, author: +** Contact: http://www.qt-project.org/legal +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qwaylandivishellintegration.h" + +#include +#include + +#include +#include +#include + +#include "qwaylandivisurface_p.h" + +#include + +QT_BEGIN_NAMESPACE + +namespace QtWaylandClient { + +QWaylandIviShellIntegration::QWaylandIviShellIntegration() + : m_iviApplication(Q_NULLPTR) + , m_iviController(Q_NULLPTR) + , m_lastSurfaceId(0) + , m_surfaceNumber(0) + , m_useEnvSurfaceId(false) + , m_mutex(QMutex::Recursive) +{ +} + +QWaylandIviShellIntegration::~QWaylandIviShellIntegration() +{ + delete m_iviApplication; + delete m_iviController; +} + +bool QWaylandIviShellIntegration::initialize(QWaylandDisplay *display) +{ + display->addRegistryListener(registryIvi, this); + + return true; +} + +/* get unique id + * pattern1: + * When set QT_IVI_SURFACE_ID, We use it as ID. + * Next ID is increment. + * pattern2: + * When not set QT_IVI_SURFACE_ID, We use process ID and unused bit. + * process ID maximum is 2^22. Unused bit is 23 to 32 bit. + * Therefor, We use 23 to 32 bit. This do not overlap with other clients. + * Next ID is increment of 23 to 32 bit. + * +------------+---------------------------+ + * |31 23|22 0| + * +------------+---------------------------+ + * |0000 0000 00|00 0000 0000 0000 0000 0000| + * |<- ID ->|<- process ID ->| + * +------------+---------------------------+ + */ +uint32_t QWaylandIviShellIntegration::getNextUniqueSurfaceId() +{ + const uint32_t PID_MAX_EXPONENTIATION = 22; // 22 bit shift operation + const uint32_t ID_LIMIT = 2 ^ (32 - PID_MAX_EXPONENTIATION); // 10 bit is uniqeu id + QMutexLocker locker(&m_mutex); + + if (m_lastSurfaceId == 0) { + QByteArray env = qgetenv("QT_IVI_SURFACE_ID"); + bool ok; + m_lastSurfaceId = env.toUInt(&ok, 10); + if (ok) + m_useEnvSurfaceId = true; + else + m_lastSurfaceId = getpid(); + + return m_lastSurfaceId; + } + + if (m_useEnvSurfaceId) { + m_lastSurfaceId++; + } else { + m_surfaceNumber++; + if (m_surfaceNumber >= ID_LIMIT) { + qWarning("IVI surface id counter overflow\n"); + return 0; + } + m_lastSurfaceId += (m_surfaceNumber << PID_MAX_EXPONENTIATION); + } + + return m_lastSurfaceId; +} + +QWaylandShellSurface *QWaylandIviShellIntegration::createShellSurface(QWaylandWindow *window) +{ + if (!m_iviApplication) + return Q_NULLPTR; + + uint32_t surfaceId = getNextUniqueSurfaceId(); + if (surfaceId == 0) + return Q_NULLPTR; + + struct ivi_surface *surface = m_iviApplication->surface_create(surfaceId, window->object()); + if (!m_iviController) + return new QWaylandIviSurface(surface, window); + + struct ::ivi_controller_surface *controller = m_iviController->ivi_controller::surface_create(surfaceId); + QWaylandIviSurface *iviSurface = new QWaylandIviSurface(surface, window, controller); + + if (window->window()->type() == Qt::Popup) { + QPoint transientPos = window->geometry().topLeft(); // this is absolute + QWaylandWindow *parent = window->transientParent(); + if (parent && parent->decoration()) { + transientPos -= parent->geometry().topLeft(); + transientPos.setX(transientPos.x() + parent->decoration()->margins().left()); + transientPos.setY(transientPos.y() + parent->decoration()->margins().top()); + } + QSize size = window->window()->geometry().size(); + iviSurface->ivi_controller_surface::set_destination_rectangle(transientPos.x(), + transientPos.y(), + size.width(), + size.height()); + } + + return iviSurface; +} + +void QWaylandIviShellIntegration::registryIvi(void *data, + struct wl_registry *registry, + uint32_t id, + const QString &interface, + uint32_t version) +{ + QWaylandIviShellIntegration *shell = static_cast(data); + + if (interface == QStringLiteral("ivi_application")) + shell->m_iviApplication = new QtWayland::ivi_application(registry, id, version); + + if (interface == QStringLiteral("ivi_controller")) + shell->m_iviController = new QtWayland::ivi_controller(registry, id, version); +} + +} + +QT_END_NAMESPACE diff --git a/src/plugins/shellintegration/ivi-shell/qwaylandivishellintegration.h b/src/plugins/shellintegration/ivi-shell/qwaylandivishellintegration.h new file mode 100644 index 000000000..ef1c7609a --- /dev/null +++ b/src/plugins/shellintegration/ivi-shell/qwaylandivishellintegration.h @@ -0,0 +1,77 @@ +/**************************************************************************** +** +** Copyright (C) 2015 ITAGE Corporation, author: +** Contact: http://www.qt-project.org/legal +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QWAYLANDIVIINTEGRATION_H +#define QWAYLANDIVIINTEGRATION_H + +#include + +#include +#include "qwayland-ivi-application.h" +#include "qwayland-ivi-controller.h" + +QT_BEGIN_NAMESPACE + +namespace QtWaylandClient { + +class QWaylandWindow; +class QWaylandDisplay; +class QWaylandIviControllerSurface; + +class Q_WAYLAND_CLIENT_EXPORT QWaylandIviShellIntegration : public QWaylandShellIntegration +{ +public: + QWaylandIviShellIntegration(); + ~QWaylandIviShellIntegration(); + bool initialize(QWaylandDisplay *display); + virtual QWaylandShellSurface *createShellSurface(QWaylandWindow *window) Q_DECL_OVERRIDE; + +private: + static void registryIvi(void *data, struct wl_registry *registry, + uint32_t id, const QString &interface, uint32_t version); + uint32_t getNextUniqueSurfaceId(); + +private: + QtWayland::ivi_application *m_iviApplication; + QtWayland::ivi_controller *m_iviController; + uint32_t m_lastSurfaceId; + uint32_t m_surfaceNumber; + bool m_useEnvSurfaceId; + QMutex m_mutex; +}; + +} + +QT_END_NAMESPACE + +#endif // QWAYLANDIVIINTEGRATION_H diff --git a/src/plugins/shellintegration/ivi-shell/qwaylandivisurface.cpp b/src/plugins/shellintegration/ivi-shell/qwaylandivisurface.cpp new file mode 100644 index 000000000..f8871fa26 --- /dev/null +++ b/src/plugins/shellintegration/ivi-shell/qwaylandivisurface.cpp @@ -0,0 +1,87 @@ +/**************************************************************************** +** +** Copyright (C) 2015 ITAGE Corporation, author: +** Contact: http://www.qt-project.org/legal +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qwaylandivisurface_p.h" + +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +namespace QtWaylandClient { + +QWaylandIviSurface::QWaylandIviSurface(struct ::ivi_surface *ivi_surface, QWaylandWindow *window) + : QtWayland::ivi_surface(ivi_surface) + , QWaylandShellSurface(window) + , m_window(window) + , m_extendedWindow(Q_NULLPTR) +{ + createExtendedSurface(window); +} + +QWaylandIviSurface::QWaylandIviSurface(struct ::ivi_surface *ivi_surface, QWaylandWindow *window, + struct ::ivi_controller_surface *iviControllerSurface) + : QtWayland::ivi_surface(ivi_surface) + , QWaylandShellSurface(window) + , QtWayland::ivi_controller_surface(iviControllerSurface) + , m_window(window) + , m_extendedWindow(Q_NULLPTR) +{ + createExtendedSurface(window); +} + +QWaylandIviSurface::~QWaylandIviSurface() +{ + ivi_surface::destroy(); + if (QtWayland::ivi_controller_surface::object()) + QtWayland::ivi_controller_surface::destroy(0); + + delete m_extendedWindow; +} + +void QWaylandIviSurface::createExtendedSurface(QWaylandWindow *window) +{ + if (window->display()->windowExtension()) + m_extendedWindow = new QWaylandExtendedSurface(window); +} + +void QWaylandIviSurface::ivi_surface_configure(int32_t width, int32_t height) +{ + this->m_window->configure(0, width, height); +} + +} + +QT_END_NAMESPACE diff --git a/src/plugins/shellintegration/ivi-shell/qwaylandivisurface_p.h b/src/plugins/shellintegration/ivi-shell/qwaylandivisurface_p.h new file mode 100644 index 000000000..96978e28b --- /dev/null +++ b/src/plugins/shellintegration/ivi-shell/qwaylandivisurface_p.h @@ -0,0 +1,71 @@ +/**************************************************************************** +** +** Copyright (C) 2015 ITAGE Corporation, author: +** Contact: http://www.qt-project.org/legal +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QWAYLANDIVISURFACE_H +#define QWAYLANDIVISURFACE_H + +#include +#include "qwayland-ivi-application.h" +#include "qwayland-ivi-controller.h" + +QT_BEGIN_NAMESPACE + +namespace QtWaylandClient { + +class QWaylandWindow; +class QWaylandInputDevice; +class QWindow; +class QWaylandExtendedSurface; + +class Q_WAYLAND_CLIENT_EXPORT QWaylandIviSurface : public QtWayland::ivi_surface + , public QWaylandShellSurface, public QtWayland::ivi_controller_surface +{ +public: + QWaylandIviSurface(struct ::ivi_surface *shell_surface, QWaylandWindow *window); + QWaylandIviSurface(struct ::ivi_surface *shell_surface, QWaylandWindow *window, + struct ::ivi_controller_surface *iviControllerSurface); + virtual ~QWaylandIviSurface(); + +private: + void createExtendedSurface(QWaylandWindow *window); + virtual void ivi_surface_configure(int32_t width, int32_t height) Q_DECL_OVERRIDE; + + QWaylandWindow *m_window; + QWaylandExtendedSurface *m_extendedWindow; +}; + +} + +QT_END_NAMESPACE + +#endif // QWAYLANDIVISURFACE_H diff --git a/src/plugins/shellintegration/shellintegration.pro b/src/plugins/shellintegration/shellintegration.pro new file mode 100644 index 000000000..9867d2b40 --- /dev/null +++ b/src/plugins/shellintegration/shellintegration.pro @@ -0,0 +1,3 @@ +TEMPLATE = subdirs + +SUBDIRS += ivi-shell -- cgit v1.2.3