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
=== modified file 'debian/changelog'
--- debian/changelog 2016-09-09 14:39:28 +0000
+++ debian/changelog 2016-10-14 14:33:43 +0000
@@ -1,3 +1,9 @@
1unity-api (8.0+16.10.20160909-0ubuntu1) UNRELEASED; urgency=medium
2
3 * Add APIs for QtMir 0.2 (using MirAL)
4
5 -- Gerry Boland <gerry.boland@canonical.com> Fri, 14 Oct 2016 15:25:38 +0100
6
1unity-api (7.119+16.10.20160909-0ubuntu1) yakkety; urgency=medium7unity-api (7.119+16.10.20160909-0ubuntu1) yakkety; urgency=medium
28
3 [ Daniel d'Andrada ]9 [ Daniel d'Andrada ]
410
=== modified file 'include/unity/shell/application/Mir.h'
--- include/unity/shell/application/Mir.h 2016-02-17 12:56:18 +0000
+++ include/unity/shell/application/Mir.h 2016-10-14 14:33:43 +0000
@@ -63,9 +63,15 @@
63 RestoredState,63 RestoredState,
64 MinimizedState,64 MinimizedState,
65 MaximizedState,65 MaximizedState,
66 VertMaximizedState,
67 FullscreenState,66 FullscreenState,
67 MaximizedLeftState,
68 MaximizedRightState,
68 HorizMaximizedState,69 HorizMaximizedState,
70 VertMaximizedState,
71 MaximizedTopLeftState,
72 MaximizedTopRightState,
73 MaximizedBottomLeftState,
74 MaximizedBottomRightState,
69 HiddenState,75 HiddenState,
70 };76 };
7177
@@ -110,7 +116,10 @@
110 /// @endcond116 /// @endcond
111};117};
112118
119Q_DECLARE_METATYPE(Mir::Type)
120Q_DECLARE_METATYPE(Mir::State)
113Q_DECLARE_METATYPE(Mir::OrientationAngle)121Q_DECLARE_METATYPE(Mir::OrientationAngle)
114Q_DECLARE_METATYPE(Mir::ShellChrome)122Q_DECLARE_METATYPE(Mir::ShellChrome)
123Q_DECLARE_METATYPE(Mir::FormFactor)
115124
116#endif // UNITY_SHELL_APPLICATION_MIR_H125#endif // UNITY_SHELL_APPLICATION_MIR_H
117126
=== removed file 'include/unity/shell/application/MirFocusControllerInterface.h'
--- include/unity/shell/application/MirFocusControllerInterface.h 2016-04-13 16:47:27 +0000
+++ include/unity/shell/application/MirFocusControllerInterface.h 1970-01-01 00:00:00 +0000
@@ -1,69 +0,0 @@
1/*
2 * Copyright (C) 2016 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#ifndef UNITY_SHELL_APPLICATION_MIRFOCUSCONTROLLERINTERFACE_H
18#define UNITY_SHELL_APPLICATION_MIRFOCUSCONTROLLERINTERFACE_H
19
20#include <QObject>
21
22namespace unity {
23namespace shell {
24namespace application {
25
26class MirSurfaceInterface;
27
28/**
29 * @brief Defines which MirSurface has focus
30 *
31 * Even though QQuickWindow::activeFocusItem is who ultimately defines the focused MirSurface
32 * in the QML scene, the two might not necessarily match all the time. And also this is a cleaner
33 * way of keeping tabs on the focused MirSurface as it doesn't involve unrelated QML items.
34 */
35class MirFocusControllerInterface : public QObject
36{
37 Q_OBJECT
38
39 /**
40 * @brief The MirSurface which currently has focus, if any.
41 *
42 * Shell provides this information.
43 *
44 * But it can also be changed by the implementation. When a MirSurfaceItem gets active
45 * focus from the QML scene, it will also call MirFocusController::setFocusedSurface for
46 * the MirSurface it holds.
47 */
48 Q_PROPERTY(unity::shell::application::MirSurfaceInterface* focusedSurface READ focusedSurface
49 WRITE setFocusedSurface
50 NOTIFY focusedSurfaceChanged)
51public:
52 /// @cond
53 MirFocusControllerInterface(QObject *parent = 0) : QObject(parent) {}
54 virtual ~MirFocusControllerInterface() {}
55
56 virtual void setFocusedSurface(MirSurfaceInterface *surface) = 0;
57 virtual MirSurfaceInterface* focusedSurface() const = 0;
58 /// @endcond
59Q_SIGNALS:
60 /// @cond
61 void focusedSurfaceChanged();
62 /// @endcond
63};
64
65} // namespace application
66} // namespace shell
67} // namespace unity
68
69#endif // UNITY_SHELL_APPLICATION_MIRFOCUSCONTROLLERINTERFACE_H
700
=== modified file 'include/unity/shell/application/MirSurfaceInterface.h'
--- include/unity/shell/application/MirSurfaceInterface.h 2016-09-05 13:21:24 +0000
+++ include/unity/shell/application/MirSurfaceInterface.h 2016-10-14 14:33:43 +0000
@@ -58,6 +58,16 @@
58 Q_PROPERTY(QString persistentId READ persistentId CONSTANT)58 Q_PROPERTY(QString persistentId READ persistentId CONSTANT)
5959
60 /**60 /**
61 * @brief Position of the current surface buffer, in pixels.
62 */
63 Q_PROPERTY(QPoint position READ position NOTIFY positionChanged)
64
65 /**
66 * @brief Requested position of the current surface buffer, in pixels.
67 */
68 Q_PROPERTY(QPoint requestedPosition READ requestedPosition WRITE setRequestedPosition NOTIFY requestedPositionChanged)
69
70 /**
61 * @brief Size of the current surface buffer, in pixels.71 * @brief Size of the current surface buffer, in pixels.
62 */72 */
63 Q_PROPERTY(QSize size READ size NOTIFY sizeChanged)73 Q_PROPERTY(QSize size READ size NOTIFY sizeChanged)
@@ -65,7 +75,7 @@
65 /**75 /**
66 * @brief State of the surface76 * @brief State of the surface
67 */77 */
68 Q_PROPERTY(Mir::State state READ state WRITE setState NOTIFY stateChanged)78 Q_PROPERTY(Mir::State state READ state NOTIFY stateChanged)
6979
70 /**80 /**
71 * @brief True if it has a mir client bound to it.81 * @brief True if it has a mir client bound to it.
@@ -165,12 +175,13 @@
165175
166 virtual QString persistentId() const = 0;176 virtual QString persistentId() const = 0;
167177
178 virtual QPoint position() const = 0;
179
168 virtual QSize size() const = 0;180 virtual QSize size() const = 0;
169 virtual void resize(int width, int height) = 0;181 virtual void resize(int width, int height) = 0;
170 virtual void resize(const QSize &size) = 0;182 virtual void resize(const QSize &size) = 0;
171183
172 virtual Mir::State state() const = 0;184 virtual Mir::State state() const = 0;
173 virtual void setState(Mir::State qmlState) = 0;
174185
175 virtual bool live() const = 0;186 virtual bool live() const = 0;
176187
@@ -196,6 +207,9 @@
196 virtual QRect inputBounds() const = 0;207 virtual QRect inputBounds() const = 0;
197208
198 virtual bool confinesMousePointer() const = 0;209 virtual bool confinesMousePointer() const = 0;
210
211 virtual QPoint requestedPosition() const = 0;
212 virtual void setRequestedPosition(const QPoint &) = 0;
199 /// @endcond213 /// @endcond
200214
201 /**215 /**
@@ -216,6 +230,12 @@
216 */230 */
217 Q_INVOKABLE virtual void raise() = 0;231 Q_INVOKABLE virtual void raise() = 0;
218232
233public Q_SLOTS:
234 /**
235 * @brief Requests a change to the specified state
236 */
237 virtual void requestState(Mir::State state) = 0;
238
219Q_SIGNALS:239Q_SIGNALS:
220 /// @cond240 /// @cond
221 void typeChanged(Mir::Type value);241 void typeChanged(Mir::Type value);
@@ -223,6 +243,8 @@
223 void visibleChanged(bool visible);243 void visibleChanged(bool visible);
224 void stateChanged(Mir::State value);244 void stateChanged(Mir::State value);
225 void orientationAngleChanged(Mir::OrientationAngle value);245 void orientationAngleChanged(Mir::OrientationAngle value);
246 void positionChanged(QPoint position);
247 void requestedPositionChanged(QPoint position);
226 void sizeChanged(const QSize &value);248 void sizeChanged(const QSize &value);
227 void nameChanged(const QString &name);249 void nameChanged(const QString &name);
228 void minimumWidthChanged(int value);250 void minimumWidthChanged(int value);
229251
=== modified file 'include/unity/shell/application/MirSurfaceItemInterface.h'
--- include/unity/shell/application/MirSurfaceItemInterface.h 2016-03-11 10:39:33 +0000
+++ include/unity/shell/application/MirSurfaceItemInterface.h 2016-10-14 14:33:43 +0000
@@ -56,7 +56,7 @@
56 /**56 /**
57 * @brief State of the given surface or Mir.UnknownState if no surface is set57 * @brief State of the given surface or Mir.UnknownState if no surface is set
58 */58 */
59 Q_PROPERTY(Mir::State surfaceState READ surfaceState WRITE setSurfaceState NOTIFY surfaceStateChanged)59 Q_PROPERTY(Mir::State surfaceState READ surfaceState NOTIFY surfaceStateChanged)
6060
61 /**61 /**
62 * @brief Name of the given surface or an empty string if no surface is set62 * @brief Name of the given surface or an empty string if no surface is set
@@ -128,7 +128,6 @@
128 virtual bool live() const = 0;128 virtual bool live() const = 0;
129129
130 virtual Mir::State surfaceState() const = 0;130 virtual Mir::State surfaceState() const = 0;
131 virtual void setSurfaceState(Mir::State) = 0;
132131
133 virtual Mir::OrientationAngle orientationAngle() const = 0;132 virtual Mir::OrientationAngle orientationAngle() const = 0;
134 virtual void setOrientationAngle(Mir::OrientationAngle angle) = 0;133 virtual void setOrientationAngle(Mir::OrientationAngle angle) = 0;

Subscribers

People subscribed via source and target branches

to all changes: