Merge lp:~mir-team/platform-api/remove-mirserver into lp:platform-api
- remove-mirserver
- Merge into trunk
Status: | Superseded |
---|---|
Proposed branch: | lp:~mir-team/platform-api/remove-mirserver |
Merge into: | lp:platform-api |
Diff against target: |
1276 lines (+25/-1021) 24 files modified
CMakeLists.txt (+2/-3) debian/changelog (+6/-0) debian/control (+0/-1) debian/ubuntu-application-api2-desktop.install (+0/-1) debian/ubuntu-application-api2-touch.install (+0/-1) src/ubuntu/application/base_module.h (+2/-2) src/ubuntu/application/common/CMakeLists.txt (+0/-2) src/ubuntu/application/common/mirclient/CMakeLists.txt (+6/-0) src/ubuntu/application/common/mirclient/ubuntu_application_api_mirclient.cpp (+2/-2) src/ubuntu/application/common/mirclient/window_mirclient.cpp (+1/-1) src/ubuntu/application/common/mircommon/CMakeLists.txt (+0/-25) src/ubuntu/application/common/mirserver/CMakeLists.txt (+0/-24) src/ubuntu/application/common/mirserver/application_instance_mirserver.cpp (+0/-123) src/ubuntu/application/common/mirserver/application_instance_mirserver_priv.h (+0/-89) src/ubuntu/application/common/mirserver/ubuntu_application_api_mirserver.cpp (+0/-351) src/ubuntu/application/common/mirserver/window_mirserver.cpp (+0/-85) src/ubuntu/application/common/mirserver/window_mirserver_priv.h (+0/-92) src/ubuntu/application/common/mirserver/window_properties_mirserver.cpp (+0/-77) src/ubuntu/application/common/mirserver/window_properties_mirserver_priv.h (+0/-70) src/ubuntu/application/desktop/CMakeLists.txt (+0/-33) src/ubuntu/application/desktop/module_version.h (+2/-2) src/ubuntu/application/testbackend/module_version.h (+2/-2) src/ubuntu/application/touch/CMakeLists.txt (+0/-33) src/ubuntu/application/touch/module_version.h (+2/-2) |
To merge this branch: | bzr merge lp:~mir-team/platform-api/remove-mirserver |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gerry Boland (community) | Needs Fixing | ||
Kevin DuBois (community) | Approve | ||
Alan Griffiths | Approve | ||
PS Jenkins bot | continuous-integration | Approve | |
Review via email: mp+240801@code.launchpad.net |
This proposal has been superseded by a proposal from 2015-06-18.
Commit message
Remove the unused mirserver component
Description of the change
Remove the unused mirserver component
PS Jenkins bot (ps-jenkins) wrote : | # |
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:266
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Gerry Boland (gerboland) wrote : | # |
Lots of red, nice :)
armhf CI fail appears unrelated:
1/1 Test #1: test_ua_
unsure how this change impacted it.
Since you're removing a feature from the library, think we'd better bump the version numbers.
Alberto Aguirre (albaguirre) wrote : | # |
@Gerry,
Oh true, it merits a version bump.
CI now passed.
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:267
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Gerry Boland (gerboland) wrote : | # |
Please update the lib versions in CMakeLists.txt to match the debian version. Also these should match:
src/ubuntu/
src/ubuntu/
src/ubuntu/
src/ubuntu/
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:268
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:268
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Kevin DuBois (kdub) wrote : | # |
I had a branch of similar nature, this one looks good by me.
Alberto Aguirre (albaguirre) wrote : | # |
@Kevin, IT IS your branch :) (see r265)
Gerry Boland (gerboland) wrote : | # |
Delayed, but finally getting to test this.
First off, I'm having to rebuild qtubuntu to have it work with this. I wasn't expecting an ABI change due to this MR. Expected?
Now I'm getting
Ubuntu Platform API: Unable to load selected module. -- Aborting
and adding dlerror() I get:
libubuntu_
Not sure where that version 2 is coming from, as you building v3.
Just bumping the so versions isn't enough sadly, as the debian packaging specifies version 2 everywhere. You either need to bump all the packaging to version 3 (and hit everything that depends on version 2) or else just make this a minor version bump.
Alberto Aguirre (albaguirre) wrote : | # |
@Gerry,
Yes, after talking to ricmm, we would need to build all 14-15 rev deps on a major rev bump, so we'll stash this for now until an actual api change warrants a 3.0 bump.
Instead, we'll just stub out the mirserver backend so we can do a minor rev bump:
https:/
- 284. By Alberto Aguirre
-
No-change rebuild against mir 0.9.0
Approved by: Cemil Azizoglu, PS Jenkins bot - 285. By PS Jenkins bot
-
Releasing 2.5.0+15.
04.20141124- 0ubuntu1 - 286. By Alberto Aguirre
-
Stub out mirserver backend
Approved by: Gerry Boland, PS Jenkins bot - 287. By PS Jenkins bot
-
Releasing 2.6.0+15.
04.20141126- 0ubuntu1 - 288. By Ricardo Mendoza
-
* Allow for module-override of specific providers of the Platform API
* Implement support for named pipe event reader on sensors test pluginApproved by: Jim Hodapp, Daniel d'Andrada, PS Jenkins bot
- 289. By CI Train Bot Account
-
Releasing 2.7.0+15.
04.20150123- 0ubuntu1 - 290. By You-Sheng Yang
-
* Check array boundary for KeyedVector
Approved by: Ricardo Salveti - 291. By CI Train Bot Account
-
Releasing 2.7.0+15.
04.20150128- 0ubuntu1 - 292. By Ricardo Mendoza
-
Do not load the test backend unless a specific override list is provided. Also, add the test backend as dependency of the main module, now that it is directly usable without other modules.
Approved by: PS Jenkins bot - 293. By CI Train Bot Account
-
Releasing 2.8.0+15.
04.20150203- 0ubuntu1 - 294. By Ricardo Mendoza
-
Dont abort on soft errors, instead fall back to dummy provider if possible.
Approved by: PS Jenkins bot - 295. By CI Train Bot Account
-
Releasing 2.8.1+15.
04.20150306- 0ubuntu1 - 296. By Robert Carr
-
Expose MirConnection form UApplicationIntance and deprecate the ua_ui namespace.
Approved by: Alberto Aguirre, PS Jenkins bot, Gerry Boland - 297. By CI Train Bot Account
-
Releasing 2.9.0+15.
04.20150318- 0ubuntu1 - 298. By Michał Sawicz
-
Fix u_application_
instance_ get_mir_ connection symbol version Fixes: #1433936
Approved by: PS Jenkins bot - 299. By Ricardo Mendoza
-
Disable building the Android backends we no longer use.
Approved by: PS Jenkins bot - 300. By CI Train Bot Account
-
Releasing 2.9.0+15.
04.20150320- 0ubuntu1 - 301. By Robert Carr
-
Remove deprecated ua_ui_* functions
- 302. By Robert Carr
-
Remove dead examples
- 303. By Robert Carr
-
Update module loader version numbers
- 304. By Robert Carr
-
Remove unnused examples from install
- 305. By Robert Carr
-
Debian cleanup
- 306. By Robert Carr
-
Merge trunk
- 307. By Robert Carr
-
Delete more
- 308. By Robert Carr
-
More deletions
- 309. By Robert Carr
-
Cleanup
- 310. By Robert Carr
-
More cleanup
- 311. By Robert Carr
-
Correct symbols file
- 312. By Robert Carr
-
Update desktop module version
- 313. By Alberto Aguirre
-
Remove mirserver module
- 314. By Alberto Aguirre
-
Fold mircommon into mirclient
- 315. By Alberto Aguirre
-
Update changelog
Unmerged revisions
Preview Diff
1 | === modified file 'CMakeLists.txt' | |||
2 | --- CMakeLists.txt 2014-10-13 10:11:24 +0000 | |||
3 | +++ CMakeLists.txt 2014-11-08 22:26:49 +0000 | |||
4 | @@ -2,8 +2,8 @@ | |||
5 | 2 | 2 | ||
6 | 3 | project(ubuntu-platform-api) | 3 | project(ubuntu-platform-api) |
7 | 4 | 4 | ||
10 | 5 | set(UBUNTU_PLATFORM_API_VERSION_MAJOR 2) | 5 | set(UBUNTU_PLATFORM_API_VERSION_MAJOR 3) |
11 | 6 | set(UBUNTU_PLATFORM_API_VERSION_MINOR 5) | 6 | set(UBUNTU_PLATFORM_API_VERSION_MINOR 0) |
12 | 7 | set(UBUNTU_PLATFORM_API_VERSION_PATCH 0) | 7 | set(UBUNTU_PLATFORM_API_VERSION_PATCH 0) |
13 | 8 | 8 | ||
14 | 9 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden") | 9 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden") |
15 | @@ -58,7 +58,6 @@ | |||
16 | 58 | ) | 58 | ) |
17 | 59 | 59 | ||
18 | 60 | find_package(PkgConfig) | 60 | find_package(PkgConfig) |
19 | 61 | pkg_check_modules(MIRSERVER REQUIRED mirserver) | ||
20 | 62 | pkg_check_modules(MIRCLIENT REQUIRED mirclient) | 61 | pkg_check_modules(MIRCLIENT REQUIRED mirclient) |
21 | 63 | 62 | ||
22 | 64 | # Try to find hybris, and disable hybris from build if not found | 63 | # Try to find hybris, and disable hybris from build if not found |
23 | 65 | 64 | ||
24 | === modified file 'debian/changelog' | |||
25 | --- debian/changelog 2014-10-27 20:05:27 +0000 | |||
26 | +++ debian/changelog 2014-11-08 22:26:49 +0000 | |||
27 | @@ -1,3 +1,9 @@ | |||
28 | 1 | platform-api (3.0.0) UNRELEASED; urgency=medium | ||
29 | 2 | |||
30 | 3 | * Remove mirserver backend | ||
31 | 4 | |||
32 | 5 | -- Alberto Aguirre <alberto.aguirre@canonical.com> Thu, 06 Nov 2014 14:39:00 -0600 | ||
33 | 6 | |||
34 | 1 | platform-api (2.5.0+15.04.20141027-0ubuntu1) vivid; urgency=low | 7 | platform-api (2.5.0+15.04.20141027-0ubuntu1) vivid; urgency=low |
35 | 2 | 8 | ||
36 | 3 | [ Alexandros Frantzis ] | 9 | [ Alexandros Frantzis ] |
37 | 4 | 10 | ||
38 | === modified file 'debian/control' | |||
39 | --- debian/control 2014-09-22 18:04:53 +0000 | |||
40 | +++ debian/control 2014-11-08 22:26:49 +0000 | |||
41 | @@ -15,7 +15,6 @@ | |||
42 | 15 | libhybris-common-dev, | 15 | libhybris-common-dev, |
43 | 16 | pkg-config, | 16 | pkg-config, |
44 | 17 | libmirclient-dev (>= 0.6.0), | 17 | libmirclient-dev (>= 0.6.0), |
45 | 18 | libmirserver-dev (>= 0.6.0), | ||
46 | 19 | liburl-dispatcher1-dev, | 18 | liburl-dispatcher1-dev, |
47 | 20 | libdbus-1-dev, | 19 | libdbus-1-dev, |
48 | 21 | libdbus-cpp-dev (>= 4.0.0), | 20 | libdbus-cpp-dev (>= 4.0.0), |
49 | 22 | 21 | ||
50 | === modified file 'debian/ubuntu-application-api2-desktop.install' | |||
51 | --- debian/ubuntu-application-api2-desktop.install 2014-05-15 15:46:30 +0000 | |||
52 | +++ debian/ubuntu-application-api2-desktop.install 2014-11-08 22:26:49 +0000 | |||
53 | @@ -1,2 +1,1 @@ | |||
54 | 1 | usr/lib/*/libubuntu_application_api_desktop_mirclient.so.* | 1 | usr/lib/*/libubuntu_application_api_desktop_mirclient.so.* |
55 | 2 | usr/lib/*/libubuntu_application_api_desktop_mirserver.so.* | ||
56 | 3 | 2 | ||
57 | === modified file 'debian/ubuntu-application-api2-touch.install' | |||
58 | --- debian/ubuntu-application-api2-touch.install 2014-05-15 15:46:30 +0000 | |||
59 | +++ debian/ubuntu-application-api2-touch.install 2014-11-08 22:26:49 +0000 | |||
60 | @@ -1,2 +1,1 @@ | |||
61 | 1 | usr/lib/*/libubuntu_application_api_touch_mirserver.so.* | ||
62 | 2 | usr/lib/*/libubuntu_application_api_touch_mirclient.so.* | 1 | usr/lib/*/libubuntu_application_api_touch_mirclient.so.* |
63 | 3 | 2 | ||
64 | === modified file 'src/ubuntu/application/base_module.h' | |||
65 | --- src/ubuntu/application/base_module.h 2014-09-30 01:35:35 +0000 | |||
66 | +++ src/ubuntu/application/base_module.h 2014-11-08 22:26:49 +0000 | |||
67 | @@ -27,8 +27,8 @@ | |||
68 | 27 | * This is the base backend loader for the Platform API | 27 | * This is the base backend loader for the Platform API |
69 | 28 | */ | 28 | */ |
70 | 29 | 29 | ||
73 | 30 | #define API_VERSION_MAJOR "2" | 30 | #define API_VERSION_MAJOR "3" |
74 | 31 | #define API_VERSION_MINOR "5" | 31 | #define API_VERSION_MINOR "0" |
75 | 32 | #define API_VERSION_PATCH "0" | 32 | #define API_VERSION_PATCH "0" |
76 | 33 | #define SO_SUFFIX ".so." API_VERSION_MAJOR "." API_VERSION_MINOR "." API_VERSION_PATCH | 33 | #define SO_SUFFIX ".so." API_VERSION_MAJOR "." API_VERSION_MINOR "." API_VERSION_PATCH |
77 | 34 | 34 | ||
78 | 35 | 35 | ||
79 | === modified file 'src/ubuntu/application/common/CMakeLists.txt' | |||
80 | --- src/ubuntu/application/common/CMakeLists.txt 2014-05-15 14:56:16 +0000 | |||
81 | +++ src/ubuntu/application/common/CMakeLists.txt 2014-11-08 22:26:49 +0000 | |||
82 | @@ -3,6 +3,4 @@ | |||
83 | 3 | ) | 3 | ) |
84 | 4 | 4 | ||
85 | 5 | add_subdirectory(application) | 5 | add_subdirectory(application) |
86 | 6 | add_subdirectory(mircommon) | ||
87 | 7 | add_subdirectory(mirclient) | 6 | add_subdirectory(mirclient) |
88 | 8 | add_subdirectory(mirserver) | ||
89 | 9 | 7 | ||
90 | === modified file 'src/ubuntu/application/common/mirclient/CMakeLists.txt' | |||
91 | --- src/ubuntu/application/common/mirclient/CMakeLists.txt 2014-09-22 18:04:53 +0000 | |||
92 | +++ src/ubuntu/application/common/mirclient/CMakeLists.txt 2014-11-08 22:26:49 +0000 | |||
93 | @@ -3,6 +3,12 @@ | |||
94 | 3 | application_instance_mirclient.cpp | 3 | application_instance_mirclient.cpp |
95 | 4 | window_properties_mirclient.cpp | 4 | window_properties_mirclient.cpp |
96 | 5 | window_mirclient.cpp | 5 | window_mirclient.cpp |
97 | 6 | event_helpers_mir.cpp | ||
98 | 7 | application_id_mir.cpp | ||
99 | 8 | application_options_mir.cpp | ||
100 | 9 | application_description_mir.cpp | ||
101 | 10 | session_mir.cpp | ||
102 | 11 | lifecycle_delegate_mir.cpp | ||
103 | 6 | ) | 12 | ) |
104 | 7 | 13 | ||
105 | 8 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11 -fPIC") | 14 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11 -fPIC") |
106 | 9 | 15 | ||
107 | === renamed file 'src/ubuntu/application/common/mircommon/application_description_mir.cpp' => 'src/ubuntu/application/common/mirclient/application_description_mir.cpp' | |||
108 | === renamed file 'src/ubuntu/application/common/mircommon/application_description_mir_priv.h' => 'src/ubuntu/application/common/mirclient/application_description_mir_priv.h' | |||
109 | === renamed file 'src/ubuntu/application/common/mircommon/application_id_mir.cpp' => 'src/ubuntu/application/common/mirclient/application_id_mir.cpp' | |||
110 | === renamed file 'src/ubuntu/application/common/mircommon/application_id_mir_priv.h' => 'src/ubuntu/application/common/mirclient/application_id_mir_priv.h' | |||
111 | === renamed file 'src/ubuntu/application/common/mircommon/application_options_mir.cpp' => 'src/ubuntu/application/common/mirclient/application_options_mir.cpp' | |||
112 | === renamed file 'src/ubuntu/application/common/mircommon/application_options_mir_priv.h' => 'src/ubuntu/application/common/mirclient/application_options_mir_priv.h' | |||
113 | === renamed file 'src/ubuntu/application/common/mircommon/event_helpers_mir.cpp' => 'src/ubuntu/application/common/mirclient/event_helpers_mir.cpp' | |||
114 | === renamed file 'src/ubuntu/application/common/mircommon/event_helpers_mir.h' => 'src/ubuntu/application/common/mirclient/event_helpers_mir.h' | |||
115 | === renamed file 'src/ubuntu/application/common/mircommon/lifecycle_delegate_mir.cpp' => 'src/ubuntu/application/common/mirclient/lifecycle_delegate_mir.cpp' | |||
116 | === renamed file 'src/ubuntu/application/common/mircommon/lifecycle_delegate_mir_priv.h' => 'src/ubuntu/application/common/mirclient/lifecycle_delegate_mir_priv.h' | |||
117 | === renamed file 'src/ubuntu/application/common/mircommon/session_mir.cpp' => 'src/ubuntu/application/common/mirclient/session_mir.cpp' | |||
118 | === modified file 'src/ubuntu/application/common/mirclient/ubuntu_application_api_mirclient.cpp' | |||
119 | --- src/ubuntu/application/common/mirclient/ubuntu_application_api_mirclient.cpp 2014-10-15 13:29:15 +0000 | |||
120 | +++ src/ubuntu/application/common/mirclient/ubuntu_application_api_mirclient.cpp 2014-11-08 22:26:49 +0000 | |||
121 | @@ -19,9 +19,9 @@ | |||
122 | 19 | #include "application_instance_mirclient_priv.h" | 19 | #include "application_instance_mirclient_priv.h" |
123 | 20 | #include "window_properties_mirclient_priv.h" | 20 | #include "window_properties_mirclient_priv.h" |
124 | 21 | #include "window_mirclient_priv.h" | 21 | #include "window_mirclient_priv.h" |
126 | 22 | #include "mircommon/lifecycle_delegate_mir_priv.h" | 22 | #include "lifecycle_delegate_mir_priv.h" |
127 | 23 | 23 | ||
129 | 24 | #include "mircommon/application_id_mir_priv.h" | 24 | #include "application_id_mir_priv.h" |
130 | 25 | 25 | ||
131 | 26 | #include <ubuntu/application/lifecycle_delegate.h> | 26 | #include <ubuntu/application/lifecycle_delegate.h> |
132 | 27 | #include <ubuntu/application/ui/window.h> | 27 | #include <ubuntu/application/ui/window.h> |
133 | 28 | 28 | ||
134 | === modified file 'src/ubuntu/application/common/mirclient/window_mirclient.cpp' | |||
135 | --- src/ubuntu/application/common/mirclient/window_mirclient.cpp 2014-09-29 19:56:49 +0000 | |||
136 | +++ src/ubuntu/application/common/mirclient/window_mirclient.cpp 2014-11-08 22:26:49 +0000 | |||
137 | @@ -21,7 +21,7 @@ | |||
138 | 21 | #include "window_properties_mirclient_priv.h" | 21 | #include "window_properties_mirclient_priv.h" |
139 | 22 | #include "window_mirclient_priv.h" | 22 | #include "window_mirclient_priv.h" |
140 | 23 | 23 | ||
142 | 24 | #include "mircommon/event_helpers_mir.h" | 24 | #include "event_helpers_mir.h" |
143 | 25 | 25 | ||
144 | 26 | namespace uamc = ubuntu::application::mir::client; | 26 | namespace uamc = ubuntu::application::mir::client; |
145 | 27 | namespace uaum = ubuntu::application::ui::mir; | 27 | namespace uaum = ubuntu::application::ui::mir; |
146 | 28 | 28 | ||
147 | === removed directory 'src/ubuntu/application/common/mircommon' | |||
148 | === removed file 'src/ubuntu/application/common/mircommon/CMakeLists.txt' | |||
149 | --- src/ubuntu/application/common/mircommon/CMakeLists.txt 2014-08-06 08:33:54 +0000 | |||
150 | +++ src/ubuntu/application/common/mircommon/CMakeLists.txt 1970-01-01 00:00:00 +0000 | |||
151 | @@ -1,25 +0,0 @@ | |||
152 | 1 | set(SOURCES | ||
153 | 2 | event_helpers_mir.cpp | ||
154 | 3 | application_id_mir.cpp | ||
155 | 4 | application_options_mir.cpp | ||
156 | 5 | application_description_mir.cpp | ||
157 | 6 | session_mir.cpp | ||
158 | 7 | lifecycle_delegate_mir.cpp | ||
159 | 8 | ) | ||
160 | 9 | |||
161 | 10 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC --std=c++11") | ||
162 | 11 | |||
163 | 12 | include_directories( | ||
164 | 13 | ${MIRCLIENT_INCLUDE_DIRS} | ||
165 | 14 | ) | ||
166 | 15 | |||
167 | 16 | add_library( | ||
168 | 17 | ubuntu_application_api_mircommon STATIC | ||
169 | 18 | ${SOURCES} | ||
170 | 19 | ) | ||
171 | 20 | |||
172 | 21 | target_link_libraries( | ||
173 | 22 | ubuntu_application_api_mircommon | ||
174 | 23 | |||
175 | 24 | ${LINK_LIBRARIES} | ||
176 | 25 | ) | ||
177 | 26 | 0 | ||
178 | === removed directory 'src/ubuntu/application/common/mirserver' | |||
179 | === removed file 'src/ubuntu/application/common/mirserver/CMakeLists.txt' | |||
180 | --- src/ubuntu/application/common/mirserver/CMakeLists.txt 2014-05-29 14:14:31 +0000 | |||
181 | +++ src/ubuntu/application/common/mirserver/CMakeLists.txt 1970-01-01 00:00:00 +0000 | |||
182 | @@ -1,24 +0,0 @@ | |||
183 | 1 | set(SOURCES | ||
184 | 2 | ubuntu_application_api_mirserver.cpp | ||
185 | 3 | application_instance_mirserver.cpp | ||
186 | 4 | window_properties_mirserver.cpp | ||
187 | 5 | window_mirserver.cpp | ||
188 | 6 | ) | ||
189 | 7 | |||
190 | 8 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11 -fPIC") | ||
191 | 9 | |||
192 | 10 | include_directories( | ||
193 | 11 | ${CMAKE_BINARY_DIR}/include | ||
194 | 12 | ${MIRSERVER_INCLUDE_DIRS} | ||
195 | 13 | ) | ||
196 | 14 | |||
197 | 15 | add_library( | ||
198 | 16 | ubuntu_application_api_mirserver STATIC | ||
199 | 17 | ${SOURCES} | ||
200 | 18 | ) | ||
201 | 19 | |||
202 | 20 | target_link_libraries( | ||
203 | 21 | ubuntu_application_api_mirserver | ||
204 | 22 | |||
205 | 23 | ${MIRSERVER_LDFLAGS} ${MIRSERVER_LIBRARIES} | ||
206 | 24 | ) | ||
207 | 25 | 0 | ||
208 | === removed file 'src/ubuntu/application/common/mirserver/application_instance_mirserver.cpp' | |||
209 | --- src/ubuntu/application/common/mirserver/application_instance_mirserver.cpp 2014-06-17 14:37:23 +0000 | |||
210 | +++ src/ubuntu/application/common/mirserver/application_instance_mirserver.cpp 1970-01-01 00:00:00 +0000 | |||
211 | @@ -1,123 +0,0 @@ | |||
212 | 1 | /* | ||
213 | 2 | * Copyright (C) 2013 Canonical Ltd | ||
214 | 3 | * | ||
215 | 4 | * This program is free software: you can redistribute it and/or modify | ||
216 | 5 | * it under the terms of the GNU Lesser General Public License version 3 as | ||
217 | 6 | * published by the Free Software Foundation. | ||
218 | 7 | * | ||
219 | 8 | * This program is distributed in the hope that it will be useful, | ||
220 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
221 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
222 | 11 | * GNU Lesser General Public License for more details. | ||
223 | 12 | * | ||
224 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
225 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
226 | 15 | * | ||
227 | 16 | * Authored by: Robert Carr <robert.carr@canonical.com> | ||
228 | 17 | */ | ||
229 | 18 | |||
230 | 19 | #include "application_instance_mirserver_priv.h" | ||
231 | 20 | |||
232 | 21 | #include "mircommon/application_description_mir_priv.h" | ||
233 | 22 | #include "mircommon/application_options_mir_priv.h" | ||
234 | 23 | #include "mircommon/application_id_mir_priv.h" | ||
235 | 24 | |||
236 | 25 | #include <mir/scene/surface.h> | ||
237 | 26 | #include <mir/scene/surface_coordinator.h> | ||
238 | 27 | #include <mir/scene/session.h> | ||
239 | 28 | #include <mir/scene/session_listener.h> | ||
240 | 29 | #include <mir/scene/surface_creation_parameters.h> | ||
241 | 30 | #include <mir/scene/snapshot.h> | ||
242 | 31 | |||
243 | 32 | namespace uam = ubuntu::application::mir; | ||
244 | 33 | namespace uams = uam::server; | ||
245 | 34 | |||
246 | 35 | namespace mf = mir::frontend; | ||
247 | 36 | namespace ms = mir::scene; | ||
248 | 37 | |||
249 | 38 | namespace | ||
250 | 39 | { | ||
251 | 40 | /* A Mir in-process client does not have an associated Session by default. However it is | ||
252 | 41 | * useful for the shell to be able to position and identify its own surface, so need to | ||
253 | 42 | * create a mock implementation of Session for that respective Surface. | ||
254 | 43 | */ | ||
255 | 44 | class InProcessClientSession : public ms::Session | ||
256 | 45 | { | ||
257 | 46 | public: | ||
258 | 47 | virtual void force_requests_to_complete() override {} | ||
259 | 48 | virtual pid_t process_id() const override { return 0; } | ||
260 | 49 | virtual void take_snapshot(ms::SnapshotCallback const&) override {} | ||
261 | 50 | virtual std::shared_ptr<ms::Surface> default_surface() const override { return surface; } | ||
262 | 51 | virtual void set_lifecycle_state(MirLifecycleState) override {} | ||
263 | 52 | |||
264 | 53 | virtual mf::SurfaceId create_surface(ms::SurfaceCreationParameters const& ) override { return mf::SurfaceId(0); } | ||
265 | 54 | virtual void destroy_surface(mf::SurfaceId) override {} | ||
266 | 55 | virtual std::shared_ptr<mf::Surface> get_surface(mf::SurfaceId) const override { return surface; } | ||
267 | 56 | virtual std::string name() const override { return "Shell"; } | ||
268 | 57 | virtual void hide() override {} | ||
269 | 58 | virtual void show() override {} | ||
270 | 59 | virtual void send_display_config(mir::graphics::DisplayConfiguration const&) override {} | ||
271 | 60 | |||
272 | 61 | virtual void start_prompt_session() override {} | ||
273 | 62 | virtual void stop_prompt_session() override {} | ||
274 | 63 | private: | ||
275 | 64 | std::shared_ptr<ms::Surface> const surface; | ||
276 | 65 | }; | ||
277 | 66 | |||
278 | 67 | InProcessClientSession& global_session() | ||
279 | 68 | { | ||
280 | 69 | static InProcessClientSession session; | ||
281 | 70 | return session; | ||
282 | 71 | } | ||
283 | 72 | } | ||
284 | 73 | |||
285 | 74 | uams::Instance::Instance(std::shared_ptr<ms::SurfaceCoordinator> const &surface_coordinator, | ||
286 | 75 | std::shared_ptr<ms::SessionListener> const &session_listener, | ||
287 | 76 | uam::Description* description_, | ||
288 | 77 | uam::Options *options_) | ||
289 | 78 | : surface_coordinator(surface_coordinator), | ||
290 | 79 | session_listener(session_listener), | ||
291 | 80 | ref_count(1) | ||
292 | 81 | { | ||
293 | 82 | description = DescriptionPtr(description_, | ||
294 | 83 | [] (uam::Description* p) | ||
295 | 84 | { | ||
296 | 85 | delete p; | ||
297 | 86 | }); | ||
298 | 87 | options = OptionsPtr(options_, | ||
299 | 88 | [] (uam::Options* p) | ||
300 | 89 | { | ||
301 | 90 | delete p; | ||
302 | 91 | }); | ||
303 | 92 | } | ||
304 | 93 | |||
305 | 94 | UApplicationInstance* uams::Instance::as_u_application_instance() | ||
306 | 95 | { | ||
307 | 96 | return static_cast<UApplicationInstance*>(this); | ||
308 | 97 | } | ||
309 | 98 | |||
310 | 99 | uams::Instance* uams::Instance::from_u_application_instance(UApplicationInstance *u_instance) | ||
311 | 100 | { | ||
312 | 101 | return static_cast<uams::Instance*>(u_instance); | ||
313 | 102 | } | ||
314 | 103 | |||
315 | 104 | void uams::Instance::ref() | ||
316 | 105 | { | ||
317 | 106 | ref_count++; | ||
318 | 107 | } | ||
319 | 108 | |||
320 | 109 | void uams::Instance::unref() | ||
321 | 110 | { | ||
322 | 111 | ref_count--; | ||
323 | 112 | if (ref_count == 0) | ||
324 | 113 | delete this; | ||
325 | 114 | } | ||
326 | 115 | |||
327 | 116 | std::shared_ptr<ms::Surface> uams::Instance::create_surface(ms::SurfaceCreationParameters const& parameters) | ||
328 | 117 | { | ||
329 | 118 | ms::Session& session = global_session(); | ||
330 | 119 | auto surface = surface_coordinator->add_surface(parameters, &session); | ||
331 | 120 | // Need to call the SessionListener ourselves, else shell not notified of this surface creation | ||
332 | 121 | session_listener->surface_created(session, surface); | ||
333 | 122 | return surface; | ||
334 | 123 | } | ||
335 | 124 | 0 | ||
336 | === removed file 'src/ubuntu/application/common/mirserver/application_instance_mirserver_priv.h' | |||
337 | --- src/ubuntu/application/common/mirserver/application_instance_mirserver_priv.h 2014-04-15 20:23:07 +0000 | |||
338 | +++ src/ubuntu/application/common/mirserver/application_instance_mirserver_priv.h 1970-01-01 00:00:00 +0000 | |||
339 | @@ -1,89 +0,0 @@ | |||
340 | 1 | /* | ||
341 | 2 | * Copyright (C) 2013 Canonical Ltd | ||
342 | 3 | * | ||
343 | 4 | * This program is free software: you can redistribute it and/or modify | ||
344 | 5 | * it under the terms of the GNU Lesser General Public License version 3 as | ||
345 | 6 | * published by the Free Software Foundation. | ||
346 | 7 | * | ||
347 | 8 | * This program is distributed in the hope that it will be useful, | ||
348 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
349 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
350 | 11 | * GNU Lesser General Public License for more details. | ||
351 | 12 | * | ||
352 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
353 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
354 | 15 | * | ||
355 | 16 | * Authored by: Robert Carr <robert.carr@canonical.com> | ||
356 | 17 | */ | ||
357 | 18 | |||
358 | 19 | #ifndef UBUNTU_APPLICATION_INSTANCE_MIRSERVER_PRIV_H_ | ||
359 | 20 | #define UBUNTU_APPLICATION_INSTANCE_MIRSERVER_PRIV_H_ | ||
360 | 21 | |||
361 | 22 | #include <ubuntu/application/instance.h> | ||
362 | 23 | |||
363 | 24 | #include <memory> | ||
364 | 25 | #include <functional> | ||
365 | 26 | |||
366 | 27 | namespace mir | ||
367 | 28 | { | ||
368 | 29 | namespace scene | ||
369 | 30 | { | ||
370 | 31 | class Surface; | ||
371 | 32 | class SurfaceCoordinator; | ||
372 | 33 | class SessionListener; | ||
373 | 34 | class SurfaceCreationParameters; | ||
374 | 35 | } | ||
375 | 36 | } | ||
376 | 37 | |||
377 | 38 | namespace ubuntu | ||
378 | 39 | { | ||
379 | 40 | namespace application | ||
380 | 41 | { | ||
381 | 42 | namespace mir | ||
382 | 43 | { | ||
383 | 44 | class Description; | ||
384 | 45 | class Options; | ||
385 | 46 | |||
386 | 47 | namespace server | ||
387 | 48 | { | ||
388 | 49 | |||
389 | 50 | class Instance | ||
390 | 51 | { | ||
391 | 52 | public: | ||
392 | 53 | Instance(std::shared_ptr< ::mir::scene::SurfaceCoordinator> const& surface_coordinator, | ||
393 | 54 | std::shared_ptr< ::mir::scene::SessionListener> const& session_listener, | ||
394 | 55 | ubuntu::application::mir::Description* description, | ||
395 | 56 | ubuntu::application::mir::Options *options); | ||
396 | 57 | ~Instance() = default; | ||
397 | 58 | |||
398 | 59 | UApplicationInstance* as_u_application_instance(); | ||
399 | 60 | static Instance* from_u_application_instance(UApplicationInstance* u_instance); | ||
400 | 61 | |||
401 | 62 | void ref(); | ||
402 | 63 | void unref(); | ||
403 | 64 | |||
404 | 65 | std::shared_ptr< ::mir::scene::Surface> create_surface( ::mir::scene::SurfaceCreationParameters const& parameters); | ||
405 | 66 | |||
406 | 67 | protected: | ||
407 | 68 | Instance(Instance const&) = delete; | ||
408 | 69 | Instance& operator=(Instance const&) = delete; | ||
409 | 70 | |||
410 | 71 | private: | ||
411 | 72 | typedef std::unique_ptr<Description, std::function<void(Description*)>> DescriptionPtr; | ||
412 | 73 | typedef std::unique_ptr<Options, std::function<void(Options*)>> OptionsPtr; | ||
413 | 74 | |||
414 | 75 | OptionsPtr options; | ||
415 | 76 | DescriptionPtr description; | ||
416 | 77 | |||
417 | 78 | std::shared_ptr< ::mir::scene::SurfaceCoordinator> const surface_coordinator; | ||
418 | 79 | std::shared_ptr< ::mir::scene::SessionListener> const session_listener; | ||
419 | 80 | |||
420 | 81 | int ref_count; | ||
421 | 82 | }; | ||
422 | 83 | |||
423 | 84 | } | ||
424 | 85 | } | ||
425 | 86 | } | ||
426 | 87 | } // namespace ubuntu | ||
427 | 88 | |||
428 | 89 | #endif // UBUNTU_APPLICATION_INSTANCE_MIRSERVER_PRIV_H_ | ||
429 | 90 | 0 | ||
430 | === removed file 'src/ubuntu/application/common/mirserver/ubuntu_application_api_mirserver.cpp' | |||
431 | --- src/ubuntu/application/common/mirserver/ubuntu_application_api_mirserver.cpp 2014-07-15 12:41:35 +0000 | |||
432 | +++ src/ubuntu/application/common/mirserver/ubuntu_application_api_mirserver.cpp 1970-01-01 00:00:00 +0000 | |||
433 | @@ -1,351 +0,0 @@ | |||
434 | 1 | /* | ||
435 | 2 | * Copyright (C) 2013 Canonical Ltd | ||
436 | 3 | * | ||
437 | 4 | * This program is free software: you can redistribute it and/or modify | ||
438 | 5 | * it under the terms of the GNU Lesser General Public License version 3 as | ||
439 | 6 | * published by the Free Software Foundation. | ||
440 | 7 | * | ||
441 | 8 | * This program is distributed in the hope that it will be useful, | ||
442 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
443 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
444 | 11 | * GNU Lesser General Public License for more details. | ||
445 | 12 | * | ||
446 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
447 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
448 | 15 | * | ||
449 | 16 | * Authored by: Robert Carr <robert.carr@canonical.com> | ||
450 | 17 | */ | ||
451 | 18 | |||
452 | 19 | #include "application_instance_mirserver_priv.h" | ||
453 | 20 | #include "window_properties_mirserver_priv.h" | ||
454 | 21 | #include "window_mirserver_priv.h" | ||
455 | 22 | |||
456 | 23 | #include "mircommon/application_id_mir_priv.h" | ||
457 | 24 | #include "mircommon/application_description_mir_priv.h" | ||
458 | 25 | #include "mircommon/application_options_mir_priv.h" | ||
459 | 26 | #include "mircommon/mir/geometry/rectangles.h" | ||
460 | 27 | |||
461 | 28 | // C APIs | ||
462 | 29 | #include <ubuntu/application/init.h> | ||
463 | 30 | #include <ubuntu/application/lifecycle_delegate.h> | ||
464 | 31 | #include <ubuntu/application/ui/window.h> | ||
465 | 32 | #include <ubuntu/application/ui/options.h> | ||
466 | 33 | #include <ubuntu/application/ui/session.h> | ||
467 | 34 | #include <ubuntu/application/ui/clipboard.h> | ||
468 | 35 | #include <ubuntu/application/ui/display.h> | ||
469 | 36 | #include <ubuntu/application/sensors/accelerometer.h> | ||
470 | 37 | #include <ubuntu/application/sensors/proximity.h> | ||
471 | 38 | #include <ubuntu/application/sensors/light.h> | ||
472 | 39 | |||
473 | 40 | #include <mir/default_server_configuration.h> | ||
474 | 41 | |||
475 | 42 | #include <mir/graphics/display.h> | ||
476 | 43 | #include <mir/graphics/display_buffer.h> | ||
477 | 44 | #include <mir/graphics/platform.h> | ||
478 | 45 | #include <mir/graphics/graphic_buffer_allocator.h> | ||
479 | 46 | #include <mir/graphics/internal_client.h> | ||
480 | 47 | #include <mir/input/input_platform.h> | ||
481 | 48 | |||
482 | 49 | #include <assert.h> | ||
483 | 50 | |||
484 | 51 | #include <memory> | ||
485 | 52 | #include <functional> | ||
486 | 53 | |||
487 | 54 | namespace uam = ubuntu::application::mir; | ||
488 | 55 | namespace uams = ubuntu::application::mir::server; | ||
489 | 56 | |||
490 | 57 | namespace | ||
491 | 58 | { | ||
492 | 59 | |||
493 | 60 | struct MirServerContext | ||
494 | 61 | { | ||
495 | 62 | std::shared_ptr<mir::graphics::Display> display; | ||
496 | 63 | std::shared_ptr<mir::graphics::GraphicBufferAllocator> buffer_allocator; | ||
497 | 64 | std::shared_ptr<mir::scene::SurfaceCoordinator> surface_coordinator; | ||
498 | 65 | std::shared_ptr<mir::scene::SessionListener> session_listener; | ||
499 | 66 | std::shared_ptr<mir::input::receiver::InputPlatform> input_platform; | ||
500 | 67 | std::shared_ptr<mir::graphics::InternalClient> egl_client; | ||
501 | 68 | }; | ||
502 | 69 | |||
503 | 70 | MirServerContext * | ||
504 | 71 | global_mirserver_context() | ||
505 | 72 | { | ||
506 | 73 | static MirServerContext context; | ||
507 | 74 | return &context; | ||
508 | 75 | } | ||
509 | 76 | } | ||
510 | 77 | |||
511 | 78 | extern "C" | ||
512 | 79 | { | ||
513 | 80 | void u_application_init(void *args) | ||
514 | 81 | { | ||
515 | 82 | auto context = global_mirserver_context(); | ||
516 | 83 | mir::DefaultServerConfiguration* config = reinterpret_cast<mir::DefaultServerConfiguration*>(args); | ||
517 | 84 | |||
518 | 85 | context->surface_coordinator = config->the_surface_coordinator(); | ||
519 | 86 | context->buffer_allocator = config->the_buffer_allocator(); | ||
520 | 87 | context->display = config->the_display(); | ||
521 | 88 | context->session_listener = config->the_session_listener(); | ||
522 | 89 | context->input_platform = mir::input::receiver::InputPlatform::create(); | ||
523 | 90 | context->egl_client = config->the_graphics_platform()->create_internal_client(); | ||
524 | 91 | } | ||
525 | 92 | |||
526 | 93 | void u_application_finish() | ||
527 | 94 | { | ||
528 | 95 | auto context = global_mirserver_context(); | ||
529 | 96 | |||
530 | 97 | context->display.reset(); | ||
531 | 98 | context->surface_coordinator.reset(); | ||
532 | 99 | context->session_listener.reset(); | ||
533 | 100 | context->input_platform.reset(); | ||
534 | 101 | context->egl_client.reset(); | ||
535 | 102 | } | ||
536 | 103 | |||
537 | 104 | UApplicationInstance* u_application_instance_new_from_description_with_options(UApplicationDescription* u_description, UApplicationOptions* u_options) | ||
538 | 105 | { | ||
539 | 106 | auto surface_coordinator = global_mirserver_context()->surface_coordinator; | ||
540 | 107 | assert(surface_coordinator); | ||
541 | 108 | auto session_listener = global_mirserver_context()->session_listener; | ||
542 | 109 | assert(session_listener); | ||
543 | 110 | |||
544 | 111 | auto description = uam::Description::from_u_application_description(u_description); | ||
545 | 112 | auto options = uam::Options::from_u_application_options(u_options); | ||
546 | 113 | |||
547 | 114 | auto instance = new uams::Instance(surface_coordinator, session_listener, description, options); | ||
548 | 115 | |||
549 | 116 | return instance->as_u_application_instance(); | ||
550 | 117 | } | ||
551 | 118 | |||
552 | 119 | void | ||
553 | 120 | u_application_instance_ref(UApplicationInstance *u_instance) | ||
554 | 121 | { | ||
555 | 122 | auto instance = uams::Instance::from_u_application_instance(u_instance); | ||
556 | 123 | instance->ref(); | ||
557 | 124 | } | ||
558 | 125 | |||
559 | 126 | void | ||
560 | 127 | u_application_instance_unref(UApplicationInstance *u_instance) | ||
561 | 128 | { | ||
562 | 129 | auto instance = uams::Instance::from_u_application_instance(u_instance); | ||
563 | 130 | instance->unref(); | ||
564 | 131 | } | ||
565 | 132 | |||
566 | 133 | void | ||
567 | 134 | u_application_instance_destroy(UApplicationInstance *instance) | ||
568 | 135 | { | ||
569 | 136 | // TODO<papi>: What are the proper semantics here. | ||
570 | 137 | u_application_instance_unref(instance); | ||
571 | 138 | } | ||
572 | 139 | |||
573 | 140 | void | ||
574 | 141 | u_application_instance_run(UApplicationInstance *instance) | ||
575 | 142 | { | ||
576 | 143 | // TODO<papi>: What is this supposed to do? Seems to be no-op on hybris. | ||
577 | 144 | (void) instance; | ||
578 | 145 | } | ||
579 | 146 | |||
580 | 147 | void ua_ui_set_clipboard_content(void* content, size_t content_size) | ||
581 | 148 | { | ||
582 | 149 | // TODO<mir,papi>: Implement. Probably need more arguments? | ||
583 | 150 | (void) content; | ||
584 | 151 | (void) content_size; | ||
585 | 152 | } | ||
586 | 153 | |||
587 | 154 | void ua_ui_get_clipboard_content(void** out_content, size_t* out_content_size) | ||
588 | 155 | { | ||
589 | 156 | // TODO<mir,papi>: Implement | ||
590 | 157 | *out_content = NULL; | ||
591 | 158 | *out_content_size = 0; | ||
592 | 159 | } | ||
593 | 160 | |||
594 | 161 | UAUiDisplay* ua_ui_display_new_with_index(size_t index) | ||
595 | 162 | { | ||
596 | 163 | // TODO<mir>: Make use of index. This is kind of strangely done... | ||
597 | 164 | return reinterpret_cast<UAUiDisplay*>(index); | ||
598 | 165 | } | ||
599 | 166 | |||
600 | 167 | void ua_ui_display_destroy(UAUiDisplay* display) | ||
601 | 168 | { | ||
602 | 169 | // TODO: Implement. Or is this a noop for mirserver? | ||
603 | 170 | (void) display; | ||
604 | 171 | } | ||
605 | 172 | |||
606 | 173 | uint32_t ua_ui_display_query_horizontal_res(UAUiDisplay* display) | ||
607 | 174 | { | ||
608 | 175 | (void) display; // TODO<mir>: Multiple displays | ||
609 | 176 | |||
610 | 177 | auto mir_display = global_mirserver_context()->display; | ||
611 | 178 | assert(mir_display); | ||
612 | 179 | |||
613 | 180 | /* TODO: Get proper configuration */ | ||
614 | 181 | mir::geometry::Rectangles view_area; | ||
615 | 182 | mir_display->for_each_display_buffer([&view_area](mir::graphics::DisplayBuffer const& db) | ||
616 | 183 | { | ||
617 | 184 | view_area.add(db.view_area()); | ||
618 | 185 | }); | ||
619 | 186 | mir::geometry::Size const display_size{view_area.bounding_rectangle().size}; | ||
620 | 187 | |||
621 | 188 | return display_size.width.as_uint32_t(); | ||
622 | 189 | } | ||
623 | 190 | |||
624 | 191 | uint32_t ua_ui_display_query_vertical_res(UAUiDisplay* display) | ||
625 | 192 | { | ||
626 | 193 | (void) display; // TODO<mir>: Multiple displays | ||
627 | 194 | |||
628 | 195 | auto mir_display = global_mirserver_context()->display; | ||
629 | 196 | assert(mir_display); | ||
630 | 197 | |||
631 | 198 | /* TODO: Get proper configuration */ | ||
632 | 199 | mir::geometry::Rectangles view_area; | ||
633 | 200 | mir_display->for_each_display_buffer([&view_area](mir::graphics::DisplayBuffer const& db) | ||
634 | 201 | { | ||
635 | 202 | view_area.add(db.view_area()); | ||
636 | 203 | }); | ||
637 | 204 | mir::geometry::Size const display_size{view_area.bounding_rectangle().size}; | ||
638 | 205 | |||
639 | 206 | return display_size.height.as_uint32_t(); | ||
640 | 207 | } | ||
641 | 208 | |||
642 | 209 | EGLNativeDisplayType ua_ui_display_get_native_type(UAUiDisplay* display) | ||
643 | 210 | { | ||
644 | 211 | auto internal_client = global_mirserver_context()->egl_client; | ||
645 | 212 | assert(internal_client); | ||
646 | 213 | |||
647 | 214 | return internal_client->egl_native_display(); | ||
648 | 215 | } | ||
649 | 216 | |||
650 | 217 | namespace | ||
651 | 218 | { | ||
652 | 219 | static MirPixelFormat choose_pixel_format(std::shared_ptr<mir::graphics::GraphicBufferAllocator> const& allocator) | ||
653 | 220 | { | ||
654 | 221 | auto formats = allocator->supported_pixel_formats(); | ||
655 | 222 | return formats[0]; | ||
656 | 223 | } | ||
657 | 224 | } | ||
658 | 225 | |||
659 | 226 | UAUiWindowProperties* ua_ui_window_properties_new_for_normal_window() | ||
660 | 227 | { | ||
661 | 228 | auto properties = new uams::WindowProperties(); | ||
662 | 229 | |||
663 | 230 | return properties->as_u_window_properties(); | ||
664 | 231 | } | ||
665 | 232 | |||
666 | 233 | void ua_ui_window_properties_destroy(UAUiWindowProperties* u_properties) | ||
667 | 234 | { | ||
668 | 235 | auto properties = uams::WindowProperties::from_u_window_properties(u_properties); | ||
669 | 236 | delete properties; | ||
670 | 237 | } | ||
671 | 238 | |||
672 | 239 | void ua_ui_window_properties_set_titlen(UAUiWindowProperties* u_properties, const char* title, size_t title_length) | ||
673 | 240 | { | ||
674 | 241 | auto properties = uams::WindowProperties::from_u_window_properties(u_properties); | ||
675 | 242 | properties->set_title(title, title_length); | ||
676 | 243 | } | ||
677 | 244 | |||
678 | 245 | const char* ua_ui_window_properties_get_title(UAUiWindowProperties* u_properties) | ||
679 | 246 | { | ||
680 | 247 | auto properties = uams::WindowProperties::from_u_window_properties(u_properties); | ||
681 | 248 | return properties->surface_parameters().name.c_str(); | ||
682 | 249 | } | ||
683 | 250 | |||
684 | 251 | void ua_ui_window_properties_set_role(UAUiWindowProperties* properties, UAUiWindowRole role) | ||
685 | 252 | { | ||
686 | 253 | // TODO<papi>: Implement. Or is this a noop for us? | ||
687 | 254 | (void) properties; | ||
688 | 255 | (void) role; | ||
689 | 256 | } | ||
690 | 257 | |||
691 | 258 | void ua_ui_window_properties_set_event_cb_and_ctx(UAUiWindowProperties*, UAUiWindowEventCb, void*) | ||
692 | 259 | { | ||
693 | 260 | } | ||
694 | 261 | |||
695 | 262 | void ua_ui_window_properties_set_input_cb_and_ctx(UAUiWindowProperties* u_properties, UAUiWindowInputEventCb cb, void* ctx) | ||
696 | 263 | { | ||
697 | 264 | auto properties = uams::WindowProperties::from_u_window_properties(u_properties); | ||
698 | 265 | properties->set_input_cb_and_ctx(cb, ctx); | ||
699 | 266 | } | ||
700 | 267 | |||
701 | 268 | void ua_ui_window_properties_set_dimensions(UAUiWindowProperties *u_properties, uint32_t width, uint32_t height) | ||
702 | 269 | { | ||
703 | 270 | auto properties = uams::WindowProperties::from_u_window_properties(u_properties); | ||
704 | 271 | properties->set_dimensions(width, height); | ||
705 | 272 | } | ||
706 | 273 | |||
707 | 274 | UAUiWindow* ua_ui_window_new_for_application_with_properties(UApplicationInstance* u_instance, UAUiWindowProperties* u_properties) | ||
708 | 275 | { | ||
709 | 276 | auto input_platform = global_mirserver_context()->input_platform; | ||
710 | 277 | assert(input_platform); | ||
711 | 278 | auto internal_client = global_mirserver_context()->egl_client; | ||
712 | 279 | assert(internal_client); | ||
713 | 280 | |||
714 | 281 | auto instance = uams::Instance::from_u_application_instance(u_instance); | ||
715 | 282 | auto properties = uams::WindowProperties::from_u_window_properties(u_properties); | ||
716 | 283 | |||
717 | 284 | // A bit of a wart. | ||
718 | 285 | properties->set_pixel_format(choose_pixel_format(global_mirserver_context()->buffer_allocator)); | ||
719 | 286 | |||
720 | 287 | auto window = new uams::Window(*instance, properties, input_platform, internal_client); | ||
721 | 288 | |||
722 | 289 | return window->as_u_window(); | ||
723 | 290 | } | ||
724 | 291 | |||
725 | 292 | void ua_ui_window_destroy(UAUiWindow* u_window) | ||
726 | 293 | { | ||
727 | 294 | auto window = uams::Window::from_u_window(u_window); | ||
728 | 295 | delete window; | ||
729 | 296 | } | ||
730 | 297 | |||
731 | 298 | void ua_ui_window_get_size(UAUiWindow* u_window, uint32_t *width, uint32_t *height) | ||
732 | 299 | { | ||
733 | 300 | (void) u_window; | ||
734 | 301 | (void) width; | ||
735 | 302 | (void) height; | ||
736 | 303 | } | ||
737 | 304 | |||
738 | 305 | UStatus ua_ui_window_move(UAUiWindow* window, uint32_t x, uint32_t y) | ||
739 | 306 | { | ||
740 | 307 | // TODO<mir,papi>: Implement. But should this exist? | ||
741 | 308 | (void) window; | ||
742 | 309 | (void) x; | ||
743 | 310 | (void) y; | ||
744 | 311 | return (UStatus) 0; | ||
745 | 312 | } | ||
746 | 313 | |||
747 | 314 | UStatus ua_ui_window_resize(UAUiWindow* window, uint32_t width, uint32_t height) | ||
748 | 315 | { | ||
749 | 316 | // TODO<mir>: Implement | ||
750 | 317 | (void) window; | ||
751 | 318 | (void) width; | ||
752 | 319 | (void) height; | ||
753 | 320 | return (UStatus) 0; | ||
754 | 321 | } | ||
755 | 322 | |||
756 | 323 | UStatus ua_ui_window_hide(UAUiWindow* window) | ||
757 | 324 | { | ||
758 | 325 | // TODO<mir>: Implement | ||
759 | 326 | (void) window; | ||
760 | 327 | return (UStatus) 0; | ||
761 | 328 | } | ||
762 | 329 | |||
763 | 330 | UStatus ua_ui_window_show(UAUiWindow* window) | ||
764 | 331 | { | ||
765 | 332 | // TODO<mir>: Implement | ||
766 | 333 | (void) window; | ||
767 | 334 | return (UStatus) 0; | ||
768 | 335 | } | ||
769 | 336 | |||
770 | 337 | void ua_ui_window_request_fullscreen(UAUiWindow* window) | ||
771 | 338 | { | ||
772 | 339 | // TODO<mir>: Implement | ||
773 | 340 | (void) window; | ||
774 | 341 | } | ||
775 | 342 | |||
776 | 343 | EGLNativeWindowType ua_ui_window_get_native_type(UAUiWindow* u_window) | ||
777 | 344 | { | ||
778 | 345 | auto window = uams::Window::from_u_window(u_window); | ||
779 | 346 | |||
780 | 347 | return window->get_native_type(); | ||
781 | 348 | } | ||
782 | 349 | |||
783 | 350 | // TODO: Sensors | ||
784 | 351 | } | ||
785 | 352 | 0 | ||
786 | === removed file 'src/ubuntu/application/common/mirserver/window_mirserver.cpp' | |||
787 | --- src/ubuntu/application/common/mirserver/window_mirserver.cpp 2014-07-15 12:41:35 +0000 | |||
788 | +++ src/ubuntu/application/common/mirserver/window_mirserver.cpp 1970-01-01 00:00:00 +0000 | |||
789 | @@ -1,85 +0,0 @@ | |||
790 | 1 | /* | ||
791 | 2 | * Copyright (C) 2013 Canonical Ltd | ||
792 | 3 | * | ||
793 | 4 | * This program is free software: you can redistribute it and/or modify | ||
794 | 5 | * it under the terms of the GNU Lesser General Public License version 3 as | ||
795 | 6 | * published by the Free Software Foundation. | ||
796 | 7 | * | ||
797 | 8 | * This program is distributed in the hope that it will be useful, | ||
798 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
799 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
800 | 11 | * GNU Lesser General Public License for more details. | ||
801 | 12 | * | ||
802 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
803 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
804 | 15 | * | ||
805 | 16 | * Authored by: Robert Carr <robert.carr@canonical.com> | ||
806 | 17 | */ | ||
807 | 18 | |||
808 | 19 | #include "mircommon/event_helpers_mir.h" | ||
809 | 20 | |||
810 | 21 | #include "window_mirserver_priv.h" | ||
811 | 22 | #include "application_instance_mirserver_priv.h" | ||
812 | 23 | #include "window_properties_mirserver_priv.h" | ||
813 | 24 | |||
814 | 25 | |||
815 | 26 | #include <mir/scene/surface.h> | ||
816 | 27 | #include <mir/input/input_platform.h> | ||
817 | 28 | #include <mir/input/input_receiver_thread.h> | ||
818 | 29 | #include <mir/graphics/internal_client.h> | ||
819 | 30 | #include <mir/graphics/internal_surface.h> | ||
820 | 31 | |||
821 | 32 | namespace uams = ubuntu::application::mir::server; | ||
822 | 33 | namespace uaum = ubuntu::application::ui::mir; | ||
823 | 34 | |||
824 | 35 | namespace mf = mir::frontend; | ||
825 | 36 | namespace mg = mir::graphics; | ||
826 | 37 | namespace msh = mir::shell; | ||
827 | 38 | namespace mircv = mir::input::receiver; | ||
828 | 39 | |||
829 | 40 | namespace | ||
830 | 41 | { | ||
831 | 42 | |||
832 | 43 | static void ua_ui_window_handle_event(UAUiWindowInputEventCb cb, void* ctx, MirEvent* mir_event) | ||
833 | 44 | { | ||
834 | 45 | Event ubuntu_ev; | ||
835 | 46 | auto translated_event = uaum::event_to_ubuntu_deprecated_event(mir_event, ubuntu_ev); | ||
836 | 47 | if (translated_event) | ||
837 | 48 | cb(ctx, &ubuntu_ev); | ||
838 | 49 | } | ||
839 | 50 | |||
840 | 51 | } | ||
841 | 52 | |||
842 | 53 | uams::Window::Window(uams::Instance& instance, uams::WindowProperties* properties, | ||
843 | 54 | std::shared_ptr<mircv::InputPlatform> const& input_platform, | ||
844 | 55 | std::shared_ptr<mg::InternalClient> const& internal_client) | ||
845 | 56 | : window_properties(properties), | ||
846 | 57 | surface(instance.create_surface(properties->surface_parameters())), | ||
847 | 58 | internal_client(internal_client) | ||
848 | 59 | { | ||
849 | 60 | input_thread = input_platform->create_input_thread(surface->client_input_fd(), | ||
850 | 61 | std::bind(ua_ui_window_handle_event, properties->input_cb(), properties->input_context(), std::placeholders::_1)); | ||
851 | 62 | input_thread->start(); | ||
852 | 63 | } | ||
853 | 64 | |||
854 | 65 | uams::Window::~Window() | ||
855 | 66 | { | ||
856 | 67 | input_thread->stop(); | ||
857 | 68 | input_thread->join(); | ||
858 | 69 | } | ||
859 | 70 | |||
860 | 71 | UAUiWindow* uams::Window::as_u_window() | ||
861 | 72 | { | ||
862 | 73 | return static_cast<UAUiWindow*>(this); | ||
863 | 74 | } | ||
864 | 75 | |||
865 | 76 | uams::Window* uams::Window::from_u_window(UAUiWindow *u_window) | ||
866 | 77 | { | ||
867 | 78 | return static_cast<uams::Window*>(u_window); | ||
868 | 79 | } | ||
869 | 80 | |||
870 | 81 | EGLNativeWindowType uams::Window::get_native_type() | ||
871 | 82 | { | ||
872 | 83 | auto mir_surface = mf::as_internal_surface(surface); | ||
873 | 84 | return internal_client->egl_native_window(mir_surface); | ||
874 | 85 | } | ||
875 | 86 | 0 | ||
876 | === removed file 'src/ubuntu/application/common/mirserver/window_mirserver_priv.h' | |||
877 | --- src/ubuntu/application/common/mirserver/window_mirserver_priv.h 2014-04-04 10:38:36 +0000 | |||
878 | +++ src/ubuntu/application/common/mirserver/window_mirserver_priv.h 1970-01-01 00:00:00 +0000 | |||
879 | @@ -1,92 +0,0 @@ | |||
880 | 1 | /* | ||
881 | 2 | * Copyright (C) 2013 Canonical Ltd | ||
882 | 3 | * | ||
883 | 4 | * This program is free software: you can redistribute it and/or modify | ||
884 | 5 | * it under the terms of the GNU Lesser General Public License version 3 as | ||
885 | 6 | * published by the Free Software Foundation. | ||
886 | 7 | * | ||
887 | 8 | * This program is distributed in the hope that it will be useful, | ||
888 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
889 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
890 | 11 | * GNU Lesser General Public License for more details. | ||
891 | 12 | * | ||
892 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
893 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
894 | 15 | * | ||
895 | 16 | * Authored by: Robert Carr <robert.carr@canonical.com> | ||
896 | 17 | */ | ||
897 | 18 | |||
898 | 19 | #ifndef UBUNTU_APPLICATION_UI_WINDOW_MIRSERVER_PRIV_H_ | ||
899 | 20 | #define UBUNTU_APPLICATION_UI_WINDOW_MIRSERVER_PRIV_H_ | ||
900 | 21 | |||
901 | 22 | #include <ubuntu/application/ui/window.h> | ||
902 | 23 | |||
903 | 24 | #include <EGL/egl.h> | ||
904 | 25 | |||
905 | 26 | #include <stddef.h> | ||
906 | 27 | |||
907 | 28 | #include <functional> | ||
908 | 29 | #include <memory> | ||
909 | 30 | #include <string> | ||
910 | 31 | |||
911 | 32 | namespace mir | ||
912 | 33 | { | ||
913 | 34 | namespace scene | ||
914 | 35 | { | ||
915 | 36 | class Surface; | ||
916 | 37 | } | ||
917 | 38 | namespace input | ||
918 | 39 | { | ||
919 | 40 | namespace receiver | ||
920 | 41 | { | ||
921 | 42 | class InputReceiverThread; | ||
922 | 43 | class InputPlatform; | ||
923 | 44 | } | ||
924 | 45 | } | ||
925 | 46 | namespace graphics | ||
926 | 47 | { | ||
927 | 48 | class InternalClient; | ||
928 | 49 | } | ||
929 | 50 | } | ||
930 | 51 | |||
931 | 52 | namespace ubuntu | ||
932 | 53 | { | ||
933 | 54 | namespace application | ||
934 | 55 | { | ||
935 | 56 | namespace mir | ||
936 | 57 | { | ||
937 | 58 | namespace server | ||
938 | 59 | { | ||
939 | 60 | class Instance; | ||
940 | 61 | class WindowProperties; | ||
941 | 62 | |||
942 | 63 | class Window | ||
943 | 64 | { | ||
944 | 65 | public: | ||
945 | 66 | Window(Instance& instance, WindowProperties* properties, | ||
946 | 67 | std::shared_ptr< ::mir::input::receiver::InputPlatform> const& platform, | ||
947 | 68 | std::shared_ptr< ::mir::graphics::InternalClient> const& internal_client); | ||
948 | 69 | ~Window(); | ||
949 | 70 | |||
950 | 71 | UAUiWindow* as_u_window(); | ||
951 | 72 | static Window* from_u_window(UAUiWindow* u_window); | ||
952 | 73 | |||
953 | 74 | EGLNativeWindowType get_native_type(); | ||
954 | 75 | |||
955 | 76 | protected: | ||
956 | 77 | Window(Window const&) = delete; | ||
957 | 78 | Window& operator=(Window const&) = delete; | ||
958 | 79 | |||
959 | 80 | private: | ||
960 | 81 | std::unique_ptr<WindowProperties> window_properties; | ||
961 | 82 | std::shared_ptr< ::mir::scene::Surface> surface; | ||
962 | 83 | std::shared_ptr< ::mir::input::receiver::InputReceiverThread> input_thread; | ||
963 | 84 | std::shared_ptr< ::mir::graphics::InternalClient> internal_client; | ||
964 | 85 | }; | ||
965 | 86 | |||
966 | 87 | } | ||
967 | 88 | } | ||
968 | 89 | } | ||
969 | 90 | } | ||
970 | 91 | |||
971 | 92 | #endif // UBUNTU_APPLICATION_UI_WINDOW_MIRSERVER_PRIV_H_ | ||
972 | 93 | 0 | ||
973 | === removed file 'src/ubuntu/application/common/mirserver/window_properties_mirserver.cpp' | |||
974 | --- src/ubuntu/application/common/mirserver/window_properties_mirserver.cpp 2014-07-15 12:41:35 +0000 | |||
975 | +++ src/ubuntu/application/common/mirserver/window_properties_mirserver.cpp 1970-01-01 00:00:00 +0000 | |||
976 | @@ -1,77 +0,0 @@ | |||
977 | 1 | /* | ||
978 | 2 | * Copyright (C) 2013 Canonical Ltd | ||
979 | 3 | * | ||
980 | 4 | * This program is free software: you can redistribute it and/or modify | ||
981 | 5 | * it under the terms of the GNU Lesser General Public License version 3 as | ||
982 | 6 | * published by the Free Software Foundation. | ||
983 | 7 | * | ||
984 | 8 | * This program is distributed in the hope that it will be useful, | ||
985 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
986 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
987 | 11 | * GNU Lesser General Public License for more details. | ||
988 | 12 | * | ||
989 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
990 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
991 | 15 | * | ||
992 | 16 | * Authored by: Robert Carr <robert.carr@canonical.com> | ||
993 | 17 | */ | ||
994 | 18 | |||
995 | 19 | #include "window_properties_mirserver_priv.h" | ||
996 | 20 | |||
997 | 21 | #include <string> | ||
998 | 22 | |||
999 | 23 | namespace uams = ubuntu::application::mir::server; | ||
1000 | 24 | namespace ms = mir::scene; | ||
1001 | 25 | |||
1002 | 26 | uams::WindowProperties::WindowProperties() | ||
1003 | 27 | : parameters(ms::a_surface()), | ||
1004 | 28 | cb(nullptr), | ||
1005 | 29 | input_ctx(nullptr) | ||
1006 | 30 | { | ||
1007 | 31 | } | ||
1008 | 32 | |||
1009 | 33 | UAUiWindowProperties* uams::WindowProperties::as_u_window_properties() | ||
1010 | 34 | { | ||
1011 | 35 | return static_cast<UAUiWindowProperties*>(this); | ||
1012 | 36 | } | ||
1013 | 37 | |||
1014 | 38 | uams::WindowProperties* uams::WindowProperties::from_u_window_properties(UAUiWindowProperties* u_properties) | ||
1015 | 39 | { | ||
1016 | 40 | return static_cast<uams::WindowProperties*>(u_properties); | ||
1017 | 41 | } | ||
1018 | 42 | |||
1019 | 43 | void uams::WindowProperties::set_title(char const* title, size_t length) | ||
1020 | 44 | { | ||
1021 | 45 | parameters = parameters.of_name(std::string(title, length)); | ||
1022 | 46 | } | ||
1023 | 47 | |||
1024 | 48 | void uams::WindowProperties::set_input_cb_and_ctx(UAUiWindowInputEventCb callback, void* ctx) | ||
1025 | 49 | { | ||
1026 | 50 | cb = callback; | ||
1027 | 51 | input_ctx = ctx; | ||
1028 | 52 | } | ||
1029 | 53 | |||
1030 | 54 | void uams::WindowProperties::set_dimensions(uint32_t width, uint32_t height) | ||
1031 | 55 | { | ||
1032 | 56 | parameters = parameters.of_size(width, height); | ||
1033 | 57 | } | ||
1034 | 58 | |||
1035 | 59 | void uams::WindowProperties::set_pixel_format(MirPixelFormat const& format) | ||
1036 | 60 | { | ||
1037 | 61 | parameters = parameters.of_pixel_format(format); | ||
1038 | 62 | } | ||
1039 | 63 | |||
1040 | 64 | ms::SurfaceCreationParameters const& uams::WindowProperties::surface_parameters() const | ||
1041 | 65 | { | ||
1042 | 66 | return parameters; | ||
1043 | 67 | } | ||
1044 | 68 | |||
1045 | 69 | UAUiWindowInputEventCb uams::WindowProperties::input_cb() const | ||
1046 | 70 | { | ||
1047 | 71 | return cb; | ||
1048 | 72 | } | ||
1049 | 73 | |||
1050 | 74 | void* uams::WindowProperties::input_context() const | ||
1051 | 75 | { | ||
1052 | 76 | return input_ctx; | ||
1053 | 77 | } | ||
1054 | 78 | 0 | ||
1055 | === removed file 'src/ubuntu/application/common/mirserver/window_properties_mirserver_priv.h' | |||
1056 | --- src/ubuntu/application/common/mirserver/window_properties_mirserver_priv.h 2014-07-15 12:41:35 +0000 | |||
1057 | +++ src/ubuntu/application/common/mirserver/window_properties_mirserver_priv.h 1970-01-01 00:00:00 +0000 | |||
1058 | @@ -1,70 +0,0 @@ | |||
1059 | 1 | /* | ||
1060 | 2 | * Copyright (C) 2013 Canonical Ltd | ||
1061 | 3 | * | ||
1062 | 4 | * This program is free software: you can redistribute it and/or modify | ||
1063 | 5 | * it under the terms of the GNU Lesser General Public License version 3 as | ||
1064 | 6 | * published by the Free Software Foundation. | ||
1065 | 7 | * | ||
1066 | 8 | * This program is distributed in the hope that it will be useful, | ||
1067 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1068 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1069 | 11 | * GNU Lesser General Public License for more details. | ||
1070 | 12 | * | ||
1071 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
1072 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1073 | 15 | * | ||
1074 | 16 | * Authored by: Robert Carr <robert.carr@canonical.com> | ||
1075 | 17 | */ | ||
1076 | 18 | |||
1077 | 19 | #ifndef UBUNTU_APPLICATION_UI_WINDOW_PROPERTIES_MIRSERVER_PRIV_H_ | ||
1078 | 20 | #define UBUNTU_APPLICATION_UI_WINDOW_PROPERTIES_MIRSERVER_PRIV_H_ | ||
1079 | 21 | |||
1080 | 22 | #include <ubuntu/application/ui/window.h> | ||
1081 | 23 | |||
1082 | 24 | #include <mir/scene/surface_creation_parameters.h> | ||
1083 | 25 | #include <mir_toolkit/common.h> | ||
1084 | 26 | |||
1085 | 27 | namespace ubuntu | ||
1086 | 28 | { | ||
1087 | 29 | namespace application | ||
1088 | 30 | { | ||
1089 | 31 | namespace mir | ||
1090 | 32 | { | ||
1091 | 33 | namespace server | ||
1092 | 34 | { | ||
1093 | 35 | |||
1094 | 36 | class WindowProperties | ||
1095 | 37 | { | ||
1096 | 38 | public: | ||
1097 | 39 | WindowProperties(); | ||
1098 | 40 | ~WindowProperties() = default; | ||
1099 | 41 | |||
1100 | 42 | UAUiWindowProperties* as_u_window_properties(); | ||
1101 | 43 | static WindowProperties* from_u_window_properties(UAUiWindowProperties* u_properties); | ||
1102 | 44 | |||
1103 | 45 | void set_title(char const* title, size_t length); | ||
1104 | 46 | void set_input_cb_and_ctx(UAUiWindowInputEventCb cb, void* ctx); | ||
1105 | 47 | void set_dimensions(uint32_t width, uint32_t height); | ||
1106 | 48 | void set_pixel_format( MirPixelFormat const& format); | ||
1107 | 49 | |||
1108 | 50 | ::mir::scene::SurfaceCreationParameters const& surface_parameters() const; | ||
1109 | 51 | UAUiWindowInputEventCb input_cb() const; | ||
1110 | 52 | void* input_context() const; | ||
1111 | 53 | |||
1112 | 54 | protected: | ||
1113 | 55 | WindowProperties(WindowProperties const&) = delete; | ||
1114 | 56 | WindowProperties& operator=(WindowProperties const&) = delete; | ||
1115 | 57 | |||
1116 | 58 | private: | ||
1117 | 59 | ::mir::scene::SurfaceCreationParameters parameters; | ||
1118 | 60 | |||
1119 | 61 | UAUiWindowInputEventCb cb; | ||
1120 | 62 | void *input_ctx; | ||
1121 | 63 | }; | ||
1122 | 64 | |||
1123 | 65 | } | ||
1124 | 66 | } | ||
1125 | 67 | } | ||
1126 | 68 | } | ||
1127 | 69 | |||
1128 | 70 | #endif | ||
1129 | 71 | 0 | ||
1130 | === modified file 'src/ubuntu/application/desktop/CMakeLists.txt' | |||
1131 | --- src/ubuntu/application/desktop/CMakeLists.txt 2014-06-24 19:59:46 +0000 | |||
1132 | +++ src/ubuntu/application/desktop/CMakeLists.txt 2014-11-08 22:26:49 +0000 | |||
1133 | @@ -8,31 +8,11 @@ | |||
1134 | 8 | ubuntu_application_sensors_desktop.cpp | 8 | ubuntu_application_sensors_desktop.cpp |
1135 | 9 | ) | 9 | ) |
1136 | 10 | 10 | ||
1137 | 11 | add_library( | ||
1138 | 12 | ubuntu_application_api_desktop_mirserver MODULE | ||
1139 | 13 | |||
1140 | 14 | module.cpp | ||
1141 | 15 | module_version.h | ||
1142 | 16 | ubuntu_application_sensors_desktop.cpp | ||
1143 | 17 | ) | ||
1144 | 18 | |||
1145 | 19 | target_link_libraries( | 11 | target_link_libraries( |
1146 | 20 | ubuntu_application_api_desktop_mirclient | 12 | ubuntu_application_api_desktop_mirclient |
1147 | 21 | 13 | ||
1148 | 22 | "-Wl,--whole-archive" | 14 | "-Wl,--whole-archive" |
1149 | 23 | ubuntu_application_api_mirclient | 15 | ubuntu_application_api_mirclient |
1150 | 24 | ubuntu_application_api_mircommon | ||
1151 | 25 | ${UBUNTU_APPLICATION_API_LINK_LIBRARIES} | ||
1152 | 26 | "-Wl,--no-whole-archive" | ||
1153 | 27 | #TODO: Alarms | ||
1154 | 28 | ) | ||
1155 | 29 | |||
1156 | 30 | target_link_libraries( | ||
1157 | 31 | ubuntu_application_api_desktop_mirserver | ||
1158 | 32 | |||
1159 | 33 | "-Wl,--whole-archive" | ||
1160 | 34 | ubuntu_application_api_mirserver | ||
1161 | 35 | ubuntu_application_api_mircommon | ||
1162 | 36 | ${UBUNTU_APPLICATION_API_LINK_LIBRARIES} | 16 | ${UBUNTU_APPLICATION_API_LINK_LIBRARIES} |
1163 | 37 | "-Wl,--no-whole-archive" | 17 | "-Wl,--no-whole-archive" |
1164 | 38 | #TODO: Alarms | 18 | #TODO: Alarms |
1165 | @@ -45,22 +25,9 @@ | |||
1166 | 45 | SOVERSION ${UBUNTU_PLATFORM_API_VERSION_MAJOR} | 25 | SOVERSION ${UBUNTU_PLATFORM_API_VERSION_MAJOR} |
1167 | 46 | ) | 26 | ) |
1168 | 47 | 27 | ||
1169 | 48 | set_target_properties( | ||
1170 | 49 | ubuntu_application_api_desktop_mirserver | ||
1171 | 50 | PROPERTIES | ||
1172 | 51 | VERSION ${UBUNTU_PLATFORM_API_VERSION_MAJOR}.${UBUNTU_PLATFORM_API_VERSION_MINOR}.${UBUNTU_PLATFORM_API_VERSION_PATCH} | ||
1173 | 52 | SOVERSION ${UBUNTU_PLATFORM_API_VERSION_MAJOR} | ||
1174 | 53 | ) | ||
1175 | 54 | install( | 28 | install( |
1176 | 55 | TARGETS ubuntu_application_api_desktop_mirclient | 29 | TARGETS ubuntu_application_api_desktop_mirclient |
1177 | 56 | # this is not a development library to compile against, users should always | 30 | # this is not a development library to compile against, users should always |
1178 | 57 | # specify the SONAME; so don't build a *.so | 31 | # specify the SONAME; so don't build a *.so |
1179 | 58 | LIBRARY DESTINATION "${LIB_INSTALL_DIR}" NAMELINK_SKIP | 32 | LIBRARY DESTINATION "${LIB_INSTALL_DIR}" NAMELINK_SKIP |
1180 | 59 | ) | 33 | ) |
1181 | 60 | |||
1182 | 61 | install( | ||
1183 | 62 | TARGETS ubuntu_application_api_desktop_mirserver | ||
1184 | 63 | # this is not a development library to compile against, users should always | ||
1185 | 64 | # specify the SONAME; so don't build a *.so | ||
1186 | 65 | LIBRARY DESTINATION "${LIB_INSTALL_DIR}" NAMELINK_SKIP | ||
1187 | 66 | ) | ||
1188 | 67 | 34 | ||
1189 | === modified file 'src/ubuntu/application/desktop/module_version.h' | |||
1190 | --- src/ubuntu/application/desktop/module_version.h 2014-09-24 20:24:09 +0000 | |||
1191 | +++ src/ubuntu/application/desktop/module_version.h 2014-11-08 22:26:49 +0000 | |||
1192 | @@ -1,3 +1,3 @@ | |||
1195 | 1 | #define MODULE_VERSION_MAJOR 2 | 1 | #define MODULE_VERSION_MAJOR 3 |
1196 | 2 | #define MODULE_VERSION_MINOR 4 | 2 | #define MODULE_VERSION_MINOR 0 |
1197 | 3 | #define MODULE_VERSION_PATCH 0 | 3 | #define MODULE_VERSION_PATCH 0 |
1198 | 4 | 4 | ||
1199 | === modified file 'src/ubuntu/application/testbackend/module_version.h' | |||
1200 | --- src/ubuntu/application/testbackend/module_version.h 2014-09-24 20:24:09 +0000 | |||
1201 | +++ src/ubuntu/application/testbackend/module_version.h 2014-11-08 22:26:49 +0000 | |||
1202 | @@ -1,3 +1,3 @@ | |||
1205 | 1 | #define MODULE_VERSION_MAJOR 2 | 1 | #define MODULE_VERSION_MAJOR 3 |
1206 | 2 | #define MODULE_VERSION_MINOR 4 | 2 | #define MODULE_VERSION_MINOR 0 |
1207 | 3 | #define MODULE_VERSION_PATCH 0 | 3 | #define MODULE_VERSION_PATCH 0 |
1208 | 4 | 4 | ||
1209 | === modified file 'src/ubuntu/application/touch/CMakeLists.txt' | |||
1210 | --- src/ubuntu/application/touch/CMakeLists.txt 2014-05-26 12:56:45 +0000 | |||
1211 | +++ src/ubuntu/application/touch/CMakeLists.txt 2014-11-08 22:26:49 +0000 | |||
1212 | @@ -9,31 +9,11 @@ | |||
1213 | 9 | module_version.h | 9 | module_version.h |
1214 | 10 | ) | 10 | ) |
1215 | 11 | 11 | ||
1216 | 12 | add_library( | ||
1217 | 13 | ubuntu_application_api_touch_mirserver MODULE | ||
1218 | 14 | |||
1219 | 15 | module.cpp | ||
1220 | 16 | module_version.h | ||
1221 | 17 | ) | ||
1222 | 18 | |||
1223 | 19 | target_link_libraries( | 12 | target_link_libraries( |
1224 | 20 | ubuntu_application_api_touch_mirclient | 13 | ubuntu_application_api_touch_mirclient |
1225 | 21 | 14 | ||
1226 | 22 | "-Wl,--whole-archive" | 15 | "-Wl,--whole-archive" |
1227 | 23 | ubuntu_application_api_mirclient | 16 | ubuntu_application_api_mirclient |
1228 | 24 | ubuntu_application_api_mircommon | ||
1229 | 25 | ubuntu_application_api_hybris | ||
1230 | 26 | ${UBUNTU_APPLICATION_API_LINK_LIBRARIES} | ||
1231 | 27 | "-Wl,--no-whole-archive" | ||
1232 | 28 | #TODO: Alarms | ||
1233 | 29 | ) | ||
1234 | 30 | |||
1235 | 31 | target_link_libraries( | ||
1236 | 32 | ubuntu_application_api_touch_mirserver | ||
1237 | 33 | |||
1238 | 34 | "-Wl,--whole-archive" | ||
1239 | 35 | ubuntu_application_api_mirserver | ||
1240 | 36 | ubuntu_application_api_mircommon | ||
1241 | 37 | ubuntu_application_api_hybris | 17 | ubuntu_application_api_hybris |
1242 | 38 | ${UBUNTU_APPLICATION_API_LINK_LIBRARIES} | 18 | ${UBUNTU_APPLICATION_API_LINK_LIBRARIES} |
1243 | 39 | "-Wl,--no-whole-archive" | 19 | "-Wl,--no-whole-archive" |
1244 | @@ -47,22 +27,9 @@ | |||
1245 | 47 | SOVERSION ${UBUNTU_PLATFORM_API_VERSION_MAJOR} | 27 | SOVERSION ${UBUNTU_PLATFORM_API_VERSION_MAJOR} |
1246 | 48 | ) | 28 | ) |
1247 | 49 | 29 | ||
1248 | 50 | set_target_properties( | ||
1249 | 51 | ubuntu_application_api_touch_mirserver | ||
1250 | 52 | PROPERTIES | ||
1251 | 53 | VERSION ${UBUNTU_PLATFORM_API_VERSION_MAJOR}.${UBUNTU_PLATFORM_API_VERSION_MINOR}.${UBUNTU_PLATFORM_API_VERSION_PATCH} | ||
1252 | 54 | SOVERSION ${UBUNTU_PLATFORM_API_VERSION_MAJOR} | ||
1253 | 55 | ) | ||
1254 | 56 | install( | 30 | install( |
1255 | 57 | TARGETS ubuntu_application_api_touch_mirclient | 31 | TARGETS ubuntu_application_api_touch_mirclient |
1256 | 58 | # this is not a development library to compile against, users should always | 32 | # this is not a development library to compile against, users should always |
1257 | 59 | # specify the SONAME; so don't build a *.so | 33 | # specify the SONAME; so don't build a *.so |
1258 | 60 | LIBRARY DESTINATION "${LIB_INSTALL_DIR}" NAMELINK_SKIP | 34 | LIBRARY DESTINATION "${LIB_INSTALL_DIR}" NAMELINK_SKIP |
1259 | 61 | ) | 35 | ) |
1260 | 62 | |||
1261 | 63 | install( | ||
1262 | 64 | TARGETS ubuntu_application_api_touch_mirserver | ||
1263 | 65 | # this is not a development library to compile against, users should always | ||
1264 | 66 | # specify the SONAME; so don't build a *.so | ||
1265 | 67 | LIBRARY DESTINATION "${LIB_INSTALL_DIR}" NAMELINK_SKIP | ||
1266 | 68 | ) | ||
1267 | 69 | 36 | ||
1268 | === modified file 'src/ubuntu/application/touch/module_version.h' | |||
1269 | --- src/ubuntu/application/touch/module_version.h 2014-09-24 20:24:09 +0000 | |||
1270 | +++ src/ubuntu/application/touch/module_version.h 2014-11-08 22:26:49 +0000 | |||
1271 | @@ -1,3 +1,3 @@ | |||
1274 | 1 | #define MODULE_VERSION_MAJOR 2 | 1 | #define MODULE_VERSION_MAJOR 3 |
1275 | 2 | #define MODULE_VERSION_MINOR 4 | 2 | #define MODULE_VERSION_MINOR 0 |
1276 | 3 | #define MODULE_VERSION_PATCH 0 | 3 | #define MODULE_VERSION_PATCH 0 |
FAILED: Continuous integration, rev:266 jenkins. qa.ubuntu. com/job/ platform- api-ci/ 388/ jenkins. qa.ubuntu. com/job/ platform- api-vivid- amd64-ci/ 1 jenkins. qa.ubuntu. com/job/ platform- api-vivid- armhf-ci/ 1/console jenkins. qa.ubuntu. com/job/ platform- api-vivid- i386-ci/ 1
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/platform- api-ci/ 388/rebuild
http://