Mir

Merge lp:~cemil-azizoglu/mir/remove-deprecations-1 into lp:mir

Proposed by Cemil Azizoglu
Status: Work in progress
Proposed branch: lp:~cemil-azizoglu/mir/remove-deprecations-1
Merge into: lp:mir
Diff against target: 2878 lines (+29/-2073)
36 files modified
include/client/mir/event_printer.h (+0/-10)
include/client/mir/events/event_builders.h (+0/-55)
include/client/mir_toolkit/debug/surface.h (+0/-31)
include/client/mir_toolkit/events/event.h (+1/-55)
include/client/mir_toolkit/events/input_configuration_event.h (+0/-27)
include/client/mir_toolkit/events/keymap_event.h (+0/-13)
include/client/mir_toolkit/events/surface_event.h (+0/-22)
include/client/mir_toolkit/events/surface_output_event.h (+0/-55)
include/client/mir_toolkit/events/surface_placement.h (+0/-9)
include/client/mir_toolkit/mir_blob.h (+0/-20)
include/client/mir_toolkit/mir_client_library.h (+0/-1)
include/client/mir_toolkit/mir_connection.h (+0/-39)
include/client/mir_toolkit/mir_display_configuration.h (+0/-9)
include/client/mir_toolkit/mir_persistent_id.h (+0/-79)
include/client/mir_toolkit/mir_surface.h (+0/-251)
include/client/mir_toolkit/mir_window.h (+1/-1)
src/client/display_configuration_api.cpp (+0/-5)
src/client/event.cpp (+0/-102)
src/client/event_printer.cpp (+0/-78)
src/client/events/event_builders.cpp (+0/-106)
src/client/mir_blob.cpp (+0/-143)
src/client/mir_connection_api.cpp (+0/-36)
src/client/mir_debug_api.cpp (+0/-22)
src/client/mir_surface.cpp (+2/-2)
src/client/mir_surface_api.cpp (+1/-399)
src/client/symbols-debug.map (+1/-1)
src/client/symbols.map (+4/-91)
tests/acceptance-tests/CMakeLists.txt (+0/-1)
tests/acceptance-tests/test_client_library.cpp (+9/-32)
tests/acceptance-tests/test_client_library_callbacks.cpp (+0/-48)
tests/acceptance-tests/test_client_library_errors.cpp (+5/-9)
tests/acceptance-tests/test_client_platform_operation.cpp (+0/-198)
tests/acceptance-tests/test_client_surfaces.cpp (+2/-5)
tests/acceptance-tests/test_debug_api.cpp (+0/-82)
tests/acceptance-tests/test_mirblob.cpp (+0/-30)
tests/acceptance-tests/test_persistent_surface_store.cpp (+3/-6)
To merge this branch: bzr merge lp:~cemil-azizoglu/mir/remove-deprecations-1
Reviewer Review Type Date Requested Status
Alan Griffiths Needs Resubmitting
Cemil Azizoglu (community) Needs Fixing
Mir CI Bot continuous-integration Needs Fixing
Review via email: mp+316515@code.launchpad.net

Commit message

Remove some low-hanging deprecations. More to come.

Description of the change

There are more deprecations to be removed, low-hanging, or otherwise.

- The symbol stanza will later be collapsed into a new stanza. For now, I've deleted each removed function from its own stanza (though I went ahead and renamed the stanza for mir_debug to 1.0)
- Only tests that either don't make sense or have other coverage has been removed.

To post a comment you must log in.
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Continuous integration, rev:4018
https://mir-jenkins.ubuntu.com/job/mir-ci/2946/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/3904/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/3990
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/3980
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/3980
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/3980
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/3931/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/3931
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/3931/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/3931
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/3931/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/3931/console
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/3931/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/3931
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/3931/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/3931
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/3931/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/2946/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Cemil Azizoglu (cemil-azizoglu) wrote :

00:55:52 Saving GLMark2 detailed results to: /tmp/GLMark2Test_fullscreen_default.log
00:55:52 glmark2-es2-mir: relocation error: glmark2-es2-mir: symbol mir_connection_create_spec_for_normal_surface, version MIR_CLIENT_9 not defined in file libmirclient.so.9 with link time reference
00:55:52 ../../../tests/performance-tests/test_glmark2-es2-mir.cpp:100: Failure
00:55:52 Value of: run_glmark2("--fullscreen")
00:55:52 Expected: is >= 56
00:55:52 Actual: -1 (of type int)
00:55:52 [2017-02-07 00:55:52.264989] mirserver: Stopping
00:55:52 [ FAILED ] GLMark2Test.fullscreen_default (853 ms)
00:55:52 [----------] 1 test from GLMark2Test (853 ms total)
00:55:52
00:55:52 [----------] Global test environment tear-down
00:55:52 [==========] 1 test from 1 test case ran. (853 ms total)
00:55:52 [ PASSED ] 0 tests.
00:55:52 [ FAILED ] 1 test, listed below:
00:55:52 [ FAILED ] GLMark2Test.fullscreen_default
00:55:52
00:55:52 1 FAILED TEST
00:55:52  YOU HAVE 5 DISABLED TESTS

Hmm we'll have to exclude GLMark2 for the time being.

review: Needs Fixing
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

I think we should get downstreams rebuilt using the non-deprecated APIs before deleting the deprecated ones. (Not exclude them.)

review: Needs Resubmitting

Unmerged revisions

4018. By Cemil Azizoglu

One more persistent id rename

4017. By Cemil Azizoglu

Remove more deprecations

4016. By Cemil Azizoglu

Low hanging deprecations removed.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'include/client/mir/event_printer.h'
2--- include/client/mir/event_printer.h 2017-01-19 05:30:03 +0000
3+++ include/client/mir/event_printer.h 2017-02-07 00:07:50 +0000
4@@ -34,20 +34,10 @@
5 std::ostream& operator<<(std::ostream& out, MirPromptSessionState state);
6 std::ostream& operator<<(std::ostream& out, MirOrientation orientation);
7
8-std::ostream& operator<<(std::ostream& out, MirSurfaceAttrib attribute)
9-__attribute__ ((deprecated("use << with MirWindowAttrib instead")));
10 std::ostream& operator<<(std::ostream& out, MirWindowAttrib attribute);
11-std::ostream& operator<<(std::ostream& out, MirSurfaceFocusState state)
12-__attribute__ ((deprecated("use << with MirWindowFocusState instead")));
13 std::ostream& operator<<(std::ostream& out, MirWindowFocusState state);
14-std::ostream& operator<<(std::ostream& out, MirSurfaceVisibility state)
15-__attribute__ ((deprecated("use << with MirWindowVisibility instead")));
16 std::ostream& operator<<(std::ostream& out, MirWindowVisibility state);
17-std::ostream& operator<<(std::ostream& out, MirSurfaceType type)
18-__attribute__ ((deprecated("use << with MirWindowType instead")));
19 std::ostream& operator<<(std::ostream& out, MirWindowType type);
20-std::ostream& operator<<(std::ostream& out, MirSurfaceState state)
21-__attribute__ ((deprecated("use << with MirWindowState instead")));
22 std::ostream& operator<<(std::ostream& out, MirWindowState state);
23
24 std::ostream& operator<<(std::ostream& out, MirPromptSessionEvent const& event);
25
26=== modified file 'include/client/mir/events/event_builders.h'
27--- include/client/mir/events/event_builders.h 2017-01-19 05:30:03 +0000
28+++ include/client/mir/events/event_builders.h 2017-02-07 00:07:50 +0000
29@@ -46,9 +46,6 @@
30 EventUPtr make_event(MirPromptSessionState state);
31 // Surface resize event
32 EventUPtr make_event(frontend::SurfaceId const& surface_id, geometry::Size const& size);
33-// Surface configure event
34-EventUPtr make_event(frontend::SurfaceId const& surface_id, MirSurfaceAttrib attribute, int value)
35-__attribute__ ((deprecated("use make_event with MirWindowAttribute instead")));
36 // Window configure event
37 EventUPtr make_event(frontend::SurfaceId const& surface_id, MirWindowAttrib attribute, int value);
38 // Close surface event
39@@ -78,47 +75,15 @@
40 void set_cursor_position(MirEvent& event, float x, float y);
41 void set_button_state(MirEvent& event, MirPointerButtons button_state);
42
43-// Deprecated version with uint64_t mac
44-EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,
45- uint64_t mac, MirKeyboardAction action, xkb_keysym_t key_code,
46- int scan_code, MirInputEventModifiers modifiers) __attribute__ ((deprecated));
47-
48-// Deprecated version without mac
49-EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,
50- MirKeyboardAction action, xkb_keysym_t key_code,
51- int scan_code, MirInputEventModifiers modifiers) __attribute__ ((deprecated));
52-
53 // Touch event
54 EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,
55 std::vector<uint8_t> const& mac, MirInputEventModifiers modifiers);
56
57-// Deprecated version with uint64_t mac
58-EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,
59- uint64_t mac, MirInputEventModifiers modifiers) __attribute__ ((deprecated));
60-
61-// Deprecated version without mac
62-EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,
63- MirInputEventModifiers modifiers) __attribute__ ((deprecated));
64-
65 void add_touch(MirEvent &event, MirTouchId touch_id, MirTouchAction action,
66 MirTouchTooltype tooltype, float x_axis_value, float y_axis_value,
67 float pressure_value, float touch_major_value, float touch_minor_value, float size_value);
68
69 // Pointer event
70-// Deprecated version without relative axis
71-EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,
72- uint64_t mac, MirInputEventModifiers modifiers, MirPointerAction action,
73- MirPointerButtons buttons_pressed,
74- float x_axis_value, float y_axis_value,
75- float hscroll_value, float vscroll_value) __attribute__ ((deprecated));
76-
77-// Deprecated version without relative axis and mac
78-EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,
79- MirInputEventModifiers modifiers, MirPointerAction action,
80- MirPointerButtons buttons_pressed,
81- float x_axis_value, float y_axis_value,
82- float hscroll_value, float vscroll_value) __attribute__ ((deprecated));
83-
84 EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,
85 std::vector<uint8_t> const& mac, MirInputEventModifiers modifiers, MirPointerAction action,
86 MirPointerButtons buttons_pressed,
87@@ -126,26 +91,6 @@
88 float hscroll_value, float vscroll_value,
89 float relative_x_value, float relative_y_value);
90
91-// Deprecated version with uint64_t mac
92-EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,
93- uint64_t mac, MirInputEventModifiers modifiers, MirPointerAction action,
94- MirPointerButtons buttons_pressed,
95- float x_axis_value, float y_axis_value,
96- float hscroll_value, float vscroll_value,
97- float relative_x_value, float relative_y_value) __attribute__ ((deprecated));
98-
99-// Deprecated version without mac
100-EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,
101- MirInputEventModifiers modifiers, MirPointerAction action,
102- MirPointerButtons buttons_pressed,
103- float x_axis_value, float y_axis_value,
104- float hscroll_value, float vscroll_value,
105- float relative_x_value, float relative_y_value) __attribute__ ((deprecated));
106-
107-// Input configuration event
108-EventUPtr make_event(MirInputConfigurationAction action,
109- MirInputDeviceId id, std::chrono::nanoseconds time) __attribute__((deprecated));
110-
111 EventUPtr make_event(std::chrono::nanoseconds timestamp,
112 MirPointerButtons pointer_buttons,
113 MirInputEventModifiers modifiers,
114
115=== modified file 'include/client/mir_toolkit/debug/surface.h'
116--- include/client/mir_toolkit/debug/surface.h 2017-01-18 04:43:15 +0000
117+++ include/client/mir_toolkit/debug/surface.h 2017-02-07 00:07:50 +0000
118@@ -44,37 +44,6 @@
119 */
120 uint32_t mir_debug_window_current_buffer_id(MirWindow *window);
121
122-#pragma GCC diagnostic push
123-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
124-
125-/**
126- * Get the screen coordinates corresponding to a pair of surface coordinates
127- * \pre The surface is valid
128- * \param [in] surface The surface
129- * \param [in] x, y Surface coordinates to map to screen coordinates
130- * \param [out] screen_x, screen_y The screen coordinates corresponding to x, y.
131- * \return True if screen_x and screen_y contain values
132- * \note There are many cases where such a mapping does not exist or would be expensive
133- * to calculate. Only Mir servers started with the --debug option will ever return
134- * values for this call, and even when --debug is enabled servers are free to
135- * return nothing.
136- *
137- * This call will only be interesting for automated testing, where both the client
138- * and shell state is known and constrained.
139- */
140-bool mir_debug_surface_coords_to_screen(MirSurface *surface,
141- int x, int y,
142- int* screen_x, int* screen_y)
143-__attribute__((deprecated("Use mir_extension_window_coordinate_translation instead")));
144-
145-int mir_debug_surface_id(MirSurface *surface)
146-__attribute__((deprecated("Use mir_debug_window_id() instead")));
147-
148-uint32_t mir_debug_surface_current_buffer_id(MirSurface *surface)
149-__attribute__((deprecated("Use mir_debug_window_current_buffer_id() instead")));
150-
151-#pragma GCC diagnostic pop
152-
153 #ifdef __cplusplus
154 }
155 #endif
156
157=== modified file 'include/client/mir_toolkit/events/event.h'
158--- include/client/mir_toolkit/events/event.h 2017-01-27 04:57:53 +0000
159+++ include/client/mir_toolkit/events/event.h 2017-02-07 00:07:50 +0000
160@@ -89,7 +89,6 @@
161
162 #include "mir_toolkit/events/input/input_event.h"
163 #include "mir_toolkit/events/resize_event.h"
164-#include "mir_toolkit/events/surface_event.h"
165 #include "mir_toolkit/events/window_event.h"
166 #include "mir_toolkit/events/orientation_event.h"
167 #include "mir_toolkit/events/prompt_session_event.h"
168@@ -128,19 +127,8 @@
169 MirInputEvent const* mir_event_get_input_event(MirEvent const* event);
170
171 /**
172- * Retrieve the MirSurfaceEvent associated with a MirEvent of
173- * type mir_event_type_surface. See <mir_toolkit/events/surface_event.h>
174- * for accessors.
175- *
176- * \param [in] event The event
177- * \return The associated MirSurfaceEvent
178- */
179-MirSurfaceEvent const* mir_event_get_surface_event(MirEvent const* event)
180-__attribute__ ((deprecated("use mir_event_get_window_event instead")));
181-
182-/**
183 * Retrieve the MirWindowEvent associated with a MirEvent of
184- * type mir_event_type_window. See <mir_toolkit/events/surface_event.h>
185+ * type mir_event_type_window. See <mir_toolkit/events/window_event.h>
186 * for accessors.
187 *
188 * \param [in] event The event
189@@ -212,37 +200,6 @@
190
191 #pragma GCC diagnostic push
192 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
193-/**
194- * Retrieve the MirInputConfig associated with a MirEvent of
195- * type mir_event_type_input_configuration. The event signifies that the
196- * input device configuration has changed.
197- *
198- * \deprecated Input devices and changes to the input devices are indicated
199- * via the MirInputConfigCallback
200- * \param [in] event The event
201- * \return The associated MirInputConfigurationEvent
202- */
203-/// @cond
204-__attribute__((deprecated))
205-/// @endcond
206-MirInputConfigurationEvent const* mir_event_get_input_configuration_event(MirEvent const* event);
207-#pragma GCC diagnostic pop
208-
209-/**
210- * Retrieve the MirSurfaceOutputEvent associated with a MirEvent of type
211- * mir_event_type_surface_output. The event signifies that the properties
212- * of the output the surface is displayed upon have changed.
213- *
214- * A MirSurfaceOutputEvent is generated either when the properties of the
215- * output the surface is primarily on change (for example: by user configuration
216- * of resolution) or when the output the surface is primarily on changes
217- * (for example: when a user moves the surface from one monitor to another).
218- *
219- * \param [in] event The event
220- * \return The associated MirSurfaceOutputEvent
221- */
222-MirSurfaceOutputEvent const* mir_event_get_surface_output_event(MirEvent const* event)
223-__attribute__((deprecated("use mir_event_get_window_output_event")));
224
225 /**
226 * Retrieve the MirWindowOutputEvent associated with a MirEvent of type
227@@ -271,17 +228,6 @@
228 MirInputDeviceStateEvent const* mir_event_get_input_device_state_event(MirEvent const* event);
229
230 /**
231- * Retrieve the MirSurfacePlacementEvent associated with a MirEvent of
232- * type mir_event_type_surface_placement. The event signifies that the
233- * the server has fulfilled a request for relative surface placement.
234- *
235- * \param [in] event The event
236- * \return The associated MirSurfacePlacementEvent
237- */
238-MirSurfacePlacementEvent const* mir_event_get_surface_placement_event(MirEvent const* event)
239-__attribute__((deprecated("use mir_event_get_window_placement_event")));
240-
241-/**
242 * Retrieve the MirWindowPlacementEvent associated with a MirEvent of
243 * type mir_event_type_window_placement. The event signifies that the
244 * the server has fulfilled a request for relative window placement.
245
246=== modified file 'include/client/mir_toolkit/events/input_configuration_event.h'
247--- include/client/mir_toolkit/events/input_configuration_event.h 2017-01-27 04:57:53 +0000
248+++ include/client/mir_toolkit/events/input_configuration_event.h 2017-02-07 00:07:50 +0000
249@@ -47,33 +47,6 @@
250 } MirInputConfigurationAction
251 __attribute__((deprecated));
252
253-#pragma GCC diagnostic push
254-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
255-/**
256- * Retrieve the input configuration action which occurred.
257- *
258- * \param[in] ev The input configuration event
259- * \return The action
260- */
261-MirInputConfigurationAction mir_input_configuration_event_get_action(MirInputConfigurationEvent const* ev) __attribute__((deprecated));
262-
263-/**
264- * Retreive the time associated with a MirInputConfiguration event
265-
266- * \param[in] ev The input configuration event
267- * \return The time in nanoseconds since epoch
268- */
269-int64_t mir_input_configuration_event_get_time(MirInputConfigurationEvent const* ev) __attribute__((deprecated));
270-
271-/**
272- * Retreive the device id associated with a MirInputConfiguration event
273-
274- * \param[in] ev The input configuration event
275- * \return The device id or -1 if not applicable to events of this action
276- */
277-MirInputDeviceId mir_input_configuration_event_get_device_id(MirInputConfigurationEvent const* ev) __attribute__((deprecated));
278-#pragma GCC diagnostic pop
279-
280 #ifdef __cplusplus
281 }
282 /**@}*/
283
284=== modified file 'include/client/mir_toolkit/events/keymap_event.h'
285--- include/client/mir_toolkit/events/keymap_event.h 2017-01-18 02:29:37 +0000
286+++ include/client/mir_toolkit/events/keymap_event.h 2017-02-07 00:07:50 +0000
287@@ -34,19 +34,6 @@
288 /**
289 * Retrieve the new keymap reported by this MirKeymapEvent
290 *
291- * \deprecated keymap credentials are no longer available use
292- * mir_keymap_event_get_keymap_buffer instead.
293- *
294- * \param[in] ev The keymap event
295- * \param[out] rules XKB rules describing the new keymap.
296- */
297-void mir_keymap_event_get_rules(MirKeymapEvent const* ev,
298- struct xkb_rule_names* rules)
299- __attribute__ ((deprecated));
300-
301-/**
302- * Retrieve the new keymap reported by this MirKeymapEvent
303- *
304 * The keymap buffer is only valid while the MirKeymapEvent is valid.
305 * The buffer can be used via xkb_keymap_new_from_buffer
306 * \param[in] ev The keymap event
307
308=== modified file 'include/client/mir_toolkit/events/surface_event.h'
309--- include/client/mir_toolkit/events/surface_event.h 2017-01-23 03:38:33 +0000
310+++ include/client/mir_toolkit/events/surface_event.h 2017-02-07 00:07:50 +0000
311@@ -29,28 +29,6 @@
312 extern "C" {
313 #endif
314
315-// Ignore use of deprecate MirSurfaceEvent typedef in deprecated functions (for now)
316-#pragma GCC diagnostic push
317-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
318-/**
319- * Retrieve the attribute index configured with a given MirSurfaceEvent
320- *
321- * \param [in] event The event
322- * \return The associated attribute
323- */
324-MirSurfaceAttrib mir_surface_event_get_attribute(MirSurfaceEvent const* event)
325-__attribute__ ((deprecated("use mir_window_event_get_attribute instead")));
326-
327-/**
328- * Retrieve the new value of the associated attribute for a given MirSurfaceEvent
329- *
330- * \param [in] event The event
331- * \return The associated attribute value
332- */
333-int mir_surface_event_get_attribute_value(MirSurfaceEvent const* event)
334-__attribute__ ((deprecated("use make_event with mir_window_event_get_attribute_value instead")));
335-#pragma GCC diagnostic pop
336-
337 #ifdef __cplusplus
338 }
339 /**@}*/
340
341=== modified file 'include/client/mir_toolkit/events/surface_output_event.h'
342--- include/client/mir_toolkit/events/surface_output_event.h 2017-01-23 03:38:33 +0000
343+++ include/client/mir_toolkit/events/surface_output_event.h 2017-02-07 00:07:50 +0000
344@@ -29,61 +29,6 @@
345 extern "C" {
346 #endif
347
348-// Ignore use of deprecate MirSurfaceOutputEvent typedef in deprecated functions (for now)
349-#pragma GCC diagnostic push
350-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
351-/**
352- * Retrieve the DPI of the new output configuration of a MirSurfaceOutputEvent
353- *
354- * \param [in] ev The event
355- * \return The new DPI value for the surface is primarily on.
356- */
357-int mir_surface_output_event_get_dpi(MirSurfaceOutputEvent const* ev)
358-__attribute__ ((deprecated("use mir_window_output_event_get_dpi instead")));
359-
360-/**
361- * Retrieve the form factor of the new output configuration of a MirSurfaceOutputEvent
362- *
363- * \param [in] ev The event
364- * \return The new form factor of the output the surface is primarily on.
365- */
366-MirFormFactor mir_surface_output_event_get_form_factor(MirSurfaceOutputEvent const* ev)
367-__attribute__ ((deprecated("use mir_window_output_event_get_form_factor instead")));
368-
369-/**
370- * Retrieve the suggested scaling factor of the new output configuration of a
371- * MirSurfaceOutputEvent.
372- *
373- * \param [in] ev The event
374- * \return The new scaling factor of the output the surface is primarily on.
375- */
376-float mir_surface_output_event_get_scale(MirSurfaceOutputEvent const* ev)
377-__attribute__ ((deprecated("use mir_window_output_event_get_scale instead")));
378-
379-/**
380- * Retrieve the maximum refresh rate of the output(s) associated with a
381- * MirSurfaceOutputEvent. For variable refresh rate displays this represents
382- * the maximum refresh rate of the display to aim for, rather than a measurement
383- * of recent performance.
384- *
385- * \param [in] ev The event
386- * \return The refresh rate in Hz
387- */
388-double mir_surface_output_event_get_refresh_rate(MirSurfaceOutputEvent const* ev)
389-__attribute__ ((deprecated("use mir_window_output_event_get_refresh_rate instead")));
390-
391-/**
392- * Retrieve the ID of the output this surface is on from a MirSurfaceOutputEvent
393- *
394- * \param [in] ev The event
395- * \return The ID of the output the surface is currently considered to be on.
396- * (From MirDisplayOutput::output_id)
397- */
398-uint32_t mir_surface_output_event_get_output_id(MirSurfaceOutputEvent const *ev)
399-__attribute__ ((deprecated("use mir_window_output_event_get_output_id instead")));
400-
401-#pragma GCC diagnostic pop
402-
403 #ifdef __cplusplus
404 }
405 /**@}*/
406
407=== modified file 'include/client/mir_toolkit/events/surface_placement.h'
408--- include/client/mir_toolkit/events/surface_placement.h 2017-01-19 05:30:03 +0000
409+++ include/client/mir_toolkit/events/surface_placement.h 2017-02-07 00:07:50 +0000
410@@ -31,15 +31,6 @@
411
412 typedef struct MirSurfacePlacementEvent MirSurfacePlacementEvent;
413
414-/**
415- * Retrieve the relative position from a placement notification
416- *
417- * \param [in] event The placement event
418- * \return The position relative to the parent surface
419- */
420-MirRectangle mir_surface_placement_get_relative_position(MirSurfacePlacementEvent const* event)
421-__attribute__ ((deprecated("use mir_window_placement_get_relative_position instead")));
422-
423 #ifdef __cplusplus
424 }
425 /**@}*/
426
427=== modified file 'include/client/mir_toolkit/mir_blob.h'
428--- include/client/mir_toolkit/mir_blob.h 2017-01-19 05:30:03 +0000
429+++ include/client/mir_toolkit/mir_blob.h 2017-02-07 00:07:50 +0000
430@@ -29,15 +29,6 @@
431 #endif
432
433 /**
434- * Create a blob from a display configuration
435- *
436- * \param [in] configuration The display configuration
437- * \return A blob
438- */
439-MirBlob* mir_blob_from_display_configuration(MirDisplayConfiguration* configuration)
440-__attribute__ ((deprecated("use mir_blob_from_display_config instead")));
441-
442-/**
443 * Create a blob from a display config
444 *
445 * \param [in] config The display config
446@@ -57,17 +48,6 @@
447 MirBlob* mir_blob_onto_buffer(void const* buffer, size_t buffer_size);
448
449 /**
450- * Create a blob from a display configuration
451- *
452- * \warning will abort() if the blob doesn't represent a meaningful display configuration
453- *
454- * \param [in] blob The blob
455- * \return A display configuration
456- */
457-MirDisplayConfiguration* mir_blob_to_display_configuration(MirBlob* blob)
458-__attribute__ ((deprecated("use mir_blob_to_display_config instead")));
459-
460-/**
461 * Create a blob from a display config
462 *
463 * \warning will abort() if the blob doesn't represent a meaningful display config
464
465=== modified file 'include/client/mir_toolkit/mir_client_library.h'
466--- include/client/mir_toolkit/mir_client_library.h 2017-02-02 19:17:46 +0000
467+++ include/client/mir_toolkit/mir_client_library.h 2017-02-07 00:07:50 +0000
468@@ -33,7 +33,6 @@
469 #include <mir_toolkit/mir_display_configuration.h>
470 #include <mir_toolkit/mir_input_device.h>
471 #include <mir_toolkit/mir_error.h>
472-#include <mir_toolkit/mir_persistent_id.h>
473 #include <mir_toolkit/mir_window_id.h>
474
475 #endif /* MIR_CLIENT_LIBRARY_H */
476
477=== modified file 'include/client/mir_toolkit/mir_connection.h'
478--- include/client/mir_toolkit/mir_connection.h 2017-01-31 19:33:32 +0000
479+++ include/client/mir_toolkit/mir_connection.h 2017-02-07 00:07:50 +0000
480@@ -87,27 +87,6 @@
481 void mir_connection_release(MirConnection *connection);
482
483 /**
484- * Query platform-specific data and/or file descriptors that are required to
485- * initialize GL/EGL features.
486- * \param [in] connection The connection
487- * \param [out] platform_package Structure to be populated
488- */
489-void mir_connection_get_platform(MirConnection *connection, MirPlatformPackage *platform_package)
490-__attribute__((deprecated("use platform extensions instead")));
491-
492-/**
493- * Query graphics platform module.
494- *
495- * \note The char pointers in MirModuleProperties are owned by the connection and should not be
496- * freed. They remain valid until the connection is released.
497- *
498- * \param [in] connection The connection
499- * \param [out] properties Structure to be populated
500- */
501-void mir_connection_get_graphics_module(MirConnection *connection, MirModuleProperties *properties)
502-__attribute__((deprecated("use graphics module extension instead")));
503-
504-/**
505 * Register a callback to be called when a Lifecycle state change occurs.
506 * \param [in] connection The connection
507 * \param [in] callback The function to be called when the state change occurs
508@@ -364,24 +343,6 @@
509 unsigned const int formats_size, unsigned int *num_valid_formats);
510
511 /**
512- * Perform a platform specific operation.
513- *
514- * The MirPlatformMessage used for the request needs to remain valid
515- * until this operation finishes.
516- *
517- * \param [in] connection The connection
518- * \param [in] request The message used for this operation
519- * \param [in] callback The callback to call when the operation finishes
520- * \param [in,out] context User data passed to the callback function
521- * \return A handle that can be passed to mir_wait_for
522- */
523-MirWaitHandle* mir_connection_platform_operation(
524- MirConnection* connection,
525- MirPlatformMessage const* request,
526- MirPlatformOperationCallback callback, void* context)
527-__attribute__ ((deprecated("use platform specific extensions instead")));
528-
529-/**
530 * Create a snapshot of the attached input devices and device configurations.
531 * \warning return value must be destroyed via mir_input_config_release()
532 * \warning may return null if connection is invalid
533
534=== modified file 'include/client/mir_toolkit/mir_display_configuration.h'
535--- include/client/mir_toolkit/mir_display_configuration.h 2017-01-27 04:57:53 +0000
536+++ include/client/mir_toolkit/mir_display_configuration.h 2017-02-07 00:07:50 +0000
537@@ -263,15 +263,6 @@
538 /**
539 * Get the textual name of an output type.
540 *
541- * \param [in] type The MirDisplayOutputType to describe.
542- * \returns The name of the output type.
543- */
544-char const* mir_display_output_type_name(MirDisplayOutputType type)
545-__attribute__((deprecated("use mir_output_type_name instead")));
546-
547-/**
548- * Get the textual name of an output type.
549- *
550 * \param [in] type The MirOutputType to describe.
551 * \returns The name of the output type.
552 */
553
554=== removed file 'include/client/mir_toolkit/mir_persistent_id.h'
555--- include/client/mir_toolkit/mir_persistent_id.h 2017-02-01 19:54:40 +0000
556+++ include/client/mir_toolkit/mir_persistent_id.h 1970-01-01 00:00:00 +0000
557@@ -1,79 +0,0 @@
558-/*
559- * Copyright © 2017 Canonical Ltd.
560- *
561- * This program is free software: you can redistribute it and/or modify it
562- * under the terms of the GNU Lesser General Public License version 3,
563- * as published by the Free Software Foundation.
564- *
565- * This program is distributed in the hope that it will be useful,
566- * but WITHOUT ANY WARRANTY; without even the implied warranty of
567- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
568- * GNU Lesser General Public License for more details.
569- *
570- * You should have received a copy of the GNU Lesser General Public License
571- * along with this program. If not, see <http://www.gnu.org/licenses/>.
572- *
573- */
574-
575-#ifndef MIR_TOOLKIT_MIR_PERSISTENT_ID_H_
576-#define MIR_TOOLKIT_MIR_PERSISTENT_ID_H_
577-
578-#include <mir_toolkit/client_types.h>
579-
580-#include <stdbool.h>
581-
582-#ifdef __cplusplus
583-/**
584- * \addtogroup mir_toolkit
585- * @{
586- */
587-extern "C" {
588-#endif
589-#pragma GCC diagnostic push
590-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
591-/**
592- * \brief Check the validity of a MirPersistentId
593- * \param [in] id The MirPersistentId
594- * \return True iff the MirPersistentId contains a valid ID value.
595- *
596- * \note This does not guarantee that the ID refers to a currently valid object.
597- */
598-bool mir_persistent_id_is_valid(MirPersistentId* id)
599-__attribute__((deprecated("Use mir_window_id_is_valid() instead")));
600-
601-/**
602- * \brief Free a MirPersistentId
603- * \param [in] id The MirPersistentId to free
604- * \note This frees only the client-side representation; it has no effect on the
605- * object referred to by \arg id.
606- */
607-void mir_persistent_id_release(MirPersistentId* id)
608-__attribute__((deprecated("Use mir_window_id_release() instead")));
609-
610-/**
611- * \brief Get a string representation of a MirSurfaceId
612- * \param [in] id The ID to serialise
613- * \return A string representation of id. This string is owned by the MirSurfaceId,
614- * and must not be freed by the caller.
615- *
616- * \see mir_surface_id_from_string
617- */
618-char const* mir_persistent_id_as_string(MirPersistentId* id)
619-__attribute__((deprecated("Use mir_window_id_as_string() instead")));
620-
621-/**
622- * \brief Deserialise a string representation of a MirSurfaceId
623- * \param [in] string_representation Serialised representation of the ID
624- * \return The deserialised MirSurfaceId
625- */
626-MirPersistentId* mir_persistent_id_from_string(char const* string_representation)
627-__attribute__((deprecated("Use mir_window_id_from_string() instead")));
628-
629-#pragma GCC diagnostic pop
630-
631-#ifdef __cplusplus
632-}
633-/**@}*/
634-#endif
635-
636-#endif /* MIR_TOOLKIT_MIR_PERSISTENT_ID_H_ */
637
638=== modified file 'include/client/mir_toolkit/mir_surface.h'
639--- include/client/mir_toolkit/mir_surface.h 2017-01-24 11:06:35 +0000
640+++ include/client/mir_toolkit/mir_surface.h 2017-02-07 00:07:50 +0000
641@@ -33,212 +33,6 @@
642 extern "C" {
643 #endif
644
645-// Functions in this pragma section are to be deprecated
646-#pragma GCC diagnostic push
647-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
648-
649-MirSurfaceSpec* mir_connection_create_spec_for_normal_surface(MirConnection* connection,
650- int width, int height,
651- MirPixelFormat format)
652-__attribute__((deprecated("Use mir_create_normal_window_spec() instead")));
653-
654-MirSurfaceSpec*
655-mir_connection_create_spec_for_menu(MirConnection* connection,
656- int width,
657- int height,
658- MirPixelFormat format,
659- MirSurface* parent,
660- MirRectangle* rect,
661- MirEdgeAttachment edge)
662-__attribute__((deprecated("Use mir_specify_menu() instead")));
663-
664-MirSurfaceSpec*
665-mir_connection_create_spec_for_tooltip(MirConnection* connection,
666- int width, int height,
667- MirPixelFormat format,
668- MirSurface* parent,
669- MirRectangle* zone)
670-__attribute__((deprecated("Use mir_create_tip_window_spec() instead")));
671-
672-MirSurfaceSpec*
673-mir_connection_create_spec_for_tip(MirConnection* connection,
674- int width, int height,
675- MirPixelFormat format,
676- MirSurface* parent,
677- MirRectangle* rect,
678- MirEdgeAttachment edge)
679-__attribute__((deprecated("Use mir_create_tip_window_spec() instead")));
680-
681-MirSurfaceSpec*
682-mir_connection_create_spec_for_modal_dialog(MirConnection* connection,
683- int width, int height,
684- MirPixelFormat format,
685- MirSurface* parent)
686-__attribute__((deprecated("Use mir_create_modal_dialog_window_spec() instead")));
687-
688-MirSurfaceSpec*
689-mir_connection_create_spec_for_dialog(MirConnection* connection,
690- int width, int height,
691- MirPixelFormat format)
692-__attribute__((deprecated("Use mir_create_dialog_window_spec() instead")));
693-
694-MirSurfaceSpec* mir_create_surface_spec(MirConnection* connection)
695-__attribute__((deprecated("Use mir_create_window_spec() instead")));
696-
697-MirSurfaceSpec*
698-mir_connection_create_spec_for_changes(MirConnection* connection)
699-__attribute__((deprecated("Use mir_create_window_spec() instead")));
700-
701-void mir_surface_spec_set_parent(MirSurfaceSpec* spec, MirSurface* parent)
702-__attribute__((deprecated("Use mir_window_spec_set_parent() instead")));
703-
704-/**
705- *\deprecated This will soon be a property of the backing content.
706- *
707- * Query the swapinterval that the surface is operating with.
708- * The default interval is 1.
709- * \param [in] surface The surface to operate on
710- * \return The swapinterval value that the client is operating with.
711- * Returns -1 if surface is invalid, or if the default stream
712- * was removed by use of mir_window_spec_set_streams().
713- */
714-int mir_surface_get_swapinterval(MirSurface* surface)
715-__attribute__((deprecated("This will soon be a property of the backing content")));
716-
717-void mir_surface_spec_set_type(MirSurfaceSpec* spec, MirSurfaceType type)
718-__attribute__((deprecated("use mir_window_spec_set_type() instead")));
719-
720-void mir_surface_spec_set_name(MirSurfaceSpec* spec, char const* name)
721-__attribute__((deprecated("use mir_window_spec_set_name() instead")));
722-
723-void mir_surface_spec_set_width(MirSurfaceSpec* spec, unsigned width)
724-__attribute__((deprecated("use mir_window_spec_set_width() instead")));
725-
726-void mir_surface_spec_set_height(MirSurfaceSpec* spec, unsigned height)
727-__attribute__((deprecated("use mir_window_spec_set_height() instead")));
728-
729-void mir_surface_spec_set_width_increment(MirSurfaceSpec* spec, unsigned width_inc)
730-__attribute__((deprecated("use mir_window_spec_set_width_increment() instead")));
731-
732-void mir_surface_spec_set_height_increment(MirSurfaceSpec* spec, unsigned height_inc)
733-__attribute__((deprecated("use mir_window_spec_set_height_increment() instead")));
734-
735-void mir_surface_spec_set_min_width(MirSurfaceSpec* spec, unsigned min_width)
736-__attribute__((deprecated("use mir_window_spec_set_min_width() instead")));
737-
738-void mir_surface_spec_set_min_height(MirSurfaceSpec* spec, unsigned min_height)
739-__attribute__((deprecated("use mir_window_spec_set_min_height() instead")));
740-
741-void mir_surface_spec_set_max_width(MirSurfaceSpec* spec, unsigned max_width)
742-__attribute__((deprecated("use mir_window_spec_set_max_width() instead")));
743-
744-void mir_surface_spec_set_max_height(MirSurfaceSpec* spec, unsigned max_height)
745-__attribute__((deprecated("use mir_window_spec_set_max_height() instead")));
746-
747-void mir_surface_spec_set_min_aspect_ratio(MirSurfaceSpec* spec, unsigned width, unsigned height)
748-__attribute__((deprecated("use mir_window_spec_set_min_aspect_ratio() instead")));
749-
750-void mir_surface_spec_set_max_aspect_ratio(MirSurfaceSpec* spec, unsigned width, unsigned height)
751-__attribute__((deprecated("use mir_window_spec_set_max_aspect_ratio() instead")));
752-
753-void mir_surface_spec_set_fullscreen_on_output(MirSurfaceSpec* spec, uint32_t output_id)
754-__attribute__((deprecated("use mir_window_spec_set_fullscreen_on_output() instead")));
755-
756-void mir_surface_spec_set_preferred_orientation(MirSurfaceSpec* spec, MirOrientationMode mode)
757-__attribute__((deprecated("use mir_window_spec_set_preferred_orientation() instead")));
758-
759-bool mir_surface_spec_attach_to_foreign_parent(MirSurfaceSpec* spec,
760- MirPersistentId* parent,
761- MirRectangle* attachment_rect,
762- MirEdgeAttachment edge)
763-__attribute__((deprecated("use mir_window_spec_attach_to_foreign_parent() instead")));
764-
765-void mir_surface_spec_set_state(MirSurfaceSpec* spec, MirSurfaceState state)
766-__attribute__((deprecated("use mir_window_spec_set_state() instead")));
767-
768-void mir_surface_spec_release(MirSurfaceSpec* spec)
769-__attribute__((deprecated("use mir_window_spec_release() instead")));
770-
771-void mir_surface_spec_set_input_shape(MirSurfaceSpec* spec,
772- MirRectangle const *rectangles,
773- size_t n_rects)
774-__attribute__((deprecated("use mir_window_spec_set_input_shape() instead")));
775-
776-void mir_surface_spec_set_event_handler(MirSurfaceSpec* spec,
777- mir_surface_event_callback callback,
778- void* context)
779-__attribute__((deprecated("use mir_window_spec_set_event_handler() instead")));
780-
781-void mir_surface_spec_set_shell_chrome(MirSurfaceSpec* spec, MirShellChrome style)
782-__attribute__((deprecated("use mir_window_spec_set_shell_chrome() instead")));
783-
784-void mir_surface_spec_set_pointer_confinement(MirSurfaceSpec* spec, MirPointerConfinementState state)
785-__attribute__((deprecated("use mir_window_spec_set_pointer_confinement() instead")));
786-
787-void mir_surface_spec_set_placement(MirSurfaceSpec* spec,
788- const MirRectangle* rect,
789- MirPlacementGravity rect_gravity,
790- MirPlacementGravity window_gravity,
791- MirPlacementHints placement_hints,
792- int offset_dx,
793- int offset_dy)
794-__attribute__((deprecated("use mir_window_spec_set_placement() instead")));
795-
796-MirSurfaceSpec* mir_connection_create_spec_for_input_method(MirConnection* connection,
797- int width, int height,
798- MirPixelFormat format)
799-__attribute__((deprecated("use mir_create_input_method_window_spec() instead")));
800-
801-void mir_surface_spec_set_pixel_format(MirSurfaceSpec* spec, MirPixelFormat format)
802-__attribute__((deprecated("use mir_window_spec_set_pixel_format() instead")));
803-
804-void mir_surface_spec_set_buffer_usage(MirSurfaceSpec* spec, MirBufferUsage usage)
805-__attribute__((deprecated("use mir_window_spec_set_buffer_usage() instead")));
806-
807-void mir_surface_spec_set_streams(MirSurfaceSpec* spec,
808- MirBufferStreamInfo* streams,
809- unsigned int num_streams)
810-__attribute__((deprecated("use mir_window_spec_set_streams() instead")));
811-
812-void mir_surface_apply_spec(MirSurface* surface, MirSurfaceSpec* spec)
813-__attribute__((deprecated("use mir_window_apply_spec() instead")));
814-
815-bool mir_surface_is_valid(MirSurface *surface)
816-__attribute__((deprecated("use mir_window_is_valid() instead")));
817-
818-MirWaitHandle* mir_surface_create(MirSurfaceSpec* requested_specification,
819- mir_surface_callback callback, void* context)
820-__attribute__((deprecated("use mir_create_window() instead")));
821-
822-MirSurface* mir_surface_create_sync(MirSurfaceSpec* requested_specification)
823-__attribute__((deprecated("use mir_create_window_sync() instead")));
824-
825-MirWaitHandle *mir_surface_release(
826- MirSurface *surface,
827- mir_surface_callback callback,
828- void *context)
829-__attribute__((deprecated("use mir_window_release() instead")));
830-
831-void mir_surface_release_sync(MirSurface *surface)
832-__attribute__((deprecated("use mir_window_release_sync() instead")));
833-
834-void mir_surface_set_event_handler(MirSurface *surface,
835- mir_surface_event_callback callback,
836- void* context)
837-__attribute__((deprecated("use mir_window_set_event_handler() instead")));
838-
839-MirBufferStream* mir_surface_get_buffer_stream(MirSurface *surface)
840-__attribute__((deprecated("use mir_window_get_buffer_stream() instead")));
841-
842-char const* mir_surface_get_error_message(MirSurface *surface)
843-__attribute__((deprecated("use mir_window_get_error_message() instead")));
844-
845-void mir_surface_get_parameters(MirSurface *surface, MirSurfaceParameters *parameters)
846-__attribute__((deprecated("use mir_window_get_parameters() instead")));
847-
848-MirSurfaceType mir_surface_get_type(MirSurface* surface)
849-__attribute__((deprecated("use mir_window_get_type() instead")));
850-
851 MirWaitHandle* mir_surface_set_state(MirSurface *surface,
852 MirSurfaceState state)
853 __attribute__((deprecated("use mir_window_set_state() instead")));
854@@ -246,54 +40,9 @@
855 MirSurfaceState mir_surface_get_state(MirSurface *surface)
856 __attribute__((deprecated("use mir_window_get_state() instead")));
857
858-/**
859- * Set the swapinterval for the default stream.
860- * \warning EGL users should use eglSwapInterval directly.
861- * \warning If the surface was created with, or modified to have a
862- * MirSurfaceSpec containing streams added through
863- * mir_window_spec_set_streams(), the default stream will
864- * be removed, and this function will return NULL.
865- * \param [in] surface The surface to operate on
866- * \param [in] interval The number of vblank signals that
867- * mir_surface_swap_buffers will wait for
868- * \return A wait handle that can be passed to mir_wait_for,
869- * or NULL if the interval could not be supported
870- */
871-MirWaitHandle* mir_surface_set_swapinterval(MirSurface* surface, int interval)
872-__attribute__((deprecated("Swap interval should be set on the backing content")));
873-
874-int mir_surface_get_dpi(MirSurface* surface)
875-__attribute__((deprecated("use mir_window_get_dpi() instead")));
876-
877-MirSurfaceFocusState mir_surface_get_focus(MirSurface *surface)
878-__attribute__((deprecated("use mir_window_get_focus_state() instead")));
879-
880-MirSurfaceVisibility mir_surface_get_visibility(MirSurface *surface)
881-__attribute__((deprecated("use mir_window_get_visibility() instead")));
882-
883-MirWaitHandle* mir_surface_configure_cursor(MirSurface *surface, MirCursorConfiguration const* parameters)
884-__attribute__((deprecated("use mir_window_configure_cursor() instead")));
885-
886-MirOrientation mir_surface_get_orientation(MirSurface *surface)
887-__attribute__((deprecated("use mir_window_get_orientation() instead")));
888-
889 MirWaitHandle* mir_surface_set_preferred_orientation(MirSurface *surface, MirOrientationMode orientation)
890 __attribute__((deprecated("use mir_window_set_preferred_orientation() instead")));
891
892-MirOrientationMode mir_surface_get_preferred_orientation(MirSurface *surface)
893-__attribute__((deprecated("use mir_window_get_preferred_orientation() instead")));
894-
895-MirWaitHandle* mir_surface_request_persistent_id(MirSurface* surface, mir_surface_id_callback callback, void* context)
896-__attribute__((deprecated("use mir_window_request_persistent_id() instead")));
897-
898-MirPersistentId* mir_surface_request_persistent_id_sync(MirSurface *surface)
899-__attribute__((deprecated("use mir_window_request_persistent_id_sync() instead")));
900-
901-void mir_surface_raise(MirSurface* surface, MirCookie const* cookie)
902-__attribute__((deprecated("use mir_window_raise() instead")));
903-
904-#pragma GCC diagnostic pop
905-
906 #ifdef __cplusplus
907 }
908 /**@}*/
909
910=== modified file 'include/client/mir_toolkit/mir_window.h'
911--- include/client/mir_toolkit/mir_window.h 2017-02-03 21:11:55 +0000
912+++ include/client/mir_toolkit/mir_window.h 2017-02-07 00:07:50 +0000
913@@ -781,7 +781,7 @@
914 * \brief Request a persistent ID for a window and wait for the result
915 * \param [in] window The window to acquire a persistent ID for.
916 * \return A MirWindowId. This MirWindowId is owned by the calling code, and must
917- * be freed with a call to mir_persistent_id_release()
918+ * be freed with a call to mir_window_id_release()
919 */
920 MirPersistentId* mir_window_request_persistent_id_sync(MirWindow* window)
921 __attribute__((deprecated("Use mir_window_request_window_id_sync")));
922
923=== modified file 'src/client/display_configuration_api.cpp'
924--- src/client/display_configuration_api.cpp 2017-01-27 04:57:53 +0000
925+++ src/client/display_configuration_api.cpp 2017-02-07 00:07:50 +0000
926@@ -126,11 +126,6 @@
927 return static_cast<MirOutputType>(output->type());
928 }
929
930-char const* mir_display_output_type_name(MirDisplayOutputType type)
931-{
932- return mir::output_type_name(type);
933-}
934-
935 char const* mir_output_type_name(MirOutputType type)
936 {
937 return mir::output_type_name(type);
938
939=== modified file 'src/client/event.cpp'
940--- src/client/event.cpp 2017-01-23 03:38:33 +0000
941+++ src/client/event.cpp 2017-02-07 00:07:50 +0000
942@@ -27,7 +27,6 @@
943 #include "mir/events/event_private.h"
944 #include "mir/events/surface_placement_event.h"
945
946-#include "mir_toolkit/events/surface_event.h"
947 #include "mir_toolkit/events/resize_event.h"
948 #include "mir_toolkit/events/prompt_session_event.h"
949 #include "mir_toolkit/events/orientation_event.h"
950@@ -112,11 +111,6 @@
951 return ev->to_input();
952 })
953
954-MirWindowEvent const* mir_event_get_surface_event(MirEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION(
955-{
956- return mir_event_get_window_event(ev);
957-})
958-
959 MirWindowEvent const* mir_event_get_window_event(MirEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION(
960 {
961 expect_event_type(ev, mir_event_type_window);
962@@ -159,23 +153,6 @@
963 return ev->to_keymap();
964 })
965
966-#pragma GCC diagnostic push
967-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
968-MirInputConfigurationEvent const* mir_event_get_input_configuration_event(MirEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION(
969-{
970- expect_event_type(ev, mir_event_type_input_configuration);
971-
972- return ev->to_input_configuration();
973-})
974-#pragma GCC diagnostic pop
975-
976-MirWindowOutputEvent const* mir_event_get_surface_output_event(MirEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION(
977-{
978- expect_event_type(ev, mir_event_type_window_output);
979-
980- return mir_event_get_window_output_event(ev);
981-})
982-
983 MirWindowOutputEvent const* mir_event_get_window_output_event(MirEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION(
984 {
985 expect_event_type(ev, mir_event_type_window_output);
986@@ -190,21 +167,6 @@
987 return ev->to_input_device_state();
988 })
989
990-/* Surface event accessors */
991-
992-#pragma GCC diagnostic push
993-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
994-MirSurfaceAttrib mir_surface_event_get_attribute(MirSurfaceEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION(
995-{
996- return static_cast<MirSurfaceAttrib>(mir_window_event_get_attribute(ev));
997-})
998-#pragma GCC diagnostic pop
999-
1000-int mir_surface_event_get_attribute_value(MirWindowEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION(
1001-{
1002- return mir_window_event_get_attribute_value(ev);
1003-})
1004-
1005 /* Window event accessors */
1006
1007 MirWindowAttrib mir_window_event_get_attribute(MirWindowEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION(
1008@@ -268,60 +230,6 @@
1009 return ev->device_id();
1010 })
1011
1012-#pragma GCC diagnostic push
1013-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1014-/* Input configuration event accessors */
1015-MirInputConfigurationAction mir_input_configuration_event_get_action(MirInputConfigurationEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION(
1016-{
1017- expect_event_type(ev, mir_event_type_input_configuration);
1018- return ev->action();
1019-})
1020-
1021-int64_t mir_input_configuration_event_get_time(MirInputConfigurationEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION(
1022-{
1023- expect_event_type(ev, mir_event_type_input_configuration);
1024- return ev->when().count();
1025-})
1026-
1027-MirInputDeviceId mir_input_configuration_event_get_device_id(MirInputConfigurationEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION(
1028-{
1029- expect_event_type(ev, mir_event_type_input_configuration);
1030- return ev->id();
1031-})
1032-#pragma GCC diagnostic pop
1033-
1034-/* Surface output event accessors */
1035-
1036-int mir_surface_output_event_get_dpi(MirWindowOutputEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION(
1037-{
1038- expect_event_type(ev, mir_event_type_window_output);
1039- return mir_window_output_event_get_dpi(ev);
1040-})
1041-
1042-MirFormFactor mir_surface_output_event_get_form_factor(MirWindowOutputEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION(
1043-{
1044- expect_event_type(ev, mir_event_type_window_output);
1045- return mir_window_output_event_get_form_factor(ev);
1046-})
1047-
1048-float mir_surface_output_event_get_scale(MirWindowOutputEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION(
1049-{
1050- expect_event_type(ev, mir_event_type_window_output);
1051- return mir_window_output_event_get_scale(ev);
1052-})
1053-
1054-double mir_surface_output_event_get_refresh_rate(MirWindowOutputEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION(
1055-{
1056- expect_event_type(ev, mir_event_type_window_output);
1057- return mir_window_output_event_get_refresh_rate(ev);
1058-})
1059-
1060-uint32_t mir_surface_output_event_get_output_id(MirWindowOutputEvent const *ev) MIR_HANDLE_EVENT_EXCEPTION(
1061-{
1062- expect_event_type(ev, mir_event_type_window_output);
1063- return mir_window_output_event_get_output_id(ev);
1064-})
1065-
1066 /* Window output event accessors */
1067
1068 int mir_window_output_event_get_dpi(MirWindowOutputEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION(
1069@@ -414,16 +322,6 @@
1070 return ev->device_pointer_buttons(index);
1071 })
1072
1073-MirWindowPlacementEvent const* mir_event_get_surface_placement_event(MirEvent const* event) MIR_HANDLE_EVENT_EXCEPTION(
1074-{
1075- return mir_event_get_window_placement_event(event);
1076-})
1077-
1078-MirRectangle mir_surface_placement_get_relative_position(MirWindowPlacementEvent const* event) MIR_HANDLE_EVENT_EXCEPTION(
1079-{
1080- return mir_window_placement_get_relative_position(event);
1081-})
1082-
1083 MirWindowPlacementEvent const* mir_event_get_window_placement_event(MirEvent const* event) MIR_HANDLE_EVENT_EXCEPTION(
1084 {
1085 return event->to_window_placement();
1086
1087=== modified file 'src/client/event_printer.cpp'
1088--- src/client/event_printer.cpp 2017-01-19 05:30:03 +0000
1089+++ src/client/event_printer.cpp 2017-02-07 00:07:50 +0000
1090@@ -130,82 +130,6 @@
1091 }
1092 }
1093
1094-#pragma GCC diagnostic push
1095-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1096-std::ostream& mir::operator<<(std::ostream& out, MirSurfaceAttrib attribute)
1097-{
1098- switch (attribute)
1099- {
1100- PRINT(mir_surface_attrib,type);
1101- PRINT(mir_surface_attrib,dpi);
1102- PRINT(mir_surface_attrib,focus);
1103- PRINT(mir_surface_attrib,state);
1104- PRINT(mir_surface_attrib,visibility);
1105- PRINT(mir_surface_attrib,swapinterval);
1106- PRINT(mir_surface_attrib,preferred_orientation);
1107- default:
1108- return out << static_cast<int>(attribute) << "<INVALID>";
1109- }
1110-}
1111-
1112-std::ostream& mir::operator<<(std::ostream& out, MirSurfaceFocusState state)
1113-{
1114- switch (state)
1115- {
1116- PRINT(mir_surface,focused);
1117- PRINT(mir_surface,unfocused);
1118- default:
1119- return out << static_cast<int>(state) << "<INVALID>";
1120- }
1121-}
1122-
1123-std::ostream& mir::operator<<(std::ostream& out, MirSurfaceVisibility state)
1124-{
1125- switch (state)
1126- {
1127- PRINT(mir_surface_visibility,exposed);
1128- PRINT(mir_surface_visibility,occluded);
1129- default:
1130- return out << static_cast<int>(state) << "<INVALID>";
1131- }
1132-}
1133-
1134-std::ostream& mir::operator<<(std::ostream& out, MirSurfaceType type)
1135-{
1136- switch (type)
1137- {
1138- PRINT(mir_surface_type,normal);
1139- PRINT(mir_surface_type,utility);
1140- PRINT(mir_surface_type,dialog);
1141- PRINT(mir_surface_type,gloss);
1142- PRINT(mir_surface_type,freestyle);
1143- PRINT(mir_surface_type,menu);
1144- PRINT(mir_surface_type,inputmethod);
1145- PRINT(mir_surface_type,satellite);
1146- PRINT(mir_surface_type,tip);
1147- default:
1148- return out << static_cast<int>(type) << "<INVALID>";
1149- }
1150-}
1151-
1152-std::ostream& mir::operator<<(std::ostream& out, MirSurfaceState state)
1153-{
1154- switch (state)
1155- {
1156- PRINT(mir_surface_state,unknown);
1157- PRINT(mir_surface_state,restored);
1158- PRINT(mir_surface_state,minimized);
1159- PRINT(mir_surface_state,maximized);
1160- PRINT(mir_surface_state,vertmaximized);
1161- PRINT(mir_surface_state,fullscreen);
1162- PRINT(mir_surface_state,horizmaximized);
1163- PRINT(mir_surface_state,hidden);
1164- default:
1165- return out << static_cast<int>(state) << "<INVALID>";
1166- }
1167-}
1168-#pragma GCC diagnostic pop
1169-
1170 std::ostream& mir::operator<<(std::ostream& out, MirWindowAttrib attribute)
1171 {
1172 switch (attribute)
1173@@ -447,14 +371,12 @@
1174 auto type = mir_event_get_type(&event);
1175 switch (type)
1176 {
1177- PRINT_EVENT(surface);
1178 PRINT_EVENT(resize);
1179 PRINT_EVENT(orientation);
1180 PRINT_EVENT(close_surface);
1181 PRINT_EVENT(input);
1182 PRINT_EVENT(input_device_state);
1183 PRINT_EVENT(keymap);
1184- PRINT_EVENT(surface_placement);
1185 case mir_event_type_prompt_session_state_change:
1186 return out << *mir_event_get_prompt_session_event(&event);
1187 default:
1188
1189=== modified file 'src/client/events/event_builders.cpp'
1190--- src/client/events/event_builders.cpp 2017-01-27 04:57:53 +0000
1191+++ src/client/events/event_builders.cpp 2017-02-07 00:07:50 +0000
1192@@ -85,20 +85,6 @@
1193 return make_uptr_event(e);
1194 }
1195
1196-#pragma GCC diagnostic push
1197-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1198-mir::EventUPtr mev::make_event(mf::SurfaceId const& surface_id, MirSurfaceAttrib attribute, int value)
1199-{
1200- auto e = new_event<MirSurfaceEvent>();
1201-
1202- e->set_id(surface_id.as_value());
1203- e->set_attrib(static_cast<MirWindowAttrib>(attribute));
1204- e->set_value(value);
1205-
1206- return make_uptr_event(e);
1207-}
1208-#pragma GCC diagnostic pop
1209-
1210 mir::EventUPtr mev::make_event(mf::SurfaceId const& surface_id, MirWindowAttrib attribute, int value)
1211 {
1212 auto e = new_event<MirWindowEvent>();
1213@@ -202,22 +188,6 @@
1214 event.to_input()->to_pointer()->set_buttons(button_state);
1215 }
1216
1217-// Deprecated version with uint64_t mac
1218-mir::EventUPtr mev::make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,
1219- uint64_t /*mac*/, MirKeyboardAction action, xkb_keysym_t key_code,
1220- int scan_code, MirInputEventModifiers modifiers)
1221-{
1222- return make_event(device_id, timestamp, std::vector<uint8_t>{}, action, key_code, scan_code, modifiers);
1223-}
1224-
1225-// Deprecated version without mac
1226-mir::EventUPtr mev::make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,
1227- MirKeyboardAction action, xkb_keysym_t key_code,
1228- int scan_code, MirInputEventModifiers modifiers)
1229-{
1230- return make_event(device_id, timestamp, std::vector<uint8_t>{}, action, key_code, scan_code, modifiers);
1231-}
1232-
1233 mir::EventUPtr mev::make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,
1234 std::vector<uint8_t> const& cookie, MirInputEventModifiers modifiers)
1235 {
1236@@ -231,20 +201,6 @@
1237 return make_uptr_event(e);
1238 }
1239
1240-// Deprecated version with uint64_t mac
1241-mir::EventUPtr mev::make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,
1242- uint64_t /*mac*/, MirInputEventModifiers modifiers)
1243-{
1244- return make_event(device_id, timestamp, std::vector<uint8_t>{}, modifiers);
1245-}
1246-
1247-// Deprecated version without mac
1248-mir::EventUPtr mev::make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,
1249- MirInputEventModifiers modifiers)
1250-{
1251- return make_event(device_id, timestamp, std::vector<uint8_t>{}, modifiers);
1252-}
1253-
1254 void mev::add_touch(MirEvent &event, MirTouchId touch_id, MirTouchAction action,
1255 MirTouchTooltype tooltype, float x_axis_value, float y_axis_value,
1256 float pressure_value, float touch_major_value, float touch_minor_value, float)
1257@@ -275,54 +231,6 @@
1258 return make_uptr_event(e);
1259 }
1260
1261-// Deprecated version with uint64_t mac
1262-mir::EventUPtr mev::make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,
1263- uint64_t /*mac*/, MirInputEventModifiers modifiers, MirPointerAction action,
1264- MirPointerButtons buttons_pressed,
1265- float x_axis_value, float y_axis_value,
1266- float hscroll_value, float vscroll_value,
1267- float relative_x_value, float relative_y_value)
1268-{
1269- return make_event(device_id, timestamp, std::vector<uint8_t>{}, modifiers, action,
1270- buttons_pressed, x_axis_value, y_axis_value, hscroll_value,
1271- vscroll_value, relative_x_value, relative_y_value);
1272-}
1273-
1274-// Deprecated version without mac
1275-mir::EventUPtr mev::make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,
1276- MirInputEventModifiers modifiers, MirPointerAction action,
1277- MirPointerButtons buttons_pressed,
1278- float x_axis_value, float y_axis_value,
1279- float hscroll_value, float vscroll_value,
1280- float relative_x_value, float relative_y_value)
1281-{
1282- return make_event(device_id, timestamp, std::vector<uint8_t>{}, modifiers, action,
1283- buttons_pressed, x_axis_value, y_axis_value, hscroll_value,
1284- vscroll_value, relative_x_value, relative_y_value);
1285-}
1286-
1287-// Deprecated version without relative axis
1288-mir::EventUPtr mev::make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,
1289- uint64_t /*mac*/, MirInputEventModifiers modifiers, MirPointerAction action,
1290- MirPointerButtons buttons_pressed,
1291- float x_axis_value, float y_axis_value,
1292- float hscroll_value, float vscroll_value)
1293-{
1294- return make_event(device_id, timestamp, std::vector<uint8_t>{}, modifiers, action, buttons_pressed,
1295- x_axis_value, y_axis_value, hscroll_value, vscroll_value, 0, 0);
1296-}
1297-
1298-// Deprecated version without relative axis, and mac
1299-mir::EventUPtr mev::make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,
1300- MirInputEventModifiers modifiers, MirPointerAction action,
1301- MirPointerButtons buttons_pressed,
1302- float x_axis_value, float y_axis_value,
1303- float hscroll_value, float vscroll_value)
1304-{
1305- return make_event(device_id, timestamp, std::vector<uint8_t>{}, modifiers, action, buttons_pressed,
1306- x_axis_value, y_axis_value, hscroll_value, vscroll_value, 0, 0);
1307-}
1308-
1309 mir::EventUPtr mev::make_event(mf::SurfaceId const& surface_id, MirInputDeviceId id, std::string const& model,
1310 std::string const& layout, std::string const& variant, std::string const& options)
1311 {
1312@@ -345,20 +253,6 @@
1313 return ep;
1314 }
1315
1316-#pragma GCC diagnostic push
1317-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1318-mir::EventUPtr mev::make_event(MirInputConfigurationAction action, MirInputDeviceId id, std::chrono::nanoseconds time)
1319-{
1320- auto e = new_event<MirInputConfigurationEvent>();
1321-
1322- e->set_action(action);
1323- e->set_when(time);
1324- e->set_id(id);
1325-
1326- return make_uptr_event(e);
1327-}
1328-#pragma GCC diagnostic pop
1329-
1330 mir::EventUPtr mev::make_event(std::chrono::nanoseconds timestamp,
1331 MirPointerButtons pointer_buttons,
1332 MirInputEventModifiers modifiers,
1333
1334=== modified file 'src/client/mir_blob.cpp'
1335--- src/client/mir_blob.cpp 2017-01-18 02:29:37 +0000
1336+++ src/client/mir_blob.cpp 2017-02-07 00:07:50 +0000
1337@@ -61,73 +61,6 @@
1338 };
1339 }
1340
1341-
1342-MirBlob* mir_blob_from_display_configuration(MirDisplayConfiguration* configuration)
1343-try
1344-{
1345- mp::DisplayConfiguration protobuf_config;
1346-
1347- for (auto const* card = configuration->cards; card != configuration->cards+configuration->num_cards; ++card)
1348- {
1349- auto protobuf_card = protobuf_config.add_display_card();
1350- protobuf_card->set_card_id(card->card_id);
1351- protobuf_card->set_max_simultaneous_outputs(card->max_simultaneous_outputs);
1352- }
1353-
1354- for (auto const* output = configuration->outputs;
1355- output != configuration->outputs+configuration->num_outputs;
1356- ++output)
1357- {
1358- auto protobuf_output = protobuf_config.add_display_output();
1359-
1360- protobuf_output->set_output_id(output->output_id);
1361- protobuf_output->set_card_id(output->card_id);
1362- protobuf_output->set_type(output->type);
1363-
1364- for (auto const* format = output->output_formats;
1365- format != output->output_formats+output->num_output_formats;
1366- ++format)
1367- {
1368- protobuf_output->add_pixel_format(*format);
1369- }
1370-
1371- for (auto const* mode = output->modes;
1372- mode != output->modes+output->num_modes;
1373- ++mode)
1374- {
1375- auto protobuf_output_mode = protobuf_output->add_mode();
1376- protobuf_output_mode->set_horizontal_resolution(mode->horizontal_resolution);
1377- protobuf_output_mode->set_vertical_resolution(mode->vertical_resolution);
1378- protobuf_output_mode->set_refresh_rate(mode->refresh_rate);
1379- }
1380-
1381- protobuf_output->set_preferred_mode(output->preferred_mode);
1382-
1383- protobuf_output->set_physical_width_mm(output->physical_width_mm);
1384- protobuf_output->set_physical_height_mm(output->physical_height_mm);
1385-
1386- protobuf_output->set_connected(output->connected);
1387- protobuf_output->set_used(output->used);
1388- protobuf_output->set_position_x(output->position_x);
1389- protobuf_output->set_position_y(output->position_y);
1390- protobuf_output->set_current_mode(output->current_mode);
1391- protobuf_output->set_current_format(output->current_format);
1392- protobuf_output->set_power_mode(output->power_mode);
1393- protobuf_output->set_orientation(output->orientation);
1394- }
1395-
1396- auto blob = std::make_unique<MirManagedBlob>(static_cast<size_t>(protobuf_config.ByteSize()));
1397-
1398- protobuf_config.SerializeWithCachedSizesToArray(blob->data());
1399-
1400- return blob.release();
1401-}
1402-catch (std::exception const& x)
1403-{
1404- MIR_LOG_UNCAUGHT_EXCEPTION(x);
1405- return nullptr;
1406-}
1407-
1408 MirBlob* mir_blob_from_display_config(MirDisplayConfig* configuration)
1409 try
1410 {
1411@@ -154,82 +87,6 @@
1412 return nullptr;
1413 }
1414
1415-MirDisplayConfiguration* mir_blob_to_display_configuration(MirBlob* blob)
1416-try
1417-{
1418- mp::DisplayConfiguration protobuf_config;
1419-
1420- protobuf_config.ParseFromArray(mir_blob_data(blob), mir_blob_size(blob));
1421-
1422- auto new_config = new MirDisplayConfiguration;
1423-
1424- new_config->num_cards = protobuf_config.display_card_size();
1425- new_config->cards = new MirDisplayCard[new_config->num_cards];
1426-
1427- for (auto i = 0u; i != new_config->num_cards; ++i)
1428- {
1429- auto const& protobuf_card = protobuf_config.display_card(i);
1430- auto& card = new_config->cards[i];
1431- card.card_id = protobuf_card.card_id();
1432- card.max_simultaneous_outputs = protobuf_card.max_simultaneous_outputs();
1433- }
1434-
1435- new_config->num_outputs = protobuf_config.display_output_size();
1436- new_config->outputs = new MirDisplayOutput[new_config->num_outputs];
1437-
1438- for (auto i = 0u; i != new_config->num_outputs; ++i)
1439- {
1440- auto const& protobuf_output = protobuf_config.display_output(i);
1441- auto& output = new_config->outputs[i];
1442-
1443- output.output_id = protobuf_output.output_id();
1444- output.card_id = protobuf_output.card_id();
1445- output.type = static_cast<MirDisplayOutputType>(protobuf_output.type());
1446-
1447- output.num_output_formats = protobuf_output.pixel_format_size();
1448- output.output_formats = new MirPixelFormat[output.num_output_formats];
1449-
1450- output.num_modes = protobuf_output.mode_size();
1451- output.modes = new MirDisplayMode[output.num_modes];
1452-
1453- for (auto i = 0u; i != output.num_output_formats; ++i)
1454- {
1455- output.output_formats[i] = static_cast<MirPixelFormat>(protobuf_output.pixel_format(i));
1456- }
1457-
1458- for (auto i = 0u; i != output.num_modes; ++i)
1459- {
1460- auto const& protobuf_mode = protobuf_output.mode(i);
1461- auto& mode = output.modes[i];
1462-
1463- mode.horizontal_resolution = protobuf_mode.horizontal_resolution();
1464- mode.vertical_resolution = protobuf_mode.vertical_resolution();
1465- mode.refresh_rate = protobuf_mode.refresh_rate();
1466- }
1467-
1468- output.preferred_mode = protobuf_output.preferred_mode();
1469-
1470- output.physical_width_mm = protobuf_output.physical_width_mm();
1471- output.physical_height_mm = protobuf_output.physical_height_mm();
1472-
1473- output.connected = protobuf_output.connected();
1474- output.used = protobuf_output.used();
1475- output.position_x = protobuf_output.position_x();
1476- output.position_y = protobuf_output.position_y();
1477- output.current_mode = protobuf_output.current_mode();
1478- output.current_format = static_cast<MirPixelFormat>(protobuf_output.current_format());
1479- output.orientation = static_cast<MirOrientation>(protobuf_output.orientation());
1480- output.power_mode = static_cast<MirPowerMode>(protobuf_output.power_mode());
1481- }
1482-
1483- return new_config;
1484-}
1485-catch (std::exception const& x)
1486-{
1487- MIR_LOG_UNCAUGHT_EXCEPTION(x);
1488- abort();
1489-}
1490-
1491 MirDisplayConfig* mir_blob_to_display_config(MirBlob* blob)
1492 try
1493 {
1494
1495=== modified file 'src/client/mir_connection_api.cpp'
1496--- src/client/mir_connection_api.cpp 2017-01-24 19:42:48 +0000
1497+++ src/client/mir_connection_api.cpp 2017-02-07 00:07:50 +0000
1498@@ -139,26 +139,6 @@
1499 MIR_LOG_UNCAUGHT_EXCEPTION(ex);
1500 }
1501
1502-void mir_connection_get_platform(
1503- MirConnection* connection,
1504- MirPlatformPackage* platform_package)
1505-{
1506- connection->populate(*platform_package);
1507-}
1508-
1509-void mir_connection_get_graphics_module(MirConnection *connection, MirModuleProperties *properties)
1510-try
1511-{
1512- mir::require(mir_connection_is_valid(connection));
1513- mir::require(properties != nullptr);
1514-
1515- connection->populate_graphics_module(*properties);
1516-}
1517-catch (std::exception const& ex)
1518-{
1519- MIR_LOG_UNCAUGHT_EXCEPTION(ex);
1520-}
1521-
1522 void mir_connection_set_lifecycle_event_callback(
1523 MirConnection* connection,
1524 MirLifecycleEventCallback callback,
1525@@ -381,22 +361,6 @@
1526 connection->available_surface_formats(formats, format_size, *num_valid_formats);
1527 }
1528
1529-MirWaitHandle* mir_connection_platform_operation(
1530- MirConnection* connection,
1531- MirPlatformMessage const* request,
1532- MirPlatformOperationCallback callback, void* context)
1533-{
1534- try
1535- {
1536- return connection->platform_operation(request, callback, context);
1537- }
1538- catch (std::exception const& ex)
1539- {
1540- MIR_LOG_UNCAUGHT_EXCEPTION(ex);
1541- return nullptr;
1542- }
1543-}
1544-
1545 void mir_connection_set_error_callback(
1546 MirConnection* connection,
1547 MirErrorCallback callback,
1548
1549=== modified file 'src/client/mir_debug_api.cpp'
1550--- src/client/mir_debug_api.cpp 2017-01-18 04:43:15 +0000
1551+++ src/client/mir_debug_api.cpp 2017-02-07 00:07:50 +0000
1552@@ -30,25 +30,3 @@
1553 {
1554 return window->get_buffer_stream()->get_current_buffer_id();
1555 }
1556-
1557-#pragma GCC diagnostic push
1558-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1559-
1560-bool mir_debug_surface_coords_to_screen(MirSurface* surface,
1561- int x, int y,
1562- int* screen_x, int* screen_y)
1563-{
1564- return surface->translate_to_screen_coordinates(x, y, screen_x, screen_y);
1565-}
1566-
1567-uint32_t mir_debug_surface_current_buffer_id(MirSurface* surface)
1568-{
1569- return mir_debug_window_current_buffer_id(surface);
1570-}
1571-
1572-int mir_debug_surface_id(MirSurface* surface)
1573-{
1574- return mir_debug_window_id(surface);
1575-}
1576-
1577-#pragma GCC diagnostic pop
1578
1579=== modified file 'src/client/mir_surface.cpp'
1580--- src/client/mir_surface.cpp 2017-02-02 22:43:06 +0000
1581+++ src/client/mir_surface.cpp 2017-02-07 00:07:50 +0000
1582@@ -525,8 +525,8 @@
1583 * mir_window_output_event_get_refresh_rate that tells us the full
1584 * native speed of the most relevant output...
1585 */
1586- auto soevent = mir_event_get_surface_output_event(&e);
1587- auto rate = mir_surface_output_event_get_refresh_rate(soevent);
1588+ auto soevent = mir_event_get_window_output_event(&e);
1589+ auto rate = mir_window_output_event_get_refresh_rate(soevent);
1590 if (rate > 10.0) // should be >0, but 10 to workaround LP: #1639725
1591 {
1592 std::chrono::nanoseconds const ns(
1593
1594=== modified file 'src/client/mir_surface_api.cpp'
1595--- src/client/mir_surface_api.cpp 2017-02-03 21:11:55 +0000
1596+++ src/client/mir_surface_api.cpp 2017-02-07 00:07:50 +0000
1597@@ -832,6 +832,7 @@
1598
1599 #pragma GCC diagnostic push
1600 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1601+
1602 void mir_window_spec_add_render_surface(
1603 MirWindowSpec* spec,
1604 MirRenderSurface* render_surface,
1605@@ -860,291 +861,6 @@
1606 MIR_LOG_UNCAUGHT_EXCEPTION(ex);
1607 }
1608
1609-MirSurfaceSpec* mir_connection_create_spec_for_normal_surface(MirConnection* connection,
1610- int width, int height,
1611- MirPixelFormat format)
1612-{
1613- auto spec = mir_create_normal_window_spec(connection, width, height);
1614- mir_window_spec_set_pixel_format(spec, format);
1615- return spec;
1616-}
1617-
1618-MirSurfaceSpec* mir_connection_create_spec_for_menu(MirConnection* connection,
1619- int width, int height,
1620- MirPixelFormat format,
1621- MirSurface* parent,
1622- MirRectangle* rect,
1623- MirEdgeAttachment edge)
1624-{
1625- auto spec = mir_create_menu_window_spec(connection, width, height, parent, rect, edge);
1626- mir_window_spec_set_pixel_format(spec, format);
1627- return spec;
1628-}
1629-
1630-MirSurfaceSpec* mir_connection_create_spec_for_tooltip(MirConnection* connection,
1631- int width, int height,
1632- MirPixelFormat format,
1633- MirSurface* parent,
1634- MirRectangle* rect)
1635-{
1636- auto spec = mir_create_tip_window_spec(connection, width, height, parent, rect, mir_edge_attachment_any);
1637- mir_window_spec_set_pixel_format(spec, format);
1638- return spec;
1639-}
1640-
1641-MirSurfaceSpec* mir_connection_create_spec_for_tip(MirConnection* connection,
1642- int width, int height,
1643- MirPixelFormat format,
1644- MirSurface* parent,
1645- MirRectangle* rect,
1646- MirEdgeAttachment edge)
1647-{
1648- auto spec = mir_create_tip_window_spec(connection, width, height, parent, rect, edge);
1649- mir_window_spec_set_pixel_format(spec, format);
1650- return spec;
1651-}
1652-
1653-MirSurfaceSpec* mir_connection_create_spec_for_dialog(MirConnection* connection,
1654- int width, int height,
1655- MirPixelFormat format)
1656-{
1657- auto spec = mir_create_dialog_window_spec(connection, width, height);
1658- mir_window_spec_set_pixel_format(spec, format);
1659- return spec;
1660-}
1661-
1662-MirSurfaceSpec* mir_connection_create_spec_for_input_method(MirConnection* connection,
1663- int width, int height,
1664- MirPixelFormat format)
1665-{
1666- auto spec = mir_create_input_method_window_spec(connection, width, height);
1667- mir_window_spec_set_pixel_format(spec, format);
1668- return spec;
1669-}
1670-
1671-MirSurfaceSpec* mir_connection_create_spec_for_modal_dialog(MirConnection* connection,
1672- int width, int height,
1673- MirPixelFormat format,
1674- MirSurface* parent)
1675-{
1676- auto spec = mir_create_modal_dialog_window_spec(connection, width, height, parent);
1677- mir_window_spec_set_pixel_format(spec, format);
1678- return spec;
1679-}
1680-
1681-MirSurface* mir_surface_create_sync(MirSurfaceSpec* requested_specification)
1682-{
1683- return mir_create_window_sync(requested_specification);
1684-}
1685-
1686-MirWaitHandle* mir_surface_create(MirSurfaceSpec* requested_specification,
1687- mir_surface_callback callback, void* context)
1688-{
1689- return window_create_helper(requested_specification, callback, context);
1690-}
1691-
1692-void mir_surface_spec_set_name(MirSurfaceSpec* spec, char const* name)
1693-{
1694- mir_window_spec_set_name(spec, name);
1695-}
1696-
1697-void mir_surface_spec_set_width(MirSurfaceSpec* spec, unsigned width)
1698-{
1699- mir_window_spec_set_width(spec, width);
1700-}
1701-
1702-void mir_surface_spec_set_height(MirSurfaceSpec* spec, unsigned height)
1703-{
1704- mir_window_spec_set_height(spec, height);
1705-}
1706-
1707-void mir_surface_spec_set_min_width(MirSurfaceSpec* spec, unsigned min_width)
1708-{
1709- mir_window_spec_set_min_width(spec, min_width);
1710-}
1711-
1712-void mir_surface_spec_set_min_height(MirSurfaceSpec* spec, unsigned min_height)
1713-{
1714- mir_window_spec_set_min_height(spec, min_height);
1715-}
1716-
1717-void mir_surface_spec_set_max_width(MirSurfaceSpec* spec, unsigned max_width)
1718-{
1719- mir_window_spec_set_max_width(spec, max_width);
1720-}
1721-
1722-void mir_surface_spec_set_max_height(MirSurfaceSpec* spec, unsigned max_height)
1723-{
1724- mir_window_spec_set_max_height(spec, max_height);
1725-}
1726-
1727-void mir_surface_spec_set_pixel_format(MirSurfaceSpec* spec, MirPixelFormat format)
1728-{
1729- mir_window_spec_set_pixel_format(spec, format);
1730-}
1731-
1732-void mir_surface_spec_set_buffer_usage(MirSurfaceSpec* spec, MirBufferUsage usage)
1733-{
1734- mir_window_spec_set_buffer_usage(spec, usage);
1735-}
1736-
1737-void mir_surface_spec_set_state(MirSurfaceSpec* spec, MirSurfaceState state)
1738-{
1739- mir_window_spec_set_state(spec, static_cast<MirWindowState>(state));
1740-}
1741-
1742-void mir_surface_spec_set_fullscreen_on_output(MirSurfaceSpec* spec, uint32_t output_id)
1743-{
1744- mir_window_spec_set_fullscreen_on_output(spec, output_id);
1745-}
1746-
1747-void mir_surface_spec_set_preferred_orientation(MirSurfaceSpec* spec, MirOrientationMode mode)
1748-{
1749- mir_window_spec_set_preferred_orientation(spec, mode);
1750-}
1751-
1752-void mir_surface_spec_set_event_handler(MirSurfaceSpec* spec,
1753- mir_surface_event_callback callback,
1754- void* context)
1755-{
1756- mir_window_spec_set_event_handler(spec, callback, context);
1757-}
1758-
1759-void mir_surface_spec_set_shell_chrome(MirSurfaceSpec* spec, MirShellChrome style)
1760-{
1761- mir_window_spec_set_shell_chrome(spec, style);
1762-}
1763-
1764-void mir_surface_spec_release(MirSurfaceSpec* spec)
1765-{
1766- mir_window_spec_release(spec);
1767-}
1768-
1769-MirSurfaceSpec* mir_create_surface_spec(MirConnection* connection)
1770-{
1771- return mir_create_window_spec(connection);
1772-}
1773-
1774-MirSurfaceSpec* mir_connection_create_spec_for_changes(MirConnection* connection)
1775-{
1776- return mir_create_window_spec(connection);
1777-}
1778-
1779-void mir_surface_apply_spec(MirSurface* surface, MirSurfaceSpec* spec)
1780-{
1781- mir_window_apply_spec(surface, spec);
1782-}
1783-
1784-void mir_surface_spec_set_streams(MirSurfaceSpec* spec, MirBufferStreamInfo* streams, unsigned int size)
1785-{
1786- mir_window_spec_set_streams(spec, streams, size);
1787-}
1788-
1789-void mir_surface_spec_set_input_shape(MirSurfaceSpec *spec, MirRectangle const* rectangles,
1790- size_t n_rects)
1791-{
1792- mir_window_spec_set_input_shape(spec, rectangles, n_rects);
1793-}
1794-
1795-void mir_surface_spec_set_parent(MirSurfaceSpec* spec, MirSurface* parent)
1796-{
1797- mir_window_spec_set_parent(spec, parent);
1798-}
1799-
1800-void mir_surface_spec_set_type(MirSurfaceSpec* spec, MirSurfaceType type)
1801-{
1802- mir_window_spec_set_type(spec, static_cast<MirWindowType>(type));
1803-}
1804-
1805-void mir_surface_spec_set_width_increment(MirSurfaceSpec* spec, unsigned width_inc)
1806-{
1807- mir_window_spec_set_width_increment(spec, width_inc);
1808-}
1809-
1810-void mir_surface_spec_set_height_increment(MirSurfaceSpec* spec, unsigned height_inc)
1811-{
1812- mir_window_spec_set_height_increment(spec, height_inc);
1813-}
1814-
1815-void mir_surface_spec_set_min_aspect_ratio(MirSurfaceSpec* spec, unsigned width, unsigned height)
1816-{
1817- mir_window_spec_set_min_aspect_ratio(spec, width, height);
1818-}
1819-
1820-void mir_surface_spec_set_max_aspect_ratio(MirSurfaceSpec* spec, unsigned width, unsigned height)
1821-{
1822- mir_window_spec_set_max_aspect_ratio(spec, width, height);
1823-}
1824-
1825-void mir_surface_spec_set_pointer_confinement(MirSurfaceSpec* spec, MirPointerConfinementState state)
1826-{
1827- mir_window_spec_set_pointer_confinement(spec, state);
1828-}
1829-
1830-void mir_surface_spec_set_placement(MirSurfaceSpec* spec,
1831- MirRectangle const* rect,
1832- MirPlacementGravity rect_gravity,
1833- MirPlacementGravity window_gravity,
1834- MirPlacementHints placement_hints,
1835- int offset_dx, int offset_dy)
1836-{
1837- mir_window_spec_set_placement(spec,
1838- rect,
1839- rect_gravity,
1840- window_gravity,
1841- placement_hints,
1842- offset_dx,
1843- offset_dy);
1844-}
1845-
1846-bool mir_surface_spec_attach_to_foreign_parent(MirSurfaceSpec* spec,
1847- MirWindowId* parent,
1848- MirRectangle* attachment_rect,
1849- MirEdgeAttachment edge)
1850-{
1851- return mir_window_spec_attach_to_foreign_parent(spec,
1852- parent,
1853- attachment_rect,
1854- edge);
1855-}
1856-
1857-void mir_surface_set_event_handler(MirSurface* surface, mir_surface_event_callback callback, void* context)
1858-{
1859- mir_window_set_event_handler(surface, callback, context);
1860-}
1861-
1862-bool mir_surface_is_valid(MirSurface* surface)
1863-{
1864- return mir_window_is_valid(surface);
1865-}
1866-
1867-char const* mir_surface_get_error_message(MirSurface* surface)
1868-{
1869- return mir_window_get_error_message(surface);
1870-}
1871-
1872-void mir_surface_get_parameters(MirSurface* surface, MirSurfaceParameters* parameters)
1873-{
1874- mir_window_get_parameters(surface, parameters);
1875-}
1876-
1877-MirWaitHandle* mir_surface_release(
1878- MirSurface* surface,
1879- mir_surface_callback callback, void* context)
1880-{
1881- return window_release_helper(surface, callback, context);
1882-}
1883-
1884-void mir_surface_release_sync(MirSurface* surface)
1885-{
1886- mir_window_release_sync(surface);
1887-}
1888-
1889-MirSurfaceType mir_surface_get_type(MirSurface* surf)
1890-{
1891- return static_cast<MirSurfaceType>(mir_window_get_type(surf));
1892-}
1893-
1894 MirWaitHandle* mir_surface_set_state(MirSurface* surf, MirSurfaceState state)
1895 try
1896 {
1897@@ -1162,77 +878,6 @@
1898 return static_cast<MirSurfaceState>(mir_window_get_state(surf));
1899 }
1900
1901-MirOrientation mir_surface_get_orientation(MirSurface *surface)
1902-{
1903- return mir_window_get_orientation(surface);
1904-}
1905-
1906-MirWaitHandle* mir_surface_set_swapinterval(MirSurface* surf, int interval)
1907-{
1908- if (interval < 0)
1909- return nullptr;
1910-
1911- try
1912- {
1913- if (surf)
1914- {
1915- if (auto stream = surf->get_buffer_stream())
1916- return stream->set_swap_interval(interval);
1917- }
1918- }
1919- catch (std::exception const& ex)
1920- {
1921- MIR_LOG_UNCAUGHT_EXCEPTION(ex);
1922- return nullptr;
1923- }
1924- return nullptr;
1925-}
1926-
1927-int mir_surface_get_swapinterval(MirSurface* surf)
1928-{
1929- int swap_interval = -1;
1930-
1931- try
1932- {
1933- if (surf)
1934- {
1935- if (auto stream = surf->get_buffer_stream())
1936- swap_interval = stream->swap_interval();
1937- }
1938- }
1939- catch (std::exception const& ex)
1940- {
1941- MIR_LOG_UNCAUGHT_EXCEPTION(ex);
1942- }
1943-
1944- return swap_interval;
1945-}
1946-
1947-int mir_surface_get_dpi(MirSurface* surf)
1948-{
1949- return mir_window_get_dpi(surf);
1950-}
1951-
1952-MirSurfaceFocusState mir_surface_get_focus(MirSurface* surf)
1953-{
1954- return static_cast<MirSurfaceFocusState>(mir_window_get_focus_state(surf));
1955-}
1956-
1957-MirSurfaceVisibility mir_surface_get_visibility(MirSurface* surf)
1958-{
1959- return static_cast<MirSurfaceVisibility>(mir_window_get_visibility(surf));
1960-}
1961-
1962-MirWaitHandle* mir_surface_configure_cursor(MirSurface* surface, MirCursorConfiguration const* cursor)
1963-{
1964- return mir_configure_cursor_helper(surface, cursor);
1965-}
1966-
1967-MirOrientationMode mir_surface_get_preferred_orientation(MirSurface *surf)
1968-{
1969- return mir_window_get_preferred_orientation(surf);
1970-}
1971-
1972 MirWaitHandle* mir_surface_set_preferred_orientation(MirSurface *surf, MirOrientationMode mode)
1973 try
1974 {
1975@@ -1245,51 +890,8 @@
1976 return nullptr;
1977 }
1978
1979-void mir_surface_raise(MirSurface* surf, MirCookie const* cookie)
1980-{
1981- mir_window_raise(surf, cookie);
1982-}
1983-
1984-MirBufferStream* mir_surface_get_buffer_stream(MirSurface *surface)
1985-{
1986- return mir_window_get_buffer_stream(surface);
1987-}
1988-
1989-MirWaitHandle* mir_surface_request_persistent_id(MirSurface* surface, MirWindowIdCallback callback, void* context)
1990-{
1991- return mir_window_request_persistent_id_helper(surface, callback, context);
1992-}
1993-
1994-MirWindowId* mir_surface_request_persistent_id_sync(MirSurface *surface)
1995-{
1996- MirWindowId* result = nullptr;
1997- if (auto wh = mir_window_request_persistent_id_helper(surface, &assign_surface_id_result, &result))
1998- wh->wait_for_all();
1999- return result;
2000-}
2001-
2002 #pragma GCC diagnostic pop
2003
2004-bool mir_persistent_id_is_valid(MirWindowId* id)
2005-{
2006- return mir_window_id_is_valid(id);
2007-}
2008-
2009-void mir_persistent_id_release(MirWindowId* id)
2010-{
2011- mir_window_id_release(id);
2012-}
2013-
2014-char const* mir_persistent_id_as_string(MirWindowId *id)
2015-{
2016- return mir_window_id_as_string(id);
2017-}
2018-
2019-MirWindowId* mir_persistent_id_from_string(char const* id_string)
2020-{
2021- return mir_window_id_from_string(id_string);
2022-}
2023-
2024 bool mir_window_id_is_valid(MirWindowId* id)
2025 {
2026 return id != nullptr;
2027
2028=== modified file 'src/client/symbols-debug.map'
2029--- src/client/symbols-debug.map 2015-06-17 05:20:42 +0000
2030+++ src/client/symbols-debug.map 2017-02-07 00:07:50 +0000
2031@@ -1,4 +1,4 @@
2032-MIR_CLIENT_DEBUG_9 {
2033+MIR_CLIENT_DEBUG_1_0 {
2034 global:
2035 mir_debug_*;
2036 local: *;
2037
2038=== modified file 'src/client/symbols.map'
2039--- src/client/symbols.map 2017-02-02 19:17:46 +0000
2040+++ src/client/symbols.map 2017-02-07 00:07:50 +0000
2041@@ -21,24 +21,15 @@
2042 mir_connection_create_display_config;
2043 mir_connection_create_prompt_session_sync;
2044 mir_connection_create_screencast_sync;
2045- mir_connection_create_spec_for_changes;
2046- mir_connection_create_spec_for_dialog;
2047 mir_connection_create_spec_for_input_method;
2048- mir_connection_create_spec_for_menu;
2049- mir_connection_create_spec_for_modal_dialog;
2050- mir_connection_create_spec_for_normal_surface;
2051- mir_connection_create_spec_for_tooltip;
2052 mir_connection_get_available_surface_formats;
2053 mir_connection_get_egl_native_display;
2054 mir_connection_get_error_message;
2055- mir_connection_get_platform;
2056 mir_connection_is_valid;
2057- mir_connection_platform_operation;
2058 mir_connection_release;
2059 mir_connection_set_display_config_change_callback;
2060 mir_connection_set_lifecycle_event_callback;
2061 mir_connect_sync;
2062- mir_create_surface_spec;
2063 mir_cursor_configuration_destroy;
2064 mir_cursor_configuration_from_buffer_stream;
2065 mir_cursor_configuration_from_name;
2066@@ -48,21 +39,16 @@
2067 mir_disabled_cursor_name;
2068 mir_display_config_destroy;
2069 mir_event_get_close_surface_event;
2070- mir_event_get_input_configuration_event;
2071 mir_event_get_input_event;
2072 mir_event_get_keymap_event;
2073 mir_event_get_orientation_event;
2074 mir_event_get_prompt_session_event;
2075 mir_event_get_resize_event;
2076- mir_event_get_surface_event;
2077 mir_event_get_type;
2078 mir_event_ref;
2079 mir_event_unref;
2080 mir_horizontal_resize_cursor_name;
2081 mir_hsplit_resize_cursor_name;
2082- mir_input_configuration_event_get_action;
2083- mir_input_configuration_event_get_device_id;
2084- mir_input_configuration_event_get_time;
2085 mir_input_event_get_device_id;
2086 mir_input_event_get_event_time;
2087 mir_input_event_get_keyboard_event;
2088@@ -73,12 +59,9 @@
2089 mir_keyboard_event_key_code;
2090 mir_keyboard_event_modifiers;
2091 mir_keyboard_event_scan_code;
2092- mir_keymap_event_get_rules;
2093 mir_omnidirectional_resize_cursor_name;
2094 mir_open_hand_cursor_name;
2095 mir_orientation_event_get_direction;
2096- mir_persistent_id_is_valid;
2097- mir_persistent_id_release;
2098 mir_platform_message_create;
2099 mir_platform_message_get_data;
2100 mir_platform_message_get_fds;
2101@@ -101,53 +84,6 @@
2102 mir_resize_event_get_width;
2103 mir_screencast_get_buffer_stream;
2104 mir_screencast_release_sync;
2105- mir_surface_apply_spec;
2106- mir_surface_configure_cursor;
2107- mir_surface_create;
2108- mir_surface_create_sync;
2109- mir_surface_event_get_attribute;
2110- mir_surface_event_get_attribute_value;
2111- mir_surface_get_buffer_stream;
2112- mir_surface_get_dpi;
2113- mir_surface_get_error_message;
2114- mir_surface_get_focus;
2115- mir_surface_get_orientation;
2116- mir_surface_get_parameters;
2117- mir_surface_get_preferred_orientation;
2118- mir_surface_get_state;
2119- mir_surface_get_swapinterval;
2120- mir_surface_get_type;
2121- mir_surface_get_visibility;
2122- mir_surface_is_valid;
2123- mir_surface_release;
2124- mir_surface_release_sync;
2125- mir_surface_request_persistent_id;
2126- mir_surface_request_persistent_id_sync;
2127- mir_surface_set_event_handler;
2128- mir_surface_set_preferred_orientation;
2129- mir_surface_set_state;
2130- mir_surface_set_swapinterval;
2131- mir_surface_spec_release;
2132- mir_surface_spec_set_buffer_usage;
2133- mir_surface_spec_set_fullscreen_on_output;
2134- mir_surface_spec_set_height;
2135- mir_surface_spec_set_height_increment;
2136- mir_surface_spec_set_max_aspect_ratio;
2137- mir_surface_spec_set_max_height;
2138- mir_surface_spec_set_max_width;
2139- mir_surface_spec_set_min_aspect_ratio;
2140- mir_surface_spec_set_min_height;
2141- mir_surface_spec_set_min_width;
2142- mir_surface_spec_set_name;
2143- mir_surface_spec_set_parent;
2144- mir_surface_spec_set_pixel_format;
2145- mir_surface_spec_set_placement;
2146- mir_surface_spec_set_preferred_orientation;
2147- mir_surface_spec_set_state;
2148- mir_surface_spec_set_streams;
2149- mir_surface_spec_set_type;
2150- mir_surface_spec_set_width;
2151- mir_surface_spec_set_width_increment;
2152 mir_touch_event_action;
2153 mir_touch_event_axis_value;
2154 mir_touch_event_id;
2155@@ -158,6 +94,9 @@
2156 mir_vsplit_resize_cursor_name;
2157 mir_wait_for;
2158 mir_wait_for_one;
2159+ mir_surface_set_state;
2160+ mir_surface_get_state;
2161+ mir_surface_set_preferred_orientation;
2162 local: *;
2163 };
2164
2165@@ -167,42 +106,25 @@
2166 mir_connection_set_ping_event_callback;
2167 mir_crosshair_cursor_name;
2168 mir_keyboard_event_input_event;
2169- mir_persistent_id_as_string;
2170- mir_persistent_id_from_string;
2171 mir_pointer_event_input_event;
2172 mir_touch_event_input_event;
2173- mir_surface_spec_attach_to_foreign_parent;
2174- mir_surface_spec_set_input_shape;
2175 mir_connection_get_egl_pixel_format;
2176 local: *;
2177 } MIR_CLIENT_9;
2178
2179-MIR_CLIENT_9.2 { # New functions in Mir 0.16
2180- global:
2181- mir_surface_spec_set_event_handler;
2182- local: *;
2183-} MIR_CLIENT_9.1;
2184-
2185 MIR_CLIENT_9v17 {
2186- mir_blob_from_display_configuration;
2187 mir_blob_size;
2188 mir_blob_data;
2189 mir_blob_release;
2190 mir_blob_onto_buffer;
2191- mir_blob_to_display_configuration;
2192 mir_blob_release;
2193 mir_buffer_stream_set_scale;
2194 mir_buffer_stream_set_scale_sync;
2195- mir_event_get_surface_output_event;
2196- mir_surface_output_event_get_dpi;
2197- mir_surface_output_event_get_form_factor;
2198- mir_surface_output_event_get_scale;
2199-} MIR_CLIENT_9.2;
2200+} MIR_CLIENT_9.1;
2201
2202 MIR_CLIENT_9v18 {
2203 global:
2204 mir_buffer_stream_get_error_message;
2205- mir_surface_output_event_get_output_id;
2206 mir_connection_set_base_display_config;
2207 local:
2208 *;
2209@@ -210,8 +132,6 @@
2210
2211 MIR_CLIENT_9v19 {
2212 global:
2213- mir_connection_get_graphics_module;
2214- mir_surface_raise;
2215 mir_input_event_has_cookie;
2216 mir_cookie_buffer_size;
2217 mir_input_event_get_cookie;
2218@@ -220,7 +140,6 @@
2219 mir_cookie_release;
2220 mir_keymap_event_get_keymap_buffer;
2221 mir_keymap_event_get_device_id;
2222- mir_surface_spec_set_shell_chrome;
2223 } MIR_CLIENT_9v18;
2224
2225 MIR_CLIENT_0.21 {
2226@@ -413,13 +332,10 @@
2227 mir_input_device_state_event_pointer_buttons;
2228 mir_input_device_state_event_time;
2229 mir_input_device_state_event_device_pointer_buttons;
2230- mir_surface_spec_set_pointer_confinement;
2231 } MIR_CLIENT_0.22;
2232
2233 MIR_CLIENT_0.25 { # New functions in Mir 0.25
2234 global:
2235- mir_connection_create_spec_for_tip;
2236- mir_event_get_surface_placement_event;
2237 mir_output_get_current_mode_index;
2238 mir_output_get_preferred_mode_index;
2239 mir_output_get_subpixel_arrangement;
2240@@ -428,10 +344,7 @@
2241 mir_output_get_gamma;
2242 mir_output_set_gamma;
2243 mir_connection_cancel_base_display_configuration_preview;
2244- mir_surface_placement_get_relative_position;
2245- mir_display_output_type_name;
2246 mir_output_type_name;
2247- mir_surface_output_event_get_refresh_rate;
2248 mir_input_device_state_event_device_pressed_keys_for_index;
2249 mir_buffer_stream_set_swapinterval;
2250 mir_buffer_stream_get_swapinterval;
2251
2252=== modified file 'tests/acceptance-tests/CMakeLists.txt'
2253--- tests/acceptance-tests/CMakeLists.txt 2017-02-01 17:43:59 +0000
2254+++ tests/acceptance-tests/CMakeLists.txt 2017-02-07 00:07:50 +0000
2255@@ -42,7 +42,6 @@
2256 test_server_startup.cpp
2257 test_debug_api.cpp
2258 test_unresponsive_client.cpp
2259- test_client_platform_operation.cpp
2260 test_input_device_hub.cpp
2261 test_latency.cpp
2262 test_render_override.cpp
2263
2264=== modified file 'tests/acceptance-tests/test_client_library.cpp'
2265--- tests/acceptance-tests/test_client_library.cpp 2017-02-03 22:37:56 +0000
2266+++ tests/acceptance-tests/test_client_library.cpp 2017-02-07 00:07:50 +0000
2267@@ -787,26 +787,6 @@
2268 mir_connection_release(connection);
2269 }
2270
2271-TEST_F(ClientLibrary, accesses_platform_package)
2272-{
2273- using namespace testing;
2274-#pragma GCC diagnostic push
2275-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2276- mir_wait_for(mir_connect(new_connection().c_str(), __PRETTY_FUNCTION__, connection_callback, this));
2277-#pragma GCC diagnostic pop
2278-
2279- MirPlatformPackage platform_package;
2280- ::memset(&platform_package, -1, sizeof(platform_package));
2281-
2282-#pragma GCC diagnostic push
2283-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2284- mir_connection_get_platform(connection, &platform_package);
2285-#pragma GCC diagnostic pop
2286- EXPECT_THAT(platform_package, mtf::IsStubPlatformPackage());
2287-
2288- mir_connection_release(connection);
2289-}
2290-
2291 TEST_F(ClientLibrary, accesses_display_info)
2292 {
2293 #pragma GCC diagnostic push
2294@@ -1120,9 +1100,7 @@
2295 mir_connection_release(connection);
2296 }
2297
2298-#pragma GCC diagnostic push
2299-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2300-TEST_F(ClientLibrary, can_get_persistent_surface_id)
2301+TEST_F(ClientLibrary, can_get_window_id)
2302 {
2303 auto connection = mir_connect_sync(new_connection().c_str(), __PRETTY_FUNCTION__);
2304
2305@@ -1133,11 +1111,11 @@
2306
2307 ASSERT_THAT(window, IsValid());
2308
2309- auto surface_id = mir_window_request_persistent_id_sync(window);
2310- EXPECT_TRUE(mir_persistent_id_is_valid(surface_id));
2311+ auto surface_id = mir_window_request_window_id_sync(window);
2312+ EXPECT_TRUE(mir_window_id_is_valid(surface_id));
2313
2314 mir_window_release_sync(window);
2315- mir_persistent_id_release(surface_id);
2316+ mir_window_id_release(surface_id);
2317 mir_connection_release(connection);
2318 }
2319
2320@@ -1152,11 +1130,11 @@
2321
2322 ASSERT_THAT(main_surface, IsValid());
2323
2324- auto main_surface_id = mir_window_request_persistent_id_sync(main_surface);
2325- ASSERT_TRUE(mir_persistent_id_is_valid(main_surface_id));
2326+ auto main_surface_id = mir_window_request_window_id_sync(main_surface);
2327+ ASSERT_TRUE(mir_window_id_is_valid(main_surface_id));
2328
2329 // Serialise & deserialise the ID
2330- auto im_parent_id = mir_persistent_id_from_string(mir_persistent_id_as_string(main_surface_id));
2331+ auto im_parent_id = mir_window_id_from_string(mir_window_id_as_string(main_surface_id));
2332
2333 auto im_client = mir_connect_sync(new_connection().c_str(), "IM Client");
2334 surface_spec = mir_create_input_method_window_spec(im_client, 200, 20);
2335@@ -1176,14 +1154,13 @@
2336 EXPECT_THAT(im_surface, IsValid());
2337
2338 mir_window_spec_release(surface_spec);
2339- mir_persistent_id_release(main_surface_id);
2340- mir_persistent_id_release(im_parent_id);
2341+ mir_window_id_release(main_surface_id);
2342+ mir_window_id_release(im_parent_id);
2343 mir_window_release_sync(main_surface);
2344 mir_window_release_sync(im_surface);
2345 mir_connection_release(first_client);
2346 mir_connection_release(im_client);
2347 }
2348-#pragma GCC diagnostic pop
2349
2350 //lp:1661704
2351 TEST_F(ClientLibrary, can_get_window_id_more_than_once_in_quick_succession)
2352
2353=== modified file 'tests/acceptance-tests/test_client_library_callbacks.cpp'
2354--- tests/acceptance-tests/test_client_library_callbacks.cpp 2017-01-18 16:58:17 +0000
2355+++ tests/acceptance-tests/test_client_library_callbacks.cpp 2017-02-07 00:07:50 +0000
2356@@ -125,31 +125,6 @@
2357 3s);
2358 }
2359
2360-#pragma GCC diagnostic push
2361-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2362-TEST_F(ClientLibraryCallbacks, create_surface_callback_is_called_before_wait_handler_has_result)
2363-{
2364- connection = mir_connect_sync(new_connection().c_str(), __PRETTY_FUNCTION__);
2365-
2366- auto const spec = mir_create_normal_window_spec(connection, 100, 100);
2367- mir_window_spec_set_pixel_format(spec, mir_pixel_format_argb_8888);
2368- auto const wh = mir_surface_create(spec, create_surface_callback, this);
2369- mir_window_spec_release(spec);
2370-#pragma GCC diagnostic push
2371-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2372- mir_wait_for(wh);
2373-#pragma GCC diagnostic pop
2374-
2375- EXPECT_THAT(window.load(), NotNull());
2376-
2377- // Even if the test fails, wait for object to become ready so we can
2378- // tear down properly
2379- mt::spin_wait_for_condition_or_timeout(
2380- [this] { return window != nullptr; },
2381- 3s);
2382-}
2383-#pragma GCC diagnostic pop
2384-
2385 TEST_F(ClientLibraryCallbacks, swap_buffers_callback_is_called_before_wait_handler_has_result)
2386 {
2387 connection = mir_connect_sync(new_connection().c_str(), __PRETTY_FUNCTION__);
2388@@ -170,26 +145,3 @@
2389 [this] { return buffers == 1; },
2390 3s);
2391 }
2392-
2393-#pragma GCC diagnostic push
2394-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2395-TEST_F(ClientLibraryCallbacks, release_surface_callback_is_called_before_wait_handler_has_result)
2396-{
2397- connection = mir_connect_sync(new_connection().c_str(), __PRETTY_FUNCTION__);
2398- window = mtf::make_any_surface(connection);
2399-
2400- auto const wh = mir_surface_release(window, release_surface_callback, this);
2401-#pragma GCC diagnostic push
2402-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2403- mir_wait_for(wh);
2404-#pragma GCC diagnostic pop
2405-
2406- EXPECT_THAT(window.load(), IsNull());
2407-
2408- // Even if the test fails, wait for object to become ready so we can
2409- // tear down properly
2410- mt::spin_wait_for_condition_or_timeout(
2411- [this] { return window == nullptr; },
2412- 3s);
2413-}
2414-#pragma GCC diagnostic pop
2415
2416=== modified file 'tests/acceptance-tests/test_client_library_errors.cpp'
2417--- tests/acceptance-tests/test_client_library_errors.cpp 2017-02-01 19:54:40 +0000
2418+++ tests/acceptance-tests/test_client_library_errors.cpp 2017-02-07 00:07:50 +0000
2419@@ -206,9 +206,7 @@
2420 mir_connection_release(connection);
2421 }
2422
2423-#pragma GCC diagnostic push
2424-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2425-TEST_F(ClientLibraryErrors, passing_invalid_parent_id_to_surface_create)
2426+TEST_F(ClientLibraryErrors, passing_invalid_parent_id_to_window_create)
2427 {
2428 using namespace testing;
2429
2430@@ -217,7 +215,7 @@
2431 ASSERT_THAT(connection, IsValid());
2432
2433 // An ID that parses as valid, but doesn't correspond to any
2434- auto invalid_id = mir_persistent_id_from_string("05f223a2-39e5-48b9-9416-b0ce837351b6");
2435+ auto invalid_id = mir_window_id_from_string("05f223a2-39e5-48b9-9416-b0ce837351b6");
2436
2437 auto spec = mir_create_input_method_window_spec(connection, 200, 200);
2438 mir_window_spec_set_pixel_format(spec, mir_pixel_format_argb_8888);
2439@@ -233,7 +231,7 @@
2440 EXPECT_THAT(window, Not(IsValid()));
2441 EXPECT_THAT(mir_window_get_error_message(window), MatchesRegex(".*Lookup.*failed.*"));
2442
2443- mir_persistent_id_release(invalid_id);
2444+ mir_window_id_release(invalid_id);
2445 mir_window_spec_release(spec);
2446 mir_window_release_sync(window);
2447 mir_connection_release(connection);
2448@@ -241,7 +239,6 @@
2449
2450 using ClientLibraryErrorsDeathTest = ClientLibraryErrors;
2451
2452-
2453 TEST_F(ClientLibraryErrorsDeathTest, creating_surface_on_garbage_connection_is_fatal)
2454 {
2455 auto connection = mir_connect_sync("garbage", __PRETTY_FUNCTION__);
2456@@ -296,7 +293,7 @@
2457 auto spec = mir_create_input_method_window_spec(connection, 100, 100);
2458 mir_window_spec_set_pixel_format(spec, mir_pixel_format_argb_8888);
2459
2460- auto id = mir_persistent_id_from_string("fa69b2e9-d507-4005-be61-5068f40a5aec");
2461+ auto id = mir_window_id_from_string("fa69b2e9-d507-4005-be61-5068f40a5aec");
2462
2463 MIR_EXPECT_DEATH(
2464 {
2465@@ -304,11 +301,10 @@
2466 mir_edge_attachment_any);
2467 }, "");
2468
2469- mir_persistent_id_release(id);
2470+ mir_window_id_release(id);
2471 mir_connection_release(connection);
2472 }
2473
2474-#pragma GCC diagnostic pop
2475 TEST_F(ClientLibraryErrorsDeathTest, creating_screencast_with_invalid_connection)
2476 {
2477 MIR_EXPECT_DEATH(mir_create_screencast_spec(nullptr), "");
2478
2479=== removed file 'tests/acceptance-tests/test_client_platform_operation.cpp'
2480--- tests/acceptance-tests/test_client_platform_operation.cpp 2017-01-18 16:58:17 +0000
2481+++ tests/acceptance-tests/test_client_platform_operation.cpp 1970-01-01 00:00:00 +0000
2482@@ -1,198 +0,0 @@
2483-#include "mir_toolkit/mir_client_library.h"
2484-#include "mir_test_framework/connected_client_headless_server.h"
2485-#include "mir_test_framework/stub_graphics_platform_operation.h"
2486-#include "mir/test/pipe.h"
2487-
2488-#include <gtest/gtest.h>
2489-#include <gmock/gmock.h>
2490-
2491-#include <cstring>
2492-#include <unistd.h>
2493-
2494-//whole test should be removed once the platform messages are removed
2495-#pragma GCC diagnostic push
2496-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2497-namespace mtf = mir_test_framework;
2498-
2499-namespace
2500-{
2501-
2502-void assign_reply(MirConnection*, MirPlatformMessage* reply, void* context)
2503-{
2504- auto message = static_cast<MirPlatformMessage**>(context);
2505- *message = reply;
2506-}
2507-
2508-struct ClientPlatformOperation : mtf::ConnectedClientHeadlessServer
2509-{
2510- MirPlatformMessage* platform_operation_add(int num1, int num2)
2511- {
2512- return platform_operation_add({num1,num2});
2513- }
2514-
2515- MirPlatformMessage* incorrect_platform_operation_add()
2516- {
2517- return platform_operation_add({7});
2518- }
2519-
2520- MirPlatformMessage* platform_operation_add(std::vector<int> const& nums)
2521- {
2522- auto const request = mir_platform_message_create(add_opcode);
2523- mir_platform_message_set_data(request, nums.data(), sizeof(int) * nums.size());
2524- MirPlatformMessage* reply;
2525-
2526- auto const platform_op_done = mir_connection_platform_operation(
2527- connection, request, assign_reply, &reply);
2528-#pragma GCC diagnostic push
2529-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2530- mir_wait_for(platform_op_done);
2531-#pragma GCC diagnostic pop
2532-
2533- mir_platform_message_release(request);
2534-
2535- return reply;
2536- }
2537-
2538- MirPlatformMessage* platform_operation_echo_fd(int fd)
2539- {
2540- unsigned int const echo_fd_opcode =
2541- static_cast<unsigned int>(mtf::StubGraphicsPlatformOperation::echo_fd);
2542-
2543- auto const request = mir_platform_message_create(echo_fd_opcode);
2544- mir_platform_message_set_fds(request, &fd, 1);
2545- MirPlatformMessage* reply;
2546-
2547- auto const platform_op_done = mir_connection_platform_operation(
2548- connection, request, assign_reply, &reply);
2549-#pragma GCC diagnostic push
2550-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2551- mir_wait_for(platform_op_done);
2552-#pragma GCC diagnostic pop
2553-
2554- mir_platform_message_release(request);
2555-
2556- return reply;
2557- }
2558-
2559- unsigned int const add_opcode =
2560- static_cast<unsigned int>(mtf::StubGraphicsPlatformOperation::add);
2561-};
2562-
2563-MATCHER_P(MessageDataAsIntsEq, v, "")
2564-{
2565- using namespace testing;
2566- auto msg_data = mir_platform_message_get_data(arg);
2567- if (msg_data.size % sizeof(int) != 0)
2568- throw std::runtime_error("Data is not an array of ints");
2569-
2570- std::vector<int> data(msg_data.size / sizeof(int));
2571- memcpy(data.data(), msg_data.data, msg_data.size);
2572-
2573- return v == data;
2574-}
2575-
2576-MATCHER(MessageDataIsEmpty, "")
2577-{
2578- auto const msg_data = mir_platform_message_get_data(arg);
2579- return msg_data.size == 0 && msg_data.data == nullptr;
2580-}
2581-
2582-MATCHER_P(MessageOpcodeEq, opcode, "")
2583-{
2584- auto const msg_opcode = mir_platform_message_get_opcode(arg);
2585- return msg_opcode == opcode;
2586-}
2587-
2588-MATCHER(MessageFdsIsEmpty, "")
2589-{
2590- auto const msg_fds = mir_platform_message_get_fds(arg);
2591- return msg_fds.num_fds == 0 && msg_fds.fds == nullptr;
2592-}
2593-
2594-}
2595-
2596-TEST_F(ClientPlatformOperation, exchanges_data_items_with_platform)
2597-{
2598- using namespace testing;
2599-
2600- int const num1 = 7;
2601- int const num2 = 11;
2602-
2603- auto const reply = platform_operation_add(num1, num2);
2604-
2605- EXPECT_THAT(reply, MessageDataAsIntsEq(std::vector<int>{num1 + num2}));
2606-
2607- mir_platform_message_release(reply);
2608-}
2609-
2610-TEST_F(ClientPlatformOperation, does_not_set_connection_error_message_on_success)
2611-{
2612- using namespace testing;
2613-
2614- auto const reply = platform_operation_add(7, 11);
2615-
2616- EXPECT_THAT(mir_connection_get_error_message(connection), StrEq(""));
2617-
2618- mir_platform_message_release(reply);
2619-}
2620-
2621-TEST_F(ClientPlatformOperation, reply_has_opcode_of_request)
2622-{
2623- using namespace testing;
2624-
2625- auto const reply = platform_operation_add(7, 11);
2626-
2627- EXPECT_THAT(reply, MessageOpcodeEq(add_opcode));
2628-
2629- mir_platform_message_release(reply);
2630-}
2631-
2632-TEST_F(ClientPlatformOperation, returns_empty_reply_on_error)
2633-{
2634- using namespace testing;
2635-
2636- auto const reply = incorrect_platform_operation_add();
2637-
2638- EXPECT_THAT(reply, MessageDataIsEmpty());
2639- EXPECT_THAT(reply, MessageFdsIsEmpty());
2640-
2641- mir_platform_message_release(reply);
2642-}
2643-
2644-TEST_F(ClientPlatformOperation, sets_connection_error_message_on_error)
2645-{
2646- using namespace testing;
2647-
2648- auto const reply = incorrect_platform_operation_add();
2649-
2650- EXPECT_THAT(mir_connection_get_error_message(connection), StrNe(""));
2651-
2652- mir_platform_message_release(reply);
2653-}
2654-
2655-TEST_F(ClientPlatformOperation, exchanges_fd_items_with_platform)
2656-{
2657- using namespace testing;
2658-
2659- char const sent_char{'#'};
2660-
2661- mir::test::Pipe pipe;
2662- EXPECT_THAT(write(pipe.write_fd(), &sent_char, 1), Eq(1));
2663-
2664- auto const reply = platform_operation_echo_fd(pipe.read_fd());
2665- EXPECT_THAT(reply, MessageDataIsEmpty());
2666-
2667- auto const reply_fds = mir_platform_message_get_fds(reply);
2668- EXPECT_THAT(reply_fds.num_fds, Eq(1u));
2669-
2670- auto const reply_fd = reply_fds.fds[0];
2671- EXPECT_THAT(reply_fd, Ne(pipe.read_fd()));
2672-
2673- char reply_char{0};
2674- EXPECT_THAT(read(reply_fd, &reply_char, 1), Eq(1));
2675- EXPECT_THAT(reply_char, Eq(sent_char));
2676-
2677- close(reply_fd);
2678- mir_platform_message_release(reply);
2679-}
2680-#pragma GCC diagnostic pop
2681
2682=== modified file 'tests/acceptance-tests/test_client_surfaces.cpp'
2683--- tests/acceptance-tests/test_client_surfaces.cpp 2017-02-01 19:54:40 +0000
2684+++ tests/acceptance-tests/test_client_surfaces.cpp 2017-02-07 00:07:50 +0000
2685@@ -281,8 +281,6 @@
2686 mir_window_release_sync(window);
2687 }
2688
2689-#pragma GCC diagnostic push
2690-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2691 TEST_F(ClientSurfaces, input_methods_get_corret_parent_coordinates)
2692 {
2693 using namespace testing;
2694@@ -313,7 +311,7 @@
2695
2696 auto window = mtf::make_any_surface(connection);
2697
2698- auto parent_id = mir_window_request_persistent_id_sync(window);
2699+ auto parent_id = mir_window_request_window_id_sync(window);
2700
2701 auto im_connection = mir_connect_sync(new_connection().c_str(), "Mock IM connection");
2702 ASSERT_THAT(im_connection, IsValid());
2703@@ -324,7 +322,7 @@
2704
2705 mir_window_spec_attach_to_foreign_parent(spec, parent_id, &client_rect, edge_attachment);
2706
2707- mir_persistent_id_release(parent_id);
2708+ mir_window_id_release(parent_id);
2709
2710 auto im = mir_create_window_sync(spec);
2711 mir_window_spec_release(spec);
2712@@ -334,4 +332,3 @@
2713
2714 mir_connection_release(im_connection);
2715 }
2716-#pragma GCC diagnostic pop
2717
2718=== modified file 'tests/acceptance-tests/test_debug_api.cpp'
2719--- tests/acceptance-tests/test_debug_api.cpp 2017-01-18 02:29:37 +0000
2720+++ tests/acceptance-tests/test_debug_api.cpp 2017-02-07 00:07:50 +0000
2721@@ -149,88 +149,6 @@
2722 };
2723 }
2724
2725-TEST_F(DebugAPI, translates_surface_coordinates_to_screen_coordinates_deprecated)
2726-{
2727- start_server_with_debug(true);
2728-
2729- mir::geometry::Rectangle surface_location{{200, 100}, {800, 600}};
2730-
2731- set_surface_placement(surface_location);
2732-
2733- auto window = mtf::make_any_surface(connection);
2734- ASSERT_TRUE(mir_window_is_valid(window));
2735-
2736- int screen_x, screen_y, x, y;
2737- x = 35, y = 21;
2738-
2739-#pragma GCC diagnostic push
2740-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2741- ASSERT_TRUE(mir_debug_surface_coords_to_screen(window, x, y, &screen_x, &screen_y));
2742-#pragma GCC diagnostic pop
2743- EXPECT_EQ(x + surface_location.top_left.x.as_int(), screen_x);
2744- EXPECT_EQ(y + surface_location.top_left.y.as_int(), screen_y);
2745-
2746- mir_window_release_sync(window);
2747-
2748- surface_location.top_left = {100, 250};
2749-
2750- set_surface_placement(surface_location);
2751-
2752- window = mtf::make_any_surface(connection);
2753- ASSERT_TRUE(mir_window_is_valid(window));
2754-
2755-#pragma GCC diagnostic push
2756-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2757- ASSERT_TRUE(mir_debug_surface_coords_to_screen(window, x, y, &screen_x, &screen_y));
2758-#pragma GCC diagnostic pop
2759- EXPECT_EQ(x + surface_location.top_left.x.as_int(), screen_x);
2760- EXPECT_EQ(y + surface_location.top_left.y.as_int(), screen_y);
2761-
2762- mir_window_release_sync(window);
2763-}
2764-
2765-TEST_F(DebugAPI, is_unavailable_when_server_not_started_with_debug_deprecated)
2766-{
2767- start_server_with_debug(false);
2768-
2769- auto window = mtf::make_any_surface(connection);
2770- ASSERT_TRUE(mir_window_is_valid(window));
2771-
2772- int screen_x, screen_y;
2773-
2774-#pragma GCC diagnostic push
2775-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2776- EXPECT_FALSE(mir_debug_surface_coords_to_screen(window, 0, 0, &screen_x, &screen_y));
2777-#pragma GCC diagnostic pop
2778-
2779- mir_window_release_sync(window);
2780-}
2781-
2782-TEST_F(DebugAPI, is_overrideable_deprecated)
2783-{
2784- server.override_the_coordinate_translator([&]()
2785- ->std::shared_ptr<mir::scene::CoordinateTranslator>
2786- {
2787- return std::make_shared<SimpleCoordinateTranslator>();
2788- });
2789-
2790- start_server_with_debug(false);
2791-
2792- auto window = mtf::make_any_surface(connection);
2793- ASSERT_TRUE(mir_window_is_valid(window));
2794-
2795- int screen_x, screen_y;
2796-
2797-#pragma GCC diagnostic push
2798-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2799- EXPECT_TRUE(mir_debug_surface_coords_to_screen(window, 0, 0, &screen_x, &screen_y));
2800-#pragma GCC diagnostic pop
2801- EXPECT_EQ(testpoint.x.as_int(), screen_x);
2802- EXPECT_EQ(testpoint.y.as_int(), screen_y);
2803-
2804- mir_window_release_sync(window);
2805-}
2806-
2807 TEST_F(DebugAPI, translates_surface_coordinates_to_screen_coordinates)
2808 {
2809 start_server_with_debug(true);
2810
2811=== modified file 'tests/acceptance-tests/test_mirblob.cpp'
2812--- tests/acceptance-tests/test_mirblob.cpp 2017-01-18 13:59:18 +0000
2813+++ tests/acceptance-tests/test_mirblob.cpp 2017-02-07 00:07:50 +0000
2814@@ -30,36 +30,6 @@
2815 using MirBlobAPI = mir_test_framework::ConnectedClientWithASurface;
2816 using mir::test::DisplayConfigMatches;
2817
2818-#pragma GCC diagnostic push
2819-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2820-TEST_F(MirBlobAPI, can_serialize_display_configuration)
2821-{
2822- std::vector<uint8_t> buffer;
2823-
2824- auto const save_display_config = mir_connection_create_display_config(connection);
2825-
2826- {
2827- auto const save_blob = mir_blob_from_display_configuration(save_display_config);
2828-
2829- buffer.resize(mir_blob_size(save_blob));
2830- memcpy(buffer.data(), mir_blob_data(save_blob), buffer.size());
2831- mir_blob_release(save_blob);
2832- }
2833-
2834- MirDisplayConfiguration* restore_display_config;
2835- {
2836- auto const restore_blob = mir_blob_onto_buffer(buffer.data(), buffer.size());
2837- restore_display_config = mir_blob_to_display_configuration(restore_blob);
2838- mir_blob_release(restore_blob);
2839- }
2840-
2841- EXPECT_THAT(save_display_config, DisplayConfigMatches(restore_display_config));
2842-
2843- mir_display_config_destroy(restore_display_config);
2844- mir_display_config_destroy(save_display_config);
2845-}
2846-#pragma GCC diagnostic pop
2847-
2848 TEST_F(MirBlobAPI, can_serialize_display_config)
2849 {
2850 std::vector<uint8_t> buffer;
2851
2852=== modified file 'tests/acceptance-tests/test_persistent_surface_store.cpp'
2853--- tests/acceptance-tests/test_persistent_surface_store.cpp 2017-02-01 19:54:40 +0000
2854+++ tests/acceptance-tests/test_persistent_surface_store.cpp 2017-02-07 00:07:50 +0000
2855@@ -68,9 +68,7 @@
2856 };
2857 }
2858
2859-#pragma GCC diagnostic push
2860-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2861-TEST_F(TestPersistentSurfaceStore, server_and_client_persistent_id_matches)
2862+TEST_F(TestPersistentSurfaceStore, server_and_client_window_id_matches)
2863 {
2864 auto const shell_server_surface = latest_shell_surface();
2865 ASSERT_THAT(shell_server_surface, NotNull());
2866@@ -78,10 +76,9 @@
2867 MirPersistentId* client_surface_id = mir_window_request_persistent_id_sync(window);
2868 msh::PersistentSurfaceStore::Id server_surface_id = server.the_persistent_surface_store()->id_for_surface(shell_server_surface);
2869
2870- std::string client_surface_id_string(mir_persistent_id_as_string(client_surface_id));
2871+ std::string client_surface_id_string(mir_window_id_as_string(client_surface_id));
2872
2873 ASSERT_THAT(server_surface_id.serialize_to_string(), Eq(client_surface_id_string));
2874
2875- mir_persistent_id_release(client_surface_id);
2876+ mir_window_id_release(client_surface_id);
2877 }
2878-#pragma GCC diagnostic pop

Subscribers

People subscribed via source and target branches