Merge lp:~unity-team/unity-api/silo0 into lp:unity-api
- silo0
- Merge into trunk
Proposed by
Gerry Boland
Status: | Work in progress |
---|---|
Proposed branch: | lp:~unity-team/unity-api/silo0 |
Merge into: | lp:unity-api |
Diff against target: |
526 lines (+401/-11) 10 files modified
debian/changelog (+33/-2) include/unity/shell/application/CMakeLists.txt (+1/-1) include/unity/shell/application/Mir.h (+93/-0) include/unity/shell/application/MirSurfaceInterface.h (+113/-0) include/unity/shell/application/MirSurfaceItemInterface.h (+151/-0) include/unity/shell/scopes/CMakeLists.txt (+1/-1) include/unity/shell/scopes/ScopeInterface.h (+2/-2) test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScope.cpp (+4/-2) test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScope.h (+2/-2) test/qmltest/unity/shell/scopes/tst_Scopes.qml (+1/-1) |
To merge this branch: | bzr merge lp:~unity-team/unity-api/silo0 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Unity Team | Pending | ||
Review via email: mp+267055@code.launchpad.net |
Commit message
Silo0 - pocket desktop - DO NOT LAND THIS
Description of the change
To post a comment you must log in.
lp:~unity-team/unity-api/silo0
updated
- 180. By Gerry Boland
-
Fake changelog entry to satisfy train
- 181. By Gerry Boland
-
Merge unity-api trunk
- 182. By Gerry Boland
-
edit changelog to unrelease, keep train happy
- 183. By Gerry Boland
-
Merge unity-api trunk-15.04
Unmerged revisions
- 183. By Gerry Boland
-
Merge unity-api trunk-15.04
- 182. By Gerry Boland
-
edit changelog to unrelease, keep train happy
- 181. By Gerry Boland
-
Merge unity-api trunk
- 180. By Gerry Boland
-
Fake changelog entry to satisfy train
- 179. By Gerry Boland
-
Merge mousePointer
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 2015-08-04 15:26:17 +0000 | |||
3 | +++ debian/changelog 2015-08-13 10:55:16 +0000 | |||
4 | @@ -1,4 +1,15 @@ | |||
6 | 1 | unity-api (7.99+15.10.20150804-0ubuntu1) wily; urgency=medium | 1 | unity-api (7.99+15.04.20150811-0ubuntu1) vivid; urgency=medium |
7 | 2 | |||
8 | 3 | [ Daniel d'Andrada ] | ||
9 | 4 | * New rebuild forced. | ||
10 | 5 | * Remove ApplicationManagerInterface.forceDashActive | ||
11 | 6 | * Remove ApplicationManagerInterface.suspended | ||
12 | 7 | * Add ApplicationInfoInterface.requestedState | ||
13 | 8 | * Add a NO_TESTS options to cmake | ||
14 | 9 | |||
15 | 10 | -- CI Train Bot <ci-train-bot@canonical.com> Tue, 11 Aug 2015 14:05:55 +0000 | ||
16 | 11 | |||
17 | 12 | unity-api (7.99+15.04.20150804-0ubuntu1) vivid; urgency=medium | ||
18 | 2 | 13 | ||
19 | 3 | [ Daniel d'Andrada ] | 14 | [ Daniel d'Andrada ] |
20 | 4 | * Remove ApplicationManagerInterface.forceDashActive | 15 | * Remove ApplicationManagerInterface.forceDashActive |
21 | @@ -8,13 +19,33 @@ | |||
22 | 8 | 19 | ||
23 | 9 | -- CI Train Bot <ci-train-bot@canonical.com> Tue, 04 Aug 2015 15:26:16 +0000 | 20 | -- CI Train Bot <ci-train-bot@canonical.com> Tue, 04 Aug 2015 15:26:16 +0000 |
24 | 10 | 21 | ||
26 | 11 | unity-api (7.98+15.10.20150724-0ubuntu1) wily; urgency=medium | 22 | unity-api (7.99-0ubuntu1) UNRELEASED; urgency=medium |
27 | 23 | |||
28 | 24 | * Changes to activate and preview methods of ScopeInterface. | ||
29 | 25 | |||
30 | 26 | -- Pawel Stolowski <pawel.stolowski@canonical.com> Mon, 03 Aug 2015 14:03:47 +0000 | ||
31 | 27 | |||
32 | 28 | unity-api (7.98+15.04.20150805-0ubuntu1) UNRELEASED; urgency=medium | ||
33 | 29 | |||
34 | 30 | * Fake entry to keep train happy | ||
35 | 31 | |||
36 | 32 | -- CI Train Bot <ci-train-bot@canonical.com> Thu, 6 Aug 2015 09:53:01 +0000 | ||
37 | 33 | |||
38 | 34 | unity-api (7.98+15.04.20150724-0ubuntu1) vivid; urgency=medium | ||
39 | 12 | 35 | ||
40 | 13 | [ Mirco Müller (MacSlow) ] | 36 | [ Mirco Müller (MacSlow) ] |
41 | 14 | * added alerting/setAlerting API to LauncherModel and LauncherItem interfaces | 37 | * added alerting/setAlerting API to LauncherModel and LauncherItem interfaces |
42 | 15 | 38 | ||
43 | 16 | -- CI Train Bot <ci-train-bot@canonical.com> Fri, 24 Jul 2015 09:53:01 +0000 | 39 | -- CI Train Bot <ci-train-bot@canonical.com> Fri, 24 Jul 2015 09:53:01 +0000 |
44 | 17 | 40 | ||
45 | 41 | unity-api (7.98) UNRELEASED; urgency=medium | ||
46 | 42 | |||
47 | 43 | * Remove ApplicationManagerInterface.forceDashActive | ||
48 | 44 | * Remove ApplicationManagerInterface.suspended | ||
49 | 45 | * Add ApplicationInfoInterface.requestedState | ||
50 | 46 | |||
51 | 47 | -- Daniel d'Andrada <daniel.dandrada@canonical.com> Mon, 15 Jun 2015 13:53:07 -0300 | ||
52 | 48 | |||
53 | 18 | unity-api (7.97+15.10.20150721-0ubuntu1) wily; urgency=medium | 49 | unity-api (7.97+15.10.20150721-0ubuntu1) wily; urgency=medium |
54 | 19 | 50 | ||
55 | 20 | [ Michi Henning ] | 51 | [ Michi Henning ] |
56 | 21 | 52 | ||
57 | === modified file 'include/unity/shell/application/CMakeLists.txt' | |||
58 | --- include/unity/shell/application/CMakeLists.txt 2015-06-19 12:02:05 +0000 | |||
59 | +++ include/unity/shell/application/CMakeLists.txt 2015-08-13 10:55:16 +0000 | |||
60 | @@ -7,7 +7,7 @@ | |||
61 | 7 | 7 | ||
62 | 8 | set(UNITY_API_LIB_HDRS ${UNITY_API_LIB_HDRS} ${headers} ${internal_headers} PARENT_SCOPE) | 8 | set(UNITY_API_LIB_HDRS ${UNITY_API_LIB_HDRS} ${headers} ${internal_headers} PARENT_SCOPE) |
63 | 9 | 9 | ||
65 | 10 | set(VERSION 7) | 10 | set(VERSION 8) |
66 | 11 | set(PKGCONFIG_NAME "unity-shell-application") | 11 | set(PKGCONFIG_NAME "unity-shell-application") |
67 | 12 | set(PKGCONFIG_DESCRIPTION "Unity shell Application APIs") | 12 | set(PKGCONFIG_DESCRIPTION "Unity shell Application APIs") |
68 | 13 | set(PKGCONFIG_REQUIRES "Qt5Core") | 13 | set(PKGCONFIG_REQUIRES "Qt5Core") |
69 | 14 | 14 | ||
70 | === added file 'include/unity/shell/application/Mir.h' | |||
71 | --- include/unity/shell/application/Mir.h 1970-01-01 00:00:00 +0000 | |||
72 | +++ include/unity/shell/application/Mir.h 2015-08-13 10:55:16 +0000 | |||
73 | @@ -0,0 +1,93 @@ | |||
74 | 1 | /* | ||
75 | 2 | * Copyright (C) 2015 Canonical, Ltd. | ||
76 | 3 | * | ||
77 | 4 | * This program is free software; you can redistribute it and/or modify | ||
78 | 5 | * it under the terms of the GNU General Public License as published by | ||
79 | 6 | * the Free Software Foundation; version 3. | ||
80 | 7 | * | ||
81 | 8 | * This program is distributed in the hope that it will be useful, | ||
82 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
83 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
84 | 11 | * GNU General Public License for more details. | ||
85 | 12 | * | ||
86 | 13 | * You should have received a copy of the GNU General Public License | ||
87 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
88 | 15 | */ | ||
89 | 16 | |||
90 | 17 | #ifndef UNITY_SHELL_APPLICATION_MIR_H | ||
91 | 18 | #define UNITY_SHELL_APPLICATION_MIR_H | ||
92 | 19 | |||
93 | 20 | #include <QObject> | ||
94 | 21 | |||
95 | 22 | /** | ||
96 | 23 | @brief Acting mostly as a namespace to hold enums and such for use in QML | ||
97 | 24 | */ | ||
98 | 25 | class Mir : public QObject | ||
99 | 26 | { | ||
100 | 27 | Q_OBJECT | ||
101 | 28 | Q_ENUMS(Type) | ||
102 | 29 | Q_ENUMS(State) | ||
103 | 30 | Q_ENUMS(OrientationAngle) | ||
104 | 31 | |||
105 | 32 | /** | ||
106 | 33 | @brief Name of the mouse cursor to be used. Follows the X Cursor naming convention. | ||
107 | 34 | |||
108 | 35 | Eg.: "left_ptr" is a left-sided pointer arrow | ||
109 | 36 | */ | ||
110 | 37 | Q_PROPERTY(QString cursorName READ cursorName WRITE setCursorName NOTIFY cursorNameChanged) | ||
111 | 38 | |||
112 | 39 | public: | ||
113 | 40 | /** | ||
114 | 41 | @brief Surface type | ||
115 | 42 | */ | ||
116 | 43 | enum Type { | ||
117 | 44 | UnknownType, | ||
118 | 45 | NormalType, | ||
119 | 46 | UtilityType, | ||
120 | 47 | DialogType, | ||
121 | 48 | GlossType, | ||
122 | 49 | FreeStyleType, | ||
123 | 50 | MenuType, | ||
124 | 51 | InputMethodType, | ||
125 | 52 | SatelliteType, | ||
126 | 53 | TipType, | ||
127 | 54 | }; | ||
128 | 55 | |||
129 | 56 | /** | ||
130 | 57 | @brief Surface state | ||
131 | 58 | */ | ||
132 | 59 | enum State { | ||
133 | 60 | UnknownState, | ||
134 | 61 | RestoredState, | ||
135 | 62 | MinimizedState, | ||
136 | 63 | MaximizedState, | ||
137 | 64 | VertMaximizedState, | ||
138 | 65 | FullscreenState, | ||
139 | 66 | HorizMaximizedState, | ||
140 | 67 | HiddenState, | ||
141 | 68 | }; | ||
142 | 69 | |||
143 | 70 | /** | ||
144 | 71 | @brief Surface orientation angle | ||
145 | 72 | */ | ||
146 | 73 | enum OrientationAngle { | ||
147 | 74 | Angle0 = 0, | ||
148 | 75 | Angle90 = 90, | ||
149 | 76 | Angle180 = 180, | ||
150 | 77 | Angle270 = 270 | ||
151 | 78 | }; | ||
152 | 79 | |||
153 | 80 | /// @cond | ||
154 | 81 | virtual void setCursorName(const QString &cursorName) = 0; | ||
155 | 82 | virtual QString cursorName() const = 0; | ||
156 | 83 | /// @endcond | ||
157 | 84 | |||
158 | 85 | Q_SIGNALS: | ||
159 | 86 | /// @cond | ||
160 | 87 | void cursorNameChanged(const QString &cursorName); | ||
161 | 88 | /// @endcond | ||
162 | 89 | }; | ||
163 | 90 | |||
164 | 91 | Q_DECLARE_METATYPE(Mir::OrientationAngle) | ||
165 | 92 | |||
166 | 93 | #endif // UNITY_SHELL_APPLICATION_MIR_H | ||
167 | 0 | 94 | ||
168 | === added file 'include/unity/shell/application/MirSurfaceInterface.h' | |||
169 | --- include/unity/shell/application/MirSurfaceInterface.h 1970-01-01 00:00:00 +0000 | |||
170 | +++ include/unity/shell/application/MirSurfaceInterface.h 2015-08-13 10:55:16 +0000 | |||
171 | @@ -0,0 +1,113 @@ | |||
172 | 1 | /* | ||
173 | 2 | * Copyright (C) 2015 Canonical, Ltd. | ||
174 | 3 | * | ||
175 | 4 | * This program is free software; you can redistribute it and/or modify | ||
176 | 5 | * it under the terms of the GNU General Public License as published by | ||
177 | 6 | * the Free Software Foundation; version 3. | ||
178 | 7 | * | ||
179 | 8 | * This program is distributed in the hope that it will be useful, | ||
180 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
181 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
182 | 11 | * GNU General Public License for more details. | ||
183 | 12 | * | ||
184 | 13 | * You should have received a copy of the GNU General Public License | ||
185 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
186 | 15 | */ | ||
187 | 16 | |||
188 | 17 | #ifndef UNITY_SHELL_APPLICATION_MIRSURFACE_H | ||
189 | 18 | #define UNITY_SHELL_APPLICATION_MIRSURFACE_H | ||
190 | 19 | |||
191 | 20 | #include <QObject> | ||
192 | 21 | #include <QSize> | ||
193 | 22 | |||
194 | 23 | #include "Mir.h" | ||
195 | 24 | |||
196 | 25 | namespace unity | ||
197 | 26 | { | ||
198 | 27 | namespace shell | ||
199 | 28 | { | ||
200 | 29 | namespace application | ||
201 | 30 | { | ||
202 | 31 | |||
203 | 32 | /** | ||
204 | 33 | @brief Holds a Mir surface. Pretty much an opaque class. | ||
205 | 34 | |||
206 | 35 | All surface manipulation is done by giving it to a MirSurfaceItem and then | ||
207 | 36 | using MirSurfaceItem's properties. | ||
208 | 37 | */ | ||
209 | 38 | class MirSurfaceInterface : public QObject | ||
210 | 39 | { | ||
211 | 40 | Q_OBJECT | ||
212 | 41 | |||
213 | 42 | /** | ||
214 | 43 | * @brief The surface type | ||
215 | 44 | */ | ||
216 | 45 | Q_PROPERTY(Mir::Type type READ type NOTIFY typeChanged) | ||
217 | 46 | |||
218 | 47 | /** | ||
219 | 48 | * @brief Name of the surface, given by the client application | ||
220 | 49 | */ | ||
221 | 50 | Q_PROPERTY(QString name READ name CONSTANT) | ||
222 | 51 | |||
223 | 52 | /** | ||
224 | 53 | * @brief Size of the current surface buffer, in pixels. | ||
225 | 54 | */ | ||
226 | 55 | Q_PROPERTY(QSize size READ size NOTIFY sizeChanged) | ||
227 | 56 | |||
228 | 57 | /** | ||
229 | 58 | * @brief State of the surface | ||
230 | 59 | */ | ||
231 | 60 | Q_PROPERTY(Mir::State state READ state WRITE setState NOTIFY stateChanged) | ||
232 | 61 | |||
233 | 62 | /** | ||
234 | 63 | * @brief True if it has a mir client bound to it. | ||
235 | 64 | * A "zombie" (live == false) surface never becomes alive again. | ||
236 | 65 | */ | ||
237 | 66 | Q_PROPERTY(bool live READ live NOTIFY liveChanged) | ||
238 | 67 | |||
239 | 68 | /** | ||
240 | 69 | * @brief Orientation angle of the surface | ||
241 | 70 | * | ||
242 | 71 | * How many degrees, clockwise, the UI in the surface has to rotate to match shell's UI orientation | ||
243 | 72 | */ | ||
244 | 73 | Q_PROPERTY(Mir::OrientationAngle orientationAngle READ orientationAngle WRITE setOrientationAngle | ||
245 | 74 | NOTIFY orientationAngleChanged DESIGNABLE false) | ||
246 | 75 | |||
247 | 76 | public: | ||
248 | 77 | /// @cond | ||
249 | 78 | MirSurfaceInterface(QObject *parent = nullptr) : QObject(parent) {} | ||
250 | 79 | virtual ~MirSurfaceInterface() {} | ||
251 | 80 | |||
252 | 81 | virtual Mir::Type type() const = 0; | ||
253 | 82 | |||
254 | 83 | virtual QString name() const = 0; | ||
255 | 84 | |||
256 | 85 | virtual QSize size() const = 0; | ||
257 | 86 | virtual void resize(int width, int height) = 0; | ||
258 | 87 | |||
259 | 88 | virtual Mir::State state() const = 0; | ||
260 | 89 | virtual void setState(Mir::State qmlState) = 0; | ||
261 | 90 | |||
262 | 91 | virtual bool live() const = 0; | ||
263 | 92 | |||
264 | 93 | virtual Mir::OrientationAngle orientationAngle() const = 0; | ||
265 | 94 | virtual void setOrientationAngle(Mir::OrientationAngle angle) = 0; | ||
266 | 95 | /// @endcond | ||
267 | 96 | |||
268 | 97 | Q_SIGNALS: | ||
269 | 98 | /// @cond | ||
270 | 99 | void typeChanged(Mir::Type value); | ||
271 | 100 | void liveChanged(bool value); | ||
272 | 101 | void stateChanged(Mir::State value); | ||
273 | 102 | void orientationAngleChanged(Mir::OrientationAngle value); | ||
274 | 103 | void sizeChanged(const QSize &value); | ||
275 | 104 | /// @endcond | ||
276 | 105 | }; | ||
277 | 106 | |||
278 | 107 | } // namespace application | ||
279 | 108 | } // namespace shell | ||
280 | 109 | } // namespace unity | ||
281 | 110 | |||
282 | 111 | Q_DECLARE_METATYPE(unity::shell::application::MirSurfaceInterface*) | ||
283 | 112 | |||
284 | 113 | #endif // UNITY_SHELL_APPLICATION_MIRSURFACE_H | ||
285 | 0 | 114 | ||
286 | === added file 'include/unity/shell/application/MirSurfaceItemInterface.h' | |||
287 | --- include/unity/shell/application/MirSurfaceItemInterface.h 1970-01-01 00:00:00 +0000 | |||
288 | +++ include/unity/shell/application/MirSurfaceItemInterface.h 2015-08-13 10:55:16 +0000 | |||
289 | @@ -0,0 +1,151 @@ | |||
290 | 1 | /* | ||
291 | 2 | * Copyright (C) 2015 Canonical, Ltd. | ||
292 | 3 | * | ||
293 | 4 | * This program is free software; you can redistribute it and/or modify | ||
294 | 5 | * it under the terms of the GNU General Public License as published by | ||
295 | 6 | * the Free Software Foundation; version 3. | ||
296 | 7 | * | ||
297 | 8 | * This program is distributed in the hope that it will be useful, | ||
298 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
299 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
300 | 11 | * GNU General Public License for more details. | ||
301 | 12 | * | ||
302 | 13 | * You should have received a copy of the GNU General Public License | ||
303 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
304 | 15 | */ | ||
305 | 16 | |||
306 | 17 | #ifndef UNITY_SHELL_APPLICATION_MIRSURFACEITEM_H | ||
307 | 18 | #define UNITY_SHELL_APPLICATION_MIRSURFACEITEM_H | ||
308 | 19 | |||
309 | 20 | #include "Mir.h" | ||
310 | 21 | |||
311 | 22 | #include <QQuickItem> | ||
312 | 23 | |||
313 | 24 | namespace unity | ||
314 | 25 | { | ||
315 | 26 | namespace shell | ||
316 | 27 | { | ||
317 | 28 | namespace application | ||
318 | 29 | { | ||
319 | 30 | |||
320 | 31 | class MirSurfaceInterface; | ||
321 | 32 | |||
322 | 33 | /** | ||
323 | 34 | @brief Renders a MirSurface in a QML scene and forwards the input events it receives to it. | ||
324 | 35 | |||
325 | 36 | You can have multiple MirSurfaceItems displaying the same MirSurface. But care must | ||
326 | 37 | be taken that only one of them feeds the MirSurface with input events and also only | ||
327 | 38 | one resizes it. | ||
328 | 39 | */ | ||
329 | 40 | class MirSurfaceItemInterface : public QQuickItem | ||
330 | 41 | { | ||
331 | 42 | Q_OBJECT | ||
332 | 43 | |||
333 | 44 | /** | ||
334 | 45 | * @brief The surface to be displayed | ||
335 | 46 | */ | ||
336 | 47 | Q_PROPERTY(unity::shell::application::MirSurfaceInterface* surface READ surface WRITE setSurface NOTIFY surfaceChanged) | ||
337 | 48 | |||
338 | 49 | /** | ||
339 | 50 | * @brief Type of the given surface or Mir.UnknownType if no surface is set | ||
340 | 51 | */ | ||
341 | 52 | Q_PROPERTY(Mir::Type type READ type NOTIFY typeChanged) | ||
342 | 53 | |||
343 | 54 | /** | ||
344 | 55 | * @brief State of the given surface or Mir.UnknownState if no surface is set | ||
345 | 56 | */ | ||
346 | 57 | Q_PROPERTY(Mir::State surfaceState READ surfaceState WRITE setSurfaceState NOTIFY surfaceStateChanged) | ||
347 | 58 | |||
348 | 59 | /** | ||
349 | 60 | * @brief Name of the given surface or an empty string if no surface is set | ||
350 | 61 | */ | ||
351 | 62 | Q_PROPERTY(QString name READ name CONSTANT) | ||
352 | 63 | |||
353 | 64 | /** | ||
354 | 65 | * @brief True if the item has a surface and that surface has a mir client bound to it. | ||
355 | 66 | * A "zombie" (live == false) surface never becomes alive again. | ||
356 | 67 | */ | ||
357 | 68 | Q_PROPERTY(bool live READ live NOTIFY liveChanged) | ||
358 | 69 | |||
359 | 70 | /** | ||
360 | 71 | * @brief Orientation angle of the given surface | ||
361 | 72 | * | ||
362 | 73 | * How many degrees, clockwise, the UI in the surface has to rotate to match shell's UI orientation | ||
363 | 74 | */ | ||
364 | 75 | Q_PROPERTY(Mir::OrientationAngle orientationAngle READ orientationAngle WRITE setOrientationAngle | ||
365 | 76 | NOTIFY orientationAngleChanged DESIGNABLE false) | ||
366 | 77 | |||
367 | 78 | |||
368 | 79 | /** | ||
369 | 80 | * @brief Whether the item will forward activeFocus, touch events, mouse events and key events to its surface. | ||
370 | 81 | * It's false by default. | ||
371 | 82 | * Only one item should have this property enabled for a given surface. | ||
372 | 83 | */ | ||
373 | 84 | Q_PROPERTY(bool consumesInput READ consumesInput | ||
374 | 85 | WRITE setConsumesInput | ||
375 | 86 | NOTIFY consumesInputChanged) | ||
376 | 87 | |||
377 | 88 | /** | ||
378 | 89 | * @brief The desired width for the contained MirSurface. | ||
379 | 90 | * It's ignored if set to zero or a negative number | ||
380 | 91 | * The default value is zero | ||
381 | 92 | */ | ||
382 | 93 | Q_PROPERTY(int surfaceWidth READ surfaceWidth | ||
383 | 94 | WRITE setSurfaceWidth | ||
384 | 95 | NOTIFY surfaceWidthChanged) | ||
385 | 96 | |||
386 | 97 | /** | ||
387 | 98 | * @brief The desired height for the contained MirSurface. | ||
388 | 99 | * It's ignored if set to zero or a negative number | ||
389 | 100 | * The default value is zero | ||
390 | 101 | */ | ||
391 | 102 | Q_PROPERTY(int surfaceHeight READ surfaceHeight | ||
392 | 103 | WRITE setSurfaceHeight | ||
393 | 104 | NOTIFY surfaceHeightChanged) | ||
394 | 105 | |||
395 | 106 | public: | ||
396 | 107 | /// @cond | ||
397 | 108 | MirSurfaceItemInterface(QQuickItem *parent = 0) : QQuickItem(parent) {} | ||
398 | 109 | virtual ~MirSurfaceItemInterface() {} | ||
399 | 110 | |||
400 | 111 | virtual Mir::Type type() const = 0; | ||
401 | 112 | virtual QString name() const = 0; | ||
402 | 113 | virtual bool live() const = 0; | ||
403 | 114 | |||
404 | 115 | virtual Mir::State surfaceState() const = 0; | ||
405 | 116 | virtual void setSurfaceState(Mir::State) = 0; | ||
406 | 117 | |||
407 | 118 | virtual Mir::OrientationAngle orientationAngle() const = 0; | ||
408 | 119 | virtual void setOrientationAngle(Mir::OrientationAngle angle) = 0; | ||
409 | 120 | |||
410 | 121 | virtual MirSurfaceInterface* surface() const = 0; | ||
411 | 122 | virtual void setSurface(MirSurfaceInterface*) = 0; | ||
412 | 123 | |||
413 | 124 | virtual bool consumesInput() const = 0; | ||
414 | 125 | virtual void setConsumesInput(bool value) = 0; | ||
415 | 126 | |||
416 | 127 | virtual int surfaceWidth() const = 0; | ||
417 | 128 | virtual void setSurfaceWidth(int value) = 0; | ||
418 | 129 | |||
419 | 130 | virtual int surfaceHeight() const = 0; | ||
420 | 131 | virtual void setSurfaceHeight(int value) = 0; | ||
421 | 132 | /// @endcond | ||
422 | 133 | |||
423 | 134 | Q_SIGNALS: | ||
424 | 135 | /// @cond | ||
425 | 136 | void typeChanged(Mir::Type); | ||
426 | 137 | void surfaceStateChanged(Mir::State); | ||
427 | 138 | void liveChanged(bool live); | ||
428 | 139 | void orientationAngleChanged(Mir::OrientationAngle angle); | ||
429 | 140 | void surfaceChanged(MirSurfaceInterface*); | ||
430 | 141 | void consumesInputChanged(bool value); | ||
431 | 142 | void surfaceWidthChanged(int value); | ||
432 | 143 | void surfaceHeightChanged(int value); | ||
433 | 144 | /// @endcond | ||
434 | 145 | }; | ||
435 | 146 | |||
436 | 147 | } // namespace application | ||
437 | 148 | } // namespace shell | ||
438 | 149 | } // namespace unity | ||
439 | 150 | |||
440 | 151 | #endif // UNITY_SHELL_APPLICATION_MIRSURFACEITEM_H | ||
441 | 0 | 152 | ||
442 | === modified file 'include/unity/shell/scopes/CMakeLists.txt' | |||
443 | --- include/unity/shell/scopes/CMakeLists.txt 2015-02-04 17:24:55 +0000 | |||
444 | +++ include/unity/shell/scopes/CMakeLists.txt 2015-08-13 10:55:16 +0000 | |||
445 | @@ -7,7 +7,7 @@ | |||
446 | 7 | 7 | ||
447 | 8 | set(UNITY_API_LIB_HDRS ${UNITY_API_LIB_HDRS} ${headers} ${internal_headers} PARENT_SCOPE) | 8 | set(UNITY_API_LIB_HDRS ${UNITY_API_LIB_HDRS} ${headers} ${internal_headers} PARENT_SCOPE) |
448 | 9 | 9 | ||
450 | 10 | set(VERSION 6) | 10 | set(VERSION 7) |
451 | 11 | set(PKGCONFIG_NAME "unity-shell-scopes") | 11 | set(PKGCONFIG_NAME "unity-shell-scopes") |
452 | 12 | set(PKGCONFIG_DESCRIPTION "Unity shell Scopes APIs") | 12 | set(PKGCONFIG_DESCRIPTION "Unity shell Scopes APIs") |
453 | 13 | set(PKGCONFIG_REQUIRES "Qt5Core") | 13 | set(PKGCONFIG_REQUIRES "Qt5Core") |
454 | 14 | 14 | ||
455 | === modified file 'include/unity/shell/scopes/ScopeInterface.h' | |||
456 | --- include/unity/shell/scopes/ScopeInterface.h 2014-08-04 15:59:13 +0000 | |||
457 | +++ include/unity/shell/scopes/ScopeInterface.h 2015-08-13 10:55:16 +0000 | |||
458 | @@ -198,7 +198,7 @@ | |||
459 | 198 | /** | 198 | /** |
460 | 199 | * @brief Method used to activate a result. | 199 | * @brief Method used to activate a result. |
461 | 200 | */ | 200 | */ |
463 | 201 | Q_INVOKABLE virtual void activate(QVariant const& result) = 0; | 201 | Q_INVOKABLE virtual void activate(QVariant const& result, QString const& categoryId) = 0; |
464 | 202 | 202 | ||
465 | 203 | /** | 203 | /** |
466 | 204 | * @brief Method used to preview a result. | 204 | * @brief Method used to preview a result. |
467 | @@ -206,7 +206,7 @@ | |||
468 | 206 | * Returns a new PreviewStackInterface instance. It's caller's responsibility | 206 | * Returns a new PreviewStackInterface instance. It's caller's responsibility |
469 | 207 | * to free it. | 207 | * to free it. |
470 | 208 | */ | 208 | */ |
472 | 209 | Q_INVOKABLE virtual unity::shell::scopes::PreviewStackInterface* preview(QVariant const& result) = 0; | 209 | Q_INVOKABLE virtual unity::shell::scopes::PreviewStackInterface* preview(QVariant const& result, QString const& categoryId) = 0; |
473 | 210 | 210 | ||
474 | 211 | /** | 211 | /** |
475 | 212 | * @brief Cancels the current activation. | 212 | * @brief Cancels the current activation. |
476 | 213 | 213 | ||
477 | === modified file 'test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScope.cpp' | |||
478 | --- test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScope.cpp 2014-08-04 15:59:13 +0000 | |||
479 | +++ test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScope.cpp 2015-08-13 10:55:16 +0000 | |||
480 | @@ -159,14 +159,16 @@ | |||
481 | 159 | } | 159 | } |
482 | 160 | } | 160 | } |
483 | 161 | 161 | ||
485 | 162 | void MockScope::activate(QVariant const& result) | 162 | void MockScope::activate(QVariant const& result, QString const& categoryId) |
486 | 163 | { | 163 | { |
487 | 164 | Q_UNUSED(result); | 164 | Q_UNUSED(result); |
488 | 165 | Q_UNUSED(categoryId); | ||
489 | 165 | } | 166 | } |
490 | 166 | 167 | ||
492 | 167 | unity::shell::scopes::PreviewStackInterface* MockScope::preview(QVariant const& result) | 168 | unity::shell::scopes::PreviewStackInterface* MockScope::preview(QVariant const& result, QString const& categoryId) |
493 | 168 | { | 169 | { |
494 | 169 | Q_UNUSED(result); | 170 | Q_UNUSED(result); |
495 | 171 | Q_UNUSED(categoryId); | ||
496 | 170 | 172 | ||
497 | 171 | // This probably leaks, do we don't care | 173 | // This probably leaks, do we don't care |
498 | 172 | // it's a test after all | 174 | // it's a test after all |
499 | 173 | 175 | ||
500 | === modified file 'test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScope.h' | |||
501 | --- test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScope.h 2014-08-04 15:59:13 +0000 | |||
502 | +++ test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScope.h 2015-08-13 10:55:16 +0000 | |||
503 | @@ -57,8 +57,8 @@ | |||
504 | 57 | void setActive(const bool) override; | 57 | void setActive(const bool) override; |
505 | 58 | void setFavorite(const bool) override; | 58 | void setFavorite(const bool) override; |
506 | 59 | 59 | ||
509 | 60 | Q_INVOKABLE void activate(QVariant const& result) override; | 60 | Q_INVOKABLE void activate(QVariant const& result, QString const& categoryId) override; |
510 | 61 | Q_INVOKABLE unity::shell::scopes::PreviewStackInterface* preview(QVariant const& result) override; | 61 | Q_INVOKABLE unity::shell::scopes::PreviewStackInterface* preview(QVariant const& result, QString const& categoryId) override; |
511 | 62 | Q_INVOKABLE void cancelActivation() override; | 62 | Q_INVOKABLE void cancelActivation() override; |
512 | 63 | Q_INVOKABLE void closeScope(unity::shell::scopes::ScopeInterface* scope) override; | 63 | Q_INVOKABLE void closeScope(unity::shell::scopes::ScopeInterface* scope) override; |
513 | 64 | Q_INVOKABLE unity::shell::scopes::NavigationInterface* getNavigation(QString const& departmentId) override; | 64 | Q_INVOKABLE unity::shell::scopes::NavigationInterface* getNavigation(QString const& departmentId) override; |
514 | 65 | 65 | ||
515 | === modified file 'test/qmltest/unity/shell/scopes/tst_Scopes.qml' | |||
516 | --- test/qmltest/unity/shell/scopes/tst_Scopes.qml 2014-08-04 15:59:13 +0000 | |||
517 | +++ test/qmltest/unity/shell/scopes/tst_Scopes.qml 2015-08-13 10:55:16 +0000 | |||
518 | @@ -27,7 +27,7 @@ | |||
519 | 27 | id: scopes | 27 | id: scopes |
520 | 28 | } | 28 | } |
521 | 29 | property var scope: scopes.getScope(0) | 29 | property var scope: scopes.getScope(0) |
523 | 30 | property var preview: root.scope.preview("") | 30 | property var preview: root.scope.preview("", "") |
524 | 31 | property var navigation: root.scope.getNavigation("root") | 31 | property var navigation: root.scope.getNavigation("root") |
525 | 32 | 32 | ||
526 | 33 | Verifier { | 33 | Verifier { |