summaryrefslogtreecommitdiffstats
path: root/src/compositor/extensions/qwaylandshell.h
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@theqtcompany.com>2015-09-14 16:24:30 +0200
committerPaul Olav Tvete <paul.tvete@theqtcompany.com>2015-09-16 10:35:14 +0000
commitdae5d55dea859bb3a5722bf665d077f1f9b3d360 (patch)
treed08e0906b015add456105a1bc261fdcfba2f8701 /src/compositor/extensions/qwaylandshell.h
parente9aa3a9edf63ff0f47f38e73ef20403f7bec1a0d (diff)
Implement resize/move for pure-qml
Change-Id: I7919f7715486fa2d8cfe35c08095f6c33757a515 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
Diffstat (limited to 'src/compositor/extensions/qwaylandshell.h')
-rw-r--r--src/compositor/extensions/qwaylandshell.h28
1 files changed, 18 insertions, 10 deletions
diff --git a/src/compositor/extensions/qwaylandshell.h b/src/compositor/extensions/qwaylandshell.h
index 07a504855..ac014cf84 100644
--- a/src/compositor/extensions/qwaylandshell.h
+++ b/src/compositor/extensions/qwaylandshell.h
@@ -39,6 +39,8 @@
#include <QtWaylandCompositor/QWaylandExtension>
+#include <QtCore/QSize>
+
QT_BEGIN_NAMESPACE
class QWaylandShellPrivate;
@@ -69,6 +71,7 @@ class Q_COMPOSITOR_EXPORT QWaylandShellSurface : public QWaylandExtensionTemplat
{
Q_OBJECT
Q_DECLARE_PRIVATE(QWaylandShellSurface)
+ Q_PROPERTY(QWaylandSurface *surface READ surface NOTIFY surfaceChanged)
Q_PROPERTY(QString title READ title NOTIFY titleChanged)
Q_PROPERTY(QString className READ className NOTIFY classNameChanged)
Q_PROPERTY(FocusPolicy focusPolicy READ focusPolicy NOTIFY focusPolicyChanged)
@@ -83,15 +86,15 @@ public:
Q_ENUM(FullScreenMethod);
enum ResizeEdge {
- DefaultEdge = 0x00,
- TopEdge = 0x01,
- BottomEdge = 0x02,
- LeftEdge = 0x04,
- TopLeftEdge = 0x05,
- BottomLeftEdge = 0x06,
- RightEdge = 0x08,
- TopRightEdge = 0x09,
- BottomRightEdge = 0x10
+ DefaultEdge = 0,
+ TopEdge = 1,
+ BottomEdge = 2,
+ LeftEdge = 4,
+ TopLeftEdge = 5,
+ BottomLeftEdge = 6,
+ RightEdge = 8,
+ TopRightEdge = 9,
+ BottomRightEdge = 10
};
Q_ENUM(ResizeEdge);
@@ -115,13 +118,18 @@ public:
static const struct wl_interface *interface();
static QByteArray interfaceName();
+
+ Q_INVOKABLE QSize sizeForResize(const QSizeF &size, const QPointF &delta, ResizeEdge edges);
+ Q_INVOKABLE void sendConfigure(const QSize &size, ResizeEdge edges);
+ Q_INVOKABLE void sendPopupDone();
Q_SIGNALS:
+ void surfaceChanged();
void titleChanged();
void classNameChanged();
void focusPolicyChanged();
void pong();
void startMove(QWaylandInputDevice *inputDevice);
- void startResize(QWaylandInputDevice *inputDevice, ResizeEdge edge);
+ void startResize(QWaylandInputDevice *inputDevice, ResizeEdge edges);
void setDefaultToplevel();
void setTransient(QWaylandSurface *parentSurface, const QPoint &relativeToParent, FocusPolicy focusPolicy);