summaryrefslogtreecommitdiffstats
path: root/src/compositor/compositor_api/qwaylandsurface.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/compositor/compositor_api/qwaylandsurface.h')
-rw-r--r--src/compositor/compositor_api/qwaylandsurface.h77
1 files changed, 29 insertions, 48 deletions
diff --git a/src/compositor/compositor_api/qwaylandsurface.h b/src/compositor/compositor_api/qwaylandsurface.h
index a138b2af5..0494a091e 100644
--- a/src/compositor/compositor_api/qwaylandsurface.h
+++ b/src/compositor/compositor_api/qwaylandsurface.h
@@ -1,49 +1,15 @@
-/****************************************************************************
-**
-** Copyright (C) 2017-2015 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtWaylandCompositor module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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.LGPL3 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-3.0.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 (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017-2015 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef QWAYLANDSURFACE_H
#define QWAYLANDSURFACE_H
#include <QtWaylandCompositor/qtwaylandcompositorglobal.h>
+#include <QtWaylandCompositor/qwaylandcompositor.h>
#include <QtWaylandCompositor/qwaylandcompositorextension.h>
#include <QtWaylandCompositor/qwaylandclient.h>
+#include <QtWaylandCompositor/qwaylanddrag.h>
#include <QtCore/QScopedPointer>
#include <QtGui/QImage>
@@ -56,14 +22,10 @@ struct wl_resource;
QT_BEGIN_NAMESPACE
class QTouchEvent;
-class QWaylandClient;
class QWaylandSurfacePrivate;
-class QWaylandCompositor;
class QWaylandBufferRef;
class QWaylandView;
-class QWaylandSurfaceOp;
class QWaylandInputMethodControl;
-class QWaylandDrag;
class QWaylandSurfaceRole
{
@@ -76,18 +38,27 @@ private:
QByteArray m_name;
};
-class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandSurface : public QWaylandObject
+class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandSurface : public QWaylandObject
{
Q_OBJECT
Q_DECLARE_PRIVATE(QWaylandSurface)
Q_PROPERTY(QWaylandClient *client READ client CONSTANT)
- Q_PROPERTY(QSize size READ size NOTIFY sizeChanged)
+ Q_PROPERTY(QRectF sourceGeometry READ sourceGeometry NOTIFY sourceGeometryChanged REVISION(1, 13))
+ Q_PROPERTY(QSize destinationSize READ destinationSize NOTIFY destinationSizeChanged REVISION(1, 13))
+ Q_PROPERTY(QSize bufferSize READ bufferSize NOTIFY bufferSizeChanged REVISION(1, 13))
Q_PROPERTY(int bufferScale READ bufferScale NOTIFY bufferScaleChanged)
Q_PROPERTY(Qt::ScreenOrientation contentOrientation READ contentOrientation NOTIFY contentOrientationChanged)
Q_PROPERTY(QWaylandSurface::Origin origin READ origin NOTIFY originChanged)
Q_PROPERTY(bool hasContent READ hasContent NOTIFY hasContentChanged)
Q_PROPERTY(bool cursorSurface READ isCursorSurface WRITE markAsCursorSurface NOTIFY cursorSurfaceChanged)
-
+ Q_PROPERTY(bool inhibitsIdle READ inhibitsIdle NOTIFY inhibitsIdleChanged REVISION(1, 14))
+ Q_PROPERTY(bool isOpaque READ isOpaque NOTIFY isOpaqueChanged REVISION(6, 4))
+ Q_MOC_INCLUDE("qwaylanddrag.h")
+ Q_MOC_INCLUDE("qwaylandcompositor.h")
+
+ QML_NAMED_ELEMENT(WaylandSurfaceBase)
+ QML_ADDED_IN_VERSION(1, 0)
+ QML_UNCREATABLE("Cannot create instance of WaylandSurfaceBase, use WaylandSurface instead")
public:
enum Origin {
OriginTopLeft,
@@ -110,7 +81,9 @@ public:
bool hasContent() const;
- QSize size() const;
+ QRectF sourceGeometry() const;
+ QSize destinationSize() const;
+ QSize bufferSize() const;
int bufferScale() const;
Qt::ScreenOrientation contentOrientation() const;
@@ -120,6 +93,7 @@ public:
QWaylandCompositor *compositor() const;
bool inputRegionContains(const QPoint &p) const;
+ bool inputRegionContains(const QPointF &position) const;
Q_INVOKABLE void destroy();
Q_INVOKABLE bool isDestroyed() const;
@@ -138,6 +112,9 @@ public:
void markAsCursorSurface(bool cursorSurface);
bool isCursorSurface() const;
+ bool inhibitsIdle() const;
+ bool isOpaque() const;
+
#if QT_CONFIG(im)
QWaylandInputMethodControl *inputMethodControl() const;
#endif
@@ -155,7 +132,9 @@ Q_SIGNALS:
void damaged(const QRegion &rect);
void parentChanged(QWaylandSurface *newParent, QWaylandSurface *oldParent);
void childAdded(QWaylandSurface *child);
- void sizeChanged();
+ Q_REVISION(1, 13) void sourceGeometryChanged();
+ Q_REVISION(1, 13) void destinationSizeChanged();
+ Q_REVISION(1, 13) void bufferSizeChanged();
void bufferScaleChanged();
void offsetForNextFrame(const QPoint &offset);
void contentOrientationChanged();
@@ -166,6 +145,8 @@ Q_SIGNALS:
void subsurfacePlaceBelow(QWaylandSurface *sibling);
void dragStarted(QWaylandDrag *drag);
void cursorSurfaceChanged();
+ Q_REVISION(14) void inhibitsIdleChanged();
+ Q_REVISION(6, 4) void isOpaqueChanged();
void configure(bool hasBuffer);
void redraw();