Merge lp:~unity-team/unity-api/surfaceItemSizeHints into lp:unity-api

Proposed by Michał Sawicz
Status: Superseded
Proposed branch: lp:~unity-team/unity-api/surfaceItemSizeHints
Merge into: lp:unity-api
Diff against target: 135 lines (+62/-1)
3 files modified
include/unity/shell/application/ApplicationInfoInterface.h (+10/-1)
include/unity/shell/application/MirSurfaceInterface.h (+49/-0)
test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationInfo.h (+3/-0)
To merge this branch: bzr merge lp:~unity-team/unity-api/surfaceItemSizeHints
Reviewer Review Type Date Requested Status
Unity8 CI Bot continuous-integration Approve
PS Jenkins bot (community) continuous-integration Approve
Lukáš Tinkl Pending
Review via email: mp+284829@code.launchpad.net

This proposal supersedes a proposal from 2015-11-26.

This proposal has been superseded by a proposal from 2016-02-03.

Commit message

MirSurfaceInterface: added size hints

Description of the change

MirSurfaceInterface: added size hints

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote : Posted in a previous version of this proposal

LGTM, approving

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:205
https://unity8-jenkins.ubuntu.com/job/lp-unity-api-1-ci/14/
Executed test runs:

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity-api-1-ci/14/rebuild

review: Approve (continuous-integration)
208. By Daniel d'Andrada

MirSurfaceInterface: added size hints

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'include/unity/shell/application/ApplicationInfoInterface.h'
--- include/unity/shell/application/ApplicationInfoInterface.h 2015-12-03 19:03:29 +0000
+++ include/unity/shell/application/ApplicationInfoInterface.h 2016-02-03 11:32:37 +0000
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright 2013,2015 Canonical Ltd.2 * Copyright 2013,2015,2016 Canonical Ltd.
3 *3 *
4 * This program is free software; you can redistribute it and/or modify4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by5 * it under the terms of the GNU Lesser General Public License as published by
@@ -22,6 +22,7 @@
22#include <QtCore/QObject>22#include <QtCore/QObject>
23#include <QtCore/QUrl>23#include <QtCore/QUrl>
24#include <QColor>24#include <QColor>
25#include <QSize>
2526
26namespace unity27namespace unity
27{28{
@@ -211,6 +212,11 @@
211 */212 */
212 Q_PROPERTY(bool exemptFromLifecycle READ exemptFromLifecycle WRITE setExemptFromLifecycle NOTIFY exemptFromLifecycleChanged)213 Q_PROPERTY(bool exemptFromLifecycle READ exemptFromLifecycle WRITE setExemptFromLifecycle NOTIFY exemptFromLifecycleChanged)
213214
215 /**
216 * @brief The size to be given for new surfaces created by this application
217 */
218 Q_PROPERTY(QSize initialSurfaceSize READ initialSurfaceSize WRITE setInitialSurfaceSize NOTIFY initialSurfaceSizeChanged)
219
214protected:220protected:
215 /// @cond221 /// @cond
216 ApplicationInfoInterface(const QString &appId, QObject* parent = 0): QObject(parent) { Q_UNUSED(appId) }222 ApplicationInfoInterface(const QString &appId, QObject* parent = 0): QObject(parent) { Q_UNUSED(appId) }
@@ -284,6 +290,8 @@
284 virtual bool isTouchApp() const = 0;290 virtual bool isTouchApp() const = 0;
285 virtual bool exemptFromLifecycle() const = 0;291 virtual bool exemptFromLifecycle() const = 0;
286 virtual void setExemptFromLifecycle(bool) = 0;292 virtual void setExemptFromLifecycle(bool) = 0;
293 virtual QSize initialSurfaceSize() const = 0;
294 virtual void setInitialSurfaceSize(const QSize &size) = 0;
287 /// @endcond295 /// @endcond
288296
289Q_SIGNALS:297Q_SIGNALS:
@@ -296,6 +304,7 @@
296 void requestedStateChanged(RequestedState value);304 void requestedStateChanged(RequestedState value);
297 void focusedChanged(bool focused);305 void focusedChanged(bool focused);
298 void exemptFromLifecycleChanged(bool exemptFromLifecycle);306 void exemptFromLifecycleChanged(bool exemptFromLifecycle);
307 void initialSurfaceSizeChanged(const QSize &size);
299 /// @endcond308 /// @endcond
300};309};
301310
302311
=== modified file 'include/unity/shell/application/MirSurfaceInterface.h'
--- include/unity/shell/application/MirSurfaceInterface.h 2015-10-26 18:26:01 +0000
+++ include/unity/shell/application/MirSurfaceInterface.h 2016-02-03 11:32:37 +0000
@@ -78,6 +78,42 @@
78 Q_PROPERTY(Mir::OrientationAngle orientationAngle READ orientationAngle WRITE setOrientationAngle78 Q_PROPERTY(Mir::OrientationAngle orientationAngle READ orientationAngle WRITE setOrientationAngle
79 NOTIFY orientationAngleChanged DESIGNABLE false)79 NOTIFY orientationAngleChanged DESIGNABLE false)
8080
81 /**
82 * @brief The requested minimum width for the surface
83 * Zero if not set
84 */
85 Q_PROPERTY(int minimumWidth READ minimumWidth NOTIFY minimumWidthChanged)
86
87 /**
88 * @brief The requested minimum height for the surface
89 * Zero if not set
90 */
91 Q_PROPERTY(int minimumHeight READ minimumHeight NOTIFY minimumHeightChanged)
92
93 /**
94 * @brief The requested maximum width for the surface
95 * Zero if not set
96 */
97 Q_PROPERTY(int maximumWidth READ maximumWidth NOTIFY maximumWidthChanged)
98
99 /**
100 * @brief The requested maximum height for the surface
101 * Zero if not set
102 */
103 Q_PROPERTY(int maximumHeight READ maximumHeight NOTIFY maximumHeightChanged)
104
105 /**
106 * @brief The requested width increment for the surface
107 * Zero if not set
108 */
109 Q_PROPERTY(int widthIncrement READ widthIncrement NOTIFY widthIncrementChanged)
110
111 /**
112 * @brief The requested height increment for the surface
113 * Zero if not set
114 */
115 Q_PROPERTY(int heightIncrement READ heightIncrement NOTIFY heightIncrementChanged)
116
81public:117public:
82 /// @cond118 /// @cond
83 MirSurfaceInterface(QObject *parent = nullptr) : QObject(parent) {}119 MirSurfaceInterface(QObject *parent = nullptr) : QObject(parent) {}
@@ -100,6 +136,13 @@
100136
101 virtual Mir::OrientationAngle orientationAngle() const = 0;137 virtual Mir::OrientationAngle orientationAngle() const = 0;
102 virtual void setOrientationAngle(Mir::OrientationAngle angle) = 0;138 virtual void setOrientationAngle(Mir::OrientationAngle angle) = 0;
139
140 virtual int minimumWidth() const = 0;
141 virtual int minimumHeight() const = 0;
142 virtual int maximumWidth() const = 0;
143 virtual int maximumHeight() const = 0;
144 virtual int widthIncrement() const = 0;
145 virtual int heightIncrement() const = 0;
103 /// @endcond146 /// @endcond
104147
105Q_SIGNALS:148Q_SIGNALS:
@@ -111,6 +154,12 @@
111 void orientationAngleChanged(Mir::OrientationAngle value);154 void orientationAngleChanged(Mir::OrientationAngle value);
112 void sizeChanged(const QSize &value);155 void sizeChanged(const QSize &value);
113 void nameChanged(const QString &name);156 void nameChanged(const QString &name);
157 void minimumWidthChanged(int value);
158 void minimumHeightChanged(int value);
159 void maximumWidthChanged(int value);
160 void maximumHeightChanged(int value);
161 void widthIncrementChanged(int value);
162 void heightIncrementChanged(int value);
114 /// @endcond163 /// @endcond
115};164};
116165
117166
=== modified file 'test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationInfo.h'
--- test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationInfo.h 2015-12-03 17:07:15 +0000
+++ test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationInfo.h 2016-02-03 11:32:37 +0000
@@ -59,6 +59,9 @@
59 bool exemptFromLifecycle() const override;59 bool exemptFromLifecycle() const override;
60 void setExemptFromLifecycle(bool exemptFromLifecycle) override;60 void setExemptFromLifecycle(bool exemptFromLifecycle) override;
6161
62 QSize initialSurfaceSize() const override { return QSize(); }
63 void setInitialSurfaceSize(const QSize &) override {}
64
62private:65private:
63 QString m_appId;66 QString m_appId;
64 QString m_name;67 QString m_name;

Subscribers

People subscribed via source and target branches

to all changes: