Merge lp:~unity-team/unity-api/miral-version-bump into lp:unity-api

Proposed by Gerry Boland
Status: Work in progress
Proposed branch: lp:~unity-team/unity-api/miral-version-bump
Merge into: lp:unity-api
Diff against target: 217 lines (+41/-74)
5 files modified
debian/changelog (+6/-0)
include/unity/shell/application/Mir.h (+10/-1)
include/unity/shell/application/MirFocusControllerInterface.h (+0/-69)
include/unity/shell/application/MirSurfaceInterface.h (+24/-2)
include/unity/shell/application/MirSurfaceItemInterface.h (+1/-2)
To merge this branch: bzr merge lp:~unity-team/unity-api/miral-version-bump
Reviewer Review Type Date Requested Status
Unity Team Pending
Review via email: mp+308518@code.launchpad.net

Commit message

Add apis for QtMir 0.2 (based on MirAL), bump to 8.0

To post a comment you must log in.
256. By Gerry Boland

Bad version chosen, take better one 8.0

Unmerged revisions

256. By Gerry Boland

Bad version chosen, take better one 8.0

255. By Gerry Boland

Bump debian package version

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2016-09-09 14:39:28 +0000
3+++ debian/changelog 2016-10-14 14:33:43 +0000
4@@ -1,3 +1,9 @@
5+unity-api (8.0+16.10.20160909-0ubuntu1) UNRELEASED; urgency=medium
6+
7+ * Add APIs for QtMir 0.2 (using MirAL)
8+
9+ -- Gerry Boland <gerry.boland@canonical.com> Fri, 14 Oct 2016 15:25:38 +0100
10+
11 unity-api (7.119+16.10.20160909-0ubuntu1) yakkety; urgency=medium
12
13 [ Daniel d'Andrada ]
14
15=== modified file 'include/unity/shell/application/Mir.h'
16--- include/unity/shell/application/Mir.h 2016-02-17 12:56:18 +0000
17+++ include/unity/shell/application/Mir.h 2016-10-14 14:33:43 +0000
18@@ -63,9 +63,15 @@
19 RestoredState,
20 MinimizedState,
21 MaximizedState,
22- VertMaximizedState,
23 FullscreenState,
24+ MaximizedLeftState,
25+ MaximizedRightState,
26 HorizMaximizedState,
27+ VertMaximizedState,
28+ MaximizedTopLeftState,
29+ MaximizedTopRightState,
30+ MaximizedBottomLeftState,
31+ MaximizedBottomRightState,
32 HiddenState,
33 };
34
35@@ -110,7 +116,10 @@
36 /// @endcond
37 };
38
39+Q_DECLARE_METATYPE(Mir::Type)
40+Q_DECLARE_METATYPE(Mir::State)
41 Q_DECLARE_METATYPE(Mir::OrientationAngle)
42 Q_DECLARE_METATYPE(Mir::ShellChrome)
43+Q_DECLARE_METATYPE(Mir::FormFactor)
44
45 #endif // UNITY_SHELL_APPLICATION_MIR_H
46
47=== removed file 'include/unity/shell/application/MirFocusControllerInterface.h'
48--- include/unity/shell/application/MirFocusControllerInterface.h 2016-04-13 16:47:27 +0000
49+++ include/unity/shell/application/MirFocusControllerInterface.h 1970-01-01 00:00:00 +0000
50@@ -1,69 +0,0 @@
51-/*
52- * Copyright (C) 2016 Canonical, Ltd.
53- *
54- * This program is free software; you can redistribute it and/or modify
55- * it under the terms of the GNU General Public License as published by
56- * the Free Software Foundation; version 3.
57- *
58- * This program is distributed in the hope that it will be useful,
59- * but WITHOUT ANY WARRANTY; without even the implied warranty of
60- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
61- * GNU General Public License for more details.
62- *
63- * You should have received a copy of the GNU General Public License
64- * along with this program. If not, see <http://www.gnu.org/licenses/>.
65- */
66-
67-#ifndef UNITY_SHELL_APPLICATION_MIRFOCUSCONTROLLERINTERFACE_H
68-#define UNITY_SHELL_APPLICATION_MIRFOCUSCONTROLLERINTERFACE_H
69-
70-#include <QObject>
71-
72-namespace unity {
73-namespace shell {
74-namespace application {
75-
76-class MirSurfaceInterface;
77-
78-/**
79- * @brief Defines which MirSurface has focus
80- *
81- * Even though QQuickWindow::activeFocusItem is who ultimately defines the focused MirSurface
82- * in the QML scene, the two might not necessarily match all the time. And also this is a cleaner
83- * way of keeping tabs on the focused MirSurface as it doesn't involve unrelated QML items.
84- */
85-class MirFocusControllerInterface : public QObject
86-{
87- Q_OBJECT
88-
89- /**
90- * @brief The MirSurface which currently has focus, if any.
91- *
92- * Shell provides this information.
93- *
94- * But it can also be changed by the implementation. When a MirSurfaceItem gets active
95- * focus from the QML scene, it will also call MirFocusController::setFocusedSurface for
96- * the MirSurface it holds.
97- */
98- Q_PROPERTY(unity::shell::application::MirSurfaceInterface* focusedSurface READ focusedSurface
99- WRITE setFocusedSurface
100- NOTIFY focusedSurfaceChanged)
101-public:
102- /// @cond
103- MirFocusControllerInterface(QObject *parent = 0) : QObject(parent) {}
104- virtual ~MirFocusControllerInterface() {}
105-
106- virtual void setFocusedSurface(MirSurfaceInterface *surface) = 0;
107- virtual MirSurfaceInterface* focusedSurface() const = 0;
108- /// @endcond
109-Q_SIGNALS:
110- /// @cond
111- void focusedSurfaceChanged();
112- /// @endcond
113-};
114-
115-} // namespace application
116-} // namespace shell
117-} // namespace unity
118-
119-#endif // UNITY_SHELL_APPLICATION_MIRFOCUSCONTROLLERINTERFACE_H
120
121=== modified file 'include/unity/shell/application/MirSurfaceInterface.h'
122--- include/unity/shell/application/MirSurfaceInterface.h 2016-09-05 13:21:24 +0000
123+++ include/unity/shell/application/MirSurfaceInterface.h 2016-10-14 14:33:43 +0000
124@@ -58,6 +58,16 @@
125 Q_PROPERTY(QString persistentId READ persistentId CONSTANT)
126
127 /**
128+ * @brief Position of the current surface buffer, in pixels.
129+ */
130+ Q_PROPERTY(QPoint position READ position NOTIFY positionChanged)
131+
132+ /**
133+ * @brief Requested position of the current surface buffer, in pixels.
134+ */
135+ Q_PROPERTY(QPoint requestedPosition READ requestedPosition WRITE setRequestedPosition NOTIFY requestedPositionChanged)
136+
137+ /**
138 * @brief Size of the current surface buffer, in pixels.
139 */
140 Q_PROPERTY(QSize size READ size NOTIFY sizeChanged)
141@@ -65,7 +75,7 @@
142 /**
143 * @brief State of the surface
144 */
145- Q_PROPERTY(Mir::State state READ state WRITE setState NOTIFY stateChanged)
146+ Q_PROPERTY(Mir::State state READ state NOTIFY stateChanged)
147
148 /**
149 * @brief True if it has a mir client bound to it.
150@@ -165,12 +175,13 @@
151
152 virtual QString persistentId() const = 0;
153
154+ virtual QPoint position() const = 0;
155+
156 virtual QSize size() const = 0;
157 virtual void resize(int width, int height) = 0;
158 virtual void resize(const QSize &size) = 0;
159
160 virtual Mir::State state() const = 0;
161- virtual void setState(Mir::State qmlState) = 0;
162
163 virtual bool live() const = 0;
164
165@@ -196,6 +207,9 @@
166 virtual QRect inputBounds() const = 0;
167
168 virtual bool confinesMousePointer() const = 0;
169+
170+ virtual QPoint requestedPosition() const = 0;
171+ virtual void setRequestedPosition(const QPoint &) = 0;
172 /// @endcond
173
174 /**
175@@ -216,6 +230,12 @@
176 */
177 Q_INVOKABLE virtual void raise() = 0;
178
179+public Q_SLOTS:
180+ /**
181+ * @brief Requests a change to the specified state
182+ */
183+ virtual void requestState(Mir::State state) = 0;
184+
185 Q_SIGNALS:
186 /// @cond
187 void typeChanged(Mir::Type value);
188@@ -223,6 +243,8 @@
189 void visibleChanged(bool visible);
190 void stateChanged(Mir::State value);
191 void orientationAngleChanged(Mir::OrientationAngle value);
192+ void positionChanged(QPoint position);
193+ void requestedPositionChanged(QPoint position);
194 void sizeChanged(const QSize &value);
195 void nameChanged(const QString &name);
196 void minimumWidthChanged(int value);
197
198=== modified file 'include/unity/shell/application/MirSurfaceItemInterface.h'
199--- include/unity/shell/application/MirSurfaceItemInterface.h 2016-03-11 10:39:33 +0000
200+++ include/unity/shell/application/MirSurfaceItemInterface.h 2016-10-14 14:33:43 +0000
201@@ -56,7 +56,7 @@
202 /**
203 * @brief State of the given surface or Mir.UnknownState if no surface is set
204 */
205- Q_PROPERTY(Mir::State surfaceState READ surfaceState WRITE setSurfaceState NOTIFY surfaceStateChanged)
206+ Q_PROPERTY(Mir::State surfaceState READ surfaceState NOTIFY surfaceStateChanged)
207
208 /**
209 * @brief Name of the given surface or an empty string if no surface is set
210@@ -128,7 +128,6 @@
211 virtual bool live() const = 0;
212
213 virtual Mir::State surfaceState() const = 0;
214- virtual void setSurfaceState(Mir::State) = 0;
215
216 virtual Mir::OrientationAngle orientationAngle() const = 0;
217 virtual void setOrientationAngle(Mir::OrientationAngle angle) = 0;

Subscribers

People subscribed via source and target branches

to all changes: