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

Proposed by Michał Sawicz
Status: Work in progress
Proposed branch: lp:~unity-team/unity-api/initialSurfaceGeom
Merge into: lp:unity-api
Diff against target: 74 lines (+14/-2)
3 files modified
include/unity/shell/application/ApplicationInfoInterface.h (+10/-1)
include/unity/shell/application/CMakeLists.txt (+1/-1)
test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationInfo.h (+3/-0)
To merge this branch: bzr merge lp:~unity-team/unity-api/initialSurfaceGeom
Reviewer Review Type Date Requested Status
Unity Team Pending
Review via email: mp+284763@code.launchpad.net
To post a comment you must log in.

Unmerged revisions

207. By Daniel d'Andrada

Added ApplicationInfoInterface.initialSurfaceSize

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-02 17:01:15 +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/CMakeLists.txt'
--- include/unity/shell/application/CMakeLists.txt 2015-12-03 19:32:37 +0000
+++ include/unity/shell/application/CMakeLists.txt 2016-02-02 17:01:15 +0000
@@ -7,7 +7,7 @@
77
8set(UNITY_API_LIB_HDRS ${UNITY_API_LIB_HDRS} ${headers} ${internal_headers} PARENT_SCOPE)8set(UNITY_API_LIB_HDRS ${UNITY_API_LIB_HDRS} ${headers} ${internal_headers} PARENT_SCOPE)
99
10set(VERSION 12)10set(VERSION 13)
11set(PKGCONFIG_NAME "unity-shell-application")11set(PKGCONFIG_NAME "unity-shell-application")
12set(PKGCONFIG_DESCRIPTION "Unity shell Application APIs")12set(PKGCONFIG_DESCRIPTION "Unity shell Application APIs")
13set(PKGCONFIG_REQUIRES "Qt5Core")13set(PKGCONFIG_REQUIRES "Qt5Core")
1414
=== 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-02 17:01:15 +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: