Merge lp:~nick-dedekind/unity-api/workspaces into lp:unity-api

Proposed by Nick Dedekind
Status: Work in progress
Proposed branch: lp:~nick-dedekind/unity-api/workspaces
Merge into: lp:unity-api
Diff against target: 144 lines (+47/-26)
5 files modified
debian/changelog (+7/-0)
include/unity/shell/application/CMakeLists.txt (+3/-0)
include/unity/shell/application/MirMousePointerInterface.h (+2/-23)
include/unity/shell/application/MirPlatformCursor.h (+8/-3)
include/unity/shell/application/SurfaceManagerInterface.h (+27/-0)
To merge this branch: bzr merge lp:~nick-dedekind/unity-api/workspaces
Reviewer Review Type Date Requested Status
Unity Team Pending
Review via email: mp+318467@code.launchpad.net

Commit message

Added Surface Manager signals and surfaceFor(window)

Description of the change

Added Surface Manager signals and surfaceFor(window)

To post a comment you must log in.
250. By Nick Dedekind

merged parent

251. By Nick Dedekind

merged with parent

252. By Nick Dedekind

added include

253. By Nick Dedekind

renamed signal

254. By Nick Dedekind

const

255. By Nick Dedekind

more SurfaceManagerInterface api

256. By Nick Dedekind

merged parent

257. By Nick Dedekind

merged pre-req

Unmerged revisions

257. By Nick Dedekind

merged pre-req

256. By Nick Dedekind

merged parent

255. By Nick Dedekind

more SurfaceManagerInterface api

254. By Nick Dedekind

const

253. By Nick Dedekind

renamed signal

252. By Nick Dedekind

added include

251. By Nick Dedekind

merged with parent

250. By Nick Dedekind

merged parent

249. By Nick Dedekind

SurfaceManager functions for Workspaces

248. By Nick Dedekind

merged parent

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2017-03-17 11:08:20 +0000
+++ debian/changelog 2017-04-05 11:27:14 +0000
@@ -1,3 +1,10 @@
1unity-api (8.7ubuntu2) UNRELEASED; urgency=medium
2
3 [ Nick Dedekind ]
4 * MirPlatformCursor - updates for multi-screen.
5
6 -- Nick Dedekind <nick.dedekind@canonical.com> Wed, 05 Apr 2017 12:26:08 +0100
7
1unity-api (8.6+17.04.20170317-0ubuntu1) zesty; urgency=medium8unity-api (8.6+17.04.20170317-0ubuntu1) zesty; urgency=medium
29
3 [ Michael Zanetti ]10 [ Michael Zanetti ]
411
=== modified file 'include/unity/shell/application/CMakeLists.txt'
--- include/unity/shell/application/CMakeLists.txt 2017-03-17 11:07:57 +0000
+++ include/unity/shell/application/CMakeLists.txt 2017-04-05 11:27:14 +0000
@@ -3,6 +3,9 @@
3file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h")3file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
4file(GLOB internal_headers "${CMAKE_CURRENT_SOURCE_DIR}/internal/*.h")4file(GLOB internal_headers "${CMAKE_CURRENT_SOURCE_DIR}/internal/*.h")
55
6add_custom_target(appheaders
7 SOURCES ${headers} ${internal_headers})
8
6install(FILES ${headers} DESTINATION ${INCLUDE_INSTALL_DIR})9install(FILES ${headers} DESTINATION ${INCLUDE_INSTALL_DIR})
710
8set(UNITY_API_LIB_HDRS ${UNITY_API_LIB_HDRS} ${headers} ${internal_headers} PARENT_SCOPE)11set(UNITY_API_LIB_HDRS ${UNITY_API_LIB_HDRS} ${headers} ${internal_headers} PARENT_SCOPE)
912
=== modified file 'include/unity/shell/application/MirMousePointerInterface.h'
--- include/unity/shell/application/MirMousePointerInterface.h 2016-05-18 20:51:23 +0000
+++ include/unity/shell/application/MirMousePointerInterface.h 2017-04-05 11:27:14 +0000
@@ -54,6 +54,8 @@
5454
55 virtual void setThemeName(const QString &themeName) = 0;55 virtual void setThemeName(const QString &themeName) = 0;
56 virtual QString themeName() const = 0;56 virtual QString themeName() const = 0;
57
58 virtual void moveTo(const QPoint& position) = 0;
57 /// @endcond59 /// @endcond
5860
59 /**61 /**
@@ -70,29 +72,6 @@
70 void cursorNameChanged(QString name);72 void cursorNameChanged(QString name);
71 void themeNameChanged(QString name);73 void themeNameChanged(QString name);
72 /// @endcond74 /// @endcond
73
74public Q_SLOTS:
75 /**
76 * @brief Handler for Mir mouse events
77 * The implementation should respond to Mir mouse events by moving itself along its parent
78 * area.
79 * This is called by Mir's platform cursor.
80 *
81 * Note that we get only relative mouse movement, since the mouse pointer position is defined
82 * by this very item. Ie., it's up to this class to decide whether or not it (the mouse pointer)
83 * should move (and how much) due to movement in a mouse device.
84 *
85 * @param movement Movement vector
86 */
87 virtual void handleMouseEvent(ulong timestamp, QPointF movement, Qt::MouseButtons buttons,
88 Qt::KeyboardModifiers modifiers) = 0;
89
90 /**
91 * @brief Handler for Mir mouse wheel events
92 * This is called by Mir's platform cursor.
93 */
94 virtual void handleWheelEvent(ulong timestamp, QPoint angleDelta, Qt::KeyboardModifiers modifiers) = 0;
95
96};75};
9776
98#endif // MIR_MOUSE_POINTER_INTERFACE_H77#endif // MIR_MOUSE_POINTER_INTERFACE_H
9978
=== modified file 'include/unity/shell/application/MirPlatformCursor.h'
--- include/unity/shell/application/MirPlatformCursor.h 2015-09-18 16:00:09 +0000
+++ include/unity/shell/application/MirPlatformCursor.h 2017-04-05 11:27:14 +0000
@@ -30,9 +30,14 @@
30{30{
31public:31public:
32 /**32 /**
33 * @brief Set the QML mouse pointer that this platform cursor will talk to33 * @brief Register a mouse pointer that this platform cursor will talk to
34 */34 */
35 virtual void setMousePointer(MirMousePointerInterface *mousePointer) = 0;35 virtual void registerMousePointer(MirMousePointerInterface *mousePointer) = 0;
36
37 /**
38 * @brief Unregister a mouse pointer that this platform cursor will talk to
39 */
40 virtual void unregisterMousePointer(MirMousePointerInterface *mousePointer) = 0;
36};41};
3742
38#endif // MIR_PLATFORM_CURSOR_H43#endif // MIR_PLATFORM_CURSOR_H
3944
=== modified file 'include/unity/shell/application/SurfaceManagerInterface.h'
--- include/unity/shell/application/SurfaceManagerInterface.h 2016-12-23 15:58:30 +0000
+++ include/unity/shell/application/SurfaceManagerInterface.h 2017-04-05 11:27:14 +0000
@@ -17,9 +17,18 @@
17#ifndef UNITY_SHELL_APPLICATION_SURFACEMANAGERINTERFACE_H17#ifndef UNITY_SHELL_APPLICATION_SURFACEMANAGERINTERFACE_H
18#define UNITY_SHELL_APPLICATION_SURFACEMANAGERINTERFACE_H18#define UNITY_SHELL_APPLICATION_SURFACEMANAGERINTERFACE_H
1919
20#include "Mir.h"
21
20#include <QObject>22#include <QObject>
21#include <QVector>23#include <QVector>
2224
25#include <memory>
26
27namespace miral {
28class Window;
29class Workspace;
30}
31
23namespace unity {32namespace unity {
24namespace shell {33namespace shell {
25namespace application {34namespace application {
@@ -36,9 +45,27 @@
36 virtual void raise(MirSurfaceInterface *surface) = 0;45 virtual void raise(MirSurfaceInterface *surface) = 0;
37 virtual void activate(MirSurfaceInterface *surface) = 0;46 virtual void activate(MirSurfaceInterface *surface) = 0;
3847
48 virtual void forEachSurfaceInWorkspace(const std::shared_ptr<miral::Workspace> &workspace,
49 const std::function<void(unity::shell::application::MirSurfaceInterface*)> &callback) = 0;
50 virtual void moveSurfaceToWorkspace(unity::shell::application::MirSurfaceInterface* surface,
51 const std::shared_ptr<miral::Workspace> &workspace) = 0;
52 virtual void moveWorkspaceContentToWorkspace(const std::shared_ptr<miral::Workspace> &to,
53 const std::shared_ptr<miral::Workspace> &from) = 0;
54
39Q_SIGNALS:55Q_SIGNALS:
40 void surfaceCreated(unity::shell::application::MirSurfaceInterface *surface);56 void surfaceCreated(unity::shell::application::MirSurfaceInterface *surface);
57 void surfaceRemoved(unity::shell::application::MirSurfaceInterface *surface);
58 void surfaceReady(unity::shell::application::MirSurfaceInterface *surface);
59 void surfaceMoved(unity::shell::application::MirSurfaceInterface *surface, const QPoint &topLeft);
60 void surfaceResized(unity::shell::application::MirSurfaceInterface *surface, const QSize &size);
61 void surfaceStateChanged(unity::shell::application::MirSurfaceInterface *surface, Mir::State state);
62 void surfaceFocusChanged(unity::shell::application::MirSurfaceInterface *surface, bool focused);
41 void surfacesRaised(const QVector<unity::shell::application::MirSurfaceInterface*> &surfaces);63 void surfacesRaised(const QVector<unity::shell::application::MirSurfaceInterface*> &surfaces);
64 void surfaceRequestedRaise(unity::shell::application::MirSurfaceInterface *surface);
65 void surfacesAddedToWorkspace(const std::shared_ptr<miral::Workspace> &workspace,
66 const QVector<unity::shell::application::MirSurfaceInterface*> &surfaces);
67 void surfacesAboutToBeRemovedFromWorkspace(const std::shared_ptr<miral::Workspace> &workspace,
68 const QVector<unity::shell::application::MirSurfaceInterface*> &surfaces);
42 void modificationsStarted();69 void modificationsStarted();
43 void modificationsEnded();70 void modificationsEnded();
44};71};

Subscribers

People subscribed via source and target branches

to all changes: