Merge lp:~dandrader/platform-api/window_get_size into lp:platform-api

Proposed by Daniel d'Andrada
Status: Superseded
Proposed branch: lp:~dandrader/platform-api/window_get_size
Merge into: lp:platform-api
Diff against target: 93 lines (+33/-1)
6 files modified
CMakeLists.txt (+1/-1)
debian/changelog (+6/-0)
include/ubuntu/application/ui/window.h (+6/-0)
src/ubuntu/mirclient/ubuntu_application_api_mirclient.cpp (+10/-0)
src/ubuntu/mirclient/window_mirclient.cpp (+8/-0)
src/ubuntu/mirclient/window_mirclient_priv.h (+2/-0)
To merge this branch: bzr merge lp:~dandrader/platform-api/window_get_size
Reviewer Review Type Date Requested Status
Gerry Boland (community) Needs Fixing
PS Jenkins bot continuous-integration Approve
Review via email: mp+216156@code.launchpad.net

This proposal has been superseded by a proposal from 2014-05-02.

Commit message

Add ua_ui_window_get_size()

Description of the change

Pretty harmless change. Just exposes a bit more of mir functionalities.

Needed for the "qt as mir compositor" work.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Gerry Boland (gerboland) wrote :

Since is API change, need to bump the package version.
Checklist please
Code change fine tho

review: Needs Fixing
Revision history for this message
Gerry Boland (gerboland) wrote :

dpkg-gensymbols: warning: some new symbols appeared in the symbols file: see diff output below
dpkg-gensymbols: warning: debian/libubuntu-application-api1/DEBIAN/symbols doesn't match completely debian/libubuntu-application-api1.symbols

You need to update the symbols file too

Revision history for this message
Gerry Boland (gerboland) wrote :

> Since is API change, need to bump the package version.
A better solution is to retarget this MR to lp:platform-api/devel
We'll bump the package version when promoting to trunk

212. By kevin gunn

merge from trunk

213. By Daniel d'Andrada

Added ua_ui_window_get_size()

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2014-03-31 17:59:47 +0000
3+++ CMakeLists.txt 2014-04-17 14:18:01 +0000
4@@ -3,7 +3,7 @@
5 project(ubuntu-platform-api)
6
7 set(UBUNTU_PLATFORM_API_VERSION_MAJOR 1)
8-set(UBUNTU_PLATFORM_API_VERSION_MINOR 0)
9+set(UBUNTU_PLATFORM_API_VERSION_MINOR 1)
10 set(UBUNTU_PLATFORM_API_VERSION_PATCH 0)
11
12 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
13
14=== modified file 'debian/changelog'
15--- debian/changelog 2014-04-11 21:09:05 +0000
16+++ debian/changelog 2014-04-17 14:18:01 +0000
17@@ -1,3 +1,9 @@
18+platform-api (0.21-0ubuntu1) trusty; urgency=medium
19+
20+ * Added ua_ui_window_get_size()
21+
22+ -- Daniel d'Andrada <daniel.dandrada@canonical.com> Thu, 17 Apr 2014 11:14:41 -0300
23+
24 platform-api (0.20+14.04.20140411-0ubuntu1) trusty; urgency=low
25
26 [ Gerry Boland ]
27
28=== modified file 'include/ubuntu/application/ui/window.h'
29--- include/ubuntu/application/ui/window.h 2013-08-22 06:32:14 +0000
30+++ include/ubuntu/application/ui/window.h 2014-04-17 14:18:01 +0000
31@@ -48,6 +48,12 @@
32 ua_ui_window_get_id(
33 UAUiWindow *window);
34
35+ UBUNTU_DLL_PUBLIC void
36+ ua_ui_window_get_size(
37+ UAUiWindow *window,
38+ uint32_t *width,
39+ uint32_t *height);
40+
41 UBUNTU_DLL_PUBLIC UStatus
42 ua_ui_window_move(
43 UAUiWindow *window,
44
45=== modified file 'src/ubuntu/mirclient/ubuntu_application_api_mirclient.cpp'
46--- src/ubuntu/mirclient/ubuntu_application_api_mirclient.cpp 2014-02-07 14:32:44 +0000
47+++ src/ubuntu/mirclient/ubuntu_application_api_mirclient.cpp 2014-04-17 14:18:01 +0000
48@@ -311,6 +311,16 @@
49 delete window;
50 }
51
52+void
53+ua_ui_window_get_size(
54+ UAUiWindow *u_window,
55+ uint32_t *width,
56+ uint32_t *height)
57+{
58+ auto window = uamc::Window::from_u_window(u_window);
59+ window->get_size(width, height);
60+}
61+
62 UStatus ua_ui_window_move(UAUiWindow* u_window, uint32_t x, uint32_t y)
63 {
64 // TODO<papi,mir>: Implement. Assuming this should exist on mirclient?
65
66=== modified file 'src/ubuntu/mirclient/window_mirclient.cpp'
67--- src/ubuntu/mirclient/window_mirclient.cpp 2013-10-14 21:22:49 +0000
68+++ src/ubuntu/mirclient/window_mirclient.cpp 2014-04-17 14:18:01 +0000
69@@ -146,3 +146,11 @@
70 {
71 mir_surface_set_state(surface.get(), static_cast<MirSurfaceState>(state));
72 }
73+
74+void uamc::Window::get_size(uint32_t *width, uint32_t *height)
75+{
76+ MirSurfaceParameters parameters;
77+ mir_surface_get_parameters(surface.get(), &parameters);
78+ *width = parameters.width;
79+ *height = parameters.height;
80+}
81
82=== modified file 'src/ubuntu/mirclient/window_mirclient_priv.h'
83--- src/ubuntu/mirclient/window_mirclient_priv.h 2013-10-08 19:35:03 +0000
84+++ src/ubuntu/mirclient/window_mirclient_priv.h 2014-04-17 14:18:01 +0000
85@@ -57,6 +57,8 @@
86 UApplicationUiWindowState state() const;
87 void set_state(const UApplicationUiWindowState);
88
89+ void get_size(uint32_t *width, uint32_t *height);
90+
91 protected:
92 Window(Window const&) = delete;
93 Window& operator=(Window const&) = delete;

Subscribers

People subscribed via source and target branches