Merge lp:~mir-team/platform-api/remove-mirserver into lp:platform-api

Proposed by Alberto Aguirre
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
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

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

Lots of red, nice :)

armhf CI fail appears unrelated:
1/1 Test #1: test_ua_sensors_mock .............***Failed 2.01 sec
unsure how this change impacted it.

Since you're removing a feature from the library, think we'd better bump the version numbers.

review: Needs Fixing
Revision history for this message
Alberto Aguirre (albaguirre) wrote :

@Gerry,

Oh true, it merits a version bump.

CI now passed.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Gerry Boland (gerboland) wrote :

Please update the lib versions in CMakeLists.txt to match the debian version. Also these should match:
src/ubuntu/application/base_module.h
src/ubuntu/application/desktop/module_version.h
src/ubuntu/application/testbackend/module_version.h
src/ubuntu/application/touch/module_version.h

review: Needs Fixing
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Yes!

review: Approve
Revision history for this message
Kevin DuBois (kdub) wrote :

I had a branch of similar nature, this one looks good by me.

review: Approve
Revision history for this message
Alberto Aguirre (albaguirre) wrote :

@Kevin, IT IS your branch :) (see r265)

Revision history for this message
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_platform_hardware_api.so.2: cannot open shared object file: No such file or directory

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.

review: Needs Fixing
Revision history for this message
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://code.launchpad.net/~mir-team/platform-api/stub-mirserver/+merge/241820

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 plugin

Approved 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

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
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
6 project(ubuntu-platform-api)
7
8-set(UBUNTU_PLATFORM_API_VERSION_MAJOR 2)
9-set(UBUNTU_PLATFORM_API_VERSION_MINOR 5)
10+set(UBUNTU_PLATFORM_API_VERSION_MAJOR 3)
11+set(UBUNTU_PLATFORM_API_VERSION_MINOR 0)
12 set(UBUNTU_PLATFORM_API_VERSION_PATCH 0)
13
14 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
15@@ -58,7 +58,6 @@
16 )
17
18 find_package(PkgConfig)
19-pkg_check_modules(MIRSERVER REQUIRED mirserver)
20 pkg_check_modules(MIRCLIENT REQUIRED mirclient)
21
22 # Try to find hybris, and disable hybris from build if not found
23
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+platform-api (3.0.0) UNRELEASED; urgency=medium
29+
30+ * Remove mirserver backend
31+
32+ -- Alberto Aguirre <alberto.aguirre@canonical.com> Thu, 06 Nov 2014 14:39:00 -0600
33+
34 platform-api (2.5.0+15.04.20141027-0ubuntu1) vivid; urgency=low
35
36 [ Alexandros Frantzis ]
37
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 libhybris-common-dev,
43 pkg-config,
44 libmirclient-dev (>= 0.6.0),
45- libmirserver-dev (>= 0.6.0),
46 liburl-dispatcher1-dev,
47 libdbus-1-dev,
48 libdbus-cpp-dev (>= 4.0.0),
49
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 usr/lib/*/libubuntu_application_api_desktop_mirclient.so.*
55-usr/lib/*/libubuntu_application_api_desktop_mirserver.so.*
56
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-usr/lib/*/libubuntu_application_api_touch_mirserver.so.*
62 usr/lib/*/libubuntu_application_api_touch_mirclient.so.*
63
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 * This is the base backend loader for the Platform API
69 */
70
71-#define API_VERSION_MAJOR "2"
72-#define API_VERSION_MINOR "5"
73+#define API_VERSION_MAJOR "3"
74+#define API_VERSION_MINOR "0"
75 #define API_VERSION_PATCH "0"
76 #define SO_SUFFIX ".so." API_VERSION_MAJOR "." API_VERSION_MINOR "." API_VERSION_PATCH
77
78
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 )
84
85 add_subdirectory(application)
86-add_subdirectory(mircommon)
87 add_subdirectory(mirclient)
88-add_subdirectory(mirserver)
89
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 application_instance_mirclient.cpp
95 window_properties_mirclient.cpp
96 window_mirclient.cpp
97+ event_helpers_mir.cpp
98+ application_id_mir.cpp
99+ application_options_mir.cpp
100+ application_description_mir.cpp
101+ session_mir.cpp
102+ lifecycle_delegate_mir.cpp
103 )
104
105 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11 -fPIC")
106
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 #include "application_instance_mirclient_priv.h"
123 #include "window_properties_mirclient_priv.h"
124 #include "window_mirclient_priv.h"
125-#include "mircommon/lifecycle_delegate_mir_priv.h"
126+#include "lifecycle_delegate_mir_priv.h"
127
128-#include "mircommon/application_id_mir_priv.h"
129+#include "application_id_mir_priv.h"
130
131 #include <ubuntu/application/lifecycle_delegate.h>
132 #include <ubuntu/application/ui/window.h>
133
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 #include "window_properties_mirclient_priv.h"
139 #include "window_mirclient_priv.h"
140
141-#include "mircommon/event_helpers_mir.h"
142+#include "event_helpers_mir.h"
143
144 namespace uamc = ubuntu::application::mir::client;
145 namespace uaum = ubuntu::application::ui::mir;
146
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-set(SOURCES
153- event_helpers_mir.cpp
154- application_id_mir.cpp
155- application_options_mir.cpp
156- application_description_mir.cpp
157- session_mir.cpp
158- lifecycle_delegate_mir.cpp
159- )
160-
161-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC --std=c++11")
162-
163-include_directories(
164- ${MIRCLIENT_INCLUDE_DIRS}
165- )
166-
167-add_library(
168- ubuntu_application_api_mircommon STATIC
169- ${SOURCES}
170- )
171-
172-target_link_libraries(
173- ubuntu_application_api_mircommon
174-
175- ${LINK_LIBRARIES}
176- )
177
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-set(SOURCES
184- ubuntu_application_api_mirserver.cpp
185- application_instance_mirserver.cpp
186- window_properties_mirserver.cpp
187- window_mirserver.cpp
188-)
189-
190-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11 -fPIC")
191-
192-include_directories(
193- ${CMAKE_BINARY_DIR}/include
194- ${MIRSERVER_INCLUDE_DIRS}
195-)
196-
197-add_library(
198- ubuntu_application_api_mirserver STATIC
199- ${SOURCES}
200-)
201-
202-target_link_libraries(
203- ubuntu_application_api_mirserver
204-
205- ${MIRSERVER_LDFLAGS} ${MIRSERVER_LIBRARIES}
206-)
207
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-/*
213- * Copyright (C) 2013 Canonical Ltd
214- *
215- * This program is free software: you can redistribute it and/or modify
216- * it under the terms of the GNU Lesser General Public License version 3 as
217- * published by the Free Software Foundation.
218- *
219- * This program is distributed in the hope that it will be useful,
220- * but WITHOUT ANY WARRANTY; without even the implied warranty of
221- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
222- * GNU Lesser General Public License for more details.
223- *
224- * You should have received a copy of the GNU Lesser General Public License
225- * along with this program. If not, see <http://www.gnu.org/licenses/>.
226- *
227- * Authored by: Robert Carr <robert.carr@canonical.com>
228- */
229-
230-#include "application_instance_mirserver_priv.h"
231-
232-#include "mircommon/application_description_mir_priv.h"
233-#include "mircommon/application_options_mir_priv.h"
234-#include "mircommon/application_id_mir_priv.h"
235-
236-#include <mir/scene/surface.h>
237-#include <mir/scene/surface_coordinator.h>
238-#include <mir/scene/session.h>
239-#include <mir/scene/session_listener.h>
240-#include <mir/scene/surface_creation_parameters.h>
241-#include <mir/scene/snapshot.h>
242-
243-namespace uam = ubuntu::application::mir;
244-namespace uams = uam::server;
245-
246-namespace mf = mir::frontend;
247-namespace ms = mir::scene;
248-
249-namespace
250-{
251-/* A Mir in-process client does not have an associated Session by default. However it is
252- * useful for the shell to be able to position and identify its own surface, so need to
253- * create a mock implementation of Session for that respective Surface.
254- */
255-class InProcessClientSession : public ms::Session
256-{
257-public:
258- virtual void force_requests_to_complete() override {}
259- virtual pid_t process_id() const override { return 0; }
260- virtual void take_snapshot(ms::SnapshotCallback const&) override {}
261- virtual std::shared_ptr<ms::Surface> default_surface() const override { return surface; }
262- virtual void set_lifecycle_state(MirLifecycleState) override {}
263-
264- virtual mf::SurfaceId create_surface(ms::SurfaceCreationParameters const& ) override { return mf::SurfaceId(0); }
265- virtual void destroy_surface(mf::SurfaceId) override {}
266- virtual std::shared_ptr<mf::Surface> get_surface(mf::SurfaceId) const override { return surface; }
267- virtual std::string name() const override { return "Shell"; }
268- virtual void hide() override {}
269- virtual void show() override {}
270- virtual void send_display_config(mir::graphics::DisplayConfiguration const&) override {}
271-
272- virtual void start_prompt_session() override {}
273- virtual void stop_prompt_session() override {}
274-private:
275- std::shared_ptr<ms::Surface> const surface;
276-};
277-
278-InProcessClientSession& global_session()
279-{
280- static InProcessClientSession session;
281- return session;
282-}
283-}
284-
285-uams::Instance::Instance(std::shared_ptr<ms::SurfaceCoordinator> const &surface_coordinator,
286- std::shared_ptr<ms::SessionListener> const &session_listener,
287- uam::Description* description_,
288- uam::Options *options_)
289- : surface_coordinator(surface_coordinator),
290- session_listener(session_listener),
291- ref_count(1)
292-{
293- description = DescriptionPtr(description_,
294- [] (uam::Description* p)
295- {
296- delete p;
297- });
298- options = OptionsPtr(options_,
299- [] (uam::Options* p)
300- {
301- delete p;
302- });
303-}
304-
305-UApplicationInstance* uams::Instance::as_u_application_instance()
306-{
307- return static_cast<UApplicationInstance*>(this);
308-}
309-
310-uams::Instance* uams::Instance::from_u_application_instance(UApplicationInstance *u_instance)
311-{
312- return static_cast<uams::Instance*>(u_instance);
313-}
314-
315-void uams::Instance::ref()
316-{
317- ref_count++;
318-}
319-
320-void uams::Instance::unref()
321-{
322- ref_count--;
323- if (ref_count == 0)
324- delete this;
325-}
326-
327-std::shared_ptr<ms::Surface> uams::Instance::create_surface(ms::SurfaceCreationParameters const& parameters)
328-{
329- ms::Session& session = global_session();
330- auto surface = surface_coordinator->add_surface(parameters, &session);
331- // Need to call the SessionListener ourselves, else shell not notified of this surface creation
332- session_listener->surface_created(session, surface);
333- return surface;
334-}
335
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-/*
341- * Copyright (C) 2013 Canonical Ltd
342- *
343- * This program is free software: you can redistribute it and/or modify
344- * it under the terms of the GNU Lesser General Public License version 3 as
345- * published by the Free Software Foundation.
346- *
347- * This program is distributed in the hope that it will be useful,
348- * but WITHOUT ANY WARRANTY; without even the implied warranty of
349- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
350- * GNU Lesser General Public License for more details.
351- *
352- * You should have received a copy of the GNU Lesser General Public License
353- * along with this program. If not, see <http://www.gnu.org/licenses/>.
354- *
355- * Authored by: Robert Carr <robert.carr@canonical.com>
356- */
357-
358-#ifndef UBUNTU_APPLICATION_INSTANCE_MIRSERVER_PRIV_H_
359-#define UBUNTU_APPLICATION_INSTANCE_MIRSERVER_PRIV_H_
360-
361-#include <ubuntu/application/instance.h>
362-
363-#include <memory>
364-#include <functional>
365-
366-namespace mir
367-{
368-namespace scene
369-{
370-class Surface;
371-class SurfaceCoordinator;
372-class SessionListener;
373-class SurfaceCreationParameters;
374-}
375-}
376-
377-namespace ubuntu
378-{
379-namespace application
380-{
381-namespace mir
382-{
383-class Description;
384-class Options;
385-
386-namespace server
387-{
388-
389-class Instance
390-{
391-public:
392- Instance(std::shared_ptr< ::mir::scene::SurfaceCoordinator> const& surface_coordinator,
393- std::shared_ptr< ::mir::scene::SessionListener> const& session_listener,
394- ubuntu::application::mir::Description* description,
395- ubuntu::application::mir::Options *options);
396- ~Instance() = default;
397-
398- UApplicationInstance* as_u_application_instance();
399- static Instance* from_u_application_instance(UApplicationInstance* u_instance);
400-
401- void ref();
402- void unref();
403-
404- std::shared_ptr< ::mir::scene::Surface> create_surface( ::mir::scene::SurfaceCreationParameters const& parameters);
405-
406-protected:
407- Instance(Instance const&) = delete;
408- Instance& operator=(Instance const&) = delete;
409-
410-private:
411- typedef std::unique_ptr<Description, std::function<void(Description*)>> DescriptionPtr;
412- typedef std::unique_ptr<Options, std::function<void(Options*)>> OptionsPtr;
413-
414- OptionsPtr options;
415- DescriptionPtr description;
416-
417- std::shared_ptr< ::mir::scene::SurfaceCoordinator> const surface_coordinator;
418- std::shared_ptr< ::mir::scene::SessionListener> const session_listener;
419-
420- int ref_count;
421-};
422-
423-}
424-}
425-}
426-} // namespace ubuntu
427-
428-#endif // UBUNTU_APPLICATION_INSTANCE_MIRSERVER_PRIV_H_
429
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-/*
435- * Copyright (C) 2013 Canonical Ltd
436- *
437- * This program is free software: you can redistribute it and/or modify
438- * it under the terms of the GNU Lesser General Public License version 3 as
439- * published by the Free Software Foundation.
440- *
441- * This program is distributed in the hope that it will be useful,
442- * but WITHOUT ANY WARRANTY; without even the implied warranty of
443- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
444- * GNU Lesser General Public License for more details.
445- *
446- * You should have received a copy of the GNU Lesser General Public License
447- * along with this program. If not, see <http://www.gnu.org/licenses/>.
448- *
449- * Authored by: Robert Carr <robert.carr@canonical.com>
450- */
451-
452-#include "application_instance_mirserver_priv.h"
453-#include "window_properties_mirserver_priv.h"
454-#include "window_mirserver_priv.h"
455-
456-#include "mircommon/application_id_mir_priv.h"
457-#include "mircommon/application_description_mir_priv.h"
458-#include "mircommon/application_options_mir_priv.h"
459-#include "mircommon/mir/geometry/rectangles.h"
460-
461-// C APIs
462-#include <ubuntu/application/init.h>
463-#include <ubuntu/application/lifecycle_delegate.h>
464-#include <ubuntu/application/ui/window.h>
465-#include <ubuntu/application/ui/options.h>
466-#include <ubuntu/application/ui/session.h>
467-#include <ubuntu/application/ui/clipboard.h>
468-#include <ubuntu/application/ui/display.h>
469-#include <ubuntu/application/sensors/accelerometer.h>
470-#include <ubuntu/application/sensors/proximity.h>
471-#include <ubuntu/application/sensors/light.h>
472-
473-#include <mir/default_server_configuration.h>
474-
475-#include <mir/graphics/display.h>
476-#include <mir/graphics/display_buffer.h>
477-#include <mir/graphics/platform.h>
478-#include <mir/graphics/graphic_buffer_allocator.h>
479-#include <mir/graphics/internal_client.h>
480-#include <mir/input/input_platform.h>
481-
482-#include <assert.h>
483-
484-#include <memory>
485-#include <functional>
486-
487-namespace uam = ubuntu::application::mir;
488-namespace uams = ubuntu::application::mir::server;
489-
490-namespace
491-{
492-
493-struct MirServerContext
494-{
495- std::shared_ptr<mir::graphics::Display> display;
496- std::shared_ptr<mir::graphics::GraphicBufferAllocator> buffer_allocator;
497- std::shared_ptr<mir::scene::SurfaceCoordinator> surface_coordinator;
498- std::shared_ptr<mir::scene::SessionListener> session_listener;
499- std::shared_ptr<mir::input::receiver::InputPlatform> input_platform;
500- std::shared_ptr<mir::graphics::InternalClient> egl_client;
501-};
502-
503-MirServerContext *
504-global_mirserver_context()
505-{
506- static MirServerContext context;
507- return &context;
508-}
509-}
510-
511-extern "C"
512-{
513-void u_application_init(void *args)
514-{
515- auto context = global_mirserver_context();
516- mir::DefaultServerConfiguration* config = reinterpret_cast<mir::DefaultServerConfiguration*>(args);
517-
518- context->surface_coordinator = config->the_surface_coordinator();
519- context->buffer_allocator = config->the_buffer_allocator();
520- context->display = config->the_display();
521- context->session_listener = config->the_session_listener();
522- context->input_platform = mir::input::receiver::InputPlatform::create();
523- context->egl_client = config->the_graphics_platform()->create_internal_client();
524-}
525-
526-void u_application_finish()
527-{
528- auto context = global_mirserver_context();
529-
530- context->display.reset();
531- context->surface_coordinator.reset();
532- context->session_listener.reset();
533- context->input_platform.reset();
534- context->egl_client.reset();
535-}
536-
537-UApplicationInstance* u_application_instance_new_from_description_with_options(UApplicationDescription* u_description, UApplicationOptions* u_options)
538-{
539- auto surface_coordinator = global_mirserver_context()->surface_coordinator;
540- assert(surface_coordinator);
541- auto session_listener = global_mirserver_context()->session_listener;
542- assert(session_listener);
543-
544- auto description = uam::Description::from_u_application_description(u_description);
545- auto options = uam::Options::from_u_application_options(u_options);
546-
547- auto instance = new uams::Instance(surface_coordinator, session_listener, description, options);
548-
549- return instance->as_u_application_instance();
550-}
551-
552-void
553-u_application_instance_ref(UApplicationInstance *u_instance)
554-{
555- auto instance = uams::Instance::from_u_application_instance(u_instance);
556- instance->ref();
557-}
558-
559-void
560-u_application_instance_unref(UApplicationInstance *u_instance)
561-{
562- auto instance = uams::Instance::from_u_application_instance(u_instance);
563- instance->unref();
564-}
565-
566-void
567-u_application_instance_destroy(UApplicationInstance *instance)
568-{
569- // TODO<papi>: What are the proper semantics here.
570- u_application_instance_unref(instance);
571-}
572-
573-void
574-u_application_instance_run(UApplicationInstance *instance)
575-{
576- // TODO<papi>: What is this supposed to do? Seems to be no-op on hybris.
577- (void) instance;
578-}
579-
580-void ua_ui_set_clipboard_content(void* content, size_t content_size)
581-{
582- // TODO<mir,papi>: Implement. Probably need more arguments?
583- (void) content;
584- (void) content_size;
585-}
586-
587-void ua_ui_get_clipboard_content(void** out_content, size_t* out_content_size)
588-{
589- // TODO<mir,papi>: Implement
590- *out_content = NULL;
591- *out_content_size = 0;
592-}
593-
594-UAUiDisplay* ua_ui_display_new_with_index(size_t index)
595-{
596- // TODO<mir>: Make use of index. This is kind of strangely done...
597- return reinterpret_cast<UAUiDisplay*>(index);
598-}
599-
600-void ua_ui_display_destroy(UAUiDisplay* display)
601-{
602- // TODO: Implement. Or is this a noop for mirserver?
603- (void) display;
604-}
605-
606-uint32_t ua_ui_display_query_horizontal_res(UAUiDisplay* display)
607-{
608- (void) display; // TODO<mir>: Multiple displays
609-
610- auto mir_display = global_mirserver_context()->display;
611- assert(mir_display);
612-
613- /* TODO: Get proper configuration */
614- mir::geometry::Rectangles view_area;
615- mir_display->for_each_display_buffer([&view_area](mir::graphics::DisplayBuffer const& db)
616- {
617- view_area.add(db.view_area());
618- });
619- mir::geometry::Size const display_size{view_area.bounding_rectangle().size};
620-
621- return display_size.width.as_uint32_t();
622-}
623-
624-uint32_t ua_ui_display_query_vertical_res(UAUiDisplay* display)
625-{
626- (void) display; // TODO<mir>: Multiple displays
627-
628- auto mir_display = global_mirserver_context()->display;
629- assert(mir_display);
630-
631- /* TODO: Get proper configuration */
632- mir::geometry::Rectangles view_area;
633- mir_display->for_each_display_buffer([&view_area](mir::graphics::DisplayBuffer const& db)
634- {
635- view_area.add(db.view_area());
636- });
637- mir::geometry::Size const display_size{view_area.bounding_rectangle().size};
638-
639- return display_size.height.as_uint32_t();
640-}
641-
642-EGLNativeDisplayType ua_ui_display_get_native_type(UAUiDisplay* display)
643-{
644- auto internal_client = global_mirserver_context()->egl_client;
645- assert(internal_client);
646-
647- return internal_client->egl_native_display();
648-}
649-
650-namespace
651-{
652-static MirPixelFormat choose_pixel_format(std::shared_ptr<mir::graphics::GraphicBufferAllocator> const& allocator)
653-{
654- auto formats = allocator->supported_pixel_formats();
655- return formats[0];
656-}
657-}
658-
659-UAUiWindowProperties* ua_ui_window_properties_new_for_normal_window()
660-{
661- auto properties = new uams::WindowProperties();
662-
663- return properties->as_u_window_properties();
664-}
665-
666-void ua_ui_window_properties_destroy(UAUiWindowProperties* u_properties)
667-{
668- auto properties = uams::WindowProperties::from_u_window_properties(u_properties);
669- delete properties;
670-}
671-
672-void ua_ui_window_properties_set_titlen(UAUiWindowProperties* u_properties, const char* title, size_t title_length)
673-{
674- auto properties = uams::WindowProperties::from_u_window_properties(u_properties);
675- properties->set_title(title, title_length);
676-}
677-
678-const char* ua_ui_window_properties_get_title(UAUiWindowProperties* u_properties)
679-{
680- auto properties = uams::WindowProperties::from_u_window_properties(u_properties);
681- return properties->surface_parameters().name.c_str();
682-}
683-
684-void ua_ui_window_properties_set_role(UAUiWindowProperties* properties, UAUiWindowRole role)
685-{
686- // TODO<papi>: Implement. Or is this a noop for us?
687- (void) properties;
688- (void) role;
689-}
690-
691-void ua_ui_window_properties_set_event_cb_and_ctx(UAUiWindowProperties*, UAUiWindowEventCb, void*)
692-{
693-}
694-
695-void ua_ui_window_properties_set_input_cb_and_ctx(UAUiWindowProperties* u_properties, UAUiWindowInputEventCb cb, void* ctx)
696-{
697- auto properties = uams::WindowProperties::from_u_window_properties(u_properties);
698- properties->set_input_cb_and_ctx(cb, ctx);
699-}
700-
701-void ua_ui_window_properties_set_dimensions(UAUiWindowProperties *u_properties, uint32_t width, uint32_t height)
702-{
703- auto properties = uams::WindowProperties::from_u_window_properties(u_properties);
704- properties->set_dimensions(width, height);
705-}
706-
707-UAUiWindow* ua_ui_window_new_for_application_with_properties(UApplicationInstance* u_instance, UAUiWindowProperties* u_properties)
708-{
709- auto input_platform = global_mirserver_context()->input_platform;
710- assert(input_platform);
711- auto internal_client = global_mirserver_context()->egl_client;
712- assert(internal_client);
713-
714- auto instance = uams::Instance::from_u_application_instance(u_instance);
715- auto properties = uams::WindowProperties::from_u_window_properties(u_properties);
716-
717- // A bit of a wart.
718- properties->set_pixel_format(choose_pixel_format(global_mirserver_context()->buffer_allocator));
719-
720- auto window = new uams::Window(*instance, properties, input_platform, internal_client);
721-
722- return window->as_u_window();
723-}
724-
725-void ua_ui_window_destroy(UAUiWindow* u_window)
726-{
727- auto window = uams::Window::from_u_window(u_window);
728- delete window;
729-}
730-
731-void ua_ui_window_get_size(UAUiWindow* u_window, uint32_t *width, uint32_t *height)
732-{
733- (void) u_window;
734- (void) width;
735- (void) height;
736-}
737-
738-UStatus ua_ui_window_move(UAUiWindow* window, uint32_t x, uint32_t y)
739-{
740- // TODO<mir,papi>: Implement. But should this exist?
741- (void) window;
742- (void) x;
743- (void) y;
744- return (UStatus) 0;
745-}
746-
747-UStatus ua_ui_window_resize(UAUiWindow* window, uint32_t width, uint32_t height)
748-{
749- // TODO<mir>: Implement
750- (void) window;
751- (void) width;
752- (void) height;
753- return (UStatus) 0;
754-}
755-
756-UStatus ua_ui_window_hide(UAUiWindow* window)
757-{
758- // TODO<mir>: Implement
759- (void) window;
760- return (UStatus) 0;
761-}
762-
763-UStatus ua_ui_window_show(UAUiWindow* window)
764-{
765- // TODO<mir>: Implement
766- (void) window;
767- return (UStatus) 0;
768-}
769-
770-void ua_ui_window_request_fullscreen(UAUiWindow* window)
771-{
772- // TODO<mir>: Implement
773- (void) window;
774-}
775-
776-EGLNativeWindowType ua_ui_window_get_native_type(UAUiWindow* u_window)
777-{
778- auto window = uams::Window::from_u_window(u_window);
779-
780- return window->get_native_type();
781-}
782-
783-// TODO: Sensors
784-}
785
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-/*
791- * Copyright (C) 2013 Canonical Ltd
792- *
793- * This program is free software: you can redistribute it and/or modify
794- * it under the terms of the GNU Lesser General Public License version 3 as
795- * published by the Free Software Foundation.
796- *
797- * This program is distributed in the hope that it will be useful,
798- * but WITHOUT ANY WARRANTY; without even the implied warranty of
799- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
800- * GNU Lesser General Public License for more details.
801- *
802- * You should have received a copy of the GNU Lesser General Public License
803- * along with this program. If not, see <http://www.gnu.org/licenses/>.
804- *
805- * Authored by: Robert Carr <robert.carr@canonical.com>
806- */
807-
808-#include "mircommon/event_helpers_mir.h"
809-
810-#include "window_mirserver_priv.h"
811-#include "application_instance_mirserver_priv.h"
812-#include "window_properties_mirserver_priv.h"
813-
814-
815-#include <mir/scene/surface.h>
816-#include <mir/input/input_platform.h>
817-#include <mir/input/input_receiver_thread.h>
818-#include <mir/graphics/internal_client.h>
819-#include <mir/graphics/internal_surface.h>
820-
821-namespace uams = ubuntu::application::mir::server;
822-namespace uaum = ubuntu::application::ui::mir;
823-
824-namespace mf = mir::frontend;
825-namespace mg = mir::graphics;
826-namespace msh = mir::shell;
827-namespace mircv = mir::input::receiver;
828-
829-namespace
830-{
831-
832-static void ua_ui_window_handle_event(UAUiWindowInputEventCb cb, void* ctx, MirEvent* mir_event)
833-{
834- Event ubuntu_ev;
835- auto translated_event = uaum::event_to_ubuntu_deprecated_event(mir_event, ubuntu_ev);
836- if (translated_event)
837- cb(ctx, &ubuntu_ev);
838-}
839-
840-}
841-
842-uams::Window::Window(uams::Instance& instance, uams::WindowProperties* properties,
843- std::shared_ptr<mircv::InputPlatform> const& input_platform,
844- std::shared_ptr<mg::InternalClient> const& internal_client)
845- : window_properties(properties),
846- surface(instance.create_surface(properties->surface_parameters())),
847- internal_client(internal_client)
848-{
849- input_thread = input_platform->create_input_thread(surface->client_input_fd(),
850- std::bind(ua_ui_window_handle_event, properties->input_cb(), properties->input_context(), std::placeholders::_1));
851- input_thread->start();
852-}
853-
854-uams::Window::~Window()
855-{
856- input_thread->stop();
857- input_thread->join();
858-}
859-
860-UAUiWindow* uams::Window::as_u_window()
861-{
862- return static_cast<UAUiWindow*>(this);
863-}
864-
865-uams::Window* uams::Window::from_u_window(UAUiWindow *u_window)
866-{
867- return static_cast<uams::Window*>(u_window);
868-}
869-
870-EGLNativeWindowType uams::Window::get_native_type()
871-{
872- auto mir_surface = mf::as_internal_surface(surface);
873- return internal_client->egl_native_window(mir_surface);
874-}
875
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-/*
881- * Copyright (C) 2013 Canonical Ltd
882- *
883- * This program is free software: you can redistribute it and/or modify
884- * it under the terms of the GNU Lesser General Public License version 3 as
885- * published by the Free Software Foundation.
886- *
887- * This program is distributed in the hope that it will be useful,
888- * but WITHOUT ANY WARRANTY; without even the implied warranty of
889- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
890- * GNU Lesser General Public License for more details.
891- *
892- * You should have received a copy of the GNU Lesser General Public License
893- * along with this program. If not, see <http://www.gnu.org/licenses/>.
894- *
895- * Authored by: Robert Carr <robert.carr@canonical.com>
896- */
897-
898-#ifndef UBUNTU_APPLICATION_UI_WINDOW_MIRSERVER_PRIV_H_
899-#define UBUNTU_APPLICATION_UI_WINDOW_MIRSERVER_PRIV_H_
900-
901-#include <ubuntu/application/ui/window.h>
902-
903-#include <EGL/egl.h>
904-
905-#include <stddef.h>
906-
907-#include <functional>
908-#include <memory>
909-#include <string>
910-
911-namespace mir
912-{
913-namespace scene
914-{
915-class Surface;
916-}
917-namespace input
918-{
919-namespace receiver
920-{
921-class InputReceiverThread;
922-class InputPlatform;
923-}
924-}
925-namespace graphics
926-{
927-class InternalClient;
928-}
929-}
930-
931-namespace ubuntu
932-{
933-namespace application
934-{
935-namespace mir
936-{
937-namespace server
938-{
939-class Instance;
940-class WindowProperties;
941-
942-class Window
943-{
944-public:
945- Window(Instance& instance, WindowProperties* properties,
946- std::shared_ptr< ::mir::input::receiver::InputPlatform> const& platform,
947- std::shared_ptr< ::mir::graphics::InternalClient> const& internal_client);
948- ~Window();
949-
950- UAUiWindow* as_u_window();
951- static Window* from_u_window(UAUiWindow* u_window);
952-
953- EGLNativeWindowType get_native_type();
954-
955-protected:
956- Window(Window const&) = delete;
957- Window& operator=(Window const&) = delete;
958-
959-private:
960- std::unique_ptr<WindowProperties> window_properties;
961- std::shared_ptr< ::mir::scene::Surface> surface;
962- std::shared_ptr< ::mir::input::receiver::InputReceiverThread> input_thread;
963- std::shared_ptr< ::mir::graphics::InternalClient> internal_client;
964-};
965-
966-}
967-}
968-}
969-}
970-
971-#endif // UBUNTU_APPLICATION_UI_WINDOW_MIRSERVER_PRIV_H_
972
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-/*
978- * Copyright (C) 2013 Canonical Ltd
979- *
980- * This program is free software: you can redistribute it and/or modify
981- * it under the terms of the GNU Lesser General Public License version 3 as
982- * published by the Free Software Foundation.
983- *
984- * This program is distributed in the hope that it will be useful,
985- * but WITHOUT ANY WARRANTY; without even the implied warranty of
986- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
987- * GNU Lesser General Public License for more details.
988- *
989- * You should have received a copy of the GNU Lesser General Public License
990- * along with this program. If not, see <http://www.gnu.org/licenses/>.
991- *
992- * Authored by: Robert Carr <robert.carr@canonical.com>
993- */
994-
995-#include "window_properties_mirserver_priv.h"
996-
997-#include <string>
998-
999-namespace uams = ubuntu::application::mir::server;
1000-namespace ms = mir::scene;
1001-
1002-uams::WindowProperties::WindowProperties()
1003- : parameters(ms::a_surface()),
1004- cb(nullptr),
1005- input_ctx(nullptr)
1006-{
1007-}
1008-
1009-UAUiWindowProperties* uams::WindowProperties::as_u_window_properties()
1010-{
1011- return static_cast<UAUiWindowProperties*>(this);
1012-}
1013-
1014-uams::WindowProperties* uams::WindowProperties::from_u_window_properties(UAUiWindowProperties* u_properties)
1015-{
1016- return static_cast<uams::WindowProperties*>(u_properties);
1017-}
1018-
1019-void uams::WindowProperties::set_title(char const* title, size_t length)
1020-{
1021- parameters = parameters.of_name(std::string(title, length));
1022-}
1023-
1024-void uams::WindowProperties::set_input_cb_and_ctx(UAUiWindowInputEventCb callback, void* ctx)
1025-{
1026- cb = callback;
1027- input_ctx = ctx;
1028-}
1029-
1030-void uams::WindowProperties::set_dimensions(uint32_t width, uint32_t height)
1031-{
1032- parameters = parameters.of_size(width, height);
1033-}
1034-
1035-void uams::WindowProperties::set_pixel_format(MirPixelFormat const& format)
1036-{
1037- parameters = parameters.of_pixel_format(format);
1038-}
1039-
1040-ms::SurfaceCreationParameters const& uams::WindowProperties::surface_parameters() const
1041-{
1042- return parameters;
1043-}
1044-
1045-UAUiWindowInputEventCb uams::WindowProperties::input_cb() const
1046-{
1047- return cb;
1048-}
1049-
1050-void* uams::WindowProperties::input_context() const
1051-{
1052- return input_ctx;
1053-}
1054
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-/*
1060- * Copyright (C) 2013 Canonical Ltd
1061- *
1062- * This program is free software: you can redistribute it and/or modify
1063- * it under the terms of the GNU Lesser General Public License version 3 as
1064- * published by the Free Software Foundation.
1065- *
1066- * This program is distributed in the hope that it will be useful,
1067- * but WITHOUT ANY WARRANTY; without even the implied warranty of
1068- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1069- * GNU Lesser General Public License for more details.
1070- *
1071- * You should have received a copy of the GNU Lesser General Public License
1072- * along with this program. If not, see <http://www.gnu.org/licenses/>.
1073- *
1074- * Authored by: Robert Carr <robert.carr@canonical.com>
1075- */
1076-
1077-#ifndef UBUNTU_APPLICATION_UI_WINDOW_PROPERTIES_MIRSERVER_PRIV_H_
1078-#define UBUNTU_APPLICATION_UI_WINDOW_PROPERTIES_MIRSERVER_PRIV_H_
1079-
1080-#include <ubuntu/application/ui/window.h>
1081-
1082-#include <mir/scene/surface_creation_parameters.h>
1083-#include <mir_toolkit/common.h>
1084-
1085-namespace ubuntu
1086-{
1087-namespace application
1088-{
1089-namespace mir
1090-{
1091-namespace server
1092-{
1093-
1094-class WindowProperties
1095-{
1096-public:
1097- WindowProperties();
1098- ~WindowProperties() = default;
1099-
1100- UAUiWindowProperties* as_u_window_properties();
1101- static WindowProperties* from_u_window_properties(UAUiWindowProperties* u_properties);
1102-
1103- void set_title(char const* title, size_t length);
1104- void set_input_cb_and_ctx(UAUiWindowInputEventCb cb, void* ctx);
1105- void set_dimensions(uint32_t width, uint32_t height);
1106- void set_pixel_format( MirPixelFormat const& format);
1107-
1108- ::mir::scene::SurfaceCreationParameters const& surface_parameters() const;
1109- UAUiWindowInputEventCb input_cb() const;
1110- void* input_context() const;
1111-
1112-protected:
1113- WindowProperties(WindowProperties const&) = delete;
1114- WindowProperties& operator=(WindowProperties const&) = delete;
1115-
1116-private:
1117- ::mir::scene::SurfaceCreationParameters parameters;
1118-
1119- UAUiWindowInputEventCb cb;
1120- void *input_ctx;
1121-};
1122-
1123-}
1124-}
1125-}
1126-}
1127-
1128-#endif
1129
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 ubuntu_application_sensors_desktop.cpp
1135 )
1136
1137-add_library(
1138- ubuntu_application_api_desktop_mirserver MODULE
1139-
1140- module.cpp
1141- module_version.h
1142- ubuntu_application_sensors_desktop.cpp
1143-)
1144-
1145 target_link_libraries(
1146 ubuntu_application_api_desktop_mirclient
1147
1148 "-Wl,--whole-archive"
1149 ubuntu_application_api_mirclient
1150- ubuntu_application_api_mircommon
1151- ${UBUNTU_APPLICATION_API_LINK_LIBRARIES}
1152- "-Wl,--no-whole-archive"
1153- #TODO: Alarms
1154-)
1155-
1156-target_link_libraries(
1157- ubuntu_application_api_desktop_mirserver
1158-
1159- "-Wl,--whole-archive"
1160- ubuntu_application_api_mirserver
1161- ubuntu_application_api_mircommon
1162 ${UBUNTU_APPLICATION_API_LINK_LIBRARIES}
1163 "-Wl,--no-whole-archive"
1164 #TODO: Alarms
1165@@ -45,22 +25,9 @@
1166 SOVERSION ${UBUNTU_PLATFORM_API_VERSION_MAJOR}
1167 )
1168
1169-set_target_properties(
1170- ubuntu_application_api_desktop_mirserver
1171- PROPERTIES
1172- VERSION ${UBUNTU_PLATFORM_API_VERSION_MAJOR}.${UBUNTU_PLATFORM_API_VERSION_MINOR}.${UBUNTU_PLATFORM_API_VERSION_PATCH}
1173- SOVERSION ${UBUNTU_PLATFORM_API_VERSION_MAJOR}
1174-)
1175 install(
1176 TARGETS ubuntu_application_api_desktop_mirclient
1177 # this is not a development library to compile against, users should always
1178 # specify the SONAME; so don't build a *.so
1179 LIBRARY DESTINATION "${LIB_INSTALL_DIR}" NAMELINK_SKIP
1180 )
1181-
1182-install(
1183- TARGETS ubuntu_application_api_desktop_mirserver
1184- # this is not a development library to compile against, users should always
1185- # specify the SONAME; so don't build a *.so
1186- LIBRARY DESTINATION "${LIB_INSTALL_DIR}" NAMELINK_SKIP
1187-)
1188
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 @@
1193-#define MODULE_VERSION_MAJOR 2
1194-#define MODULE_VERSION_MINOR 4
1195+#define MODULE_VERSION_MAJOR 3
1196+#define MODULE_VERSION_MINOR 0
1197 #define MODULE_VERSION_PATCH 0
1198
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 @@
1203-#define MODULE_VERSION_MAJOR 2
1204-#define MODULE_VERSION_MINOR 4
1205+#define MODULE_VERSION_MAJOR 3
1206+#define MODULE_VERSION_MINOR 0
1207 #define MODULE_VERSION_PATCH 0
1208
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 module_version.h
1214 )
1215
1216-add_library(
1217- ubuntu_application_api_touch_mirserver MODULE
1218-
1219- module.cpp
1220- module_version.h
1221-)
1222-
1223 target_link_libraries(
1224 ubuntu_application_api_touch_mirclient
1225
1226 "-Wl,--whole-archive"
1227 ubuntu_application_api_mirclient
1228- ubuntu_application_api_mircommon
1229- ubuntu_application_api_hybris
1230- ${UBUNTU_APPLICATION_API_LINK_LIBRARIES}
1231- "-Wl,--no-whole-archive"
1232- #TODO: Alarms
1233-)
1234-
1235-target_link_libraries(
1236- ubuntu_application_api_touch_mirserver
1237-
1238- "-Wl,--whole-archive"
1239- ubuntu_application_api_mirserver
1240- ubuntu_application_api_mircommon
1241 ubuntu_application_api_hybris
1242 ${UBUNTU_APPLICATION_API_LINK_LIBRARIES}
1243 "-Wl,--no-whole-archive"
1244@@ -47,22 +27,9 @@
1245 SOVERSION ${UBUNTU_PLATFORM_API_VERSION_MAJOR}
1246 )
1247
1248-set_target_properties(
1249- ubuntu_application_api_touch_mirserver
1250- PROPERTIES
1251- VERSION ${UBUNTU_PLATFORM_API_VERSION_MAJOR}.${UBUNTU_PLATFORM_API_VERSION_MINOR}.${UBUNTU_PLATFORM_API_VERSION_PATCH}
1252- SOVERSION ${UBUNTU_PLATFORM_API_VERSION_MAJOR}
1253-)
1254 install(
1255 TARGETS ubuntu_application_api_touch_mirclient
1256 # this is not a development library to compile against, users should always
1257 # specify the SONAME; so don't build a *.so
1258 LIBRARY DESTINATION "${LIB_INSTALL_DIR}" NAMELINK_SKIP
1259 )
1260-
1261-install(
1262- TARGETS ubuntu_application_api_touch_mirserver
1263- # this is not a development library to compile against, users should always
1264- # specify the SONAME; so don't build a *.so
1265- LIBRARY DESTINATION "${LIB_INSTALL_DIR}" NAMELINK_SKIP
1266-)
1267
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 @@
1272-#define MODULE_VERSION_MAJOR 2
1273-#define MODULE_VERSION_MINOR 4
1274+#define MODULE_VERSION_MAJOR 3
1275+#define MODULE_VERSION_MINOR 0
1276 #define MODULE_VERSION_PATCH 0

Subscribers

People subscribed via source and target branches