Mir

Merge lp:~alan-griffiths/mir/optional-deprecations into lp:~mir-team/mir/0.26-old

Proposed by Alan Griffiths
Status: Merged
Approved by: Alan Griffiths
Approved revision: no longer in the source branch.
Merged at revision: 4055
Proposed branch: lp:~alan-griffiths/mir/optional-deprecations
Merge into: lp:~mir-team/mir/0.26-old
Diff against target: 1397 lines (+217/-154)
22 files modified
debian/changelog (+2/-0)
include/client/mir_toolkit/client_types.h (+23/-22)
include/client/mir_toolkit/debug/surface.h (+4/-3)
include/client/mir_toolkit/events/event.h (+11/-10)
include/client/mir_toolkit/events/input_configuration_event.h (+8/-4)
include/client/mir_toolkit/events/surface_event.h (+3/-2)
include/client/mir_toolkit/events/surface_output_event.h (+6/-5)
include/client/mir_toolkit/events/surface_placement.h (+2/-1)
include/client/mir_toolkit/mir_blob.h (+3/-2)
include/client/mir_toolkit/mir_buffer_stream.h (+3/-1)
include/client/mir_toolkit/mir_connection.h (+9/-8)
include/client/mir_toolkit/mir_cursor_configuration.h (+2/-1)
include/client/mir_toolkit/mir_display_configuration.h (+3/-2)
include/client/mir_toolkit/mir_persistent_id.h (+5/-4)
include/client/mir_toolkit/mir_platform_message.h (+8/-7)
include/client/mir_toolkit/mir_screencast.h (+2/-1)
include/client/mir_toolkit/mir_surface.h (+61/-60)
include/client/mir_toolkit/mir_wait.h (+3/-2)
include/client/mir_toolkit/mir_window.h (+4/-3)
include/client/mir_toolkit/rs/mir_render_surface.h (+11/-10)
include/core/mir_toolkit/common.h (+8/-6)
include/core/mir_toolkit/deprecations.h (+36/-0)
To merge this branch: bzr merge lp:~alan-griffiths/mir/optional-deprecations
Reviewer Review Type Date Requested Status
Brandon Schaefer (community) Approve
Alberto Aguirre (community) Approve
Review via email: mp+323039@code.launchpad.net

Commit message

Make deprecations optional and default to off for builds on 16.04LTS

Description of the change

We want to push 0.26 to 16.04LTS

libmirserver dependencies will break, but we don't need them. We can just replace the packages.

libmirclient dependencies don't have an ABI break, but we have deprecated APIs they may use.

The intent of this MP is to avoid these deprecations when building for 16.04LTS

To post a comment you must log in.
Revision history for this message
Alberto Aguirre (albaguirre) wrote :

The pragmatic approach, yeah.

So will this be a 0.26.4 ? We had a 0.26.3 version ready in lp:mir/0.26 that was not released at all.

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

> The pragmatic approach, yeah.
>
> So will this be a 0.26.4 ? We had a 0.26.3 version ready in lp:mir/0.26 that
> was not released at all.

Oh right. I see no harm including that.

Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

Sweet, this lgtm

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

I've tried installing this onto a 16.04 laptop and building a few of the downstream packages from source it doesn't appear to break anything at runtime.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2017-03-30 06:38:36 +0000
3+++ debian/changelog 2017-04-25 09:32:38 +0000
4@@ -1,6 +1,8 @@
5 mir (0.26.3-0ubuntu1) UNRELEASED; urgency=medium
6
7 * New upstream release 0.26.3 (https://launchpad.net/mir/+milestone/0.26.3)
8+ - Enhancements:
9+ . Make deprecations optional (and default to off for builds on 16.04LTS)
10 - Bugs fixed:
11 . unity-system-compositor crashed with SIGSEGV in
12 libinput_device_config_accel_is_available() from
13
14=== modified file 'include/client/mir_toolkit/client_types.h'
15--- include/client/mir_toolkit/client_types.h 2017-03-16 16:47:21 +0000
16+++ include/client/mir_toolkit/client_types.h 2017-04-25 09:32:38 +0000
17@@ -23,6 +23,7 @@
18
19 #include <mir_toolkit/events/event.h>
20 #include <mir_toolkit/common.h>
21+#include <mir_toolkit/deprecations.h>
22
23 #include <stddef.h>
24
25@@ -38,15 +39,15 @@
26 typedef void* MirEGLNativeWindowType;
27 typedef void* MirEGLNativeDisplayType;
28 typedef struct MirConnection MirConnection;
29-typedef struct MirSurface MirSurface __attribute__((deprecated("Use MirWindow instead")));
30+typedef struct MirSurface MirSurface MIR_FOR_REMOVAL_IN_VERSION_1("Use MirWindow instead");
31 typedef struct MirSurface MirWindow;
32-typedef struct MirSurfaceSpec MirSurfaceSpec __attribute__((deprecated("Use MirWindowSpec instead")));
33+typedef struct MirSurfaceSpec MirSurfaceSpec MIR_FOR_REMOVAL_IN_VERSION_1("Use MirWindowSpec instead");
34 typedef struct MirSurfaceSpec MirWindowSpec;
35 typedef struct MirScreencast MirScreencast;
36 typedef struct MirScreencastSpec MirScreencastSpec;
37 typedef struct MirPromptSession MirPromptSession;
38 typedef struct MirBufferStream MirBufferStream;
39-typedef struct MirPersistentId MirPersistentId __attribute((deprecated("Use MirWindowId instead")));
40+typedef struct MirPersistentId MirPersistentId MIR_FOR_REMOVAL_IN_VERSION_1("Use MirWindowId instead");
41 typedef struct MirPersistentId MirWindowId;
42 typedef struct MirBlob MirBlob;
43 typedef struct MirDisplayConfig MirDisplayConfig;
44@@ -54,7 +55,7 @@
45 typedef struct MirPresentationChain MirPresentationChain;
46 typedef struct MirBuffer MirBuffer;
47 typedef struct MirRenderSurface MirRenderSurface
48-__attribute__((deprecated("This type is slated for rename due to MirRenderSurface-->MirSurface transition")));
49+MIR_FOR_REMOVAL_IN_VERSION_1("This type is slated for rename due to MirRenderSurface-->MirSurface transition");
50
51 /**
52 * Descriptor for an output connection.
53@@ -82,7 +83,7 @@
54 typedef void (*MirConnectedCallback)(
55 MirConnection *connection, void *client_context);
56 typedef MirConnectedCallback mir_connected_callback
57- __attribute__((deprecated("Use MirConnectedCallback instead")));
58+ MIR_FOR_REMOVAL_IN_VERSION_1("Use MirConnectedCallback instead");
59
60 /**
61 * Callback to be passed when calling window functions :
62@@ -102,7 +103,7 @@
63 typedef void (*MirBufferStreamCallback)(
64 MirBufferStream *stream, void *client_context);
65 typedef MirBufferStreamCallback mir_buffer_stream_callback
66- __attribute__((deprecated("Use MirBufferStreamCallback instead")));
67+ MIR_FOR_REMOVAL_IN_VERSION_1("Use MirBufferStreamCallback instead");
68
69 /**
70 * Callback for handling of window events.
71@@ -124,7 +125,7 @@
72 typedef void (*MirLifecycleEventCallback)(
73 MirConnection* connection, MirLifecycleState state, void* context);
74 typedef MirLifecycleEventCallback mir_lifecycle_event_callback
75- __attribute__((deprecated("Use MirLifecycleEventCallback instead")));
76+ MIR_FOR_REMOVAL_IN_VERSION_1("Use MirLifecycleEventCallback instead");
77
78 /**
79 * Callback called when the server pings for responsiveness testing.
80@@ -136,7 +137,7 @@
81 typedef void (*MirPingEventCallback)(
82 MirConnection* connection, int32_t serial, void* context);
83 typedef MirPingEventCallback mir_ping_event_callback
84- __attribute__((deprecated("Use MirPingEventCallback instead")));
85+ MIR_FOR_REMOVAL_IN_VERSION_1("Use MirPingEventCallback instead");
86
87 /**
88 * Callback called when a display config change has occurred
89@@ -147,7 +148,7 @@
90 typedef void (*MirDisplayConfigCallback)(
91 MirConnection* connection, void* context);
92 typedef MirDisplayConfigCallback mir_display_config_callback
93- __attribute__((deprecated("Use MirDisplayConfigCallback instead")));
94+ MIR_FOR_REMOVAL_IN_VERSION_1("Use MirDisplayConfigCallback instead");
95
96 /**
97 * Callback called when a request for client file descriptors completes
98@@ -162,7 +163,7 @@
99 typedef void (*MirClientFdCallback)(
100 MirPromptSession *prompt_session, size_t count, int const* fds, void* context);
101 typedef MirClientFdCallback mir_client_fd_callback
102- __attribute__((deprecated("Use MirClientFdCallback instead")));
103+ MIR_FOR_REMOVAL_IN_VERSION_1("Use MirClientFdCallback instead");
104
105 #pragma GCC diagnostic push
106 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
107@@ -201,7 +202,7 @@
108 * use the value mir_display_output_id_invalid.
109 */
110 uint32_t output_id;
111-} MirSurfaceParameters __attribute__((deprecated("Use MirWindowParameters instead")));
112+} MirSurfaceParameters MIR_FOR_REMOVAL_IN_VERSION_1("Use MirWindowParameters instead");
113
114 enum { mir_platform_package_max = 32 };
115
116@@ -214,7 +215,7 @@
117 * \todo This should be removed from the public API at the next API break.
118 */
119 #ifndef __cplusplus
120-__attribute__ ((deprecated))
121+MIR_FOR_REMOVAL_IN_VERSION_1("Use of this type is inherently non-portable")
122 #endif
123 typedef enum MirPlatformType
124 {
125@@ -429,7 +430,7 @@
126 typedef void (*MirScreencastCallback)(
127 MirScreencast *screencast, void *client_context);
128 typedef MirScreencastCallback mir_screencast_callback
129- __attribute__((deprecated("Use MirScreencastCallback instead")));
130+ MIR_FOR_REMOVAL_IN_VERSION_1("Use MirScreencastCallback instead");
131
132 /**
133 * Callback member of MirPromptSession for handling of prompt sessions.
134@@ -439,7 +440,7 @@
135 typedef void (*MirPromptSessionCallback)(
136 MirPromptSession* prompt_provider, void* context);
137 typedef MirPromptSessionCallback mir_prompt_session_callback
138- __attribute__((deprecated("Use MirPromptSessionCallback instead")));
139+ MIR_FOR_REMOVAL_IN_VERSION_1("Use MirPromptSessionCallback instead");
140
141 /**
142 * Callback member of MirPromptSession for handling of prompt sessions events.
143@@ -452,7 +453,7 @@
144 void* context);
145 typedef MirPromptSessionStateChangeCallback
146 mir_prompt_session_state_change_callback
147- __attribute__((deprecated("Use MirPromptSessionStateChangeCallback instead")));
148+ MIR_FOR_REMOVAL_IN_VERSION_1("Use MirPromptSessionStateChangeCallback instead");
149
150 /**
151 * Callback called when a platform operation completes.
152@@ -467,7 +468,7 @@
153 typedef void (*MirPlatformOperationCallback)(
154 MirConnection* connection, MirPlatformMessage* reply, void* context);
155 typedef MirPlatformOperationCallback mir_platform_operation_callback
156- __attribute__((deprecated("Use MirPlatformOperationCallback instead")));
157+ MIR_FOR_REMOVAL_IN_VERSION_1("Use MirPlatformOperationCallback instead");
158
159 /**
160 * Callback called when a change of input devices has occurred
161@@ -479,7 +480,7 @@
162 typedef void (*MirInputConfigCallback)(
163 MirConnection* connection, void* context);
164 typedef MirInputConfigCallback mir_input_config_callback
165- __attribute__((deprecated("Use MirInputConfigCallback instead")));
166+ MIR_FOR_REMOVAL_IN_VERSION_1("Use MirInputConfigCallback instead");
167
168 typedef void (*MirBufferCallback)(MirBuffer*, void* context);
169
170@@ -539,24 +540,24 @@
171 typedef void (*MirErrorCallback)(
172 MirConnection* connection, MirError const* error, void* context);
173 typedef MirErrorCallback mir_error_callback
174- __attribute__((deprecated("Use MirErrorCallback instead")));
175+ MIR_FOR_REMOVAL_IN_VERSION_1("Use MirErrorCallback instead");
176
177 #pragma GCC diagnostic push
178 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
179
180 typedef void (*mir_surface_callback)(MirSurface *surface, void *client_context)
181-__attribute__((deprecated("Use MirWindowCallback instead")));
182+MIR_FOR_REMOVAL_IN_VERSION_1("Use MirWindowCallback instead");
183
184 typedef void (*mir_surface_event_callback)(
185 MirSurface* surface, MirEvent const* event, void* context)
186-__attribute__((deprecated("Use MirWindowEventCallback instead")));
187+MIR_FOR_REMOVAL_IN_VERSION_1("Use MirWindowEventCallback instead");
188
189 typedef void (*mir_surface_id_callback)(
190 MirSurface* surface, MirPersistentId* id, void* context)
191-__attribute__((deprecated("Use MirWindowIdCallback instead")));
192+MIR_FOR_REMOVAL_IN_VERSION_1("Use MirWindowIdCallback instead");
193
194 typedef void (*MirRenderSurfaceCallback)(MirRenderSurface*, void* context)
195-__attribute__((deprecated("This type is slated for rename due to MirRenderSurface-->MirSurface transition")));
196+MIR_FOR_REMOVAL_IN_VERSION_1("This type is slated for rename due to MirRenderSurface-->MirSurface transition");
197
198 typedef MirSurfaceParameters MirWindowParameters;
199
200
201=== modified file 'include/client/mir_toolkit/debug/surface.h'
202--- include/client/mir_toolkit/debug/surface.h 2017-01-18 04:43:15 +0000
203+++ include/client/mir_toolkit/debug/surface.h 2017-04-25 09:32:38 +0000
204@@ -19,6 +19,7 @@
205 #define MIR_CLIENT_LIBRARY_DEBUG_H
206
207 #include <mir_toolkit/mir_client_library.h>
208+#include <mir_toolkit/deprecations.h>
209
210 /* This header defines debug interfaces that aren't expected to be generally useful
211 * and do not have the same API-stability guarantees that the main API has */
212@@ -65,13 +66,13 @@
213 bool mir_debug_surface_coords_to_screen(MirSurface *surface,
214 int x, int y,
215 int* screen_x, int* screen_y)
216-__attribute__((deprecated("Use mir_extension_window_coordinate_translation instead")));
217+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_extension_window_coordinate_translation instead");
218
219 int mir_debug_surface_id(MirSurface *surface)
220-__attribute__((deprecated("Use mir_debug_window_id() instead")));
221+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_debug_window_id() instead");
222
223 uint32_t mir_debug_surface_current_buffer_id(MirSurface *surface)
224-__attribute__((deprecated("Use mir_debug_window_current_buffer_id() instead")));
225+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_debug_window_current_buffer_id() instead");
226
227 #pragma GCC diagnostic pop
228
229
230=== modified file 'include/client/mir_toolkit/events/event.h'
231--- include/client/mir_toolkit/events/event.h 2017-01-25 08:12:00 +0000
232+++ include/client/mir_toolkit/events/event.h 2017-04-25 09:32:38 +0000
233@@ -22,6 +22,7 @@
234 #include <stddef.h>
235 #include <stdint.h>
236 #include "mir_toolkit/common.h"
237+#include <mir_toolkit/deprecations.h>
238
239 #ifdef __cplusplus
240 /**
241@@ -58,24 +59,24 @@
242 #pragma GCC diagnostic pop
243
244 typedef struct MirSurfaceEvent MirSurfaceEvent
245- __attribute__ ((deprecated("use MirWindowEvent instead")));
246+ MIR_FOR_REMOVAL_IN_VERSION_1("use MirWindowEvent instead");
247 typedef struct MirSurfaceEvent MirWindowEvent;
248 typedef struct MirResizeEvent MirResizeEvent;
249 typedef struct MirPromptSessionEvent MirPromptSessionEvent;
250 typedef struct MirOrientationEvent MirOrientationEvent;
251 typedef struct MirCloseSurfaceEvent MirCloseSurfaceEvent
252- __attribute__ ((deprecated("use MirCloseWindowEvent instead")));
253+ MIR_FOR_REMOVAL_IN_VERSION_1("use MirCloseWindowEvent instead");
254 typedef struct MirCloseSurfaceEvent MirCloseWindowEvent;
255 typedef struct MirInputEvent MirInputEvent;
256 typedef struct MirKeymapEvent MirKeymapEvent;
257 typedef struct MirInputConfigurationEvent MirInputConfigurationEvent
258- __attribute__ ((deprecated("Use MirInputDeviceStateEvent and the MirInputConfig callback instead")));
259+ MIR_FOR_REMOVAL_IN_VERSION_1("Use MirInputDeviceStateEvent and the MirInputConfig callback instead");
260 typedef struct MirSurfaceOutputEvent MirSurfaceOutputEvent
261- __attribute__ ((deprecated("use MirWindowOutputEvent instead")));
262+ MIR_FOR_REMOVAL_IN_VERSION_1("use MirWindowOutputEvent instead");
263 typedef struct MirSurfaceOutputEvent MirWindowOutputEvent;
264 typedef struct MirInputDeviceStateEvent MirInputDeviceStateEvent;
265 typedef struct MirSurfacePlacementEvent MirSurfacePlacementEvent
266- __attribute__ ((deprecated("use MirWindowPlacementEvent instead")));
267+ MIR_FOR_REMOVAL_IN_VERSION_1("use MirWindowPlacementEvent instead");
268 typedef struct MirSurfacePlacementEvent MirWindowPlacementEvent;
269
270 typedef struct MirCookie MirCookie;
271@@ -136,7 +137,7 @@
272 * \return The associated MirSurfaceEvent
273 */
274 MirSurfaceEvent const* mir_event_get_surface_event(MirEvent const* event)
275-__attribute__ ((deprecated("use mir_event_get_window_event instead")));
276+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_event_get_window_event instead");
277
278 /**
279 * Retrieve the MirWindowEvent associated with a MirEvent of
280@@ -195,7 +196,7 @@
281 * \return The associated MirCloseSurfaceEvent
282 */
283 /// @cond
284-__attribute__ ((deprecated))
285+MIR_FOR_REMOVAL_IN_VERSION_1("Use of this function is pointless as there is no way to use the return value")
286 /// @endcond
287 MirCloseSurfaceEvent const* mir_event_get_close_surface_event(MirEvent const* event);
288 #pragma GCC diagnostic pop
289@@ -223,7 +224,7 @@
290 * \return The associated MirInputConfigurationEvent
291 */
292 /// @cond
293-__attribute__((deprecated))
294+MIR_FOR_REMOVAL_IN_VERSION_1("Input devices and changes to the input devices are indicated via the MirInputConfigCallback")
295 /// @endcond
296 MirInputConfigurationEvent const* mir_event_get_input_configuration_event(MirEvent const* event);
297 #pragma GCC diagnostic pop
298@@ -242,7 +243,7 @@
299 * \return The associated MirSurfaceOutputEvent
300 */
301 MirSurfaceOutputEvent const* mir_event_get_surface_output_event(MirEvent const* event)
302-__attribute__((deprecated("use mir_event_get_window_output_event")));
303+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_event_get_window_output_event");
304
305 /**
306 * Retrieve the MirWindowOutputEvent associated with a MirEvent of type
307@@ -279,7 +280,7 @@
308 * \return The associated MirSurfacePlacementEvent
309 */
310 MirSurfacePlacementEvent const* mir_event_get_surface_placement_event(MirEvent const* event)
311-__attribute__((deprecated("use mir_event_get_window_placement_event")));
312+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_event_get_window_placement_event");
313
314 /**
315 * Retrieve the MirWindowPlacementEvent associated with a MirEvent of
316
317=== modified file 'include/client/mir_toolkit/events/input_configuration_event.h'
318--- include/client/mir_toolkit/events/input_configuration_event.h 2017-01-20 16:27:50 +0000
319+++ include/client/mir_toolkit/events/input_configuration_event.h 2017-04-25 09:32:38 +0000
320@@ -20,6 +20,7 @@
321 #define MIR_TOOLKIT_EVENTS_INPUT_CONFIGURATION_EVENT_H_
322
323 #include <mir_toolkit/events/event.h>
324+#include <mir_toolkit/deprecations.h>
325
326 #ifdef __cplusplus
327 /**
328@@ -45,7 +46,7 @@
329 mir_input_configuration_action_configuration_changed,
330 mir_input_configuration_action_device_reset
331 } MirInputConfigurationAction
332-__attribute__((deprecated));
333+MIR_FOR_REMOVAL_IN_VERSION_1("Input devices and changes to the input devices are indicated via the MirInputConfigCallback");
334
335 #pragma GCC diagnostic push
336 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
337@@ -55,7 +56,8 @@
338 * \param[in] ev The input configuration event
339 * \return The action
340 */
341-MirInputConfigurationAction mir_input_configuration_event_get_action(MirInputConfigurationEvent const* ev) __attribute__((deprecated));
342+MirInputConfigurationAction mir_input_configuration_event_get_action(MirInputConfigurationEvent const* ev)
343+MIR_FOR_REMOVAL_IN_VERSION_1("Input devices and changes to the input devices are indicated via the MirInputConfigCallback");
344
345 /**
346 * Retreive the time associated with a MirInputConfiguration event
347@@ -63,7 +65,8 @@
348 * \param[in] ev The input configuration event
349 * \return The time in nanoseconds since epoch
350 */
351-int64_t mir_input_configuration_event_get_time(MirInputConfigurationEvent const* ev) __attribute__((deprecated));
352+int64_t mir_input_configuration_event_get_time(MirInputConfigurationEvent const* ev)
353+MIR_FOR_REMOVAL_IN_VERSION_1("Input devices and changes to the input devices are indicated via the MirInputConfigCallback");
354
355 /**
356 * Retreive the device id associated with a MirInputConfiguration event
357@@ -71,7 +74,8 @@
358 * \param[in] ev The input configuration event
359 * \return The device id or -1 if not applicable to events of this action
360 */
361-MirInputDeviceId mir_input_configuration_event_get_device_id(MirInputConfigurationEvent const* ev) __attribute__((deprecated));
362+MirInputDeviceId mir_input_configuration_event_get_device_id(MirInputConfigurationEvent const* ev)
363+MIR_FOR_REMOVAL_IN_VERSION_1("Input devices and changes to the input devices are indicated via the MirInputConfigCallback");
364 #pragma GCC diagnostic pop
365
366 #ifdef __cplusplus
367
368=== modified file 'include/client/mir_toolkit/events/surface_event.h'
369--- include/client/mir_toolkit/events/surface_event.h 2017-01-23 03:38:33 +0000
370+++ include/client/mir_toolkit/events/surface_event.h 2017-04-25 09:32:38 +0000
371@@ -20,6 +20,7 @@
372 #define MIR_TOOLKIT_EVENTS_SURFACE_EVENT_H_
373
374 #include <mir_toolkit/events/event.h>
375+#include <mir_toolkit/deprecations.h>
376
377 #ifdef __cplusplus
378 /**
379@@ -39,7 +40,7 @@
380 * \return The associated attribute
381 */
382 MirSurfaceAttrib mir_surface_event_get_attribute(MirSurfaceEvent const* event)
383-__attribute__ ((deprecated("use mir_window_event_get_attribute instead")));
384+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_event_get_attribute instead");
385
386 /**
387 * Retrieve the new value of the associated attribute for a given MirSurfaceEvent
388@@ -48,7 +49,7 @@
389 * \return The associated attribute value
390 */
391 int mir_surface_event_get_attribute_value(MirSurfaceEvent const* event)
392-__attribute__ ((deprecated("use make_event with mir_window_event_get_attribute_value instead")));
393+MIR_FOR_REMOVAL_IN_VERSION_1("use make_event with mir_window_event_get_attribute_value instead");
394 #pragma GCC diagnostic pop
395
396 #ifdef __cplusplus
397
398=== modified file 'include/client/mir_toolkit/events/surface_output_event.h'
399--- include/client/mir_toolkit/events/surface_output_event.h 2017-01-23 03:38:33 +0000
400+++ include/client/mir_toolkit/events/surface_output_event.h 2017-04-25 09:32:38 +0000
401@@ -20,6 +20,7 @@
402 #define MIR_TOOLKIT_SURFACE_OUTPUT_EVENT_H_
403
404 #include <mir_toolkit/events/event.h>
405+#include <mir_toolkit/deprecations.h>
406
407 #ifdef __cplusplus
408 /**
409@@ -39,7 +40,7 @@
410 * \return The new DPI value for the surface is primarily on.
411 */
412 int mir_surface_output_event_get_dpi(MirSurfaceOutputEvent const* ev)
413-__attribute__ ((deprecated("use mir_window_output_event_get_dpi instead")));
414+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_output_event_get_dpi instead");
415
416 /**
417 * Retrieve the form factor of the new output configuration of a MirSurfaceOutputEvent
418@@ -48,7 +49,7 @@
419 * \return The new form factor of the output the surface is primarily on.
420 */
421 MirFormFactor mir_surface_output_event_get_form_factor(MirSurfaceOutputEvent const* ev)
422-__attribute__ ((deprecated("use mir_window_output_event_get_form_factor instead")));
423+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_output_event_get_form_factor instead");
424
425 /**
426 * Retrieve the suggested scaling factor of the new output configuration of a
427@@ -58,7 +59,7 @@
428 * \return The new scaling factor of the output the surface is primarily on.
429 */
430 float mir_surface_output_event_get_scale(MirSurfaceOutputEvent const* ev)
431-__attribute__ ((deprecated("use mir_window_output_event_get_scale instead")));
432+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_output_event_get_scale instead");
433
434 /**
435 * Retrieve the maximum refresh rate of the output(s) associated with a
436@@ -70,7 +71,7 @@
437 * \return The refresh rate in Hz
438 */
439 double mir_surface_output_event_get_refresh_rate(MirSurfaceOutputEvent const* ev)
440-__attribute__ ((deprecated("use mir_window_output_event_get_refresh_rate instead")));
441+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_output_event_get_refresh_rate instead");
442
443 /**
444 * Retrieve the ID of the output this surface is on from a MirSurfaceOutputEvent
445@@ -80,7 +81,7 @@
446 * (From MirDisplayOutput::output_id)
447 */
448 uint32_t mir_surface_output_event_get_output_id(MirSurfaceOutputEvent const *ev)
449-__attribute__ ((deprecated("use mir_window_output_event_get_output_id instead")));
450+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_output_event_get_output_id instead");
451
452 #pragma GCC diagnostic pop
453
454
455=== modified file 'include/client/mir_toolkit/events/surface_placement.h'
456--- include/client/mir_toolkit/events/surface_placement.h 2017-01-19 05:30:03 +0000
457+++ include/client/mir_toolkit/events/surface_placement.h 2017-04-25 09:32:38 +0000
458@@ -20,6 +20,7 @@
459 #define MIR_TOOLKIT_SURFACE_PLACEMENT_H_
460
461 #include <mir_toolkit/client_types.h>
462+#include <mir_toolkit/deprecations.h>
463
464 #ifdef __cplusplus
465 /**
466@@ -38,7 +39,7 @@
467 * \return The position relative to the parent surface
468 */
469 MirRectangle mir_surface_placement_get_relative_position(MirSurfacePlacementEvent const* event)
470-__attribute__ ((deprecated("use mir_window_placement_get_relative_position instead")));
471+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_placement_get_relative_position instead");
472
473 #ifdef __cplusplus
474 }
475
476=== modified file 'include/client/mir_toolkit/mir_blob.h'
477--- include/client/mir_toolkit/mir_blob.h 2017-01-19 05:30:03 +0000
478+++ include/client/mir_toolkit/mir_blob.h 2017-04-25 09:32:38 +0000
479@@ -19,6 +19,7 @@
480 #define MIR_TOOLKIT_MIR_BLOB_H_
481
482 #include <mir_toolkit/client_types.h>
483+#include <mir_toolkit/deprecations.h>
484
485 #ifdef __cplusplus
486 /**
487@@ -35,7 +36,7 @@
488 * \return A blob
489 */
490 MirBlob* mir_blob_from_display_configuration(MirDisplayConfiguration* configuration)
491-__attribute__ ((deprecated("use mir_blob_from_display_config instead")));
492+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_blob_from_display_config instead");
493
494 /**
495 * Create a blob from a display config
496@@ -65,7 +66,7 @@
497 * \return A display configuration
498 */
499 MirDisplayConfiguration* mir_blob_to_display_configuration(MirBlob* blob)
500-__attribute__ ((deprecated("use mir_blob_to_display_config instead")));
501+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_blob_to_display_config instead");
502
503 /**
504 * Create a blob from a display config
505
506=== modified file 'include/client/mir_toolkit/mir_buffer_stream.h'
507--- include/client/mir_toolkit/mir_buffer_stream.h 2017-01-24 07:49:13 +0000
508+++ include/client/mir_toolkit/mir_buffer_stream.h 2017-04-25 09:32:38 +0000
509@@ -20,6 +20,7 @@
510
511 #include <mir_toolkit/mir_native_buffer.h>
512 #include <mir_toolkit/client_types.h>
513+#include <mir_toolkit/deprecations.h>
514
515 #ifdef __cplusplus
516 /**
517@@ -141,7 +142,8 @@
518 * mir_platform_type_gbm
519 */
520 /// @cond
521-__attribute__ ((deprecated))
522+MIR_FOR_REMOVAL_IN_VERSION_1("To identify the graphics platform use mir_connection_get_graphics_module(). \n"
523+ "To safely interpret the buffer contents use mir_buffer_stream_get_graphics_region()")
524 /// @endcond
525 MirPlatformType mir_buffer_stream_get_platform_type(MirBufferStream *stream);
526
527
528=== modified file 'include/client/mir_toolkit/mir_connection.h'
529--- include/client/mir_toolkit/mir_connection.h 2017-01-24 19:53:45 +0000
530+++ include/client/mir_toolkit/mir_connection.h 2017-04-25 09:32:38 +0000
531@@ -20,6 +20,7 @@
532
533 #include <mir_toolkit/client_types.h>
534 #include <mir_toolkit/common.h>
535+#include <mir_toolkit/deprecations.h>
536
537 #include <stdbool.h>
538
539@@ -93,7 +94,7 @@
540 * \param [out] platform_package Structure to be populated
541 */
542 void mir_connection_get_platform(MirConnection *connection, MirPlatformPackage *platform_package)
543-__attribute__((deprecated("use platform extensions instead")));
544+MIR_FOR_REMOVAL_IN_VERSION_1("use platform extensions instead");
545
546 /**
547 * Query graphics platform module.
548@@ -105,7 +106,7 @@
549 * \param [out] properties Structure to be populated
550 */
551 void mir_connection_get_graphics_module(MirConnection *connection, MirModuleProperties *properties)
552-__attribute__((deprecated("use graphics module extension instead")));
553+MIR_FOR_REMOVAL_IN_VERSION_1("use graphics module extension instead");
554
555 /**
556 * Register a callback to be called when a Lifecycle state change occurs.
557@@ -156,7 +157,7 @@
558 * \return structure that describes the display configuration
559 */
560 MirDisplayConfiguration* mir_connection_create_display_config(MirConnection *connection)
561-__attribute__ ((deprecated("use mir_connection_create_display_configuration instead")));
562+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_connection_create_display_configuration instead");
563
564 /**
565 * Query the display
566@@ -188,7 +189,7 @@
567 * \param [in] display_configuration The display_configuration information resource to be destroyed
568 */
569 void mir_display_config_destroy(MirDisplayConfiguration* display_configuration)
570-__attribute__ ((deprecated("use mir_display_config_release instead")));
571+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_display_config_release instead");
572
573 /**
574 * Apply the display configuration
575@@ -204,7 +205,7 @@
576 * \return A handle that can be passed to mir_wait_for
577 */
578 MirWaitHandle* mir_connection_apply_display_config(MirConnection *connection, MirDisplayConfiguration* display_configuration)
579-__attribute__ ((deprecated("use mir_connection_apply_session_display_config instead")));
580+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_connection_apply_session_display_config instead");
581
582 /**
583 * Apply the display config for the connection
584@@ -254,7 +255,7 @@
585 MirWaitHandle* mir_connection_set_base_display_config(
586 MirConnection* connection,
587 MirDisplayConfiguration const* display_configuration)
588-__attribute__ ((deprecated("use mir_connection_preview_base_display_configuration/mir_connection_confirm_base_display_configuration")));
589+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_connection_preview_base_display_configuration/mir_connection_confirm_base_display_configuration");
590
591
592 /**
593@@ -379,7 +380,7 @@
594 MirConnection* connection,
595 MirPlatformMessage const* request,
596 MirPlatformOperationCallback callback, void* context)
597-__attribute__ ((deprecated("use platform specific extensions instead")));
598+MIR_FOR_REMOVAL_IN_VERSION_1("use platform specific extensions instead");
599
600 /**
601 * Create a snapshot of the attached input devices and device configurations.
602@@ -399,7 +400,7 @@
603 * \param [in] config The input configuration
604 */
605 void mir_input_config_destroy(MirInputConfig const* config)
606-__attribute__ ((deprecated("use mir_input_config_release instead")));
607+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_input_config_release instead");
608
609 /**
610 * Release this snapshot of the input configuration.
611
612=== modified file 'include/client/mir_toolkit/mir_cursor_configuration.h'
613--- include/client/mir_toolkit/mir_cursor_configuration.h 2017-01-18 02:29:37 +0000
614+++ include/client/mir_toolkit/mir_cursor_configuration.h 2017-04-25 09:32:38 +0000
615@@ -20,6 +20,7 @@
616
617 #include <mir_toolkit/common.h>
618 #include <mir_toolkit/client_types.h>
619+#include <mir_toolkit/deprecations.h>
620
621 /**
622 * Opaque structure containing cursor parameterization. Create with mir_cursor* family.
623@@ -53,7 +54,7 @@
624 * to_mir_cursor_configuration_destroy
625 */
626 /// @cond
627-__attribute__ ((deprecated))
628+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_cursor_name()")
629 /// @endcond
630 MirCursorConfiguration *mir_cursor_configuration_from_name(char const* name);
631
632
633=== modified file 'include/client/mir_toolkit/mir_display_configuration.h'
634--- include/client/mir_toolkit/mir_display_configuration.h 2017-02-20 05:36:21 +0000
635+++ include/client/mir_toolkit/mir_display_configuration.h 2017-04-25 09:32:38 +0000
636@@ -20,6 +20,7 @@
637 #define MIR_TOOLKIT_MIR_DISPLAY_CONFIGURATION_H_
638
639 #include "client_types.h"
640+#include <mir_toolkit/deprecations.h>
641
642 #ifdef __cplusplus
643 extern "C" {
644@@ -60,7 +61,7 @@
645 */
646 int mir_display_config_get_max_simultaneous_outputs(
647 MirDisplayConfig const* config)
648- __attribute__((deprecated("Not accurate in Mir 0.26 and later. May be removed in future.")));
649+ MIR_FOR_REMOVAL_IN_VERSION_1("Not accurate in Mir 0.26 and later. May be removed in future.");
650
651 /**
652 * Get the number of outputs available in this display configuration.
653@@ -268,7 +269,7 @@
654 * \returns The name of the output type.
655 */
656 char const* mir_display_output_type_name(MirDisplayOutputType type)
657-__attribute__((deprecated("use mir_output_type_name instead")));
658+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_output_type_name instead");
659
660 /**
661 * Get the textual name of an output type.
662
663=== modified file 'include/client/mir_toolkit/mir_persistent_id.h'
664--- include/client/mir_toolkit/mir_persistent_id.h 2017-02-02 19:52:04 +0000
665+++ include/client/mir_toolkit/mir_persistent_id.h 2017-04-25 09:32:38 +0000
666@@ -19,6 +19,7 @@
667 #define MIR_TOOLKIT_MIR_PERSISTENT_ID_H_
668
669 #include <mir_toolkit/client_types.h>
670+#include <mir_toolkit/deprecations.h>
671
672 #include <stdbool.h>
673
674@@ -39,7 +40,7 @@
675 * \note This does not guarantee that the ID refers to a currently valid object.
676 */
677 bool mir_persistent_id_is_valid(MirPersistentId* id)
678-__attribute__((deprecated("Use mir_window_id_is_valid() instead")));
679+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_id_is_valid() instead");
680
681 /**
682 * \brief Free a MirPersistentId
683@@ -48,7 +49,7 @@
684 * object referred to by \arg id.
685 */
686 void mir_persistent_id_release(MirPersistentId* id)
687-__attribute__((deprecated("Use mir_window_id_release() instead")));
688+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_id_release() instead");
689
690 /**
691 * \brief Get a string representation of a MirSurfaceId
692@@ -59,7 +60,7 @@
693 * \see mir_surface_id_from_string
694 */
695 char const* mir_persistent_id_as_string(MirPersistentId* id)
696-__attribute__((deprecated("Use mir_window_id_as_string() instead")));
697+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_id_as_string() instead");
698
699 /**
700 * \brief Deserialise a string representation of a MirSurfaceId
701@@ -67,7 +68,7 @@
702 * \return The deserialised MirSurfaceId
703 */
704 MirPersistentId* mir_persistent_id_from_string(char const* string_representation)
705-__attribute__((deprecated("Use mir_window_id_from_string() instead")));
706+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_id_from_string() instead");
707
708 #pragma GCC diagnostic pop
709
710
711=== modified file 'include/client/mir_toolkit/mir_platform_message.h'
712--- include/client/mir_toolkit/mir_platform_message.h 2017-01-18 02:29:37 +0000
713+++ include/client/mir_toolkit/mir_platform_message.h 2017-04-25 09:32:38 +0000
714@@ -19,6 +19,7 @@
715 #define MIR_TOOLKIT_MIR_PLATFORM_MESSAGE_H_
716
717 #include <sys/types.h>
718+#include <mir_toolkit/deprecations.h>
719
720 #ifdef __cplusplus
721 /**
722@@ -51,7 +52,7 @@
723 * \param [in] opcode The platform message opcode
724 * \return The created MirPlatformMessage
725 */
726-__attribute__((deprecated("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")))
727+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")
728 MirPlatformMessage* mir_platform_message_create(unsigned int opcode);
729
730 /**
731@@ -59,7 +60,7 @@
732 *
733 * \param [in] message The MirPlatformMessage
734 */
735-__attribute__((deprecated("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")))
736+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")
737 void mir_platform_message_release(MirPlatformMessage const* message);
738
739 /**
740@@ -71,7 +72,7 @@
741 * \param [in] data Pointer to the data
742 * \param [in] data_size The size of the data in bytes
743 */
744-__attribute__((deprecated("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")))
745+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")
746 void mir_platform_message_set_data(MirPlatformMessage* message, void const* data, size_t data_size);
747
748 /**
749@@ -89,7 +90,7 @@
750 * \param [in] fds Pointer to the array of fds
751 * \param [in] num_fds The number of fds
752 */
753-__attribute__((deprecated("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")))
754+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")
755 void mir_platform_message_set_fds(MirPlatformMessage* message, int const* fds, size_t num_fds);
756
757 /**
758@@ -98,7 +99,7 @@
759 * \param [in] message The MirPlatformMessage
760 * \return The opcode
761 */
762-__attribute__((deprecated("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")))
763+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")
764 unsigned int mir_platform_message_get_opcode(MirPlatformMessage const* message);
765
766 /**
767@@ -111,7 +112,7 @@
768 * \param [in] message The MirPlatformMessage
769 * \return The data
770 */
771-__attribute__((deprecated("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")))
772+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")
773 MirPlatformMessageData mir_platform_message_get_data(MirPlatformMessage const* message);
774
775 /**
776@@ -128,7 +129,7 @@
777 * \param [in] message The MirPlatformMessage
778 * \return The fds
779 */
780-__attribute__((deprecated("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")))
781+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")
782 MirPlatformMessageFds mir_platform_message_get_fds(MirPlatformMessage const* message);
783
784 #ifdef __cplusplus
785
786=== modified file 'include/client/mir_toolkit/mir_screencast.h'
787--- include/client/mir_toolkit/mir_screencast.h 2017-01-19 05:30:03 +0000
788+++ include/client/mir_toolkit/mir_screencast.h 2017-04-25 09:32:38 +0000
789@@ -18,6 +18,7 @@
790 #define MIR_TOOLKIT_MIR_SCREENCAST_H_
791
792 #include <mir_toolkit/client_types.h>
793+#include <mir_toolkit/deprecations.h>
794
795 #ifdef __cplusplus
796 /**
797@@ -143,7 +144,7 @@
798 MirScreencast* mir_connection_create_screencast_sync(
799 MirConnection* connection,
800 MirScreencastParameters* parameters)
801-__attribute__ ((deprecated("use mir_screencast_create_sync instead")));
802+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_screencast_create_sync instead");
803
804 /**
805 * Release the specified screencast.
806
807=== modified file 'include/client/mir_toolkit/mir_surface.h'
808--- include/client/mir_toolkit/mir_surface.h 2017-01-24 11:06:35 +0000
809+++ include/client/mir_toolkit/mir_surface.h 2017-04-25 09:32:38 +0000
810@@ -22,6 +22,7 @@
811 #include <mir_toolkit/client_types.h>
812 #include <mir_toolkit/common.h>
813 #include <mir_toolkit/mir_cursor_configuration.h>
814+#include <mir_toolkit/deprecations.h>
815
816 #include <stdbool.h>
817
818@@ -40,7 +41,7 @@
819 MirSurfaceSpec* mir_connection_create_spec_for_normal_surface(MirConnection* connection,
820 int width, int height,
821 MirPixelFormat format)
822-__attribute__((deprecated("Use mir_create_normal_window_spec() instead")));
823+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_create_normal_window_spec() instead");
824
825 MirSurfaceSpec*
826 mir_connection_create_spec_for_menu(MirConnection* connection,
827@@ -50,7 +51,7 @@
828 MirSurface* parent,
829 MirRectangle* rect,
830 MirEdgeAttachment edge)
831-__attribute__((deprecated("Use mir_specify_menu() instead")));
832+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_specify_menu() instead");
833
834 MirSurfaceSpec*
835 mir_connection_create_spec_for_tooltip(MirConnection* connection,
836@@ -58,7 +59,7 @@
837 MirPixelFormat format,
838 MirSurface* parent,
839 MirRectangle* zone)
840-__attribute__((deprecated("Use mir_create_tip_window_spec() instead")));
841+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_create_tip_window_spec() instead");
842
843 MirSurfaceSpec*
844 mir_connection_create_spec_for_tip(MirConnection* connection,
845@@ -67,30 +68,30 @@
846 MirSurface* parent,
847 MirRectangle* rect,
848 MirEdgeAttachment edge)
849-__attribute__((deprecated("Use mir_create_tip_window_spec() instead")));
850+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_create_tip_window_spec() instead");
851
852 MirSurfaceSpec*
853 mir_connection_create_spec_for_modal_dialog(MirConnection* connection,
854 int width, int height,
855 MirPixelFormat format,
856 MirSurface* parent)
857-__attribute__((deprecated("Use mir_create_modal_dialog_window_spec() instead")));
858+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_create_modal_dialog_window_spec() instead");
859
860 MirSurfaceSpec*
861 mir_connection_create_spec_for_dialog(MirConnection* connection,
862 int width, int height,
863 MirPixelFormat format)
864-__attribute__((deprecated("Use mir_create_dialog_window_spec() instead")));
865+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_create_dialog_window_spec() instead");
866
867 MirSurfaceSpec* mir_create_surface_spec(MirConnection* connection)
868-__attribute__((deprecated("Use mir_create_window_spec() instead")));
869+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_create_window_spec() instead");
870
871 MirSurfaceSpec*
872 mir_connection_create_spec_for_changes(MirConnection* connection)
873-__attribute__((deprecated("Use mir_create_window_spec() instead")));
874+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_create_window_spec() instead");
875
876 void mir_surface_spec_set_parent(MirSurfaceSpec* spec, MirSurface* parent)
877-__attribute__((deprecated("Use mir_window_spec_set_parent() instead")));
878+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_spec_set_parent() instead");
879
880 /**
881 *\deprecated This will soon be a property of the backing content.
882@@ -103,77 +104,77 @@
883 * was removed by use of mir_window_spec_set_streams().
884 */
885 int mir_surface_get_swapinterval(MirSurface* surface)
886-__attribute__((deprecated("This will soon be a property of the backing content")));
887+MIR_FOR_REMOVAL_IN_VERSION_1("This will soon be a property of the backing content");
888
889 void mir_surface_spec_set_type(MirSurfaceSpec* spec, MirSurfaceType type)
890-__attribute__((deprecated("use mir_window_spec_set_type() instead")));
891+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_type() instead");
892
893 void mir_surface_spec_set_name(MirSurfaceSpec* spec, char const* name)
894-__attribute__((deprecated("use mir_window_spec_set_name() instead")));
895+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_name() instead");
896
897 void mir_surface_spec_set_width(MirSurfaceSpec* spec, unsigned width)
898-__attribute__((deprecated("use mir_window_spec_set_width() instead")));
899+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_width() instead");
900
901 void mir_surface_spec_set_height(MirSurfaceSpec* spec, unsigned height)
902-__attribute__((deprecated("use mir_window_spec_set_height() instead")));
903+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_height() instead");
904
905 void mir_surface_spec_set_width_increment(MirSurfaceSpec* spec, unsigned width_inc)
906-__attribute__((deprecated("use mir_window_spec_set_width_increment() instead")));
907+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_width_increment() instead");
908
909 void mir_surface_spec_set_height_increment(MirSurfaceSpec* spec, unsigned height_inc)
910-__attribute__((deprecated("use mir_window_spec_set_height_increment() instead")));
911+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_height_increment() instead");
912
913 void mir_surface_spec_set_min_width(MirSurfaceSpec* spec, unsigned min_width)
914-__attribute__((deprecated("use mir_window_spec_set_min_width() instead")));
915+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_min_width() instead");
916
917 void mir_surface_spec_set_min_height(MirSurfaceSpec* spec, unsigned min_height)
918-__attribute__((deprecated("use mir_window_spec_set_min_height() instead")));
919+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_min_height() instead");
920
921 void mir_surface_spec_set_max_width(MirSurfaceSpec* spec, unsigned max_width)
922-__attribute__((deprecated("use mir_window_spec_set_max_width() instead")));
923+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_max_width() instead");
924
925 void mir_surface_spec_set_max_height(MirSurfaceSpec* spec, unsigned max_height)
926-__attribute__((deprecated("use mir_window_spec_set_max_height() instead")));
927+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_max_height() instead");
928
929 void mir_surface_spec_set_min_aspect_ratio(MirSurfaceSpec* spec, unsigned width, unsigned height)
930-__attribute__((deprecated("use mir_window_spec_set_min_aspect_ratio() instead")));
931+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_min_aspect_ratio() instead");
932
933 void mir_surface_spec_set_max_aspect_ratio(MirSurfaceSpec* spec, unsigned width, unsigned height)
934-__attribute__((deprecated("use mir_window_spec_set_max_aspect_ratio() instead")));
935+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_max_aspect_ratio() instead");
936
937 void mir_surface_spec_set_fullscreen_on_output(MirSurfaceSpec* spec, uint32_t output_id)
938-__attribute__((deprecated("use mir_window_spec_set_fullscreen_on_output() instead")));
939+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_fullscreen_on_output() instead");
940
941 void mir_surface_spec_set_preferred_orientation(MirSurfaceSpec* spec, MirOrientationMode mode)
942-__attribute__((deprecated("use mir_window_spec_set_preferred_orientation() instead")));
943+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_preferred_orientation() instead");
944
945 bool mir_surface_spec_attach_to_foreign_parent(MirSurfaceSpec* spec,
946 MirPersistentId* parent,
947 MirRectangle* attachment_rect,
948 MirEdgeAttachment edge)
949-__attribute__((deprecated("use mir_window_spec_attach_to_foreign_parent() instead")));
950+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_attach_to_foreign_parent() instead");
951
952 void mir_surface_spec_set_state(MirSurfaceSpec* spec, MirSurfaceState state)
953-__attribute__((deprecated("use mir_window_spec_set_state() instead")));
954+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_state() instead");
955
956 void mir_surface_spec_release(MirSurfaceSpec* spec)
957-__attribute__((deprecated("use mir_window_spec_release() instead")));
958+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_release() instead");
959
960 void mir_surface_spec_set_input_shape(MirSurfaceSpec* spec,
961 MirRectangle const *rectangles,
962 size_t n_rects)
963-__attribute__((deprecated("use mir_window_spec_set_input_shape() instead")));
964+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_input_shape() instead");
965
966 void mir_surface_spec_set_event_handler(MirSurfaceSpec* spec,
967 mir_surface_event_callback callback,
968 void* context)
969-__attribute__((deprecated("use mir_window_spec_set_event_handler() instead")));
970+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_event_handler() instead");
971
972 void mir_surface_spec_set_shell_chrome(MirSurfaceSpec* spec, MirShellChrome style)
973-__attribute__((deprecated("use mir_window_spec_set_shell_chrome() instead")));
974+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_shell_chrome() instead");
975
976 void mir_surface_spec_set_pointer_confinement(MirSurfaceSpec* spec, MirPointerConfinementState state)
977-__attribute__((deprecated("use mir_window_spec_set_pointer_confinement() instead")));
978+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_pointer_confinement() instead");
979
980 void mir_surface_spec_set_placement(MirSurfaceSpec* spec,
981 const MirRectangle* rect,
982@@ -182,69 +183,69 @@
983 MirPlacementHints placement_hints,
984 int offset_dx,
985 int offset_dy)
986-__attribute__((deprecated("use mir_window_spec_set_placement() instead")));
987+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_placement() instead");
988
989 MirSurfaceSpec* mir_connection_create_spec_for_input_method(MirConnection* connection,
990 int width, int height,
991 MirPixelFormat format)
992-__attribute__((deprecated("use mir_create_input_method_window_spec() instead")));
993+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_create_input_method_window_spec() instead");
994
995 void mir_surface_spec_set_pixel_format(MirSurfaceSpec* spec, MirPixelFormat format)
996-__attribute__((deprecated("use mir_window_spec_set_pixel_format() instead")));
997+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_pixel_format() instead");
998
999 void mir_surface_spec_set_buffer_usage(MirSurfaceSpec* spec, MirBufferUsage usage)
1000-__attribute__((deprecated("use mir_window_spec_set_buffer_usage() instead")));
1001+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_buffer_usage() instead");
1002
1003 void mir_surface_spec_set_streams(MirSurfaceSpec* spec,
1004 MirBufferStreamInfo* streams,
1005 unsigned int num_streams)
1006-__attribute__((deprecated("use mir_window_spec_set_streams() instead")));
1007+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_streams() instead");
1008
1009 void mir_surface_apply_spec(MirSurface* surface, MirSurfaceSpec* spec)
1010-__attribute__((deprecated("use mir_window_apply_spec() instead")));
1011+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_apply_spec() instead");
1012
1013 bool mir_surface_is_valid(MirSurface *surface)
1014-__attribute__((deprecated("use mir_window_is_valid() instead")));
1015+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_is_valid() instead");
1016
1017 MirWaitHandle* mir_surface_create(MirSurfaceSpec* requested_specification,
1018 mir_surface_callback callback, void* context)
1019-__attribute__((deprecated("use mir_create_window() instead")));
1020+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_create_window() instead");
1021
1022 MirSurface* mir_surface_create_sync(MirSurfaceSpec* requested_specification)
1023-__attribute__((deprecated("use mir_create_window_sync() instead")));
1024+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_create_window_sync() instead");
1025
1026 MirWaitHandle *mir_surface_release(
1027 MirSurface *surface,
1028 mir_surface_callback callback,
1029 void *context)
1030-__attribute__((deprecated("use mir_window_release() instead")));
1031+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_release() instead");
1032
1033 void mir_surface_release_sync(MirSurface *surface)
1034-__attribute__((deprecated("use mir_window_release_sync() instead")));
1035+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_release_sync() instead");
1036
1037 void mir_surface_set_event_handler(MirSurface *surface,
1038 mir_surface_event_callback callback,
1039 void* context)
1040-__attribute__((deprecated("use mir_window_set_event_handler() instead")));
1041+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_set_event_handler() instead");
1042
1043 MirBufferStream* mir_surface_get_buffer_stream(MirSurface *surface)
1044-__attribute__((deprecated("use mir_window_get_buffer_stream() instead")));
1045+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_buffer_stream() instead");
1046
1047 char const* mir_surface_get_error_message(MirSurface *surface)
1048-__attribute__((deprecated("use mir_window_get_error_message() instead")));
1049+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_error_message() instead");
1050
1051 void mir_surface_get_parameters(MirSurface *surface, MirSurfaceParameters *parameters)
1052-__attribute__((deprecated("use mir_window_get_parameters() instead")));
1053+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_parameters() instead");
1054
1055 MirSurfaceType mir_surface_get_type(MirSurface* surface)
1056-__attribute__((deprecated("use mir_window_get_type() instead")));
1057+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_type() instead");
1058
1059 MirWaitHandle* mir_surface_set_state(MirSurface *surface,
1060 MirSurfaceState state)
1061-__attribute__((deprecated("use mir_window_set_state() instead")));
1062+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_set_state() instead");
1063
1064 MirSurfaceState mir_surface_get_state(MirSurface *surface)
1065-__attribute__((deprecated("use mir_window_get_state() instead")));
1066+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_state() instead");
1067
1068 /**
1069 * Set the swapinterval for the default stream.
1070@@ -260,37 +261,37 @@
1071 * or NULL if the interval could not be supported
1072 */
1073 MirWaitHandle* mir_surface_set_swapinterval(MirSurface* surface, int interval)
1074-__attribute__((deprecated("Swap interval should be set on the backing content")));
1075+MIR_FOR_REMOVAL_IN_VERSION_1("Swap interval should be set on the backing content");
1076
1077 int mir_surface_get_dpi(MirSurface* surface)
1078-__attribute__((deprecated("use mir_window_get_dpi() instead")));
1079+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_dpi() instead");
1080
1081 MirSurfaceFocusState mir_surface_get_focus(MirSurface *surface)
1082-__attribute__((deprecated("use mir_window_get_focus_state() instead")));
1083+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_focus_state() instead");
1084
1085 MirSurfaceVisibility mir_surface_get_visibility(MirSurface *surface)
1086-__attribute__((deprecated("use mir_window_get_visibility() instead")));
1087+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_visibility() instead");
1088
1089 MirWaitHandle* mir_surface_configure_cursor(MirSurface *surface, MirCursorConfiguration const* parameters)
1090-__attribute__((deprecated("use mir_window_configure_cursor() instead")));
1091+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_configure_cursor() instead");
1092
1093 MirOrientation mir_surface_get_orientation(MirSurface *surface)
1094-__attribute__((deprecated("use mir_window_get_orientation() instead")));
1095+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_orientation() instead");
1096
1097 MirWaitHandle* mir_surface_set_preferred_orientation(MirSurface *surface, MirOrientationMode orientation)
1098-__attribute__((deprecated("use mir_window_set_preferred_orientation() instead")));
1099+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_set_preferred_orientation() instead");
1100
1101 MirOrientationMode mir_surface_get_preferred_orientation(MirSurface *surface)
1102-__attribute__((deprecated("use mir_window_get_preferred_orientation() instead")));
1103+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_preferred_orientation() instead");
1104
1105 MirWaitHandle* mir_surface_request_persistent_id(MirSurface* surface, mir_surface_id_callback callback, void* context)
1106-__attribute__((deprecated("use mir_window_request_persistent_id() instead")));
1107+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_request_persistent_id() instead");
1108
1109 MirPersistentId* mir_surface_request_persistent_id_sync(MirSurface *surface)
1110-__attribute__((deprecated("use mir_window_request_persistent_id_sync() instead")));
1111+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_request_persistent_id_sync() instead");
1112
1113 void mir_surface_raise(MirSurface* surface, MirCookie const* cookie)
1114-__attribute__((deprecated("use mir_window_raise() instead")));
1115+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_raise() instead");
1116
1117 #pragma GCC diagnostic pop
1118
1119
1120=== modified file 'include/client/mir_toolkit/mir_wait.h'
1121--- include/client/mir_toolkit/mir_wait.h 2017-01-19 23:17:56 +0000
1122+++ include/client/mir_toolkit/mir_wait.h 2017-04-25 09:32:38 +0000
1123@@ -19,6 +19,7 @@
1124 #define MIR_TOOLKIT_MIR_WAIT_H_
1125
1126 #include <mir_toolkit/client_types.h>
1127+#include <mir_toolkit/deprecations.h>
1128
1129 #ifdef __cplusplus
1130 /**
1131@@ -36,7 +37,7 @@
1132 * \param [in] wait_handle Handle returned by an asynchronous request
1133 */
1134 void mir_wait_for(MirWaitHandle *wait_handle)
1135-__attribute__ ((deprecated("No longer supported - use callbacks or wait for state changes")));
1136+MIR_FOR_REMOVAL_IN_VERSION_1("No longer supported - use callbacks or wait for state changes");
1137
1138 /**
1139 * Wait on the supplied handle until one instance of the associated request
1140@@ -47,7 +48,7 @@
1141 * \param [in] wait_handle Handle returned by an asynchronous request
1142 */
1143 void mir_wait_for_one(MirWaitHandle *wait_handle)
1144-__attribute__ ((deprecated("No longer supported - use callbacks or wait for state changes")));
1145+MIR_FOR_REMOVAL_IN_VERSION_1("No longer supported - use callbacks or wait for state changes");
1146
1147
1148 #ifdef __cplusplus
1149
1150=== modified file 'include/client/mir_toolkit/mir_window.h'
1151--- include/client/mir_toolkit/mir_window.h 2017-02-03 20:39:06 +0000
1152+++ include/client/mir_toolkit/mir_window.h 2017-04-25 09:32:38 +0000
1153@@ -22,6 +22,7 @@
1154 #include <mir_toolkit/client_types.h>
1155 #include <mir_toolkit/common.h>
1156 #include <mir_toolkit/mir_cursor_configuration.h>
1157+#include <mir_toolkit/deprecations.h>
1158
1159 #include <stdbool.h>
1160
1161@@ -555,7 +556,7 @@
1162 MirRenderSurface* render_surface,
1163 int logical_width, int logical_height,
1164 int displacement_x, int displacement_y)
1165-__attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition")));
1166+MIR_FOR_REMOVAL_IN_VERSION_1("This function is slated for rename due to MirRenderSurface-->MirSurface transition");
1167 #pragma GCC diagnostic pop
1168
1169 /**
1170@@ -774,7 +775,7 @@
1171 * \param [in,out] context User data passed to completion callback.
1172 */
1173 void mir_window_request_persistent_id(MirWindow* window, MirWindowIdCallback callback, void* context)
1174-__attribute__((deprecated("Use mir_window_request_window_id() instead")));
1175+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_request_window_id() instead");
1176 void mir_window_request_window_id(MirWindow* window, MirWindowIdCallback callback, void* context);
1177
1178 /**
1179@@ -784,7 +785,7 @@
1180 * be freed with a call to mir_persistent_id_release()
1181 */
1182 MirPersistentId* mir_window_request_persistent_id_sync(MirWindow* window)
1183-__attribute__((deprecated("Use mir_window_request_window_id_sync")));
1184+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_request_window_id_sync");
1185 MirWindowId* mir_window_request_window_id_sync(MirWindow* window);
1186 #ifdef __cplusplus
1187 }
1188
1189=== modified file 'include/client/mir_toolkit/rs/mir_render_surface.h'
1190--- include/client/mir_toolkit/rs/mir_render_surface.h 2017-03-16 16:47:21 +0000
1191+++ include/client/mir_toolkit/rs/mir_render_surface.h 2017-04-25 09:32:38 +0000
1192@@ -21,6 +21,7 @@
1193 #define MIR_TOOLKIT_MIR_RENDER_SURFACE_H_
1194
1195 #include <mir_toolkit/client_types.h>
1196+#include <mir_toolkit/deprecations.h>
1197
1198 #ifdef __cplusplus
1199 /**
1200@@ -49,7 +50,7 @@
1201 int width, int height,
1202 MirRenderSurfaceCallback callback,
1203 void* context)
1204-__attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition")));
1205+MIR_FOR_REMOVAL_IN_VERSION_1("This function is slated for rename due to MirRenderSurface-->MirSurface transition");
1206
1207 /**
1208 * Create a render surface and wait for the result
1209@@ -64,7 +65,7 @@
1210 MirRenderSurface* mir_connection_create_render_surface_sync(
1211 MirConnection* connection,
1212 int width, int height)
1213-__attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition")));
1214+MIR_FOR_REMOVAL_IN_VERSION_1("This function is slated for rename due to MirRenderSurface-->MirSurface transition");
1215
1216 /**
1217 * Get the size of the MirRenderSurface
1218@@ -76,7 +77,7 @@
1219 void mir_render_surface_get_size(
1220 MirRenderSurface* render_surface,
1221 int* width, int* height)
1222-__attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition")));
1223+MIR_FOR_REMOVAL_IN_VERSION_1("This function is slated for rename due to MirRenderSurface-->MirSurface transition");
1224
1225 /**
1226 * Set the size of the MirRenderSurface
1227@@ -88,7 +89,7 @@
1228 void mir_render_surface_set_size(
1229 MirRenderSurface* render_surface,
1230 int width, int height)
1231-__attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition")));
1232+MIR_FOR_REMOVAL_IN_VERSION_1("This function is slated for rename due to MirRenderSurface-->MirSurface transition");
1233
1234 /**
1235 * Test for a valid render surface
1236@@ -100,7 +101,7 @@
1237 */
1238 bool mir_render_surface_is_valid(
1239 MirRenderSurface* render_surface)
1240-__attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition")));
1241+MIR_FOR_REMOVAL_IN_VERSION_1("This function is slated for rename due to MirRenderSurface-->MirSurface transition");
1242
1243 /**
1244 * Retrieve a text description of the error. The returned string is owned by
1245@@ -113,7 +114,7 @@
1246 */
1247 char const *mir_render_surface_get_error_message(
1248 MirRenderSurface* render_surface)
1249-__attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition")));
1250+MIR_FOR_REMOVAL_IN_VERSION_1("This function is slated for rename due to MirRenderSurface-->MirSurface transition");
1251
1252 /**
1253 * Release the specified render surface
1254@@ -122,7 +123,7 @@
1255 */
1256 void mir_render_surface_release(
1257 MirRenderSurface* render_surface)
1258-__attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition")));
1259+MIR_FOR_REMOVAL_IN_VERSION_1("This function is slated for rename due to MirRenderSurface-->MirSurface transition");
1260
1261 /**
1262 * Obtain the buffer stream backing a given render surface.
1263@@ -142,7 +143,7 @@
1264 MirRenderSurface* render_surface,
1265 int width, int height,
1266 MirPixelFormat format)
1267-__attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition")));
1268+MIR_FOR_REMOVAL_IN_VERSION_1("This function is slated for rename due to MirRenderSurface-->MirSurface transition");
1269
1270 /**
1271 * Obtain the presentation chain backing a given render surface.
1272@@ -155,7 +156,7 @@
1273 */
1274 MirPresentationChain* mir_render_surface_get_presentation_chain(
1275 MirRenderSurface* render_surface)
1276-__attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition")));
1277+MIR_FOR_REMOVAL_IN_VERSION_1("This function is slated for rename due to MirRenderSurface-->MirSurface transition");
1278
1279 /** Query whether the server supports a given presentation mode.
1280 *
1281@@ -189,7 +190,7 @@
1282 MirWindowSpec* spec,
1283 MirRenderSurface* render_surface,
1284 int hotspot_x, int hotspot_y)
1285-__attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition")));
1286+MIR_FOR_REMOVAL_IN_VERSION_1("This function is slated for rename due to MirRenderSurface-->MirSurface transition");
1287
1288 #pragma GCC diagnostic pop
1289
1290
1291=== modified file 'include/core/mir_toolkit/common.h'
1292--- include/core/mir_toolkit/common.h 2017-01-23 22:29:00 +0000
1293+++ include/core/mir_toolkit/common.h 2017-04-25 09:32:38 +0000
1294@@ -21,6 +21,8 @@
1295 #ifndef MIR_COMMON_H_
1296 #define MIR_COMMON_H_
1297
1298+#include <mir_toolkit/deprecations.h>
1299+
1300 //for clang
1301 #ifndef __has_feature
1302 #define __has_feature(x) 0 // Compatibility with non-clang
1303@@ -35,7 +37,7 @@
1304 (__has_extension(attribute_deprecated_with_message) && \
1305 __has_extension(enumerator_attributes))
1306 #define MIR_DEPRECATED_ENUM(ENUM, INSTEAD) \
1307- ENUM __attribute__ ((deprecated("Use " #INSTEAD " instead")))
1308+ ENUM MIR_FOR_REMOVAL_IN_VERSION_1("Use " #INSTEAD " instead")
1309 #else
1310 #define MIR_DEPRECATED_ENUM(ENUM, INSTEAD) \
1311 ENUM
1312@@ -65,7 +67,7 @@
1313 mir_surface_attrib_preferred_orientation,
1314 /* Must be last */
1315 mir_surface_attribs
1316-} MirSurfaceAttrib __attribute__ ((deprecated("use MirWindowAttrib")));
1317+} MirSurfaceAttrib MIR_FOR_REMOVAL_IN_VERSION_1("use MirWindowAttrib");
1318
1319 /**
1320 * Attributes of a window that the client and server/shell may wish to
1321@@ -102,7 +104,7 @@
1322 mir_surface_type_satellite, /**< AKA "toolbox"/"toolbar" */
1323 mir_surface_type_tip, /**< AKA "tooltip" */
1324 mir_surface_types
1325-} MirSurfaceType __attribute__ ((deprecated("use MirWindowType")));
1326+} MirSurfaceType MIR_FOR_REMOVAL_IN_VERSION_1("use MirWindowType");
1327
1328 typedef enum MirWindowType
1329 {
1330@@ -132,7 +134,7 @@
1331 mir_surface_state_horizmaximized,
1332 mir_surface_state_hidden,
1333 mir_surface_states
1334-} MirSurfaceState __attribute__ ((deprecated("use MirWindowState")));
1335+} MirSurfaceState MIR_FOR_REMOVAL_IN_VERSION_1("use MirWindowState");
1336
1337 typedef enum MirWindowState
1338 {
1339@@ -154,7 +156,7 @@
1340 {
1341 mir_surface_unfocused = 0,
1342 mir_surface_focused
1343-} MirSurfaceFocusState __attribute__ ((deprecated("use MirWindowFocusState")));
1344+} MirSurfaceFocusState MIR_FOR_REMOVAL_IN_VERSION_1("use MirWindowFocusState");
1345
1346 typedef enum MirWindowFocusState
1347 {
1348@@ -166,7 +168,7 @@
1349 {
1350 mir_surface_visibility_occluded = 0,
1351 mir_surface_visibility_exposed
1352-} MirSurfaceVisibility __attribute__ ((deprecated("use MirWindowFocusState")));
1353+} MirSurfaceVisibility MIR_FOR_REMOVAL_IN_VERSION_1("use MirWindowFocusState");
1354
1355 typedef enum MirWindowVisibility
1356 {
1357
1358=== added file 'include/core/mir_toolkit/deprecations.h'
1359--- include/core/mir_toolkit/deprecations.h 1970-01-01 00:00:00 +0000
1360+++ include/core/mir_toolkit/deprecations.h 2017-04-25 09:32:38 +0000
1361@@ -0,0 +1,36 @@
1362+/*
1363+ * Copyright © 2017 Canonical Ltd.
1364+ *
1365+ * This program is free software: you can redistribute it and/or modify it
1366+ * under the terms of the GNU Lesser General Public License version 3,
1367+ * as published by the Free Software Foundation.
1368+ *
1369+ * This program is distributed in the hope that it will be useful,
1370+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1371+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1372+ * GNU Lesser General Public License for more details.
1373+ *
1374+ * You should have received a copy of the GNU Lesser General Public License
1375+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1376+ */
1377+
1378+#ifndef MIR_DEPRECATIONS_H_
1379+#define MIR_DEPRECATIONS_H_
1380+
1381+#ifndef MIR_ENABLE_DEPRECATIONS
1382+ // use __GNUC__ < 6 as a proxy for building on Ubunutu 16.04LTS ("Xenial")
1383+ #if defined(__clang__) || !defined(__GNUC__) || (__GNUC__ >= 6)
1384+ #define MIR_ENABLE_DEPRECATIONS 1
1385+ #else
1386+ #define MIR_ENABLE_DEPRECATIONS 0
1387+ #endif
1388+#endif
1389+
1390+#if MIR_ENABLE_DEPRECATIONS > 0
1391+ #define MIR_FOR_REMOVAL_IN_VERSION_1(message)\
1392+ __attribute__((deprecated(message)))
1393+#else
1394+ #define MIR_FOR_REMOVAL_IN_VERSION_1(message)
1395+#endif
1396+
1397+#endif //MIR_DEPRECATIONS_H_

Subscribers

People subscribed via source and target branches