diff options
author | Jørgen Lind <jorgen.lind@theqtcompany.com> | 2015-08-14 15:18:20 +0200 |
---|---|---|
committer | Jørgen Lind <jorgen.lind@theqtcompany.com> | 2015-08-28 13:10:33 +0200 |
commit | eae177e743d1f538e530b969363c236ae1326ed8 (patch) | |
tree | da380d4555148b5a98e3fedacc157326cc491422 /src/compositor/compositor_api/qwaylandpointer_p.h | |
parent | 463b9137b1b78def03fca6fc987df9bf249cb2f6 (diff) |
Move QWaylandPointerPrivate into a _p file and remove the api
and make sure all other classes uses the public QWaylandPointer type
Change-Id: Ie7ff24160c253ff700eb27eb46788fe021386dd7
Diffstat (limited to 'src/compositor/compositor_api/qwaylandpointer_p.h')
-rw-r--r-- | src/compositor/compositor_api/qwaylandpointer_p.h | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/src/compositor/compositor_api/qwaylandpointer_p.h b/src/compositor/compositor_api/qwaylandpointer_p.h new file mode 100644 index 000000000..769b0f917 --- /dev/null +++ b/src/compositor/compositor_api/qwaylandpointer_p.h @@ -0,0 +1,100 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Copyright (C) 2013 Klarälvdalens Datakonsult AB (KDAB). +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the QtWaylandCompositor module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** 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 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QWAYLANDPOINTER_P_H +#define QWAYLANDPOINTER_P_H + +#include <QtCompositor/qwaylandexport.h> +#include <QtCompositor/QWaylandDestroyListener> +#include <QtCompositor/QWaylandPointer> + +#include <QtCore/QList> +#include <QtCore/QPoint> +#include <QtCore/QObject> +#include <QtCore/private/qobject_p.h> + +#include <QtCompositor/private/qwayland-server-wayland.h> +#include <QtCompositor/QWaylandView> +#include <QtCompositor/QWaylandSurface> +#include <QtCompositor/QWaylandInputDevice> + +#include <stdint.h> + +QT_BEGIN_NAMESPACE + +class QWaylandView; + +class Q_COMPOSITOR_EXPORT QWaylandPointerPrivate : public QObjectPrivate + , public QtWaylandServer::wl_pointer +{ + Q_DECLARE_PUBLIC(QWaylandPointer) +public: + QWaylandPointerPrivate(QWaylandPointer *pointer, QWaylandInputDevice *seat); + + QWaylandCompositor *compositor() const { return seat->compositor(); } + +protected: + void pointer_set_cursor(Resource *resource, uint32_t serial, wl_resource *surface, int32_t hotspot_x, int32_t hotspot_y) Q_DECL_OVERRIDE; + void pointer_release(Resource *resource) Q_DECL_OVERRIDE; + void pointer_destroy_resource(Resource *resource) Q_DECL_OVERRIDE; + +private: + void focusDestroyed(void *data); + + QWaylandInputDevice *seat; + QWaylandOutput *output; + QWaylandDefaultPointerGrabber defaultGrab; + + QPointF localPosition; + QPointF spacePosition; + + QWaylandPointerGrabber *grab; + Qt::MouseButton grabButton; + uint32_t grabTime; + uint32_t grabSerial; + + struct ::wl_resource *focusResource; + bool hasSentEnter; + + int buttonCount; + + QWaylandDestroyListener focusDestroyListener; +}; + +QT_END_NAMESPACE + +#endif // QWAYLANDPOINTER_P_H |