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
1=== modified file 'debian/changelog'
2--- debian/changelog 2017-03-17 11:08:20 +0000
3+++ debian/changelog 2017-04-05 11:27:14 +0000
4@@ -1,3 +1,10 @@
5+unity-api (8.7ubuntu2) UNRELEASED; urgency=medium
6+
7+ [ Nick Dedekind ]
8+ * MirPlatformCursor - updates for multi-screen.
9+
10+ -- Nick Dedekind <nick.dedekind@canonical.com> Wed, 05 Apr 2017 12:26:08 +0100
11+
12 unity-api (8.6+17.04.20170317-0ubuntu1) zesty; urgency=medium
13
14 [ Michael Zanetti ]
15
16=== modified file 'include/unity/shell/application/CMakeLists.txt'
17--- include/unity/shell/application/CMakeLists.txt 2017-03-17 11:07:57 +0000
18+++ include/unity/shell/application/CMakeLists.txt 2017-04-05 11:27:14 +0000
19@@ -3,6 +3,9 @@
20 file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
21 file(GLOB internal_headers "${CMAKE_CURRENT_SOURCE_DIR}/internal/*.h")
22
23+add_custom_target(appheaders
24+ SOURCES ${headers} ${internal_headers})
25+
26 install(FILES ${headers} DESTINATION ${INCLUDE_INSTALL_DIR})
27
28 set(UNITY_API_LIB_HDRS ${UNITY_API_LIB_HDRS} ${headers} ${internal_headers} PARENT_SCOPE)
29
30=== modified file 'include/unity/shell/application/MirMousePointerInterface.h'
31--- include/unity/shell/application/MirMousePointerInterface.h 2016-05-18 20:51:23 +0000
32+++ include/unity/shell/application/MirMousePointerInterface.h 2017-04-05 11:27:14 +0000
33@@ -54,6 +54,8 @@
34
35 virtual void setThemeName(const QString &themeName) = 0;
36 virtual QString themeName() const = 0;
37+
38+ virtual void moveTo(const QPoint& position) = 0;
39 /// @endcond
40
41 /**
42@@ -70,29 +72,6 @@
43 void cursorNameChanged(QString name);
44 void themeNameChanged(QString name);
45 /// @endcond
46-
47-public Q_SLOTS:
48- /**
49- * @brief Handler for Mir mouse events
50- * The implementation should respond to Mir mouse events by moving itself along its parent
51- * area.
52- * This is called by Mir's platform cursor.
53- *
54- * Note that we get only relative mouse movement, since the mouse pointer position is defined
55- * by this very item. Ie., it's up to this class to decide whether or not it (the mouse pointer)
56- * should move (and how much) due to movement in a mouse device.
57- *
58- * @param movement Movement vector
59- */
60- virtual void handleMouseEvent(ulong timestamp, QPointF movement, Qt::MouseButtons buttons,
61- Qt::KeyboardModifiers modifiers) = 0;
62-
63- /**
64- * @brief Handler for Mir mouse wheel events
65- * This is called by Mir's platform cursor.
66- */
67- virtual void handleWheelEvent(ulong timestamp, QPoint angleDelta, Qt::KeyboardModifiers modifiers) = 0;
68-
69 };
70
71 #endif // MIR_MOUSE_POINTER_INTERFACE_H
72
73=== modified file 'include/unity/shell/application/MirPlatformCursor.h'
74--- include/unity/shell/application/MirPlatformCursor.h 2015-09-18 16:00:09 +0000
75+++ include/unity/shell/application/MirPlatformCursor.h 2017-04-05 11:27:14 +0000
76@@ -30,9 +30,14 @@
77 {
78 public:
79 /**
80- * @brief Set the QML mouse pointer that this platform cursor will talk to
81- */
82- virtual void setMousePointer(MirMousePointerInterface *mousePointer) = 0;
83+ * @brief Register a mouse pointer that this platform cursor will talk to
84+ */
85+ virtual void registerMousePointer(MirMousePointerInterface *mousePointer) = 0;
86+
87+ /**
88+ * @brief Unregister a mouse pointer that this platform cursor will talk to
89+ */
90+ virtual void unregisterMousePointer(MirMousePointerInterface *mousePointer) = 0;
91 };
92
93 #endif // MIR_PLATFORM_CURSOR_H
94
95=== modified file 'include/unity/shell/application/SurfaceManagerInterface.h'
96--- include/unity/shell/application/SurfaceManagerInterface.h 2016-12-23 15:58:30 +0000
97+++ include/unity/shell/application/SurfaceManagerInterface.h 2017-04-05 11:27:14 +0000
98@@ -17,9 +17,18 @@
99 #ifndef UNITY_SHELL_APPLICATION_SURFACEMANAGERINTERFACE_H
100 #define UNITY_SHELL_APPLICATION_SURFACEMANAGERINTERFACE_H
101
102+#include "Mir.h"
103+
104 #include <QObject>
105 #include <QVector>
106
107+#include <memory>
108+
109+namespace miral {
110+class Window;
111+class Workspace;
112+}
113+
114 namespace unity {
115 namespace shell {
116 namespace application {
117@@ -36,9 +45,27 @@
118 virtual void raise(MirSurfaceInterface *surface) = 0;
119 virtual void activate(MirSurfaceInterface *surface) = 0;
120
121+ virtual void forEachSurfaceInWorkspace(const std::shared_ptr<miral::Workspace> &workspace,
122+ const std::function<void(unity::shell::application::MirSurfaceInterface*)> &callback) = 0;
123+ virtual void moveSurfaceToWorkspace(unity::shell::application::MirSurfaceInterface* surface,
124+ const std::shared_ptr<miral::Workspace> &workspace) = 0;
125+ virtual void moveWorkspaceContentToWorkspace(const std::shared_ptr<miral::Workspace> &to,
126+ const std::shared_ptr<miral::Workspace> &from) = 0;
127+
128 Q_SIGNALS:
129 void surfaceCreated(unity::shell::application::MirSurfaceInterface *surface);
130+ void surfaceRemoved(unity::shell::application::MirSurfaceInterface *surface);
131+ void surfaceReady(unity::shell::application::MirSurfaceInterface *surface);
132+ void surfaceMoved(unity::shell::application::MirSurfaceInterface *surface, const QPoint &topLeft);
133+ void surfaceResized(unity::shell::application::MirSurfaceInterface *surface, const QSize &size);
134+ void surfaceStateChanged(unity::shell::application::MirSurfaceInterface *surface, Mir::State state);
135+ void surfaceFocusChanged(unity::shell::application::MirSurfaceInterface *surface, bool focused);
136 void surfacesRaised(const QVector<unity::shell::application::MirSurfaceInterface*> &surfaces);
137+ void surfaceRequestedRaise(unity::shell::application::MirSurfaceInterface *surface);
138+ void surfacesAddedToWorkspace(const std::shared_ptr<miral::Workspace> &workspace,
139+ const QVector<unity::shell::application::MirSurfaceInterface*> &surfaces);
140+ void surfacesAboutToBeRemovedFromWorkspace(const std::shared_ptr<miral::Workspace> &workspace,
141+ const QVector<unity::shell::application::MirSurfaceInterface*> &surfaces);
142 void modificationsStarted();
143 void modificationsEnded();
144 };

Subscribers

People subscribed via source and target branches

to all changes: